Microphone resource access method, operating system, terminal and virtual microphone

By setting up virtual microphones in smart hardware products and decoupling the underlying hardware from the upper-layer framework, the problem of low voice output efficiency in smart hardware products is solved, efficient audio collection and maintenance is achieved, and the adaptive configuration of different array microphones is supported.

CN113391838BActive Publication Date: 2024-09-27ALIBABA GROUP HOLDING LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202010177899.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-03-13
Publication Date
2024-09-27
Estimated Expiration
2040-03-13

AI Technical Summary

Technical Problem

Existing technologies in smart hardware products have low voice output efficiency due to differences in operating systems and chip platforms, and existing audio collection solutions are costly and difficult to maintain.

Method used

By setting up a virtual microphone, the underlying hardware is decoupled from the upper-layer framework, the configuration information of the microphone module is obtained, a virtual microphone is created, audio data is obtained through the virtual microphone, and audio data is provided to applications that request access to microphone resources, and the adaptation of different array microphones is supported. configuration.

Benefits of technology

It improves the efficiency of product development and subsequent sound collection processing, reduces maintenance costs, and supports the rapid transplantation and adaptation of different intelligent hardware products.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113391838B
    Figure CN113391838B
Patent Text Reader

Abstract

A microphone resource access method, as well as a corresponding operating system, terminal and virtual microphone are disclosed. The method comprises: obtaining configuration information of a microphone module; creating a virtual microphone according to the configuration information; the virtual microphone obtaining audio data collected by the microphone module; and providing the obtained audio data to a request for accessing microphone resources. In view of the problem of voice capability output efficiency caused by the differentiation of smart hardware products, the present invention realizes the decoupling between the underlying hardware and the upper framework through the setting of a virtual microphone, thereby improving the processing efficiency of product development and subsequent sound collection.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of information processing, and in particular to a microphone resource access method, an operating system and a terminal. Background Art

[0002] With the rise of AI technology, voice technology, especially products based on far-field voice processing technology, are increasing. Since smart hardware comes in a variety of forms, and the operating system versions and chip platforms used also vary greatly, different audio acquisition solutions need to be adapted for different microphone modules (for example, array microphones) in various products.

[0003] One existing audio acquisition solution achieves audio acquisition capabilities by deeply modifying the operating system. This solution is highly coupled with the operating system, has high promotion costs, and cannot meet the requirements of fast voice output capabilities. Another option is to develop a recording solution on your own and directly read audio data from the kernel's device node. However, the cost of self-development is high and maintenance is difficult.

[0004] Therefore, an improved audio acquisition solution is needed. Summary of the invention

[0005] In order to solve at least one of the above problems, the present invention proposes a microphone resource access method, as well as a corresponding operating system, terminal and virtual microphone. In view of the problem of voice output efficiency caused by the differentiation of intelligent hardware products, the present invention realizes the decoupling between the underlying hardware and the upper framework through the setting of a virtual microphone, thereby improving the processing efficiency of product development and subsequent sound collection.

[0006] According to a first aspect of the present invention, a microphone resource access method is proposed, comprising: obtaining configuration information of a microphone module; creating a virtual microphone according to the configuration information; the virtual microphone obtaining audio data collected by the microphone module; and providing the obtained audio data to a request for accessing a microphone resource.

[0007] According to a second aspect of the present invention, a virtual microphone is provided for executing the method described in the first aspect above.

[0008] According to a third aspect of the present invention, an operating system is proposed, which has multiple applications installed. The operating system includes an audio decoupling module, and the audio decoupling module includes: a creation unit, which is used to obtain configuration information of a microphone module and create a virtual microphone according to the configuration information; a virtual microphone, which is used to obtain audio data collected by the microphone module and provide the obtained audio data to a request for access to microphone resources.

[0009] According to a fourth aspect of the present invention, a terminal is provided, comprising a microphone module and having installed thereon the operating system as described above or for executing the method as described above.

[0010] According to a fifth aspect of the present invention, a terminal microphone resource access method is proposed, comprising: creating a virtual microphone according to the configuration information of the microphone module; the virtual microphone obtains audio data collected by the microphone driver via the microphone module, and provides the obtained audio data to an upper-level microphone application framework; the microphone application framework provides the audio data to the corresponding application requesting the microphone resource.

[0011] According to a sixth aspect of the present invention, an application for accessing microphone resources of a terminal is proposed, for obtaining audio data based on an access request issued by the application, wherein the audio data is provided by the virtual microphone.

[0012] According to a seventh aspect of the present invention, a computing device is proposed, comprising: a processor; and a memory having executable codes stored thereon, wherein when the executable codes are executed by the processor, the processor executes the microphone resource access method as described above.

[0013] According to an eighth aspect of the present invention, a non-transitory machine-readable storage medium is proposed, on which executable code is stored. When the executable code is executed by a processor of an electronic device, the processor executes the microphone resource access method as described above.

[0014] This solution decouples the operating system and hardware configuration by abstracting a virtual microphone (e.g., audio HAL), making it easy to quickly port to different smart hardware products. After the array microphone is replaced, you only need to simply modify the configuration file and configure the array microphone parameters used accordingly. This solution itself can adapt to new array microphones. Furthermore, this solution relies on the existing operating system (e.g., Android) framework, has high stability and robustness, and low subsequent maintenance costs. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] The above and other objects, features and advantages of the present disclosure will become more apparent through a more detailed description of exemplary embodiments of the present disclosure in conjunction with the accompanying drawings, wherein like reference numerals generally represent like components in the exemplary embodiments of the present disclosure.

[0016] Figure 1 A schematic flow chart of a microphone resource access method according to an embodiment of the present invention is shown.

[0017] Figure 2 A structural example of an audio decoupling device according to the present invention is shown.

[0018] Figure 3 Another structural example of the audio decoupling device according to the present invention is shown.

[0019] Figure 4 The conventional Android system architecture and the microphone resource processing path involved therein are shown.

[0020] Figure 5 The Android system architecture with the HAL layer and the microphone resource processing path involved therein are shown.

[0021] Figure 6 An example of a sound sampling data processing path according to the present invention is shown.

[0022] Figure 7 A schematic diagram showing the composition of an operating system according to an embodiment of the present invention is shown.

[0023] Figure 8 A schematic diagram of the structure of a computing device that can be used to implement the microphone resource access method according to an embodiment of the present invention is shown. DETAILED DESCRIPTION

[0024] The preferred embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although the preferred embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be limited by the embodiments described herein. On the contrary, these embodiments are provided to make the present disclosure more thorough and complete, and to fully convey the scope of the present disclosure to those skilled in the art.

[0025] With the rise of AI technology, products based on far-field voice technology are increasing. Compared with near-field voice scenarios where users directly input into a microphone (for example, a mobile phone microphone), in far-field voice collection, the speaker is not deliberately close to the microphone, but is in a natural speaking state, and the sound is picked up by a remote microphone (usually 3-5m away). Common scenarios include conference rooms, car scenes, smart homes, etc. Far-field voice has made great progress because it is more natural and less disturbing to the speaker.

[0026] However, in far-field environments, due to the long distance, the signal-to-noise ratio is very low, which usually leads to poor sound reception. In addition, in closed or indoor environments, there will be a certain amount of reverberation, as well as various unidirectional noises such as background sounds in the environment. Furthermore, in far-field recognition scenarios, there are usually multiple people speaking, so the problem of recognizing multiple target voice signals needs to be solved. Finally, there is also the need to deal with echo cancellation caused by other devices.

[0027] In order to solve the above problems, a microphone array will be introduced in the language front-end processing module. A microphone array refers to a system composed of a certain number of acoustic sensors (usually microphones) used to sample and process the spatial characteristics of the sound field. It belongs to a multi-channel technology and may also be referred to as an "array microphone" in the present invention. Using a microphone array can have the ability to distinguish the direction of the sound source, realize sound source localization, realize the extraction and separation of the sound source signal, enhance the speech signal, and achieve a dereverberation effect.

[0028] Although the introduction of array microphones has greatly enhanced the device's ability to perform far-field voice processing, compared to using a single microphone for audio collection, the number of microphones, relative positions, channel data, and sampling rates used in array microphones by different smart devices are also very different.

[0029] In addition to the various implementation forms of array microphones, there are also huge differences in operating system versions and chip platforms used. Therefore, different audio acquisition solutions need to be adapted for different array microphones in various products. An existing audio acquisition solution implements sound acquisition capabilities by deeply modifying the operating system. This solution is highly coupled with the operating system, has high promotion costs, and cannot meet the requirements of fast voice output capabilities. Another option is to develop a recording solution by yourself and read audio data directly from the kernel's device node. However, the cost of self-development is high and maintenance is difficult.

[0030] In order to solve the problem of voice output efficiency caused by the differentiation of smart hardware products, the present invention realizes the decoupling between the underlying hardware and the upper-level framework through the setting of a virtual microphone, thereby improving the product development efficiency and the processing efficiency of subsequent sound collection.

[0031] It should be understood that, although the following description of the principles of the present invention will be mainly based on the Android system, the present invention is applicable to various customizable operating systems and various terminals with multi-array microphone configurations.

[0032] Figure 1 A schematic flow chart of a microphone resource access method according to an embodiment of the present invention is shown. The above method can be executed by a terminal device having a microphone module (physical microphone), such as a smart phone, a smart speaker, or a smart TV. In one embodiment, the above method is preferably executed by a smart device with a customized operating system (e.g., Android system) installed therein.

[0033] In step S110, the configuration information of the microphone module is obtained. In step S120, a virtual microphone is created according to the configuration information. In step S130, the virtual microphone obtains the audio data collected by the microphone module. In step S140, the obtained audio data is provided to the request for access to the microphone resources. In order to achieve decoupling between the application accessing the microphone and the underlying hardware, the above-mentioned access method of the present invention is preferably performed at the system level. Here, the request for access to the microphone resources may be an access request from an application within the same operating system. In other embodiments, the multiple requests may be external access requests from other devices within the networked system, for example, access requests from other networked IoT devices in the IoT. For example, the microphone module may be a home smart voice sticker, and the virtual microphone located on the smart speaker may obtain resources from the voice sticker and provide them to the requesting upper-layer application.

[0034] As mentioned above, the parameters of the array microphone are varied, such as channel data, sampling rate, etc. Different intelligent hardware may use array microphones with different parameters. In order to achieve decoupling from the array microphone parameters, the present invention directly configures the parameters of the array microphone. After reading the relevant configuration parameters, the system dynamically adjusts the internal logic to adapt to the recording operations of different array microphones. In other words, steps S110 and 120 can be decoupling operations performed when the microphone array is inserted for system settings, that is, the hardware of the microphone module is decoupled from the upper layer of the operating system. Specifically, the configuration information of the chip layer array microphone can be obtained by reading the corresponding library of the chip layer array microphone, and a virtual microphone used as the array microphone of this configuration can be generated. Specifically, step S120 can include creating an audio acquisition buffer according to the configuration information, and the audio acquisition buffer is used to buffer the audio data obtained by the virtual microphone. For example, compared with a near-field microphone (a single microphone), an array microphone uses more microphones for information collection, and the data rate of its audio collection is much greater than the data rate of the near-field microphone. In order to cope with the audio data stream acquired by the array microphone, a larger audio acquisition buffer needs to be prepared, and the request to obtain the audio data also needs to process the collected data at a corresponding rate. In the case where the upper-layer application can select the sound collection parameters (for example, the application selects itself or based on user selection), it can also request to obtain the current settings of the upper-layer application for the sound collection data, and modify the size of the audio collection buffer accordingly. For example, in the Android operating system, since the audio framework of each version varies greatly and the supported recording parameters are also different, the present invention can support various sound collection modes through buffer adaptation technology. Upper-layer requests, such as applications requesting recording data, do not need to care about the underlying operating system and array microphone hardware, and can directly get the audio data.

[0035] Step S130 may include: obtaining audio data obtained by a microphone driver. Here, obtaining audio data obtained by the microphone driver may be directly obtaining audio data from the driver, for example, continuously obtaining data collected by a hardware microphone module from the microphone driver.

[0036] In step S140, the request to access the microphone may be an access request from an application in the same operating system, for example, an upper-layer application accessing audio data collected by a lower-layer hardware device. In another embodiment, the request to access the microphone may also come from a device different from the microphone module for collecting sound, such as other devices in the networked system or other devices in the suite.

[0037] When the request for access to the microphone comes from a device different from the microphone module for collecting sound, the resource access method of the present invention also includes establishing a communication connection with the microphone module or a device including the microphone module. Here, the above-mentioned communication connection can be a wireless connection, such as a Bluetooth, infrared or WiFi connection, and can even be a wired connection. The establishment of the above-mentioned communication connection can be used to subsequently obtain the audio data collected by the microphone module. When the communication connection is first made, the configuration information of the microphone module can also be obtained and the initialization is completed. As an alternative or supplement, the acquisition of configuration information can be achieved through other methods such as cloud platform registration.

[0038] In some embodiments, the microphone module is a dedicated audio collection module that has only limited data processing and transmission capabilities. For example, the microphone module can be a smart voice sticker that wirelessly communicates with a smart speaker with higher processing capabilities. In this case, a virtual microphone can be created by the device where the request is located, and the communication transmission of the audio occurs between the microphone module and the virtual microphone. To this end, step S120 may include the virtual microphone obtaining the audio data collected by the microphone module via the communication connection established as above.

[0039] In other embodiments, the microphone module may be a device with sound collection capability that can handle relatively complex tasks, such as a smart speaker itself. In this case, the virtual device may be created by the device with the microphone module itself, and the communication transmission of the audio occurs between the virtual microphone and the external request. To this end, step S130 may include providing the acquired audio data to the request for access to the microphone resource via the established communication connection.

[0040] In addition, the virtual microphone can also share the learned microphone module configuration information with the request for accessing the microphone resource. When the latter needs to perform corresponding audio output, it can set the output parameters of the audio data based on the configuration information. For example, based on the configuration options of the array microphone module including two microphones, two speakers or two audio output devices are selected to perform audio output with corresponding output frequencies or left and right channel distribution.

[0041] Figure 2 A structural example of an audio decoupling device according to the present invention is shown. As shown in the figure, the audio decoupling device may include a virtual microphone creation module 210 and a virtual microphone 220. The creation module 210 can obtain the configuration information of the microphone module from the lower layer, and thereby create the virtual microphone 220. The created virtual microphone 220 can then obtain the audio data collected by the lower layer microphone module and send it to the upper layer request, such as a request from a recording APP.

[0042] When the system includes multiple microphone modules, step S110 may include obtaining configuration information of the multiple microphone modules, and step S120 may include: creating multiple virtual microphones for the configuration information from the multiple microphone modules. When the configuration information of the multiple microphone modules is different from each other, a virtual microphone may be created for each microphone module based on the corresponding configuration information. In some cases, different microphones may have the same or similar configurations (for example, the configuration difference has little effect on the setting of the buffer), in which case these microphones may share a virtual microphone. Figure 3 Another structural example of the audio decoupling device according to the present invention is shown. The virtual microphone creation module 310 obtains different configuration information of three microphone modules from the lower layer, and thereby creates virtual microphones 0, 1 and 2 respectively. The created virtual microphone can then obtain the collected audio data from the lower layer and transmit it to the upper layer.

[0043] When there are multiple virtual microphones, a currently activated virtual microphone can be selected from the multiple virtual microphones, and the audio data obtained by the currently activated virtual microphone is provided to the request for accessing the microphone resource. The selection of the currently activated virtual microphone from the multiple virtual microphones includes at least one of the following: determining the currently activated virtual microphone based on the hardware activation rules of the multiple microphone modules; determining the currently activated virtual microphone according to the selection of the request; and determining the currently activated virtual microphone according to the audio collection signals of the multiple microphone modules.

[0044] For example, it can be stipulated that when the array microphone is activated or inserted, the near-field microphone is unavailable, and then it can be determined that the currently activated virtual microphone corresponds to the array microphone. It can also be activated according to the selection of the upper-layer application, for example, the application requesting the audio data is an application dedicated to obtaining far-field audio. In addition, multiple microphone modules can also be activated at the same time, and the microphone module to be used next can be determined based on the strength of the audio signal it collects, and the corresponding virtual microphone can be activated accordingly.

[0045] When multiple requests all require the acquisition of audio data acquired by the same microphone module, the corresponding virtual microphone may also convert the acquired audio data into multiple copies of audio data, and provide the multiple copies of audio data to the multiple requests for accessing the microphone resource. Specifically, the response to multiple requests may be achieved by duplicating or broadcasting the audio data.

[0046] Figure 4 A conventional Android system architecture and the microphone resource processing path involved therein are shown. As shown in the figure, when the microphone data needs to be accessed, the microphone data (audio data collected by the microphone) is passed to the audio App for related business processing via the microphone driver in the kernel layer, the audio service in the library, the JNI (JAVA local interface) in the Android runtime, and the audio application framework in the application framework layer.

[0047] In order to improve the compatibility of the Android system with the hardware and decouple it from the underlying hardware, a hardware abstraction layer (HAL) can be added above the kernel layer. The hardware abstraction layer is an interface layer between the operating system kernel and the hardware circuit, and its purpose is to abstract the hardware. HAL can hide the hardware interface details of a specific platform and provide a virtual hardware platform for the operating system, making it hardware-independent and portable on multiple platforms. For this reason, the audio decoupling device of the present invention is particularly suitable for being implemented as an audio HAL.

[0048] Figure 5 The Android system architecture with the HAL layer and the microphone resource processing path involved are shown. As shown in the figure, when the microphone data needs to be accessed, the microphone data (audio data collected by the microphone) is passed to the audio App for related business processing via the microphone driver in the kernel layer, the audio decoupling device in the HAL, the audio service in the library, the JNI (JAVA local interface) in the Android runtime, and the audio application framework in the application framework layer. Figure 6 The processing path of the sound sampling data involved in the present invention is described in more detail.

[0049] Figure 6An example of a sound data processing path according to the present invention is shown. As shown in the figure, the microphone module of a certain device may include a near-field microphone, and one or both of a USB array microphone and an embedded array microphone. For example, a smart TV may include a near-field microphone installed in a remote control, an embedded array microphone arranged in a TV host, or a USB array microphone connected via a USB interface. The chip manufacturer is responsible for the setting of the underlying microphone, and the chip manufacturer needs to incorporate the audio data collected by the physical microphone into the operating system via a kernel-state driver. As shown in the figure, the driver of the near-field microphone can be abstracted into a standard ALSA node, and the drivers of both the USB array microphone and the embedded array microphone can be unified into another standard ALSA node. So that the upper layer (e.g., HAL) obtains data via a standard kernel interface.

[0050] In the audio interface implementation layer of the present invention (corresponding to the previous audio decoupling layer), the decoupling of the operating system and the microphone module can be realized through the algorithm by the adaptive array microphone algorithm. Specifically, the adaptive array microphone algorithm can read the configuration information of the microphone hardware from the ALSA node of the lower layer via the standard kernel interface, and the configuration information may include various parameters of the microphone module, such as channel data and sampling rate. After reading the above configuration information, the adaptive array microphone algorithm can dynamically adjust the internal logic based on the above parameters, for example, generate a local HAL for the near-field microphone, generate a remote HAL for the array microphone, and generate other HALs for microphone modules of other configurations, for example. Here, HAL can correspond to the virtual microphone in the above text. Further, the audio interface implementation layer can also adaptively adjust the buffer size of the virtual microphone by configuring parameters. The above HAL can be connected to the audio framework layer of the upper layer via the standard Android interface. The AudioPolicy (audio policy) module in the audio framework layer can obtain the information provided by the HAL and formulate a corresponding audio data acquisition strategy. The AudioFlinger (audio policy execution) module can perform specific audio acquisition operations according to the acquisition strategy provided by AudioPolicy. For example, the array microphone collects audio data at a sampling rate of X for each of the four channels. At this time, the remote HAL created according to the array microphone configuration file can create a buffer of a size that is suitable for its number of channels and sampling rate, and AudioFlinger can establish a corresponding thread under the guidance of AudioPolicy to timely obtain and process the above audio data, and pass it to the audio application at the application layer. The audio application can switch to near-field or far-field voice recording according to the current specific scenario. For example, in the application scenario of smart TV, the near-field microphone in the remote control can be used by default for audio collection (the microphone button on the remote control needs to be pressed). After the USB array microphone is inserted, it can be switched to the array microphone for audio collection, and the remote HAL can be used for audio data collection and transmission. When the USB array microphone is inserted, if the user presses the microphone button on the remote control, the USB array microphone can be temporarily disabled at this time, and the near-field microphone and its corresponding local HAL can be activated for audio collection and processing during the time when the microphone button is pressed.

[0051] To this end, the present invention can also be implemented as a terminal microphone resource access method, including: creating a virtual microphone based on the configuration information of the microphone module; the virtual microphone obtains audio data collected by the microphone driver via the microphone module, and provides the obtained audio data to the upper-level microphone application framework; the microphone application framework provides the audio data to the corresponding application requesting the microphone resource.

[0052] Specifically, an audio collection buffer can be created according to the configuration information, and the virtual microphone puts the acquired audio data into the audio collection buffer. In addition, the size of the audio collection buffer can be modified according to the current setting of the request.

[0053] The microphone data acquisition and distribution scheme in the present invention is preferably implemented in the kernel layer and the HAL layer, for example, as an audio interface implementation layer or a virtual microphone. The virtual microphone is directly created based on the configuration of the hardware microphone and performs data distribution, thereby achieving imperceptible access and decoupling for the upper application framework and application layer.

[0054] The access scheme of the present invention can also be implemented as an operating system. Figure 7 A schematic diagram of the composition of an operating system according to an embodiment of the present invention is shown. The operating system 700 is installed with multiple applications and includes: a creation unit 710, which is used to obtain configuration information of a microphone module and create a virtual microphone according to the configuration information; and a virtual microphone 720, which is used to obtain audio data collected by the microphone module and provide the obtained audio data to a request for accessing a microphone resource.

[0055] In one embodiment, the operating system 700 may further include: a microphone driver, configured to collect audio data via a microphone module, and the microphone resource acquisition module is configured to acquire the audio data from the microphone driver.

[0056] In one embodiment, the creation unit 710 may obtain configuration information of multiple microphone modules, and may create a virtual microphone for each microphone module based on the corresponding configuration information.

[0057] When there are multiple virtual microphones in the present invention, the operating system 700 may further include: a virtual microphone activation module, which is used to select a currently activated virtual microphone from the multiple virtual microphones, and the currently activated microphone is used to provide the acquired audio data to the request for accessing the microphone resource. The virtual microphone activation module determines the currently activated virtual microphone according to at least one of the following: hardware activation rules of multiple microphone modules; the selection of the request; and audio collection signals of multiple microphone modules.

[0058] In addition, the creation unit 710 can also be used to: create an audio acquisition buffer according to the configuration information, and the audio acquisition buffer is used to buffer the audio data obtained by the virtual microphone. Further, the creation unit 710 can also be used to: modify the size of the audio acquisition buffer according to the current setting of the request.

[0059] As mentioned above, the virtual microphone is preferably provided at the hardware abstraction layer, communicating with the kernel layer via the kernel standard interface and communicating with the framework layer via the Android standard interface.

[0060] When the microphone module is a separate device or an accessory independent of the device installed with the operating system 700, the operating system 700 also needs to include a networking unit for establishing a communication connection with the microphone module or a device including the microphone module and obtaining audio data collected by the microphone module. The audio data obtained by the networking unit can then be provided to the virtual microphone 720 for corresponding processing.

[0061] As described above, the virtual microphone of the present invention is preferably a virtual microphone module implemented in the kernel state of the operating system. In a wider range of application scenarios, the virtual microphone can have other implementation forms. For example, a virtual microphone including an external request interface can obtain audio data provided by an external microphone module. In addition, the present invention can also be implemented as an application for accessing terminal microphone resources, which is used to: obtain audio data based on an access request issued by it, wherein the audio data is provided by the virtual microphone as described above.

[0062] Figure 8 A schematic diagram of the structure of a computing device that can be used to implement the microphone resource access method according to an embodiment of the present invention is shown.

[0063] See also Figure 8 The computing device 800 includes a memory 810, a processor 820 and a microphone 830. Preferably, the computing device 800 may be installed with an operating system as described above, for example, an operating system customized according to the present invention (for example, customized at the HAL layer).

[0064] The processor 820 may be a multi-core processor or may include multiple processors. In some embodiments, the processor 820 may include a general-purpose main processor and one or more special coprocessors, such as a graphics processing unit (GPU), a digital signal processor (DSP), etc. In some embodiments, the processor 820 may be implemented using a customized circuit, such as an application-specific integrated circuit (ASIC) or a field programmable gate array (FPGA).

[0065] The memory 810 may include various types of storage units, such as system memory, read-only memory (ROM), and permanent storage devices. Among them, ROM can store static data or instructions required by the processor 820 or other modules of the computer. The permanent storage device may be a readable and writable storage device. The permanent storage device may be a non-volatile storage device that does not lose the stored instructions and data even after the computer is powered off. In some embodiments, the permanent storage device uses a large-capacity storage device (such as a magnetic or optical disk, flash memory) as a permanent storage device. In some other embodiments, the permanent storage device may be a removable storage device (such as a floppy disk, optical drive). The system memory may be a readable and writable storage device or a volatile readable and writable storage device, such as a dynamic random access memory. The system memory may store some or all instructions and data required by the processor at run time. In addition, the memory 810 may include any combination of computer-readable storage media, including various types of semiconductor memory chips (DRAM, SRAM, SDRAM, flash memory, programmable read-only memory), and disks and / or optical disks may also be used. In some embodiments, the memory 810 may include a readable and / or writable removable storage device, such as a laser disc (CD), a read-only digital versatile disc (e.g., DVD-ROM, double-layer DVD-ROM), a read-only Blu-ray disc, an ultra-density optical disc, a flash memory card (e.g., SD card, mini SD card, Micro-SD card, etc.), a magnetic floppy disk, etc. The computer-readable storage medium does not include carrier waves and transient electronic signals transmitted wirelessly or wired.

[0066] The memory 810 stores executable codes, and when the executable codes are processed by the processor 820 , the processor 820 can execute the microphone resource access method mentioned above.

[0067] The access scheme of the present invention can also be implemented as a terminal, including a microphone module, and installed with the above-mentioned operating system. The terminal can be various common smart terminals, such as smart phones, tablet computers, smart speakers and smart TVs, and in particular can be smart devices with separate microphone modules, such as smart speakers that communicate with smart voice stickers at short distances, smart TVs that communicate with remote controllers, etc.

[0068] The microphone resource access, operating system and terminal according to the present invention have been described in detail above with reference to the accompanying drawings. Based on the Android system architecture, this solution inserts an audio decoupling layer, and supports array microphones with different parameters (sampling rate, number of channels, bit depth, etc.) and forms (built-in, external) and decoupling of different chip platforms from the upper operating system through array microphone configuration and buffer adaptation technology, thereby simplifying the product development process and reducing the difficulty of its subsequent maintenance.

[0069] In addition, the method according to the present invention may also be implemented as a computer program or a computer program product, which includes computer program code instructions for executing the above steps defined in the above method of the present invention.

[0070] Alternatively, the present invention may also be implemented as a non-temporary machine-readable storage medium (or computer-readable storage medium, or machine-readable storage medium) on which executable code (or computer program, or computer instruction code) is stored. When the executable code (or computer program, or computer instruction code) is executed by a processor of an electronic device (or computing device, server, etc.), the processor executes the various steps of the above-mentioned method according to the present invention.

[0071] Those skilled in the art will further appreciate that the various illustrative logical blocks, modules, circuits, and algorithm steps described in connection with the disclosure herein may be implemented as electronic hardware, computer software, or a combination of both.

[0072] The flow chart and block diagram in the accompanying drawings show the possible architecture, function and operation of the system and method according to multiple embodiments of the present invention. In this regard, each square box in the flow chart or block diagram can represent a part of a module, program segment or code, and the part of the module, program segment or code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two continuous square boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0073] The embodiments of the present invention have been described above, and the above description is exemplary, not exhaustive, and is not limited to the disclosed embodiments. Many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The terms used herein are selected to best explain the principles of the embodiments, practical applications, or improvements to the technology in the market, or to enable other persons of ordinary skill in the art to understand the embodiments disclosed herein.

Claims

1. A method for accessing a microphone resource, comprising: Get the configuration information of multiple microphone modules; Creating a plurality of virtual microphones according to the configuration information from the plurality of microphone modules; selecting a currently activated virtual microphone from among the plurality of virtual microphones; The currently activated virtual microphone acquires audio data collected by the corresponding microphone module; as well as providing the audio data acquired by the currently activated virtual microphone to the request for access to the microphone resource, Among them, the virtual microphone provides configuration information to the request, the request comes from the upper-layer application and determines the currently activated virtual microphone based on the selection of the request, and when corresponding audio output is required, sets the output parameters of the audio data based on the configuration information to select the corresponding audio output device to output audio with the corresponding output frequency or left and right channel distribution.

2. The method of claim 1, wherein: The virtual microphone acquires the audio data collected by the microphone module, including: The virtual microphone acquires audio data acquired by a microphone driver.

3. The method of claim 1, wherein: Selecting a currently activated virtual microphone from the plurality of virtual microphones comprises at least one of the following: Determining a currently activated virtual microphone based on hardware activation rules of the plurality of microphone modules; and According to the audio collection signals of the multiple microphone modules, a currently activated virtual microphone is determined.

4. The method of claim 1, wherein: Creating a virtual microphone according to the configuration information includes: An audio acquisition buffer is created according to the configuration information, and the audio acquisition buffer is used to buffer the audio data acquired by the virtual microphone.

5. The method of claim 4, further comprising: The size of the audio capture buffer is modified according to the current setting of the request.

6. The method of claim 1, further comprising: The virtual microphone converts the acquired audio data into multiple audio data, and Providing the acquired audio data to the request for accessing the microphone resource includes: The plurality of audio data are provided separately to the plurality of requests for access to the microphone resource.

7. The method of claim 1, wherein: Creating a virtual microphone according to the configuration information includes: The virtual microphone is created in the hardware abstraction layer.

8. The method of claim 7, further comprising: The virtual microphone communicates with the kernel layer via a kernel standard interface; and / or The virtual microphone communicates with the framework layer via an Android standard interface.

9. The method of claim 1, wherein: The request includes at least one of the following: Access requests from applications within the same operating system; and External access requests from other devices within the networked system.

10. The method of claim 1, further comprising: A communication connection is established with the microphone module or a device including the microphone module.

11. The method of claim 10, wherein: The virtual microphone acquires the audio data collected by the microphone module, including: Via the established communication connection, the virtual microphone obtains the audio data collected by the microphone module.

12. The method of claim 10, wherein: Providing the acquired audio data to the request for accessing the microphone resource includes: The acquired audio data is provided to the request for access to a microphone resource via the established communication connection.

13. The method of claim 1, further comprising: The request sets output parameters of the audio data based on the configuration information.

14. A virtual microphone, configured to execute the method according to any one of claims 1 to 13.

15. An operating system having a plurality of applications installed thereon, the operating system comprising an audio decoupling module, the audio decoupling module comprising: A creation unit, configured to obtain configuration information of a plurality of microphone modules and create a plurality of virtual microphones according to the configuration information from the plurality of microphone modules; a virtual microphone activation unit, configured to select a currently activated virtual microphone from among the plurality of virtual microphones; The currently activated virtual microphone is used to obtain audio data collected by the corresponding microphone module and provide the obtained audio data to the request for accessing the microphone resource. Among them, the virtual microphone provides configuration information to the request, the request comes from the upper-layer application and determines the currently activated virtual microphone based on the selection of the request, and when corresponding audio output is required, sets the output parameters of the audio data based on the configuration information to select the corresponding audio output device to output audio with the corresponding output frequency or left and right channel distribution.

16. The operating system of claim 15, further comprising: A microphone driver for collecting audio data via a microphone module, and The virtual microphone is used to obtain the audio data from the microphone driver.

17. The operating system of claim 15, wherein: The creation unit creates a virtual microphone for each microphone module based on corresponding configuration information.

18. The operating system of claim 15, wherein: The virtual microphone activation unit determines the currently activated virtual microphone according to at least one of the following: Hardware activation rules for multiple microphone modules; and Audio acquisition signals from multiple microphone modules.

19. The operating system of claim 15, wherein: The creation unit is also used for: An audio acquisition buffer is created according to the configuration information, and the audio acquisition buffer is used to buffer the audio data acquired by the virtual microphone.

20. The operating system of claim 19, wherein: The creation unit is also used for: The size of the audio capture buffer is modified according to the current setting of the request.

21. The operating system of claim 15, wherein: The virtual microphone is arranged in the hardware abstraction layer, communicates with the kernel layer via the kernel standard interface and communicates with the framework layer via the Android standard interface.

22. The operating system of claim 15, further comprising: A networking unit is used to establish a communication connection with the microphone module or a device including the microphone module, and to obtain audio data collected by the microphone module.

23. A terminal comprising a microphone module and having installed thereon an operating system as claimed in any one of claims 15 to 22 or for executing the method as claimed in any one of claims 1 to 13.

24. The terminal according to claim 23, wherein: The terminal includes at least one of the following: Smart speakers; Smartphones; and Smart TV.

25. The terminal according to claim 24, wherein: The terminal is a smart device with a separate microphone module.

26. A method for accessing a terminal microphone resource, comprising: Creating a plurality of virtual microphones according to configuration information of a plurality of microphone modules, wherein the configuration information includes channel data and sampling rates of the microphone modules; selecting a currently activated virtual microphone from among the plurality of virtual microphones; The currently activated virtual microphone obtains audio data collected by the microphone driver via the corresponding microphone module, and provides the obtained audio data to the upper-layer microphone application framework; The microphone application framework provides the audio data to the corresponding application requesting the microphone resource. Among them, the virtual microphone provides configuration information to the application, the application determines the currently activated virtual microphone, and when corresponding audio output is required, sets the output parameters of the audio data based on the configuration information to select the corresponding audio output device to output audio with the corresponding output frequency or left and right channel distribution.

27. The method of claim 26, further comprising: Create an audio capture buffer according to the configuration information, And the virtual microphone puts the acquired audio data into the audio acquisition buffer.

28. The method of claim 27, further comprising: The size of the audio capture buffer is modified according to the current setting of the request.

29. An application for accessing a terminal microphone resource, for: The audio data is obtained based on the access request issued by the user, wherein: The audio data is provided by a virtual microphone as claimed in claim 14.

30. A computing device comprising: processor; as well as A memory having executable codes stored thereon, which, when executed by the processor, causes the processor to execute the method according to any one of claims 1 to 13 and claims 26 to 29.

31. A non-transitory machine-readable storage medium having executable code stored thereon, which, when executed by a processor of an electronic device, causes the processor to execute the method as claimed in any one of claims 1-13 and claims 26-29.