Flutter Speech to Text in Arabic Language

Viewed 873

Is there is a way to convert speech into text using flutter (specially if the the speech in Arabic and also I want the resulted text in Arabic) I've found many resources that explains how speech to text in English but not Arabic so I hope anyone can help me.

1 Answers

Use Flutter speech_to_text library.

to change language, localeId = the ID of the Arabic language on this device:

var locales = await speech.locales();

// Some UI or other code to select a locale from the list
// resulting in an index, selectedLocale

var selectedLocale = locales[selectedLocale];
speech.listen(
    onResult: resultListener,
    localeId: selectedLocale.localeId,
    );
Related