-
Notifications
You must be signed in to change notification settings - Fork 1k
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
__init__() got an unexpected keyword argument 'hmm' and path issues with pocketsphinx #712
Comments
do not use TAB while indent a line in profile.yml, instead use two SPACE and see if that solve your issue. |
I tried exactly two spaces for indenting, but that caused the crash as before. My profile.yml: carrier: '' first_name: John gmail_address: ################## gmail_password: ################## last_name: Lawson phone_number: '' prefers_email: true stt_engine: sphinx hmm_dir: '/usr/share/pocketsphinx/model/hmm/en_US/hub4wsj_sc_8k' #optional timezone: America/Toronto and it still crashes with
ERROR:root:Error occured! |
(I used two spaces to start the hmmdir line, githubs formatting just isnt showing it) |
See configuration here https://jasperproject.github.io/documentation/configuration/#pocketsphinx-stt And validate your yaml here |
Oh shoot ok I see the issue with the indenting, thats fixed now |
I reverted the changed path that I tried to change by hardcoding in client/stt.py, but jasper still crashes:
WARNING:root:tts_engine not specified in profile, defaulting to 'espeak-tts' Im not clear on what the issue is, but I wonder if the fact that the new path to the hmm dir does not contain a folder named hmm in its path might be throwing something off? FWIW, when I ls the directory that Im setting hmm_dir to, the output is usr@server:/usr/share/pocketsphinx/model/en-us/en-us$ ls Which is what should be in the hmm dir afaik |
I double checked with a fresh clone of jasper and the crash still happens. The issue seems to be between Jasper and possibly the new directory location for hmm_dir |
I think you missed pocketsphinx: stt_engine: sphinx |
I dont think thats the issue, my current profile.yml is carrier: '' |
You're likely using pocketsphinx8-5prealpha. There are some API changes, as detailed in this message from the support forum ERROR:root:Error occured! init() got an unexpected keywork argument 'hmm'. For reference's sake, here's the changes I have in my (working with 5prealpha) stt.py
|
Hey mecparts, I gave the changes you described a try but Im still crashing. Im having a little bit of trouble following the changes you made, the last part generating that transcribed variable and returning it is supposed to go in the del function ? |
When I ran jasper with the changes you described it crashes with `*******************************************************
WARNING:root:tts_engine not specified in profile, defaulting to 'espeak-tts' |
No, the last changes are in the transcribe function. Look at the line numbers in the @@ lines of the diff. |
Replace the __init__ function in the PocketSphinxSTT class with this code:
And the transcribe function in the same class with this:
and see what that gets you. I can't guarantee it will work error free first time; I've modified the code I'm working with to return multiple hypotheses from PocketSphinx and to work with Mycroft's adapt.intent parser, among other things, so I can't really test it easily anymore. I like the fact that the adapt parser can assign probabilities to each hypothesis from PocketSphinx and that I can use those probabilities in the brain code to pick the best hypothesis to select a module (rather than Jasper's "use the first module that matches" approach). |
this looks to be an issue caused by using an updated pocketsphinx version (from pip), rather than the outdated version that the Jasper docs and code rely on. is there any plan to make changes required to support the new version? |
The work on Jasper - specifically making it work as-is and refactoring to Python 3 is being conducted at https://github.com/aplawson/jasper-client -- including a tutorial on how to build it and/or deploy it with a custom Raspbian ISO image. //adam |
So I am trying to get jasper working with pocketsphinx and espeak on an Orange Pi board running Ubuntu 16.04. For all intents and purposes the board has run like any ordinary Ubuntu install, save with ARM packages.
Because Im on Ubuntu, Im able to skip the whole build process for pocketsphinx and install pocketsphinx and python-pocketsphinx through apt. I then installed the rest of the dependencies as needed, but Im still having issues getting jasper to work.
The first issue seems to be with parsing profile.yml. When I try to manually specify options for CMUSphinx hmm_dir and fst_model as described at
http://jasperproject.github.io/documentation/configuration/
I get
ScannerError: mapping values are not allowed here
Which seems to happen whenever I indent a line in profile.yml. If I dont indent the lines for hmm_dir and fst_model, they seem to just be ignored.
I tried to continue on leaving those options blank, but the hmm_dir that apt installs pocketsphinx with seems to have changed. Jasper seems to think its located at
/usr/local/share/pocketsphinx/model/hmm/en_US/hub4wsj_sc_8k
but as far as I can tell its actually located at
/usr/share/pocketsphinx/model/en-us/en-us
Jasper manages to get past that issue when I manually edited the hmm path in client/stt.py, but now crashes somewhere in stt.py with
The text was updated successfully, but these errors were encountered: