Microphone remote calling method based on cloud mobile phone

文档序号:912515 发布日期:2021-02-26 浏览:21次 中文

阅读说明:本技术 一种基于云手机的麦克风远程调用方法 (Microphone remote calling method based on cloud mobile phone ) 是由 连寿哲 杨重魁 高居忠 李晶莹 于 2020-11-10 设计创作,主要内容包括:本发明公开的基于云手机的麦克风远程调用方法,涉及云手机领域,通过为云手机创建虚拟audio设备,实时检测云手机的麦克风模块是否有第三方应用访问,若是,则根据虚拟audio设备的环境变量,判断云手机的播放模式为本地播放模式还是远程调用麦克风模式,若云手机的播放模式为远程调用麦克风模式,则命令云手机与本地手机建立socket连接并打开本地手机的麦克风模块,利用本地手机的麦克风模块,将采集的音频数据实时传输给云手机的麦克风模块,此时云手机的麦克风模块接收的音频数据就是本地手机的麦克风模块采集到的音频数据,提升了用户体验。(The invention discloses a cloud mobile phone-based microphone remote calling method, which relates to the field of cloud mobile phones.)

1. A microphone remote calling method based on a cloud mobile phone is characterized by comprising the following steps:

creating a virtual audio device for the cloud mobile phone;

detecting whether a microphone module of the cloud mobile phone has third-party application access in real time;

if so, judging whether the playing mode of the cloud mobile phone is a local playing mode or a remote microphone calling mode according to the environment variable of the virtual audio equipment;

if the playing mode of the cloud mobile phone is a remote calling microphone mode, commanding the cloud mobile phone to establish socket connection with the local mobile phone and opening a microphone module of the local mobile phone;

the acquired audio data are transmitted to the microphone module of the cloud mobile phone in real time by using the microphone module of the local mobile phone, and the audio data received by the microphone module of the cloud mobile phone are the audio data acquired by the microphone module of the local mobile phone.

2. The method for remotely calling the microphone based on the cloud mobile phone according to claim 1, wherein the determining whether the play mode of the cloud mobile phone is the local play mode or the remote microphone calling mode according to the environment variable of the virtual audio device comprises:

and judging whether the environment variable sets a path for playing the audio file, if so, determining that the playing mode of the cloud mobile phone is a local playing mode, and if not, determining that the playing mode of the cloud mobile phone is a remote calling microphone mode.

3. The cloud handset based microphone remote invocation method according to claim 1, wherein the method further comprises:

and if the playing mode of the cloud mobile phone is the local playing mode, opening an audio file which is stored in the cloud mobile phone and needs to be played, and returning the audio file to the third-party application in a pcm audio format.

4. The cloud handset based microphone remote invocation method according to claim 1, wherein after transmitting the collected audio data to a microphone module of the cloud handset in real time, the method further comprises:

and converting the audio data into characters by using the cloud mobile phone, performing semantic recognition on the characters, and executing corresponding instructions according to semantic recognition results.

5. A computer program product, characterized in that the computer program product comprises a computer program stored on a non-transitory computer-readable storage medium, the computer program comprising program instructions that, when executed by a computer, cause the computer to perform the method of claims 1-4.

6. A non-transitory computer-readable storage medium storing computer instructions that cause a computer to perform the method of claims 1-4.

Technical Field

The invention relates to the field of cloud mobile phones, in particular to a microphone remote calling method based on a cloud mobile phone.

Background

The existing cloud mobile phone mainly has two modes of operation, one mode is an AP mode, the other mode is a virtual android mode (including anbox and qemu), but no matter what scheme is adopted, a microphone module cannot be started, and the experience brought to a user is not good because no audio input source exists.

Disclosure of Invention

In order to overcome the defects in the prior art, the embodiment of the invention provides a microphone remote calling method based on a cloud mobile phone, which comprises the following steps:

creating a virtual audio device for the cloud mobile phone;

detecting whether a microphone module of the cloud mobile phone has third-party application access in real time;

if so, judging whether the playing mode of the cloud mobile phone is a local playing mode or a remote microphone calling mode according to the environment variable of the virtual audio equipment;

if the playing mode of the cloud mobile phone is a remote calling microphone mode, commanding the cloud mobile phone to establish socket connection with the local mobile phone and opening a microphone module of the local mobile phone;

the acquired audio data are transmitted to the microphone module of the cloud mobile phone in real time by using the microphone module of the local mobile phone, and the audio data received by the microphone module of the cloud mobile phone are the audio data acquired by the microphone module of the local mobile phone.

Preferably, the determining, according to the environment variable of the virtual audio device, whether the play mode of the cloud phone is the local play mode or the remote microphone invoking mode includes:

and judging whether the environment variable sets a path for playing the audio file, if so, determining that the playing mode of the cloud mobile phone is a local playing mode, and if not, determining that the playing mode of the cloud mobile phone is a remote calling microphone mode.

Preferably, the method further comprises:

and if the playing mode of the cloud mobile phone is the local playing mode, opening an audio file which is stored in the cloud mobile phone and needs to be played, and returning the audio file to the third-party application in a pcm audio format.

Preferably, after transmitting the collected audio data to a microphone module of the cloud handset in real time, the method further comprises:

and converting the audio data into characters by using the cloud mobile phone, performing semantic recognition on the characters, and executing corresponding instructions according to semantic recognition results.

The cloud-mobile-phone-based microphone remote calling method provided by the embodiment of the invention has the following beneficial effects:

the problem of broadcast appointed audio file in the cloud cell-phone, cloud cell-phone can not directly call local microphone and carry out voice conversation is solved, have realized carrying out remote control to the cloud cell-phone through voice function, have promoted user experience.

Detailed Description

The present invention will be described in detail with reference to the following embodiments.

The cloud mobile phone-based microphone remote calling method provided by the embodiment of the invention comprises the following steps:

s101, creating virtual audio equipment for the cloud mobile phone.

S102, detecting whether a microphone module of the cloud mobile phone has third-party application access or not in real time.

As a specific embodiment of the present invention, the third party application is WeChat.

And S103, if yes, judging whether the playing mode of the cloud mobile phone is a local playing mode or a remote microphone calling mode according to the environment variable of the virtual audio equipment.

And S104, if the play mode of the cloud mobile phone is the remote calling microphone mode, commanding the cloud mobile phone to establish socket connection with the local mobile phone and opening a microphone module of the local mobile phone.

And S105, transmitting the acquired audio data to a microphone module of the cloud mobile phone in real time by using the microphone module of the local mobile phone, wherein the audio data received by the microphone module of the cloud mobile phone is the audio data acquired by the microphone module of the local mobile phone, so that the aim of remotely calling the microphone is fulfilled.

Optionally, determining, according to the environment variable of the virtual audio device, whether the play mode of the cloud phone is the local play mode or the remote microphone invoking mode includes:

and judging whether the environment variable sets a path for playing the audio file, if so, determining that the playing mode of the cloud mobile phone is a local playing mode, and if not, determining that the playing mode of the cloud mobile phone is a remote calling microphone mode.

Optionally, the method further comprises:

and if the playing mode of the cloud mobile phone is the local playing mode, opening an audio file which is stored in the cloud mobile phone and needs to be played, and returning the audio file to the third-party application in a pcm audio format.

Optionally, after transmitting the collected audio data to a microphone module of the cloud handset in real time, the method further includes:

and converting the audio data into characters by using the cloud mobile phone, performing semantic recognition on the characters, and executing corresponding instructions according to semantic recognition results.

As a specific embodiment of the present invention, speaking to the microphone of the local handset: the cloud mobile phone receives the voice, converts the voice into characters, performs semantic recognition on the characters, automatically opens the application 'do you starve', and then decides a beef noodle.

According to the remote microphone calling method based on the cloud mobile phone, the virtual audio device is created for the cloud mobile phone, whether the microphone module of the cloud mobile phone is accessed by a third party application is detected in real time, if yes, whether the playing mode of the cloud mobile phone is the local playing mode or the remote microphone calling mode is judged according to the environment variable of the virtual audio device, if the playing mode of the cloud mobile phone is the remote microphone calling mode, the cloud mobile phone is instructed to establish socket connection with the local mobile phone and the microphone module of the local mobile phone is opened, the collected audio data are transmitted to the microphone module of the cloud mobile phone in real time through the microphone module of the local mobile phone, and at the moment, the audio data received by the microphone module of the cloud mobile phone are the audio data collected by the microphone module of the local mobile phone, so that user experience is improved.

In the foregoing embodiments, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.

It will be appreciated that the relevant features of the method and apparatus described above are referred to one another.

It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.

The algorithms and displays presented herein are not inherently related to any particular computer, virtual machine, or other apparatus. Various general purpose systems may also be used with the teachings herein. The required structure for constructing such a system will be apparent from the description above. Moreover, the present invention is not directed to any particular programming language. It is appreciated that a variety of programming languages may be used to implement the teachings of the present invention as described herein, and any descriptions of specific languages are provided above to disclose the best mode of the invention.

In addition, the memory may include volatile memory in a computer readable medium, Random Access Memory (RAM) and/or nonvolatile memory such as Read Only Memory (ROM) or flash memory (flash RAM), and the memory includes at least one memory chip.

As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.

In a typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.

The memory may include forms of volatile memory in a computer readable medium, Random Access Memory (RAM) and/or non-volatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). The memory is an example of a computer-readable medium.

Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, a computer readable medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.

It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in the process, method, article, or apparatus that comprises the element.

As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.

The above are merely examples of the present application and are not intended to limit the present application. Various modifications and changes may occur to those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.

5页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种在手机中用文件夹放入图片并压缩的图片压缩方法

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!

技术分类