{"id":6038,"library":"pronouncing","title":"Pronouncing","description":"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.","status":"active","version":"0.2.0","language":"python","source_language":"en","source_url":"https://github.com/aparrish/pronouncingpy","tags":["natural language processing","phonetics","rhyme","pronunciation","linguistics"],"install":[{"cmd":"pip install pronouncing","lang":"bash","label":"Install Pronouncing"}],"dependencies":[{"reason":"Provides the CMU Pronouncing Dictionary data. As of version 0.2.0, the dictionary data was removed from the 'pronouncing' package and is now a dependency on 'cmudict'.","package":"cmudict","optional":false}],"imports":[{"symbol":"pronouncing","correct":"import pronouncing"}],"quickstart":{"code":"import pronouncing\n\nword = \"climbing\"\nrhymes = pronouncing.rhymes(word)\nprint(f\"Rhymes for '{word}': {rhymes}\")\n\npronunciations = pronouncing.phones_for_word(word)\nprint(f\"Pronunciations for '{word}': {pronunciations}\")\n\nsyllables = pronouncing.syllable_count(pronunciations[0]) # Use the first pronunciation for syllable count\nprint(f\"Syllable count for '{word}': {syllables}\")","lang":"python","description":"This quickstart demonstrates how to find rhymes, retrieve phonetic pronunciations in ARPAbet, and count syllables for a given word using the `pronouncing` library."},"warnings":[{"fix":"Ensure `cmudict` is installed alongside `pronouncing`. `pip install pronouncing` should handle this, but manual intervention might be needed for older environments or direct source installations. `pip install cmudict`","message":"Version 0.2.0 removed the CMU Pronouncing Dictionary data directly from the package. It now relies on the `cmudict` package as a dependency to provide this data. If upgrading from an older version (pre-0.2.0), ensure `cmudict` is installed.","severity":"breaking","affected_versions":"<0.2.0"},{"fix":"Applications using `phones_for_word()` should implement their own criteria for selecting the appropriate pronunciation from the returned list, based on their specific use case (e.g., always taking the first, or applying a custom ranking).","message":"The `pronouncing.phones_for_word()` function can return multiple pronunciations for a single word, reflecting different possible ways a word can be spoken. The library does not provide built-in logic to determine the 'best' or 'most common' pronunciation.","severity":"gotcha","affected_versions":"0.1.1 and later"},{"fix":"Be aware of the library's maintenance status. For projects requiring active development, frequent updates, or new linguistic features, consider alternatives or be prepared to fork and maintain the library yourself.","message":"The library's development seems to be low-activity, with the last release (0.2.0) in 2018. While functional, new features or active maintenance should not be expected.","severity":"gotcha","affected_versions":"0.2.0"}],"env_vars":null,"search_vec":"'0.2.0':42 '2018':53 'access':22 'allow':18 'base':34 'cmu':14 'count':28 'current':39 'dictionari':16 'find':25 'histor':45 'infrequ':47 'interfac':11 'languag':55 'last':49 'librari':7 'lightweight':5 'linguist':60 'major':50 'natur':54 'pattern':37 'phonet':23,36,57 'process':56 'programmat':21 'pronounc':1,2,15 'pronunci':24,59 'provid':8 'python':6 'releas':44 'rhyme':26,58 'search':31 'simpl':10 'syllabl':29 'updat':51 'user':19 'version':40 'word':27,33","created_at":"2026-04-14T18:39:15.755846+00:00","updated_at":"2026-04-16T18:12:03.574645+00:00","problems":[{"fix":"Install the package using pip: `pip install pronouncing`","cause":"The 'pronouncing' library has not been installed in your current Python environment, or there is a typo in the import statement.","error":"ModuleNotFoundError: No module named 'pronouncing'"},{"fix":"Always check if the list returned by 'pronouncing' functions is not empty before trying to access its elements. For example: `pronunciations = pronouncing.phones_for_word('nonexistent'); if pronunciations: print(pronunciations[0])`","cause":"This typically occurs when a word is not found in the CMU Pronouncing Dictionary, causing functions like `pronouncing.phones_for_word()` to return an empty list. Subsequently attempting to access an element (e.g., `[0]`) from this empty list will raise an `IndexError`.","error":"IndexError: list index out of range"},{"fix":"Ensure all text inputs and file operations explicitly specify the correct encoding that matches the data (e.g., 'latin-1', 'cp1252', or the actual encoding of your source text). When reading files, use `open('filename', encoding='correct_encoding')`.","cause":"This error occurs when attempting to process text data (e.g., from a file, user input, or custom dictionary entries) that contains characters encoded in a different format than 'utf-8', or if the text is corrupted. Given the library's focus on phonetic data, this can happen with non-standard characters in input words or dictionary paths.","error":"UnicodeDecodeError: 'utf-8' codec can't decode byte 0x... in position ...: invalid start byte"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":"0.3.0","cli_name":"","cli_version":null,"type":"library","homepage":null,"github":"https://github.com/aparrish/pronouncingpy","docs":null,"changelog":null,"pypi":"https://pypi.org/project/pronouncing/","npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["data"],"base_url":null,"auth_type":null,"provenance":{"verified_status":"passing","verified_at":"2026-06-28","last_verified":"2026-06-28","next_check":"2026-07-28","install_tag":null}}