termux / termux/termux-api

termux-speech-to-text not working on Android 11

Open
#404 3 comments 3 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

Running termux-speech-to-text on Android 11 fails - it immediately beeps as though no voice was heard. This is also true for termux-dialog with the speech option.

  • Termux 0.108 (from f-droid)
  • Termux API 0.47 (from f-droid)
  • Android 11, 5th March security update
  • Microphone permission was granted for Termux API
  • Other voice inputs (Chrome, Gboard) working correctly

Output from logcat

03-24 15:07:54.623 25582 25582 W bash    : type=1400 audit(0.0:9522): avc: granted { execute_no_trans } for path="/data/data/com.termux/files/usr/bin/termux-speech-to-text" dev="sda16" ino=41188 scontext=u:r:untrusted_app_27:s0:c3,c257,c512,c768 tcontext=u:object_r:app_data_file:s0:c3,c257,c512,c768 tclass=file app=com.termux.api
03-24 15:07:54.623 25582 25582 W bash    : type=1400 audit(0.0:9523): avc: granted { execute } for name="dash" dev="sda16" ino=37727 scontext=u:r:untrusted_app_27:s0:c3,c257,c512,c768 tcontext=u:object_r:app_data_file:s0:c3,c257,c512,c768 tclass=file app=com.termux.api
03-24 15:07:54.627 25582 25582 W termux-speech-t: type=1400 audit(0.0:9524): avc: granted { execute } for path="/data/data/com.termux/files/usr/bin/dash" dev="sda16" ino=37727 scontext=u:r:untrusted_app_27:s0:c3,c257,c512,c768 tcontext=u:object_r:app_data_file:s0:c3,c257,c512,c768 tclass=file app=com.termux.api
03-24 15:07:54.730 25585 25585 D AndroidRuntime: >>>>>> START com.android.internal.os.RuntimeInit uid 10259 <<<<<<
03-24 15:07:54.735 25585 25585 E libc    : Access denied finding property "persist.device_config.runtime_native_boot.profilebootclasspath"
03-24 15:07:54.735 25585 25585 E libc    : Access denied finding property "persist.device_config.runtime_native_boot.enable_apex_image"
03-24 15:07:54.735 25585 25585 I AndroidRuntime: Using default boot image
03-24 15:07:54.735 25585 25585 E libc    : Access denied finding property "persist.device_config.runtime_native_boot.disable_lock_profiling"
03-24 15:07:54.735 25585 25585 I AndroidRuntime: Leaving lock profiling enabled
03-24 15:07:54.735 25585 25585 E libc    : Access denied finding property "persist.device_config.runtime_native_boot.enable_generational_cc"
03-24 15:07:54.736 25585 25585 I app_process: Core platform API reporting enabled, enforcing=false
03-24 15:07:54.802 25585 25585 D app_process: Time zone APEX ICU file found: /apex/com.android.tzdata/etc/icu/icu_tzdata.dat
03-24 15:07:54.802 25585 25585 D app_process: I18n APEX ICU file found: /apex/com.android.i18n/etc/icu/icudt66l.dat
03-24 15:07:54.819 25585 25585 W app_process: JNI RegisterNativeMethods: attempt to register 0 native methods for android.media.AudioAttributes
03-24 15:07:54.820 25585 25585 W app_process: Core platform API violation: Ljava/lang/reflect/Field;->accessFlags:I from Landroid/os/Build; using reflection
03-24 15:07:54.823 25585 25585 D AndroidRuntime: Calling main entry com.example.termuxam.Am
03-24 15:07:54.852 25585 25585 D AndroidRuntime: Shutting down VM
03-24 15:07:54.866 23818 25600 E termux-api: onHandleIntent
03-24 15:07:55.073 23818 23818 E termux-api: RecognitionListener#onError(ERROR_CLIENT)
03-24 15:07:55.077 23818 23818 E termux-api: onDestroy
03-24 15:07:59.523 25657 25657 W bash    : type=1400 audit(0.0:9568): avc: granted { execute } for name="logcat" dev="sda16" ino=37767 scontext=u:r:untrusted_app_27:s0:c3,c257,c512,c768 tcontext=u:object_r:app_data_file:s0:c3,c257,c512,c768 tclass=file app=com.termux.api

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 by reproducing termux-speech-to-text on Android 11 and inspect the speech handling around RecognitionListener#onError. Trace the command entry point shown as com.example.termuxam.Am, also comparing termux-dialog's speech option. Done means speech input works instead of immediately beeping and the reported ERROR_CLIENT no longer occurs.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, java
Domain
mobile-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
28/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.