logo
  
How to configure DH1TW's remote audio on a PC
On the LOCAL PC (where the radio is ) 
Firstly navigate to this page 
1. Download the latest release for windows  eg 386 release
2. Extract  all files in a folder on your LOCAL radio PC eg remoteAudio
3. Download NATS server from here eg nats-server-v2.6.4-windows-386.zip
4. Extract the files into the same folder as in 2 above
5. Open command prompt and run remoteAudio enumerate  command from the remoteAudio folder
6. Note the sound cards found and look for the one that is connected to your radio eg Microphone (USB Audio CODEC). This is important for the config file
 
There are multiple host APIs. WASAPI seems to have low latency. MME tends to usually work with remote Audio. The Host API name appears in the enumerate command as follows. Ensure you copy it in the config file in the next step as shown below ie Windows WASAPI etc
 
 
 
If the sound card you are using to capture the audio from the radio is already the default you can use "default" for the device-name below. The name needs to match exactly as the enumerate function shows. For example, there is an extra space for the card shown above before the closing parenthesis.
 
  
 
7. Copy and paste the text below into notepad and modify the  relevant fields that appear in red below. Save it in the same folder as all the other files and name it remoteAudio.toml
  
[nats]
broker-url = "localhost"
broker-port = 4222
username = "user"
password = "pass"
 
[server]
name = "flexradio"
index = 1
 
[input-device]
device-name = "Microphone (USB Audio CODEC )"
samplerate = 48000
latency = "2.5ms"
channels = 2
hostapi = "Windows WASAPI"
 
[output-device]
device-name = "default"
samplerate = 48000
latency = "5ms"
channels = 2
hostapi = "default"
 
[opus]
application = "restricted_lowdelay"
bitrate = 24000
complexity = 5
max-bandwidth = "wideband"
 
[audio]
rx-buffer-length = 10 # 10x10ms (@framesize=480 & samplerate=48kHz)
# opus does not accept arbitrary frame length! Check OPUS documentation
frame-length = 480  #10ms @ 48kHz (should work for most cases)
tx-volume = 70
rx-volume = 70
stream-on-startup = false
vox = false
vox-threshold = 0.1
vox-holdtime = "500ms"
 
[http]
host = "localhost"
port = 9090 
 
 
8. Ensure your soundcard is set to 48000 either 1 or 2 channels depending on whether you want 1 or 2 channels. To do this, go to START->settings-> choose sound-> scroll down to input devices. Ensure you have the right sound card selected and click Device properties and then from new screen additional device properties, Advanced tab and select 48000 1 or 2 channels.
 
 
9. You need to TCP port forward the port for remote audio eg 4222 in you router  You need to look at your router manual on how to do this
 
10. From command prompt run the nats server
nats-server.exe 
 
 
11. from another command prompt run remoteAudio.
remoteAudio.exe server nats --config remoteAudio.toml 
 
If all is well, you should see the following screen. Occasionally you may get a sound card error in which case try a different card or hostAPI. MME usually works but has worse latency. If you get a non-sound card error try the command again. Occasionally you may have to try this command  2-3 times to get this to work.
 
 
 
 
 On the REMOTE PC (where you are):
1. Download the latest release for windows  eg 386 release
2. Extract  all files in a folder on your REMOTE radio PC eg remoteAudio
3. You do NOT need NATS here
4. Copy and paste the config file in the box below in notepad , replace red text with your details and save it as remoteAudio.toml  Ensure user and password are the same as you have defined in step 7 above
 
[nats]
broker-url = "IPofRadioPCeg 8.8.8.8"
broker-port = 4222
username = "user"
password = "pass"
 
[input-device]
device-name = "default"
samplerate = 48000
latency = "5ms"
channels = 1
hostapi = "default"
 
[output-device]
device-name = "default"
samplerate = 48000
latency = "5ms"
channels = 2
hostapi = "default"
 
[opus]
application = "restricted_lowdelay"
bitrate = 24000
complexity = 5
max-bandwidth = "wideband"
 
[audio]
rx-buffer-length = 5 # 10x10ms (@framesize=480 & samplerate=48kHz)
# opus does not accept arbitrary frame length! Check OPUS documentation
frame-length = 480  #10ms @ 48kHz (should work for most cases)
tx-volume = 70
rx-volume = 90
stream-on-startup = false
vox = false
vox-threshold = 0.1
vox-holdtime = "500ms"
 
[http]
host = "localhost"
port = 9090  
 
5. From your remote PC, start command prompt and navigate to the remote audio directory.
 
6. Execute:  remoteAudio client nats --config remoteAudio.toml 
if all is well you should see something like:
2021/06/27 19:01:47 webserver listening on localhost:9090  
 
7. Open your browser and navigate to 127.0.0.1:9090
 8. Click on the RX AUDIO button and if all is well button turns Green and you should hear your radio audio
 
BIG THANKS TO DH1TW for writing great software. Enjoy!