What is text to speech?
In this overview, you learn about the benefits and capabilities of the text to speech feature of the Speech service, which is part of Azure AI services.
Text to speech enables your applications, tools, or devices to convert text into human like synthesized speech. The text to speech capability is also known as speech synthesis. Use humanlike prebuilt neural voices out of the box. For a full list of supported voices, languages, and locales, see Language and voice support for the Speech service.
Core features
Text to speech includes the following features:
Feature | Summary | Demo |
---|---|---|
Prebuilt neural voice (called Neural on the pricing page) | Highly natural out-of-the-box voices. Create an Azure subscription and Speech resource, and then use the Speech SDK or visit the Speech Studio portal and select prebuilt neural voices to get started. Check the pricing details. | Check the Voice Gallery and determine the right voice for your business needs. |
More about neural text to speech features
Text to speech uses deep neural networks to make the voices of computers nearly indistinguishable from the recordings of people. With the clear articulation of words, neural text to speech significantly reduces listening fatigue when users interact with AI systems.
The patterns of stress and intonation in spoken language are called prosody. Traditional text to speech systems break down prosody into separate linguistic analysis and acoustic prediction steps governed by independent models. That can result in muffled, buzzy voice synthesis.
Here's more information about neural text to speech features in the Speech service, and how they overcome the limits of traditional text to speech systems:
- Real-time speech synthesis: Use the Speech SDK or REST API to convert text to speech by using prebuilt neural voices.
Prebuilt neural voices: Azure AI Speech uses deep neural networks to overcome the limits of traditional speech synthesis regarding stress and intonation in spoken language. Prosody prediction and voice synthesis happen simultaneously, which results in more fluid and natural-sounding outputs. Each prebuilt neural voice model is available at 24 kHz and high-fidelity 48 kHz. You can use neural voices to:
- Make interactions with chatbots and voice assistants more natural and engaging.
- Convert digital texts such as e-books into audiobooks.
- Enhance in-car navigation systems.
For a full list of prebuilt Azure AI Speech neural voices, see Language and voice support for the Speech service.
Improve text to speech output with SSML: Speech Synthesis Markup Language (SSML) is an XML-based markup language used to customize text to speech outputs. With SSML, you can adjust pitch, add pauses, improve pronunciation, change speaking rate, adjust volume, and attribute multiple voices to a single document.
You can use SSML to define your own lexicons or switch to different speaking styles. With the multilingual voices, you can also adjust the speaking languages via SSML. To improve the voice output for your scenario, see Improve synthesis with Speech Synthesis Markup Language and Speech synthesis with the Audio Content Creation tool.
Visemes: Visemes are the key poses in observed speech, including the position of the lips, jaw, and tongue in producing a particular phoneme. Visemes have a strong correlation with voices and phonemes.
By using viseme events in Speech SDK, you can generate facial animation data. This data can be used to animate faces in lip-reading communication, education, entertainment, and customer service. Viseme is currently supported only for the
en-US
(US English) neural voices.
Get started
To get started with text to speech, see the quickstart. Text to speech is available via the Speech SDK, the REST API, and the Speech CLI.
Tip
To convert text to speech with a no-code approach, try the Audio Content Creation tool in Speech Studio.
Sample code
Sample code for text to speech is available on GitHub. These samples cover text to speech conversion in most popular programming languages:
Pricing note
Billable characters
When you use the text to speech feature, you're billed for each character that's converted to speech, including punctuation. Although the SSML document itself isn't billable, optional elements that are used to adjust how the text is converted to speech, like phonemes and pitch, are counted as billable characters. Here's a list of what's billable:
- Text passed to the text to speech feature in the SSML body of the request
- All markup within the text field of the request body in the SSML format, except for
<speak>
and<voice>
tags - Letters, punctuation, spaces, tabs, markup, and all white-space characters
- Every code point defined in Unicode
For detailed information, see Speech service pricing.
Important
Each Chinese character is counted as two characters for billing, including kanji used in Japanese, hanja used in Korean, or hanzi used in other languages.
Monitor Azure text to speech metrics
Monitoring key metrics associated with text to speech services is crucial for managing resource usage and controlling costs. This section will guide you on how to find usage information in the Azure portal and provide detailed definitions of the key metrics. For more details on Azure monitor metrics, refer to Azure Monitor Metrics overview.
How to find usage information in the Azure portal
To effectively manage your Azure resources, it's essential to access and review usage information regularly. Here's how to find the usage information:
Go to the Azure portal and sign in with your Azure account.
Navigate to Resources and select your resource you wish to monitor.
Select Metrics under Monitoring from the left-hand menu.
Customize metric views.
You can filter data by resource type, metric type, time range, and other parameters to create custom views that align with your monitoring needs. Additionally, you can save the metric view to dashboards by selecting Save to dashboard for easy access to frequently used metrics.
Set up alerts.
To manage usage more effectively, set up alerts by navigating to the Alerts tab under Monitoring from the left-hand menu. Alerts can notify you when your usage reaches specific thresholds, helping to prevent unexpected costs.
Definition of metrics
Below is a table summarizing the key metrics for Azure text to speech services.
Metric name | Description |
---|---|
Synthesized Characters | Tracks the number of characters converted into speech, including prebuilt neural voice and custom neural voice. For details on billable characters, see Billable characters. |
Voice Model Hosting Hours | Tracks the total time in hours that your custom neural voice model is hosted. |
Voice Model Training Minutes | Measures the total time in minutes for training your custom neural voice model. |