[go: up one dir, main page]

Skip to content

wzhd/vosk-rs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Vosk

Vosk is a speech recognition toolkit with state-of-the-art accuracy and low latency. It runs locally and recognises each word as it is uttered without waiting for the end of a sentence.

Usage

Get (or train) a model. There are trained models for 16 languages ready for downloading.

Load the model from disk.

let model = Model::new("path_to_model_directory").unwrap();

Create a recognizer object, set the sample rate of audio data.

let mut recognizer = Recognizer::new(&model, 16000.0);

Feed 16-bit audio data as an i16 slice.

recognizer.accept_waveform(input);

Use recognizer.partial_result() to get the words being uttered. Use recognizer.result() to get completed sentences and additional information such as timing and confidence scores.

Dependency

Build vosk-sys.