hi, i am trying to fix the audio issue in jetson nano from past one week and i am unable to find suitable solution for it anywhere.
i have connected a bluetooth speaker to jetson nano but this is seen as “headset” in the audio icon. so, my issue is that i am running an audio file(.wav file) in a python script if certain function is executed like enclosed below. THE AUDIO PLAYS ABSOULTELY FINE WHEN RUN MANUALLY ON TERMINAL USING “PYTHON3 abcd.py”. but this exact file is made into a executable file using pyinstaller and ran in systemd services. the executable file ./abcd file also plays the audio and the event also executes but only the audio does not play in systemd services.
from pygame import mixer
mixer.init()
mixer.music.load( "/home/sid/song/song.wav" )
if (some_event):
mixer.music.play()
audio is 5sec long and .wav format.
my service file looks like this
[Unit]
Description = SIDD
After=local-fs.target
ConditionPathExists=/opt/SIDD/bin
[Service]
ExecStart=/opt/SIDD/bin/SIDD.sh
Restart=no
Type=simple
StandardOutput=journal+console
[Install]
WantedBy=multi-user.target
i did follow the below link to enable audio on my speaker but no luck with respect to service. Welcome — Jetson Linux<br/>Developer Guide 34.1 documentation
Should i be adding a audio path anywhere or change audio/bluetooth config file?