chrisvfritz / isabella

A voice-computing assistant built in Ruby.
139 stars 9 forks source link

Utterance is not started #4

Closed polmiro closed 9 years ago

polmiro commented 9 years ago

After installing the pocketsphinx dependencies with brew, bundle install and running bundle exec rake listen I am getting this:

ERROR: "pocketsphinx.c", line 1107: Utterance is not started
rake aborted!
Pocketsphinx::API::Error: Decoder#end_utterance failed with error code -1
/Users/polmiro/Development/isabella/lib/listener.rb:29:in `listen'
/Users/polmiro/Development/isabella/Rakefile:4:in `block in <top (required)>'
Pocketsphinx::API::Error: Decoder#unset_search failed with error code -1
/Users/polmiro/Development/isabella/lib/listener.rb:29:in `listen'
/Users/polmiro/Development/isabella/Rakefile:4:in `block in <top (required)>'
Tasks: TOP => listen
(See full trace by running task with --trace)
chrisvfritz commented 9 years ago

Thanks for reporting this! It looks like an error with the pocketsphinx-ruby gem, which is under pretty active development. I know I had issues with version 0.2, which is why the Gemfile is locked at 0.1.1, but it looks like 0.3 is out now, which may be worth checking out. Can you try updating to 0.3 and see if that fixes the error for you? If it does, I'll experiment and consider updating here.

If it doesn't, I would open up an issue at pocketsphinx-ruby. The owner of that gem has been very responsive in my experience.

Either way, please let me know what you end up doing so I'll know whether to close this issue or not.

polmiro commented 9 years ago

Unfortunately I updated the Gemfile to 0.3.0 and same result.

If it's of any help, I can test run properly:

  pocketsphinx_continuous -inmic yes
chrisvfritz commented 9 years ago

Drat. Well that does help. It means you have pocketphinx installed correctly, so it's likely the problem either stems from here or the pocketsphinx-ruby gem. To test this, let's see if even the simplest pocketsphinx-ruby usage also errors out for you. Go into irb and test this out:

require 'pocketsphinx-ruby'

Pocketsphinx::LiveSpeechRecognizer.new.recognize do |speech|
  puts speech
end

If you get an error even there, there's probably an issue with pocketsphinx-ruby. Otherwise, there must be something here or with a modification you've made to your local version.

chrisvfritz commented 9 years ago

I haven't heard anything on this for a while, so I'm tentatively closing this issue. If we get more information or it pops up again for someone, I'm happy to reopen and investigate further.

brunoarueira commented 9 years ago

hey @chrisvfritz,

looks like I get the same error here, I try to figure out but without success and the log (https://gist.github.com/brunoarueira/c4b65a247efb46989964) shows me the line (at https://gist.github.com/brunoarueira/c4b65a247efb46989964#file-gistfile1-txt-L207) below:

INFO: dict.c(333): Reading main dictionary: /Users/bruno_arueira/trabalho/workspace/ruby/isabella/lib/../config/dictionary.dic

Maybe, the path is wrong. I don't know.

chrisvfritz commented 9 years ago

It looks like that dictionary is being read in just fine in your log. In fact, that log looks very similar to the successful log that I get, except that for you, it's failing on this line. I don't see anything that gives any clues as to why unfortunately.

Did you try the minimum viable pocketsphinx-ruby listener I suggested here? Does that work for you?

brunoarueira commented 9 years ago

I get the same error ERROR: "pocketsphinx.c", line 1107: Utterance is not started, I will update the pocketsphinx-ruby and try again.

Thanks,

chrisvfritz commented 9 years ago

@brunoarueira OK, if even that errored, this definitely seems like an issue with pocketsphinx-ruby rather than here. I'll close this and you can open an issue there. If you happen to resolve it, please do report your solution here for other users of the library! :smiley: