me.fier.aspew/README.md

1.8 KiB

me.fier.aspew

Audio I/O for real-time applications, like VoIP.

Prerequisites

Python (3.4 or newer)

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.

Flags

Flags formatted as -s or --long.

in & out:

  • -l: List devices as JSON
  • -h: Use human-readable format

Arguments

Arguments are pairs of key=value.

in & out:

  • device: The device, a number (Default: -1 aka. your default device)
  • format: The encoding of your audio, choices: 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. Raise this if you get constant stutter (Default: 0.05)

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.3)

Examples

  • ./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
    Listen to your default microphone at 16-bit, 48000Hz, stereo.

  • ./aspew-in.py -lh
    List your input devices.

  • ./aspew-out.py -lh
    List your output devices.