Aus öffentlichen Paketdaten erstellte Orientierung.
Flutter TTS ist ein plattformübergreifender Plugin, der die Text-zu-Sprache-Funktion in Flutter-Anwendungen ermöglicht. Es unterstützt mehrere Plattformen wie Android, iOS, Web, macOS und Windows und ermöglicht Entwicklern die nahtlose Integration von Sprachausgabe in ihre Apps. Der Plugin bietet einfache APIs zum Umwandeln von Text in gesprochene Audio, was ihn ideal für Barrierefreiheitsfunktionen, Sprachassistenten und interaktive Lernwerkzeuge macht. Er nutzt native Sprachsynthesemotoren auf jeder Plattform für zuverlässige Leistung und natürlich klingende Stimmen.
Anwendungsfälle
Barrierefreiheitsfunktionen
Sprachgesteuerte Navigation
Lern-Apps
Interaktive Chatbots
Audio-Feedback-Systeme
Hauptmerkmale
Plattformübergreifende Unterstützung
Einfache API-Integration
Verwendung der nativen Sprachengine
Anpassbare Sprachparameter
Echtzeit-Textwiedergabe
Geeignet für
Entwickler, die zugängliche Apps erstellen
Entwickler von Bildungssoftware
Sprachassistenten-Integrationen
Apps, die Audiorückmeldung erfordern
Hinweise
Erfordert plattformspezifische Berechtigungen auf mobilen Geräten
Die Verfügbarkeit von Sprache variiert je nach Gerät
Eingeschränkte Anpassungsmöglichkeiten im Web
Die Leistung hängt vom nativen Engine ab
Kann Berechtigungen des Benutzers unter iOS und Android erfordern
Original-README
Originaler README-Schnappschuss aus dem verknüpften Quell-Repository. Aktuelle Inhalte finden Sie im Repository.
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: