Member-only story
How to add Google Speech to Text in Unity 2019
This is a very straightforward tutorial 😀
There is little available on the Internet regarding API integrations in small game projects. Indie games are pushing the envelope every day, changing the paradigm of gaming. It’s only a matter of time before your next game project requires some form of data ingress/egress via API.
Take a standard visual novel. They are a dime-a-dozen, however! An interactive short story where the player voices their own intent to progres the game? That is truly unique. Voice input as a mechanic, be it for communication, navigation, interacting with the game world, is a fairly unexplored method of control.
This tutorial hopes to provide you with the steps to get a very basic Speech to Text game set up, using Google’s open APIs.
- Create a new Unity Projet
- Navigate to Github and follow the instructions from this open-source project for Unity Google Streaming Speech-To-Text
- You will need to add a dependency to the Packages/manifest.json in your project — perform this step as instructed in the GitHub repo.
- The Setup steps include the Google Cloud Speech-To-Text Quickstart guide — Follow this guide to generate a Service account private key JSON file.