Elite Dangerous Text-to-speech

A project for adding speech to text-only areas of the game Elite Dangerous. Including the detection and translation of foreign language text to English speech.

Google Cloud

Table of contents

Status

Successfully converts all player and NPC text chat into synthetic speech (via Google Cloud Text-to-speech). Optionally player text language is detected as non-English. In this case, it translates into English text before it then converts into synthetic speech. In-game events can drive other speech outcomes. For example, a bounty kill triggers a Chuck Norris API joke retrieval and plays the resulting joke as speech.

Implementation approach

A locally operated REST API receives game events. This API connects to Google’s API and requests conversion into speech. A queue located in memory stores the result. An HTML5 player will poll and playback the contents of this queue in the background via calls to the REST API.

Video

This video showcases the HTML5 player element. For demonstration purposes, I submit text manually via Postman to the text-to-speech local API endpoint. A variety of voices highlight the available range:

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: