Article·azure.microsoft.com
text-to-speechenterprisemultilingualssmlmicrosoftazureaispeechneural
Azure Neural TTS
Leverage Azure Neural TTS to convert text into natural-sounding speech using a wide range of voices and languages, with precise control over speech characteristics via SSML.
beginner30 minutes3 steps
The play
- Set up Azure AI Speech ResourceCreate an Azure AI Speech resource in the Azure portal. You'll need a subscription and choose a pricing tier. Note the resource's key and region; you'll need them later.
- Install the Speech SDKInstall the Microsoft Cognitive Services Speech SDK for your preferred language (Python, C#, Java, etc.). Use pip for Python: `pip install azure-cognitiveservices-speech`
- Synthesize Text to SpeechWrite code to synthesize text using the Speech SDK. Replace `<your_subscription_key>` and `<your_region>` with your Azure AI Speech resource credentials. Adjust the `ssml_string` to modify the voice and speech characteristics.
Starter code
Start by creating an Azure AI Speech resource and installing the Speech SDK for your preferred language.
Source