termux / termux/termux-api

打开小爱同学(小米手机的一个语音助手)后,Termux中sox和pulseaudio module-sles-source 无法接收录音流 When Opening the 小爱同学(a voice assistant of Xiaomi Mobile Phone), Sox and Pulseaudio module-sles-source cannot receive recording streams in termux.

Open
#495 1 comment 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

如题,Termux和Termux:API均是从F-droid安装的,且Termux:API已授予录音权限。正常情况下,rec -p命令能够正常接收手机麦克风传来的音频流,但是在当我唤醒小爱同学后,rec -p瞬间无法接收音频流,而且pulse的OpenSLES input也没有了音量,并且无论是重启Termux,重启手机还是重装Termux(只进行覆盖安装,里面有重要的数据)都不能正常调用麦克风,并且手动执行pactl load-module module-sles-source也会报错(但是termux-microphone-record是可以正常使用的),只有当重启手机后再覆盖安装termux才能恢复
As the title, Termux and Termux: API are installed from F-Droid and Termux: API has been granted recording permissions. Under normal circumstances, the REC -P command can receive the audio stream from the microphone of the mobile phone, but after I am awakening the 小爱同学, the rec -p instantly cannot receive the audio stream, and the PULSE OpenSLES INPUT has no volume, and Whether it is restarting Termux, restart the phone or reload Termux (only overwritten installation, important data in it) can not call the microphone normally, and manually perform “pactl load-module module-sles-source” will also report an error (but termux-microphone-record can be used normally), only when the phone is restarted,override the installation of Termux to recover.

Steps to reproduce

Only awakening the 小爱同学

Expected behavior

Additional information

~ $ termux-info
Application version:
0.118.0
Packages CPU architecture:
aarch64
Subscribed repositories:

sources.list

deb https://mirrors.bfsu.edu.cn/termux/apt/termux-main stable main

x11-repo (sources.list.d/x11.list)

deb https://packages.termux.org/apt/termux-x11 x11 main
Updatable packages:
xwayland/x11 1.20.5-11 aarch64 [upgradable from: 1.20.5-8]
Android version:
10
Kernel build information:
Linux localhost 4.14.117-perf-g288905b #1 SMP PREEMPT Mon Nov 8 19:38:11 CST 2021 aarch64 Android
Device manufacturer:
Xiaomi
Device model:
Redmi Note 7 Pro
Attachments:

https://user-images.githubusercontent.com/53083866/157158589-2484a09e-42aa-41ad-bfea-0f414b0ae365.mp4
Screenshot_2022-03-08-11-09-07-099_com termux

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 the microphone failure with Termux 0.118.0 and Termux:API on the listed Redmi Note 7 Pro and Android 10 setup, after waking Xiao Ai. Compare rec -p, PulseAudio's module-sles-source, and termux-microphone-record; done means the recording stream and PulseAudio input remain usable after the assistant is activated.

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
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.