Skip to content

Instantly share code, notes, and snippets.

@port19x
Created September 10, 2025 18:34
Show Gist options
  • Select an option

  • Save port19x/ed5ccebea8ca54668645a17f3dd5ec5b to your computer and use it in GitHub Desktop.

Select an option

Save port19x/ed5ccebea8ca54668645a17f3dd5ec5b to your computer and use it in GitHub Desktop.
Dictation
#!/bin/sh
echo "Recording. Press C-c to stop..."
ffmpeg -hide_banner -nostats -loglevel quiet -y -f alsa -i default "/tmp/audio.wav"
echo "Transcribing audio..."
whisper "/tmp/audio.wav" --model base --fp16 False --output_format txt -o /tmp/transcription
xclip -selection c < /tmp/transcription/audio.txt
echo "DONE! Check your Clipboard"
@port19x
Copy link
Author

port19x commented Sep 10, 2025

The correct arch package for whisper is python-openai-whisper.
Wayland users may substitute xclip for wl-copy

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment