Skip to content

feat: add VOICE_COMMUNICATION audio source option#167

Merged
DevEmperor merged 1 commit into
DevEmperor:mainfrom
karaokedjodua:add-voice-communication-source
Jul 7, 2026
Merged

feat: add VOICE_COMMUNICATION audio source option#167
DevEmperor merged 1 commit into
DevEmperor:mainfrom
karaokedjodua:add-voice-communication-source

Conversation

@karaokedjodua

Copy link
Copy Markdown

Что добавлено

Добавлен новый режим VOICE_COMMUNICATION в DictateAudioSource — позволяет использовать
MediaRecorder.AudioSource.VOICE_COMMUNICATION (приоритет 7) для захвата аудио.

Зачем это нужно

Сейчас Dictate использует MIC или VOICE_RECOGNITION — оба с низким приоритетом.
Когда другое приложение (диктофон, камера) держит микрофон через CAMCORDER (приоритет 5),
Dictate глушится — голосовой ввод перестаёт работать.

VOICE_COMMUNICATION имеет самый высокий приоритет (7) среди аудиоисточников,
поэтому Dictate не будет заглушаться при параллельной записи на диктофон или камеру.

Что изменилось

В одном файле DictateAudioSource.kt добавлено 2 строки:

VOICE_COMMUNICATION,  // новый enum
VOICE_COMMUNICATION -> MediaRecorder.AudioSource.VOICE_COMMUNICATION  // resolve()

Примечание

VOICE_COMMUNICATION уже упоминался в javadoc класса (строка 27) как используемый для
Bluetooth-SCO. Этот PR просто делает его доступным для выбора пользователем.

Add  as a new  enum value.
This uses  (priority 7)
which is higher than CAMCORDER (5), preventing Dictate from being
muted when other apps (e.g. dictaphones, camera) hold a microphone lock.

The VOICE_COMMUNICATION source was already mentioned in the class
javadoc (line 27) as the default for Bluetooth-SCO; this exposes it
as a user-selectable option in the audio source picker.

Fixes dual-mic scenario: Dictate voice input + background dictaphone.
@DevEmperor

Copy link
Copy Markdown
Owner

Thanks! Merging. VOICE_COMMUNICATION does trade some transcription-tuning for the higher audio priority (it runs the call-style processing), but the priority benefit — not getting muted when another app grabs the mic — is worth exposing as a choice. I'll follow up with the settings picker entry + label so users can actually select it.

@DevEmperor DevEmperor merged commit 0ace1f8 into DevEmperor:main Jul 7, 2026
DevEmperor added a commit that referenced this pull request Jul 7, 2026
…167)

PR #167 added VOICE_COMMUNICATION to DictateAudioSource but nothing surfaced
it, so users couldn't choose it. Add the picker entry in the recording
settings and its label/summary (translated into the 20 core locales), and
document the trade-off on the enum: highest capture priority (Dictate keeps
working when another app holds the mic) at the cost of call-tuned processing
that can reduce transcription accuracy.
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.

2 participants