Documentation
¶
Index ¶
- func DefaultDictPath() string
- func DefaultSymbolPath() string
- func FixPhonemes(phonemes []string) []string
- func GetPhonemes(pron string, accent bool) []string
- func HasAccent(phoneme string) bool
- func IsVowel(phoneme string) bool
- func LoadDict(file string) map[string]string
- func LoadSymbols(file string, accent bool) map[string]bool
- func StripAccent(phoneme string) string
- func StripIndex(word string) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultDictPath ¶
func DefaultDictPath() string
DefaultDictPath gets the CMU dictionary file location from the CMUDICT_DATA environment variable.
func DefaultSymbolPath ¶
func DefaultSymbolPath() string
DefaultSymbolPath gets the CMU symbols file location from the CMUDICT_DATA environment variable.
func FixPhonemes ¶
FixPhonemes fixes a pronunciation string with custom fixes designed for better phonetic spelling.
func GetPhonemes ¶
GetPhonemes returns the list of phonemes from a string, with or without accents.
func LoadSymbols ¶
LoadSymbols loads the CMU symbols file and returns it as a map. This function removes the vowels symbols without accent numbers.
func StripAccent ¶
StripAccent removes the accent number from a phoneme.
func StripIndex ¶
StripIndex removes the index number in parentheses from the end of a word.
Types ¶
This section is empty.