alexa-pi / AlexaPiDEPRECATED

DEPRECATED - Use https://github.com/alexa-pi/AlexaPi instead ...Turn a Raspberry Pi into an Alexa Client
https://github.com/alexa-pi/AlexaPi
MIT License
587 stars 439 forks source link

Edited version of the main.py file #103

Closed jmmirl closed 8 years ago

jmmirl commented 8 years ago

I was having serious playback issues with Alexa Responses getting clipped and chopped off and the 1sec.mp3 silence buffer was not helping. I tracked my issues down to the OS calls to mpg123 playing the returned file from Amazon. I have made the following edits on this file take the external calls to the os and mpg123

I have switched to a python library called pygame and now there is no calling of external programs to play back the Alexa Responses.

This does add an additional dependency that you need to install a new python library using the following command sudo apt-get install python-pygame

I hope this helps someone else if you are having audio drop outs or chopped responses try this alternative main.py file. I did not want to replace the main.py as I have only really tested this on a Pi3 and I did not want to stomp over the great work Sam's done.

jmmirl commented 8 years ago

Alternative main.py that uses native python libraries for playback.