Speech Recognition in Unity [Tutorial]

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
tutorial speech recognition in unity what speaking to a microphone converted to text okay let's record something and see if this works but first prerequisites install the hugging face Unity API it's an open source Unity package that lets you use AI models for free I made a tutorial on that so go check it out come back and then open Unity create a scene create two buttons in your scene start and stop then create some text why are you doing this we want our demo to work like this click Start say something click stop show what was said okay let's code it create a script call it something creative like speech recognition test attach it to an empty game object now open your script and create references to your buttons and text connect them in the editor then in your script listen to button clicks so we can start recording and stop recording now for the hard part now we need to record the microphone input and encode it in wave format to record the microphone input write this code this means start recording the microphone with the default input device non-looping up to 10 seconds at 44khz and if we click stop or reach the 10 second limit stop recording then all this code encodes the audio as bytes in wave format it's okay if you don't understand this part you can just think of it as preparing the audio and finally the fun part the speech recognition after encoding the audio send it to the hugging face API and when you get a result set your text.txt to the result let's see if it works it works doesn't this solution require internet yes but native in-game AI models may be just around the corner want to help push the boundaries of Ain games join the open source AI game champ July 7-9 I'm hoping to organize it wow
Info
Channel: IndividualKex
Views: 12,036
Rating: undefined out of 5
Keywords:
Id: Ngmb7l7tO0I
Channel Id: undefined
Length: 1min 26sec (86 seconds)
Published: Thu Jun 08 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.