Use of aplay to play .ogg file on Linux results in white noise on receive #62

Closed
opened 2026-10-05 03:18:27 +02:00 by adam · 0 comments
Owner

In rx_handler.py, the following file (oga) is played using aplay, which does not support .oga files, if paplay is not installed.

    elif system == "Linux":
        sound_path = "/usr/share/sounds/freedesktop/stereo/complete.oga"
        if(shutil.which("paplay")):
            executable = "paplay"
        else:
            executable = "aplay"

Notes on aplay not supporting OGG files

man aplay
"-f --format=FORMAT
Sample format
Recognized sample formats are: S8 U8 S16_LE S16_BE U16_LE U16_BE S24_LE S24_BE U24_LE U24_BE S32_LE S32_BE U32_LE U32_BE FLOAT_LE FLOAT_BE FLOAT64_LE FLOAT64_BE IEC958_SUBFRAME_LE IEC958_SUBFRAME_BE MU_LAW A_LAW IMA_ADPCM MPEG GSM SPECIAL S24_3LE S24_3BE U24_3LE U24_3BE S20_3LE S20_3BE U20_3LE U20_3BE S18_3LE S18_3BE U18_3LE"

Symptom is "white noise" heard from speakers:
https://unix.stackexchange.com/questions/363176/ogg-audio-file-and-aplay-white-noise

In rx_handler.py, the following file (oga) is played using aplay, which does not support .oga files, if paplay is not installed. elif system == "Linux": sound_path = "/usr/share/sounds/freedesktop/stereo/complete.oga" if(shutil.which("paplay")): executable = "paplay" else: executable = "aplay" Notes on aplay not supporting OGG files man aplay "-f --format=FORMAT Sample format Recognized sample formats are: S8 U8 S16_LE S16_BE U16_LE U16_BE S24_LE S24_BE U24_LE U24_BE S32_LE S32_BE U32_LE U32_BE FLOAT_LE FLOAT_BE FLOAT64_LE FLOAT64_BE IEC958_SUBFRAME_LE IEC958_SUBFRAME_BE MU_LAW A_LAW IMA_ADPCM MPEG GSM SPECIAL S24_3LE S24_3BE U24_3LE U24_3BE S20_3LE S20_3BE U20_3LE U20_3BE S18_3LE S18_3BE U18_3LE" Symptom is "white noise" heard from speakers: https://unix.stackexchange.com/questions/363176/ogg-audio-file-and-aplay-white-noise <!-- github-sync-id:3219558045 -->
adam closed this issue 2026-10-05 03:18:27 +02:00
Sign in to join this conversation.
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: adam/contact#62