The Azure platform is managed by Microsoft and changes at their discretion, and so the details may be slightly different from what is documented here.

In your web browser, visit https://azure.microsoft.com/

Click the Free account link at the top, then click the Start free button. Then, you can use your e-mail to sign up, or sign into an existing Microsoft account.

Microsoft may require additional steps such as e-mail  verification before you can log in to your account.

Once you have completed the verification process and are logged in, go to the Speech Services section under AI + Machine Learning to create a Speech Service resource.

You will likely need to create a new Resource group. For the Instance Details, create a unique name. You can just choose a name you like and add some random numbers to the end. For Pricing Tier, there's only one choice since it's a free account.

Click Review and Create at the bottom.

Review your settings and click Create.

Once it is created, click the Go to resource Button.

Under overview, click the copy button on Key 1 to copy it to your clipboard. You can click the Show Keys button as well if you want to view it.

Add this secret key and the region to /etc/environment. From the command line, you can open it in your favorite editor and add:

SPEECH_KEY="4f1d...02a9"
SPEECH_REGION="eastus"

You will need to reboot before it will be loaded into your environment variables.

Using a Different Voice

Azure Speech Services includes a number of different voices. In their Voice Gallery, you can listen to the different voices and get the Voice Name to change in your code.

Click the Go to speech Studio button.

Under Text-to-speech, click Voice Gallery.

You can listen to the different voices. Once you find one that you are happy with, select Sample code and change to Python.

Look for the value of speech_config.
speech_synthesis_voice_name

It should be something like en-US-GuyNeural. You can change this in your code later.

This guide was first published on Apr 04, 2023. It was last updated on Mar 26, 2024.

This page (Create an Account with Azure) was last updated on Mar 08, 2024.

Text editor powered by tinymce.