Overview
Phone appointments are among the most time-consuming operations for a dental clinic. With this project, I designed a voice AI assistant that lets patients book appointments through a natural conversation as if calling the clinic.
The system was designed with an adaptable architecture for different sectors — dental clinic was the starting point, but the same infrastructure can easily be adapted to hair transplant, aesthetic clinic, hair salon, and other appointment-centric businesses.
Conversation Flow
- Greeting: The assistant greets the patient and asks for their complaint
- Understanding: Converts the complaint described in natural language into a structured category
- Availability: Suggests optimal times by consulting the clinic calendar
- Confirmation: Patient selects, the assistant confirms date and time
- Verification: A verification code is sent via WhatsApp
- Completion: Once the patient says the code, the appointment is finalized
Technical Details
- STT (Speech-to-Text): Deepgram — real-time, low latency
- TTS (Text-to-Speech): ElevenLabs — natural Turkish voice
- Streaming protocol: Two-way audio streaming over WebSocket
- Backend orchestration: FastAPI + Node.js
- Database: PostgreSQL (appointments, patients, clinic records)
- WhatsApp verification: Meta Graph API
Challenges and Solutions
The biggest challenge in voice systems is latency. Knowing when the patient has finished speaking (turn-taking), filtering background noise, and making the assistant's reply flow with natural pauses — I developed WebSocket buffer management and a voice state machine design to solve these nuances.
