Google Cloud Text-to-speech

A project for adding speech to text-only areas of the game Elite:Dangerous. This included the detection and translation of non-English text to English speech.

Elite:Dangerous

Table Of Contents

Current status

All player and NPC chat are converted into synthetic speech via Google Cloud Text-to-speech. Player text can be detected as non-English, in this case, it is translated into English and the result is converted into synthetic speech. In-game events can drive other speech outcomes. For example, a bounty kill triggers a Chuck Norris API joke retrieval and the result is converted into synthetic speech.

Current implementation

This is held in a local memory queue exposed via REST endpoint whereby an HTML5 player will poll and playback in the background.

Media

Video

This video showcases the HTML5 player element. For demonstration purposes, the text is manually submitted via Postman to the text-to-speech local API endpoint. A variety of voices are used to show the range available:

This video showcases in in-game experience for NPC and player text - including translation of German to English. If you want to see other examples (such as the Chuck Norris jokes upon bounty kill) please check out the playlist on YouTube:
URL to all text-to-speech videos playlist

Limitations

  • Two voices are used for the synthesis
  • Pitch, tone and emphasis are changeable from defaults in a manual fashion
  • All text events create speech API calls even if seen before

Aspirations

In order of preference:

  • Caching mechanism for already converted text
  • Automatic variance of voice used
  • Automatic mapping of voice to sources of text

Relevant posts

Similar projects

Whilst I’ve used this project to improve my knowledge in certain areas, I’ve found the following similar efforts along the way. They’re an inspiration in many ways. Do check them out:

Top