{"id":32297033,"url":"https://github.com/loushou/flutter_tts_improved","last_synced_at":"2026-02-21T16:02:41.499Z","repository":{"id":56830377,"uuid":"225739833","full_name":"loushou/flutter_tts_improved","owner":"loushou","description":"A fork of the Flutter_TTS (https://github.com/dlutton/flutter_tts) plugin, that uses the progress reporters of the Utterance APIs, on both Android and iOS.","archived":false,"fork":false,"pushed_at":"2019-12-04T15:58:26.000Z","size":82,"stargazers_count":9,"open_issues_count":8,"forks_count":5,"subscribers_count":1,"default_branch":"master","last_synced_at":"2023-08-20T22:08:03.228Z","etag":null,"topics":["androi","api","dart","flutter","ios","java","swift","text-to-speech"],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/loushou.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-12-03T23:53:16.000Z","updated_at":"2023-02-01T15:04:54.000Z","dependencies_parsed_at":"2022-09-09T18:00:57.580Z","dependency_job_id":null,"html_url":"https://github.com/loushou/flutter_tts_improved","commit_stats":null,"previous_names":[],"tags_count":0,"template":null,"template_full_name":null,"purl":"pkg:github/loushou/flutter_tts_improved","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/loushou%2Fflutter_tts_improved","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/loushou%2Fflutter_tts_improved/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/loushou%2Fflutter_tts_improved/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/loushou%2Fflutter_tts_improved/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/loushou","download_url":"https://codeload.github.com/loushou/flutter_tts_improved/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/loushou%2Fflutter_tts_improved/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29685044,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-21T15:51:39.154Z","status":"ssl_error","status_checked_at":"2026-02-21T15:49:03.425Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["androi","api","dart","flutter","ios","java","swift","text-to-speech"],"created_at":"2025-10-23T04:37:10.592Z","updated_at":"2026-02-21T16:02:41.494Z","avatar_url":"https://github.com/loushou.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Flutter Text To Speech Improved\n\nThe `flutter_tts` plugin (https://github.com/dlutton/flutter_tts) is GREAT! Thanks [@dlutton](https://github.com/dlutton/) for all your hard work on getting it up and running. Now it is time to improve it by allowing for the Utterances API to report the 'progress' of the speech of the Utterance. This is relatively new for Android, only introduced in Android 26. It has been around on iOS for quite some time though, back around iOS 7.0.\n\nMy goal with this plugin is to allow everyone in flutter to track where the speech is currently at. This can be used to print words on the screen as they are spoken, highlight words of a paragraph as they are uttered, for timing how long each word takes to say at a given speed, or really any other weird reason you may need it. This API is powerful, and I know people are asking for it, and there is simply not a plugin yet that covers it. Surprise! Now there is. You are welcome.\n\n## Features\n\n- [x] Android \u0026 iOS\n  - [x] speak\n  - [x] stop\n  - [x] get languages\n  - [x] set language\n  - [x] is language available\n  - [x] set speech rate\n  - [x] set speech volume\n  - [x] set speech pitch\n  - [x] get voices\n  - [x] set voice\n  - [x] #NEW track what word is currently being said (on all iOS 7+ and Android 26+)\n- [x] Android\n  - [x] set Silence\n\n## Usage\n\n## Android\n\nChange the minimum Android sdk version to 21 (or higher) in your `android/app/build.gradle` file.\n\n```java\nminSdkVersion 21\n```\n\n## iOS\n\nThere's a known issue with integrating plugins that use Swift into a Flutter project created with the Objective-C template. [Flutter#16049](https://github.com/flutter/flutter/issues/16049)\n\n[Example](https://github.com/loushou/flutter_tts_improved/blob/master/example/lib/main.dart)\n\nTo use this plugin :\n\n- add the dependency to your [pubspec.yaml](https://github.com/loushou/flutter_tts_improved/blob/master/example/pubspec.yaml) file.\n\n```yaml\n  dependencies:\n    flutter:\n      sdk: flutter\n    flutter_tts_improved:\n```\n\n- instantiate a FlutterTtsImproved instance\n\n```dart\nFlutterTtsImproved tts = new FlutterTtsImproved();\n```\n\n### speak, stop, getLanguages, setLanguage, setSpeechRate, setVolume, setPitch, isLanguageAvailable\n\n```dart\nFuture _speak() async{\n    var result = await tts.speak(\"Hello World\");\n    if (result == 1) setState(() =\u003e ttsState = TtsState.playing);\n}\n\nFuture _stop() async{\n    var result = await tts.stop();\n    if (result == 1) setState(() =\u003e ttsState = TtsState.stopped);\n}\n\nList\u003cdynamic\u003e languages = await tts.getLanguages;\n\nawait tts.setLanguage(\"en-US\");\n\nawait tts.setSpeechRate(1.0);\n\nawait tts.setVolume(1.0);\n\nawait tts.setPitch(1.0);\n\nawait tts.isLanguageAvailable(\"en-US\");\n```\n\n### Listening for platform calls\n\n```dart\n// #NEW\ntts.setProgressHandler((String fullPhrase, int wordOffset, int endOfWordOffset, String currentWord) {\n  setState(() {\n    _wordToDisplay = currentWord;\n  });\n});\n\ntts.setStartHandler(() {\n  setState(() {\n    ttsState = TtsState.playing;\n  });\n});\n\ntts.setCompletionHandler(() {\n  setState(() {\n    ttsState = TtsState.stopped;\n  });\n});\n\ntts.setErrorHandler((msg) {\n  setState(() {\n    ttsState = TtsState.stopped;\n  });\n});\n```\n\n## Getting Started\n\nFor help getting started with Flutter, view our online\n[documentation](https://flutter.io/).\n\nFor help on editing plugin code, view the [documentation](https://flutter.io/platform-plugins/#edit-code).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Floushou%2Fflutter_tts_improved","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Floushou%2Fflutter_tts_improved","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Floushou%2Fflutter_tts_improved/lists"}