How saibabooj/voicebridge works
VoiceBridge is a voice-first trip-planning and agreement demo for travellers and local drivers, with English, Hindi and Tamil interfaces. The workflow starts with language/trip setup and driver selection, continues through translated spoken chat and explicit confirmation of commitments, then locks a shared plan for the agreement; driver availability, tips, ratings and voice-key controls are supporting capabilities. The browser selects mock or WebSocket conversation transport and uses speech services for playback/transcription. Gateway routing and provider selection are evidenced; unsampled screen and transport internals are represented by their exact paths, with uncertain links omitted.
Main entry points: ChatScreen.tsx Traveller chat · DriverChatScreen.tsx Driver chat · speech.ts Speech client · App.tsx Route application
Components 28
Trip setup and driver discovery
- Language setup
apps/web/src/screens/LanguageScreen.tsx - Trip setup
apps/web/src/screens/TripSetupScreen.tsx - Driver discovery
apps/web/src/screens/DriverListScreen.tsx - Driver profile
apps/web/src/screens/DriverProfileScreen.tsx
Conversation and agreement
- Traveller chat
apps/web/src/screens/ChatScreen.tsx - Driver chat
apps/web/src/screens/DriverChatScreen.tsx - Translated messages
apps/web/src/components/chat/MessageBubble.tsx - Commitment confirmations
apps/web/src/components/chat/ConfirmBanner.tsx - Shared plan
apps/web/src/components/chat/PlanSheet.tsx - Agreement
apps/web/src/screens/AgreementScreen.tsx - Trip rating
apps/web/src/screens/RatingScreen.tsx
Driver tools
- Driver availability
apps/web/src/screens/DriverHomeScreen.tsx - Voice tip recorder
apps/web/src/screens/DriverTipsScreen.tsx
Web app runtime
- Route application
apps/web/src/App.tsx - App preferences
apps/web/src/store/appStore.ts - Conversation transport
apps/web/src/lib/transport.ts - Mock conversation
apps/web/src/lib/mockGateway.ts - Visitor voice key
apps/web/src/components/VoiceKeySheet.tsx - Session voice key
apps/web/src/store/voiceKeyStore.ts
Speech services
- Speech client
apps/web/src/lib/speech.ts - Speech API gateway
services/gateway/app/main.py - Provider selection
services/gateway/app/providers/registry.py - Speech provider interface
services/gateway/app/providers/base.py - Gnani provider
services/gateway/app/providers/gnani.py - Mock provider
services/gateway/app/providers/mock.py
Other components
- Traveller
- Gnani speech service
- Device speech
Connections 38
- Traveller → Language setup: chooses language
- Language setup → Trip setup: continues setup
apps/web/src/App.tsx - Trip setup → Driver discovery: finds drivers
- Driver discovery → Driver profile: opens profile
- Driver profile → Traveller chat: starts chat
- Traveller chat → Conversation transport: sends events
apps/web/src/screens/ChatScreen.tsx - Driver chat → Conversation transport: sends events
apps/web/src/screens/DriverChatScreen.tsx - Conversation transport → Mock conversation: selects mock
apps/web/src/lib/transport.ts - Conversation transport → Speech API gateway: connects WebSocket
- Traveller chat → Translated messages: renders messages
apps/web/src/screens/ChatScreen.tsx - Driver chat → Translated messages: renders messages
apps/web/src/screens/DriverChatScreen.tsx - Traveller chat → Commitment confirmations: renders confirmations
apps/web/src/screens/ChatScreen.tsx - Driver chat → Commitment confirmations: renders confirmations
apps/web/src/screens/DriverChatScreen.tsx - Traveller chat → Shared plan: opens plan
apps/web/src/screens/ChatScreen.tsx - Driver chat → Shared plan: opens plan
apps/web/src/screens/DriverChatScreen.tsx - Shared plan → Agreement: views agreement
apps/web/src/components/chat/PlanSheet.tsx - Traveller chat → Speech client: plays speech
apps/web/src/screens/ChatScreen.tsx - Driver chat → Speech client: plays speech
apps/web/src/screens/DriverChatScreen.tsx - Translated messages → Speech client: replays message
apps/web/src/components/chat/MessageBubble.tsx - Speech client → Device speech: falls back
- Visitor voice key → Speech client: tests key
apps/web/src/components/VoiceKeySheet.tsx - Visitor voice key → Session voice key: saves key
apps/web/src/components/VoiceKeySheet.tsx - Speech client → Speech API gateway: requests speech
- Speech API gateway → Provider selection: builds providers
services/gateway/app/main.py - Provider selection → Gnani provider: selects Gnani
services/gateway/app/providers/registry.py - Provider selection → Mock provider: selects mock
services/gateway/app/providers/registry.py - Speech API gateway → Speech provider interface: invokes provider
services/gateway/app/main.py - Gnani provider → Speech provider interface: implements interface
services/gateway/app/providers/gnani.py - Mock provider → Speech provider interface: implements interface
services/gateway/app/providers/mock.py - Gnani provider → Gnani speech service: calls service
- Route application → App preferences: reads theme
apps/web/src/App.tsx - Traveller → Driver availability: switches role
- Driver availability → Driver chat: opens request chat
- Driver availability → Voice tip recorder: records tips
- Agreement → Trip rating: continues trip
- Route application → Traveller chat: routes chat
apps/web/src/App.tsx - Route application → Driver chat: routes driver chat
apps/web/src/App.tsx - Route application → Driver availability: routes driver home
apps/web/src/App.tsx