I experimented with these symbols to better understand their functionality, and the supported symbols for Locale(identifier: "en-US") are as follows:
[".", "Z", "j", "w", "@", "V", "S", "p", "n", "k", "l", "I", "h", "g", "f", "e", "E", "i", "d", "b", "o", "O", "A", ""A", "{", "z", ""@r", "aU", ""aI", "%@r", "aI", "n=", ""E", ""u", "l=", "%U", "OI", "%o", "dZ", ""o", "%i", ""I", "%e", ""e", "%I", "E@", "%E", "%u", "s", "%E@", "u", ""OI", ""E@", "%aU", ""i", "@r", ""U", ""O", "T", "%O", "r", "%A", "m=", "%Q", "m", ""Q", "%{", "Q", ""V", "U", "tS", ""{", "%aI", "v", "ng", "D", ""aU", "t", "%OI"]
Based on my understanding, it seems we need to use symbols from the provided set. I attempted the following implementation:
SFCustomLanguageModelData.CustomPronunciation(
grapheme: "picon",
phonemes: ["p i \"A n", "p I k @ n"]
)
However, the app still outputs pecan instead of the intended pronunciation.
Is there a definitive method or tool available to reliably convert words into X-SAMPA phonemes for a specific locale? Without such a resource, the process feels like trial and error, which might not yield consistent results.