Unity Speech-to-Text

Widnu
2 min readAug 11, 2020

This is my personal note on a research project.

# Create a new Unity project.

# In the Assets folder, Create Models and Scripts folders

# Import 2 packages:

# Check point 1: Current Unity folders

# In the Scripts folder, create scripts:

# In the SampleScene, create 3D Objects, a Cube and a Plane.

# Add MaleFree1 from Supercyan’s prefabs into the scene.

# Rename the character to Male1, change the scales and rotation.

# Check point 2, click Play button

# In Player Setting, check 2 options

  • InternetClient
  • Microphone

# Add component to the Cube

  • Audio Source
  • VoiceRecognizer.cs

# Click Play button. Unity should:

  • Be able to recognize your voice.
  • Perform a speech-to-text process.
  • Display the speech in the subtitle.
  • Call Python REST APIs in Heroku to predict the tone of speech by Machine Learning.
  • Display the tone on the screen.

# Next chapter is about the related C# scripts for this task.

Reference

https://github.com/proyecto26/RestClient
https://stackabuse.com/deploying-a-flask-application-to-heroku/
https://docs.microsoft.com/en-us/windows/mixed-reality/voice-input-in-unity
https://codeholo.com/2018/03/17/dictationexamplehololens/
https://answers.unity.com/questions/629312/how-to-use-guistyles-in-oninspectorgui.html
https://lightbuzz.com/speech-recognition-unity-update/

--

--