Pronouncing

0.2.0 · active · verified Tue Apr 14

Pronouncing is a lightweight Python library providing a simple interface to the CMU Pronouncing Dictionary. It allows users to programmatically access phonetic pronunciations, find rhyming words, count syllables, and search for words based on phonetic patterns. The current version is 0.2.0, with releases historically being infrequent, the last major update in 2018.

Warnings

Install

Imports

Quickstart

This quickstart demonstrates how to find rhymes, retrieve phonetic pronunciations in ARPAbet, and count syllables for a given word using the `pronouncing` library.

import pronouncing

word = "climbing"
rhymes = pronouncing.rhymes(word)
print(f"Rhymes for '{word}': {rhymes}")

pronunciations = pronouncing.phones_for_word(word)
print(f"Pronunciations for '{word}': {pronunciations}")

syllables = pronouncing.syllable_count(pronunciations[0]) # Use the first pronunciation for syllable count
print(f"Syllable count for '{word}': {syllables}")

view raw JSON →