Last active
November 23, 2022 20:05
-
-
Save jj1bdx/21b8bf2a6371a529a2188f49294ad0bf to your computer and use it in GitHub Desktop.
Audio streaming script from Linux to macOS
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Sender Linux script | |
# Raw output from gqrx | |
# Note: the "hw:" in the device name | |
# Use "plughw:" if you need a conversion between the software and arecord | |
arecord --buffer-time=15000 -D hw:Loopback,1,0 -t raw -r 48000 -f FLOAT_LE -c 2 | nc "receiver macOS IP address" 23456 | |
# Receiver macOS script | |
nc -l 23456 | play --buffer 64 -t raw -e floating-point -b32 -r 48000 -c 2 -q - |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Sender Linux script | |
# For 11025Hz mono stream | |
arecord --buffer-time=10000 -D plughw:CARD=CODEC,DEV=0 -t raw -r 11025 -f S16_LE | nc "receiver macOS IP address" 23456 | |
# Receiver macOS script | |
nc -l 23456 | play --buffer 64 -t raw -e signed-integer -b16 -r 11025 -c 1 -q - |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment