Code Monkey home page Code Monkey logo

alexa's People

Contributors

crazyquark avatar jerryyip avatar xiongyihui avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

alexa's Issues

Unable to get Status Code 204

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

How to get apt-get on respeaker?

Hi,
It looks like that repeaker is using the lightweight version of package management, opkg, versus the apt-get. However, under the instruction for ubuntu installation of the respeaker/Alexa package, some dependencies are installed using apt-get. I was wondering whether there is any instructions on installing apt-get on respeaker first to be able to install the other dependencies.
Thanks a lot in advance.

Invalid syntax issue

Hi,

I've successfully sign-in the Amazon account and try to run python alexa.py on respeaker.
But, it shows: SyntaxError: invalid syntax
root@ReSpeaker:/tmp/run/mountd/mmcblk0p1/Alexa# python alexa.py
Traceback (most recent call last):
File "alexa.py", line 9, in
from creds import Client_ID, Client_Secret, refresh_token
File "/tmp/run/mountd/mmcblk0p1/Alexa/creds.py", line 10
refresh_token = "Atzr|IwEBIJuHUu6whNT40XRWUDtooh1_TvqNq2

What can I do to run Alexa service correctly?

Issue when to authorize the application

Thanks for your reply! Then when I want to authorize the application according to the following steps:

  1. Run alexa or /etc/init.d/alexa start to start Alexa Voice Service
  2. At the first time, you need to authorize the application. Connect ReSpeaker's Access Point, go to http://192.168.100.1:3000 and tt will redirect you to Amazon to sign up or login in.

Alexa prompts:
Traceback (most recent call last):
File "/usr/bin/alexa", line 369, in
main()
File "/usr/bin/alexa", line 341, in main
mic = Microphone(quit_event=quit_event)
File "/usr/lib/python2.7/site-packages/respeaker/microphone.py", line 67, in init
pixel_ring.set_color(rgb=0x400000)
File "/usr/lib/python2.7/site-packages/respeaker/pixel_ring.py", line 19, in set_color
self.write(0, [self.mono_mode, rgb & 0xFF, (rgb >> 8) & 0xFF, (rgb >> 16) & 0xFF])
File "/usr/lib/python2.7/site-packages/respeaker/pixel_ring.py", line 58, in write
self.hid.write(packet)
File "/usr/lib/python2.7/site-packages/respeaker/usb_hid/pyusb_backend.py", line 162, in write
self.dev.ctrl_transfer(bmRequestType, bmRequest, wValue, wIndex, data)
File "/usr/lib/python2.7/site-packages/usb/core.py", line 1034, in ctrl_transfer
self._ctx.managed_claim_interface(self, interface_number)
File "/usr/lib/python2.7/site-packages/usb/core.py", line 102, in wrapper
return f(self, *args, **kwargs)
File "/usr/lib/python2.7/site-packages/usb/core.py", line 167, in managed_claim_interface
self.backend.claim_interface(self.handle, i)
File "/usr/lib/python2.7/site-packages/usb/backend/libusb1.py", line 818, in claim_interface
_check(self.lib.libusb_claim_interface(dev_handle.handle, intf))
File "/usr/lib/python2.7/site-packages/usb/backend/libusb1.py", line 602, in _check
raise USBError(_strerror(ret), ret, _libusb_errno[ret])
usb.core.USBError: [Errno 16] Resource busy
Exception in thread Thread-1:
Traceback (most recent call last):
File "/usr/lib/python2.7/threading.py", line 810, in __bootstrap_inner
self.run()
File "/usr/lib/python2.7/threading.py", line 763, in run
self.__target(*self.__args, **self.__kwargs)
File "/usr/lib/python2.7/site-packages/respeaker/usb_hid/pyusb_backend.py", line 64, in rx_task
self.rcv_data.append(self.ep_in.read(self.ep_in.wMaxPacketSize, -1))
File "/usr/lib/python2.7/site-packages/usb/core.py", line 402, in read
return self.device.read(self, size_or_buffer, timeout)
File "/usr/lib/python2.7/site-packages/usb/core.py", line 975, in read
intf, ep = self._ctx.setup_request(self, endpoint)
File "/usr/lib/python2.7/site-packages/usb/core.py", line 102, in wrapper
return f(self, *args, **kwargs)
File "/usr/lib/python2.7/site-packages/usb/core.py", line 216, in setup_request
self.managed_claim_interface(device, intf)
File "/usr/lib/python2.7/site-packages/usb/core.py", line 102, in wrapper
return f(self, *args, **kwargs)
File "/usr/lib/python2.7/site-packages/usb/core.py", line 167, in managed_claim_interface
self.backend.claim_interface(self.handle, i)
File "/usr/lib/python2.7/site-packages/usb/backend/libusb1.py", line 818, in claim_interface
_check(self.lib.libusb_claim_interface(dev_handle.handle, intf))
File "/usr/lib/python2.7/site-packages/usb/backend/libusb1.py", line 602, in _check
raise USBError(_strerror(ret), ret, _libusb_errno[ret])
USBError: [Errno 16] Resource busy

LEDs

When saying Alexa, the bottom LEDs will light up and really hard to see when you have the microphone array and case. Need to use the top LEDs to be able to see Alexa has heard you from when far away.

SSL is required on Auth

I'm getting a 400 error when trying to run auth_web.py it seems SSL/HTTPS is required to auth an app.

screen shot 2017-01-29 at 10 26 37 pm

screen shot 2017-01-29 at 10 27 23 pm

Connecting to Custom Skills on Aexa Skills Kit. (AVS envoking ASK)

Hi,
After getting this package to work, I can only access the default functionalities of Alexa. Even though I have multiple custom skills under my amazon account, but when asked using the invocation names of those skills, the response from Alexa on respeaker is that it does not have those skills under its skill sets. I also have linked my calender to my amazon account, but I cannot access that through respeaker either. It is important to mention that I have access to both my calender and all of my skills when I use the Amazon echo dot. An observation is that while I am using the respeaker with basic Alexa functionalities, it appers offline on the Amazon app.
BTW, I have also tried the respeaker/avs package, and that one does not access my skills either.
Am I missing something in the process?

Alexa radio/music/songs not working

  • 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

Description

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.

What I Did

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.

What doesn't work

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.

So my question is:

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.

Audio Performance

I notice there is a lot of clicking when the audio initially outputs, which causes the first 1-2 words to become incoherent. Is there a way to increase audio performance?

Errno -9998

Brand new ReSpeaker, trying to run Alexa on it and getting the following error:

root@ReSpeaker:/tmp# alexa
INFO:root:
INFO:root:Go to http://192.168.100.1:3000 to sign up or login Alexa Voice Service
Expression 'parameters->channelCount <= maxChans' failed in 'src/hostapi/alsa/pa_linux_alsa.c', l
Expression 'ValidateParameters( inputParameters, hostApi, StreamDirection_In )' failed in 'src/ho
Traceback (most recent call last):
  File "/usr/bin/alexa", line 288, in <module>
    main()
  File "/usr/bin/alexa", line 262, in main
    mic = Microphone(quit_event=quit_event)
  File "/usr/lib/python2.7/site-packages/respeaker/microphone.py", line 89, in __init__
    input_device_index=self.device_index,
  File "/usr/lib/python2.7/site-packages/pyaudio.py", line 750, in open
    stream = Stream(self, *args, **kwargs)
  File "/usr/lib/python2.7/site-packages/pyaudio.py", line 441, in __init__
    self._stream = pa.open(**arguments)
IOError: [Errno -9998] Invalid number of channels

the current documentation is confusing

current documentation doesnt seem related to the respeaker set up
if you do download the ipk and run it, it already has its own client and security id in the executable
how would you pass it the correct information, and where the creds file (alexa.json) should be located and what would be the correct syntax .

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.