Member-only story

How to add Google Speech to Text in Unity 2019

Dusk Sharp
3 min readAug 20, 2020

--

This is a very straightforward tutorial 😀

Your game may not be a robot, but after this it will understand exactly what you say! Photo by Morning Brew on Unsplash

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.

  1. Create a new Unity Projet
  2. Navigate to Github and follow the instructions from this open-source project for Unity Google Streaming Speech-To-Text
  3. You will need to add a dependency to the Packages/manifest.json in your project — perform this step as instructed in the GitHub repo.
  4. The Setup steps include the Google Cloud Speech-To-Text Quickstart guide — Follow this guide to generate a Service account private key JSON file.

--

--

Dusk Sharp
Dusk Sharp

Written by Dusk Sharp

Indie Game Development and Trends in Gaming

Responses (3)