Real-time audio recording and streaming
Hey, so I'm trying to make a home assistant like console app, but I'm having issues with the voice recording, I would like it to record real-time audio and then stream that to a real-time speech to text api, would this be possible, is so does anybody any resources on how to achieve it. I have looked at using NAudio but i can figure out how.
14 Replies
Have you tried the SpeechRecognitionEngine?
SpeechRecognitionEngine Class (System.Speech.Recognition)
Provides the means to access and manage an in-process speech recognition engine.
Result from running the sample code
If this isn't what you're looking for, what can't you figure out with NAudio?
Maybe, how do you see which input device it uses, because my results are very bad, but that might be because is uses the wrong input device
it does look like what i need, but for some reason it has a really hard time understanding what i say...
Ohh, I see, I can train it in the control panel to work better with my voice, okay thanks a lot, i will try that later. Thanks
This line in the sample code:
Ahh, okay, thanks for the help, and how do you see which device is default?
Windows settings
Ahh okay thanks a lot
It's just your device default audio device
So whatever is selected as 'Default Device' here
Ahh I see
If you want to check default device in your code and let's say set the default device to a different device if your default device isn't the device you want to use (this is confusing to type.) You can use NAudio to retrieve default device name, and set a desired device as the default.