Page 1 of 1

Speech to Text Engine

Posted: Tue Sep 03, 2019 2:22 pm
by Zilla707
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?

Re: Speech to Text Engine

Posted: Tue Sep 03, 2019 7:05 pm
by mattmiller

Re: Speech to Text Engine

Posted: Thu Sep 05, 2019 9:38 pm
by Zilla707
I will try it. Can I use it from inside python3?

Re: Speech to Text Engine

Posted: Fri Sep 06, 2019 12:37 am
by peppy.player
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/

Re: Speech to Text Engine

Posted: Sun Sep 08, 2019 9:51 pm
by Zilla707
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?

Re: Speech to Text Engine

Posted: Fri Sep 13, 2019 1:44 am
by Zilla707
Never mind. I got it figured out. Thanks for the good ideas.

Re: Speech to Text Engine

Posted: Fri Sep 13, 2019 8:03 pm
by peppy.player
Any chance to know what was the problem?

Re: Speech to Text Engine

Posted: Sun Sep 15, 2019 8:19 pm
by Zilla707
Yeah, I think that it needed pulse audio installed. Here's what I used:

Code: Select all

sudo apt-get install pulseaudio libpulse-dev
Then:

Code: Select all

sudo pip3 install pocketsphinx
Thing is, pocketsphinx isn't very accurate, so even though its offline, it doesn't really turn the speech to text accurately at all.

Re: Speech to Text Engine

Posted: Sat Nov 09, 2019 2:07 am
by peppy.player
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

Posted: Sat Nov 09, 2019 2:09 am
by Zilla707
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?