How romantrnt/mishka-s2s works
Mishka is an interactive voice assistant for a physical stand, with child-facing conversation, games, stories, safety policies, and lighting. The main workflow is an interaction handled by the application layer, which coordinates canonical state transitions and dialogue/audio services, then produces effects such as speech or lighting. The source index supports several module relationships, but the excerpts do not show the full runtime wiring or API entry path; uncertain links are omitted.
Main entry points: application.py Application · canonical_services.py Canonical services · s2s.py Speech dialogue · guard.py Safety guard
Components 24
Runtime and interfaces
- HTTP API
app/foundation/api.py - Application
app/foundation/application.py - Canonical runtime
app/foundation/canonical_contract.py - Transition authorization
app/scenarios/canonical_graph.py
Dialogue and audio
- Speech dialogue
app/foundation/s2s.py - Voice processing
app/foundation/voice_pipeline.py - TTS engine
app/foundation/tts_engine.py
Experiences and policies
- Age policy
app/foundation/age_policy.py - Game engine
app/foundation/game_engine.py - Game content
app/foundation/game_content.py - Scene menus
app/foundation/scene_menus.py - Menu content
app/foundation/menu_content.py - Canonical services
app/foundation/canonical_services.py - Schedule and weather
app/foundation/schedule_weather.py
Safety
- Input safety
app/foundation/input_safety.py - Safety guard
app/safety/guard.py - Input filter
app/safety/input_filter.py - Output filter
app/safety/output_filter.py - Fallback phrases
app/safety/fallback.py
Hardware and operations
- Lighting
app/foundation/lighting.py - Hardware adapter
app/foundation/hardware.py - Latency metrics
app/metrics/latency.py
Other components
- Child
- Chat model service
Connections 24
- Child → Application: sends interaction
- Application → Canonical runtime: handles events
app/foundation/application.py - Application → Speech dialogue: coordinates dialogue
app/foundation/application.py - Application → Game engine: uses game logic
app/foundation/application.py - Application → Lighting: controls effects
app/foundation/application.py - Application → Canonical services: uses policies
app/foundation/application.py - Application → Input safety: checks input
app/foundation/application.py - Application → Age policy: applies age policy
app/foundation/application.py - Canonical runtime → Transition authorization: authorizes transitions
app/scenarios/canonical_graph.py - Game engine → Game content: builds challenges
app/foundation/game_engine.py - Speech dialogue → Age policy: gets age details
app/foundation/s2s.py - Speech dialogue → Voice processing: uses audio operations
app/foundation/s2s.py - Speech dialogue → Menu content: uses dialogue content
app/foundation/s2s.py - Speech dialogue → Chat model service: streams chat requests
app/foundation/s2s.py - TTS engine → Voice processing: uses processing
app/foundation/tts_engine.py - Canonical services → Canonical runtime: uses contract
app/foundation/canonical_services.py - Canonical services → Schedule and weather: uses schedule data
app/foundation/canonical_services.py - Canonical services → Lighting: uses lighting policy
app/foundation/canonical_services.py - Canonical services → Transition authorization: uses scenario graph
app/foundation/canonical_services.py - Input safety → Canonical services: uses safety classifier
app/foundation/input_safety.py - Safety guard → Input filter: checks input
app/safety/guard.py - Safety guard → Output filter: checks output
app/safety/guard.py - Safety guard → Fallback phrases: selects fallback
app/safety/guard.py - Lighting → Hardware adapter: drives output
app/foundation/lighting.py