All Text-to-Speech code samples
This page contains code samples for Text-to-Speech. To search and filter code samples for otherGoogle Cloud products, see theGoogle Cloud sample browser.
View in documentation
Pass text to the Text-to-Speech API
Demonstrates how to pass text to the Text-to-Speech API to synthesize audio.
View in documentation
Synthesize from a string of text
Demonstrates synthesizing from a string of text.
View in documentation
Synthesize SSML
Demonstrates how to use SSML with the Text-to-speech API.
View in documentation
Synthesize text with audio profiles
Synthesize text, specifying an audio profile to optimize the synthetic speech for playback on different types of hardware.
View in documentation
Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.