From 7f5b51c906489764f2422fc7cea05562dd32011b Mon Sep 17 00:00:00 2001 From: Mooneer Salem Date: Sat, 31 Aug 2024 09:47:07 -0700 Subject: [PATCH] Add required Windows batch scripts to make RADAE work. --- radae_rx.bat | 16 ++++++++++++++++ radae_tx.bat | 16 ++++++++++++++++ 2 files changed, 32 insertions(+) create mode 100644 radae_rx.bat create mode 100644 radae_tx.bat diff --git a/radae_rx.bat b/radae_rx.bat new file mode 100644 index 00000000..455910ae --- /dev/null +++ b/radae_rx.bat @@ -0,0 +1,16 @@ +@echo off + +set RADAE_PATH=%1 +set RADAE_VENV=%2 + +rem The below does the following: +rem * For each block of OTA audio from freedv-gui: +rem * Convert the 8 kHz audio into IQ data via zero-padding. +rem * Pass the IQ data into the RADAE decoder +rem * Send the resulting 16 kHz audio back to freedv-gui for playback. +rem +rem Note: Current RADAE scripts seem to require being executed from +rem the RADAE folder. +cd %RADAE_PATH% +set PATH=%RADAE_VENV%\scripts;%PATH% +%RADAE_VENV%\scripts\python.exe -u int16tof32.py --zeropad | %RADAE_VENV%\scripts\python.exe -u radae_rx.py model19_check3\checkpoints\checkpoint_epoch_100.pth -v 2 --auxdata | build\src\lpcnet_demo -fargan-synthesis - - diff --git a/radae_tx.bat b/radae_tx.bat new file mode 100644 index 00000000..3e0ef6ed --- /dev/null +++ b/radae_tx.bat @@ -0,0 +1,16 @@ +@echo off + +set RADAE_PATH=%1 +set RADAE_VENV=%2 + +rem The below does the following: +rem * For each block of microphone audio from freedv-gui: +rem * Extract features from 16 kHz input audio. +rem * Pass features into the RADAE encoder. +rem * Send the resulting 8 kHz audio back to freedv-gui. +rem +rem Note: Current RADAE scripts seem to require being executed from +rem the RADAE folder. +cd %RADAE_PATH% +set PATH=%RADAE_VENV%\scripts;%PATH% +build\src\lpcnet_demo -features - - | %RADAE_VENV%\scripts\python.exe -u radae_tx.py model19_check3\checkpoints\checkpoint_epoch_100.pth --auxdata | %RADAE_VENV%\scripts\python.exe -u f32toint16.py --real --scale 16383