Skip to main content

Google Cloud Text-to-Speech

This notebook shows how to interact with the Google Cloud Text-to-Speech API to achieve speech synthesis capabilities.

First, you need to set up an Google Cloud project. You can follow the instructions here.

# !pip install google-cloud-text-to-speech


from import GoogleCloudTextToSpeechTool

text_to_speak = "Hello world!"

tts = GoogleCloudTextToSpeechTool()

We can generate audio, save it to the temporary file and then play it.

speech_file =