STT (Silero VAD + Whisper via sherpa-onnx), Chatterbox TTS HTTP server, query completeness classifier (Ollama), multi-voice demo scripts, and planning docs. Kept as reference; clean rewrite planned in separate repos. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
23 lines
500 B
JavaScript
23 lines
500 B
JavaScript
/**
|
|
* Listen with Whisper and print transcribed text to stdout.
|
|
*
|
|
* Usage:
|
|
* node listen.mjs
|
|
* node listen.mjs small.en
|
|
* node listen.mjs large-v3-turbo
|
|
*/
|
|
|
|
import { Stt } from './lib/stt.mjs'
|
|
|
|
const whisper_name = process.argv[2] ?? 'base.en'
|
|
|
|
const stt = new Stt({ whisper_name })
|
|
stt.init()
|
|
|
|
process.stderr.write(`[listen] whisper model: ${whisper_name}\n`)
|
|
process.stderr.write(`[listen] listening — Ctrl+C to stop\n`)
|
|
|
|
stt.listen((text) => {
|
|
process.stdout.write(text + '\n')
|
|
})
|