sh <(curl -L https://nixos.org/nix/install) --daemonnix run github:back2nix/speaker- or
git clone https://github.com/back2nix/speaker
cd speaker
nix run .- or
git clone https://github.com/back2nix/speaker
cd speaker
nix develop
make run- or
git clone https://github.com/back2nix/speaker
cd speaker
nix build .
result/bin/speaker
# sudo result/bin/keylogger # run in a separate terminal if you're on Wayland instead of X11- Copy text in a foreign language — the app will read it aloud in Russian.
The application uses a config.yaml file for customization. If no config file is found, default values are used.
Create a config.yaml file in the application directory:
Speech:
# Default action when copying text (Ctrl+C)
# "Translate" - speak translation (default behavior)
# "Original" - speak original text
# "RussianOnly" - speak only Russian text
# Ctrl+Z always performs the opposite action
DefaultOutput: "RussianOnly"
En:
Speed: 3 # English speech speed
Half: 2 # English speech pitch adjustment
Ru:
Speed: 6 # Russian speech speed
Half: 2 # Russian speech pitch adjustment
Input:
Device: /dev/input/event1 # Input device for hotkeys
Listen: ":3111" # Port for server.go
Hotkeys:
Translate: "Ctrl+C" # Copy and translate
TranslateOral: "Ctrl+Z" # Repeat last in opposite language
ToggleReadMode: "Alt+F" # Toggle read/translate mode
TogglePause: "Ctrl+Alt+P" # Pause/resume
StopSound: "Alt+C" # Stop current playback
ToggleCopyBuffer: "Alt+V" # Auto-translate Russian → English
Sounds:
Start: "sound/interface-soft-click-131438.mp3"
Processing: "sound/computer-processing.mp3"
Click: "sound/slide-click-92152.mp3"- DefaultOutput: Controls default behavior when copying text
"Translate": Always translate and speak translation"Original": Always speak original text"RussianOnly": Only speak if text is in Russian
- Speed: Speech rate (1-10, higher = faster)
- Half: Pitch adjustment for voice
- Device: Path to input device for hotkey detection
- Listen: Server listening port
- Hotkeys: Customizable key combinations (supports Ctrl, Alt, Shift modifiers)
- Start: Sound played when application starts
- Processing: Sound during text processing
- Click: UI interaction sound
If no config file exists, the application uses these defaults:
- Default output: Translate mode
- English: Speed 3, Half 2
- Russian: Speed 7, Half 2
- Standard hotkey mappings as shown in the table below
| Hotkey | Function |
|---|---|
Ctrl+C |
Copy |
Ctrl+Shift+C |
Copy and read in English |
Alt+C (×2) |
Stop and clear buffer |
| Hotkey | Function |
|---|---|
Ctrl+Z |
Repeat last in English |
Alt+V |
Auto-translate Russian → English |
| Hotkey | Function |
|---|---|
Ctrl+F |
Toggle read/translate mode |
Ctrl+Alt+P |
Pause |
Alt+C |
Stop reading |
echo $WAYLAND_DISPLAY