Run once. Hold left Opt+Cmd and speak. It will transcribe and type what you said, so you don't have to.
Great multilingual transcription thanks to Whisper, whisper.cpp!
-
Make sure you have the
rec
command from SoX:brew install sox
. -
Install dependencies with poetry:
poetry install
. -
If you prefer to use local whisper.cpp installation (slow unless you are using M1+):
-
Clone whisper.cpp.
- Download the models you want to use. For best results,
medium
orlarge
(slower). - Follow the instructions to convert models to CoreML. It might take a while!
- Download the models you want to use. For best results,
-
Install Python bindings for whisper.cpp, with CoreML support (optional) so whisper runs faster.
pip install --config-settings="--build-option=--accelerate=coreml" whisper-cpp-pybind
-
Set environment variables in your
.bashrc
or.zshrc
:export WHISPER_CPP_ROOT=
So that
WHISPER_CPP_ROOT
should point to your whisper.cpp installation. It will get the models from there.
-
-
If you prefer to use OpenAI:
-
Set environment variables in your
.bashrc
or.zshrc
:export OPENAI_API_KEY=
-
-
Be happy.
Just ./whisper-dictate.py
, or ./whisper-dictate.py --openai
.
Use ./whisper-dictate.py --help
for more settings.
If using whisper.cpp, the very first time will take a while to load (whisper.cpp model run through CoreML).
Then hold left Opt+Cmd wherever you are on your system, talk, and lift the keys.
The transcript will be typed and copied to the clipboard.