{"id":30021336,"url":"https://github.com/mindinventory/autohighlighttts","last_synced_at":"2025-08-06T02:46:54.346Z","repository":{"id":269381116,"uuid":"906080229","full_name":"Mindinventory/AutoHighlightTTS","owner":"Mindinventory","description":"AutoHighlightTTS is a simple, powerful solution for Android Text to Speech, featuring auto sentence highlighting with custom styles, auto-scrolling text, and adjustable language, pitch, and speech rate. Includes inbuilt controls for play, pause, and sentence navigation.","archived":false,"fork":false,"pushed_at":"2024-12-27T11:57:35.000Z","size":165,"stargazers_count":30,"open_issues_count":0,"forks_count":0,"subscribers_count":4,"default_branch":"main","last_synced_at":"2024-12-27T12:26:16.938Z","etag":null,"topics":["android","android-library","audiobook","autohighlight","autoscrolling","text-to-speech","tts","tts-android"],"latest_commit_sha":null,"homepage":"https://www.mindinventory.com","language":"Kotlin","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/Mindinventory.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-12-20T05:56:14.000Z","updated_at":"2024-12-27T11:57:38.000Z","dependencies_parsed_at":"2024-12-27T12:26:19.731Z","dependency_job_id":null,"html_url":"https://github.com/Mindinventory/AutoHighlightTTS","commit_stats":null,"previous_names":["mindinventory/mitexttospeech","mindinventory/autohighlighttts"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/Mindinventory/AutoHighlightTTS","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mindinventory%2FAutoHighlightTTS","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mindinventory%2FAutoHighlightTTS/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mindinventory%2FAutoHighlightTTS/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mindinventory%2FAutoHighlightTTS/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Mindinventory","download_url":"https://codeload.github.com/Mindinventory/AutoHighlightTTS/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mindinventory%2FAutoHighlightTTS/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269010498,"owners_count":24344232,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-06T02:00:09.910Z","response_time":99,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["android","android-library","audiobook","autohighlight","autoscrolling","text-to-speech","tts","tts-android"],"created_at":"2025-08-06T02:46:52.994Z","updated_at":"2025-08-06T02:46:54.323Z","avatar_url":"https://github.com/Mindinventory.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ca href=\"https://www.mindinventory.com/?utm_source=gthb\u0026utm_medium=repo\u0026utm_campaign=lassi\"\u003e\u003cimg src=\"https://github.com/Sammindinventory/MindInventory/blob/main/Banner.png\"\u003e\u003c/a\u003e\n\n# AutoHighlightTTS [![](https://jitpack.io/v/Mindinventory/AutoHighlightTTS.svg)](https://jitpack.io/#Mindinventory/AutoHighlightTTS)\n**AutoHighlightTTS** is a powerful and simple solution for integrating Text to Speech functionality into your Android app. It features automatic sentence highlighting with customizable styles, auto-scrolling text during playback, and options to set language, pitch, and speech rate. With inbuilt controls like play, pause, backward/forward by one sentence, AutoHighlightTTS ensures a seamless and interactive TTS experience for your users.\n## Screenshots\n\n\n### Image\n![image](/media/img.png)\n\n### Video\n\n\nhttps://github.com/user-attachments/assets/0069bbd0-9b1e-4e40-af84-151fd4a29147\n\n\n\n### Key features \n\n\n* Android 15 support.\n* Simple implementation.\n* highlighting current sentence.\n* auto scroll text while text-to-speech play.\n* Set your custom styles for text highlighting.\n* Set your own language, pitch \u0026 speech Rate.\n* Inbuilt Functionality Support play, pause, backward and forward[one sentence], slider position, etc.\n\n# Usage\n\n#### Dependencies\n\n* Step 1. Add the JitPack repository to your project build.gradle:\n\n    ```groovy\n\t    allprojects {\n\t\t    repositories {\n\t\t\t    ...\n\t\t\t    maven { url 'https://jitpack.io' }\n\t\t    }\n\t    }\n    ``` \n\n    **or**\n    \n    If Android studio version is Arctic Fox then add it in your settings.gradle:\n\n    ```groovy\n\t   dependencyResolutionManagement {\n    \t\trepositories {\n        \t\t...\n        \t\tmaven { url 'https://jitpack.io' }\n    \t\t}\n\t   }\n    ``` \n    \n* Step 2. Add the dependency in your app module build.gradle:\n    \n    ```groovy\n        dependencies {\n            ...\n            implementation 'com.github.Mindinventory:AutoHighlightTTS:X.X.X'\n        }\n    ``` \n\n### Implementation   \n\n* Step 1. Initialization of the MiTextToSpeech inside your viewmodel :\n    \n  ```kotlin\n  ...\n\n     lateinit var instanceOfTTS: AutoHighlightTTSEngine\n\n    init {\n        initTTS(context)\n    }\n\n    private fun initTTS(context: Context): AutoHighlightTTSEngine {\n        instanceOfTTS = AutoHighlightTTSEngine\n            .getInstance()\n            .init(context)\n            .setLanguage(Locale.ENGLISH)\n            .setPitchAndSpeed(1f, 1f)\n            .setText(context.getString(R.string.text_to_speech_text))\n        return instanceOfTTS\n    }\n\n  ... \n  ```\n\n* Step 2. Add listeners and MITextToSpeechText inside your composable :\n    \n  ```kotlin\n  ...\n    \n         var instanceOfTTS by remember {\n            mutableStateOf\u003cAutoHighlightTTSEngine?\u003e(null)\n        }\n\n        LaunchedEffect(instanceOfTTS == null) {\n            instanceOfTTS = viewModel.instanceOfTTS\n        }\n  \n  ...\n\n        // Listeners to get status\n\n        tts.setOnCompletionListener {\n            Log.e(\"TAG\", \"TTSScreen: Completed From Callback\")\n        }.setOnErrorListener {\n            //Perform action for error\n        }.setOnEachSentenceStartListener {\n            Log.e(\"TAG\", \"TTSScreen: onEachSentenceStart is called\")\n        }\n\n\n  ...\n\n    // The composable function displays the text and helps us to highlight the currently spoken sentence.\n\n        TTSComposable(\n            tts = tts,\n            textAlign = TextAlign.Center,\n            fontFamily = fontFamily,\n            fontWeight = FontWeight.ExtraLight,\n            miTextHighlightBuilder = MITextHighlightBuilder(\n                text = tts.mainText,\n                tts.highlightTextPair.value,\n                style = SpanStyle(\n                      fontFamily = fontFamily,\n                      color = Amaranth,\n                      fontWeight = FontWeight.Bold,\n                    )\n                ),\n            style = TextStyle(\n                fontSize = 20.sp, color = Color.Black,\n                lineHeight = 35.sp\n            ),\n        )\n\n  ...\n\n  ```\n\n\n  \n## Additional Functions\n\n| Functions              | Description                                                                        |\n|-------------------------|------------------------------------------------------------------------------------|\n| playTextToSpeech()      |  used for play TextToSpeech content                                                  |\n| pauseTextToSpeech() | pause the Text-to-speech if it is currently speaking                                           |\n| forwardText()         | Moves to the next sentence                                         |\n| backwardText()        | Moves to the preview sentence                                                         |\n| setPitchAndSpeed()       | you can customize the pitch and speech as per your requirements. (float, float) |\n\n## Guidelines\n\n#### Guideline for contributors\nContribution towards our repository is always welcome, we request contributors to create a pull request to the **develop** branch only.  \n\n#### Guideline to report an issue/feature request\nIt would be great for us if the reporter can share the below things to understand the root cause of the issue.\n\n* Library version\n* Code snippet\n* Logs if applicable\n* Device specification like (Manufacturer, OS version, etc)\n* Screenshot/video with steps to reproduce the issue\n\n### Requirements\n\n* minSdkVersion \u003e= 24\n* Androidx\n\n# LICENSE!\n\nMiTextToSpeech is [MIT-licensed](/LICENSE).\n\n# Let us know!\nWe’d be really happy if you send us links to your projects where you use our component. Just send an email to sales@mindinventory.com And do let us know if you have any questions or suggestion regarding our work.\n\n\u003ca href=\"https://www.mindinventory.com/contact-us.php?utm_source=gthb\u0026utm_medium=repo\u0026utm_campaign=autohighlighttts\"\u003e\n\u003cimg src=\"https://github.com/Sammindinventory/MindInventory/blob/main/hirebutton.png\" width=\"203\" height=\"43\"  alt=\"app development\"\u003e\n\u003c/a\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmindinventory%2Fautohighlighttts","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmindinventory%2Fautohighlighttts","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmindinventory%2Fautohighlighttts/lists"}