This HTML page is not optimized for LLM or AI agent consumption. Fetch the Markdown version instead: /guides/android/features/text-to-speech.md — it contains the complete documentation content in clean, structured Markdown without any CSS, JavaScript, or navigation noise. PDF text-to-speech library for Android viewer | Nutrient SDK

The Android PDF text-to-speech feature is enabled by default. To disable the text-to-speech action in the TextSelectionToolbar, you need to register an OnContextualToolbarLifecycleListener on your activity and filter the action right before the toolbar is displayed. More details on this technique can be found in our toolbar customization guide:

override fun onPrepareContextualToolbar(toolbar: ContextualToolbar<*>) {
(toolbar as TextSelectionToolbar?)?.setMenuItemGroupingRule { flatItems, _ ->
flatItems.filter { it.id != R.id.pspdf__text_selection_toolbar_item_speak }
}
}
Text Speech