Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

README.md

Pronunciation Dictionaries

Control how specific words are spoken using custom pronunciation dictionaries. Useful for names, acronyms, technical terms, and brand names.

Features

  • Create a pronunciation dictionary with custom word–pronunciation pairs
  • Use the dictionary when generating speech
  • List, update, and delete dictionaries
  • Compare output with and without custom pronunciation

Requirements

Base dependencies are installed via the root requirements.txt. See the main README for setup. Add SMALLEST_API_KEY to your .env.

Usage

Python

Create a dictionary, synthesize speech with it, then clean up:

uv run python/pronunciation.py

JavaScript

node javascript/pronunciation.js

How It Works

  1. Create a pronunciation dictionary with word–pronunciation pairs
  2. Synthesize speech, passing the dictionary ID in pronunciation_dicts
  3. The TTS engine uses your custom pronunciations instead of defaults
  4. Clean up by deleting the dictionary when no longer needed

Example Pairs

Word Pronunciation Use Case
API ay pee eye Acronyms
GIF jiff Contested pronunciations
Kubernetes koo-ber-net-eez Technical terms
Diya dee-yah Names

API Reference

Next Steps