English | 中文
一个将 ChatGPT 语音播放路由到用户选择的蓝牙 A2DP 输出,并使用手机内置背部麦克风采集输入的 Xposed 模块。
An Xposed module that routes ChatGPT Voice playback to a user-selected Bluetooth A2DP output and captures input from the phone's built-in back microphone.
- Public application ID:
io.github.peiyingyao.chatgptvoiceroute - Target application:
com.openai.chatgpt - Playback: selected
AUDIO_DEVICE_OUT_BLUETOOTH_A2DP - Capture:
AUDIO_DEVICE_IN_BACK_MIC - SCO is not required for the A2DP playback path.
- No
BLUETOOTH_CONNECTpermission is requested; the selector lists A2DP outputs currently exposed as connected by Android.
The module has its own settings Activity. The route toggle and selected A2DP target are shared with the optional Voice-settings integration. If the target is unavailable, the module follows the documented fallback policy and otherwise leaves the native route intact.
When no complete target is persisted, the selector stays unset and native system routing remains active until the user chooses a connected A2DP output.
From the repository root, use a JDK 17 runtime and an installed Gradle 8.x distribution:
$env:JAVA_HOME = '<path-to-jdk-17>'
gradle -p module test
gradle -p module :xposed:assembleDebugRelease signing is intentionally out-of-band. Set CHATGPT_ROUTE_KEYSTORE, CHATGPT_ROUTE_STORE_PASSWORD, and CHATGPT_ROUTE_KEY_ALIAS only in the local build environment, then run:
gradle -p module :xposed:assembleReleaseDo not commit signing keys, passwords, generated APKs, or local SDK configuration.
Install the generated APK, enable the module in a compatible Xposed/Vector manager, and grant the module's scope to com.openai.chatgpt. Open the module Activity to enable routing and choose one of the currently connected A2DP devices.
System-server observation and the legacy compatibility entry are retained only in development builds, not in public-release artifacts.
The module does not require a specific headset, Bluetooth name, MAC address, or Calls Audio setting. Those are runtime conditions that vary by device and Android build.
module/src/main/java: shared routing contracts and policy.module/xposed/src/main/java: Xposed entry points, settings UI, provider bridge, and audio hooks.module/src/test/java: JVM policy and contract tests.docs/decisions: public behavior and compatibility decisions.docs/public-release.md: release scope and privacy boundary.
This project is licensed under the MIT License. See LICENSE.