Flutter text to speech App Tutorial | flutter tts
Flutter text to speech App Tutorial | flutter tts
A flutter text to speech plugin which is built in Swift for iOS and Java for Android.
It’s Fully compatible on:
So if you are planning or developing flutter text to speech app then this will helpful for you.
Features
Implementation:
await flutterTts . setIosAudioCategory ( IosTextToSpeechAudioCategory .playAndRecord, [ IosTextToSpeechAudioCategoryOptions .allowBluetooth, IosTextToSpeechAudioCategoryOptions .allowBluetoothA2DP, IosTextToSpeechAudioCategoryOptions .mixWithOthers ] ) ;
Few optional things to do:
If you aim is not only speaking word on button click and stop speaking on button click. Then you can use following functions according to your need.
For example
getLanguages()
, setLanguage()
, setSpeechRate()
, setVolume()
, setPitch()
, isLanguageAvailable()
, setSharedInstance()
getLanguages
getLanguages()
is used to get available supported languages on device for flutter text to speech plugin, it Returns a list of available languages.
setLanguage
setLanguage()
is used to set language, for ex. await flutterTts.setLanguage("en-US");
and other functions
Few callbacks which are provided from platform
If you wan’t me to create dummy flutter text to speech app then comment below. I’ll make demo app and share source code on Github.
Originally published at https://learnpainless.com on July 29, 2020.