varclient=Client;varreferenceAudio=GetReferenceAudio(requireExternalAudio:false);VoiceProfileResponse?profile=null;try{// Create a temporary cloned voice profile.// Set VOICEBOX_REFERENCE_AUDIO_PATH to use a real 2-30 second voice clip; otherwise this test uses a generated WAV only for endpoint coverage.profile=awaitclient.CreateProfileProfilesPostAsync(name:$"tryagi-sdk-e2e-{Guid.NewGuid():N}",description:"Temporary profile created by tryAGI.Voicebox integration tests.",language:TestLanguage,voiceType:"cloned",defaultEngine:TestEngine);// Attach reference voice audio and its transcript to the profile.varsample=awaitclient.AddProfileSampleProfilesProfileIdSamplesPostAsync(profileId:profile.Id,file:referenceAudio.Bytes,filename:referenceAudio.Filename,referenceText:referenceAudio.ReferenceText);// Read the sample list back through the API and update the transcript.varsamples=awaitclient.GetProfileSamplesProfilesProfileIdSamplesGetAsync(profile.Id);varupdatedReferenceText=$"{TestReferenceText} Updated.";varupdatedSample=awaitclient.UpdateProfileSampleProfilesSamplesSampleIdPutAsync(sampleId:sample.Id,referenceText:updatedReferenceText);// Download the stored sample audio to verify the binary audio endpoint.varsampleAudio=awaitDownloadAudioAsync($"samples/{sample.Id}");}finally{awaitTryDeleteProfileAsync(profile?.Id);}