Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

What is each phoneme in IPA terms? #29

Open
obones opened this issue Jan 8, 2022 · 2 comments
Open

What is each phoneme in IPA terms? #29

obones opened this issue Jan 8, 2022 · 2 comments

Comments

@obones
Copy link

obones commented Jan 8, 2022

Describing the pronunciation of words is usually done using the International Phonetic Alphabet (IPA) which uses Unicode characters.
However, this package outputs ASCII character and there exists multiple mappings from Unicode IPA to ASCII.
Which one are you using?

The readme file says you are using The CMU Pronouncing Dictionary, which in turns says it's based upon ARPABET. Can I thus safely assume you are using this subset of ARPABET for all results?

@iamanigeeit
Copy link

@obones I'm using this conversion for my own work. (UW without any number seems to be a mistake -- CMU dictionary does not have any entry with UW)

{
'<pad>': '<pad>',
'<unk>': '<unk>',
'<s>': '<s>',
'</s>': '</s>',
'AA0': 'ɑ',
'AA1': 'ˈɑː',
'AA2': 'ˌɑ',
'AE0': 'æ',
'AE1': 'ˈæ',
'AE2': 'ˌæ',
'AH0': 'ə',
'AH1': 'ˈʌ',
'AH2': 'ˌʌ',
'AO0': 'ɔ',
'AO1': 'ˈɔː',
'AO2': 'ˌɔ',
'AW0': 'aʊ',
'AW1': 'ˈaʊ',
'AW2': 'ˌaʊ',
'AY0': 'aɪ',
'AY1': 'ˈaɪ',
'AY2': 'ˌaɪ',
'B': 'b',
'CH': 'tʃ',
'D': 'd',
'DH': 'ð',
'EH0': 'ɛ',
'EH1': 'ˈɛ',
'EH2': 'ˌɛ',
'ER0': 'ɚ',
'ER1': 'ˈɚ',
'ER2': 'ˌɚ',
'EY0': 'eɪ',
'EY1': 'ˈeɪ',
'EY2': 'ˌeɪ',
'F': 'f',
'G': 'g',
'HH': 'h',
'IH0': 'ɪ',
'IH1': 'ˈɪ',
'IH2': 'ˌɪ',
'IY0': 'i',
'IY1': 'ˈi:',
'IY2': 'ˌi',
'JH': 'dʒ',
'K': 'k',
'L': 'l',
'M': 'm',
'N': 'n',
'NG': 'ŋ',
'OW0': 'oʊ',
'OW1': 'ˈoʊ',
'OW2': 'ˌoʊ',
'OY0': 'ɔɪ',
'OY1': 'ˈɔɪ',
'OY2': 'ˌɔɪ',
'P': 'p',
'R': 'ɹ',
'S': 's',
'SH': 'ʃ',
'T': 't',
'TH': 'θ',
'UH0': 'ʊ',
'UH1': 'ˈʊ',
'UH2': 'ˌʊ',
# 'UW': 'u:',
'UW0': 'u',
'UW1': 'ˈuː',
'UW2': 'ˌu',
'V': 'v',
'W': 'w',
'Y': 'j',
'Z': 'z',
'ZH': 'ʒ',
}

@alope107
Copy link

alope107 commented Dec 6, 2023

@iamanigeeit Thanks so much, this was incredibly helpful! There are a few small typos in your dictionary though, where very a very similar looking character like ":" is used instead of "ː". For anyone else wanting to use this, here's a version without the typos:

{
    '<pad>': '<pad>',
    '<unk>': '<unk>',
    '<s>': '<s>',
    '</s>': '</s>',
    'AA0': 'ɑ',
    'AA1': 'ˈɑː',
    'AA2': 'ˌɑ',
    'AE0': 'æ',
    'AE1': 'ˈæ',
    'AE2': 'ˌæ',
    'AH0': 'ə',
    'AH1': 'ˈʌ',
    'AH2': 'ˌʌ',
    'AO0': 'ɔ',
    'AO1': 'ˈɔː',
    'AO2': 'ˌɔ',
    'AW0': 'aʊ',
    'AW1': 'ˈaʊ',
    'AW2': 'ˌaʊ',
    'AY0': 'aɪ',
    'AY1': 'ˈaɪ',
    'AY2': 'ˌaɪ',
    'B': 'b',
    'CH': 'tʃ',
    'D': 'd',
    'DH': 'ð',
    'EH0': 'ɛ',
    'EH1': 'ˈɛ',
    'EH2': 'ˌɛ',
    'ER0': 'ɚ',
    'ER1': 'ˈɚ',
    'ER2': 'ˌɚ',
    'EY0': 'eɪ',
    'EY1': 'ˈeɪ',
    'EY2': 'ˌeɪ',
    'F': 'f',
    'G': 'g',
    'HH': 'h',
    'IH0': 'ɪ',
    'IH1': 'ˈɪ',
    'IH2': 'ˌɪ',
    'IY0': 'i',
    'IY1': 'ˈiː',
    'IY2': 'ˌi',
    'JH': 'dʒ',
    'K': 'k',
    'L': 'l',
    'M': 'm',
    'N': 'n',
    'NG': 'ŋ',
    'OW0': 'oʊ',
    'OW1': 'ˈoʊ',
    'OW2': 'ˌoʊ',
    'OY0': 'ɔɪ',
    'OY1': 'ˈɔɪ',
    'OY2': 'ˌɔɪ',
    'P': 'p',
    'R': 'ɹ',
    'S': 's',
    'SH': 'ʃ',
    'T': 't',
    'TH': 'θ',
    'UH0': 'ʊ',
    'UH1': 'ˈʊ',
    'UH2': 'ˌʊ',
#    'UW': 'uː',
    'UW0': 'u',
    'UW1': 'ˈuː',
    'UW2': 'ˌu',
    'V': 'v',
    'W': 'w',
    'Y': 'j',
    'Z': 'z',
    'ZH': 'ʒ',
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants