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