respeaker / avs Goto Github PK
View Code? Open in Web Editor NEWpython implementation of alexa voice service app, 支持DuerOS
License: Other
python implementation of alexa voice service app, 支持DuerOS
License: Other
通过Authorization Code获取Access Token返回的数据:
{"expires_in":2592000,"refresh_token":"22.ead386a724bccdde9a0ed509ecb085f9.315360000.1819360424.530048537-9864305","access_token":"21.7deea2142a67896256c3bdc2307b7d4b.2592000.1506592424.530048537-9864305-{\"alexa:all\": {\"productInstanceAttributes\": {\"deviceSerialNumber\": \"42b8825fb39742529cafad83a556ff94\"}, \"productID\": \"xiaojing-45107dca34174f06a9fb7e6e6230f689\"}}","scope":"basic"}
access_token 后面为啥有那么一串? {\"alexa:all\": {\"productInstanceAttributes\": {\"deviceSerialNumber\": \"42b8825fb39742529cafad83a556ff94\"}, \"productID\": \"xiaojing-45107dca34174f06a9fb7e6e6230f689\"}}
这个 access_token 不能用。
According to SpeechRecognizer interface API documentation:
initiator
must be included in the payload of eachSpeechRecognizer.Recognize
event
However, currently avs/interface/speech_recognizer.py
hardcodes it to ''
.
Given that on-device wakeword detection, or tap-based detection are both outside of the audio stream sent to the speech-recognition service, it seems reasonsable to set it to TAP
.
I was trying to do the audio check but it don't detect mpg123, mpv which i've install
alexa-audio-check
Le chemin d’accès spécifié est introuvable.
Le chemin d’accès spécifié est introuvable.
Le chemin d’accès spécifié est introuvable.
Traceback (most recent call last):
File "c:\program files (x86)\python36-32\lib\site-packages\avs\player\__init__.py", line 21, in <module>
from .gstreamer_player import Player
File "c:\program files (x86)\python36-32\lib\site-packages\avs\player\gstreamer_player.py", line 5, in <module>
import gi
ModuleNotFoundError: No module named 'gi'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "c:\program files (x86)\python36-32\lib\runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "c:\program files (x86)\python36-32\lib\runpy.py", line 85, in _run_code
exec(code, run_globals)
File "C:\Program Files (x86)\Python36-32\Scripts\alexa-audio-check.exe\__main__.py", line 5, in <module>
File "c:\program files (x86)\python36-32\lib\site-packages\avs\check.py", line 15, in <module>
from avs.player import Player
File "c:\program files (x86)\python36-32\lib\site-packages\avs\player\__init__.py", line 28, in <module>
raise ImportError('No player available, install one of the players: gstreamer, mpv and mpg123 first')
ImportError: No player available, install one of the players: gstreamer, mpv and mpg123 first
when i run "alexa",it show me "(py3) root@zz:/home/zz/py3/avs# alexa
ERROR:root:PyUSB is required on a Linux Machine"
Paste the command(s) you ran and the output.
If there was a crash, please include the traceback here.
I want to "Change Alexa Voice Service client id and product id" to my account.
alexa-auth -c config.json
always fail in connect 192.168.100.1:3000
400 bad request
"The redirect URI you provided has not been whitelisted for your application. Please add your redirect URI in the 'Allowed Return URLs' section under 'Web Settings' for your Security Profile on Amazon Development Portal"
The alexa-auth with on board key login fine.
I have tried many ip address in the 'Allowed Return URLs' and 'Allowed Origins' but still fail with same error above.
I wondering for respeaker what should put on the URLs.
Please advise.
Allowed Origins:
http://localhost:3000/
https://192.168.23.77/
https://localhost:3000/
https://192.168.100.1:3000/
https://192.168.23.77:3000/
https://192.168.23.59:3000/
https://192.168.23.59/
https://192.168.100.1
https://202.131.71.226:3000
https://192.168.23.1:3000/
https://192.168.23.1
https://192.168.100.213
https://192.168.100.213:3000
https://202.131.71.226
Allowed Return URLs
https://192.168.23.77/authresponse
http://localhost:3000/authresponse
https://localhost:3000/authresponse
https://192.168.23.77:3000/authresponse
https://192.168.23.59:3000/authresponse
https://192.168.23.59/authresponse
https://192.168.100.1/authresponse
https://202.131.71.226:3000/authresponse
https://202.131.71.226/authresponse
https://192.168.23.1:3000/authresponse
https://192.168.23.1/authresponse
https://192.168.100.1:3000/authresponse
https://192.168.100.213:3000/authresponse
https://192.168.100.213/authresponse
http://localhost:3000/code
https://localhost:3000/code
Thanks.
Cannot invoke ASK custom skill (in Development).
With respeaker/avs, I cannot invoke the custom skill I have in Development. I authorized against my own client id/secret and product id. Normal Alexa interactions work fine, but when I say "Alexa <invocation name>" she responds she does not know that. The device is showing up on alexa.amazon.co.uk. When I run the same test with Amazon's own C++ sampleApp or with EchoSim, it works fine.
This worked fine in English.
Are there any ways to change the locale setting from AVS? I would like to speak in Japanese or other languages.
https://developer.amazon.com/docs/alexa-voice-service/settings.html
I followed the sets of commands given in following article
http://wiki.seeed.cc/ReSpeaker_4_Mic_Array_for_Raspberry_Pi/
But after being done with the commands. No Status code 204 is received after running
"python ns_kws_doa_alexa_with_light.py"
Please help me to find the issue.
Following is the log file.........
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.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 pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround21
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround21
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround40
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround41
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround50
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround51
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround71
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.iec958
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.iec958
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.iec958
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
ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'defaults.bluealsa.device'
ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:4996:(snd_config_expand) Args evaluate error: No such file or directory
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM bluealsa
ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'defaults.bluealsa.device'
ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:4996:(snd_config_expand) Args evaluate error: No such file or directory
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM bluealsa
ALSA lib pcm_dmix.c:990:(snd_pcm_dmix_open) The dmix plugin supports only playback stream
ALSA lib pcm_dmix.c:990:(snd_pcm_dmix_open) The dmix plugin supports only playback stream
ALSA lib pcm_ac108.c:469:(_snd_pcm_ac108_open) a108 is only for capture
connect(2) call to /tmp/jack-1000/default/jack_0 failed (err=No such file or directory)
attempt to connect to server failed
INFO:/home/pi/env/local/lib/python2.7/site-packages/voice_engine-0.0.3-py2.7.egg/voice_engine/source.pyc:0:bcm2835 ALSA: - (hw:0,0) with 0 input channels
INFO:/home/pi/env/local/lib/python2.7/site-packages/voice_engine-0.0.3-py2.7.egg/voice_engine/source.pyc:1:bcm2835 ALSA: IEC958/HDMI (hw:0,1) with 0 input channels
INFO:/home/pi/env/local/lib/python2.7/site-packages/voice_engine-0.0.3-py2.7.egg/voice_engine/source.pyc:2:seeed-4mic-voicecard: - (hw:1,0) with 2 input channels
INFO:/home/pi/env/local/lib/python2.7/site-packages/voice_engine-0.0.3-py2.7.egg/voice_engine/source.pyc:3:sysdefault with 0 input channels
INFO:/home/pi/env/local/lib/python2.7/site-packages/voice_engine-0.0.3-py2.7.egg/voice_engine/source.pyc:4:playback with 0 input channels
INFO:/home/pi/env/local/lib/python2.7/site-packages/voice_engine-0.0.3-py2.7.egg/voice_engine/source.pyc:5:dmixed with 0 input channels
INFO:/home/pi/env/local/lib/python2.7/site-packages/voice_engine-0.0.3-py2.7.egg/voice_engine/source.pyc:6:ac108 with 4 input channels
INFO:/home/pi/env/local/lib/python2.7/site-packages/voice_engine-0.0.3-py2.7.egg/voice_engine/source.pyc:Use ac108
INFO:avs.alexa:Refreshing access_token
DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): api.amazon.com
DEBUG:urllib3.connectionpool:https://api.amazon.com:443 "POST /auth/o2/token HTTP/1.1" 200 977
DEBUG:avs.alexa:{
"product_id": "ReSpeaker",
"access_token": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"refresh_url": "https://api.amazon.com/auth/o2/token",
"expiry": "Thu Dec 07 12:49:45 2017",
"api": "v20160207",
"client_id": "amzn1.application-oa2-client.xxxxxxxxxxxxxxxxxxxxxxxxxx",
"host_url": "avs-alexa-na.amazon.com",
"client_secret": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"refresh_token": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
}
DEBUG:hyper.http20.connection:Selected NPN protocol: h2
DEBUG:hyper.http20.connection:recv for stream 0 with set([]) already present
INFO:hyper.http20.connection:Received unhandled event <RemoteSettingsChanged changed_settings:{ChangedSetting(setting=SettingCodes.MAX_CONCURRENT_STREAMS, original_value=None, new_value=100), ChangedSetting(setting=SettingCodes.INITIAL_WINDOW_SIZE, original_value=65535, new_value=2147483647), ChangedSetting(setting=SettingCodes._max_header_list_size, original_value=None, new_value=40960)}>
INFO:hyper.http20.connection:Received unhandled event <WindowUpdated stream_id:0, delta:2147418112>
DEBUG:hpack.hpack:HPACK encoding <generator object inner at 0x73e4ac88>
DEBUG:hpack.hpack:Adding (':method', 'GET') to the header table
ALSA lib pcm.c:8306:(snd_pcm_recover) overrun occurred
DEBUG:hpack.hpack:Encoding 2 with 7 bits
DEBUG:hpack.hpack:Adding (':scheme', 'https') to the header table
DEBUG:hpack.hpack:Encoding 7 with 7 bits
DEBUG:hpack.hpack:Adding (':authority', 'avs-alexa-na.amazon.com') to the header table
DEBUG:hpack.hpack:Encoding 1 with 6 bits
DEBUG:hpack.hpack:Encoding 17 with 7 bits
DEBUG:hpack.hpack:Adding (':path', '/v20160207/directives') to the header table
DEBUG:hpack.hpack:Encoding 4 with 6 bits
DEBUG:hpack.hpack:Encoding 15 with 7 bits
DEBUG:hpack.hpack:Adding ('authorization', 'Bearer xxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx') to the header table
DEBUG:hpack.hpack:Encoding 23 with 4 bits
DEBUG:hpack.hpack:Encoding 474 with 7 bits
DEBUG:hpack.hpack:Encoded header block to ��A��t,:
�kT5�H����z�D��� :Ć��I�������Q�[��>��2x�w&Z��RpŲ�d����gl2{�����(���{6���Vtلz����U������ii̋%�I�ʍ���q��{/���إg6�l����~���1�k�����������͎Д�?W������&�ut{�5�
�O��n��o�f�sg)|���g纟ވl�;4���tMژ�F�y��E�s�ڰ����˶O�:ͨ�|���^�mr^"�
Y����lכVP6���ǫ$��-��p�O#~�߽�������[����zeoe����������ѥ�)ܣ�����+����W�o��ڒ���vJ{���}E�??�1X�+vF�<�,�ͺb� �;gf��ӣV����;�;����g��çk �)EӮH�����O>|;��T��E�0mK;,)�{A�U���߿Q�FyÛoK�۵���;��e����P�WNhݮ�f DEBUG:hyper.http20.connection:recv for stream 1 with set([]) already present INFO:hyper.http20.connection:Received unhandled event <SettingsAcknowledged changed_settings:{ChangedSetting(setting=SettingCodes.ENABLE_PUSH, original_value=1, new_value=0)}> INFO:hyper.http20.connection:Received unhandled event <SettingsAcknowledged changed_settings:{}> DEBUG:hyper.http20.connection:recv for stream 1 with set([]) already present DEBUG:hpack.hpack:Decoding �T�*@�����R����BM'���tOK,�fBH�K�DrE�����.1���"��k9#/F%��H�mR�P,��,��$��Q>�,��� A�ǩ=_ DEBUG:hpack.hpack:Decoded 8, consumed 1 bytes DEBUG:hpack.hpack:Decoded (':status', '200'), consumed 1 DEBUG:hpack.hpack:Decoded 20, consumed 1 bytes DEBUG:hpack.hpack:Decoded 1, consumed 1 bytes DEBUG:hpack.hpack:Decoded ('access-control-allow-origin', <memory at 0x73eb4f80>), total consumed 3 bytes, indexed True DEBUG:hpack.hpack:Decoded 12, consumed 1 bytes DEBUG:hpack.hpack:Decoded 44, consumed 1 bytes DEBUG:hpack.hpack:Decoded ('x-amzn-requestid', '06c728fffe3dcd94-00004c6d-0000c350-3d16aba23a82e67b-6d39ad0b-1'), total consumed 59 bytes, indexed True DEBUG:hpack.hpack:Decoded 31, consumed 1 bytes DEBUG:hpack.hpack:Decoded 47, consumed 1 bytes DEBUG:hpack.hpack:Decoded ('content-type', 'multipart/related; boundary=------abcde123; type=application/json'), total consumed 49 bytes, indexed True INFO:hyper.http20.connection:Received unhandled event <PriorityUpdated stream_id:1, weight:16, depends_on:0, exclusive:False> DEBUG:hpack.hpack:HPACK encoding <generator object inner at 0x73e5c210> DEBUG:hpack.hpack:Adding (':method', 'POST') to the header table DEBUG:hpack.hpack:Encoding 3 with 7 bits DEBUG:hpack.hpack:Adding (':scheme', 'https') to the header table DEBUG:hpack.hpack:Encoding 7 with 7 bits DEBUG:hpack.hpack:Adding (':authority', 'avs-alexa-na.amazon.com') to the header table DEBUG:hpack.hpack:Encoding 63 with 7 bits DEBUG:hpack.hpack:Adding (':path', '/v20160207/events') to the header table DEBUG:hpack.hpack:Encoding 4 with 6 bits DEBUG:hpack.hpack:Encoding 12 with 7 bits DEBUG:hpack.hpack:Adding ('content-type', 'multipart/form-data; boundary=seeed-voice-engine') to the header table DEBUG:hpack.hpack:Encoding 31 with 6 bits DEBUG:hpack.hpack:Encoding 34 with 7 bits DEBUG:hpack.hpack:Adding ('authorization', 'Bearer xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx') to the header table DEBUG:hpack.hpack:Encoding 23 with 4 bits DEBUG:hpack.hpack:Encoding 474 with 7 bits DEBUG:hpack.hpack:Encoded header block to ���D�c��� :�{���_����j�bX��R��H�Ԍ�� ��� Rȷs��X�Lj�����Q�[��>��2x�w&Z��RpŲ~�d����gl2{�����(���{6�~��Vtلz����U������ii̋%�I�ʍ���q��{/���إg6�l����~���1�k�����������͎Д�?W������&�ut{�5� �O��n��o�f�sg)|���g纟ވl�;4���tMژ�F�y��E�s�ڰ����˶O�:ͨ�|���^�mr^"���u���������6 Y����lכVP6���ǫ$��-��p�O#~�߽�������[����zeoe�������
���ѥ�)ܣ�����+����W�o��ڒ���vJ{���}E�??�1X�+vF�<�,�ͺb� �;gf��ӣV����;�;����g��çk �)EӮH�����O>|;��T��E�0mK;,)�{A�U���߿Q�FyÛoK�۵���;��e����P�WNhݮ�f
DEBUG:avs.alexa:metadata: {
"event": {
"header": {
"namespace": "System",
"name": "SynchronizeState",
"messageId": "65a2d68cece747bd8b4f0fa40936e073"
},
"payload": {}
},
"context": [
{
"header": {
"namespace": "SpeechSynthesizer",
"name": "SpeechState"
},
"payload": {
"token": "",
"playerActivity": "FINISHED",
"offsetInMilliseconds": 0
}
},
{
"header": {
"namespace": "Speaker",
"name": "VolumeState"
},
"payload": {
"volume": 50,
"muted": false
}
},
{
"header": {
"namespace": "AudioPlayer",
"name": "PlaybackState"
},
"payload": {
"token": "",
"playerActivity": "IDLE",
"offsetInMilliseconds": 0
}
},
{
"header": {
"namespace": "Alerts",
"name": "AlertsState"
},
"payload": {
"allAlerts": [],
"activeAlerts": []
}
}
]
}
INFO:avs.alexa:wait for response
DEBUG:hyper.http20.connection:recv for stream 3 with set([1]) already present
%��3�T���ck.hpack:Decoding ������tOK,�fBH�K�DrE�����.1���"��k9#/F�?_Ħ��j�bX��
&=LtA��� ,��,8�!B&~Бؘ)*G �5��D��p/��}��e���u�b
DEBUG:hpack.hpack:Decoded 8, consumed 1 bytes
DEBUG:hpack.hpack:Decoded (':status', '200'), consumed 1
DEBUG:hpack.hpack:Decoded 64, consumed 1 bytes
DEBUG:hpack.hpack:Decoded ('access-control-allow-origin', <memory at 0x73eb4f80>), consumed 1
DEBUG:hpack.hpack:Decoded 63, consumed 2 bytes
DEBUG:hpack.hpack:Decoded 44, consumed 1 bytes
DEBUG:hpack.hpack:Decoded ('x-amzn-requestid', '06c728fffe3dcd94-00004c6d-0000c350-3d16aba23a82e67b-6d39ad0b-3'), total consumed 47 bytes, indexed True
DEBUG:hpack.hpack:Decoded 31, consumed 1 bytes
DEBUG:hpack.hpack:Decoded 68, consumed 1 bytes
DEBUG:hpack.hpack:Decoded ('content-type', 'multipart/related;boundary=------abcde123;start=metadata.1512627619030;type="application/json"'), total consumed 70 bytes, indexed True
INFO:hyper.http20.connection:Received unhandled event <PriorityUpdated stream_id:3, weight:16, depends_on:0, exclusive:False>
INFO:avs.alexa:status code: 200
INFO:avs.alexa:Found 176 bytes of None application/json, first_payload_block=True
INFO:avs.alexa:Finished downloading JSON
DEBUG:avs.alexa:{u'directive': {u'header': {u'namespace': u'System', u'name': u'SetEndpoint', u'messageId': u'cc59261c-59ef-4629-8650-2816e28a37f7'}, u'payload': {u'endpoint': u'https://avs-alexa-eu.amazon.com'}}}
DEBUG:avs.alexa:{
"header": {
"namespace": "System",
"name": "SetEndpoint",
"messageId": "cc59261c-59ef-4629-8650-2816e28a37f7"
},
"payload": {
"endpoint": "https://avs-alexa-eu.amazon.com"
}
}
DEBUG:avs.alexa:ping at Thu Dec 07 11:53:48 2017
INFO:hyper.http20.connection:Received unhandled event
DEBUG:avs.alexa:ping at Thu Dec 07 11:57:48 2017
DEBUG:avs.alexa:ping at Thu Dec 07 12:01:49 2017
Related to: #7 Alexa radio/music/songs not working
pip install -U avs
)Hi, I was trying to get alexa to sing a birthday song, but after asking it just gets quiet. In the developer console I see the message:
TemplateRuntime is not implemented yet
and I was wondering if that could be the problem to more sound related problems. Are you guys going to implement that? That would solve some errors.
I started the alexa service manually (using alexa start
) and asked her to sing a birthday song for me. This is some of the output I got in my developer console:
INFO:avs.alexa:TemplateRuntime is not implemented yet
INFO:SpeechRecognizer:conversation = 0
INFO:avs.alexa:wait for response
INFO:hyper.http20.connection:Received unhandled event <PriorityUpdated stream_id:7, weight:16, depends_on:0, exclusive:False>
INFO:avs.alexa:status code: 204
Team, I want to use AVS libraries for speech recognition and convert into text. Could you please help which libraries I can use for my own programming.
Describe what you were trying to get done.
Tell us what happened, what went wrong, and what you expected to happen.
I used Speech_recognizer Library but when converting the my voice into text, it is taking long time. When I verified AVS libraries they are much faster.
As stated below instead of speech_recognition I want to use AVS libraries. Some one can provide me small hint or code, I just want convert voice to text using AVS functions.
import speech_recognition as sr
r = sr.Recognizer()
with sr.Microphone() as source:
print("Speak Anything :")
audio = r.listen(source)
text = r.recognize_google(audio)
print("You said : {}".format(text))
#except:
# print("Sorry cound not recognize what you said"
Paste the command(s) you ran and the output.
If there was a crash, please include the traceback here.
new Alexa version,
one day working fine, next suddenly doesnt work
alexa-tap
NFO:avs.alexa:reconnect...
INFO:hyper.http20.connection:Received unhandled event <RemoteSettingsChanged changed_settings:{ChangedSetting(setting=SettingCodes.MAX_CONCURRENT_STREAMS, original_value=None, new_value=100), ChangedSetting(setting=SettingCodes._max_header_list_size, original_value=None, new_value=40960)}>
INFO:hyper.http20.connection:Received unhandled event <SettingsAcknowledged changed_settings:{ChangedSetting(setting=SettingCodes.ENABLE_PUSH, original_value=1, new_value=0)}>
INFO:hyper.http20.connection:Received unhandled event <SettingsAcknowledged changed_settings:{}>
INFO:hyper.http20.connection:Received unhandled event <PriorityUpdated stream_id:1, weight:16, depends_on:0, exclusive:False>
ERROR:avs.alexa:/directive requests returned 403
Traceback (most recent call last):
File "/usr/lib/python2.7/site-packages/avs/alexa.py", line 83, in loop
self._loop()
File "/usr/lib/python2.7/site-packages/avs/alexa.py", line 104, in _loop
raise ValueError("/directive requests returned {}".format(downchannel_response.status))
ValueError: /directive requests returned 403
INFO:avs.alexa:reconnect...
INFO:hyper.http20.connection:Received unhandled event <RemoteSettingsChanged changed_settings:{ChangedSetting(setting=SettingCodes.MAX_CONCURRENT_STREAMS, original_value=None, new_value=100), ChangedSetting(setting=SettingCodes._max_header_list_size, original_value=None, new_value=40960)}>
INFO:hyper.http20.connection:Received unhandled event <SettingsAcknowledged changed_settings:{ChangedSetting(setting=SettingCodes.ENABLE_PUSH, original_value=1, new_value=0)}>
INFO:hyper.http20.connection:Received unhandled event <SettingsAcknowledged changed_settings:{}>
INFO:hyper.http20.connection:Received unhandled event <PriorityUpdated stream_id:1, weight:16, depends_on:0, exclusive:False>
ERROR:avs.alexa:/directive requests returned 403
Traceback (most recent call last):
File "/usr/lib/python2.7/site-packages/avs/alexa.py", line 83, in loop
self._loop()
File "/usr/lib/python2.7/site-packages/avs/alexa.py", line 104, in _loop
raise ValueError("/directive requests returned {}".format(downchannel_response.status))
ValueError: /directive requests returned 403
Hi,
I am planning to send pre-recorded audio files to Alexa in addition to sending stream of audio input through the microphone. It looks like this is not supported at the moment. I would appreciate any hint on that.
I think the file that I need to start modifying is the speech_recognizer.py, is that correct?
I have found this package that claims to send pre-recorded audio files to Alexa:
https://github.com/richtier/alexa-voice-service-client
but I would like to add such functionality to the avs package.
更换为自己的开发者账户报redirect_uri_mismatch错误,请问授权回调页和根域名绑定需要填什么?
Describe what you were trying to get done.
Tell us what happened, what went wrong, and what you expected to happen.
When I try to switch a light on or off, I listen Alexa saying "Esta función solo está disponible en dispositivos con alexa certificados" (in english is like "This function is only available on certified alexa devices".
I expect to alexa turn the light on or off, like a real Amazon Echo.
I say "Alexa, enciende oficina". ("Alexa, turn on office light").
Any help will be apreciated. And sorry for my terrible english.
Hi, I just picked up this project after a while and I am trying to make this script working on boot.
I started with the information from #26 where @xiongyihui said to add it to the autorun.sh
file.
autorun.sh
:echo "executing run_alexa.sh script" > /dev/console
/root/run_alexa.sh &
run_alexa.sh
and added the following lines:#!/bin/sh
cd /root/
echo "run_alexa.sh: changed working dir to:" > /dev/console
pwd > /dev/console
echo "run_alexa.sh: Starting 5 sec sleep process..." > /dev/console
sleep 5
echo "run_alexa.sh: done sleeping, running alexa in screen: sleepyalexa..." > /dev/console
echo "run_alexa.sh: to access this screen, type screen -r" > /dev/console
screen -dm -S sleepyalexa ash -c "alexa"
A new screen is being created at boot with the 'alexa' command and the light ring lights up, but after I say something, the alexa.py
script crashes and it loops on this error:
WARNING:avs.alexa:{"error_description":"The request has an invalid grant parameter : refresh_token","error":"invalid_grant"}
WARNING:avs.alexa:{"error_description":"The request has an invalid grant parameter : refresh_token","error":"invalid_grant"}
ERROR:avs.alexa:'Response' object has no attribute 'status'
Traceback (most recent call last):
File "/usr/lib/python2.7/site-packages/avs/alexa.py", line 110, in run
self._run()
File "/usr/lib/python2.7/site-packages/avs/alexa.py", line 129, in _run
headers = {'authorization': 'Bearer {}'.format(self.token)}
File "/usr/lib/python2.7/site-packages/avs/alexa.py", line 360, in token
"refresh token request returned {}".format(response.status))
AttributeError: 'Response' object has no attribute 'status'
INFO:avs.alexa:Refreshing access_token
WARNING:avs.alexa:{"error_description":"The request has an invalid grant parameter : refresh_token","error":"invalid_grant"}
INFO:requests.packages.urllib3.connectionpool:Resetting dropped connection: api.amazon.com
WARNING:avs.alexa:{"error_description":"The request has an invalid grant parameter : refresh_token","error":"invalid_grant"}
WARNING:avs.alexa:{"error_description":"The request has an invalid grant parameter : refresh_token","error":"invalid_grant"}
ERROR:avs.alexa:'Response' object has no attribute 'status'
Traceback (most recent call last):
File "/usr/lib/python2.7/site-packages/avs/alexa.py", line 110, in run
self._run()
File "/usr/lib/python2.7/site-packages/avs/alexa.py", line 129, in _run
headers = {'authorization': 'Bearer {}'.format(self.token)}
File "/usr/lib/python2.7/site-packages/avs/alexa.py", line 360, in token
"refresh token request returned {}".format(response.status))
AttributeError: 'Response' object has no attribute 'status'
INFO:avs.alexa:Refreshing access_token
WARNING:avs.alexa:{"error_description":"The request has an invalid grant parameter : refresh_token","error":"invalid_grant"}
INFO:requests.packages.urllib3.connectionpool:Resetting dropped connection: api.amazon.com
WARNING:avs.alexa:{"error_description":"The request has an invalid grant parameter : refresh_token","error":"invalid_grant"}
WARNING:avs.alexa:{"error_description":"The request has an invalid grant parameter : refresh_token","error":"invalid_grant"}
ERROR:avs.alexa:'Response' object has no attribute 'status'
Traceback (most recent call last):
File "/usr/lib/python2.7/site-packages/avs/alexa.py", line 110, in run
self._run()
File "/usr/lib/python2.7/site-packages/avs/alexa.py", line 129, in _run
headers = {'authorization': 'Bearer {}'.format(self.token)}
File "/usr/lib/python2.7/site-packages/avs/alexa.py", line 360, in token
"refresh token request returned {}".format(response.status))
AttributeError: 'Response' object has no attribute 'status'
Some notes:
screen ash -c "alexa"
) and deattach from it. Alexa keeps working and I can reattach to it whenever I want.screen -dm -S sleepyalexa ash -c "alexa"
) and Alexa keeps working in the background.I just can't get it to start at boot without the error above. Does someone know how to fix it?
root@ReSpeaker2:/usr/bin# pip install pyaudio respeaker --upgrade
Downloading/unpacking pyaudio from https://pypi.python.org/packages/ab/42/b4f04721c5c5bfc196ce156b3c768998ef8c0ae3654ed29ea5020c749a6b/PyAudio-0.2.11.tar.gz#md5=7e4c88139284033f67b4336c74eda3b8
Downloading PyAudio-0.2.11.tar.gz
Running setup.py (path:/tmp/pip_build_root/pyaudio/setup.py) egg_info for package pyaudio
Downloading/unpacking respeaker from https://pypi.python.org/packages/d1/9f/0ee68e8ab387f6a577e261359109b7943096c3c15bc34d0bd9f1900578fe/respeaker-0.5.0-py2.py3-none-any.whl#md5=b99c8716444e07221188aa1f96cbb826
Downloading respeaker-0.5.0-py2.py3-none-any.whl (491kB): 491kB downloaded
Installing collected packages: pyaudio, respeaker
Found existing installation: pyaudio 0.2.9
Can't uninstall 'pyaudio'. No files were found to uninstall.
Running setup.py install for pyaudio
warning: build_py: byte-compiling is disabled, skipping.
building '_portaudio' extension
mipsel-openwrt-linux-uclibc-gcc -fno-strict-aliasing -Os -pipe -mno-branch-likely -mips32r2 -mtune=24kec -mdsp -fno-caller-saves -fhonour-copts -Wno-error=unused-but-set-variable -Wno-error=unused-result -msoft-float -DNDEBUG -fno-inline -DNDEBUG -Os -pipe -mno-branch-likely -mips32r2 -mtune=24kec -mdsp -fno-caller-saves -fhonour-copts -Wno-error=unused-but-set-variable -Wno-error=unused-result -msoft-float -fPIC -I/usr/include/python2.7 -c src/_portaudiomodule.c -o build/temp.linux-mips-2.7/src/_portaudiomodule.o
unable to execute 'mipsel-openwrt-linux-uclibc-gcc': No such file or directory
error: command 'mipsel-openwrt-linux-uclibc-gcc' failed with exit status 1
Complete output from command /usr/bin/python2.7 -c "import setuptools, tokenize;__file__='/tmp/pip_build_root/pyaudio/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-EtrAum-record/install-record.txt --single-version-externally-managed --compile:
running install
running build
running build_py
creating build
creating build/lib.linux-mips-2.7
copying src/pyaudio.py -> build/lib.linux-mips-2.7
warning: build_py: byte-compiling is disabled, skipping.
running build_ext
building '_portaudio' extension
creating build/temp.linux-mips-2.7
creating build/temp.linux-mips-2.7/src
mipsel-openwrt-linux-uclibc-gcc -fno-strict-aliasing -Os -pipe -mno-branch-likely -mips32r2 -mtune=24kec -mdsp -fno-caller-saves -fhonour-copts -Wno-error=unused-but-set-variable -Wno-error=unused-result -msoft-float -DNDEBUG -fno-inline -DNDEBUG -Os -pipe -mno-branch-likely -mips32r2 -mtune=24kec -mdsp -fno-caller-saves -fhonour-copts -Wno-error=unused-but-set-variable -Wno-error=unused-result -msoft-float -fPIC -I/usr/include/python2.7 -c src/_portaudiomodule.c -o build/temp.linux-mips-2.7/src/_portaudiomodule.o
unable to execute 'mipsel-openwrt-linux-uclibc-gcc': No such file or directory
error: command 'mipsel-openwrt-linux-uclibc-gcc' failed with exit status 1
Can't roll back pyaudio; was not uninstalled
Cleaning up...
Command /usr/bin/python2.7 -c "import setuptools, tokenize;file='/tmp/pip_build_root/pyaudio/setup.py';exec(compile(getattr(tokenize, 'open', open)(file).read().replace('\r\n', '\n'), file, 'exec'))" install --record /tmp/pip-EtrAum-record/install-record.txt --single-version-externally-managed --compile failed with error code 1 in /tmp/pip_build_root/pyaudio
Storing debug log for failure in /root/.pip/pip.log
I registered Respeaker with my account using alexa-auth -c config.json. alexa-tap works fine for general commands like "tell me a joke" BUT I cannot access e.g. Skills activated on my account. I also cannot activate Skills by voice. When I activate a Skill by voice I can use it but it is not shown as activated on the Alexa companion app. I also cannot access development Skills only my account has access to (cf. #37 ). In addition no cards are shown on the Activity list of the app when I use Skills and no Audio files are added to the History list in the app.
In addition the Device is listed as offline even when online (again cf. #37 ).
It seems like Respeaker is not properly bound to my account.
在Dueros控制面板没找到product_id和dueros-device-id
How to send voice to my Alexa Echo device remotely ? For example, I want to record voice in office and send to Alexa Echo device in home. Is there any way?
When I am using respeaker/AVS do I need to install AVS SDK.
Describe what you were trying to get done.
Tell us what happened, what went wrong, and what you expected to happen.
To run complete alexa, I am using AVS SDK and Python
Paste the command(s) you ran and the output.
If there was a crash, please include the traceback here.
As the v1 API will be removed from Amazon Servers on April 30th, are you planning to update to http/2? And, consequently, the new endpoints given by Amazon here: https://developer.amazon.com/de/docs/alexa-voice-service/api-overview.html
Also, as interaction seems more complex in the new version regarding protocol/format, will you implement those changes as well?
I would like to print text when I says Alexa, OR text to print after I said Alexa.
Existing print commands is not showing the .format(text)
re-registered service with auth, alexa-tap working but hands free doesnt
root@(none):/usr/lib/python2.7/site-packages/avs# alexa
INFO:mic:Use ReSpeaker Microphone Array: USB Audio (hw:1,0)
INFO:mic:Start detecting
INFO:mic:Detected alexa
INFO:mic:Detected alexa
INFO:mic:Detected alexa
but no sound coming
I followed the README instructions, but alexa-auth command line is not working as expected
alexa-auth
I obtained the following issues :
Traceback (most recent call last):
File "/home/lilitsve/.local/bin/alexa-auth", line 7, in <module>
from avs.auth import main
File "/home/lilitsve/.local/lib/python2.7/site-packages/avs/auth.py", line 9, in <module>
import tornado.httpserver
File "/home/lilitsve/.local/lib/python2.7/site-packages/tornado/httpserver.py", line 144
def __init__(self, *args: Any, **kwargs: Any) -> None:
^
SyntaxError: invalid syntax
Please, can you help me, I'm struggling with this issue?
Python Alexa Voice Service version:
alexa_2017-01-18_ramips_24kec.ipk
Python version:
Python 2.7.9
Operating System:
Using android phone, installed alexa on Respeaker Core
After installing and configuring Amazon Alexa on the Respeaker Core I was unable to listen (for example) to a tunein radio station or commands like 'sing happy birthday, sing a song, etc.' are not working. Every time I ask something, she just thinks and doesn't respond. I really want to add the functions of music and songs, because this will make a better Alexa experience.
I (kind of) successfully installed alexa on the Respeaker core using all the instructions from here (https://github.com/respeaker/Alexa). She is responding on almost all my questions, but not playing music.
I need to say that almost everytime is start up alexa from the online terminal (command: 'alexa') I get an error of no open channels or something, but got that fixed by running the commands in this order:
/etc/init.d/alexa start // wait two seconds
/etc/init.d/alexa stop // wait two seconds
alexa // wait about 20 seconds and then i got output
Sometimes I use the /etc/init.d/mopidy stop if the commands above does not work and after the command I try the commands above again.
Every time I say 'Alexa, sing a bithday song', I get this output:
Jk3Lw~rvQV8ApshSZu0fzlmB-ea-sBqTobFoOdzQ6ZHfceyFTiFZA__&Key-Pair-Id=APKAJMAIYIGWWT37OIHA",
"offsetInMilliseconds": 0,
"expiryTime": "2017-10-29T00:47:58+0000",
"streamId": "amzn1.as-ct.v1.Domain:Phatic:AlexaOriginals#ACRI#url#ACRI#AlexaOriginals|8d67dfad-a6c9-4cf4-a6a9-ac2bb68b50f9|https://dvi
8md6049w6b.cloudfront.net/nina_v1_492be71da6e3d76e9270__en_us_happy_birthday_tts_128kb.mp3?Expires=1509238078&Signature=OAMeCHyl8IkBeEYfDcNMCQKvXHzK2y
qvBW6wjqrY3d879pyAMsh6yeqqj4c-Y6e4rH1xzR~HbfRsZhOEJ5aQixi9dHWd4MfY1nAmpDDW5ZvIjh1Fs3RuXzm60k2HMT8Xlzgrz1VLvQsMj2Hn0KCIbgQdDnNYNiwaRLynvj0dS9imisGwDbNN
oMKsi9JYb2hlv4Ypq7jXLYuRviIx-VdmYx0jSwXYs35P6GL8qh4RiUQ5qdvPomqxFlDyoriujWyMcY8NbQY7QQBK6ac6mfowDN0opQ4ONnOFVJk3Lw~rvQV8ApshSZu0fzlmB-ea-sBqTobFoOdzQ6
ZHfceyFTiFZA__&Key-Pair-Id=APKAJMAIYIGWWT37OIHA|Happy Birthday To You!|1509209278710|ATVPDKIKX0DER|A2HA14VFFC1ULC|en_US|Alexa3P:1.0/2017/10/28/16/5e31
fde911ad444cace637eb16d3e959/47:56::TNIH_2V.456bcac9-1425-4d6e-81ad-bd945057a3a4ZXV/0|5db373ac-d81d-442c-9c2f-cd9b2f38d408|PhaticIntent",
"progressReportRequired": false
}
],
"audioItemId": "amzn1.as-ct.v1.Domain:Phatic:AlexaOriginals#ACRI#url#ACRI#AlexaOriginals|8d67dfad-a6c9-4cf4-a6a9-ac2bb68b50f9|https://dvi8
md6049w6b.cloudfront.net/nina_v1_492be71da6e3d76e9270__en_us_happy_birthday_tts_128kb.mp3?Expires=1509238078&Signature=OAMeCHyl8IkBeEYfDcNMCQKvXHzK2yq
vBW6wjqrY3d879pyAMsh6yeqqj4c-Y6e4rH1xzR~HbfRsZhOEJ5aQixi9dHWd4MfY1nAmpDDW5ZvIjh1Fs3RuXzm60k2HMT8Xlzgrz1VLvQsMj2Hn0KCIbgQdDnNYNiwaRLynvj0dS9imisGwDbNNo
MKsi9JYb2hlv4Ypq7jXLYuRviIx-VdmYx0jSwXYs35P6GL8qh4RiUQ5qdvPomqxFlDyoriujWyMcY8NbQY7QQBK6ac6mfowDN0opQ4ONnOFVJk3Lw~rvQV8ApshSZu0fzlmB-ea-sBqTobFoOdzQ6Z
HfceyFTiFZA__&Key-Pair-Id=APKAJMAIYIGWWT37OIHA|Happy Birthday To You!|1509209278710|ATVPDKIKX0DER|A2HA14VFFC1ULC|en_US|Alexa3P:1.0/2017/10/28/16/5e31f
de911ad444cace637eb16d3e959/47:56::TNIH_2V.456bcac9-1425-4d6e-81ad-bd945057a3a4ZXV/0|5db373ac-d81d-442c-9c2f-cd9b2f38d408|PhaticIntent"
},
"navigationToken": "amzn1.as-ct.v1.Domain:Phatic:AlexaOriginals#ACRI#url#ACRI#AlexaOriginals|8d67dfad-a6c9-4cf4-a6a9-ac2bb68b50f9|https://dv
i8md6049w6b.cloudfront.net/nina_v1_492be71da6e3d76e9270__en_us_happy_birthday_tts_128kb.mp3?Expires=1509238078&Signature=OAMeCHyl8IkBeEYfDcNMCQKvXHzK2
yqvBW6wjqrY3d879pyAMsh6yeqqj4c-Y6e4rH1xzR~HbfRsZhOEJ5aQixi9dHWd4MfY1nAmpDDW5ZvIjh1Fs3RuXzm60k2HMT8Xlzgrz1VLvQsMj2Hn0KCIbgQdDnNYNiwaRLynvj0dS9imisGwDbN
NoMKsi9JYb2hlv4Ypq7jXLYuRviIx-VdmYx0jSwXYs35P6GL8qh4RiUQ5qdvPomqxFlDyoriujWyMcY8NbQY7QQBK6ac6mfowDN0opQ4ONnOFVJk3Lw~rvQV8ApshSZu0fzlmB-ea-sBqTobFoOdzQ
6ZHfceyFTiFZA__&Key-Pair-Id=APKAJMAIYIGWWT37OIHA|Happy Birthday To You!|1509209278710|ATVPDKIKX0DER|A2HA14VFFC1ULC|en_US|Alexa3P:1.0/2017/10/28/16/5e3
1fde911ad444cace637eb16d3e959/47:56::TNIH_2V.456bcac9-1425-4d6e-81ad-bd945057a3a4ZXV/0|5db373ac-d81d-442c-9c2f-cd9b2f38d408|PhaticIntent"
}
}
]
},
"messageHeader": {}
}
DEBUG:/usr/bin/alexa:AudioPlayer audio:https://dvi8md6049w6b.cloudfront.net/nina_v1_492be71da6e3d76e9270__en_us_happy_birthday_tts_128kb.mp3?Expires=1
509238078&Signature=OAMeCHyl8IkBeEYfDcNMCQKvXHzK2yqvBW6wjqrY3d879pyAMsh6yeqqj4c-Y6e4rH1xzR~HbfRsZhOEJ5aQixi9dHWd4MfY1nAmpDDW5ZvIjh1Fs3RuXzm60k2HMT8Xlz
grz1VLvQsMj2Hn0KCIbgQdDnNYNiwaRLynvj0dS9imisGwDbNNoMKsi9JYb2hlv4Ypq7jXLYuRviIx-VdmYx0jSwXYs35P6GL8qh4RiUQ5qdvPomqxFlDyoriujWyMcY8NbQY7QQBK6ac6mfowDN0o
pQ4ONnOFVJk3Lw~rvQV8ApshSZu0fzlmB-ea-sBqTobFoOdzQ6ZHfceyFTiFZA__&Key-Pair-Id=APKAJMAIYIGWWT37OIHA
The strange thing about this is that it includes the path to the audio file (audio:https:://dvi8......), but it just don't plays the sound and when I try: 'Alexa, play BBC Radio 6 Music', I get this output:
"logo": {
"sources": [
{
"url": "https://s3.amazonaws.com/music-provider-logos/TuneIn.svg"
}
]
},
"name": "TuneIn Live Radio"
},
"mediaLengthInMilliseconds": 0
},
"controls": [
{
"type": "BUTTON",
"selected": false,
"enabled": true,
"name": "PLAY_PAUSE"
}
],
"audioItemId": "amzn1.as-ct.v1.Dee-Domain-Music#ACRI#url#ACRI#80ddf91b-7d64-4df5-bf6c-8389dfb6747a:1"
}
}
]
},
"messageHeader": {}
}
DEBUG:/usr/bin/alexa:Play DeviceTTSRendererV4_1779ecf3-f128-4319-852a-f456fc3e1260_1191541581
MPEG Audio Decoder 0.15.2 (beta) - Copyright (C) 2000-2004 Robert Leslie et al.
Playing WAVE 'stdin' : Signed 16 bit Little Endian, Rate 24000 Hz, Mono
104 frames decoded (0:00:02.4), -2.2 dB peak amplitude, 0 clipped samples
DEBUG:/usr/bin/alexa:SpeechSynthesizer audio: DeviceTTSRendererV4_1779ecf3-f128-4319-852a-f456fc3e1260_1191541581
DEBUG:/usr/bin/alexa:AudioPlayer audio:https://opml.radiotime.com/Tune.ashx?serial=AG6ECDT3MHVASCBMGROTP6FQBPYQ&formats=aac,mp3&id=s44491&partnerId=4J
qugguZ
INFO:mic:Start detecting
INFO:mic:Too many delays, 6 in queue
INFO:mic:Too many delays, 5 in queue
She says something like 'playing BBC Radio 6 Music from TuneIn', but then it goes quit and I still don't have any sound.
Does anybody know how to fix this problem? I just really want to get as close as possible to an real Amazon Alexa with the Respeaker.
Hi! I was trying to follow this instruction: https://github.com/SeeedDocument/ReSpeaker-4-Mic-Array-for-Raspberry-Pi/blob/master/ReSpeaker-4-Mic-Array-for-Raspberry-Pi.md
, and build alexa with "snowboy" wake-up word. I finished all the installation. When I say "snowboy", the LEDs on Respeaker are on but Alexa cannot talk back.
I input all the code on the link above and this is what I got if I say "snowboy" to Respeaker.
Thanks!!!
RMS is showing 0 value, but I'm hearing the alarm sound. I don't understand why recording doesn't work as expected.
Running the code in the example
cmd :
alexa-audio-check
result :
RMS: 0
RMS: 0
RMS: 0
RMS: 0
RMS: 0
RMS: 0
I want to set Alexa to start automatically on startup ( using pocketsphinx)
Alexa runs fine if executed manually
Added start command into rc.local but it is not starting
What is the correct way to set it as startup service
mopidy and shairport are stopped and disable, this will only be used as alexa
Tried to do python main.py
python main.py
This part of the code in alexa.py on line 153 is cousing the error:
try:
event, listener, attachment = self.event_queue.get(
timeout=0.25)
except queue.Empty:
event = None
When i print the result of self.event_queue.get it shows below value:
{'header': {'namespace': 'System', 'name': 'SynchronizeState', 'messageId': '65d4301efd584e8ab2737e5986c803b0'}, 'payload': {}}
$ alexa-auth -c config.json
Traceback (most recent call last):
File "/usr/local/bin/alexa-auth", line 11, in
load_entry_point('avs==0.5.4', 'console_scripts', 'alexa-auth')()
File "/usr/local/lib/python2.7/dist-packages/pkg_resources/init.py", line 480, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "/usr/local/lib/python2.7/dist-packages/pkg_resources/init.py", line 2693, in load_entry_point
return ep.load()
File "/usr/local/lib/python2.7/dist-packages/pkg_resources/init.py", line 2324, in load
return self.resolve()
File "/usr/local/lib/python2.7/dist-packages/pkg_resources/init.py", line 2330, in resolve
module = import(self.module_name, fromlist=['name'], level=0)
File "/usr/local/lib/python2.7/dist-packages/avs-0.5.4-py2.7.egg/avs/auth.py", line 9, in
import tornado.httpserver
File "/usr/local/lib/python2.7/dist-packages/tornado-6.0a1-py2.7-linux-x86_64.egg/tornado/httpserver.py", line 144
def init(self, *args: Any, **kwargs: Any) -> None:
^
SyntaxError: invalid syntax
Ran the repo as per README on Ubuntu. Where does the output go to? Cannot hear any output.
I am triying to connect respeaker 2 mic hat with raspbian stretch in a raspberry pi 3 and Alexa. I would like to create a stand alone device. I am in trouble with the output sounds. I am hearing the output over the hdmi interface instead of the respeaker audio jack.
I have installed properly the respeaker 2 mic hat , following this tutorial http://wiki.seeed.cc/Respeaker_2_Mics_Pi_HAT/. I have managed to reproduce sounds and record my own voice properly. I have also reproduce sounds using youtube. I can hear it using a headphones connected to respeaker. The problems appears with Alexa itself.
I run alexa-audio-check and the sounds outs throw the hdmi interface instead of the built-in jack output. I would like that the sound outs throw the jack board.
¿Could you help me with it? I have followed some tutorials but I can't make it work.
Thanks for your support.
Paste the command(s) you ran and the output.
If there was a crash, please include the traceback here.
Describe what you were trying to get done.
iat last,when a run "alexa", it told me that :
(py3) zz@zz:~/py3/avs$ alexa
Traceback (most recent call last):
File "/usr/local/bin/alexa", line 11, in
load_entry_point('avs==0.5.4', 'console_scripts', 'alexa')()
File "/usr/lib/python3/dist-packages/pkg_resources/init.py", line 480, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "/usr/lib/python3/dist-packages/pkg_resources/init.py", line 2693, in load_entry_point
return ep.load()
File "/usr/lib/python3/dist-packages/pkg_resources/init.py", line 2324, in load
return self.resolve()
File "/usr/lib/python3/dist-packages/pkg_resources/init.py", line 2330, in resolve
module = import(self.module_name, fromlist=['name'], level=0)
File "/usr/local/lib/python3.6/dist-packages/avs-0.5.4-py3.6.egg/avs/main.py", line 22, in
from respeaker.pixel_ring import pixel_ring
File "/usr/local/lib/python3.6/dist-packages/respeaker/init.py", line 18, in
from respeaker.microphone import Microphone
File "/usr/local/lib/python3.6/dist-packages/respeaker/microphone.py", line 33, in
import pyaudio
ModuleNotFoundError: No module named 'pyaudio
Paste the command(s) you ran and the output.
If there was a crash, please include the traceback here.
请问为什么接入dueros设置语音输出不生效,系统画像也不生效
我使用树莓派4麦克风阵列那块板子,我一开始以为录制完语音就融合为一个通道,但是录制的时候看到wiki上面说是录制的是4通道,但是各大语音平台都是要求上传的语音都是单通道的,比如百度,讯飞都是单通道16000采样率,请教如何把4通道转出单通道,目前我直接使用4通道声音上传语音平台,报错,识别不出,我强制用arecord录制单通道依旧不行。
Hi, I tryed your project and the alexa part works well , and i change it to dueros, and successfully get the .avs.json of dueros, alexa-auth runs successfully. but when i run the alexa-tap, some thing went wrong .
the errors are like:
DEBUG:hyper.http20.connection:recv for stream 1 with set([]) already present
ERROR:avs.alexa:
Traceback (most recent call last):
File "/usr/lib/python2.7/site-packages/avs-0.0.4-py2.7.egg/avs/alexa.py", line 83, in loop
self._loop()
File "/usr/lib/python2.7/site-packages/avs-0.0.4-py2.7.egg/avs/alexa.py", line 102, in _loop
downchannel_response = conn.get_response(downchannel_id)
File "/usr/lib/python2.7/site-packages/hyper/http20/connection.py", line 312, in get_response
return HTTP20Response(stream.getheaders(), stream)
File "/usr/lib/python2.7/site-packages/hyper/http20/stream.py", line 230, in getheaders
self._recv_cb(stream_id=self.stream_id)
File "/usr/lib/python2.7/site-packages/hyper/http20/connection.py", line 771, in _recv_cb
self._single_read()
File "/usr/lib/python2.7/site-packages/hyper/http20/connection.py", line 665, in _single_read
self._sock.fill()
File "/usr/lib/python2.7/site-packages/hyper/common/bufsocket.py", line 169, in fill
raise ConnectionResetError()
ConnectionResetError
INFO:avs.alexa:reconnect...
DEBUG:hyper.http20.connection:Selected NPN protocol: h2
DEBUG:hyper.http20.connection:recv for stream 0 with set([]) already present
DEBUG:hpack.hpack:HPACK encoding <generator object inner at 0x1444be0>
DEBUG:hpack.hpack:Adding (':method', 'GET') to the header table
DEBUG:hpack.hpack:Encoding 2 with 7 bits
DEBUG:hpack.hpack:Adding (':scheme', 'https') to the header table
DEBUG:hpack.hpack:Encoding 7 with 7 bits
DEBUG:hpack.hpack:Adding (':authority', 'dueros-h2.baidu.com') to the header table
DEBUG:hpack.hpack:Encoding 1 with 6 bits
DEBUG:hpack.hpack:Encoding 14 with 7 bits
DEBUG:hpack.hpack:Adding (':path', '/dcs/avs-compatible-v20160207/directives') to the header table
DEBUG:hpack.hpack:Encoding 4 with 6 bits
DEBUG:hpack.hpack:Encoding 28 with 7 bits
DEBUG:hpack.hpack:Adding ('dueros-device-id', '9913590') to the header table
DEBUG:hpack.hpack:Encoding 12 with 7 bits
DEBUG:hpack.hpack:Encoding 5 with 7 bits
DEBUG:hpack.hpack:Adding ('authorization', 'Bearer 21.d6ddc4ba0a04ec75807b1d7670f6adcc.2592000.1503209501.1044836695-9913590') to the header table
DEBUG:hpack.hpack:Encoding 23 with 4 bits
DEBUG:hpack.hpack:Encoding 56 with 7 bits
DEBUG:hpack.hpack:Encoded header block t
as baidu says dueros is compatible with avs, and i'm confused about the result.
maybe the only reason is that dueros does not support NPN, only support ALPN
seeking for help, thanks.
here are my .avs.json
{
"product_id": "9913590",
"access_token": "21.d6ddc4ba0a04ec75807b1d7670f6adcc.2592000.1503209501.1044836695-9913590",
"expiry": "Sun Aug 20 06:11:41 2017",
"client_id": "YqjHUWjMyDq5gXlpFmxI6TfOwZLUS2qs",
"host_url": "dueros-h2.baidu.com",
"client_secret": "3SQku25Gtp0ROv2Nuz1NU9kGChgWNHjc",
"refresh_token": "22.5dd801f948ef763dc6855e76c6147fbd.315360000.1815977501.1044836695-9913590",
"dueros-device-id": "9913590"
}
Trying to use respeaker-avs on openwrt .. Unable to install pygobject for openwrt, To use import gi..
trying to get pocketsphinx to work on a rpi 4. using alexa-tap its working fine but after installing pocketsphinx and typing alexa speaking into the mic does nothing.
Paste the command(s) you ran and the output.
If there was a crash, please include the traceback here.
I do know about pocket sphinx, dictionary and the keyword file.
Installed with pip, and everything including alexa-tap
is working. But, running alexa
will not make the respeaker device start listening as a ENTER key press would with alexa-tap
.
What am I doing wrong?
Also, how would I change the wake word to something different, if I already put the appropriate entries into dictionary.txt
and keywords.txt
and the word is "jane" instead of "alexa"?
Thanks.
Hi :
root@ReSpeaker:/# pip install avs
Requirement already satisfied (use --upgrade to upgrade): avs in /usr/lib/python2.7/site-packages
Downloading/unpacking hyper (from avs)
Downloading hyper-0.7.0-py2.py3-none-any.whl (269kB): 269kB downloaded
Requirement already satisfied (use --upgrade to upgrade): tornado in /usr/lib/python2.7/site-packages (from avs)
Requirement already satisfied (use --upgrade to upgrade): requests in /usr/lib/python2.7/site-packages (from avs)
Downloading/unpacking service-identity>=14.0.0 (from hyper->avs)
Downloading service_identity-17.0.0-py2.py3-none-any.whl
Downloading/unpacking h2>=2.4,<3.0 (from hyper->avs)
Downloading h2-2.6.2-py2.py3-none-any.whl (71kB): 71kB downloaded
Downloading/unpacking pyOpenSSL>=0.15 (from hyper->avs)
Downloading pyOpenSSL-17.1.0-py2.py3-none-any.whl (53kB): 53kB downloaded
Downloading/unpacking hyperframe>=3.2,<4.0 (from hyper->avs)
Downloading hyperframe-3.2.0-py2.py3-none-any.whl
Requirement already satisfied (use --upgrade to upgrade): singledispatch in /usr/lib/python2.7/site-packages (from tornado->avs)
Requirement already satisfied (use --upgrade to upgrade): certifi in /usr/lib/python2.7/site-packages (from tornado->avs)
Requirement already satisfied (use --upgrade to upgrade): backports-abc>=0.4 in /usr/lib/python2.7/site-packages (from tornado->avs)
Downloading/unpacking pyasn1 (from service-identity>=14.0.0->hyper->avs)
Downloading pyasn1-0.2.3-py2.py3-none-any.whl (53kB): 53kB downloaded
Downloading/unpacking pyasn1-modules (from service-identity>=14.0.0->hyper->avs)
Downloading pyasn1_modules-0.0.9-py2.py3-none-any.whl (60kB): 60kB downloaded
Downloading/unpacking attrs (from service-identity>=14.0.0->hyper->avs)
Downloading attrs-17.2.0-py2.py3-none-any.whl
Downloading/unpacking hpack>=2.2,<4 (from h2>=2.4,<3.0->hyper->avs)
Downloading hpack-3.0.0-py2.py3-none-any.whl
Downloading/unpacking enum34>=1.0.4,<2 (from h2>=2.4,<3.0->hyper->avs)
Downloading enum34-1.1.6-py2-none-any.whl
Requirement already satisfied (use --upgrade to upgrade): six>=1.5.2 in /usr/lib/python2.7/site-packages (from pyOpenSSL>=0.15->hyper->avs)
Downloading/unpacking cryptography>=1.9 (from pyOpenSSL>=0.15->hyper->avs)
Downloading cryptography-2.0.tar.gz (432kB): 432kB downloaded
Running setup.py (path:/tmp/pip_build_root/cryptography/setup.py) egg_info for package cryptography
no previously-included directories found matching 'docs/_build'
warning: no previously-included files matching '*' found under directory 'vectors'
Downloading/unpacking idna>=2.1 (from cryptography>=1.9->pyOpenSSL>=0.15->hyper->avs)
Downloading idna-2.5-py2.py3-none-any.whl (55kB): 55kB downloaded
Downloading/unpacking asn1crypto>=0.21.0 (from cryptography>=1.9->pyOpenSSL>=0.15->hyper->avs)
Downloading asn1crypto-0.22.0-py2.py3-none-any.whl (97kB): 97kB downloaded
Downloading/unpacking ipaddress (from cryptography>=1.9->pyOpenSSL>=0.15->hyper->avs)
Downloading ipaddress-1.0.18-py2-none-any.whl
Downloading/unpacking cffi>=1.7 (from cryptography>=1.9->pyOpenSSL>=0.15->hyper->avs)
Downloading cffi-1.10.0.tar.gz (418kB): 418kB downloaded
Running setup.py (path:/tmp/pip_build_root/cffi/setup.py) egg_info for package cffi
unable to execute 'mipsel-openwrt-linux-uclibc-gcc': No such file or directory
unable to execute 'mipsel-openwrt-linux-uclibc-gcc': No such file or directory
No working compiler found, or bogus compiler options
passed to the compiler from Python's distutils module.
See the error messages above.
(If they are about -mno-fused-madd and you are on OS/X 10.8,
see http://stackoverflow.com/questions/22313407/ .)
Complete output from command python setup.py egg_info:
unable to execute 'mipsel-openwrt-linux-uclibc-gcc': No such file or directory
unable to execute 'mipsel-openwrt-linux-uclibc-gcc': No such file or directory
No working compiler found, or bogus compiler options
passed to the compiler from Python's distutils module.
See the error messages above.
(If they are about -mno-fused-madd and you are on OS/X 10.8,
see http://stackoverflow.com/questions/22313407/ .)
Cleaning up...
Command python setup.py egg_info failed with error code 1 in /tmp/pip_build_root/cffi
Storing debug log for failure in /root/.pip/pip.log
why?
Hi
After the issue with kernel version was fixed, i can now check my array kit. However, when i try to load AVS, i get the following issue:
env) pi@raspberrypi:~ $ alexa-auth
Traceback (most recent call last):
File "/home/pi/env/bin/alexa-auth", line 11, in
load_entry_point('avs==0.5.4', 'console_scripts', 'alexa-auth')()
File "/home/pi/env/local/lib/python2.7/site-packages/pkg_resources/init.py", line 561, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "/home/pi/env/local/lib/python2.7/site-packages/pkg_resources/init.py", line 2631, in load_entry_point
return ep.load()
File "/home/pi/env/local/lib/python2.7/site-packages/pkg_resources/init.py", line 2291, in load
return self.resolve()
File "/home/pi/env/local/lib/python2.7/site-packages/pkg_resources/init.py", line 2297, in resolve
module = import(self.module_name, fromlist=['name'], level=0)
File "/home/pi/env/local/lib/python2.7/site-packages/avs-0.5.4-py2.7.egg/avs/auth.py", line 9, in
import tornado.httpserver
File "/home/pi/env/local/lib/python2.7/site-packages/tornado-6.0.2-py2.7-linux-armv7l.egg/tornado/httpserver.py", line 144
def init(self, *args: Any, **kwargs: Any) -> None:
^
SyntaxError: invalid syntax
i saw a previous posting and the recommendation of uninstalling tornado and reinstalling, however the same issue persists
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.