如何为 Android 创建自动答录机

发布于 2024-10-12 14:31:39 字数 1436 浏览 6 评论 0原文

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

剪不断理还乱 2024-10-19 14:31:39

Android 应用程序目前无法访问通话中的音频流。因此,目前您的申请无法进行,抱歉。

Android applications do not have access to the in-call audio stream at this time. So, presently, your application is not possible, sorry.

尘曦 2024-10-19 14:31:39

到了2013年底,这仍然是不可能的。
还有很多其他答案(可能我会在完成此任务后写一个常见问题解答总结),但很快,

  • 手机硬件供应商需要在调制解调器中实现额外的“输入引脚”并将其暴露给 Android 音频层( kernel -> HAL) 来接受准备好的音频流(如 8khz wav)。

目前,一些高通处理器支持这一点。

为什么会这样呢?我的观点:避免非 Android 用户听到音频处理延迟 ->以避免非 Android 用户的羞辱。 (嗯,安卓就是为了延迟而生的)。其他观点包括:隐私原因、手机制造商的意愿(尤其是中国的手机制造商,他们销售 1000 种基于 GSM 的警报器、传感器等)、懒惰和节能。

当您在 Android 上通话时,会发生类似的情况:

  1. OS ->芯片组:将麦克风音量设置为 100%、禁用节能、激活 DSP/DAC/ADC 组件。
  2. 语音->麦克风-> GSM 基带处理器:编码原始数据
  3. 语音 ->麦克风->镜像到 Android 的媒体记录器音频源:麦克风数据

(有人期望麦克风 -> Android -> 自己的过滤器 -> GSM 路由,哈?)

这种架构根本没有用于发送数据的通用定义位置Android 至 GSM 通道;从普通制造商的角度来看,这就像直接访问 GSM 无线电芯片,使 Android 变成工作在 900-2400 MHZ 范围内的软无线电......例如一些深奥的、非法的和不必要的东西对于最终用户。 libmedia、MediaSource 等中可用的任何内容 - 与原始上行链路访问没有任何共同之处。

由于未知原因,不同供应商存在后门;我仍然没有找到任何关于 MTK 芯片组的信息,但谷歌搜索 Qualcomm/Android/voice/uplink/alsa/root 似乎在这里有了一个良好的开端:)

PS 还有一个 DTMF 信号设施,可通过一些未记录的 API 使用来获得。


PPS 答录机是向拨打特定答录机号码的人播放语音的设备。它不是录音机,与语音邮件不同。我不明白为什么答录机问题 100% 都是关于录音或自动接听电话的。

At the end of 2013, it's still not possible.
There are many other answers (possibly I'll write a FAQ sum-up after finishing this task), but shortly,

  • it is required for phone hardware's vendor to implement additional "input pin" in the modem and expose it to Android audio layers (kernel -> HAL) to accept prepared audio streams (like 8khz wav).

Currently, some Qualcomm procs supports that.

Why it's done so? My opinion: to avoid audio processing latency to be heard by non-Android users -> to avoid humiliation from non-Android users. (Well, android is created for lags). Other opinions include: privacy reasons, will of phone manufacturers (especially these Chinese, who sell 1000's kinds of GSM-based alarms, sensors, etc), lazyness, and energy saving.

When you're in call on Android, something like this happens:

  1. OS -> chipset: set microphone volume to 100%, disable energy saving, activate DSP/DAC/ADC components.
  2. voice -> microphone -> GSM baseband processor: encoded raw data
  3. voice -> microphone -> mirror to Android's mediarecorder audio source: mic data

(someone expected microphone -> Android -> own filter -> GSM route, ha?)

This architecture simply has no common defined place for sending data from Android to GSM channels; from an ordinary manufacturer's point of view, this is like giving a direct access to GSM radio chip to enable turning Android into soft-radio working in 900-2400 MHZ range.. e.g. something esotheric, illegal and unnecessary for end-user. Anything available in libmedia, MediaSource etc - has nothing in common with raw uplink access.

For unknown reasons, there are back-doors available from different vendors; I still found nothing with MTK chipset, but googling for Qualcomm/Android/voice/uplink/alsa/root seems to be giving a good start here :)

P.S. There is also a DTMF signalling facility, available with a little undocumented API usage.


P. P.S. Answering machine is something that plays voice to someone who called the number of that certain answering machine. Its not a recorder, and is different from voice mail. I don't get why 100% of the answering machine questions are about recording or auto-accepting the call.

蓝海似她心 2024-10-19 14:31:39

AirVoice 可以做到这一点。需要 root 访问权限并且仅适用于某些手机。

有人可以解释为什么这么难吗?

vrecorder 应用程序可以录制通话中的音频流并AutoAnswer 可以自动接听来电,无需root手机。

该解决方案(如果有效)并不可靠,因为手机可能已关闭或信号接收不良或无信号。

认真的用户最好使用专用的语音邮件 (VM) 提供商,例如 http://freephoneline.cahttp://www.youmail.com。要使用这些服务,您需要从他们那里购买虚拟电话号码(带有订阅计划),并配置您的运营商将未接听的来电转接至虚拟电话号码。然后他们会接听电话,播放您选择的问候语,进行语音到文本转录(如果有)并将消息发送到您手机上的专用应用程序。

AirVoice can do that. Requires root access and works on certain phones only.

Can someone explain why is it so hard?

The vrecorder application can record the in-call audio stream and AutoAnswer can automatically answer incoming call, without requiring rooting the phone.

The solution (if it works) is not reliable as the phone might be powered off or have bad or no signal reception.

Serious users would be better off to using dedicated VoiceMail (VM) providers, such as http://freephoneline.ca or http://www.youmail.com. To use these services you purchase virtual phone number (with a subscription plan) from them and configure your carrier to forward unanswered incoming phone calls to the virtual phone number. They would then pickup the phone call, play greeting of your choice, do voice-to-text transcription (if available) and send the message to a dedicated app on your phone.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文