mirror of
https://github.com/aicodix/modem.git
synced 2026-04-27 14:30:34 +00:00
added improved example using SoX
This commit is contained in:
parent
505c2f2f47
commit
92a3ef6c31
1 changed files with 10 additions and 2 deletions
12
README.md
vendored
12
README.md
vendored
|
|
@ -18,13 +18,13 @@ Encode file ```uncoded.dat``` to ```encoded.wav``` [WAV](https://en.wikipedia.or
|
|||
Start recording to ```recorded.wav``` audio file and stop after 5 seconds:
|
||||
|
||||
```
|
||||
arecord -c 1 -f S16_LE -r 48000 -d 5 recorded.wav
|
||||
sox -d -c 1 -e float recorded.wav
|
||||
```
|
||||
|
||||
Start playing ```encoded.wav``` audio file:
|
||||
|
||||
```
|
||||
aplay encoded.wav
|
||||
play encoded.wav
|
||||
```
|
||||
|
||||
Decode ```recorded.wav``` audio file to ```decoded.dat``` file:
|
||||
|
|
@ -39,6 +39,14 @@ Compare original ```uncoded.dat``` with ```decoded.dat```:
|
|||
diff -s uncoded.dat decoded.dat
|
||||
```
|
||||
|
||||
### Stream Audio
|
||||
|
||||
This currently works on macOS and Linux only: Stream live audio into the decoder:
|
||||
|
||||
```
|
||||
sox -q -d -c 1 -e float -t wav - | ./decode - decoded.dat
|
||||
```
|
||||
|
||||
### Supported Modes
|
||||
|
||||
All modes need a bandwidth of 2400 Hz and there are two frame sizes.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue