Menu
Lumberyard
Developer Guide (Version 1.11)

Text to Speech Cloud Gem (Using Amazon Polly)

You can use the Text-to-Speech (TTS) Cloud Gem to enhance your gameplay and workflows with synthesized speech. The Cloud Canvas Text-to-Speech (TTS) Cloud Gem uses Amazon Polly, which is a text-to-speech service that turns text into lifelike speech. Amazon Polly offers dozens of lifelike voices in a variety of languages. The service also creates lip synchronization from the text that you provide. You can import the generated audio and speech mark files into your dialogue system. Currently, the Text-to-Speech Gem supports playback of PCM (pulse-code modulation) files.

You can use the text-to-speech service in two ways:

  • You can prepackage speech content and include it with your game so that your clients can access it immediately.

  • Your clients can invoke the Amazon Polly service to provide text to speech while your game is running.

In the first approach, you prepare voices and dialogues that users require and store them on the client. This removes the need for the client to connect to the backend to generate and download lines that are known to be necessary. The trade-off is that the client must store the files locally.

Using the Cloud Gem Portal to Create Characters and Speech Lines

The Text to Speech Cloud Gem Portal is a simple web interface that you can use to perform the following preproduction tasks:

  • Create a character, give it a name, and specify a language, voice, and speech marks for it.

  • Create speech lines and select characters for them.

  • Preview the audio and lip synchronization for the speech lines, which are added to your speech library.

  • Add custom tags to your speech lines that you can use to filter searches of your speech library.

  • Edit the text of speech lines.

  • Configure whether game clients can request the generation of speech files and whether to cache them for more than a day.

  • Import a .csv file that has multiple speech lines you prepare in advance.

  • Download a .zip package of the voice and speech mark files that Amazon Polly generates.

After you download a generated voice package, you can use the Cloud Canvas lmbr_aws command line to import the file into your project. For more information, see Text to Speech Cloud Gem Portal.