Twilio TTS Mispronounces "Aradhya" – How to Fix It?
I’m using Twilio's text-to-speech (TTS) in a Django view to read out a message before connecting a call. However, Twilio mispronounces the name "Aradhya", and I’m looking for a way to fix it.
Problem:
Twilio reads "Aradhya"
incorrectly, and I want it to sound like "Uh-raa-dhyaa" (अाराध्य in Hindi).
Code (Simplified Version):
from django.http import HttpResponse
from django.views.decorators.csrf import csrf_exempt
from twilio.twiml.voice_response import VoiceResponse
@csrf_exempt
def connect_call(request):
response = VoiceResponse()
customer_name = "John Doe" # Example; this is fetched dynamically in actual code
response.say(f"Hello {customer_name}, I am Aradhya. Please hold while we connect you.")
response.dial("+919836731154") # Connect call
return HttpResponse(str(response), content_type="application/xml")
What I Tried:
- Changing the spelling (e.g.,
"Aaraadhyaa"
,"Aradyaa"
) → No improvement. - Using SSML
<phoneme>
tag:
Issue: Twilio still mispronounces it.<Response> <Say> I am <phoneme alphabet="ipa" ph="əˈrɑːðjə">Aradhya</phoneme>. </Say> </Response>
- Adding pauses with
<break>
:
Issue: Slight improvement, but not perfect.<Say>Hello, I am <break time="200ms"/> Aaraadhyaa.</Say>
- Using Twilio Neural Voices (Amazon Polly):
Issue: Not all Twilio accounts support Polly voices.<Response> <Say voice="Polly.Aditi">Hello, I am Aradhya.</Say> </Response>
Question:
How can I get Twilio TTS to pronounce "Aradhya" correctly without using pre-recorded audio?
Any help would be appreciated!