Skip to main content

Google Cloud

Google Cloud offers a number of robust text-to-speech voice models. SignalWire supports all Google Cloud voices in both General Availability and Preview launch stages, except for the Studio model.

  • Standard is a basic, reliable, and budget-friendly text-to-speech model. The Standard model is less natural-sounding than WaveNet and Neural2, but more cost-effective.
  • WaveNet is powered by deep learning technology and offers more natural and lifelike speech output.
  • Neural2 is based on the same technology used to create Custom Voices and prioritizes natural and human-like pronunciation and intonation.
  • Polyglot voices have variants in multiple languages. For example, at time of writing, the polyglot-1 voice has variants for English (Australia), English (US), French, German, Spanish (Spain), and Spanish (US).

Languages​

Sample all available voices with Google's supported voices and languages reference. Copy the voice identifier string in whole from the Voice name column.

Unlike the other supported engines, Google Cloud voice identifier strings include both voice and language keys, following the pattern <language>-<model>-<variant>. For example:

  • English (UK) WaveNet female voice: en-GB-Wavenet-A
  • Spanish (Spain) Neural2 male voice: es-ES-Neural2-B
  • Mandarin Chinese Standard female voice: cmn-CN-Standard-D

Voice IDs​

Copy the voice ID in whole from the Voice name column of Google's table of supported voices. Google Cloud voice IDs encode language and model information, so no modification is needed to make these selections. Prepend gcloud. and the string is ready for use. For example: gcloud.en-GB-Wavenet-A


Examples​

Learn how to use Google Cloud voices on the SignalWire platform.

Use the languages SWML method to set one or more voices for an AI agent.

version: 1.0.0
sections:
main:
- ai:
prompt:
text: Have an open-ended conversation about flowers.
languages:
- name: English
code: en-US
voice: gcloud.en-US-Neural2-A

Alternatively, use the say_voice parameter of the play SWML method to select a voice for basic TTS.

version: 1.0.0
sections:
main:
- set:
say_voice: "gcloud.en-US-Neural2-A"
- play: "say:Greetings. This is the 2-A US English voice from Google Cloud's Neural2 text-to-speech model."