Created
November 6, 2018 06:56
-
-
Save SwadicalRag/b0fb17ef2c592390dc5047ba6434985f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local phonemes = { | |
["AA"] = "ɑ", | |
["AE"] = "æ", | |
["AH"] = "ʌ", | |
["AO"] = "ɔ", | |
["AW"] = "ɑʊ", | |
["AY"] = "ɑɪ", | |
["B"] = "b", | |
["CH"] = "ʧ", | |
["D"] = "d", | |
["DH"] = "ð", | |
["EH"] = "ɛ", | |
["ER"] = "ɜɹ", | |
["EY"] = "eɪ", | |
["F"] = "f", | |
["G"] = "ɡ", | |
["HH"] = "h", | |
["IH"] = "i", | |
["IY"] = "ɪː", | |
["JH"] = "ʤ", | |
["K"] = "k", | |
["L"] = "l", | |
["M"] = "m", | |
["N"] = "n", | |
["NG"] = "ŋ", | |
["OW"] = "oʊ", | |
["OY"] = "ɔɪ", | |
["P"] = "p", | |
["R"] = "ɹ", | |
["S"] = "s", | |
["SH"] = "ʃ", | |
["SIL"] = ".", | |
["T"] = "t", | |
["TH"] = "θ", | |
["UH"] = "ʊ", | |
["UW"] = "u", | |
["V"] = "v", | |
["W"] = "w", | |
["Y"] = "j", | |
["Z"] = "z", | |
["ZH"] = "ʒ", | |
} | |
function decodePhone(str) | |
str = str:gsub("[A-Za-z]+",function(phon) | |
return phonemes[phon] | |
end) | |
return str | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment