diff --git a/config.template b/config.template index 75b97a8..2bb8a8d 100644 --- a/config.template +++ b/config.template @@ -285,7 +285,9 @@ time = # using Hamlib rig control will monitor and alert on channel use enabled = False rigControlServerAddress = localhost:4532 -# broadcast to all nodes on the channel can also be = 2,3 +# device interface to send the message to +sigWatchBroadcastInterface = 1 +# broadcast channel can also be a comma separated list of channels sigWatchBroadcastCh = 2 # minimum SNR as reported by radio via hamlib signalDetectionThreshold = -10 diff --git a/modules/radio.py b/modules/radio.py index 4008bde..6480cba 100644 --- a/modules/radio.py +++ b/modules/radio.py @@ -11,10 +11,18 @@ voxHoldTime = signalHoldTime previousVoxState = False if voxDetectionEnabled: - import sounddevice as sd # pip install sounddevice sudo apt install portaudio19-dev - from vosk import Model, KaldiRecognizer # pip install vosk - import json - q = asyncio.Queue() + try: + import sounddevice as sd # pip install sounddevice sudo apt install portaudio19-dev + from vosk import Model, KaldiRecognizer # pip install vosk + import json + q = asyncio.Queue() + except Exception as e: + print(f"RadioMon: Error importing VOX dependencies: {e}") + print(f"To use VOX detection please install the vosk and sounddevice python modules") + print(f"pip install vosk sounddevice") + print(f"sounddevice needs pulseaudio, apt-get install portaudio19-dev") + voxDetectionEnabled = False + logger.error(f"RadioMon: VOX detection disabled due to import error") def get_hamlib(msg="f"):