Closed ThePinkPanda closed 6 years ago
have you tried the code in this repo https://github.com/respeaker/avs ?
Actually no, because I find the installation instructions unclear. I only see a 'requirements' and a 'get started' section, but I don't know how to install or upload the files to the respeaker (no 'On ReSpeaker' & 'On Ubuntu' section) . Do I need to follow the same instructions as with the older version or other instructions?
Most of the requirements are installed by default on ReSpeaker. Install the new version avs on respeaker by typeing:
pip install avs
Thanks for your help so far, it worked, but I got stuck on alexa
with an error code 204.
First of all, I did a reset on the respeaker (firstboot
) and followed the tutorial 'Use SD card to Extend Storage' (here) from the 'Get Started' page to extend the storage because last time I got some errors.
Then I installed avs with the pip install avs
command without errors and configured my accound with alexa-auth
just as mentioned on the 'Get Started' page, but every time I do alexa
or alexa-tap
I get the following error:
root@ReSpeaker:~# alexa-tap
press ENTER to talk
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_STRE
AMS, original_value=None, new_value=100), ChangedSetting(setting=SettingCodes._max_header_list_size, original_value=None, new_value=40960)}>
DEBUG:hpack.hpack:HPACK encoding <generator object inner at 0xb73ca0>
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', '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 459 with 7 bits
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, origina
l_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: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 0xb746a0>), 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', '0ede90fffeb4973a-000067e9-0008b616-9e731b5e17334b3a-ffd14392-1'), total consumed 59 bytes, indexed Tru
e
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 0xb7ce90>
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 Atza|IwEBINBfu3Y9bkq5EkmIHaLwT9Tdtsq2UVTcd3iuQPjBHtNkgOpudfUt72RsyikE3BBJc_k7f8Sqs4J1MR1G2g75ulFvxk
hy7GXSbNefTybh9ZbPqr1CZ7Vy_73tgbYnpf5H7vJQ86K7bYfrbQd0S5vdKI7UcrGP0wGRkOhB4uUT_ELGpvfBvE9NVbhBin53oZlTBVKW_pCQMF8B4fnQw5JF4OQ14tEf8y5MLcs85iZaebnpLUlL
Onu74IfvJo00en40pMwDE_w0kbJx4JgvGrqm0sQVVewKlvCDetSkMFivaC8SdRF1XzT3DFOdCjYLIFSIgEeHrQm5ZDkOxo3H1eRzm-An7-L3emgDV7I02G9Iu_DgTaEilaSsqMcKYpJEqfr0_-cmku
Hbf8iV3Ap9y5Vx3CIfcQCDhDze6-OIvqPO90m8BBlOwery8EN3wfbP04BJZMHz2rsEXurR_xCdum__EbRlqreQFj_fZmS6cIqfhzj1BQKsRW77aTacIuSGViL-38BsMUGgFtM_N6SDwqJSXpuDdOdQ
OxxCKV4YWS7mzefPng') to the header table
DEBUG:hpack.hpack:Encoding 23 with 4 bits
DEBUG:hpack.hpack:Encoding 459 with 7 bits
DEBUG:avs.alexa:metadata: {
"event": {
"header": {
"namespace": "System",
"name": "SynchronizeState",
"messageId": "bf51ddad60b842aeadaf3448af40c8bf"
},
"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
DEBUG:hpack.hpack:Decoded 9, consumed 1 bytes
DEBUG:hpack.hpack:Decoded (':status', '204'), consumed 1
DEBUG:hpack.hpack:Decoded 64, consumed 1 bytes
DEBUG:hpack.hpack:Decoded ('access-control-allow-origin', <memory at 0xb746a0>), 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', '0ede90fffeb4973a-000067e9-0008b616-9e731b5e17334b3a-ffd14392-3'), total consumed 47 bytes, indexed Tru
e
INFO:hyper.http20.connection:Received unhandled event <PriorityUpdated stream_id:3, weight:16, depends_on:0, exclusive:False>
INFO:avs.alexa:status code: 204
DEBUG:avs.alexa:ping at Sun Nov 26 14:27:45 2017
INFO:hyper.http20.connection:Received unhandled event <PingAcknowledged ping_data:3761643434356466>
I don't know how to fix this, and when I do Ctrl+C to exit I get this:
^CException in thread Thread-1 (most likely raised during interpreter shutdown):
Traceback (most recent call last):
File "/usr/lib/python2.7/threading.py", line 810, in __bootstrap_inner
File "/usr/lib/python2.7/threading.py", line 763, in run
File "/usr/lib/python2.7/site-packages/avs/alexa.py", line 116, in run
<type 'exceptions.AttributeError'>: 'NoneType' object has no attribute 'http20'
root@ReSpeaker:~#
Does somebody know how to fix this? Thanks.
Hello, I still have a question about this topic, because it's still not working. Does somebody know how to fix this? I have tried many things but it just doesn't work and I get the same output as above. Thanks.
There are some update. Cloud you try to run pip install -U avs
to upgrade the library?
Then run alexa-audio-check
to verify if the audio input and output are ok
$alexa-audio-check
RMS: 41 RMS: 43
If RMS is not zero, recording is OK, if you can hear alarm, playing is OK
Updating the avs library worked for me:
pip install -U avs
Thank you very much!
Hi, Updating worked and I now see the message that my respeaker is online on alexa.amazon.com and I finally can play TuneIn radio stations!!! Thanks guys!!!
(Note: I can play stations from the alexa.amazon.com website, but it doesn't work if I say 'Alexa play bbc radio 6 music'. I don't think it's a huge problem, but it could be fixed ;)
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:
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:
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.