Pronunciation assessment results missing in Android build (C# Unity)
See original GitHub issueHi all! I’m trying to implement pronunciation assessment in an Android Unity app, and have been unsuccessful in getting any pronunciation results from SpeechRecognitionEventArgs.
I was successful in getting pronunciation results when running on my Windows machine (within Unity Editor).
What could be causing this error?
Here is my RecognizedHandler code:
private void RecognizedHandler(object sender, SpeechRecognitionEventArgs e)
{
if (e.Result.Reason == ResultReason.RecognizedSpeech)
{
pronunciationString = "";
recognizedString = $"{e.Result.Text}";
// Function is unable to progress from here on in Android build:
var pronunciationResult = PronunciationAssessmentResult.FromResult(e.Result);
pronunciationString += string.Format(
"Accuracy score: {0}, Pronunciation score: {1}, Completeness score : {2}, FluencyScore: {3} \n",
pronunciationResult.AccuracyScore, pronunciationResult.PronunciationScore,
pronunciationResult.CompletenessScore, pronunciationResult.FluencyScore);
pronunciationString += "\n Word level details \n";
foreach (var word in pronunciationResult.Words)
{
pronunciationString += string.Format("Word: {0}, Accuracy score: {1}, Error type: {2}", word.Word,
word.AccuracyScore, word.ErrorType);
foreach (var phoneme in word.Phonemes)
{
pronunciationString += string.Format("Phoneme: {0}, Phoneme AccuracyScore: {1} \n",
phoneme.Phoneme, phoneme.AccuracyScore);
}
}
}
if (e.Result.Reason == ResultReason.NoMatch)
{
Debug.Log($"NOMATCH: Speech could not be recognized.");
}
}
Any help will be much appreciated!
Issue Analytics
- State:
- Created 2 years ago
- Comments:9 (5 by maintainers)
Top Results From Across the Web
Unity does not see .so library in Android build
Here is the issue: I have a .so library with c++ functions, mark it for Android and Editor, put it into Assets/Plugins/Android folder,...
Read more >What's new in Azure AI Speech?
Fix for getting Pronunciation Assessment results when PronunciationAssessmentGranularity.FullText is set (Customer issue) ...
Read more >Unity build report is missing item in size calculation
I am building a project for both iOS and Android using Unity. While making file size adjustments I discovered the Build Report appears...
Read more >TextView | Android Developers
Quickly bring your app to life with less code, using a modern declarative approach to UI, and the simplicity of Kotlin. ... Start...
Read more >Android environment setup
To create a Unity application for Android, you first need to set up your Unity project to support Android. To support Android, a...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@yulin-li Any status update, or is the suggested workaround still the only way to go?
Hi @aidenkoh801, sorry for the late reply. I am investigating the issue. Meanwhile, as a work around, you can parse the raw json string in your codes (using
result.Properties.GetProperty(PropertyId.SpeechServiceResponse_JsonResult);
)