-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Labels
enhancementNew feature or requestNew feature or request
Milestone
Description
Scope
Generate sample audio for voice preview functionality.
Tasks
1. Add preview endpoint
POST /ai/voice/preview
Body: {"voice": "nova", "text": "Hello, I'm Nova."}
Response: audio/mpeg
2. Pre-generate samples for each voice
- Standard intro: "Hello, I'm {voice_name}. How can I help you today?"
- Options:
- Cache as static files (pre-generated)
- Generate on-demand (first request)
- Hybrid: pre-generate common voices, on-demand for others
3. Frontend integration
- Play preview when user clicks voice card
- Show loading indicator during generation
- Handle playback errors gracefully
Files
app/components/backend/api/ai/router.py(add endpoint)frontend/dashboard/components/VoicePreview.tsx
Dependencies
- Requires Voice Catalog Infrastructure #480 (Voice Catalog Infrastructure)
- Integrates with Voice Settings Tab Frontend #482 (Voice Settings Tab Frontend)
Verification
curl -X POST http://localhost:8000/ai/voice/preview \
-H "Content-Type: application/json" \
-d '{"voice": "nova", "text": "Hello!"}' \
--output preview.mp3Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request