sprec(1)

πŸ“¦ version 0.1, in alpine 3.24

okay bestie, this is sprec(1) from the General Commands Manual β€” literally the speech recognition command, and we’re gonna get you fluent in it. πŸ’–βœ¨

πŸŽ€ NAME πŸŽ€

sprec β€” speech recognition command. that’s the whole name, no cap.

πŸ¦‹ SYNOPSIS πŸ¦‹

the whole vibe is:

sprec [OPTIONS] < audio

🌸 DESCRIPTION 🌸

sprec reads audio from stdin and prints speech recognition results. that’s it, that’s the main character energy. πŸ‘‘

πŸ’… OPTIONS πŸ’…

  • --alts=NUM β€” specify the max number of alternative results. plural results, okay? the little buffet is real. πŸ“
  • -h, --help β€” print help and exit. your cute little escape hatch. 🫢
  • --partial β€” also print intermediate results. yes, the in-progress tea. β˜•
  • --phrase-file=FILE β€” limit the vocab to phrases in a file. the phrases are split at whitespace unless quoted "like this". if the special phrase [unk] is included, it will be given for unrecognized words instead of the best match. so quotey quotes matter, bestie. πŸ™ˆ
  • --version β€” print the version and exit. cute. πŸ’œ

🧚 MODEL 🧚

the speech recognition model can be specified with the SPREC_MODEL environment variable β€” that’s the move. the default is /usr/share/vosk-models/small-en-us. sprec should work well with possibly all of the *-small and *-lgraph models from https://alphacephei.com/vosk/models. like, that’s the β€œpossibly all” vibe, bestie. 🌈

πŸ”₯ AUDIO πŸ”₯

the correct audio format depends on the model, but possibly all the Vosk models like WAVE 16000Hz Mono, which you can record with:

arecord -q -fS16_LE -c1 -r16000

so vibe check your format first, okay? πŸ’€

⭐ EXAMPLES ⭐

print realtime speech recognition results:

arecord -q -fS16_LE -c1 -r16000 -D sysdefault:CARD=Microphone | spec

see the sprec_type script for an example that types out the results (https://git.sr.ht/~geb/sprec/examples/sprec_type). that’s the typing-out-results demo, iykyk. πŸŽ€

πŸ‘‘ AUTHOR πŸ‘‘

John Gebbie. icon. πŸ’…


πŸŽ€ final footer energy: source/version sprec(1), dated 2026-10-14. that’s the cute sign-off, bestie, bye! πŸ’–πŸ«Ά

πŸ“¦ where this page comes from