Speech to Text Engine
Hello, I am trying to program a "Cortana-like" app where I can ask it questions and it will respond and give me answers. I am going to try and use espeek for output but I need a way to get speech to text in python3. I'm pretty sure google has a web service for it, but I want something that lets me have speech to text without wifi. Any suggestions?
Aim for perfect and you'll hit somewhere near pretty good. (maybe...)
A quick wit is best followed by quick reflexes. (and a Band-Aid...)
A quick wit is best followed by quick reflexes. (and a Band-Aid...)
-
- Posts: 2247
- Joined: Thu Feb 05, 2015 11:25 pm
Re: Speech to Text Engine
Have a look at https://makers.snips.ai/
Re: Speech to Text Engine
I will try it. Can I use it from inside python3?
Aim for perfect and you'll hit somewhere near pretty good. (maybe...)
A quick wit is best followed by quick reflexes. (and a Band-Aid...)
A quick wit is best followed by quick reflexes. (and a Band-Aid...)
- peppy.player
- Posts: 383
- Joined: Mon Mar 07, 2016 6:10 am
Re: Speech to Text Engine
PocketSphinx is another option:
https://github.com/cmusphinx/pocketsphinx
There are many tutorials on web how to install it on Raspberry Pi.
I believe in general web based systems are more lightweight though they need the Internet connection. Also you need to setup account in order to use the service.
Here is very good article about speech recognition and Python:
https://realpython.com/python-speech-recognition/
https://github.com/cmusphinx/pocketsphinx
There are many tutorials on web how to install it on Raspberry Pi.
I believe in general web based systems are more lightweight though they need the Internet connection. Also you need to setup account in order to use the service.
Here is very good article about speech recognition and Python:
https://realpython.com/python-speech-recognition/
Re: Speech to Text Engine
I figured some stuff out but I can't get pocketsphinx to install. I ran "pip3 install pocketsphinx" but after running for a min, it gives me a bunch of errors. Any ideas?
Aim for perfect and you'll hit somewhere near pretty good. (maybe...)
A quick wit is best followed by quick reflexes. (and a Band-Aid...)
A quick wit is best followed by quick reflexes. (and a Band-Aid...)
Re: Speech to Text Engine
Never mind. I got it figured out. Thanks for the good ideas.
Aim for perfect and you'll hit somewhere near pretty good. (maybe...)
A quick wit is best followed by quick reflexes. (and a Band-Aid...)
A quick wit is best followed by quick reflexes. (and a Band-Aid...)
- peppy.player
- Posts: 383
- Joined: Mon Mar 07, 2016 6:10 am
Re: Speech to Text Engine
Any chance to know what was the problem?
Re: Speech to Text Engine
Yeah, I think that it needed pulse audio installed. Here's what I used:
Then:
Thing is, pocketsphinx isn't very accurate, so even though its offline, it doesn't really turn the speech to text accurately at all.
Code: Select all
sudo apt-get install pulseaudio libpulse-dev
Code: Select all
sudo pip3 install pocketsphinx
Aim for perfect and you'll hit somewhere near pretty good. (maybe...)
A quick wit is best followed by quick reflexes. (and a Band-Aid...)
A quick wit is best followed by quick reflexes. (and a Band-Aid...)
- peppy.player
- Posts: 383
- Joined: Mon Mar 07, 2016 6:10 am
Re: Speech to Text Engine
Yeah, I had the same bad experience with PocketSphinx on Windows machine. It's out-of-the-box functionality is not usable. You need to train the model. But if you are making the software which will be used by other people you cannot ask them to do that. In contrast to that any web based solution (e.g. Google Assistant SDK) works immediately and accurately without the need to train the model. Though you cannot use it offline.
Re: Speech to Text Engine
I know this thread has been asleep for a bit, but I was wondering; how do you train pocketsphinx's model so that it works well with you own voice?
Aim for perfect and you'll hit somewhere near pretty good. (maybe...)
A quick wit is best followed by quick reflexes. (and a Band-Aid...)
A quick wit is best followed by quick reflexes. (and a Band-Aid...)