Skip to content

Say the volume as soon as it changes - #451

Open
nibarAhmed wants to merge 1 commit into
trypsynth:masterfrom
nibarAhmed:speak-volume-right-away
Open

nibarAhmed wants to merge 1 commit into
trypsynth:masterfrom
nibarAhmed:speak-volume-right-away

Conversation

@nibarAhmed

@nibarAhmed nibarAhmed commented Nov 8, 2026 •

Copy link
Copy Markdown
Contributor

TalkBack waited until the volume keys had been still for 2 seconds before saying the volume, and it didn't say the media volume while media played. That made the volume keys feel slow. On Bluetooth headphones the announcement could also come out louder or quieter than the speech after it, and connecting headphones could make Backtalk read out the level they brought with them.

Now Backtalk says the new volume as soon as it changes:

  • A press says the new level right away and interrupts speech, except during continuous reading. A held key says the first level, then the level you end at when you let go. Quick changes to the same stream say only the percentage.
  • The media volume is said while media plays too.
  • Changes that aren't yours stay quiet: Backtalk's own changes, the level headphones bring when they connect or disconnect, and headphones repeating their level. A volume key is always said. Where media plays is looked up at each change, because Android can report the headphones' level before it reports that they connected.
  • On Bluetooth headphones that control their own volume, Backtalk nudges the accessibility volume one step down and back. That makes Android work out the speech level again at once, so the announcement plays at the new level. Where Android doesn't allow the nudge (with the screen off on Android 16), Backtalk waits for its audio to go quiet and plays a short silence first.
  • "Backtalk off" is now said at the accessibility volume on Samsung phones too, and on whichever output is in use.

The volume code moved out of Google's VolumeMonitor into VolumeAnnouncer and QuietBeforeAnnouncement, so Google's Java files only get small hooks. differences.md describes the new behaviour.

Fixes #295. The issue's optional sound cues instead of speech are left out.

Testing

  • Unit tests for the announcer, the nudge, held keys, outputs and "Backtalk off" (VolumeMonitorTest, QuietBeforeAnnouncementTest, FinalAnnouncementVolumeTest).
  • Tested on a Galaxy S26 Ultra running Android 17 with the Vocalizer TTS engine, using Galaxy Buds4 Pro and Razer BlackShark V2 Pro headphones. This included connecting and disconnecting while the speaker and the headphones were at different media levels.

Created with Claude Opus 5.5 in Claude Code, through T3 Code.

🤖 Generated with Claude Code

TalkBack waited until the volume keys had been still for 2 seconds, and
didn't say the media volume while media played. Backtalk now says each
new level right away, says a held key's level when it's released, keeps
changes that aren't the user's quiet, such as the level headphones bring
when they connect, and nudges the accessibility volume on Bluetooth so
the announcement plays at the new level. "Backtalk off" is said at the
accessibility volume on Samsung phones and on each output.

Fixes trypsynth#295

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@nibarAhmed
nibarAhmed force-pushed the speak-volume-right-away branch from 5ca1252 to 8979dc2 Compare November 8, 2026 23:19
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.

Enhancement: Reduce delay of volume announcement for physical volume keys

1 participant