tangzheng202202/dsh-voice-live
tangzheng202202★ 0TypeScript最后同步: 2026-08-16
—
README 摘要
@deepseek-ai/dsh-client-ui-voice-live English 中文 Real-time voice interaction for DSH: press the composer mic, speak, and the assistant replies aloud. The package ships two halves: - Host half registers the /voice WebSocket upgrade route inside the DSH host process. One connection carries a session that feeds microphone PCM to Volcengine streaming ASR (bigmodel async with server-side VAD endpointing) and streams assistant reply text to Volcengine streaming TTS (seed-tts-2.0). The upgrade is gated by a loopback-Host + same-origin trust fence; every async operation has one lifecycle owner, audio flows through a bounded queue, and TTS is a single serial worker. - Client half renders the composer mic control ( conversation.input.left ) and the Voice settings section ( settings.section ). A per-session VoiceController state machine owns all resources — AudioCapture (MediaStream/AudioContext/AudioWorklet), VoiceTransport (WebSocket) and PlaybackQueue (audio) — and rejects stale/late messages by generation. The API key is read from process.env.VOLCENGINE API KEY on the host; the browser never holds or transmits a key. Interaction model - Tap the mic to start. While active the button render…
在 GitHub 查看完整 README →