# 🎙️ SiteMente Voice Widget V2 - Deploy Guide
A professional, Spanish-first voice assistant for SiteMente. Safe to show to clients.
---
## ✅ What's Ready
1. **MiniMaxVoiceWidgetV2.tsx** - New component (V2)
2. **/api/ai/voice-chat-v2** - New API endpoint
---
## 🚀 Quick Deploy
### 1. Copy Files
```bash
# Component
cp components/MiniMaxVoiceWidgetV2.tsx /path/to/SiteMente/components/
# API
cp -r app/api/ai/voice-chat-v2 /path/to/SiteMente/app/api/ai/
```
### 2. Enable/Disable Widget
In your page or layout:
```tsx
import MiniMaxVoiceWidgetV2 from "@/components/MiniMaxVoiceWidgetV2";
// Testing mode - widget OFF
// Production - widget ON
```
Or via environment variable:
```tsx
```
Then set in `.env.local`:
```bash
# Testing
NEXT_PUBLIC_VOICE_WIDGET=false
# Production
NEXT_PUBLIC_VOICE_WIDGET=true
```
---
## 🎯 Behavior (Strict Spec)
### Greeting
- **Spanish:** "Hola, soy el asistente de SiteMente. ¿En qué puedo ayudarte hoy?"
- **English:** "I can also speak English. How can I help you today?"
### Rules
- ❌ NEVER claims to be human
- ❌ NEVER promises exact prices
- ❌ NEVER guarantees results
- ✅ ALWAYS guides to book a demo
### If Confused
- Spanish: "No he entendido del todo, ¿podrías repetirlo o escribirlo, por favor?"
- English: "I didn't quite catch that. Could you repeat or type it?"
---
## 🧪 Testing
### Internal Test (10 Rounds)
Run these scenarios:
1. "Hola" → Should respond in Spanish
2. "How are you?" → Should switch to English
3. "¿Cuánto cuesta?" → "desde 299€/mes"
4. "¿Puedes hacer X?" → Guide to demo
5. "No entiendo" → Confusion response
6. "Quiero reserva" → Help with booking
7. "What services?" → Brief explanation + demo
8. Speaking in Spanish → Stay in Spanish
9. Speaking in English → Switch to English
10. Random noise/mumble → Confusion response
### Pass Criteria
- ✅ Voice sounds natural
- ✅ Predictable responses
- ✅ Safe for real clients
- ✅ Max 2 failures in 10 rounds
---
## 🔧 Configuration
| Prop | Type | Default | Description |
|------|------|---------|-------------|
| `businessName` | string | "SiteMente" | Display name |
| `businessType` | string | "restaurant" | Type for context |
| `theme` | string | "dark" | "dark" or "light" |
| `apiUrl` | string | "/api/ai/voice-chat-v2" | API endpoint |
| `enabled` | boolean | true | Show/hide widget |
---
## 💰 Cost
- **Speech Input:** FREE (Web Speech API)
- **Speech Output:** FREE (Browser TTS)
- **Brain:** Your MiniMax API (~€0.001/msg)
**Total: Nearly zero**
---
## 📋 Before Showing to Clients
- [ ] Run 10-round internal test
- [ ] Verify < 2 failures
- [ ] Check voice sounds natural
- [ ] Test on mobile (Chrome)
- [ ] Enable with `enabled={true}`
---
## 🚫 What's NOT Included (Yet)
- Voice cloning
- Emotions
- Multi-turn complex conversations
- Phone integration (Vapi later)
---
**Status: Ready for internal testing!**