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.
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.