Kelt
Posts: 1
Joined: Mon Jun 12, 2017 2:02 pm

Threading breaks

Mon Jun 12, 2017 2:09 pm

Hi!

I'm kind of a newbie in this. I have some experience with the Raspberry Pi, but this is my first project with HAT-s, and sound, and the Voice KIT. I assembled the kit, registered my project, copied the jsons, and even managed to install PySocks, yet the Voice Kit still doesn't work. I've got the following error after the program timeouts.

Code: Select all

(env) pi@SorryDave:~/voice-recognizer-raspi $ src/main.py -T clap
[2017-06-12 14:51:49,755] INFO:audio:started recording
[2017-06-12 14:51:49,756] INFO:main:ready...
Clap your hands then speak, or press Ctrl+C to quit...
[2017-06-12 15:12:41,428] INFO:trigger:clap detected
[2017-06-12 15:12:41,430] INFO:main:listening...
[2017-06-12 15:12:41,432] INFO:main:recognizing...
[2017-06-12 15:15:14,127] INFO:speech:event_type: 1
[2017-06-12 15:15:14,130] INFO:main:thinking...
[2017-06-12 15:15:14,434] INFO:speech:transcript: hello hello
Exception in thread Thread-2:
Traceback (most recent call last):
  File "/usr/lib/python3.4/threading.py", line 920, in _bootstrap_inner
    self.run()
  File "/usr/lib/python3.4/threading.py", line 868, in run
    self._target(*self._args, **self._kwargs)
  File "src/main.py", line 377, in _recognize
    self._handle_result(self.recognizer.do_request())
  File "/home/pi/voice-recognizer-raspi/src/speech.py", line 259, in do_request
    return self._handle_response_stream(response_stream)
  File "/home/pi/voice-recognizer-raspi/src/speech.py", line 206, in _handle_response_stream
    self._end_audio_request()
  File "/home/pi/voice-recognizer-raspi/src/speech.py", line 201, in _end_audio_request
    self._endpointer_cb()
  File "src/main.py", line 366, in endpointer_cb
    self.recorder.del_processor(self.recognizer)
  File "/home/pi/voice-recognizer-raspi/src/audio.py", line 77, in del_processor
    self._processors.remove(processor)
ValueError: list.remove(x): x not in list
The transcript looks allright, I said "hello hello", but it wasn't passed to the assistant. Did I make an error or have I found a bug? I'm sort of out of ideas.

Evilworm
Posts: 1
Joined: Thu Mar 15, 2018 5:09 pm

Re: Threading breaks

Thu Mar 15, 2018 5:11 pm

I have the exact same problem. Did you find out what the problem was? And did you make it work?

User avatar
DougieLawson
Posts: 39304
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: Threading breaks

Thu Mar 15, 2018 7:36 pm

Where did you get src/main.py from? It's not in the current https://github.com/google/aiyprojects-raspbian repo?
Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

Criticising any questions is banned on this forum.

Any DMs sent on Twitter will be answered next month.
All non-medical doctors are on my foes list.

Return to “AIY Projects”