Microsoft Speech
The default TTS provider
Example Usage
D-ID provides Microsoft Azure Cognitive Services integration to generate text to speech
"provider": {
"type": "microsoft",
"voice_id": "en-GB-AbbiNeural"
}"provider": {
"type": "microsoft",
"voice_id": "en-US-JennyNeural",
"voice_config": {
"style": "Cheerful"
}
}"provider": {
"type": "microsoft",
"voice_id": "en-US-JennyNeural",
"voice_config": {
"rate": "1.2"
}
}Available Voices
Go to Microsoft Voice Gallery above, and:
- Select any voice from the voice gallery
- Click on the "Sample code" tab on the right
- Copy the voice name:
config.SpeechSynthesisVoiceName ="en-GB-AbbiNeural" - Use this string
en-GB-AbbiNeuralin thevoice_idfield
Get all Text-to-Speech supported voicesSee /voices endpoint to get all the supported voices from all integrated TTS providers
Voice Config
Style: The style parameter selects the speaking style of the voice, for example Cheerful. Available styles change between voices.
Speed: The rate parameter controls how fast the voice speaks. The value is relative to 1 (normal speed), 0.5 being half speed and 2 being twice as fast. Default value: 1. Another option is one of x-slow, slow, medium, fast, x-fast.
Pitch: The pitch parameter changes the pitch of the voice, for example +2st (two semitones up), a value in Hz, for example +50Hz, or one of x-low, low, medium, high, x-high.
Adding Pauses
Adding pauses to the audio generated by Microsoft TTS is possible using the SSML (Speech Synthesis Markup Language) with the syntax and the examples below. Adding <break time=\"5000ms\"/> will create an exact and natural pause in the speech for 5 seconds. It is not just added silence between words, but the AI has an actual understanding of this syntax and will add a natural pause.
{
"script":{
"type":"text",
"ssml": true,
"input": "Enjoy the 5000 milliseconds break <break time=\"5000ms\"/> generated by Microsoft",
"provider":{
"type":"microsoft",
"voice_id":"en-US-JennyNeural"
}
}
}Fully Silent (Idle) Video Example
A fully silent (idle) video is a video generated using /talks endpoint, without any words. The avatar is silent and doesn't pronounce anything. Head movements, gentle smiles, and eye-blinking still persist, which makes the silent video a great asset to use in your projects.
To create a silent video of 15 seconds (recommended), simply create a /talk with Microsoft TTS provider and 3 consequence silent breaks (5 seconds each). In the request example below, "ssml": **true** indicates that the special markup language will be used, and <break time=\"5000ms\"/> is a 5-second pause of silence. Three pauses of 5 seconds each have been added to generate a 15-second video.
Full JSON example of generating a Silent (Idle) video:
{
"source_url": "https://create-images-results.d-id.com/DefaultPresenters/Emma_f/image.jpeg",
"driver_url": "bank://lively/driver-06",
"script": {
"type": "text",
"ssml": true,
"input": "<break time=\"5000ms\"/><break time=\"5000ms\"/><break time=\"5000ms\"/>",
"provider": {
"type": "microsoft",
"voice_id": "en-US-JennyNeural"
}
},
"config": {
"fluent": true
}
}Best Practices to follow when generating a silent video:
| Key-Value | Description |
|---|---|
| "fluent": true | The "fluent": true parameter in the config object is responsible for making the video start and end with an equal frame. In such a case, the video can be looped with no noticeable transition or jump-cuts, as in the example above. |
| "driver_url": "bank://lively/driver-06" | The driver_url parameter of the talks request should be specifically set to “bank://lively/driver-06”. This driver provides the best results with a silent video generation. |
Note
- Fully silent video generation is available only using Microsoft TTS provider.
- If Silent (Idle) video is used with Streams API, fluent and driver_url parameters should be set for both the idle video (pre-generated) and talking (Streamed) videos, to make sure that no jump-cuts and different drivers being used.
Support
Have any questions? We're here to help! Go to the Help Center or send us a message.
Contact SupportUpdated 6 days ago
