Skip to content

Commit

Permalink
Fixes Speech recognizer locale was not ignored on Android #1436 (#1481)
Browse files Browse the repository at this point in the history
  • Loading branch information
VladislavAntonyuk authored Oct 27, 2023
1 parent b430ba6 commit d88fb23
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,12 @@ public async ValueTask DisposeAsync()
static Intent CreateSpeechIntent(CultureInfo culture)
{
var intent = new Intent(RecognizerIntent.ActionRecognizeSpeech);
intent.PutExtra(RecognizerIntent.ExtraLanguagePreference, Java.Util.Locale.Default);
intent.PutExtra(RecognizerIntent.ExtraLanguagePreference, Java.Util.Locale.Default.ToString());
intent.PutExtra(RecognizerIntent.ExtraLanguageModel, RecognizerIntent.LanguageModelFreeForm);
intent.PutExtra(RecognizerIntent.ExtraCallingPackage, Application.Context.PackageName);
intent.PutExtra(RecognizerIntent.ExtraPartialResults, true);

var javaLocale = Java.Util.Locale.ForLanguageTag(culture.Name);
var javaLocale = Java.Util.Locale.ForLanguageTag(culture.Name).ToString();
intent.PutExtra(RecognizerIntent.ExtraLanguage, javaLocale);

return intent;
Expand Down

0 comments on commit d88fb23

Please sign in to comment.