How yinglianchun/voice-mcp works
voice-mcp is a Cloudflare Worker offering MCP text-to-speech plus HTTP synthesis and playback interfaces. Its main workflow is an assistant calling speak, provider-specific synthesis producing audio, and the MCP result being made available to the visualizer as the latest voice event. The README documents additional direct-speech, status, history, caption, and player capabilities. The implementation is concentrated in src/index.ts; excerpts are partial, so links rely on the README where code-level call ownership is not visible.
Main entry points: index.ts TTS dispatch
Components 15
Client interfaces
- MCP speak tool
src/index.ts - HTTP speak routes
src/index.ts - Inline audio player
src/index.ts
Speech synthesis
- TTS dispatch
src/index.ts - DashScope TTS
src/index.ts - ElevenLabs TTS
src/index.ts - Style and tag handling
src/index.ts
Playback and events
- Latest voice event
src/index.ts - Latest event route
src/index.ts - Visualizer panel
src/index.ts - Captions and download
src/index.ts
Status and history
- Status endpoint
src/index.ts - History endpoint
src/index.ts - ElevenLabs history
Other components
- AI assistant
Connections 15
- AI assistant → MCP speak tool: calls
README.md - MCP speak tool → TTS dispatch: requests speech
README.md - HTTP speak routes → TTS dispatch: requests speech
README.md - TTS dispatch → DashScope TTS: dispatches to
README.md - TTS dispatch → ElevenLabs TTS: dispatches to
README.md - TTS dispatch → Style and tag handling: processes tags
README.md - DashScope TTS → Inline audio player: returns audio
README.md - ElevenLabs TTS → Inline audio player: returns audio
README.md - MCP speak tool → Latest voice event: stores event
README.md - Visualizer panel → Latest event route: polls
src/index.ts - Latest event route → Latest voice event: reads event
src/index.ts - Visualizer panel → Status endpoint: loads status
src/index.ts - Visualizer panel → Captions and download: shows and downloads
README.md - Visualizer panel → History endpoint: loads history
README.md - History endpoint → ElevenLabs history: fetches item
README.md