Handling of blank audio
jimxbob opened this issue · comments
Hi,
LOVE this - finally got it working.. (I'm new to GIT and for some reason the checkout I did din't have the latest code).
Now I'm working, there are two niggles:
1/ I don't get the beep every time I press the button. I always get it the first time, but almost never from then on.
2/ If you don't say anything & end up writing a blank recording, you get an error:
Traceback (most recent call last):
File "main.py", line 119, in <module>
alexa()
File "main.py", line 99, in alexa
data = r.content.split(boundary.encode('utf-8'))
UnboundLocalError: local variable 'boundary' referenced before assignment
It'd be great to catch this error & handle it seamlessly, though from my reading of other's attempts, echoing this out to say "no audio" to the terminal might be good too, as it'd indicate MIC problems.
I really ought to be able to fix these myself & contribute - time to learn Python!!
Cheers,
James
Hey, this project will soon be merged with https://github.com/alexa-pi/AlexaPi You probably shouldn't waste too much effort on this :-)
Ah - Cool!
I've just had a look at the code there - looks much more advanced - debug mode, status LEDs etc etc.
Will it run on the CHIP with some tweaks to GPIO pinouts?
It currently runs under CHIP with some tweaks. I suggest you read through the documentation. https://github.com/alexa-pi/AlexaPi/wiki/Devices#chip-computer
This project is now deprecated in favor of the new AlexaPi (https://github.com/alexa-pi/AlexaPi) which has all the features of this project and much more, such as:
- support for a wide range of devices and platforms (Raspberry Pi, CHIP, Orange Pi, desktops, Magic Mirror and others)
- voice activation (great PocketSphinx support and snowboy support soon to be released)
- much more robust installation and configuration
- better security
- Arch Linux support
- awesome documentation
- and much, much more! You get it - it's just awesome.
Please switch over to the new project and if your issue persists there, file an issue in the new repo's issue tracker. Thank you.