A minimal speech-to-text utility that transcribes audio with a hotkey.
- Linux (uses xdotool for typing)
- May work on macOS with appropriate modifications
- Not supported on Windows (requires alternative to xdotool)
- Press F13 to record audio, release to transcribe
- Uses OpenAI's Whisper model (small) via faster-whisper for accurate transcription
- Automatically types transcribed text where your cursor is positioned
- Minimal overhead and simple interface
- Python 3.6+
- Linux with X11 (for xdotool)
- Audio input device
-
Clone this repository:
git clone https://github.com/yourusername/simplified-whisper.git cd simplified-whisper -
Install dependencies:
pip install pynput sounddevice numpy soundfile faster-whisper sudo apt install xdotool
Run the script:
python simplified-whisper.py
- Press and hold the F13 key to start recording
- Speak clearly into your microphone
- Release the F13 key to stop recording
- The transcribed text will be typed at your cursor position
To change the hotkey, modify the trigger_key value in the script. For example:
# Change from F13 to F12
self.trigger_key = keyboard.KeyCode(vk=269025152) # F12 keyYou can also adjust the Whisper model size by changing the model parameter from "small" to "tiny", "base", "medium", or "large".
MIT License - See LICENSE file for details