Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Create a personal voice from the voice talent's consent and a short audio prompt.
The speaker profile ID is based on the speaker's verbal consent statement and an audio prompt, which is a clean human voice sample between 5 and 90 seconds. The speaker's voice characteristics are encoded in the speakerProfileId property that's used for text to speech. For more information, see Use personal voice in your application.
Prerequisites
- Add a voice talent whose consent has the Succeeded status.
- Prepare a clean audio sample of the same voice talent speaking naturally for 5–90 seconds.
Prompt audio format
The supported formats for prompt audio files are:
| Format | Sample rate | Bit rate | Bit depth |
|---|---|---|---|
| mp3 | 16 kHz, 24 kHz, 44.1 kHz, 48 kHz | 128 kbps, 192 kbps, 256 kbps, 320 kbps | / |
| wav | 16 kHz, 24 kHz, 44.1 kHz, 48 kHz | / | 16-bit, 24-bit, 32-bit |
In Foundry (new), complete the personal voice customization and test the voice in the playground.
Add personal voice training data
These steps continue from the Customize a model page you opened in Set up a personal voice and continued in Add user consent.
On the Training data step, select New data, and then select one of the following options:
- Upload data to upload a prerecorded audio prompt.
- Record data to record the audio prompt directly in the portal.
Upload a prerecorded audio prompt
- Select the audio file. The file must be a clean human voice sample between 5 and 90 seconds. The file appears in the Data preview section.
Record an audio prompt in the portal
Read and follow the Recording tips:
- Avoid background noise: Record in a quiet environment to minimize background noise for better audio quality.
- Stay relaxed: Speak naturally and at a comfortable pace. Avoid rushing or over-enunciating.
- Use a quality microphone: Use a headset or external microphone for best results. Avoid built-in laptop microphones.
- Review quality metrics: After recording, review the quality scores to ensure your audio meets the required standards.
Select Got it, start recording.
Select Start recording, and record 5–90 seconds of natural speech in the style you want the voice to use.
Stop and review the recording, and then select Done. The recording appears in the Data preview section.
Review and submit
After you upload or record an audio prompt, complete the customization steps:
Select Next.
On the Review step, review the basic details, voice talent, and training data.
Select the acknowledgment that training incurs account usage.
Select the acknowledgment to agree to the terms of use.
Select Submit.
Test your personal voice
After the customization succeeds, you can try your personal voice in the text-to-speech playground. You don't need a separate deployment.
- Select Build from the upper-right menu.
- In the left pane, select Services, and then select the Customizations tab.
- After the personal voice customization task has the Succeeded status, select its name.
- Select Open in Playground > Text to Speech in the upper right.
- Confirm that your personal voice is selected under Voice, and wait for the Base model to load.
- Enter text, and then select Play to synthesize speech with the personal voice.
- Optionally, select Download to save the generated audio.
To work with SSML, select Input mode > SSML. The generated SSML uses a base model name in the voice element and your speaker profile ID in the mstts:ttsembedding element.
Use the voice in your application
The customization details page shows Profile ID under Model attributes. Use this value as speakerProfileId in SSML. The Voice name you entered during setup identifies your customization; don't substitute it for the base model name in the SSML voice element.
Select Call service in the playground to view sample code for the current configuration. For Speech SDK and REST integration, see Use personal voice in your application.
The custom voice REST API returns the speakerProfileId that you use to synthesize speech in an application.
Note
The personal voice ID and speaker profile ID aren't the same. You choose the personal voice ID, but the service generates the speaker profile ID. Use the personal voice ID to manage the personal voice. Use the speaker profile ID for text to speech.
You provide the audio files from a publicly accessible URL (PersonalVoices_Create) or upload the audio files (PersonalVoices_Post).
Create personal voice from a file
In this scenario, the audio files must be available locally.
To create a personal voice and get the speaker profile ID, use the PersonalVoices_Post operation of the custom voice API. Construct the request body according to the following instructions:
- Set the required
projectIdproperty. See create a project. - Set the required
consentIdproperty. See add user consent. - Set the required
audiodataproperty. You can specify one or more audio files in the same request. The maximum file size is 30 MB.
Make an HTTP POST request using the URI as shown in the following PersonalVoices_Post example.
- Replace
YourResourceKeywith your Speech resource key. - Replace
YourResourceNamewith your Speech resource name. - Replace
JessicaPersonalVoiceIdwith a personal voice ID of your choice. The case sensitive ID will be used in the personal voice's URI and can't be changed later.
curl -v -X POST -H "Ocp-Apim-Subscription-Key: YourResourceKey" -F 'projectId="ProjectId"' -F 'consentId="JessicaConsentId"' -F 'audiodata=@"D:\PersonalVoiceTest\CNVSample001.wav"' -F 'audiodata=@"D:\PersonalVoiceTest\CNVSample002.wav"' "https://YourResourceName.cognitiveservices.azure.com/customvoice/personalvoices/JessicaPersonalVoiceId?api-version=2026-01-01"
You should receive a response body in the following format:
{
"id": "JessicaPersonalVoiceId",
"speakerProfileId": "3059912f-a3dc-49e3-bdd0-02e449df1fe3",
"projectId": "ProjectId",
"consentId": "JessicaConsentId",
"status": "NotStarted",
"createdDateTime": "2024-09-01T05:30:00.000Z",
"lastActionDateTime": "2024-09-02T10:15:30.000Z"
}
Use the speakerProfileId property to integrate personal voice in your text to speech application. For more information, see use personal voice in your application.
The response header contains the Operation-Location property. Use this URI to get details about the PersonalVoices_Post operation. Here's an example of the response header:
Operation-Location: https://YourResourceName.cognitiveservices.azure.com/customvoice/operations/1321a2c0-9be4-471d-83bb-bc3be4f96a6f?api-version=2026-01-01
Operation-Id: 1321a2c0-9be4-471d-83bb-bc3be4f96a6f
Create personal voice from a URL
In this scenario, the audio files must already be stored in an Azure Blob Storage container.
To create a personal voice and get the speaker profile ID, use the PersonalVoices_Create operation of the custom voice API. Construct the request body according to the following instructions:
- Set the required
projectIdproperty. See create a project. - Set the required
consentIdproperty. See add user consent. - Set the required
audiosproperty. Within theaudiosproperty, set the following properties:- Set the required
containerUrlproperty to the URL of the Azure Blob Storage container that contains the audio files. Use shared access signatures (SAS) for a container with both read and list permissions. - Set the required
extensionsproperty to the extensions of the audio files. - Optionally, set the
prefixproperty to set a prefix for the blob name.
- Set the required
Make an HTTP PUT request using the URI as shown in the following PersonalVoices_Create example.
- Replace
YourResourceKeywith your Speech resource key. - Replace
YourResourceNamewith your Speech resource name. - Replace
JessicaPersonalVoiceIdwith a personal voice ID of your choice. The case sensitive ID will be used in the personal voice's URI and can't be changed later.
curl -v -X PUT -H "Ocp-Apim-Subscription-Key: YourResourceKey" -H "Content-Type: application/json" -d '{
"projectId": "ProjectId",
"consentId": "JessicaConsentId",
"audios": {
"containerUrl": "https://contoso.blob.core.windows.net/voicecontainer?mySasToken",
"prefix": "jessica/",
"extensions": [
".wav"
]
}
} ' "https://YourResourceName.cognitiveservices.azure.com/customvoice/personalvoices/JessicaPersonalVoiceId?api-version=2026-01-01"
# Ensure the `containerUrl` has both read and list permissions.
# Ensure the `.wav` files are located in the "jessica" folder within the container. The `prefix` matches all `.wav` files in the "jessica" folder. If there is no such folder, the prefix will match `.wav` files with names starting with "jessica".
You should receive a response body in the following format:
{
"id": "JessicaPersonalVoiceId",
"speakerProfileId": "3059912f-a3dc-49e3-bdd0-02e449df1fe3",
"projectId": "ProjectId",
"consentId": "JessicaConsentId",
"status": "NotStarted",
"createdDateTime": "2024-09-01T05:30:00.000Z",
"lastActionDateTime": "2024-09-02T10:15:30.000Z"
}
Use the speakerProfileId property to integrate personal voice in your text to speech application. For more information, see use personal voice in your application.
The response header contains the Operation-Location property. Use this URI to get details about the PersonalVoices_Create operation. Here's an example of the response header:
Operation-Location: https://YourResourceName.cognitiveservices.azure.com/customvoice/operations/1321a2c0-9be4-471d-83bb-bc3be4f96a6f?api-version=2026-01-01
Operation-Id: 1321a2c0-9be4-471d-83bb-bc3be4f96a6f