Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/NickTikhonov/shuo
/ types & classes
Types & classes
33 in github.com/NickTikhonov/shuo
⨍
Functions
148
◇
Types & classes
33
↳
Endpoints
5
↓ 11 callers
Class
FluxEndOfTurnEvent
Deepgram Flux detected user finished speaking.
shuo/types.py:65
↓ 7 callers
Class
AgentTurnDoneEvent
Agent finished speaking (playback complete).
shuo/types.py:71
↓ 6 callers
Class
FluxStartOfTurnEvent
Deepgram Flux detected user started speaking (barge-in).
shuo/types.py:59
↓ 6 callers
Class
MediaEvent
Audio data received from Twilio.
shuo/types.py:53
↓ 6 callers
Class
ServiceLogger
Logger for individual services (Flux, LLM, TTS, Player, Agent).
shuo/log.py:253
↓ 5 callers
Class
AppState
Application state -- just routing information. Conversation history is owned by Agent, not tracked here.
shuo/types.py:26
↓ 5 callers
Class
StreamStopEvent
Twilio stream ended.
shuo/types.py:47
↓ 4 callers
Class
StreamStartEvent
Twilio stream started.
shuo/types.py:41
↓ 2 callers
Class
ResetAgentTurnAction
Cancel agent response and clear Twilio buffer.
shuo/types.py:100
↓ 2 callers
Class
TTSService
ElevenLabs streaming TTS service. Sends text chunks, receives audio chunks via callback. Audio is returned as base64-encoded mulaw a
shuo/services/tts.py:18
↓ 1 callers
Class
Agent
Self-contained agent response pipeline. LLM is persistent (keeps conversation history across turns). TTS connections come from TTSPool (
shuo/agent.py:34
↓ 1 callers
Class
AudioPlayer
Streams audio to Twilio at the correct rate. Features: - Independent playback loop (not affected by incoming messages) - Can be
shuo/services/player.py:19
↓ 1 callers
Class
ColorFormatter
Custom formatter with colors and clean timestamp.
shuo/log.py:67
↓ 1 callers
Class
FeedFluxAction
Send audio to Deepgram Flux.
shuo/types.py:88
↓ 1 callers
Class
FluxService
Deepgram Flux streaming service. Audio format: mulaw 8kHz (direct from Twilio, no conversion needed). Turn events: StartOfTurn (barge-in
shuo/services/flux.py:21
↓ 1 callers
Class
LLMService
OpenAI streaming LLM service. Manages conversation history and streams tokens via callback.
shuo/services/llm.py:18
↓ 1 callers
Class
Logger
Unified logger for shuo. Class methods -- lifecycle events (server, call, websocket, stream) Instance methods -- event/action/transitio
shuo/log.py:104
↓ 1 callers
Class
Marker
A named point-in-time within a turn.
shuo/tracer.py:38
↓ 1 callers
Class
Span
A named time range within a turn.
shuo/tracer.py:30
↓ 1 callers
Class
StartAgentTurnAction
Start agent response pipeline.
shuo/types.py:94
↓ 1 callers
Class
TTSPool
Connection pool for ElevenLabs TTS WebSockets. - Pre-connects `pool_size` connections at startup - Dispenses warm connections via get()
shuo/services/tts_pool.py:45
↓ 1 callers
Class
Tracer
Records spans and markers for each agent turn. All timestamps are stored as milliseconds relative to the turn's t0.
shuo/tracer.py:55
↓ 1 callers
Class
Turn
All trace data for a single agent turn.
shuo/tracer.py:45
↓ 1 callers
Class
_Entry
A pooled TTS connection with its creation timestamp.
shuo/services/tts_pool.py:39
Class
C
ANSI color codes.
shuo/log.py:29
Class
Phase
Current phase of the conversation.
shuo/types.py:19
Class
TestAgentTurnDone
tests/test_update.py:171
Class
TestCompleteFlow
tests/test_update.py:194
Class
TestEdgeCases
tests/test_update.py:276
Class
TestFluxEndOfTurn
tests/test_update.py:118
Class
TestFluxStartOfTurn
tests/test_update.py:147
Class
TestMediaRouting
tests/test_update.py:87
Class
TestStreamLifecycle
tests/test_update.py:47