A lightweight, offline speech-to-text and text-to-speech tool for Windows that runs locally using Whisper.cpp and Piper. Press a hotkey to record your voice, release to transcribe, and the text is automatically pasted into your active application. Or select text and press F10 to have it read aloud.
- Fully Offline - No internet connection required, all processing happens locally
- GPU Accelerated - Supports CUDA for fast transcription on NVIDIA GPUs
- Auto Language Detection - Automatically detects the spoken language
- Speech-to-Text (F9) - Hold F9 to record, release to transcribe and paste
- Text-to-Speech (F10) - Select text and press F10 to read it aloud
- Microphone Selection - Choose your preferred input device at startup
- Low Latency - Text appears almost instantly after releasing the hotkey
- Cancellable TTS - Press F10 again while audio is playing to stop
- Windows 10/11
- Whisper.cpp executable (
whisper-cli.exe) - for Speech-to-Text - A Whisper model file (e.g.,
ggml-large-v3-turbo.bin) - for Speech-to-Text - Piper executable (
piper.exe) - for Text-to-Speech (optional) - A Piper voice model (
.onnxfile) - for Text-to-Speech (optional) - For GPU acceleration: NVIDIA GPU with CUDA support
Download the latest release from the Releases page.
Note: The Whisper executable and DLLs are not included in this repository due to their size and licensing. You must download them separately.
-
Go to whisper.cpp releases
-
Download the appropriate version:
- CPU only:
whisper-bin-x64.zip - NVIDIA GPU (recommended):
whisper-cublas-12.4.0-bin-x64.zip
Tip: The
whisper-cublas-12.4.0-bin-x64.zipversion has been tested and works best for CUDA GPU acceleration. - CPU only:
-
Extract the ZIP file
-
Copy the following files to your myLocalTTS folder:
whisper-cli.exe(required)- All
.dllfiles (required - these include ggml, CUDA, and other dependencies)
Example DLLs you should see (varies by version):
ggml.dll
whisper.dll
cublas64_*.dll (CUDA version only)
cublasLt64_*.dll (CUDA version only)
cudart64_*.dll (CUDA version only)
Note: Model files are not included in this repository due to their size (~75MB to ~3GB). You must download them separately.
Download a model from Hugging Face:
| Model | Size | Quality | Speed |
|---|---|---|---|
ggml-tiny.bin |
~75 MB | Basic | Fastest |
ggml-base.bin |
~147 MB | Good | Fast |
ggml-small.bin |
~466 MB | Better | Medium |
ggml-medium.bin |
~1.5 GB | Great | Slower |
ggml-large-v3-turbo.bin |
~1.6 GB | Best | Fast (GPU) |
For best results with a GPU, use ggml-large-v3-turbo.bin:
Invoke-WebRequest -Uri "https://huggingface.co/ggerganov/whisper.cpp/resolve/main/ggml-large-v3-turbo.bin" -OutFile "ggml-large-v3-turbo.bin"Note: Piper is optional. If not configured, only Speech-to-Text (F9) will be available.
- Go to Piper releases
- Download
piper_windows_amd64.zip - Extract the ZIP file - it contains a
piperfolder with all required files - Copy the entire
piperfolder to your myLocalTTS directory (or rename/move it as needed)
Important: The piper folder must contain all of these files for Piper to work:
piper/
├── piper.exe (main executable)
├── espeak-ng.dll (required DLL)
├── espeak-ng-data/ (required folder - phoneme data)
│ └── ... (many files inside)
├── onnxruntime.dll (required DLL)
├── onnxruntime_providers_shared.dll (required DLL)
├── piper_phonemize.dll (required DLL)
└── libtashkeel_model.ort (required model file)
Warning: If you only copy
piper.exewithout the DLLs andespeak-ng-datafolder, you will get a "DLL not found" error (exit code -1073741515).
Download a voice model from Piper Voices:
- Choose a language folder (e.g.,
en/en_USfor US English,pt/pt_BRfor Brazilian Portuguese) - Choose a speaker (e.g.,
amy,lessac) - Choose a quality level (
low,medium, orhigh) - Download both files:
- The
.onnxmodel file (the voice model itself) - The
.onnx.jsonconfig file (model configuration - required)
- The
- Place both files in your
piperfolder
Example for US English (Amy voice, medium quality):
# Download to the piper folder
Invoke-WebRequest -Uri "https://huggingface.co/rhasspy/piper-voices/resolve/main/en/en_US/amy/medium/en_US-amy-medium.onnx" -OutFile "piper\piper-model.onnx"
Invoke-WebRequest -Uri "https://huggingface.co/rhasspy/piper-voices/resolve/main/en/en_US/amy/medium/en_US-amy-medium.onnx.json" -OutFile "piper\piper-model.onnx.json"Example for Brazilian Portuguese (faber voice, medium quality):
Invoke-WebRequest -Uri "https://huggingface.co/rhasspy/piper-voices/resolve/main/pt/pt_BR/faber/medium/pt_BR-faber-medium.onnx" -OutFile "piper\piper-model.onnx"
Invoke-WebRequest -Uri "https://huggingface.co/rhasspy/piper-voices/resolve/main/pt/pt_BR/faber/medium/pt_BR-faber-medium.onnx.json" -OutFile "piper\piper-model.onnx.json"Note: The
.onnx.jsonfile must have the same base name as the.onnxfile. If you rename the model topiper-model.onnx, rename the config topiper-model.onnx.json.
Create a tts_config.txt file in your myLocalTTS folder to tell the application where to find Piper:
# Piper TTS Configuration
PIPER_PATH=piper\piper.exe
PIPER_MODEL=piper\piper-model.onnx
Tip: You can use relative paths (as shown above) or absolute paths.
Your folder should look like this:
myLocalTTS/
├── local_tts_tool.exe
├── whisper-cli.exe
├── ggml-large-v3-turbo.bin
├── tts_config.txt (required for TTS - points to piper)
├── piper/ (optional - for TTS)
│ ├── piper.exe
│ ├── espeak-ng.dll
│ ├── espeak-ng-data/
│ ├── onnxruntime.dll
│ ├── onnxruntime_providers_shared.dll
│ ├── piper_phonemize.dll
│ ├── libtashkeel_model.ort
│ ├── piper-model.onnx (voice model)
│ └── piper-model.onnx.json (voice model config)
├── *.dll (from whisper.cpp release)
- Run
local_tts_tool.exe - Select your microphone from the list
- Wait for the "Listening..." message
- Hold F9 to record your voice
- Release F9 to transcribe and auto-paste the text
The transcribed text will be automatically pasted into whatever application is currently focused.
- Select text in any application (highlight it with your mouse or Shift+Arrow keys)
- Press F10 to have the selected text read aloud
- Press F10 again while audio is playing to stop playback
- Rust (latest stable)
- Windows 10/11
git clone https://github.com/marcelo-t-tomita/myLocalTTS.git
cd myLocalTTS
cargo build --releaseThe executable will be at target/release/local_tts_tool.exe.
You can configure Piper paths using environment variables or a config file.
Option 1: Environment Variables
$env:PIPER_PATH = "C:\path\to\piper.exe"
$env:PIPER_MODEL = "C:\path\to\model.onnx"Option 2: Config File
Create a tts_config.txt file in the same folder as the executable:
# Piper TTS Configuration
PIPER_PATH=C:\path\to\piper.exe
PIPER_MODEL=C:\path\to\model.onnx
Default Paths (if not configured):
piper.exein the application folderpiper-model.onnxin the application folder
Edit src/main.rs:
- F9 (Speech-to-Text): Line ~97
- F10 (Text-to-Speech): Line ~98
let is_f9_pressed = KeybdKey::F9Key.is_pressed();
let is_f10_pressed = KeybdKey::F10Key.is_pressed();Available keys: F1Key through F12Key, or see inputbot documentation.
Edit src/main.rs line 47:
let path_to_model = "ggml-large-v3-turbo.bin";Edit src/transcribe.rs and add the language flag:
.arg("-l")
.arg("en") // or "pt", "es", "fr", etc.Add this to your PowerShell profile (notepad $PROFILE):
function tts {
Push-Location 'C:\path\to\myLocalTTS'
.\local_tts_tool.exe
Pop-Location
}Then just type tts to start the tool.
Make sure the model file (e.g., ggml-large-v3-turbo.bin) is in the same folder as the executable.
Make sure whisper-cli.exe is in the same folder as the executable.
Copy all .dll files from the whisper.cpp release to the same folder as the executable.
- Use the CUDA version of whisper.cpp for GPU acceleration
- Use a smaller model (e.g.,
ggml-small.bin)
- Make sure no other application is using F9 as a global hotkey
- Try running from a different terminal window
This is normal if you haven't configured Piper. Speech-to-Text (F9) will still work. To enable Text-to-Speech:
- Download Piper from releases - extract the entire folder, not just
piper.exe - Download a voice model (
.onnx) and its config file (.onnx.json) from Piper Voices - Create a
tts_config.txtfile pointing to the paths (see Installation section)
This error means "DLL not found". Make sure you have all these files in your piper folder:
espeak-ng.dllespeak-ng-data/folder (with all its contents)onnxruntime.dllonnxruntime_providers_shared.dllpiper_phonemize.dll
Make sure:
- The
.onnx.jsonconfig file exists alongside the.onnxmodel file - Both files have the same base name (e.g.,
piper-model.onnxandpiper-model.onnx.json) - The
espeak-ng-datafolder is present
Make sure you have text selected (highlighted) in the active application before pressing F10. The tool simulates Ctrl+C to copy the selection.
MIT License - see LICENSE for details.
- whisper.cpp - High-performance C/C++ implementation of OpenAI's Whisper
- OpenAI Whisper - Original speech recognition model
- Piper - Fast, local neural text-to-speech system