Fix DSD voice decoder detection for dsd-fme and PulseAudio error

Check for dsd-fme binary (common fork) before falling back to dsd.
Disable audio output with -o /dev/null to prevent PulseAudio
connection failures when running under sudo.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Smittix
2026-02-06 15:44:31 +00:00
parent 4e3f0ad800
commit 67fa196a28

View File

@@ -55,8 +55,11 @@ PROTOCOL_FLAGS = {
def find_dsd() -> str | None:
"""Find DSD (Digital Speech Decoder) binary."""
return shutil.which('dsd')
"""Find DSD (Digital Speech Decoder) binary.
Checks for dsd-fme first (common fork), then falls back to dsd.
"""
return shutil.which('dsd-fme') or shutil.which('dsd')
def find_rtl_fm() -> str | None:
@@ -241,8 +244,8 @@ def start_dmr() -> Response:
'-l', '1', # squelch level
]
# Build DSD command
dsd_cmd = [dsd_path, '-i', '-']
# Build DSD command (-o /dev/null to avoid PulseAudio dependency)
dsd_cmd = [dsd_path, '-i', '-', '-o', '/dev/null']
dsd_cmd.extend(PROTOCOL_FLAGS.get(protocol, []))
try: