termux / termux/termux-api

termux-tts-speak command audio focus issue

Open
#467 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Java
Stars
4.3k
Forks
920
PR merge metrics
No merged PRs in 30d

Description

Problem description

tts sounds are played at the same times that other sounds because it doesn't request audio focus.
Steps to reproduce

Start music playing app like spotify, and trigger a termux-tts-speak on MUSIC stream.
Expected behavior

Spotify should lower its volume like it does when loosing audio focus.
Additional information
I think it could be fixed by adding audio focus, as described here: https://developer.android.com/guide/topics/media-apps/audio-focus.

  • Termux application version:
  • Android OS version: 11.1.1
  • Device model: OnePlus 6T

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the implementation entry point for the termux-tts-speak command and review the linked Android audio focus guidance. Reproduce it with Spotify playing on the MUSIC stream, then verify that Spotify lowers its volume while the TTS output plays.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, java
Domain
audio-video-rtc, mobile-dev
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.