Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

More models for offline Speech Recognition #501

Open
sansyrox opened this issue May 19, 2019 · 7 comments · May be fixed by fossasia/susi_installer#101
Open

More models for offline Speech Recognition #501

sansyrox opened this issue May 19, 2019 · 7 comments · May be fixed by fossasia/susi_installer#101

Comments

@sansyrox
Copy link
Member

Describe the bug

Currently, offline Speech Recognition only recognizes US English and more languages need to be supported.

Expected behavior

Configure more models from here https://sourceforge.net/projects/cmusphinx/files/Acoustic%20and%20Language%20Models/

Additional context

Reference for installation can be taken from here : https://github.com/Uberi/speech_recognition/blob/master/reference/pocketsphinx.rst#installing-other-languages

@hongquan
Copy link
Member

Good!

@norbusan
Copy link
Member

I think this is a very good idea, but we need setup interface for new languages, and isn't it some other service that by default is used for speech recognition?

@sansyrox
Copy link
Member Author

@norbusan , we use google stt when we are online and we use PocketSphinx when we are offline

@geekypathak21
Copy link

geekypathak21 commented Sep 20, 2019

Hey @stealthanthrax I want to solve this issue. While using SUSI-AI offline I got following error

Error: missing PocketSphinx language data directory: "/usr/local/lib/python3.6/dist-packages/speech_recognition/pocketsphinx-data/en_US"
Internet Connection not available

and when I checked pocketsphinx-data it contains folder with name en-us not en_US.
I want to know is there any mistake done by me while setting up project or a bug.

@sansyrox
Copy link
Member Author

Hi @himanshupathak21061998 , I think this is a new bug which might have crept in while developing newer features.
I'll open an issue and you can work on fixing this first?

@sansyrox
Copy link
Member Author

Because , I don't think that there is a different way to install SUSI on your system instead.

@norbusan
Copy link
Member

@stealthanthrax @himanshupathak21061998 interesting. The en_US comes from proper language support, so we use locale names. Back then I changed the invocation of the sphinx recognizer to

recognizer.recognize_sphinx(audio, language=susi_config["language"])

where susi_config["language"] contains a locale style string (ll_LL). We need to convert this to one of the supported languages of pocket sphinx on the fly.

Best would be further to have the code check which languages are installed, and fall back to english if the requested language is not available.

It looks like an easy few line Python hack in susi_linux/main/states/recognizing_state.py, anyone wanting to take that? Otherwise I do it later on.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants