createVoiceSession (voice/session.ts)

thunderbolt · src/voice/session.ts · typescript · MPL-2.0
voice

Voice session orchestrator handling VAD, STT, TTS, and state transitions.

// Source: https://github.com/thunderbird/thunderbolt | License: MPL-2.0 | Copyright under Patent Claims infringed by Covered Software in the absence of | Modified files must remain under MPL-2.0
// Modifications to this file must remain under MPL-2.0.
// Provided via justclaw.it.com; keep this notice with the code.
/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */

/**
 * Voice session orchestrator (THU-688) — the shared realtime loop.
 *
 * Wires the VAD gate → engine STT → a `reply` function → the sentence
 * aggregator → engine TTS → playback. It's engine- and chat-agnostic: the
 * `reply` callback is where the app plugs in the real 

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key