aiy.voice.audio - AIY Projects 2018-11-16 documentation
Voice Hat and Hat Mic Schematics
I had challenges with getting the local audio files to play through the AIY speaker. I met with Pedro to work through those but the fix ultimately did not work as I was not able to add my files to a particular file. For this iteration, I tested and documented the process that was previously done through office hours with Pedro. Ultimately, I was able to successfully have audio played via local commands through the AIY speaker. Below are the tests and discoveries made in the process.
def visualization():
say('Take some time and visualize!')
subprocess.call('omxplayer /home/pi/Desktop/BIB_AnimalVisualization.mp3'. shell=True
This test resulted in the mp3 playing through the monitor's speakers. Also, I was not able to stop it once it had started even when I quit running the script.
I tried setting omxplayer to play locally via -o local
def visualization():
say('Take some time and visualize!')
subprocess.call('omxplayer -o local /home/pi/Desktop/BIB_AnimalVisualization.mp3'. shell=True
This test resulted in the audio file playing out of the headphone jack while the text within say('Take some time and visualize!)
was heard from the AIY speaker.
Tested out code provided by Pedro during an earlier office hour.
def visualization():
say('Take some time and visualize!')
subprocess.call('omxplayer -o alsa:hw:0,0 /home/pi/Desktop/BIB_AnimalVisualization.mp3'. shell=True