WAIter is an interactive chatbot with voice capabilities designed for restaurant scenarios. It simulates Miguel, a friendly and helpful Cadiz waiter who can respond to customers' spoken questions in real-time, take orders, and send them directly to the kitchen.
๐ฃ๏ธ Note: The voice assistant operates in Spanish - Miguel speaks authentic Andalusian Spanish, making it perfect for Spanish-speaking restaurants and customers who want an authentic Spanish dining experience.
๐ TRY THE LIVE DEMO
You can try WAIter right now without installation on our HuggingFace Space. You just need a microphone to talk to Miguel in Spanish!
- ๐๏ธ FastRTC - Real-time audio streaming with Voice Activity Detection (VAD)
- ๐ ElevenLabs - Expressive and natural voice synthesis (TTS)
- ๐ฃ๏ธ Whisper (via Groq) - High-precision speech recognition
- ๐ฌ LangChain - Advanced LLM orchestration
- ๐ LangGraph - Complex workflows with agents
- ๐ง Gemini 2.5 Flash (via OpenRouter) - Main language model
- ๐ HuggingFace Embeddings (BAAI/bge-m3) - Vector semantic search
- ๐พ Markdown Knowledge Base - Complete restaurant menu
- ๐๏ธ Supabase - Real-time order management database
- ๐ RAG (Retrieval Augmented Generation) - Intelligent menu search
- ๐งช Gradio - Interactive web interface with voice support
- โ๏ธ HuggingFace Spaces - Deployment and live demo
- Natural voice interaction - Talk directly to Miguel as if he were a real waiter (in Spanish)
- Text and audio responses - Choose how you want to interact
- Authentic personality - Miguel is a Cadiz waiter with charm and professionalism
- Conversational memory - Remembers your order throughout the entire conversation
- Complete menu consultation - Detailed information about all dishes
- Intelligent search - Find dishes by ingredients, prices, or dietary preferences
- Allergen management - Complete information about allergens and special dietary options
- Complete order taking - From consultation to sending to kitchen
- Dietary options - Vegetarian, vegan, gluten-free, and diabetic menus
- Real-time processing - Immediate responses without perceptible latency
- Intelligent RAG - Vector search to find relevant menu information
- Kitchen integration - Orders are automatically sent to the database
- Specialized tool system - Specific tools for menu consultation and order sending
- Python 3.10 or higher
- API keys for required services (see below)
- Microphone (for voice functionality)
- Basic Spanish understanding (for voice interaction with Miguel)
# Clone the repository
git clone https://github.com/yourusername/waiter-chatbot.git
cd waiter-chatbot
# Create a virtual environment (recommended)
python -m venv waiter-env
source waiter-env/bin/activate # On Windows: waiter-env\Scripts\activate
# Install dependencies
pip install -r requirements.txtCreate a .env file in the project root with your API keys:
# REQUIRED - For the language model
OPENROUTER_API_KEY=your_openrouter_key
OPENROUTER_BASE_URL=https://openrouter.ai/api/v1
# REQUIRED for voice functionality - Transcription
GROQ_API_KEY=your_groq_key
# REQUIRED for voice functionality - Voice synthesis
ELEVENLABS_API_KEY=your_elevenlabs_key
# OPTIONAL - For advanced logging
HELICONE_API_KEY=your_optional_helicone_key
# REQUIRED for sending orders to kitchen
SUPABASE_URL=your_supabase_url
SUPABASE_KEY=your_supabase_key- Go to OpenRouter
- Create an account and get your API key
- Make sure you have credits to use Gemini 2.5 Flash
- Go to Groq
- Create a free account
- Get your API key to use Whisper
- Go to ElevenLabs
- Create an account (free plan available)
- Get your API key
- Go to Supabase
- Create a new project
- Set up the necessary tables (see Database Setup section)
- Get your project URL and API key
Run these SQL commands in the Supabase SQL editor:
-- Orders table
CREATE TABLE orders (
id BIGINT GENERATED BY DEFAULT AS IDENTITY PRIMARY KEY,
order_id TEXT NOT NULL,
table_number TEXT NOT NULL,
special_instructions TEXT DEFAULT '',
status TEXT DEFAULT 'pending',
created_at TIMESTAMP WITH TIME ZONE DEFAULT NOW()
);
-- Order items table
CREATE TABLE order_items (
id BIGINT GENERATED BY DEFAULT AS IDENTITY PRIMARY KEY,
order_id BIGINT REFERENCES orders(id) ON DELETE CASCADE,
name TEXT NOT NULL,
quantity INTEGER DEFAULT 1,
variations TEXT DEFAULT '',
created_at TIMESTAMP WITH TIME ZONE DEFAULT NOW()
);
-- Indexes for better performance
CREATE INDEX idx_orders_order_id ON orders(order_id);
CREATE INDEX idx_orders_created_at ON orders(created_at);
CREATE INDEX idx_order_items_order_id ON order_items(order_id);# Run the application
python app.py
# The application will automatically open in your browser
# Default at: http://localhost:7860waiter-chatbot/
โโโ app.py # ๐ฏ Main application with Gradio interface
โโโ agent.py # ๐ค LangGraph agent for Miguel the waiter
โโโ model.py # ๐ง Language model manager
โโโ tools.py # ๐ง Specialized tools (menu, orders)
โโโ supabase_client.py # ๐๏ธ Client for Supabase operations
โโโ requirements.txt # ๐ฆ Project dependencies
โโโ .env # ๐ Environment variables (create manually)
โโโ .gitignore # ๐ซ Files ignored by git
โ
โโโ data/
โ โโโ carta.md # ๐ฝ๏ธ Complete menu (knowledge base)
โ โโโ system_prompt.txt # ๐จโ๐ณ System prompt for Miguel (in Spanish)
โ
โโโ utils/
โโโ classes.py # ๐ Data classes (Order, etc.)
โโโ logger.py # ๐ Colored logging system
โโโ functions.py # ๐ ๏ธ Auxiliary functions
Miguel is an authentic Cadiz waiter working at a traditional restaurant in Cadiz specializing in traditional Andalusian cuisine.
- ๐๏ธ Authentic Cadiz native - With genuine expressions and local idioms
- ๐ Professional but friendly - Knows how to balance efficiency with warmth
- ๐ก Proactive - Suggests dishes and anticipates your needs
- ๐ง Good memory - Remembers your order throughout the conversation
- โก Efficient - Optimized for natural and fluid voice responses
- ๐ช๐ธ Spanish speaker - Communicates in authentic Andalusian Spanish
- ๐ค Audio Capture โ FastRTC captures your voice in real-time
- ๐ Transcription โ Groq (Whisper) converts audio to text
- ๐ง Processing โ Miguel's LangGraph agent processes your request
- ๐ RAG Search โ Searches for relevant information in menu
- โ๏ธ Tools โ Uses specialized tools as needed:
restaurant_menu_lookup_tool- For menu queriessend_order_to_kitchen_tool- For sending orders
- ๐ฌ Generation โ Gemini 2.5 generates contextual response as Miguel
- ๐ Synthesis โ ElevenLabs converts response to natural voice
- ๐ฑ Interface โ Gradio displays conversation and plays audio
Same process but without audio capture and voice synthesis steps, ideal for users who prefer typing or in environments where audio cannot be used.
- ๐ Bay and Almadraba Preserves - Tuna, mojama, anchovies
- ๐ค Cadiz Tapas - Shrimp fritters, marinated dogfish, sea anemones
- ๐ฅ Hearty Stews - Cadiz cabbage stew, legume dishes, oxtail in sherry
- ๐ค Fried Fish and Seafood - Mixed fried fish, prawns, shrimp
- ๐ฅฉ Local Meats - Cadiz retinto beef, fighting bull meat
- ๐ Bay Rice Dishes - With lobster, cuttlefish, almadraba tuna
- ๐ฎ Cadiz Desserts - Tocino de cielo, bienmesabe, pestiรฑos
- ๐ท Beverages - Sherry wines, manzanilla, rebujito
- ๐ฑ Vegetarian and Vegan - Complete adapted menus
- ๐พ Gluten-Free - Preparation in contamination-free zone
- ๐ For Diabetics - Options without added sugars
- ๐ถ Children's Menu - Adapted portions and flavors
Miguel can consult detailed information about all major allergens and help you find safe options according to your needs.
- Order taking automation during peak hours
- 24/7 information about menu and allergens
- Staff workload reduction
- Consistent experience independent of human waiter
- Natural menu exploration without pressure
- Detailed information about ingredients and preparation
- Personalized recommendations based on preferences
- Accessibility for people with reading difficulties
- Spanish language practice for learners
- Complete template for restaurant chatbots
- Multiple API integration for voice and AI
- Specialized RAG system for hospitality
- Scalable architecture with LangGraph
You can change the language model in model.py:
# Available models in OpenRouter
models = [
"google/gemini-2.5-flash-preview", # Fast and efficient (recommended)
"anthropic/claude-3.5-sonnet", # High quality
"openai/gpt-4o", # Robust alternative
]Edit data/system_prompt.txt to change:
- Waiter personality
- Restaurant name
- Conversation style
- Specific behavior rules
- Language (currently optimized for Spanish)
Edit data/carta.md to:
- Change dishes and prices
- Add new sections
- Modify restaurant information
- Adapt to your business
In app.py you can adjust:
# ElevenLabs configuration
voice_settings = VoiceSettings(
stability=0.0, # Voice variability
similarity_boost=1.0, # Similarity to base voice
style=0.0, # Expressive style
use_speaker_boost=True, # Clarity enhancement
speed=1.1, # Speech speed
)- โ
Verify that the
.envfile is in the project root - โ Check that variables are written correctly
- โ Restart the application after adding keys
- โ Allow microphone access in your browser
- โ Verify that your microphone works in other applications
- โ Try different browsers (Chrome recommended)
- โ
Verify Supabase credentials in
.env - โ Make sure tables are created correctly
- โ Check internet connectivity
- โ Verify your internet connection
- โ Check that you have credits in ElevenLabs
- โ Try a faster model in OpenRouter
- โ Miguel speaks Spanish - make sure you're interacting in Spanish
- โ The system prompt is optimized for Spanish responses
- โ
For English adaptation, modify
data/system_prompt.txt
The system includes detailed colored logging:
- ๐ต INFO - General information
- ๐ก WARN - Warnings
- ๐ด ERROR - Errors
- ๐ข SUCCESS - Successful operations
- ๐ฃ DEBUG - Debug information
Orders can be viewed in real-time through the web dashboard: ๐ Kitchen Dashboard
This dashboard shows:
- ๐ Real-time orders
- โฐ Timestamps for each order
- ๐ฝ๏ธ Complete details of each order
- ๐ Order status
- ๐ช๐ธ Spanish - Miguel operates entirely in Spanish with authentic Cadiz expressions
- The voice assistant is optimized for Spanish speakers
- Menu and responses are in Spanish
To adapt WAIter to other languages:
- Modify the system prompt in
data/system_prompt.txt - Translate the menu in
data/carta.md - Adjust voice settings in ElevenLabs for the target language
- Update the personality to match local culture
- Fork the repository
- Create a branch for your feature (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
- ๐ Translation to other languages
- ๐จ User interface improvements
- ๐ง New tools for the agent
- ๐ฝ๏ธ Menu templates for different types of restaurants
- ๐ฑ Native mobile application
- ๐ง Conversational model improvements
- ๐ฃ๏ธ Multi-language voice support
This project is under the MIT License. See the LICENSE file for more details or clicking here.
- OpenAI for Whisper and inspiration in conversational models
- Google for Gemini 2.5 Flash
- ElevenLabs for voice synthesis technology
- LangChain/LangGraph for the agent framework
- Gradio for the easy-to-use interface
- HuggingFace for hosting and embeddings
- Supabase for real-time database
Roberto - Lead Developer
- ๐ง Email: [[email protected]]
- ๐ฆ Twitter: [http://x.com/ItzRoBeerT]
- ๐ Live Demo - Try WAIter now
- ๐ Kitchen Dashboard - View orders in real-time
- ๐ LangGraph Documentation - Agent framework
- ๐ ElevenLabs API - Voice synthesis documentation
- ๐ง OpenRouter - AI model access
โญ Don't forget to star the project if you found it useful! โญ
๐ฝ๏ธ ยกQue aproveche with Miguel! ๐ฝ๏ธ