Audio data processing method, system, data processing device and storage medium

By filtering multi-channel data on the audio bus in the audio data processing equipment, intelligent voice and ordinary recording can work simultaneously, which solves the problem of too many audio buses, reduces the demand for audio buses, and improves the success rate of speech recognition and Human-computer interaction experience.

CN116709112BActive Publication Date: 2024-10-29BYD CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210173756.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-02-24
Publication Date
2024-10-29
Estimated Expiration
2042-02-24

AI Technical Summary

Technical Problem

With the trend of automobile intelligence and networking, when smart voice and ordinary recording work at the same time, they need independent audio buses, resulting in a large number of audio buses and it is impossible to achieve simultaneous operation without interference with less than two groups. .

Method used

Obtain N channels of audio data from the audio processor through the audio bus, and filter out a channel of audio data required by the target application in the data processing device to achieve the audio data acquisition requirements of at least two applications and reduce the required audio Number of buses.

Benefits of technology

When at least two applications have audio data acquisition requirements at the same time, the number of required audio buses is reduced, intelligent voice and ordinary recording can work without interfering with each other, and the success rate of speech recognition and human-computer interaction experience are improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116709112B_ABST
    Figure CN116709112B_ABST
Patent Text Reader

Abstract

The embodiment of the present application provides an audio data processing method, system, data processing device and storage medium, the audio data processing method comprising: the data processing device obtains N channels of audio data from the audio processor through an audio bus; and filters out a channels of audio data required by a target application from the N channels of audio data, the target application being any one of at least two applications installed in the data processing device. The embodiment of the present application can reduce the number of required audio buses when at least two applications have audio data acquisition requirements at the same time.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of audio technology, and in particular to an audio data processing method, system, data processing device and storage medium. Background Art

[0002] With the trend of intelligent and networked cars, longer, more frequent and deeper human-computer interactions are becoming an important development theme in the automotive industry. Intelligent voice is one of the most important human-computer interaction methods in the smart cockpit of cars. Intelligent voice refers to the first application, which runs all the time after it is turned on. It is an important interactive entrance to the smart cockpit, including voice recognition, wake-up, positioning and other functions. In order to improve the success rate of voice recognition, noise reduction processing is required. Ordinary recording refers to the voice function of the second application. Ordinary recording does not require noise reduction. Therefore, the number of channels of audio data required for intelligent voice and ordinary voice is different.

[0003] In order to ensure that intelligent voice and ordinary recording do not interfere with each other. The first application and the second application read audio data from different audio buses respectively. For example, the first application reads the audio data of the required number of channels from the first audio bus, and the second application reads the audio data of the required number of channels from the second audio bus. The two can work simultaneously without interfering with each other. At present, intelligent voice and ordinary recording require independent audio buses to work simultaneously, which requires at least 2 groups of audio buses to achieve, and more audio buses are required. Summary of the invention

[0004] Embodiments of the present application provide an audio data processing method, system, data processing device, and storage medium, which can reduce the number of required audio buses when at least two applications have audio data acquisition requirements at the same time.

[0005] A first aspect of an embodiment of the present application provides an audio data processing method, which is applied to a data processing device, and includes:

[0006] The data processing device obtains N channels of audio data from the audio processor via the audio bus; N is an integer greater than or equal to 2;

[0007] Audio data of a channels required by a target application is screened out from the N channels of audio data, where the target application is any one of at least two applications installed in the data processing device, and a is a positive integer less than or equal to N.

[0008] A second aspect of an embodiment of the present application provides an audio processing system, comprising: an audio processor, an audio bus, and a data processing device, wherein the audio processor and the data processing device are connected via the audio bus;

[0009] The data processing device is used to obtain N channels of audio data from the audio processor through the audio bus; N is an integer greater than or equal to 2;

[0010] The data processing device is further used to filter out a channels of audio data required by a target application from the N channels of audio data, where the target application is any one of at least two applications installed in the data processing device, and a is a positive integer less than or equal to N.

[0011] A third aspect of an embodiment of the present application provides a data processing device, including:

[0012] An acquisition unit, used to acquire N-channel audio data from the audio processor through an audio bus; N is an integer greater than or equal to 2;

[0013] The screening unit is used to screen out a channels of audio data required by a target application from the N channels of audio data, where the target application is any one of at least two applications installed in the data processing device, and a is a positive integer less than or equal to N.

[0014] The fourth aspect of an embodiment of the present application provides a data processing device, including a processor and a memory, the memory is used to store a computer program, the computer program includes program instructions, and the processor is configured to call the program instructions to execute the step instructions in the first aspect of the embodiment of the present application.

[0015] The fifth aspect of the embodiments of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program for electronic data exchange, wherein the computer program enables a computer to execute part or all of the steps described in the first aspect of the embodiments of the present application.

[0016] The sixth aspect of the embodiments of the present application provides a computer program product, wherein the computer program product includes a computer program, and the computer program is operable to cause a computer to execute some or all of the steps described in the first aspect of the embodiments of the present application. The computer program product can be a software installation package.

[0017] In the embodiment of the present application, the data processing device obtains N-channel audio data from the audio processor through the audio bus; N is an integer greater than or equal to 2; the audio data of a channels required by the target application is screened out from the audio data of the N channels, the target application is any one of at least two applications installed in the data processing device, and a is a positive integer less than or equal to N. In the embodiment of the present application, the audio data required by each of the at least two applications can be screened from the N-channel audio data obtained from one audio bus, and only one set of audio buses is needed to realize the acquisition requirements of the audio data of at least two applications, and the number of required audio buses can be reduced when at least two applications have the audio data acquisition requirements at the same time. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0019] Figure 1 is a structural diagram of an audio processing system provided in an embodiment of the present application;

[0020] Figure 2 It is a flowchart of an audio data processing method provided in an embodiment of the present application;

[0021] Figure 3 This is a schematic diagram of one channel demand data processing provided by an embodiment of the present application;

[0022] Figure 4 This is a schematic diagram of a data flow provided by an embodiment of the present application;

[0023] Figure 5 This is a schematic diagram of 2-channel demand data processing provided by an embodiment of the present application;

[0024] Figure 6 A schematic diagram of the structure of a data processing device provided in an embodiment of the present application;

[0025] Figure 7 It is a structural diagram of another data processing device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0026] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0027] The terms "first", "second", etc. in the specification and claims of this application and the above-mentioned drawings are used to distinguish different objects, rather than to describe a specific order. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not limited to the listed steps or units, but optionally includes steps or units that are not listed, or optionally includes other steps or units inherent to these processes, methods, products or devices.

[0028] Reference to "embodiments" in this application means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described in this application may be combined with other embodiments.

[0029] See also Figure 1 , Figure 1 Schematic diagram of the structure of an audio processing system provided in an embodiment of the present application. Figure 1 As shown, the audio processing system 100 may include: an audio processor 10, an audio bus 20 and a data processing device 30. The audio processor 10 is connected to the data processing device 30 via the audio bus 20, and the data processing device 30 is installed with at least two applications;

[0030] The data processing device 30 is used to obtain N channels of audio data from the audio processor 10 through the audio bus 20; N is an integer greater than or equal to 2;

[0031] The data processing device 30 is further used to filter out a channels of audio data required by a target application from the N channels of audio data, where the target application is any one of at least two applications installed in the data processing device, and a is a positive integer less than or equal to N.

[0032] The data processing device 30 may be a component of the vehicle computer. For example, it may be a module on the vehicle computer with data processing functions. Specifically, the data processing device 30 may be a system on chip (SOC). The audio processor 10, the audio bus 20 and the data processing device 30 may be integrated into the same device or may exist separately.

[0033] In an embodiment of the present application, the at least two applications may include a first application (e.g., an intelligent voice application) and a second application (e.g., an ordinary recording application). After the data processing device 30 is turned on, the first application can be running all the time. The first application can be an important interactive entrance of the smart cockpit, including functions such as voice recognition, wake-up, and positioning. In order to improve the success rate of voice recognition, noise reduction processing is required. When the first application is an intelligent voice application, the function responsible for voice recognition in the first application requires at least 2 channels of audio data, and the 2 channels include 1 channel microphone (mic) audio data and 2 channels of reference signal data. For example, if there is a microphone installed in the car (the microphone can be installed near the driving seat), then N=2, and the audio data of the N channels includes 1 channel microphone audio data and 1 channel reference audio data (e.g., a left channel reference audio data). Filtering out the a channel audio data required by the first application from the N channel audio data can specifically include: filtering out the 2 channels of audio data required by the first application from the N channel audio data. If there are two microphones installed in the car (the two microphones can be installed near the main driver's seat and the co-driver's seat respectively), then N=4, and the N-channel audio data includes 2-channel microphone audio data and 2-channel reference audio data (including a left channel reference audio data and a right channel reference audio data). Filtering out a channels of audio data required by the first application from the N-channel audio data can specifically include: filtering out 4 channels of audio data required by the first application from the N-channel audio data. If there are four microphones installed in the car (the four microphones can be installed near the main driver's seat and the co-driver's seat, near the left seat of the second row, and near the right seat of the second row), then N=6, and the N-channel audio data includes 4 channels of microphone audio data and 2 channels of reference audio data (including a left channel reference audio data and a right channel reference audio data). Filtering out a channels of audio data required by the first application from the N channels of audio data may specifically include: filtering out 4 channels of audio data (2 channels of microphone audio data and 2 channels of reference audio data) or 6 channels of audio data required by the first application from the N channels of audio data. If there are 6 microphones installed in the car (the 6 microphones can be installed near the main driver's seat and the co-driver's seat, near the left seat of the second row, near the right seat of the second row, near the left seat of the third row, and near the right seat of the third row), then N=8, and the N channels of audio data include 6 channels of microphone audio data and 2 channels of reference audio data (including one left channel of reference audio data and one right channel of reference audio data).Filtering out a channels of audio data required by the first application from the N channels of audio data may specifically include: filtering out 4 channels of audio data (2 channels of microphone audio data and 2 channels of reference audio data) or 6 channels of audio data (4 channels of microphone audio data and 2 channels of reference audio data) or 8 channels of audio data required by the first application from the N channels of audio data.

[0034] Common recording applications may include map applications (Baidu Maps, Tencent Maps), music applications, chat applications, and other second applications with built-in voice functions. The second application may collect audio data of microphones of b channels.

[0035] The first application is one of the entrances to human-computer interaction. The data processing device 30 is started when it is turned on. It can continuously obtain microphone (mic) voice data and monitor user voice input. The second application is started when the user needs it (for example, when the user needs to voice control the map application for navigation). In order to achieve a good human-computer interaction experience, it is necessary to use application functions such as Baidu map intelligent voice, QQ voice, WeChat voice, etc. when the intelligent voice is working. It is also necessary that the intelligent voice of the second application can work normally at this time and can accurately recognize the user's voice instructions.

[0036] The audio processor 10 can obtain audio data collected by the microphone from the microphone, and can also obtain reference audio data from a working application with an audio playback function (e.g., a music application). After the audio processor 10 processes the acquired data, it can obtain N-channel audio data, and can transmit the N-channel audio data to the data processing device 30 through the audio bus 20. The data processing device 30 can select the required audio data from the N-channel audio data for processing according to the requirements of the first application and the second application.

[0037] For the first application being an intelligent voice application, since the first application needs to consider the success rate of voice recognition, noise reduction is required. For example, in the vehicle environment, there will be music signals and sound source signals at the same time, which will be transmitted to the microphone (mic) at the same time. During voice recognition, the music signal needs to be shielded, which is echo cancellation. The echo cancellation in this example uses the music signal as a reference signal to suppress environmental noise and enhance the effective voice signal. Echo cancellation requires a voice processing module with noise reduction function in the data processing device for processing. At least 2 channels because at least 1 channel microphone (mic) + at least 1 channel reference (for example, it can be music noise).

[0038] For the second application, which is a common recording application (it can also be a small program), it only needs to obtain the microphone (mic) signal and does not need to obtain the reference signal. Generally, it requires 1 or 2 channels, and it does not have a related noise reduction processing module and does not require noise reduction processing.

[0039] The audio bus 20 may be a communication bus capable of transmitting audio data, such as an Inter IC Sound (I2S) bus, which may also be referred to as an integrated circuit internal audio bus.

[0040] In an embodiment of the present application, the audio data required by each of at least two applications can be screened from the audio data of N channels obtained from an audio bus. Only one set of audio buses is needed to meet the audio data acquisition requirements of at least two applications, and the number of required audio buses can be reduced when at least two applications have audio data acquisition requirements at the same time.

[0041] Optional, such as Figure 1 As shown, the audio processing system 100 may also include M microphones (eg Figure 1 41, 42, ... 4M) shown;

[0042] The audio processor 10 is used to obtain M channels of microphone raw data from the M microphones and P channels of raw reference data from the reference audio channel;

[0043] The audio processor 10 is further used to process the M-channel microphone raw data to obtain the microphone audio data of the M channel, and to process the P-channel raw reference data to obtain the reference audio data of the P channel; the N-channel audio data includes the microphone audio data of the M channel and the reference audio data of the P channel; N is the sum of M and P, M is an integer greater than or equal to 1, and P is an integer greater than or equal to 1. It should be noted that Figure 1 For ease of understanding, take M greater than or equal to 3 as an example.

[0044] In the embodiment of the present application, the reference audio channel may be an audio transmission channel established between an application with an audio playback function (eg, a music application) and the audio processor 10. The application with an audio playback function may be installed on the data processing device 30.

[0045] After the audio processor 10 obtains M-channel microphone raw data from M microphones, it can process the M-channel microphone raw data. Similarly, after the audio processor 10 obtains P-channel raw reference data with reference to the audio channel, it can process the P-channel raw reference data to obtain reference audio data of the P channel. For example, the audio processor 10 can be an audio digital signal processor (Audio Digital Signal Processing, ADSP), which can perform encoding and decoding, analog-to-digital conversion, packaging and other processing on the raw audio data, and the processed audio data can be further processed by the first application and the second application.

[0046] The following method embodiments can be applied to Figure 1 The audio processing system shown.

[0047] See also Figure 2 , Figure 2 FIG. 1 is a flow chart of an audio data processing method provided in an embodiment of the present application. Figure 2 As shown, the method includes the following steps.

[0048] 201. A data processing device obtains N-channel audio data from an audio processor via an audio bus.

[0049] Wherein, N is an integer greater than or equal to 2.

[0050] In the embodiment of the present application, the data processing device obtains N-channel audio data from the audio processor through the audio bus, and can provide it to at least two applications (for example, the first application and the second application) for use.

[0051] Optionally, the N-channel audio data includes M-channel microphone audio data and P-channel reference audio data; N is the sum of M and P, M is an integer greater than or equal to 1, and P is an integer greater than or equal to 1.

[0052] When the first application is an intelligent voice application, in order to improve the success rate of voice recognition, the first application needs to perform noise reduction processing. When the first application processes the audio data of the N channel, it can perform noise reduction processing on the microphone audio data of the M channel based on the reference audio data of the P channel, thereby filtering out the noise (for example, music) in the voice collected by the microphone, thereby improving the success rate of voice recognition of the first application.

[0053] Wherein, P may be equal to 1 or 2. When P=1 and M=1, the reference audio data of the P channel may include the reference audio data of the left channel or the reference audio data of the right channel, and the microphone audio data of the M channel may include the audio data collected by the microphone arranged near the main driving seat or the audio data collected by the microphone arranged near the co-driving seat. For example, if the main driving seat is located on the left front row of the vehicle, the reference audio data may include the reference audio data of the left channel, and the microphone audio data may include the audio data collected by the microphone arranged near the main driving seat. If the main driving seat is located on the right front row of the vehicle, the reference audio data may include the reference audio data of the right channel, and the microphone audio data may include the audio data collected by the microphone arranged near the main driving seat.

[0054] When P=2 and M=2, the reference audio data of the P channel may include reference audio data of the left channel and reference audio data of the right channel, and the microphone audio data of the M channel may include audio data collected by a microphone set near the main driver's seat and audio data collected by a microphone set near the co-driver's seat.

[0055] When P=2 and M=4, the reference audio data of the P channel may include reference audio data of the left channel and reference audio data of the right channel, and the microphone audio data of the M channel may include audio data collected by a microphone set near the main driver's seat, audio data collected by a microphone set near the co-driver's seat, audio data collected by a microphone set near the left seat of the second row, and audio data collected by a microphone set near the right seat of the second row.

[0056] Among them, when P=2, M=6, 8, etc., the above embodiments can be referred to and will not be described in detail here.

[0057] Optionally, the data processing device obtains N-channel audio data from the audio processor through the audio bus, which may specifically include the following steps:

[0058] (11) The data processing device receives K audio data frames output by the audio processor through the audio bus, each of the K audio data frames includes frame data of N channels, and K is a positive integer;

[0059] (12) The data processing device places the K audio data frames into an audio buffer in the order of receiving time, and obtains the audio data of the N channels.

[0060] In the embodiment of the present application, the audio processor can collect original audio data from M microphones according to the set sampling frequency and sampling bit number. At the same time, the audio processor can also obtain reference audio data from a working application with an audio playback function (e.g., a music application) according to the set sampling frequency and sampling bit number. The audio processor can perform encoding and decoding, analog-to-digital conversion, packaging, etc. on the collected original audio data and reference audio data to obtain K audio data frames.

[0061] After receiving the K audio data frames output by the audio processor through the audio bus, the data processing device can put the K audio data frames into the audio buffer in the order of receiving time to obtain N channels of audio data.

[0062] Each of the K audio data frames includes frame data of N channels. Specifically, each of the K audio data frames includes frame data of N channels. The frame data of N channels included in each of the K audio data frames constitute the audio data of the N channels. The audio data of each channel in the audio data of the N channels includes a combination of frame data of corresponding channels in the K audio data frames.

[0063] 202 , filtering out a channels of audio data required by a target application from the N channels of audio data.

[0064] The target application is any one of at least two applications installed in the data processing device, and a is a positive integer less than or equal to N.

[0065] In a possible embodiment, a=N, when the target application is an intelligent voice application, in order to improve the success rate of voice recognition, the target application may need as much audio data as possible. For the N-channel audio data obtained by the data processing device from the audio bus, the first application may not need to filter them, but use them all for processing.

[0066] In another possible embodiment, a<N, when the target application is a common recording application, in order to reduce the complexity of voice processing, the target application can filter out a channels of audio data required by the target application from the N channels of audio data.

[0067] In an embodiment of the present application, the audio data of N channels may include the audio data of the microphone channel and the audio data of the reference channel. If the target application does not have a noise reduction processing requirement (for example, the target application is a common recording application), it is not necessary to obtain the audio data of the reference channel, and it is only necessary to obtain the audio data of the microphone channel. The audio data of a channels required by the target application can be filtered out from the audio data of N channels. For example, when the target application needs to obtain the audio data of one channel, it is necessary to filter out the audio data of one microphone channel from the audio data of N channels. When the target application needs to obtain the audio data of at least two channels, it is necessary to filter out the audio data of at least two microphone channels from the audio data of N channels.

[0068] For example, some target applications only support processing of single-channel audio data, and there is only one microphone installed in the car. The target application needs to obtain audio data from the microphone channel. At this time, the audio data of the microphone channel can be filtered from the audio data of N channels.

[0069] For example, some target applications only support processing of single-channel audio data. If two or more microphones are installed in the car, the target application needs to filter the audio data of the required channel from the audio data obtained from the two or more microphone channels.

[0070] For example, some target applications support processing of dual-channel audio data. If two or more microphones are installed in a car, the target application needs to filter audio data of a required channel from the audio data obtained from the two or more microphone channels.

[0071] After the target application obtains the audio data of a channels, it can perform subsequent processing on the audio data of a channels. For example, for a map application, after its voice recognition function is awakened, the user can send a voice signal (for example, a place name), and the map application can Figure 2 After the method obtains the audio data of one channel or the audio data of at least two channels, speech recognition processing can be performed, corresponding search terms can be generated, corresponding locations can be searched, and a navigation route can be generated.

[0072] Optionally, the audio data of the N channels are encapsulated in K audio data frames, and the K audio data frames are stored in an audio cache, each of the K audio data frames contains frame data of N channels, and K is a positive integer.

[0073] In an embodiment of the present application, the audio data of N channels obtained by the data processing device from the audio processor through the audio bus can be stored in the audio buffer. The data processing device can obtain K audio data frames from the audio processor through the audio bus, each of the K audio data frames including frame data of N channels, where K is a positive integer.

[0074] Optionally, in step 202, filtering out a channels of audio data required by the target application from the N channels of audio data may specifically include the following steps:

[0075] (21) creating a first buffer, wherein a capacity ratio of the first buffer to the audio buffer is greater than or equal to a / N;

[0076] (22) respectively filtering out frame data of a channels from the frame data of N channels contained in each of the K audio data frames, to obtain a first filtered data frame corresponding to each audio data frame; wherein each first filtered data frame includes frame data of a channels filtered out from the corresponding audio data frame;

[0077] (23) Each first filtered data frame is placed into the first cache in the order of the reception time of the audio data frame corresponding to each first filtered data frame, so as to obtain the audio data of a channels required by the target application.

[0078] In the embodiment of the present application, filtering out a channels of audio data from N channels of audio data can be achieved by creating threads and caches. The created threads and caches can be implemented by Java code.

[0079] The size of the created cache can be determined based on the number of channels to be screened. Generally speaking, the more channels there are, the larger the size of the cache. When it is determined that the number of channels to be screened is a, the size of the first cache created can be selected as follows: the capacity ratio of the first cache to the audio cache is greater than or equal to a / N. The size of the first cache can also be determined based on the corresponding relationship between the number of channels and the cache size (the number of channels and the cache size can be positively correlated, specifically can be a positive proportional relationship). Putting the audio data of the screened a channels into the first cache can facilitate the subsequent target application to obtain the audio data from the first cache. The first cache can be a first-in-first-out (FIFO) cache. The audio data of the screened a channels are placed in the first cache in the order of the reception time of the K audio data frames to ensure that the target application can obtain the audio data from the first cache in time order, avoiding the audio data obtained by the target application being disrupted in time order, thereby improving the processing effect of the target application on the audio data.

[0080] Optionally, the frame data of a channels screened out from each audio data frame are all the same frame data of a channels.

[0081] In the embodiment of the present application, in the N channels of audio data, each channel may include K frames of data. The following is an example of a=1, N=4, M=2, and P=2. Figure 3 , Figure 3 1 is a schematic diagram of a channel demand data processing provided by an embodiment of the present application. Figure 3 As shown, in the K frame data, each frame includes microphone audio data of the left channel (MIC_L), microphone audio data of the right channel (MIC_R), reference audio data of the left channel (REF_L) and reference audio data of the right channel (REF_R). The microphone audio data of the left channel of each frame in the K frame data is filtered out to obtain the microphone audio data of the left channel contained in the K frame data. Among them, the filtered data is arranged in time sequence from the first frame to the K frame, and enters the first cache of first-in-first-out in time sequence. When the target application needs to process the microphone audio data of the left channel in the K frame, the data is also taken from the first cache according to the first-in-first-out strategy.

[0082] Optionally, in step 202, filtering out a channels of audio data required by the target application from the N channels of audio data may specifically include the following steps:

[0083] If a is equal to 1, audio data of a first channel is filtered out from the microphone audio data of the M channels, and the first channel is one of the M channels.

[0084] In the embodiment of the present application, the read function may be a read function in Java, which may continuously read the audio data stream.

[0085] See also Figure 4 , Figure 4 This is a schematic diagram of a data flow provided by an embodiment of the present application. Figure 4 As shown, the data processing device may include an audio platform layer, an audio hardware abstraction layer and a kernel layer.

[0086] In the embodiment of the present application, the audio platform layer may be audioflinger, which, as an Android audio framework layer, may be created through threads (such as Figure 4 The first thread / second thread in the audio linger continuously obtains data from the audiohal, and the audioflinger can also have control logic, resampling and other functions.

[0087] The audio hardware abstraction layer may be audiohal, and audiohal may execute a read function (a first read function / a second read function) to read audio data from a kernel layer.

[0088] The core layer may be a kernel layer, and the kernel layer may store audio data acquired from an audio processor via an I2S bus in a DMA manner.

[0089] Among them, at least two applications may include a first application and a second application, and the target application may be the first application or the second application. The first application (for example, an intelligent voice APP) and the second application (for example, an ordinary recording APP) can obtain audio data through the native audioflinger layer of Android. The audioflinger layer creates a corresponding thread, which can loop to obtain audio data from the audiohal layer, and store it in the corresponding FIFO buffer, and provide it to the application for acquisition. The read function of the audiohal layer can obtain data from the kernel layer through the tinyalsa module (Android audio processing framework layer). The intelligent voice APP and the ordinary recording APP in the embodiment of the present application both obtain data from the same I2S bus.

[0090] The embodiment of the present application can be connected to an audio processor (for example, an external ADSP) through a group of I2S buses. The external ADSP can transfer 2-channel mic data (MIC_L and MIC_R) and 2-channel reference signals, a total of 4-channel data, to I2S1 through DMA. The data of the first application (for example, an intelligent voice APP) and the second application (for example, an ordinary recording APP) are obtained from the I2S1 hardware. The first application can obtain all 4 channel data, and the second application can obtain 1 or 2 channel mic data through the method of the embodiment of the present application.

[0091] Combine the following Figure 3 and Figure 4 , describing in detail the case where the target application needs to obtain audio data of one channel (when a=1).

[0092] When the target application has a channel data requirement, the target application (for example, a common recording APP) can apply to the audio platform layer (audioflinger) for a channel acquisition requirement. The audioflinger will create a thread, loop to obtain data from the audio hardware abstraction layer (audiohal), and provide a first cache of size 1. You can obtain 4 channels from the kernel layer (kernel), the same number of channels as the intelligent voice, use a 4*size1 cache to collect data from the kernel, obtain 4 channels of data, and then select 1 channel from it, fill it into the first cache of audioflinger, and provide it to the target application.

[0093] from Figure 3 It can be seen that there are K audio data frames (frames), and the data obtained by the audio hardware abstraction layer (audiohal) from the kernel layer (kernel) is 4*size1 in size, which is also K frames. In software implementation, all audio blocks in K frames can be traversed, and MIC_L data can be filtered out by arrangement order. Only MIC_L data is retained in each frame, and all MIC_L data is filled into the first cache and provided to the audioflinger layer. Ordinary recording APP obtains the corresponding data from the audioflinger layer.

[0094] In the embodiment of the present application, in the N channels of audio data, each channel may include K frames of data. The following is an example of a=2, N=4, M=2, and P=2. Figure 5 , Figure 5 2 is a schematic diagram of two channel demand data processing provided by the embodiment of the present application. Figure 5 As shown, in the K frame data, each frame includes microphone audio data of the left channel (MIC_L), microphone audio data of the right channel (MIC_R), reference audio data of the left channel (REF_L) and reference audio data of the right channel (REF_R). The microphone audio data of the left channel and the microphone audio data of the right channel of each frame in the K frame data are filtered out to obtain the microphone audio data of the left channel and the microphone audio data of the right channel contained in the K frame data. Among them, the filtered data is arranged in the time sequence from the first frame to the K frame, and enters the first cache of first-in-first-out in the time sequence. When the target application needs to process the microphone audio data of the left channel and the microphone audio data of the right channel in the K frame, the data is also taken from the first cache according to the first-in-first-out strategy.

[0095] Optionally, in step 202, filtering out a channels of audio data required by the target application from the N channels of audio data may specifically include the following steps:

[0096] If a is equal to 2, audio data of a second channel and audio data of a third channel are screened out from the microphone audio data of the M channels, the second channel being one of the M channels, and the third channel being one of the M channels except the second channel.

[0097] In the embodiment of the present application, the read function may be a read function in Java, which may continuously read the audio data stream.

[0098] The second channel and the third channel may be channels corresponding to different microphone positions in the M channels. For example, the second channel is a microphone set on the left side of the vehicle, and the corresponding channel is the left channel; the third channel is a microphone set on the right side of the vehicle, and the corresponding channel is the right channel.

[0099] Combine the following Figure 5 and Figure 4 , details the situation where the target application needs to obtain audio data of 2 channels.

[0100] When the target application has a 2-channel data requirement, the target application (for example, a normal recording APP) can apply to the audio platform layer (audioflinger) for 2-channel acquisition requirements. The audioflinger will create a thread, loop to obtain data from the audio hardware abstraction layer (audiohal), and provide a first cache of size 2*size1. You can obtain 4 channels from the kernel layer (kernel), the same number of channels as the intelligent voice, use a 4*size1 cache to collect data from the kernel, obtain 4-channel data, and then filter out 2 channels, fill them into the first cache of audioflinger, and provide them to the target application.

[0101] from Figure 5 It can be seen that there are K audio data frames (frames), and the data obtained by the audio hardware abstraction layer (audiohal) from the kernel layer (kernel) is 4*size1 in size, which is also K frames. In software implementation, all audio blocks in K frames can be traversed, and MIC_L data and MIC_R data can be filtered out by arrangement order. Only MIC_L data and MIC_R data are retained in each frame, and all MIC_L data and MIC_R data are filled into the first cache and provided to the audioflinger layer. Ordinary recording APP obtains the corresponding data from the audioflinger layer.

[0102] In an embodiment of the present application, only one set of audio buses is needed to realize the acquisition requirements of the target application and the audio data of the target application, which can reduce the number of required audio buses in the case of the target application and the target application, thereby reducing the number of required audio buses.

[0103] The above-mentioned scheme of the embodiment of the present application is introduced from the perspective of the execution process of the method side. It is understandable that, in order to realize the above-mentioned functions, the data processing device includes a hardware structure and / or software module corresponding to the execution of each function. It should be easily appreciated by those skilled in the art that, in combination with the units and algorithm steps of each example described in the embodiments provided herein, the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present application.

[0104] The embodiment of the present application can divide the data processing device into functional units according to the above method example. For example, each functional unit can be divided according to each function, or two or more functions can be integrated into one processing unit. The above integrated unit can be implemented in the form of hardware or in the form of software functional units. It should be noted that the division of units in the embodiment of the present application is schematic and is only a logical function division. There may be other division methods in actual implementation.

[0105] See also Figure 6 , Figure 6 A schematic diagram of the structure of a data processing device provided in an embodiment of the present application, the data processing device 600 may include an acquisition unit 601 and a screening unit 602, wherein:

[0106] The acquisition unit 601 is used to acquire N-channel audio data from the audio processor through the audio bus; N is an integer greater than or equal to 2;

[0107] The screening unit 602 is used to screen out a channels of audio data required by a target application from the N channels of audio data, where the target application is any one of at least two applications installed in the data processing device, and a is a positive integer less than or equal to N.

[0108] Optionally, the N-channel audio data includes M-channel microphone audio data and P-channel reference audio data; N is the sum of M and P, M is an integer greater than or equal to 1, and P is an integer greater than or equal to 1.

[0109] Optionally, the audio data of the N channels are encapsulated in K audio data frames, and the K audio data frames are stored in an audio cache, each of the K audio data frames contains frame data of N channels, and K is a positive integer.

[0110] Optionally, the filtering out a channels of audio data required by the target application from the N channels of audio data includes:

[0111] A first cache is created, wherein the capacity ratio of the first cache to the audio cache is greater than or equal to a / N; frame data of a channels are filtered out from the frame data of N channels contained in each audio data frame in the K audio data frames, respectively, to obtain a first filtered data frame corresponding to each audio data frame; wherein each first filtered data frame contains frame data of a channels filtered out from the corresponding audio data frame; each first filtered data frame is placed into the first cache in the order of the reception time of the audio data frames corresponding to each first filtered data frame, to obtain audio data of a channels required by the target application.

[0112] Optionally, the frame data of a channels filtered out from each audio data frame are all the same frame data of a channels.

[0113] Optionally, the screening unit 602 screens out a channels of audio data required by the target application from the N channels of audio data, including:

[0114] If a is equal to 1, the audio data of the first channel is filtered out from the microphone audio data of the M channels, and the first channel is one of the M channels;

[0115] If a is equal to 2, audio data of a second channel and audio data of a third channel are screened out from the microphone audio data of the M channels, the second channel being one of the M channels, and the third channel being one of the M channels except the second channel.

[0116] Optionally, the second channel and the third channel are channels corresponding to different microphone orientations in the M channels.

[0117] Optionally, the acquisition unit 601 acquires N-channel audio data from the audio processor through the audio bus, including: receiving K audio data frames output by the audio processor through the audio bus; placing the K audio data frames into the audio cache in the order of reception time, to obtain the N-channel audio data.

[0118] Among them, the acquisition unit 601 in the embodiment of the present application can be an audio bus in a data processing device, and the screening unit 602 can be a processor in the data processing device.

[0119] In an embodiment of the present application, only one set of audio buses is needed to realize the audio data acquisition requirements of at least two applications. When at least two applications have audio data acquisition requirements at the same time, the number of required audio buses can be reduced, thereby reducing the number of required audio buses.

[0120] See also Figure 7 , Figure 7 is a schematic diagram of the structure of another data processing device provided in an embodiment of the present application, such as Figure 7 As shown, the data processing device 700 includes a processor 701 and a memory 702. The processor 701 and the memory 702 can be connected to each other via a communication bus 703. The communication bus 703 can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus. The communication bus 703 can be divided into an address bus, a data bus, a control bus, etc. For example, the data bus can include an audio bus, specifically an I2S bus. For ease of representation, Figure 7 The memory 702 is used to store computer programs, which include program instructions. The processor 701 is configured to call the program instructions. The program includes instructions for executing Figure 2 Some or all of the steps in the method included.

[0121] The processor 701 may be a general purpose central processing unit (CPU), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits for controlling the execution of the above program.

[0122] The memory 702 may be a read-only memory (ROM) or other types of static storage devices that can store static information and instructions, a random access memory (RAM) or other types of dynamic storage devices that can store information and instructions, or an electrically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM) or other optical disc storage, optical disc storage (including compressed optical disc, laser disc, optical disc, digital versatile disc, Blu-ray disc, etc.), a magnetic disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store the desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited thereto. The memory may exist independently and be connected to the processor via a bus. The memory may also be integrated with the processor.

[0123] In addition, the data processing device 700 may also include common components such as a communication interface (eg, a USB interface, a microphone interface, etc.), an antenna, etc., which will not be described in detail here.

[0124] In the embodiment of the present application, only one set of audio buses is needed to realize the audio data acquisition requirements of at least two applications, and the number of required audio buses can be reduced when at least two applications have audio data acquisition requirements at the same time.

[0125] An embodiment of the present application also provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program for electronic data exchange, and the computer program enables a computer to execute part or all of the steps of any audio data processing method recorded in the above method embodiments.

[0126] It should be noted that, for the aforementioned method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the described order of actions, because according to the present application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present application.

[0127] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0128] In the several embodiments provided in the present application, it should be understood that the disclosed device can be implemented in other ways. For example, the device embodiments described above are only schematic, such as the division of the units, which is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, and the indirect coupling or communication connection of the device or unit can be electrical or other forms.

[0129] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0130] In addition, the functional units in the various embodiments of the application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated units may be implemented in the form of hardware or in the form of software program modules.

[0131] If the integrated unit is implemented in the form of a software program module and sold or used as an independent product, it can be stored in a computer-readable memory. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a memory, including a number of instructions to enable a computer device (which can be a personal computer, server or network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned memory includes: U disk, read-only memory (ROM), random access memory (RAM), mobile hard disk, disk or optical disk and other media that can store program codes.

[0132] A person of ordinary skill in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructing related hardware through a program, and the program can be stored in a computer-readable memory, which can include: a flash drive, a read-only memory, a random access memory, a magnetic disk or an optical disk, etc.

[0133] The embodiments of the present application are introduced in detail above. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method and core idea of ​​the present application. At the same time, for general technical personnel in this field, according to the idea of ​​the present application, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.

Claims

1. An audio data processing method, characterized in that: The method is applied to a data processing device, and the method comprises: The data processing device obtains N-channel audio data from the audio processor through an audio bus; N is an integer greater than or equal to 2; the N-channel audio data includes M-channel microphone audio data and P-channel reference audio data; N is the sum of M and P, M is an integer greater than or equal to 1, and P is an integer greater than or equal to 1; Audio data of a channels required by a target application is screened out from the N channels of audio data, where the target application is any one of at least two applications installed in the data processing device, and a is a positive integer less than or equal to N.

2. The method according to claim 1, characterized in that The audio data of the N channels are encapsulated in K audio data frames, and the K audio data frames are stored in an audio buffer. Each of the K audio data frames contains frame data of N channels, and K is a positive integer.

3. The method according to claim 2, characterized in that The step of filtering out a channels of audio data required by a target application from the N channels of audio data includes: Creating a first buffer, wherein a capacity ratio of the first buffer to the audio buffer is greater than or equal to a / N; Filtering frame data of a channels from the frame data of N channels contained in each of the K audio data frames to obtain a first filtered data frame corresponding to each audio data frame; wherein each first filtered data frame contains frame data of a channels filtered from the corresponding audio data frame; Each first filtered data frame is placed into the first cache in the order of the receiving time of the audio data frame corresponding to each first filtered data frame, so as to obtain the a channels of audio data required by the target application.

4. The method according to claim 3, characterized in that The frame data of a channels screened out from each audio data frame are all the same frame data of a channels.

5. The method according to claim 1, characterized in that The step of filtering out a channels of audio data required by a target application from the N channels of audio data includes: If a is equal to 1, the audio data of the first channel is filtered out from the microphone audio data of the M channels, and the first channel is one of the M channels; If a is equal to 2, audio data of a second channel and audio data of a third channel are screened out from the microphone audio data of the M channels, the second channel being one of the M channels, and the third channel being one of the M channels except the second channel.

6. The method according to claim 5, characterized in that The second channel and the third channel are channels corresponding to different microphone positions in the M channels.

7. The method according to claim 2, characterized in that The data processing device obtains N-channel audio data from the audio processor via the audio bus, including: Receiving K audio data frames output by the audio processor through the audio bus; The K audio data frames are placed into the audio buffer in the order of receiving time to obtain the audio data of the N channels.

8. An audio processing system, characterized in that: include: An audio processor, an audio bus and a data processing device, wherein the audio processor and the data processing device are connected via the audio bus; The data processing device is used to obtain N-channel audio data from the audio processor through the one audio bus; N is an integer greater than or equal to 2; the N-channel audio data includes M-channel microphone audio data and P-channel reference audio data; N is the sum of M and P, M is an integer greater than or equal to 1, and P is an integer greater than or equal to 1; The data processing device is further used to filter out a channels of audio data required by a target application from the N channels of audio data, where the target application is any one of at least two applications installed in the data processing device, and a is a positive integer less than or equal to N.

9. The system according to claim 8, characterized in that The system also includes M microphones; The audio processor is used to obtain M channels of microphone raw data from the M microphones and P channels of raw reference data from the reference audio channel; The audio processor is further used to process the M channels of microphone original data to obtain the M channels of microphone audio data, and to process the P channels of original reference data to obtain the P channels of reference audio data.

10. A data processing device, characterized in that: The method comprises a processor and a memory, wherein the memory is used to store a computer program, the computer program comprises program instructions, and the processor is configured to call the program instructions to execute the method according to any one of claims 1 to 7.

11. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, wherein the computer program includes program instructions, and when the program instructions are executed by a processor, the processor is enabled to perform the method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Voice processing device and vehicle-mounted terminal equipment

    CN202384000U

  • A audio frequency processing host computer and conference system for conference system

    CN208509122U