gpt4 book ai didi

java - 手机待机屏幕关闭时识别语音?

转载 作者:行者123 更新时间:2023-11-30 11:46:57 27 4
gpt4 key购买 nike

我能否制作一个即使在手机空闲或屏幕关闭时也能识别语音的服务?我的意思是即使在空闲状态下,手机也能听到用户说的话。

最佳答案

这是关于如何实现这一目标的整个计划。

http://developer.android.com/guide/topics/media/audio-capture.html

这显示了如何录制音频,可以使用相同的实现来收听音频。

此外,关于什么是服务的开发指南。

来自 developer.android.com

A service is a component that runs in the background to perform long-running operations or to perform work for remote processes. A service does not provide a user interface. For example, a service might play music in the background while the user is in a different application, or it might fetch data over the network without blocking user interaction with an activity. Another component, such as an activity, can start the service and let it run or bind to it in order to interact with it. A service is implemented as a subclass of Service and you can learn more about it in the Services developer guide.

这应该为您提供所需的所有信息: http://developer.android.com/guide/topics/fundamentals/services.html

关于java - 手机待机屏幕关闭时识别语音?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9513595/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com