I am working on a Python script that lets Raspberry Pi 4 play audio announcements (mp3 format) at specified times. I am using the Python OS library to send the play audio commands to system.
The aplay -l
command gives the list of the available audio devices, mine shows HDMI and analog (does not show Bluetooth speakers).
Then I pick the one I want (analog in my case), and specify the output this way:
AUDIODEV=hw:0,0 play audio.mp3
The question is: is there a way to send output to the paired Bluetooth speaker? I do not want to change the default audio device to Bluetooth. Ideally, I want the default to still be HDMI but only send these commands to Bluetooth speaker.
Any suggestions on how to achieve that?
AUDIODEV=
. I will study the resources you sent and update my post if I find a solution. – Bahi8482 Apr 06 '22 at 10:29