Integration: Amazon Polly Text-To-Speech

Unity SDK / Integration Guides / Amazon TTS

👍

Don't forget to generate your didimos with support for Amazon Polly animation. See Built for Amazon Polly

To animate our didimos using text-to-speech, we support Amazon Polly's service, which you can find about more here. Our Meet a didimo scene has a demonstration of this integration that you can explore.

Note that for the TTS system, we use the DidimoSpeech component instead, which targets Amazon Polly and acts directly with the LegacyAnimationPoseController, without requiring the DidimoAnimator component.

Integration

Amazon TTS provides two files that are required to animate a didimo, which are a JSON text file as well as an audio file. See examples of JSON and mp3 files here. Using these two files you can try out our Text-To-Speech system by:

  • adding our DidimoAnimationExampleTts script to your didimo
  • assigning the correct fields
  • enter Play mode
  • play the TTS
667667

Optionally, you can create your own script to trigger the animation as well

// TTS Variables
public TextAsset ttsData;
public AudioClip ttsClip;

// Play TTS Function
public void PlayTts() {
  Didimo.Speech.Phrase ttsPhrase = Didimo.Speech.Phrase.Build(ttsData.bytes, ttsClip);
  didimoComponents.Speech.Speak(ttsPhrase);
}

Did this page help you?