Flutter speech_recognition locale de_DE not working

933

Look at Limitation part of the library: https://github.com/rxlabz/speech_recognition:

(On iOS, by default the plugin is configured for French, English, Russian, Spanish, Italian. On Android, without additional installations, it will probably works only with the default device locale.)

You could fix it easily for iOS and for Android it will be more difficult. For iOS check SwiftSpeechRecognitionPlugin.swift file of the library and add de_DE locales into it.

Now your locales is recognizes as French because it's default value of switch-case in that class

Share:
933
Neneil
Author by

Neneil

Updated on December 10, 2022

Comments

  • Neneil
    Neneil over 1 year

    I am trying to use de_DE as locale for speech to text with flutter speech_recognizer but the recognizer returns french.

    With en_US it's working fine.

    I am testing with an iPhone and no simulator.

    _speechRecognition.listen(locale: "de_DE").then((result) => setState(() {
                _textController.text = resultText;
                resultText = "";
              }));
    

    How can I achieve this?