bootphon/phonemizer

Simple text to phones converter for multiple languages

What it solves

Phonemizer provides a simple way to convert text into phonetic transcriptions (phonemization) for a wide variety of languages. This is essential for tasks like text-to-speech synthesis and linguistic analysis where the exact sounds of words need to be represented.

How it works

The library acts as a wrapper around four different phonetic backends, allowing users to choose the engine that best fits their needs based on language support, speed, and output format:

  • espeak: Supports over 100 languages and outputs in the International Phonetic Alphabet (IPA).
  • espeak-mbrola: Uses the SAMPA phonetic alphabet and supports 35 languages.
  • festival: Supports American English and allows for syllable-level tokenization.
  • segments: A Unicode tokenizer that uses user-provided grapheme-to-phoneme mapping files.

Who it’s for

It is designed for developers and linguists who need to programmatically convert text to phones across multiple languages using either a Python function or a command-line tool.

Highlights

  • Multi-backend support: Access to multiple phonetic engines in one interface.
  • Broad language coverage: Support for over 100 languages via espeak.
  • Flexible output: Support for IPA, SAMPA, and custom phone sets.
  • Tokenization options: Ability to preserve punctuation, word tokens, and in some cases, syllable tokens.

Related

  • Project
  • Project
  • Project
  • Project
  • Project