1
1
Fork
You've already forked stt-service
0
Speech-to-text service that runs STT independently of the bot
  • Rust 100%
Find a file
2026年03月28日 20:09:45 -07:00
.cargo Add -Ctarget-cpu=native 2025年12月21日 12:16:21 -08:00
.idea Initial commit 2022年07月03日 20:46:05 -06:00
stt_testing Fix compile errors 2026年03月17日 01:08:48 -07:00
stts_config Update documentation after config update 2025年09月11日 16:22:04 -07:00
stts_connection_handler cargo update 2025年12月21日 12:20:22 -08:00
stts_core Add hardened_malloc to STT service 2026年02月13日 17:30:35 -08:00
stts_speech_to_text Fix bad comment 2025年12月21日 12:16:41 -08:00
stts_system_manager Migrate to unified workspace 2025年09月01日 20:11:13 -07:00
util Add WorkingDirectory option 2025年09月11日 17:05:40 -07:00
.deepsource.toml Add .deepsource.toml 2022年09月13日 21:53:34 +00:00
.gitignore Update documentation after config update 2025年09月11日 16:22:04 -07:00
2830-3980-0043.wav add example audio file 2022年07月04日 00:00:11 -06:00
Cargo.lock cargo update 2026年03月28日 20:09:45 -07:00
Cargo.toml Add hardened_malloc to STT service 2026年02月13日 17:30:35 -08:00
config.example.toml Update documentation after config update 2025年09月11日 16:22:04 -07:00
LICENSE add LICENSE 2022年07月04日 22:55:08 -06:00
README.md Update documentation after config update 2025年09月11日 16:22:04 -07:00
rustfmt.toml Rewrite STT service to use scripty-common models 2023年12月07日 16:58:08 -07:00

stt-service

The Scripty STT service is a simple server that handles remote audio transcription.

Building

Run RUSTFLAGS="-Ctarget-cpu=native" cargo build --release if you're fine with running exclusively on CPU. Scripty runs on CPU only in production on a Ryzen 7 7700X, modern Ryzen CPUs are incredibly powerful with AVX512 (that's what the RUSTFLAGS option adds).

The STT service also supports some GPU acceleration. Poke through Cargo.toml here at the root and look under the features section. To enable them, either add them to the default array, or run the build command with --features opencl appended, substituting opencl for whatever you want.

Running

Scripty's STT service is designed to integrate with systemd. Docker is possible but we offer limited support for it, and you have to figure that out yourself. These official steps will use systemd.

Copy target/release/scripty_stt_service to /usr/local/bin.

Grab a STT model from https://github.com/ggml-org/whisper.cpp/blob/master/models/README.md. Scripty uses base in production, and it runs about 4x faster than real time on a Ryzen 7 7700X. You can likely get away with only a .en model if you don't need multilingual transcription, but this is untested (we'll still support it if you run into issues!). You should place this model in /usr/share/whisper-models (if you put it somewhere else, modify ReadOnlyPaths in the .service file to point to where the model is).

While you're there, also grab a VAD model: https://huggingface.co/ggml-org/whisper-vad/blob/main/ggml-silero-v5.1.2.bin and put it in the same directory.

Copy config.example.toml to /etc/scripty-stt-service/config.toml, and edit usage.max_concurrency as desired. If you've picked a different path for your models, be sure to specify that there too.

Copy util/scripty-stt-service.service and util/scripty-stt-service.socket to /etc/systemd/system. If port 7269 is already bound on your system, edit scripty-stt-service.socket to change the listen port. To actually start it listening, run sudo systemctl enable --now scripty-stt-service.socket.

You can use the testing binary in stt_testing/ to test your setup. Run the following from the same directory as this README:

cd stt_testing/
cargo build --release
./target/release/stt_testing ../2830-3980-0043.wav

If this succeeds without error, and you get a result of "Experience proves this.", your setup is working! Continue onwards to setting up Scripty.