All Text-to-Speech code samples
This page contains code samples for Text-to-Speech. To search and filter code samples for other Google Cloud products, see the Google Cloud sample browser.
Pass text to the Text-to-Speech API
Demonstrates how to pass text to the Text-to-Speech API to synthesize audio.
- Text-to-Speech
- JavaScript
- Node JS
- PHP
- Go
- Java
- Python
Synthesize from a string of text
Demonstrates synthesizing from a string of text.
- Text-to-Speech
- Node JS
- Python
- JavaScript
- PHP
- Go
- Java
Synthesize text with audio profiles
Synthesize text, specifying an audio profile to optimize the synthetic speech for playback on different types of hardware.
- Text-to-Speech
- Python
- Node JS
- Java
- JavaScript
- PHP
Synthesize SSML
Demonstrates how to use SSML with the Text-to-speech API.
- Text-to-Speech
- PHP
- Java
- JavaScript
- Node JS
- Python
- Go
List available voices
Shows how to list the available voices.
- Text-to-Speech
- Python
- PHP
- Go
- JavaScript
- Java
- Node JS