How yar-malik/voho-university-voice-agent works
This is a browser-based university voice assistant: a student speaks or types, the browser sends audio for transcription or text for a conversational turn, and the server returns an answer and optional speech. The turn adapter asks Voho to interpret the request, dispatches any marker-based tool call to university functions, then synthesizes the final answer. The README also documents admissions knowledge, weighted-score calculation, application lookup, support tickets, department transfer, messaging, and Arabic/English switching. Several tool and Voho details are supported by README or index references rather than sampled implementations.
Main entry points: VoiceDemo.tsx Voice demo · index.ts Tool registry · route.ts Turn endpoint · tools.ts Tool-call adapter
Components 24
Browser demo
- Voice demo
components/VoiceDemo.tsx - Mic capture
lib/audio/record.ts - Transcript view
components/Transcript.tsx - Tool log
components/ToolLog.tsx
Server workflow
- Turn endpoint
app/api/voice/turn/route.ts - Transcription endpoint
app/api/voice/transcribe/route.ts - Status endpoint
app/api/status/route.ts - Agent brief
lib/agentPrompt.ts
University knowledge
- University config
config/university.ts - FAQ and knowledge
lib/knowledge/index.ts - FAQ, programs, services
data
Voho integration
- Tool-call adapter
lib/voho/tools.ts - Voho agent API
lib/voho/agents.ts - Voho speech API
lib/voho/speech.ts - Voho transcription API
lib/voho/transcribe.ts - Voho HTTP client
lib/voho/client.ts
University actions
- Tool registry
lib/tools/index.ts - Admission score
lib/tools/calculateAdmissionScore.ts - Application lookup
lib/tools/getApplicationStatus.ts - Support ticket
lib/tools/createSupportTicket.ts - Department transfer
lib/tools/transferToDepartment.ts - Send information
lib/tools/sendInformation.ts
Other components
- Student
- Voho service
Connections 35
- Student → Voice demo: speaks or types
README.md - Voice demo → Mic capture: captures audio
components/VoiceDemo.tsx - Voice demo → Transcription endpoint: posts audio
components/VoiceDemo.tsx - Transcription endpoint → Voho transcription API: requests transcription
app/api/voice/transcribe/route.ts - Voho transcription API → Voho HTTP client: uploads audio
lib/voho/transcribe.ts - Voho HTTP client → Voho service: sends authenticated requests
README.md - Voice demo → Turn endpoint: posts utterance
components/VoiceDemo.tsx - Turn endpoint → Agent brief: loads brief
app/api/voice/turn/route.ts - Turn endpoint → University config: uses greeting and identity
app/api/voice/turn/route.ts - Turn endpoint → Tool-call adapter: starts conversation
app/api/voice/turn/route.ts - Tool-call adapter → Voho agent API: requests agent reply
lib/voho/tools.ts - Voho agent API → Voho HTTP client: calls API client
lib/voho/agents.ts - Tool-call adapter → Tool registry: runs requested tools
lib/voho/tools.ts - Tool registry → Admission score: registers
lib/tools/index.ts - Tool registry → Application lookup: registers
lib/tools/index.ts - Tool registry → Support ticket: registers
lib/tools/index.ts - Tool registry → Department transfer: registers
lib/tools/index.ts - Tool registry → Send information: registers
lib/tools/index.ts - Tool-call adapter → Voho speech API: synthesizes final answer
lib/voho/tools.ts - Voho speech API → Voho HTTP client: calls API client
lib/voho/speech.ts - Tool-call adapter → Voho service: exchanges turns and speech
README.md - Voice demo → Transcript view: renders turns
components/VoiceDemo.tsx - Voice demo → Tool log: renders tool results
components/VoiceDemo.tsx - Turn endpoint → Voice demo: returns reply and tool log
app/api/voice/turn/route.ts - Status endpoint → University config: reports institution
app/api/status/route.ts - Status endpoint → FAQ and knowledge: checks demo data
app/api/status/route.ts - Status endpoint → Tool registry: reports tool catalogue
app/api/status/route.ts - FAQ and knowledge → FAQ, programs, services: loads content
lib/knowledge/index.ts - FAQ and knowledge → University config: assembles institution facts
lib/knowledge/index.ts - Agent brief → FAQ and knowledge: includes knowledge
lib/agentPrompt.ts - Admission score → University config: uses score weights
lib/tools/calculateAdmissionScore.ts - Application lookup → FAQ, programs, services: reads demo applications
lib/tools/getApplicationStatus.ts - Support ticket → Voho service: external ticket system
- Department transfer → Voho service: telephony routing
- Send information → Voho service: messaging provider