A lightweight offline voice assistant for Linux, written in C++ using Vosk.
Speech recognition is performed locally, without cloud services. User commands are defined using regular shell scripts, so the assistant can be extended without modifying the source code.
English version | Русская версия
For running:
For building additionally:
Installation script:
curl -fsSL https://raw.githubusercontent.com/I-layder-I/voice-assistant/main/install.sh | bash
After installation:
voice-assistant --help
git clone https://github.com/I-layder-I/voice-assistant.git
cd voice-assistant
On Arch Linux, dependencies can be installed with:
sudo pacman -S base-devel alsa-lib icu vosk cli11
Then build:
g++ voice-assistant.cpp \
-o build/voice-assistant \
-std=c++23 \
-lasound \
-pthread \
-lvosk \
-licuuc
Commands are located in:
~/.config/voice-assistant/commands/
Models can be downloaded from the official Vosk page.
en
or:
ru
~/.local/share/voice-assistant/models/
For example:
~/.local/share/voice-assistant/models/
└── en/
Then:
voice-assistant --language en
Commands are regular shell scripts.
Example:
#!/bin/bash
# WORDS: open browser, run browser
firefox
File:
~/.config/voice-assistant/commands/browser.sh
The assistant will find the command using the specified keywords and execute the corresponding script.
Two matching modes are supported:
voice-assistant --matching exact
voice-assistant --matching substring
A detailed description of the command format, WORDS, matching, and other features can be found in the documentation.
Main options:
| Option | Description |
|---|---|
-m, --model | Path to the Vosk model |
-c, --commands | Path to the commands directory |
-r, --sample-rate | Sample rate |
--language | Recognition language |
--stdin | Process text through stdin |
--matching | Command matching mode |
--vosk-debug | Vosk debug output |
Full list:
voice-assistant --help
If the program was installed using the installation script:
curl -fsSL https://raw.githubusercontent.com/I-layder-I/voice-assistant/main/uninstall.sh | bash
User models and commands are removed separately.
The project is distributed under the MIT license.
The full license text is available in the LICENSE file.
A lightweight offline voice assistant for Linux, written in C++ using Vosk.
Speech recognition is performed locally, without cloud services. User commands are defined using regular shell scripts, so the assistant can be extended without modifying the source code.
English version | Русская версия
For running:
For building additionally:
Installation script:
curl -fsSL https://raw.githubusercontent.com/I-layder-I/voice-assistant/main/install.sh | bash
After installation:
voice-assistant --help
git clone https://github.com/I-layder-I/voice-assistant.git
cd voice-assistant
On Arch Linux, dependencies can be installed with:
sudo pacman -S base-devel alsa-lib icu vosk cli11
Then build:
g++ voice-assistant.cpp \
-o build/voice-assistant \
-std=c++23 \
-lasound \
-pthread \
-lvosk \
-licuuc
Commands are located in:
~/.config/voice-assistant/commands/
Models can be downloaded from the official Vosk page.
en
or:
ru
~/.local/share/voice-assistant/models/
For example:
~/.local/share/voice-assistant/models/
└── en/
Then:
voice-assistant --language en
Commands are regular shell scripts.
Example:
#!/bin/bash
# WORDS: open browser, run browser
firefox
File:
~/.config/voice-assistant/commands/browser.sh
The assistant will find the command using the specified keywords and execute the corresponding script.
Two matching modes are supported:
voice-assistant --matching exact
voice-assistant --matching substring
A detailed description of the command format, WORDS, matching, and other features can be found in the documentation.
Main options:
| Option | Description |
|---|---|
-m, --model | Path to the Vosk model |
-c, --commands | Path to the commands directory |
-r, --sample-rate | Sample rate |
--language | Recognition language |
--stdin | Process text through stdin |
--matching | Command matching mode |
--vosk-debug | Vosk debug output |
Full list:
voice-assistant --help
If the program was installed using the installation script:
curl -fsSL https://raw.githubusercontent.com/I-layder-I/voice-assistant/main/uninstall.sh | bash
User models and commands are removed separately.
The project is distributed under the MIT license.
The full license text is available in the LICENSE file.