Live microphone speech to text using vosk
Find a file
2025-09-10 17:03:49 -07:00
src mv root -> stt 2025-09-10 17:03:49 -07:00
.gitignore AI generated first pass 2025-09-09 10:15:16 -07:00
.mise.toml working sample without nix needed 2025-09-09 19:02:07 -07:00
.pre-commit-config.yaml add structural aspects to repo 2025-09-09 14:08:57 -07:00
alsa.conf add alsa.conf, remove flake 2025-09-09 19:03:24 -07:00
build.zig mv root -> stt 2025-09-10 17:03:49 -07:00
build.zig.zon support linux arm64, riscv64, and x86_64 2025-09-09 20:14:49 -07:00
LICENSE AI generated first pass 2025-09-09 10:15:16 -07:00
README.md working sample without nix needed 2025-09-09 19:02:07 -07:00

Real-time Speech Recognition with Vosk and Zig

This project implements a minimal real-time speech-to-text application using Vosk and Zig.

Prerequisites

  • Zig 0.15.1 (configured via mise)
  • Nix development environment configured for ALSA, and audio libraries

Vosk Model Download

The application uses the Vosk small English model for speech recognition:

Installation Steps

  1. Enter nix development environment: nix develop
  2. Build application: zig build
  3. Run: zig build run

Usage

The application will:

  • Initialize audio capture from default microphone
  • Load the Vosk speech recognition model
  • Process audio in real-time
  • Output recognized text to terminal
  • Exit on Ctrl+C

Dependencies

  • Vosk C API library
  • ALSA for audio capture

Notes

Vosk tends to recognize "light" as lake or like