Skip to content

fix: Handle GET_SAMPLE_TEXT as requested by AOSP Settings - #50

Open
nchilada wants to merge 1 commit into
DevGitPit:mainfrom
nchilada:fix/get-sample-text
Open

fix: Handle GET_SAMPLE_TEXT as requested by AOSP Settings#50
nchilada wants to merge 1 commit into
DevGitPit:mainfrom
nchilada:fix/get-sample-text

Conversation

@nchilada

@nchilada nchilada commented Aug 4, 2026

Copy link
Copy Markdown

The Settings > Accessibility > Text-to-speech output > Play button confirms that TTS is working and helps the user modulate the Pitch and Speech Rate settings.

Because the Supertonic TTS engine wasn't handling the GET_SAMPLE_TEXT intent, the Play button was visible and tappable but didn't play any audio, not even the default sentence. Internally, startActivityForResult was repeatedly throwing an error and spamming the logs with:

E TextToSpeechSettings: Failed to get sample text, no activity found for Intent { act=android.speech.tts.engine.GET_SAMPLE_TEXT xflg=0x4 pkg=com.brahmadeo.supertonic.tts (has extras) })

Summary by CodeRabbit

  • New Features
    • Added support for Android text-to-speech sample-text requests.
    • English-speaking systems now receive a sample sentence and an available-language response.

The Settings > Accessibility > Text-to-speech output > Play button
confirms that TTS is working and helps the user modulate the Pitch and Speech Rate settings.

Because the Supertonic TTS engine wasn't handling the `GET_SAMPLE_TEXT` intent,
the Play button was visible and tappable but didn't play any audio, not even the default sentence.
Internally, [`startActivityForResult`](https://android.googlesource.com/platform/packages/apps/Settings.git/+/7c598253ff60f06f8e6fe046f18fd88e9daa72d3/src/com/android/settings/tts/TextToSpeechSettings.java#493)
was repeatedly throwing an error and spamming the logs with:
```
E TextToSpeechSettings: Failed to get sample text, no activity found for Intent { act=android.speech.tts.engine.GET_SAMPLE_TEXT xflg=0x4 pkg=com.brahmadeo.supertonic.tts (has extras) })
```
@coderabbitai

coderabbitai Bot commented Aug 4, 2026

Copy link
Copy Markdown

Review Change Stack

Note

Currently processing new changes in this PR. This may take a few minutes, please wait...

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 95ea478e-4dce-4f91-a701-9396e58d6abf

📥 Commits

Reviewing files that changed from the base of the PR and between af3a8ee and 8065d5d.

📒 Files selected for processing (2)
  • app/src/main/AndroidManifest.xml
  • app/src/main/java/com/brahmadeo/supertonic/tts/GetSampleTextActivity.kt
 _____________________________________________________________________
< RabbitShergill is my Punjabi cousin. He's a bit musically inclined. >
 ---------------------------------------------------------------------
  \
   \   \
        \ /\
        ( )
      .( o ).
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant