Speak naturally. Type instantly.
Features • Installation • Usage • Models • Architecture
┌─────────────────────────────────┐
│ 🎙 Recording... │
│ ▁▂▃▅▆▇█▇▆▅▃▂▁▂▃▅▆▇█▇▆▅ │
│ 0:03 │
└─────────────────────────────────┘
⬇️ Press hotkey
┌─────────────────────────────────┐
│ 📝 Result │
│ ┌───────────────────────────┐ │
│ │ Ваш распознанный текст │ │
│ │ появится здесь │ │
│ └───────────────────────────┘ │
│ [Вставить] [Копировать] │
└─────────────────────────────────┘
Press hotkey → Speak → Text appears in any application
Most voice input solutions are either cloud-based (privacy concerns), require complex setup, or don't integrate with the desktop. Shofar is different:
| Problem | Shofar Solution |
|---|---|
| 🔐 Privacy concerns | 100% Offline — voice never leaves your machine |
| 📦 Complex dependencies | Single Binary — no Python, Docker, or npm |
| 🖥️ Limited integration | System-wide — works in any app, any text field |
| ⚡ Speed vs accuracy trade-off | Hot-swap Models — switch engines on the fly |
|
|
|
|
curl -fsSL https://raw.githubusercontent.com/RooTooZ/shofar/master/install.sh | shOr download from Releases.
🐧 Arch Linux
sudo pacman -S portaudio libayatana-appindicator gtk3 pkg-config cmake xdotoolFor Wayland:
sudo pacman -S wtype🐧 Ubuntu / Debian
sudo apt install gcc pkg-config cmake xdotool \
libportaudio2 portaudio19-dev \
libayatana-appindicator3-dev libgtk-3-dev \
libwayland-dev libx11-dev libx11-xcb-dev \
libxkbcommon-x11-dev libgles2-mesa-dev \
libegl1-mesa-dev libffi-dev libxcursor-dev libvulkan-devFor Wayland:
sudo apt install wtype🍎 macOS
brew install portaudio pkg-config cmake🪟 Windows
Requires:
- MinGW-w64 or MSYS2
- CMake
- PortAudio
# Using MSYS2
pacman -S mingw-w64-x86_64-portaudio mingw-w64-x86_64-cmakegit clone https://github.com/RooTooZ/shofar.git
cd shofar
# Build everything (whisper.cpp + llama.cpp + binary)
make all
# Install to ~/.local/bin
make installModels download automatically via Settings UI, or:
make download-model-tiny # 75 MB — fast
make download-model-small # 466 MB — balanced
make download-model-turbo # 574 MB — best qualityshofar # or ./bin/shofar| Step | Action |
|---|---|
| 1 | Press Ctrl+Shift+Space |
| 2 | 🎙️ Speak while window is visible |
| 3 | Press hotkey again to stop |
| 4 | ✏️ Edit text if needed |
| 5 | Enter = insert, Esc = cancel |
| Key | Action |
|---|---|
Ctrl+Shift+Space |
Start / Stop recording |
Enter |
Insert text into active window |
Esc |
Cancel and close |
Right-click tray icon for:
- ⚙️ Settings — models, hotkey, language
- 🔔 Notifications — toggle on/off
- ❌ Quit
| Engine | Model | Size | Speed | Accuracy | Best For |
|---|---|---|---|---|---|
| Whisper | tiny |
75 MB | ⚡⚡⚡ | ★★☆☆ | Quick commands |
| Whisper | small |
466 MB | ⚡⚡ | ★★★☆ | Daily use |
| Whisper | turbo |
574 MB | ⚡ | ★★★★ | Documents |
| Vosk | small-ru |
45 MB | ⚡⚡⚡⚡ | ★★☆☆ | Real-time |
| Model | Size | Description |
|---|---|---|
| Qwen2.5-1.5B | 1.1 GB | Fixes punctuation & typos |
┌─────────────────────────────────────────────────────────────────┐
│ SHOFAR │
├─────────────────────────────────────────────────────────────────┤
│ │
│ ┌──────────┐ ┌──────────┐ ┌──────────┐ ┌──────────┐ │
│ │ Hotkey │ -> │ Audio │ -> │ Speech │ -> │ Input │ │
│ │ Handler │ │ Recorder │ │ Engine │ │ Emulator │ │
│ └──────────┘ └──────────┘ └──────────┘ └──────────┘ │
│ │ │ │
│ v v │
│ ┌──────────┐ ┌──────────┐ │
│ │ Tray │ │ LLM │ │
│ │ Icon │ │ Corrector│ │
│ └──────────┘ └──────────┘ │
│ │
├─────────────────────────────────────────────────────────────────┤
│ whisper.cpp │ llama.cpp │ vosk-api │ PortAudio │ Gio │
└─────────────────────────────────────────────────────────────────┘
shofar/
├── cmd/shofar/ # Entry point
├── internal/
│ ├── app/ # Main coordinator
│ ├── audio/ # PortAudio recording
│ ├── speech/ # Engine factory (Whisper/Vosk)
│ ├── llm/ # LLM text correction
│ ├── hotkey/ # Global hotkey
│ ├── tray/ # System tray
│ ├── waveform/ # Recording UI
│ ├── settings/ # Settings UI
│ ├── input/ # xdotool/wtype wrapper
│ └── i18n/ # Translations
└── third_party/ # whisper.cpp, llama.cpp, vosk
| Component | Technology |
|---|---|
| Language | Go 1.21+ (CGO) |
| Speech | whisper.cpp, Vosk |
| LLM | llama.cpp |
| Audio | PortAudio |
| GUI | Gio |
| Tray | systray |
| Text Input | xdotool (X11) / wtype (Wayland) / CGEventPost (macOS) / SendInput (Windows) |
Config stored at ~/.local/bin/config.json:
{
"model_id": "whisper-small",
"language": "ru",
"hotkey": { "key": "Space", "modifiers": ["Ctrl", "Shift"] },
"llm_enabled": false,
"notifications": true
}make whisper-lib # Build whisper.cpp
make llama-lib # Build llama.cpp
make build # Build application
make run # Run for testing
make clean # Clean artifacts- Fork the repository
- Create feature branch (
git checkout -b feature/amazing) - Commit changes (
git commit -m 'Add amazing feature') - Push branch (
git push origin feature/amazing) - Open Pull Request
MIT License — use freely, attribution appreciated.