-
Notifications
You must be signed in to change notification settings - Fork 50
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[WIP] Initial support for piping audio through external vocoder programs. #719
base: master
Are you sure you want to change the base?
Changes from 23 commits
d23e508
9557302
d591de2
12bc994
a57aed8
078e75e
5d1bd96
45ddfef
ef8a289
09c3bbf
3888560
80b080b
6e9775b
f6eee16
ba1f5d7
1dc03af
bdf48bc
c9e33a8
fd5928e
4d22ce9
46fd9d2
dafa7af
169a4f3
5a325b1
7fe5c94
ed31b5c
1f7fb23
fae6119
43346da
37bc843
0df5552
1e473b2
65d60b3
fc797b2
7f5b51c
56ddbf5
9cd9e58
e75bcb4
8f66f0f
f79cccb
c9d272b
563526a
d6f0fd3
6a2f9ce
a23f62e
6f0c6eb
c034aba
69a1bc3
88e6993
520059b
3c6080f
dd575ff
4af9eee
71642e5
6e787b7
bc91145
bcf2673
f7c76b8
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#!/bin/sh | ||
|
||
RADAE_PATH=$1 | ||
RADAE_VENV=$2 | ||
|
||
# Current RADAE scripts seem to require being executed from | ||
# the RADAE folder. | ||
cd $RADAE_PATH | ||
|
||
# The below does the following: | ||
# * For each block of OTA audio from freedv-gui: | ||
# * Convert the audio into IQ data via zero-padding. | ||
# * Pass the IQ data into the RADAE decoder | ||
# * Send the resulting 16 kHz audio back to freedv-gui. | ||
$RADAE_VENV/bin/python3 $RADAE_PATH/int16tof32.py --zeropad | $RADAE_VENV/bin/python3 $RADAE_PATH/radae_rx.py $RADAE_PATH/model19_check3/checkpoints/checkpoint_epoch_100.pth -v 2 --auxdata | $RADAE_PATH/build/src/lpcnet_demo -fargan-synthesis - - | ||
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#!/bin/sh | ||
|
||
RADAE_PATH=$1 | ||
RADAE_VENV=$2 | ||
|
||
# Current RADAE scripts seem to require being executed from | ||
# the RADAE folder. | ||
cd $RADAE_PATH | ||
|
||
# The below does the following: | ||
# * For each block of OTA audio from freedv-gui: | ||
# * Convert the audio into IQ data via zero-padding. | ||
# * Pass the IQ data into the RADAE encoder | ||
# * Send the resulting 8 kHz audio back to freedv-gui. | ||
export PATH=$RADAE_VENV/bin:$PATH | ||
$RADAE_PATH/build/src/lpcnet_demo -features - - | $RADAE_VENV/bin/python3 $RADAE_PATH/radae_tx.py $RADAE_PATH/model19_check3/checkpoints/checkpoint_epoch_100.pth --auxdata | python3 $RADAE_PATH/f32toint16.py --real --scale 16383 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Looks 👍 But as above - see if the streaming works when you run the script form the cmd line. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah, they work on the command line. It looks like there's significant latency before they even start encoding or decoding, mainly while PyTorch is setting itself up (hence why I was having the TX problem). This might be able to be worked around by e.g. not constantly killing and restarting the TX process. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about:
Maybe try Ubuntu 22 and see if the VENV issues go away? It's pretty hard to follow the code with all the explicit paths. Apart from that it looks OK. You could maybe test the script stand alone to see if it streams OK. I'm not sure about streaming to and from scripts.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I went ahead and cleaned up the scripts so they should be a bit neater now. Thanks for taking a look!