Running script with AUDIO on boot

Hello all, recently
I made my board to run script on board, but when is script(which make some sound) it is nothing happen. I tried to make this steps How to make PulseAudio run once at boot for all your users — ,but it still doesn’t work. I use USB sound card .

Any suggestions?

Hi user50863,

Can you confirm if your USB sound card works? You can check this by independently playing some audio on it.

Regarding pulseaudio, can you check if it is working or running.
Your objective is to play some sound during boot?

Hello spujar,
thank you very much for your answer! My sound card works. When I play something from Youtube, or some song.mp3 in my board,even when I run the code with the speech from VSCode. I think pulseaudio works, or?

So my target is to run automatically a script on boot(without any login or monitor or mouse, just power ON) (the script is on the jetson nano 2 GB board, which control during Arduino Mega two dc motors ,it will speak some word during the moving and swich on the picam v2) this is all in one python file. this python file I would like to run on boot, but for now I am testing separately every thing. First the GPIO was ok, but after my experiments to make audio too, it dont work correctly any more. I mean GPIO code starts automatically now only after login, without to open VScode. Sound/speech code works only if I run it from VSCode.

This is my case.

Hi user50863

The content you want to play is in some file?
Can you please check if you can play audio using aplay? This is expected to work.
You can first check if you can add this command in your python script and see if audio works.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.