Grapheme-to-Phoneme Conversion for T hai using Neural Regression Models (2022)

Abstract: We propose a novel Thai grapheme-to-phoneme conversion method based on a neural regression model that is trained using neural networks to predict the similarity between a candidate and the correct pronunciation. After generating a set of candidates for an input word or phrase using the orthography rules, this model selects the best-similarity pronunciation from the candidates. This method can be applied to languages other than Thai simply by preparing enough orthography rules, and can reduce the mistakes that neural network models often make. We show that the accuracy of the proposed method is .931, which is comparable to that of encoder-decoder sequence models. We also demonstrate that the proposed method is superior in terms of the difference between correct and predicted pronunciations because incorrect, strange output sometimes occurs when using encoder-decoder sequence models but the error is within the expected range when using the proposed method.

## introduction grapheme-to-phoneme conversion (g2p) is the task of converting grapheme sequences into corresponding phoneme sequences. many languages have the difficulty that some grapheme sequences correspond to more than one different phoneme sequence depending on the context. g2p plays a key role in speech and text processing systems, especially in text-to-speech (tts) systems. these systems have to produce speech sounds for every word or phrase, even those not contained in a dictionary. in low-resource languages, it is fundamentally difficult to obtain large vocabulary dictionaries with pronunciations. therefore, pronunciations need to be predicted from character sequences. in many languages, each word is composed of syllables and each syllable is composed of characters following the orthography rules of that lan-guage. this means that g2p for languages with syllabic orthography rules can be formulated as the task of selecting the best path in a lattice generated for a given input word or phrase if we prepare enough orthography rules to make sure that any lattice generated almost certainly includes the path for the correct pronunciation. figure 1 : g2p can be formulated as the task of selecting the best path in a lattice. in english, because "ea" can be pronounced as /e/ and /i:/ and "ow" can be pronounced as /ou/ and /au/, the word "meadow" has 4 pronunciation candidates, excluding stress position estimation. as the result of some effort, we prepared thai orthography rules. almost all possible paths in a lattice can be generated from these, and each path needs to be evaluated using a phonological language model to select the best path. with this in mind, we propose a novel g2p method based on a neural regression model that is trained using neural networks to predict how similar a pronunciation candidate is to the correct pronunciation. after generating a set of candidates for an input word or phrase using the orthography rules, this model selects the best-similarity pronunciation from the candidates. in the following sections, we describe the proposed method and explain experiments on a dataset of thai vocabulary entries with pronunciations collected from wiktionary. after that, we show that the proposed method outperforms encoder-decoder sequence models in terms of the difference between correct and predicted pronunciations, and demonstrate that incorrect, strange output sometimes occurs when using encoderdecoder sequence models while error is within the expected range when using the proposed method. the code is available at https://github.com/ t0106661 . ## related work for g2p, converting words into pronunciations does not require as much expertise as needed to prepare correspondences between graphemes and phonemes. therefore, a method of learning correspondences from a large number of word-pronunciation pairs has been used (van den @xcite . to solve the problem that graphemes and phonemes often have many-to-many correspondence, a hidden markov model-based method @xcite and weighted finite-state transducer-based methods @xcite have been developed. @xcite assumed that graphones underlie both graphemes and phonemes, and achieved great performance by learning graphones to minimize joint errors. in addition, there have been some attempts to apply encoder-decoder models to learn end-to-end g2p models. for example, @xcite applied a sequence-to-sequence architecture @xcite . @xcite and @xcite applied a transformer architecture @xcite to train models that can deal with english or many other languages. ## proposed method it is well known that word segmentation (ws) is a necessary preprocessing for languages without word delimiters, such as chinese, japanese, and thai. to solve ws and homograph disambiguation for thai simultaneously, @xcite enumerated pronunciation candidates for text data with ambiguity and trained a model to select the correct pronunciation from candidates based on the context in which the text data appear. in contrast, the proposed method trains a model that predicts how similar each candidate is to the correct pronunciation. although the main process of the proposed method is language independent, we take thai as an example in this section. first, we prepared correspondences between graphemes and phonemes by combining thai characters consisting of 44 consonants, 15 vowels, and several symbols, resulting in an approximately 300-line program and more than 180,000 entries. the prepared entries consisted of 77 characters, 5,772 syllables, and 31 phoneme symbols, and each syllable was composed of up to 7 phoneme symbols. ## experimental setup and results we collected 18,066 thai vocabulary entries with pronunciations from wiktionary as an experimental dataset. the vocabulary consisted of not only words but also phrases. we then converted the pronunciations described in a thai-specific way into international phonetic alphabet sequences. for entries without pronunciations but with syllable boundaries, we determined their pronunciations when all candidates for each boundary were uniquely generated. for entries where the pronunciations were unable to be determined, two workers fluent in thai described the correct pronunciations. the average length of each data was 7.42 in characters, 2.47 in syllables, and 12.48 in phoneme symbols. first, we examined the number of candidates generated and the coverage rate of the correct pronunciations. figure 3 shows the distribution of the number of candidates. as seen in the figure, the number is usually less than 10 and seldom greater than 100. in fact, the minimum, mode, median, mean, and maximum were 1, 2, 4, 19.6, and 19,242 respectively. this means that the average stayed slightly less than 20, although the lattice generated for longer input tends to have many branches and can cause an exponential increase in candidates. for the coverage rate, 17,720 of 18,066 correct pronunciations were included in the sets of candidates and 346 were not. next, we evaluated our method compared with three g2p baseline models available from sig-morphon (2020), namely, a pair ngram model (fst) and two encoder-decoder sequence models (encoder-decoder and transformer, hereinafter ab-models accuracy difference ave max fst .670 ± .014 .619 12.3 enc-dec .932 ± .012 .313 78.9 xformer .911 ± .015 .360 42.5 ours .931 ± .006 .217 8.7 as shown in ## conclusion and future work in this study, we proposed a novel thai g2p method based on neural regression models. we confirmed that the model trained using neural networks to predict the similarity was able to select the correct pronunciations from candidates. the accuracy was .931 and the difference between correct and predicted pronunciations was .217 on average and 8.7 at maximum. this means that the performance of our proposed method was comparable to that of encoderdecoder sequence models and superior in terms of the difference between correct and predicted pronunciations. in particular, error is within the expected range when using our proposed method. use of neural regression models not only for g2p but also for summarization and generation opens the possibility that neural network models could reduce strange mistakes. our proposed method has the strength that it can be applied to any language by preparing enough orthography rules. however, it also has the weakness of the number of candidates increasing exponentially with input length, which can be a concern for languages with many exceptional orthography rules, such as english. a method for reducing candidates might thus be needed. there may be an efficient solution to find the correct pronunciation using a given candidate and the predicted similarity. however, these studies and experiments are left as future work.