How junarch/voice_for_dsh works
voice-for-dsh adds automatic or manual spoken playback to DSH conversations. The main path is a user action or completed assistant turn in the client, host-side transcript generation and speech cleanup, then audio synthesis and playback. The host also supports browser speech, Volcengine streaming, local Kokoro with downloadable models, and configurable chimes. The host excerpt and SOURCE INDEX establish several internal module relationships; broader feature links below are documented in the README, while unsampled implementation details are not inferred.
Main entry points: index.js Host plugin · model-installer.js Model installer · client.js Conversation client · volcengine-ws.js Volcengine TTS
Components 18
Conversation and controls
- Conversation client
packages/voice-for-dsh/lib/client.js
Speech orchestration
- Host plugin
packages/voice-for-dsh/lib/index.js - LLM transcription
packages/voice-for-dsh/lib/index.js - Transcript cache
packages/voice-for-dsh/lib/index.js - Speech cleanup
packages/voice-for-dsh/lib/speech-clean.js - Audio delivery
packages/voice-for-dsh/lib/index.js - Local chimes
packages/voice-for-dsh/lib/index.js
Speech engines
- Browser TTS
packages/voice-for-dsh/lib/client.js - Volcengine TTS
packages/voice-for-dsh/lib/volcengine-ws.js - Kokoro runtime
packages/voice-for-dsh/lib/local-runtime.js - Voice compatibility
packages/voice-for-dsh/lib/voice-compat.js
Local model lifecycle
- Runtime pool
packages/voice-for-dsh/lib/runtime-pool.js - Model installer
packages/voice-for-dsh/lib/model-installer.js - Model manifest
packages/voice-for-dsh/lib/model-manifest.js
Other components
- DSH user
- Model download source
- Volcengine service
- Configured LLM
Connections 20
- DSH user → Conversation client: uses
README.md - Conversation client → Host plugin: requests speech
README.md - Host plugin → LLM transcription: generates transcript
README.md - LLM transcription → Configured LLM: calls
README.md - Host plugin → Transcript cache: caches transcripts
packages/voice-for-dsh/lib/index.js - Host plugin → Speech cleanup: cleans text
packages/voice-for-dsh/lib/index.js - Host plugin → Browser TTS: uses fallback
README.md - Host plugin → Volcengine TTS: streams speech
packages/voice-for-dsh/lib/index.js - Volcengine TTS → Volcengine service: sends audio requests
README.md - Host plugin → Kokoro runtime: synthesizes locally
packages/voice-for-dsh/lib/index.js - Host plugin → Voice compatibility: normalizes config
packages/voice-for-dsh/lib/index.js - Host plugin → Audio delivery: stores audio segments
packages/voice-for-dsh/lib/index.js - Audio delivery → Conversation client: serves audio
README.md - Conversation client → Browser TTS: plays speech
README.md - Host plugin → Local chimes: stores sound assets
packages/voice-for-dsh/lib/index.js - Host plugin → Runtime pool: acquires runtime
packages/voice-for-dsh/lib/index.js - Host plugin → Model installer: manages model
packages/voice-for-dsh/lib/index.js - Model installer → Model manifest: reads manifest
packages/voice-for-dsh/lib/model-installer.js - Model installer → Kokoro runtime: prepares model
packages/voice-for-dsh/lib/model-installer.js - Model installer → Model download source: downloads model
README.md