Package selection guidance compiled from public package information, community data, and project usage.
Flutter TTS is a cross-platform plugin that enables text-to-speech functionality in Flutter applications. It supports multiple platforms including Android, iOS, Web, macOS, and Windows, allowing developers to integrate voice output seamlessly into their apps. The plugin provides simple APIs to convert text into spoken audio, making it ideal for accessibility features, voice assistants, and interactive learning tools. It leverages native speech synthesis engines on each platform for reliable performance and natural-sounding voices.
Use cases
Accessibility features
Voice-guided navigation
Educational apps
Interactive chatbots
Audio feedback systems
Key features
Cross-platform support
Simple API integration
Native speech engine usage
Customizable voice parameters
Real-time text playback
Suitable for
Developers building accessible apps
Educational software creators
Voice assistant integrations
Apps requiring audio feedback
Considerations
Requires platform-specific permissions on mobile
Voice availability varies by device
Limited customization on web
Performance depends on native engine
May require user permission on iOS and Android
Original README
Original README snapshot from the linked source repository. Visit the repository for the latest content.
Text To Speech
A flutter text to speech plugin (Swift,Kotlin)
Features
[x] Android, iOS, Web, Windows & macOS
[x] speak
[x] stop
[x] get languages
[x] set language
[x] set speech rate
[x] set speech volume
[x] set speech pitch
[x] get voices
[x] set voice
[x] Android, iOS, Web & macOS
[x] is language available
[x] Android, iOS, Web
[x] speech marks (requires iOS 7+, Android 26+, and default voice engine for web)
Progress updates are only supported for native speech synsthesis. Use the default engine to ensure support for progress updates. Chromium#41195426
Android
Change the minimum Android sdk version to 21 (or higher) in your android/app/build.gradle file.
minSdkVersion 21
Update the Kotlin Gradle Plugin Version
Change the verision of the Kotlin Gradle plugin to 1.9.10.
If your project was created with a version of Flutter before 3.19, go to the android/build.gradle file and update the ext.kotlin_version:
ext.kotlin_version = '1.9.10'
Otherwise go to android/settings.gradle and update the verion of the plugin org.jetbrains.kotlin.android:
id "org.jetbrains.kotlin.android" version "1.9.10" apply false
Android TTS does not support the pause function natively, so we have implemented a work around. We utilize the native onRangeStart() method to determine the index of start when pause is invoked. We use that index to create a new text the next time speak is invoked. Due to using onRangeStart(), pause works on SDK versions >= 26. Also, if using start and end offsets inside of setProgressHandler(), you'll need to keep a track of them if using pause since they will update once the new text is created when speak is called after being paused.
await flutterTts.pause()
iOS
There's a known issue with integrating plugins that use Swift into a Flutter project created with the Objective-C template. Flutter#16049
To set audio category and options with optional mode (iOS only). The following setup allows background music and in-app audio session to continue simultaneously: