Update README.md

This commit is contained in:
Fierelier 2023-02-08 19:41:36 +01:00
parent 5a7a47a140
commit b7b2cd8357
1 changed files with 13 additions and 4 deletions

View File

@ -1,6 +1,15 @@
# me.fier.aspew
Audio I/O for real-time applications, like VoIP.
## Prerequisites
### Python 3.4 or newer:
- **Windows:** [https://www.python.org/downloads/](https://www.python.org/downloads/)
- **Debian:** `apt install python3`
### PyAudio:
- **Windows:** `py -m pip install PyAudio`
- **Debian:** `apt install python3-pyaudio`
## Tools
- `aspew-in.py` takes a microphone as an input, and outputs it to pipe.
- `aspew-out.py` takes input from a pipe, and outputs it to a speaker.
@ -8,19 +17,19 @@ Audio I/O for real-time applications, like VoIP.
## Arguments
Arguments are pairs of key=value.
### in & out
### in & out:
- `device`: The device, a number (Default: Your default audio device.)
- `format`: The encoding of your audio, choices: [https://people.csail.mit.edu/hubert/pyaudio/docs/#pasampleformat](https://people.csail.mit.edu/hubert/pyaudio/docs/#pasampleformat) (Default: `paUInt8`)
- `channels`: How many channels the audio has (Default: `1`)
- `bitrate`: How high the refresh rate of the audio is in Hz (Default: `8000`)
- `buffersize`: The buffer-size, in seconds. Higher buffer-sizes reduce CPU load and risk of stutter, but raise delay (Default: `0.05`)
### out-only
### out-only:
- `store`: How much audio to store in the back-buffer at maximum before cutting it off, in seconds. Raise this if you get inconsistent playback (Default: 0.3s)
## Examples
`./aspew-in.py | ./aspew-out.py`
- `./aspew-in.py | ./aspew-out.py`
Listen to your default microphone at default settings.
`./aspew-in.py format=paInt16 bitrate=48000 channels=2 | ./aspew-out.py format=paInt16 bitrate=48000 channels=2`
- `./aspew-in.py format=paInt16 bitrate=48000 channels=2 | ./aspew-out.py format=paInt16 bitrate=48000 channels=2`
Listen to your default microphone at 16-bit, 48000Hz, stereo.