Skip to content

Instantly share code, notes, and snippets.

@shafzhr
Created February 11, 2021 10:26
Show Gist options
  • Select an option

  • Save shafzhr/d19e85cb958b2896b5481bb26f4a113c to your computer and use it in GitHub Desktop.

Select an option

Save shafzhr/d19e85cb958b2896b5481bb26f4a113c to your computer and use it in GitHub Desktop.
Create a virtual mic and pipe audio to it
pactl load-module module-pipe-source source_name=virtmic file=/tmp/virtmic format=s16le rate=16000 channels=1
ffmpeg -re -i input.mp3 -f s16le -ar 16000 -ac 1 - > /tmp/virtmic
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment