How piyushgarg-dev/stt-tts-pipeline-cohort works
A small browser-based voice assistant: it transcribes user speech, streams sentence-sized responses from OpenAI, and synthesizes and plays them aloud. Microphone-level barge-in interrupts playback. The only source file is script.js; index.html is present in the tree but its contents were not sampled, so page wiring is omitted.
Main entry points: script.js Playback queue
Components 10
Conversation
- Voice assistant
script.js - Streaming response
script.js - Text response
script.js
Audio
- Speech recognition
script.js - Barge-in monitor
script.js - Playback queue
script.js
Other components
- User
- Browser APIs
- OpenAI Responses API
- OpenAI speech API
Connections 12
- User → Speech recognition: speaks
- Voice assistant → Speech recognition: starts
- Speech recognition → Voice assistant: transcribes
- Voice assistant → Streaming response: requests
- Streaming response → OpenAI Responses API: streams from
- Voice assistant → Playback queue: speaks chunks
- Playback queue → OpenAI speech API: requests audio
- OpenAI speech API → Playback queue: returns audio
- Playback queue → Browser APIs: plays audio
- User → Barge-in monitor: speaks
- Barge-in monitor → Browser APIs: reads microphone
- Barge-in monitor → Playback queue: interrupts