tazz4843 / coqui-stt

Safe wrapper around the Coqui STT C library
108 stars 9 forks source link

coqui-stt

NOTICE

The upstream project is now unmaintained, and they recommend switching to Whisper or another STT service. I have written bindings for whisper.cpp as well, and you can find those over at https://github.com/tazz4843/whisper-rs.

Docs: https://docs.rs/coqui-stt/latest/coqui_stt

crates.io: https://crates.io/crates/coqui-stt

Github: https://github.com/tazz4843/coqui-stt

A simple, yet feature-filled wrapper around the coqui-stt C API.

Handles all low-level things for you. All you need to worry about is passing in a valid model, optionally scorer, and audio.

If you'd like to, audio streaming is supported with the Stream class.

You can gain extended metadata about an audio result with the Metadata class.

Some hidden functions are also exposed in the Rust API with #[doc(hidden)].

On Windows

Compiling your code

The Coqui-STT C libraries need to be discoverable by the rust linker. For that, you can do either of the following:

Running your code

The libraries also have to be discoverable by the executable. If you followed the first option in the previous section, it will run with no extra effort; otherwise, you will need to copy the libraries to your current working directory (target/<profile name> by default). It is recommended that you use a tool such as cargo-make to automate this.

On Linux

Compiling your code

As for Windows, the libraries need to be discoverable by the rust linker. You have a couple of options:

Running your code

Just like with Windows, the libraries need to be discoverable by the executable. Static linking is not possible.

MSRV

The MSRV is always the latest stable version, currently 1.58.1 (2022-01-20) as of this writing.