Hi Matthew,
after I wasn't able to solve the sound issues on my own I did a full reinstall of the system today using your "jasper-all-in-one" image v1.5.
I choose the jasper-dev branch.
It worked quite well out of the box. I just had to additionally install the mad package and one other package, which name I can't remember at the moment. But maybe you wan't to include them into your image as well? But nevermind, the other small hickup was the the standard configuration file did not work in my case for defining the sst_engine:
stt_engine: witai
witai-stt:
access_token: KEY_HERE_NO_QUOTES
I always got the error message "plugin witai not found". I had to change the configuration file to
stt_engine:
witai-stt witai-stt:
access_token: KEY_HERE_NO_QUOTES
With that change, I got it running. I just mention these small points in case someone else is running in the same issues.
My bigger problem is, I am still (or again) stuck with my audio output error:
- Jasper starts, it says "How can I be of service" out of my speakers with the output format (48000 Hz, 1 channel, 16 bit)
- It records my key phrase "Hello Jasper" (input format 16000 Hz, 1 channel, 16 bit) and then crashes while trying to play a soundfile with the (appearently not supported) format (Int16, 2-channel at 44100 Hz)
see my --debug log for details:
//Error message of --debug
DEBUG:pyaudio_1_0_0.pyaudioengine:Found 10 PyAudio devices
DEBUG:pyaudio_1_0_0.pyaudioengine:Found 10 PyAudio devices
DEBUG:pyaudio_1_0_0.pyaudioengine:Found 10 PyAudio devices
DEBUG:pyaudio_1_0_0.pyaudioengine:Found 10 PyAudio devices
INFO:requests.packages.urllib3.connectionpool:Starting new HTTPS connection (1):
query.yahooapis.comDEBUG:requests.packages.urllib3.connectionpool:"GET /v1/public/yql?q=SELECT+%2A+FROM+geo.places+WHERE+text%3D%22Munich%22&env=store%3A%2F%2Fdatatables.org%2Falltableswithkeys&format=json HTTP/1. 1" 200 None
INFO:requests.packages.urllib3.connectionpool:Starting new HTTP connection (1): 192.168.2.11
DEBUG:requests.packages.urllib3.connectionpool:"GET /voices HTTP/1.1" 200 92
INFO:mary_tts_1_0_0.marytts:Available voices: cmu-slt-hsmm
DEBUG:jasper.mic:output_padding not configured,using default.
DEBUG:jasper.mic:Input sample rate: 16000 Hz
DEBUG:jasper.mic:Input sample width: 16 bit
DEBUG:jasper.mic:Input channels: 1
DEBUG:jasper.mic:Input chunksize: 1024 frames
DEBUG:jasper.mic:Output chunksize: 1024 frames
DEBUG:jasper.mic:Output padding: no
DEBUG:requests.packages.urllib3.connectionpool:"GET /process?VOICE=cmu-slt-hsmm&LOCALE=en_US&INPUT_TYPE=TEXT&OUTPUT_TYPE=AUDIO&AUDIO=WAVE_FILE&INPUT_TEXT=How+can+I+be+of+service%2C+Tim%3F HTTP/1 .1" 200 196844
DEBUG:pyaudio_1_0_0.pyaudioengine:output stream opened on device 'jabra-speak-510-usb-audio' (48000 Hz, 1 channel, 16 bit)
DEBUG:pyaudio_1_0_0.pyaudioengine:output stream closed on device 'jabra-speak-510-usb-audio'
DEBUG:jasper.conversation:Starting to handle conversation.
INFO:jasper.mic:Waiting for keyword 'HELLO JASPER'...
DEBUG:pyaudio_1_0_0.pyaudioengine:input stream opened on device 'jabra-speak-510-usb-audio' (16000 Hz, 1 channel, 16 bit)
DEBUG:jasper.mic:Started recording on device 'jabra-speak-510-usb-audio'
DEBUG:jasper.mic:Triggered on SNR of 35.72691458dB
DEBUG:jasper.mic:Recording's SNR dB: 37.308848
DEBUG:jasper.mic:Recording's SNR dB: 35.051943
DEBUG:jasper.mic:Recording's SNR dB: 30.519396
DEBUG:jasper.mic:Recording's SNR dB: 33.441957
DEBUG:jasper.mic:Recording's SNR dB: 35.029981
DEBUG:jasper.mic:Recording's SNR dB: 35.106606
DEBUG:jasper.mic:Recording's SNR dB: 35.106606
DEBUG:jasper.mic:Recording's SNR dB: 35.117497
DEBUG:jasper.mic:Recording's SNR dB: 35.438046
DEBUG:jasper.mic:Recording's SNR dB: 36.334293
DEBUG:jasper.mic:Recording's SNR dB: 36.604439
DEBUG:jasper.mic:Recording's SNR dB: 36.586075
DEBUG:jasper.mic:Recording's SNR dB: 36.277336
DEBUG:jasper.mic:Recording's SNR dB: 34.065828
DEBUG:jasper.mic:Recording's SNR dB: 31.530118
DEBUG:jasper.mic:Recording's SNR dB: 31.296702
DEBUG:jasper.mic:Recording's SNR dB: 31.279787
DEBUG:jasper.mic:Recording's SNR dB: 31.262839
DEBUG:jasper.mic:Recording's SNR dB: 30.370279
DEBUG:jasper.mic:Recording's SNR dB: 24.498797
DEBUG:jasper.mic:Recording's SNR dB: 11.397506
DEBUG:jasper.mic:Recording's SNR dB: 2.652511
DEBUG:jasper.mic:Recorded 42 frames
INFO:requests.packages.urllib3.connectionpool:Starting new HTTPS connection (1):
api.wit.aiDEBUG:requests.packages.urllib3.connectionpool:"POST /speech?v=20160526 HTTP/1.1" 200 103
INFO:witai_stt_1_0_0.witai:Transcribed: [u'HELLO JASPER']
INFO:jasper.mic:Keyword HELLO JASPER has been uttered
DEBUG:pyaudio_1_0_0.pyaudioengine:input stream closed on device 'jabra-speak-510-usb-audio'
CRITICAL:pyaudio_1_0_0.pyaudioengine:PyAudioDevice 2 (Jabra SPEAK 510 USB: Audio (hw:1,0)) doesn't support output format (Int16, 2-channel at 44100 Hz)
Traceback (most recent call last):
File "./Jasper.py", line 5, in <module>
jasper.main()
File "/home/pi/jasper-client/jasper/__main__.py", line 55, in main
app.run()
File "/home/pi/jasper-client/jasper/application.py", line 251, in run
self.conversation.handleForever()
File "/home/pi/jasper-client/jasper/conversation.py", line 40, in handleForever
input = self.mic.listen()
File "/home/pi/jasper-client/jasper/mic.py", line 201, in listen
return self.active_listen()
File "/home/pi/jasper-client/jasper/mic.py", line 206, in active_listen
self.play_file(paths.data('audio', 'beep_hi.wav'))
File "/home/pi/jasper-client/jasper/mic.py", line 224, in play_file
add_padding=self._output_padding)
File "/home/pi/jasper-client/jasper/audioengine.py", line 110, in play_file
self.play_fp(f, *args, **kwargs)
File "/home/pi/jasper-client/jasper/audioengine.py", line 97, in play_fp
chunksize=chunksize) as stream:
File "/usr/lib/python2.7/contextlib.py", line 17, in __enter__
return self.gen.next()
File "/home/pi/jasper-client/plugins/audioengine/pyaudio-ae/pyaudioengine.py", line 149, in open_stream
raise plugin.audioengine.UnsupportedFormat(msg)
jasper.audioengine.UnsupportedFormat: PyAudioDevice 2 (Jabra SPEAK 510 USB: Audio (hw:1,0)) doesn't support output format (Int16, 2-channel at 44100 Hz)
//Error end
I don't really understand why Japser is playing it's first sentence in an output format which is supported, and the second audio output in an unsupported audio format?
Is there a setting, where I can change that?
Am Freitag, 3. Juni 2016 16:52:23 UTC+2 schrieb Matthew Curry:
Ok, I posted a repo of tools on the main page. Download that and try the audiotest.sh, also you might try the usbaudio.sh as well. (its case sensitive for now, have to update the code)
Also, be sure you check your levels in 'alsamixer'
- levels in alsamixer a both "in the green"
- usbaudio.sh is I think outdated?
- audiotest.sh:
If I try audiotest.sh, I get the error message:
"Aufnahme: WAVE '/tmp/3secondtest.wav' : Signed 16 bit Little Endian, Rate: 44100 Hz, stereo
Überlauf!!! (mindestens 3,580 ms)"
("Überlauf" is german for "overflow")
However, if I run the commands manually WITHOUT the "-d 3" option :
sudo arecord -f cd /tmp/3secondtest.wav
sudo aplay -f cd /tmp/3secondtest.wav
I can record and play the file without any problems and the audio recording and playback is quite good.
Everykind of help is appreciated!
Regards,
Tim