Expand description
Safe FFI bindings around the Vosk API Speech Recognition Toolkit.
Basic usage:
- Create a
Model - Create a
Recognizerwith that model - Feel audio to the recognizer with
Recognizer::accept_waveform - Get the processed result with
Recognizer::result,Recognizer::partial_resultorRecognizer::final_result
Structs§
- Alternative
- An alternative transcript in a
CompleteResultMultiple. - Batch
Model batch - The same as
Model, but uses a CUDA enabled Nvidia GPU and dynamic batching to enable higher throughput. - Batch
Recognizer batch - The main object which processes data using GPU inferencing. Takes audio as input and returns decoded information as words, confidences, times, and other metadata.
- Complete
Result Multiple - Recognition result if
Recognizer::set_max_alternativesis passed a non-zero value. - Complete
Result Single - Recognition result if
Recognizer::set_max_alternativesis passed a zero (default). - Model
- Model that stores all the data required for recognition.
- Partial
Result - Result returned by
Recognizer::partial_result. The result may change after processing more data as decoding is not yet complete. - Recognizer
- The main object which processes data. Takes audio as input and returns decoded information as words, confidences, times, and other metadata.
- Speaker
Info - Data useful for speaker identification.
- Speaker
Model - The same as
Modelbut contains the data for speaker identification. - Word
- A single word in a
CompleteResultSingleand metadata about it. - Word
InAlternative - A single word in an
Alternativeand metadata about it.
Enums§
- Accept
Waveform Error - Possible errors that accept_waveform methods might return.
- Complete
Result - Different results that can be returned from
Recognizer::resultandRecognizer::final_result. - Decoding
State - State of the decodification after processing a chunk of data.
- LogLevel
- Log level for Kaldi messages.
Functions§
- gpu_
init batch - Init, automatically select a CUDA device and allow multithreading. Must be called once from the main thread.
- gpu_
thread_ init batch - Init CUDA device in a multi-threaded environment. Must be called for each thread.
- set_
log_ level - Set log level for Kaldi messages.