Comments (7)
Thanks for the report! I've seen this before, and added a check to avoid it, but I guess that doesn't always work.
What were you doing when this happened? Are you able to reproduce it reliably?
from aiyprojects-raspbian.
I am having the exact same issue. Tried a rebuild from scratch. No matter what I say it fails. Can anyone help?
from aiyprojects-raspbian.
When I push the button and talk the log sits at recognizing for like a minute and then bombs. here is my log:
Jun 24 05:50:36 raspberrypi systemd[1]: Starting voice recognizer...
Jun 24 05:50:36 raspberrypi systemd[1]: Started voice recognizer.
Jun 24 06:11:05 raspberrypi python3[534]: [2017-06-24 06:11:05,221] INFO:audio:started recording
Jun 24 06:11:05 raspberrypi python3[534]: [2017-06-24 06:11:05,257] INFO:main:ready...
Jun 24 06:43:22 raspberrypi python3[534]: [2017-06-24 06:43:22,697] INFO:main:listening...
Jun 24 06:43:22 raspberrypi python3[534]: [2017-06-24 06:43:22,700] INFO:main:recognizing...
Jun 24 06:45:54 raspberrypi python3[534]: [2017-06-24 06:45:54,373] INFO:speech:event_type: 1
Jun 24 06:45:54 raspberrypi python3[534]: [2017-06-24 06:45:54,385] INFO:main:thinking...
Jun 24 06:45:55 raspberrypi python3[534]: Exception in thread Thread-2:
Jun 24 06:45:55 raspberrypi python3[534]: Traceback (most recent call last):
Jun 24 06:45:55 raspberrypi python3[534]: File "/usr/lib/python3.4/threading.py", line 920, in _bootstrap_inner
Jun 24 06:45:55 raspberrypi python3[534]: self.run()
Jun 24 06:45:55 raspberrypi python3[534]: File "/usr/lib/python3.4/threading.py", line 868, in run
Jun 24 06:45:55 raspberrypi python3[534]: self._target(*self._args, **self._kwargs)
Jun 24 06:45:55 raspberrypi python3[534]: File "src/main.py", line 377, in _recognize
Jun 24 06:45:55 raspberrypi python3[534]: self._handle_result(self.recognizer.do_request())
Jun 24 06:45:55 raspberrypi python3[534]: File "/home/pi/voice-recognizer-raspi/src/speech.py", line 259, in do_request
Jun 24 06:45:55 raspberrypi python3[534]: return self._handle_response_stream(response_stream)
Jun 24 06:45:55 raspberrypi python3[534]: File "/home/pi/voice-recognizer-raspi/src/speech.py", line 206, in _handle_response_stream
Jun 24 06:45:55 raspberrypi python3[534]: self._end_audio_request()
Jun 24 06:45:55 raspberrypi python3[534]: File "/home/pi/voice-recognizer-raspi/src/speech.py", line 201, in _end_audio_request
Jun 24 06:45:55 raspberrypi python3[534]: self._endpointer_cb()
Jun 24 06:45:55 raspberrypi python3[534]: File "src/main.py", line 366, in endpointer_cb
Jun 24 06:45:55 raspberrypi python3[534]: self.recorder.del_processor(self.recognizer)
Jun 24 06:45:55 raspberrypi python3[534]: File "/home/pi/voice-recognizer-raspi/src/audio.py", line 77, in del_processor
Jun 24 06:45:55 raspberrypi python3[534]: self._processors.remove(processor)
Jun 24 06:45:55 raspberrypi python3[534]: ValueError: list.remove(x): x not in list
from aiyprojects-raspbian.
from aiyprojects-raspbian.
@ywonglanecove and @daver99999, thanks for the report and for the complete log.
I've looked into this but can't reproduce. The correct order of events is:
- Clap.
- SyncMicRecognizer.recognize() get called.
- recognize() calls recorder.add_processor().
- recognize() sets recognizer_event
- The background thread, _recognize() handles recognizer_event and takes over.
- _recognize() calls recognizer.do_request(), which calls recognizer._handle_response_stream().
- The server detects that the user has stopped speaking, and returns the
END_OF_UTTERANCE
event. - _handle_response_stream() gets this response and calls _stop_sending_audio(resp).
- _stop_sending_audio() prints
event_type: 1
then returns True. - _handle_response_stream() calls _end_audio_request(), which calls endpointer_cb().
- endpointer_cb() calls del_processor(recognizer).
- endpointer_cb() calls status('thinking') which prints
thinking...
. - The server sends further responses with the transcript and audio data.
The problem appears to be that del_processor() is called more than once, because thinking...
appears in davey's log, and it is printed after the first call to del_processor()
. It is possible that the server returns an error after sending END_OF_UTTERANCE
, which would lead to _end_audio_request
being called twice. However, I can't think what would cause this this.
If that's the problem the right fix is to add state to GenericSpeechRequest
so it only calls endpointer_cb() once per request.
@ywonglanecove, I wouldn't mind also adding a check to turn the crash into a warning. Would you like to make a PR with your check? If not I can do it.
from aiyprojects-raspbian.
from aiyprojects-raspbian.
Closed as PR merged
from aiyprojects-raspbian.
Related Issues (20)
- AIY python package version HOT 2
- GET request in Robot framework using AWS credentials HOT 4
- say and play_wav failing after invoking CloudSpeechClient client.recognize method
- AYI-vision: Unit joy_dection_demo.service could not be found HOT 3
- AIY-voice: problems encountered by assistant_grpc_demo.py after some time of use HOT 3
- Python package install fails on raspbian
- aiy-python-wheels fails to get installed on raspbian bullseye on rpi4 HOT 4
- Pico TTS not installable (Bullseye)
- Voice Bonnet drivers not installed (HACKING.md instructions) HOT 1
- No sound input/output on Raspbian Bullseye HOT 1
- Huge delay in voice recording. HOT 1
- 500 error code HOT 3
- No microphone as user Pi on version 20210402
- Not working with Raspbian Bullseye HOT 1
- Voice Bonnet not working with Pi 4 HOT 1
- Pi Zero 2 W?
- Voice Kit Google - Failed (src/examples/voice/assistant_grpc_demo.py)
- post-installation script subprocess returned error exit status 6 HOT 3
- Voice kit google (/lib/arm-linux-gnueabihf/libc.so.6: version 'GLIBC_2.34' not found (required by /lib/arm-linux-gnueabihf/libgcc_s.so.1))
- Sound driver for AIY Voice Kit V1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from aiyprojects-raspbian.