Commit 9baba4e
Add Hindi/Hinglish voice support for Cartesia TTS
**Voice Selection**:
- Support Agent: **Ishan** (fd2ada67-c2d9-4afe-b474-6386b87d8fc3)
- "Conversational male for Hinglish sales and customer support"
- Perfect for professional support conversations in Hinglish
- Male Customer: **Devansh** (1259b7e3-cb8a-43df-9446-30971a46b8b0)
- "Warm, conversational Indian male adult voice"
- Ideal for casual customer interactions
**Features Added**:
1. Language-aware voice mapping - detects Hindi characters and switches to
Indian voices automatically
2. Auto-detects Hindi text (Devanagari script) and passes language='hi' to TTS
3. Separate voice mappings for Hindi vs English to use appropriate voices
4. Updated DEFAULT_VOICES with Hindi/Hinglish voice IDs
**Implementation**:
- Cartesia provider: Added language-based voice selection logic
- Orchestrator: Auto-detects Hindi characters (U+0900-U+097F) and sets language
- Fixed kwargs conflict by using pop() instead of get() for language parameter
**Testing**:
- Generated 15.2 second Hinglish conversation with Cartesia
- Ishan voice for support agent ✅
- Devansh voice for customer ✅
- Audio quality excellent
**Note**: Female Hindi voice support pending - currently falls back to English
female voice for female customers. Voice ID needed from Cartesia.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <[email protected]>1 parent 8978612 commit 9baba4e
File tree
2 files changed
+45
-11
lines changed- src/voice_conversation_generator
- providers/tts
- services
2 files changed
+45
-11
lines changedLines changed: 38 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
21 | 32 | | |
22 | 33 | | |
23 | 34 | | |
| |||
85 | 96 | | |
86 | 97 | | |
87 | 98 | | |
88 | | - | |
| 99 | + | |
89 | 100 | | |
90 | 101 | | |
91 | 102 | | |
| |||
96 | 107 | | |
97 | 108 | | |
98 | 109 | | |
99 | | - | |
100 | | - | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
101 | 126 | | |
102 | | - | |
| 127 | + | |
103 | 128 | | |
104 | | - | |
| 129 | + | |
105 | 130 | | |
106 | 131 | | |
107 | 132 | | |
108 | 133 | | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
109 | 137 | | |
110 | 138 | | |
111 | 139 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
285 | 285 | | |
286 | 286 | | |
287 | 287 | | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
288 | 293 | | |
289 | 294 | | |
290 | | - | |
| 295 | + | |
| 296 | + | |
291 | 297 | | |
292 | 298 | | |
293 | 299 | | |
| |||
0 commit comments