livekit-plugin-parrot-stt
v0.1.0
Published
Ringg Parrot Speech-to-Text plugin for LiveKit Agents (Node.js)
Maintainers
Readme
livekit-plugin-parrot-stt
Ringg Parrot STT plugin for LiveKit Agents (Node.js / TypeScript).
It implements LiveKit's streaming STT interface (stt.STT + stt.SpeechStream)
by speaking Ringg's WebSocket protocol directly, so it drops straight into a
voice.AgentSession like any first-party plugin.
Ringg's official SDK (
ringglabs) is Python-only. This plugin re-implements the same wire protocol in TypeScript.
Install
npm install livekit-plugin-parrot-stt
# peer deps (provided by your agent app):
npm install @livekit/agents @livekit/rtc-nodeUsage
import { voice } from '@livekit/agents';
import * as ringg from 'livekit-plugin-parrot-stt';
const session = new voice.AgentSession({
stt: new ringg.STT({
// reads RINGG_STT_URL / RINGG_STT_API_KEY from the environment by default
language: 'en', // 'hi' | 'en'
}),
// llm, tts, vad, ...
});Standalone (no AgentSession):
import * as ringg from 'livekit-plugin-parrot-stt';
const stt = new ringg.STT({ url: 'wss://.../stt/v1/stream', apiKey: '...', language: 'en' });
const stream = stt.stream();
// push AudioFrames (Int16 PCM), then close the input:
for (const frame of frames) stream.pushFrame(frame);
stream.endInput();
for await (const ev of stream) {
if (ev.type === /* FINAL_TRANSCRIPT */ 2) console.log(ev.alternatives?.[0]?.text);
}Options
| Option | Env | Default | Notes |
| --- | --- | --- | --- |
| url | RINGG_STT_URL | wss://prod-api.ringg.ai/stt/v1/stream | Full WS URL. Confirm exact path with Ringg. |
| apiKey | RINGG_STT_API_KEY | — | Sent inside the start JSON frame (not a header). |
| language | RINGG_STT_LANGUAGE | en | hi | en | … |
| sampleRate | RINGG_STT_SAMPLE_RATE | 16000 | LiveKit audio is resampled to this. |
| encoding | RINGG_STT_ENCODING | int16 | int16 | linear16 | float32 | int32 |
| mode | RINGG_STT_MODE | stream | stream = interim+final; on_final = finals only. |
| enableCapPunc | — | true | Request capitalisation/punctuation. |
| vadTailSilMs | — | 200 | Server-VAD trailing silence. |
| vadConfidence | — | 0.55 | Server-VAD threshold. |
| keepaliveIntervalMs | — | 30000 | JSON ping keepalive (0 disables). |
How it maps to LiveKit
- Connect → send JSON
start(auth =api_key) → wait forready. - Stream raw binary PCM16 LE mono frames (20 ms chunks).
- Ringg
transcriptevents →INTERIM_TRANSCRIPT(is_final:false) /FINAL_TRANSCRIPT(is_final:true). START_OF_SPEECH/END_OF_SPEECHare synthesised around transcript activity.- Endpointing uses Ringg's server-side VAD (
mode:"stream"), which is the clean analog of the Pipecat integration through LiveKit's audio-only STT interface.
License
Apache-2.0
