Open marco6971 opened 6 years ago
Whats the output of
aplay -l
List of PLAYBACK Hardware Devices card 0: ALSA [bcm2835 ALSA], device 0: bcm2835 ALSA [bcm2835 ALSA] Subdevices: 7/7 Subdevice #0: subdevice #0 Subdevice #1: subdevice #1 Subdevice #2: subdevice #2 Subdevice #3: subdevice #3 Subdevice #4: subdevice #4 Subdevice #5: subdevice #5 Subdevice #6: subdevice #6 card 0: ALSA [bcm2835 ALSA], device 1: bcm2835 ALSA [bcm2835 IEC958/HDMI] Subdevices: 1/1 Subdevice #0: subdevice #0
Ok try
['aplay', '-D', 'plughw:0,0', str(filename)]
See if it works
sad but no
Did you connect Pi to HDMI ?
Try another tts engine and see if that works.
with pico-tts works
i find that https://github.com/jasperproject/jasper-client/issues/641 but i don't know how to use it ok, i pu this line os.system("omxplayer " + tmpfile) in tts.py but it doesn't work
There was a problem with pymad lib. I am using pymad==0.7 and its works for me. Which version of pymad you are using ?
python-pymad is already the newest version (0.9-1+b1)
I see a change in tts.py line 103
wav.setsampwidth(4L)
mine is
wav.setsampwidth(4)
also try using pymad 0.7
sorry i'm new to linux, i use sudo apt-get install pymad=0.7 but it responds E: Version '0.7' for 'python-pymad' was not found even change the line 103 i can't reproduce anything
sudo pip install pymad==0.7
osmc@osmc-Cecil:~$ sudo pip install pymad==07
Collecting pymad==07
Could not find a version that satisfies the requirement pymad==07 (from versions: 0.9, 0.10)
No matching distribution found for pymad==07
You are using pip version 9.0.3, however version 10.0.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
osmc@osmc-Cecil:~$ sudo pip install pymad==0.7
Collecting pymad==0.7
Could not find a version that satisfies the requirement pymad==0.7 (from versions: 0.9, 0.10)
No matching distribution found for pymad==0.7
You are using pip version 9.0.3, however version 10.0.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
i already do that, i edit the previus comment so it can be seen better
Try sudo apt-get install python-pymad=0.7
Which OS are you using ?
i'm using OSMC on raspberry pi 3
osmc@osmc-Cecil:~$ sudo apt-get install python-pymad=0.7
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Version '0.7' for 'python-pymad' was not found
this is what i get running python.py
*******************************************************
* JASPER - THE TALKING COMPUTER *
* (c) 2015 Shubhro Saha, Charlie Marsh & Jan Holthuis *
*******************************************************
ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'cards.bcm2835_alsa.pcm.front.0:CARD=0'
ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5007:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM front
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side
ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'cards.bcm2835_alsa.pcm.surround51.0:CARD=0'
ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5007:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM surround21
ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'cards.bcm2835_alsa.pcm.surround51.0:CARD=0'
ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5007:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM surround21
ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'cards.bcm2835_alsa.pcm.surround40.0:CARD=0'
ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5007:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM surround40
ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'cards.bcm2835_alsa.pcm.surround51.0:CARD=0'
ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5007:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM surround41
ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'cards.bcm2835_alsa.pcm.surround51.0:CARD=0'
ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5007:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM surround50
ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'cards.bcm2835_alsa.pcm.surround51.0:CARD=0'
ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5007:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM surround51
ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'cards.bcm2835_alsa.pcm.surround71.0:CARD=0'
ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5007:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM surround71
ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'cards.bcm2835_alsa.pcm.iec958.0:CARD=0,AES0=4,AES1=130,AES2=0,AES3=2'
ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5007:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM iec958
ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'cards.bcm2835_alsa.pcm.iec958.0:CARD=0,AES0=4,AES1=130,AES2=0,AES3=2'
ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5007:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM spdif
ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'cards.bcm2835_alsa.pcm.iec958.0:CARD=0,AES0=4,AES1=130,AES2=0,AES3=2'
ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5007:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM spdif
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.hdmi
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.hdmi
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.modem
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.modem
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline
WARNING:client.notifier:gmail_address or gmail_password not set in profile, Gmail notifier will not be used
INFO:client.stt:Transcribed: ['IT IS']
INFO:client.stt:Transcribed: ['IT']
INFO:client.stt:Transcribed: ['NOW']
INFO:client.stt:Transcribed: ['IS ON']
INFO:client.stt:Transcribed: ['WHAT RIGHT']
INFO:client.stt:Transcribed: ['IS JASPER']
INFO:client.stt:Transcribed: [u'WHAT DAY IS IT']
INFO:client.stt:Transcribed: ['JASPER']
CRITICAL:client.stt:Request failed with response: u'{\n "error" : "Something went wrong. We\'ve been notified.",\n "code" : "wit"\n}'
Traceback (most recent call last):
File "/home/osmc/jasper/client/stt.py", line 594, in transcribe
r.raise_for_status()
File "/usr/local/lib/python2.7/dist-packages/requests/models.py", line 939, in raise_for_status
raise HTTPError(http_error_msg, response=self)
HTTPError: 500 Server Error: Internal Server Error for url: https://api.wit.ai/speech?v=20150101
INFO:client.stt:Transcribed: ['SAY BUT ON IS OF']
INFO:client.stt:Transcribed: ['BUT IT ON']
INFO:client.stt:Transcribed: ['DID']
No disturbance detected
No disturbance detected
INFO:client.stt:Transcribed: ['SAY']
INFO:client.stt:Transcribed: ['OF']
INFO:client.stt:Transcribed: ['IT']
No disturbance detected
INFO:client.stt:Transcribed: ['WORK']
INFO:client.stt:Transcribed: ['JASPER']
INFO:client.stt:Transcribed: [u'WHAT TIME IS IT']
No disturbance detected
No disturbance detected
No disturbance detected
No disturbance detected
No disturbance detected
No disturbance detected
Try updated url for wit.ai https://api.wit.ai/message?v=20171212
Ok thanks i correct the second error with this
for first error try installing omxplayer
sudo apt-get install omxplayer
and try that hack you mentioned above.
osmc is a kodi build so it cames with omxplayer already installed except for libs and binary that i must copy from another raspian installation,i'll figure how in the next week
hi, i'm working on but i screwed something that i don't know with alsa, i'll try with a reinstall from 0 but at the moment i don't have much time
Whats that issue with alsa?
hi, i'm marco and i'm planning to build an automatization of my room. I think that jasper is working fine, or at least, it is doing is work in right way. https://pastebin.com/adiEefVy
when i say jasper it can recognize my voice (line 3) it reproduce the high bip (line 5) I say what time is it it reproduce the low bip (line 8) it recognize my question (line 13) it give to me the answer (line 20) connect to google and retrieve the answer (line 35-->41) save the answer in a temp file (line 43-44) and play that (line 45)
https://vocaroo.com/i/s1zyUuR9XdjN this is the result that i get from https://translate.google.com/translate_tts?q=It+is+1%3A57+PM+right+now.&tl=en&client=tw-ob&textlen=24&idx=0&ttsspeed=1&total=1&ie=UTF-8&tk=757478.914885 (I don't know if this is only a temporary link or no so i uploaded that.) https://vocaroo.com/i/s12znRYIJ0kT this is what happens, obviusly the problem is the machine gun like sound.
i replace the line 76 of client/tts.py with cmd = ['aplay', '-D', 'plughw:0,1', str(filename)] instad of plughw:1,0
when i use these command everything is working fine arecord -f S32_LE -D hw:1,0 -c 4 -r 16000 test.wav aplay -D plughw:0,1 test.wav
this is my profile.yml https://pastebin.com/CUFgRU3v