Okay.. Maybe I should have put this in a different spot.

The programming language I'm using is irrelevant. What I'm looking for a is a simple plain text or xml english dictionary, that actually has pronunciation, either in IPA or simplified.

It MUST have pronunciation, be in plain text or xml (with no links or other BS that I have to filter out when parsing the file)
It must also be redistributable, attribution or otherwise.

*warning, flaming starts here.*
Jeeze, I searched on google for hours. literally, hours. Going through what people think is a great and helpful website, looking for something that isn't there. Ugh. This angry, embarrasing post has more information than your stupid website, people. Yeah, that's directed at you dicts.info webmaster. Other websites have links that are completely outdated, or links that don't even take you to where they tell you they will. Blegh. Not fun.

I'm sure there has to be a good dictionary with pronunciation out there... there just has to be... sigh.

What exactly do poeple use for text to speech programs anyway?

Dani AI

Generated

Good call by — a plain-text pronouncing dictionary is exactly the right thing. Since confirmed that a pronouncing list solved the original need, here are practical next steps and pitfalls for turning one of those lists into a small, redistributable consonant-only lexicon.

Pronouncing lists typically use ARPAbet tokens and have a few gotchas: comment/header lines, alternate pronunciations marked with parenthesized numbers on the headword, and stress digits appended to vowel tokens (e.g., AH0, AO1). A robust parse should (1) skip comment lines, (2) strip trailing parenthetical numbers from headwords, (3) strip digits from tokens, and (4) filter tokens to a known set of consonants. Example Python workflow:

import re

CONSONANTS = set("P B CH D DH F G HH JH K L M N NG R S SH T TH V W Y Z ZH".split())

lex = {}
with open('cmudict.txt') as f:
    for line in f:
        line = line.strip()
        if not line or line.startswith(';;;'):
            continue
        word, pron = line.split(maxsplit=1)
        word = re.sub(r'\(\d+\)$', '', word)
        tokens = [re.sub(r'\d+$', '', t) for t in pron.split()]
        cons = [t for t in tokens if t in CONSONANTS]
        if cons:
            lex.setdefault(word, []).append(' '.join(cons))

If you need IPA or a different phoneme set, use an existing converter or library rather than hand-rolling mappings. The pronouncing library and NLTK’s cmudict loader both make working with CMU-format dictionaries easier (, ). Check the source repo for license/redistribution terms before packaging a new file (official repos list current terms; see the cmudict repository for details: https://github.com/cmusphinx/cmudict).

For TTS integration, lightweight engines like eSpeak (and forks) or MaryTTS accept custom lexica so you can test pronunciations quickly. Final tip: pick a small frequency-based wordlist (top N words), parse their pronunciations with the snippet above, then manually merge similar consonant tokens into the 10 classes you need and test with a TTS engine.

Recommended Answers

All 2 Replies

Okay. When I originally posted perhaps I was a bit angry. That wasn't exactly the first impression I wanted to make, but it's done, can't change that.

That CMU link you provided is actually pretty good! I made the mistake of assuming it was called a pronunciation dictionary, when it is really a pronouncing dictionary. Silly english.

Yes, that more than fits my needs for a dictionary! I'm only using some of the words, so I'll just to str comparisons with several of the scowl dictionaries, and compile a new dictionary that meets my needs. I did search for several text to speech programs on SF, but the several of the dictionaries had an API(I guess you could call it an API...) that was particularly cryptic for my purposes. I only need common words, which I will then identify the 10 basic consonant sounds, and ignore the vowels.

You pyTony, may have just saved my project. And made me facepalm. :)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.