provider Pronunciation Dictionary POST /v1/pronunciation-dictionaries/{pronunciation_dictionary_id}/set-rules
@utdk/elevenlabs /v1/pronunciation-dictionaries/{pronunciation_dictionary_id}/set-rules
Set Rules On The Pronunciation Dictionary
Replaces all existing rules on the pronunciation dictionary with the provided ones.
pronunciation_dictionary_id path required
The id of the pronunciation dictionary
string
xi-api-key header
Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.

Try it

Authentication
Configure credentials for ElevenLabs API Documentation
Gateway
The gateway proxies requests and injects credentials server-side. Configure credentials above, then enter your gateway URL.

Saved automatically to browser storage.

setRules
POST/v1/pronunciation-dictionaries/{pronunciation_dictionary_id}/set-rules
Replaces all existing rules on the pronunciation dictionary with the provided ones.

Parameters

required

The id of the pronunciation dictionary

Input

required

List of pronunciation rules. Rule can be either: an alias rule: {'string_to_replace': 'a', 'type': 'alias', 'alias': 'b', } or a phoneme rule: {'string_to_replace': 'a', 'type': 'phoneme', 'phoneme': 'b', 'alphabet': 'ipa' }

Enter a gateway URL above to enable sending.

Code snippet
Updates live as you fill in the form above.

TypeScript

import elevenlabs from '@utdk/elevenlabs';

await elevenlabs.setRules()