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.
Post
Replies
Boosts
Views
Activity
Filed a bug report: FB16040150
Hello @Engineer ,
Thank you for your response.
I wanted to clarify that the input "/wI"nA:w@r/" does not seem to work in my case. Regarding your point about the limited unique subsets of pronunciation symbols, I will explore this further to see if adjustments to my X-SAMPA string could help improve the functionality of my words.
For your information, my word library primarily consists of U.S. English words. However, I also have a few Spanish words, such as "pan de queso", amounting to a small subset (4–6 words) from Spanish locale.
Given this fact, do you think it is possible to achieve fluent recognition using the Custom Pronunciation feature, assuming I can produce accurate X-SAMPA strings for each word?
Looking forward to your insights.
Hello @Engineer , I am facing the same issue on 17.5.1 when i use,
SFSpeechRecognizer.supportsOnDeviceRecognition = true
SFSpeechAudioBufferRecognitionRequest.requiresOnDeviceRecognition = true.
The issue could be related to your Extension minimum deplayment and your host applicaitions minimum deplayment difference.