You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to run a python script on boot using a systemd service on a Raspberry Pi4. The python script runs fine via the terminal, but flags a few errors (see attached image) when run via systemd. The python script opens an audio stream using the sounddevice library.
I noticed that the device indexes are different when the python script is run via the terminal and via systemd. So I tried hardcoding the device index for the input stream, but that has not worked.
Issue was the input devices do not have the same device index when the python script is running in the terminal or when it is running with systemd. A few print statements showed the differences in device indexes. Another approach that worked for me was to get the specific device ID for the device name and plug that into the PvRecorder initiation.
I am trying to run a python script on boot using a systemd service on a Raspberry Pi4. The python script runs fine via the terminal, but flags a few errors (see attached image) when run via systemd. The python script opens an audio stream using the sounddevice library.
I noticed that the device indexes are different when the python script is run via the terminal and via systemd. So I tried hardcoding the device index for the input stream, but that has not worked.
The text was updated successfully, but these errors were encountered: