Convert text to speech with Azure AI Speech

Having various types of messages in a bot conversation can significantly improve user engagement. You can convert text to audio and send it as an audio file message in a bot conversation. This can be done using the bot variables and Azure AI Speech integration.

Step 1. Add and set up Azure AI Speech integration:

Navigate to the organization integrations section:

Screenshot-2023-01-25-at-21.28.462.png

Add the Azure Cognitive Services Speech (Azure AI Speech) integration:

Screenshot2023-07-28at23.11.25.png

Follow the Prerequisites section of the documentation to obtain the API key and Region, that need to be entered in the integration configuration, and click Save:

Screenshot2023-07-28at23.12.20.png

Given the settings are correct, the status of the integration will become Active.

Please note that we’re currently using those voices for the conversion: en-US-RyanMultilingualNeural for the male voice and en-US-JennyMultilingualV2Neural for the female voice. The set of the supported Azure regions is currently limited to East US, West Europe, and Southeast Asia. Check the status of the language region support here (see Jenny Multilingual V2 and Ryan Multilingual).

Step 2. Add bot variable of type Text to Speech:

Screenshot2023-07-28at23.24.36.png

In our example, we use another variable text for the conversion, so you will need to change it according to your bot structure.

Select the previously configured integration.

Step 3. Add a chat text of type Audio File to render the audio

Screenshot2023-07-28at23.26.44.png

Enable custom file URL and use the previously created variable, and adjust other settings as needed.

Edit this page

Categories
Tags
See also