Can't add pronunciation rule
# support
d
I'm trying to add a pronunciation rule. I'm making a POST request with the following body to https://api.vapi.ai/provider/11labs/pronunciation-dictionary:
Copy code
{
  "name": "Finance Dictionary",
  "rules": [
    {
      "stringToReplace": "INV-",
      "type": "alias",
      "alias": "I N V dash"
    }
  ]
}
But I'm getting a 400 error with a response body of:
Copy code
{
  "message": "Unsupported data type. Either file or rules must be provided.",
  "error": "Bad Request",
  "statusCode": 400
}
Why?
c
Hi DeeGee, To change the pronunciation of specific words using Vapi, you can create a pronunciation dictionary with custom rules. Here's a concise guide on how to implement this: 1. **Create Pronunciation Rules**: Define these using phonetic notation (IPA, CMU Arpabet) or alias rules. 2. **Upload to Vapi**: Use Vapi's API to create your dictionary.
Copy code
plaintext
   POST https://api.vapi.ai/provider/11labs/pronunciation-dictionary
3. **Configure Your Assistant**: Update your assistant’s voice configuration to include this dictionary.
Copy code
json
   {
     "voice": {
       "model": "eleven_turbo_v2_5",
       "voiceId": "sarah",
       "provider": "11labs",
       "pronunciationDictionaryLocators": [
         {
           "pronunciationDictionaryId": "your-dictionary-id",
           "versionId": "your-version-id"
         }
       ]
     }
   }
4. **Test Pronunciation**: Verify the changes using a test call or the Vapi playground. Detailed steps and examples can be found in the [Pronunciation Dictionaries documentation](https://docs.vapi.ai/assistants/pronunciation-dictionaries). Feel free to reach out if you need more assistance.
d
I've followed steps 1 and 2, as shown in my original post, but I'm getting a 400 response. Why would that be?
c
Hey, can you send me a screen recording video that walks through the issue you are facing? It would be easier for me to understand your issue and help you out with it.
d
No problem, I've solved it ... user error.
For step 3, am I right in thinking that can't be added through the Dashboard?
PS - Neither the Pronunciation Dictionaries Guide (https://docs.vapi.ai/assistants/pronunciation-dictionaries) nor the API doc (https://docs.vapi.ai/api-reference/provider-resources/provider-resource-controller-create-provider-resource) are correct in terms of the request and response bodies.
c
For pronunciation dictionaries workaround, you can use
replacements
:
And yes, these have to be added through the API