Audio data processing method, device and computer storage medium
By setting up a plurality of processing modules and storage units in the audio processing device, and using thread polling to detect and switch the status of the processing module, the problem of customizing processing based on the number of threads in the prior art is solved, and audio data processing adapted to different number of threads is realized, and work efficiency is improved.
Patent Information
- Application Number
- CN202011165922.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-10-27
- Publication Date
- 2025-05-23
- Estimated Expiration
- 2040-10-27
AI Technical Summary
In the prior art, front-end voice signal processing needs to be customized according to the number of threads, resulting in large workload and low work efficiency.
A method for processing audio data is provided, by setting at least two processing modules and corresponding storage units in the audio processing device, detecting the status of the processing module by using thread polling, switching to the locked state in response to the unlocked state, and calling the current processing module to process the audio data.
By switching the state of the processing module to the locked state, multiple threads avoid occupancy of the same processing module at the same time, adapting to different numbers of threads, reducing workload and improving work efficiency.
Smart Images

Figure CN114490009B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of audio data processing, and in particular to a method and device for processing audio data, and a computer storage medium. Background Art
[0002] Nowadays, AI (Artificial Intelligence) voice technology is developing rapidly, and the front-end voice signal processing of AI voice technology needs to be adapted to a variety of hardware platforms.
[0003] If a single thread is set on the hardware platform, the hardware platform uses the single thread to process the front-end voice signal. If multiple threads are set on the hardware platform, the hardware platform needs to rewrite the code to use multiple threads to process the front-end voice signal. Therefore, the front-end voice processing needs to be customized according to the number of threads, resulting in a large workload and low work efficiency. Summary of the invention
[0004] The present application provides an audio data processing method, device and computer storage medium to solve the problem of heavy workload caused by customization according to the number of threads in the prior art.
[0005] In order to solve the above technical problems, the present application provides an audio data processing method, which is applied to an audio processing device, wherein the audio processing device is provided with at least two processing modules and storage units respectively corresponding to the processing modules, wherein the at least two processing modules are used to process the audio data in a cascade manner, and each of the storage units respectively stores the audio data to be processed by the corresponding processing module, and the processing method comprises:
[0006] Detecting the status of each processing module by thread polling;
[0007] In response to a detection result that the processing module is in an unlocked state, switching the state of the processing module to a locked state to occupy the processing module as a current processing module;
[0008] The current processing module is called by using the thread to process the audio data in the storage unit corresponding to the current processing module.
[0009] The step of using the thread to call the current processing module to process the audio data in the storage unit corresponding to the current processing module includes:
[0010] Read the audio data from the corresponding storage unit;
[0011] Determining whether the audio data is valid data that can be processed by the current processing module;
[0012] In response to the judgment result that the audio data is the valid data, the audio data is processed by the current processing module, and after the processing is completed, the state of the current processing module is converted to the unlocked state.
[0013] The step of using the thread to call the current processing module to process the audio data in the storage unit corresponding to the current processing module includes:
[0014] In response to the judgment result that the current processing module has the processing module of the next level, the processed audio data is stored in the storage unit corresponding to the processing module of the next level, and the step of detecting the status of each processing module by thread polling is returned.
[0015] The step of using the thread to call the current processing module to process the audio data in the storage unit corresponding to the current processing module includes:
[0016] In response to the detection result that the occupied processing module is the processing module of the last level, the processed audio data is output, and the step of detecting the status of each processing module by using thread polling is returned.
[0017] The step of using the thread to call the current processing module to process the audio data in the storage unit corresponding to the current processing module includes:
[0018] In response to the judgment result that the audio data is not the valid data, the state of the current processing module is converted to the unlocked state, and the process returns to the step of detecting the state of each processing module by using thread polling.
[0019] Wherein, the processing method further comprises:
[0020] In response to the processing module being in the locked state, returning to the step of detecting the state of each processing module by using thread polling.
[0021] The number of the threads is at least two and they are independent of each other.
[0022] The at least two processing modules include a sound source localization module, an echo cancellation module, a beamforming module and a noise cancellation module.
[0023] In order to solve the above technical problems, the present application provides an audio processing device, including a processor and a memory, wherein a computer program is stored in the memory, and the processor is used to execute the computer program to implement the above processing method.
[0024] In order to solve the above technical problems, the present application provides a computer storage medium, in which a computer program is stored, and the above processing method is implemented when the computer program is executed.
[0025] In the audio data processing method of the present application, thread polling is used to detect the status of each processing module. In response to the detection result that the processing module is in an unlocked state, the status of the processing module is switched to a locked state to occupy the processing module as the current processing module; the thread is used to call the current processing module to process the audio data in the storage unit corresponding to the current processing module. By switching the status of the processing module to a locked state, it is possible to avoid multiple threads occupying the same processing module at the same time; in addition, the thread of the present application can be a single thread or one of multiple threads, that is, the above processing method is run using a single thread, or the above processing method is run using each thread of multiple threads. Therefore, the audio data processing method of the present application can adapt to different numbers of threads, reduce workload, and improve work efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] Figure 1 is a structural diagram of an embodiment of an audio processing device of the present application;
[0027] Figure 2 It is a flowchart of an embodiment of a method for processing audio data of the present application;
[0028] Figure 3 It is a flowchart of step S103 in the method for processing audio data of the present application;
[0029] Figure 4 is a structural schematic diagram of another embodiment of the audio processing device of the present application;
[0030] Figure 5 is a structural schematic diagram of yet another embodiment of the audio processing device of the present application;
[0031] Figure 6 It is a structural diagram of an embodiment of a computer storage medium of the present application. DETAILED DESCRIPTION
[0032] In order to enable those skilled in the art to better understand the technical solution of the present invention, the following is a further detailed description of an audio data processing method, device and computer storage medium provided by the present application in conjunction with the accompanying drawings and specific implementation methods.
[0033] The audio data processing method of the present application is applied to an audio processing device 1, such as Figure 1As shown, the audio processing device 1 is provided with at least two processing modules and storage units corresponding to the processing modules, that is, each processing module is provided with a storage unit, and the at least two processing modules include two processing modules or more than two processing modules. The at least two processing modules include but are not limited to a first-level processing module 111 and a second-level processing module 112, a first storage unit 121 corresponding to the first-level processing module 111, and a second storage unit 122 corresponding to the second-level processing module 112. The audio processing device 1 can be an intelligent robot, a server, a computer, a mobile phone, or a household appliance.
[0034] At least two processing modules are used to process the audio data in a cascade manner, and each processing module processes the audio data. Among them, the first-level processing module 111 and the second-level processing module 112 process the audio data in a cascade manner, that is, the first-level processing module 111 processes the audio data first, and then the second-level processing module 112 processes the audio data processed by the first-level processing module 111.
[0035] Each storage unit stores the audio data to be processed by the corresponding processing module, so that the processing module reads the audio data to be processed from the storage unit. The first storage unit 121 is used to store the audio data to be processed by the first-level processing module 111, and the second storage unit 122 is used to store the audio data to be processed by the second-level processing module 111.
[0036] Combined with Figure 2 , the method for processing audio data includes the following steps.
[0037] S101: Detect the status of each processing module by thread polling.
[0038] The audio processing device 1 obtains audio data and can store the audio data in a storage unit of the first-level processing module 111, that is, the first storage unit 121 is used to store audio data. The audio processing device 1 can obtain audio data through its own voice sensor, such as a microphone; it can also communicate with other devices and obtain audio data through voice sensors of other devices.
[0039] The audio processing device 1 may be provided with a single thread or multiple threads. Multiple threads refer to a program including multiple execution flows. In a program, multiple different threads may be run simultaneously to perform different tasks. The audio data processing method of the present application may be run simultaneously in multiple threads. The audio data processing method run by each of the multiple threads is the same as the audio data processing method run by a single thread. Among the multiple threads, the number of threads is at least two independent of each other, that is, the number of threads is two or more.
[0040] Since at least two processing modules process audio data in a cascaded manner, the audio processing device 1 uses thread polling to detect the status of each processing module. Polling can detect the status of each processing module in sequence for each thread, for example, using a thread to first detect the status of the first-level processing module 111. The thread can be a single thread or one of multiple threads; the audio processing device 1 can use a single-core CPU (Central Processing Unit) to implement a single thread, or use a multi-core CPU to implement multiple threads.
[0041] S102: In response to the detection result that the processing module is in the unlocked state, switching the state of the processing module to the locked state to occupy the processing module as the current processing module.
[0042] In response to the detection result that the processing module is in the unlocked state, the audio processing device 1 can use the thread to switch the state of the processing module to the locked state, so that other threads detect that the processing module is in the locked state, and then occupy the processing module as the current processing module, thereby preventing multiple threads from occupying the same processing module at the same time. For example, the first-level processing module 111 is in the unlocked state, that is, the thread can occupy the first-level processing module 111 as the current processing module, and switch the first-level processing module 111 from the unlocked state to the locked state.
[0043] Each processing module may be provided with a lock for marking the status of the processing module; when the processing module is idle, the lock of the processing module is in an unlocked state; when the processing module is busy, the lock of the processing module is in a locked state. Therefore, the audio processing device 1 may use threads to determine whether the processing module is in an unlocked state or a locked state. In other embodiments, those skilled in the art may use threads to determine whether the processing module is in a busy state or an idle state, for example, if the processing module processes audio data, the processing module is in a busy state; if the processing module does not perform any processing, the processing module is in an idle state.
[0044] In response to the detection result that the processing module is in the locked state, the step of detecting the state of each processing module by using thread polling (i.e., returning to step S101) is returned to detect the state of the next level processing module. For example, if the first level processing module 111 is in the locked state, i.e., the first level processing module 111 is already occupied, the audio processing device 1 detects the state of the second level processing module 112 by using a thread.
[0045] S103: Using a thread to call the current processing module, the audio data in the storage unit corresponding to the current processing module is processed.
[0046] The audio processing device 1 reads the audio data in the storage unit corresponding to the current processing module, and uses a thread to call the current processing module to process the audio data. For example, if the current processing module is the first-level processing module 111, the first-level processing module 111 reads the audio data from the first storage unit 121; the audio processing device 1 uses a thread to call the first-level processing module 111, and the first-level processing module 111 is used to process the audio data.
[0047] Through the above method, the thread of the audio data processing method can be a single thread or one of multiple threads, that is, the audio data processing method is run using a single thread, or the audio data processing method is run using each thread of multiple threads. Therefore, it can adapt to different numbers of threads without customization according to the number of threads, thereby reducing workload and improving work efficiency.
[0048] Combined with Figure 3 , step S103 includes the following steps.
[0049] S301: Read audio data from a corresponding storage unit.
[0050] In response to the detection result that the first-level processing module 111 is in the unlocked state, the first-level processing module 111 is occupied as the current processing module. The first-level processing module 111 sends a data read request to the first storage unit 121, and the first storage unit 121 sends the audio data to the first-level processing module 111 according to the request to read the audio data from the corresponding storage unit.
[0051] S302: Determine whether the audio data is valid data that can be processed by the current processing module.
[0052] The data stored in the first storage unit 121 is used as audio data. Therefore, after the first-level processing module 111 reads the audio data from the first storage unit 121, it is necessary to determine whether the read audio data is valid data that can be processed by the current processing module. If it is determined that the audio data is valid data, the process proceeds to step S303; if it is determined that the audio data is not valid data, the process proceeds to step S304. Among them, if the data stored in the first storage unit 121 is empty, or the stored data is data that cannot be processed by the first-level processing module 111, the audio data is not valid data.
[0053] S303: In response to the judgment result that the audio data is valid data, the audio data is processed by the current processing module, and after the processing is completed, the state of the current processing module is converted to an unlocked state.
[0054] The current processing module is the first-level processing module 111. The audio processing device 1 uses a thread to call the first-level processing module 111 so that the first-level processing module 111 processes the audio data. After the audio data processing is completed, the state of the first-level processing module 111 is converted to an unlocked state so that other threads call the first-level processing module 111.
[0055] When the audio data processing is completed, the audio processing device 1 further determines whether there is a next-level processing module for the current processing module. In response to the judgment result that there is a next-level processing module for the current processing module, the processed audio data is stored in the storage unit corresponding to the next-level processing module, and the step of detecting the status of each processing module by thread polling is returned (return to step S101). For example, the audio processing device 1 determines whether there is a next-level processing module for the first-level processing module 111. Since the next-level processing module of the first-level processing module 111 is the second-level processing module 112, the first-level processing module 111 stores the processed audio data in the second storage unit 122, and detects the status of the second-level processing module 112 by using a thread.
[0056] In response to the judgment result that the occupied processing module is the last level processing module, the processed audio data is output, and the step of detecting the status of each processing module by using thread polling is returned (return to step S101). For example, the occupied processing module is the second level processing module 112, and the audio processing device 1 determines whether there is a next level processing module in the second level processing module 112. Since the second level processing module 112 is the last level processing module, the second level processing module 112 outputs the processed audio data, and uses the thread to detect the status of the first level processing module 111, so as to realize the detection of the status of the first level processing module 111 and the second level processing module 112 by using thread polling.
[0057] S304: In response to the judgment result that the audio data is not valid data, the state of the current processing module is converted to an unlocked state, and the process returns to the step of detecting the state of each processing module by using thread polling.
[0058] The audio processing device 1 converts the state of the current processing module to the unlocked state, and returns to the step of detecting the state of each processing module by thread polling (i.e., step S101). With the current processing module as the first-level processing module 111, the audio processing device 1 converts the state of the first-level processing module 111 to the unlocked state, so that other threads can call the first-level processing module 111, and uses the thread to detect the state of the second-level processing module 112.
[0059] See also Figure 4As shown, at least two processing modules may include a sound source localization module 113, an echo cancellation module 114, a beamforming module 115, and a noise cancellation module 116. The storage unit of the sound source localization module 113 is a third storage unit 123, the storage unit of the echo cancellation module 114 is a fourth storage unit 124, the storage unit of the beamforming module 115 is a fifth storage unit 125, and the storage unit of the noise cancellation module 116 is a sixth storage unit 126. The sound source localization module 113, the echo cancellation module 114, the beamforming module 115, and the noise cancellation module 116 are used to process the audio data in a cascade manner, that is, the audio data is processed by the sound source localization module 113, the echo cancellation module 114, the beamforming module 115, and the noise cancellation module 116 in sequence to output the processed audio data.
[0060] The method for processing audio data is described by assuming that the audio processing device 1 is provided with a first thread and a second thread. The audio processing device 1 uses the first thread to poll and detect the states of the sound source localization module 113, the echo cancellation module 114, the beamforming module 115, and the noise cancellation module 116, that is, the first thread is used to first detect the state of the sound source localization module 113. In response to the detection result that the sound source localization module 113 is in an unlocked state, the state of the sound source localization module 113 is switched to a locked state by using the first thread, so as to occupy the sound source localization module 113 as the current processing module of the first thread.
[0061] At the same time, the audio processing device 1 uses the second thread to poll and detect the states of the sound source localization module 113, the echo cancellation module 114, the beamforming module 115, and the noise cancellation module 116. At this time, the sound source localization module 113 is in a locked state. In response to the detection result that the sound source localization module 113 is in a locked state, the state of the echo cancellation module 114 is detected by the second thread; in response to the detection result that the echo cancellation module 114 is in an unlocked state, the state of the echo cancellation module 114 is switched to a locked state by the second thread, so as to occupy the echo cancellation module 114 as the current processing module of the second thread.
[0062] The audio processing device 1 obtains audio data and stores the audio data in the third storage unit 123; uses the first thread to read the audio data from the third storage unit 123, and determines whether the audio data is valid data that can be processed by the sound source localization module 113 (the current processing module of the first thread). Since the audio data passes through the sound source localization module 113, the echo cancellation module 114, the beamforming module 115, and the noise cancellation module 116 in sequence, the audio data is valid data that can be processed by the sound source localization module 113. In response to the judgment result that the audio data is valid data, the first thread uses the sound source localization module 113 to perform sound source localization processing on the audio data, and after the sound source localization processing is completed, the state of the sound source localization module 113 is converted to an unlocked state so that the sound source localization module 113 can be called.
[0063] The first thread is used to further determine whether the sound source localization module 113 has a next-level processing module, and the next-level processing module of the sound source localization module 113 is the echo cancellation module 114; in response to the determination result that the sound source localization module 113 has a next-level processing module, the processed audio data is stored in the fourth storage unit 124 corresponding to the echo cancellation module 114, and the first thread is used to detect the status of the echo cancellation module 114, so as to realize the detection of the status of each processing module by polling using the first thread.
[0064] The second thread is used to read audio data from the fourth storage unit 124, and determine whether the audio data is valid data that can be processed by the echo cancellation module 114 (the current processing module of the second thread). Since the audio data is stored in the third storage unit 123, the audio data of the fourth storage unit 124 is empty. Therefore, in response to the judgment result that the audio data is not valid data, the state of the echo cancellation module 114 is converted to an unlocked state by the second thread, and the state of the beamforming module 115 is detected, so as to realize the use of the second thread to poll and detect the state of each processing module.
[0065] If the fourth storage unit 124 stores audio data processed by sound source localization, in response to the judgment result that the audio data is valid data, the second thread is used to call the echo cancellation module 114 to perform echo cancellation processing on the audio data, and after the echo cancellation processing is completed, the state of the echo cancellation module 114 is converted to the unlocked state. The second thread is used to further determine whether the echo cancellation module 114 has a next-level processing module, and the next-level processing module of the echo cancellation module 114 is the beamforming module 115; in response to the judgment result that the echo cancellation module 114 has a next-level processing module, the processed audio data is stored in the fifth storage unit 125 corresponding to the beamforming module 115, and the second thread is used to detect the state of the beamforming module 115, so as to realize the use of the second thread to poll and detect the state of each processing module.
[0066] In the above manner, the audio processing device 1 is provided with a plurality of threads, and each thread detects the status of the sound source localization module 113, the echo cancellation module 114, the beamforming module 115, and the noise cancellation module 116 in the order thereof. In different threads, the status of each processing module is the same, for example, the noise cancellation module 116 is detected to be in an unlocked state by the first thread, and the noise cancellation module 116 is also detected to be in an unlocked state by the second thread; the storage unit is also shared, for example, the audio data read from the third storage unit 123 by the first thread is the same as the audio data read from the third storage unit 123 by the second thread, so that the sound source localization module 113, the echo cancellation module 114, the beamforming module 115, and the noise cancellation module 116 are circulated in each thread. In addition, the first thread and the second thread are used to poll and detect the status of the sound source localization module 113, the echo cancellation module 114, the beamforming module 115, and the noise cancellation module 116 respectively, so as to make full use of the CPU resources of the audio processing device 1 and enable rapid development.
[0067] In addition, the audio processing device 1 can use the second thread to detect the state of the noise elimination module 116; in response to the detection result that the noise elimination module 116 is in the unlocked state, the second thread is used to switch the state of the noise elimination module 116 to the locked state, so as to occupy the noise elimination module 116 as the current processing module of the second thread. The second thread is used to call the noise elimination module 116 to perform echo cancellation processing on the audio data, and after the processing is completed, the state of the noise elimination module 116 is converted to the unlocked state. The second thread is used to further determine whether the noise elimination module 116 has a next-level processing module, and the noise elimination module 116 is the last-level processing module; the noise elimination module 116 outputs the processed audio data, and the second thread is used to detect the state of the sound source localization module 113.
[0068] The above method can be applied to hardware devices to process audio data. Figure 5 , Figure 5 2 is a schematic diagram of the structure of another embodiment of the audio processing device of the present application, in which the audio processing device 200 of the present embodiment includes a processor 21 and a memory 22. The memory 22 stores a computer program, and the processor 21 is used to execute the computer program to implement the above-mentioned audio data processing method.
[0069] Processor 21 is used to detect the status of each processing module using thread polling; in response to the detection result that the processing module is in an unlocked state, the status of the processing module is switched to a locked state to occupy the processing module as the current processing module; and the current processing module is called by the thread to process the audio data in the storage unit corresponding to the current processing module.
[0070] The processor 21 is also used to read audio data from the corresponding storage unit; determine whether the audio data is valid data that can be processed by the current processing module; in response to the judgment result that the audio data is valid data, use the current processing module to process the audio data, and after the processing is completed, convert the state of the current processing module to an unlocked state.
[0071] The processor 21 may be an integrated circuit chip with signal processing capability. The processor 21 may also be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.
[0072] for Figure 2-Figure 3 The method of the embodiment shown can be presented in the form of a computer program. The present application proposes a computer storage medium carrying the computer program. Figure 6 , Figure 6 It is a schematic diagram of the structure of an embodiment of a computer storage medium of the present application. The computer storage medium 300 of this embodiment includes a computer program 31, which can be executed to implement the method in the above embodiment.
[0073] The computer storage medium 300 of this embodiment can be a medium that can store program instructions, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, or it can also be a server that stores the program instructions. The server can send the stored program instructions to other devices for execution, or it can also execute the stored program instructions by itself.
[0074] In the several embodiments provided in the present application, it should be understood that the disclosed methods and devices can be implemented in other ways. For example, the device implementation described above is only schematic. For example, the division of modules or units 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, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0075] 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 present embodiment.
[0076] In addition, each functional unit in each embodiment of the present 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 unit may be implemented in the form of hardware or in the form of software functional units.
[0077] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. 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 storage medium, including a number of instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) or a processor (processor) to perform all or part of the steps of each implementation method of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program code.
[0078] The above description is only an implementation method of the present application, and does not limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly used in other related technical fields, are also included in the patent protection scope of the present application.
Claims
1. A method for processing audio data, It is characterized in that The processing method is applied to an audio processing device, the audio processing device is provided with at least two processing modules and storage units respectively corresponding to the processing modules, the at least two processing modules are used to process audio data in a cascade manner, each storage unit respectively stores the audio data to be processed by the corresponding processing module, the audio processing device is provided with threads, the threads include multiple threads, and are used to run the processing method, the processing method includes: Detecting the status of each processing module by thread polling; In response to a detection result that the processing module is in an unlocked state, switching the state of the processing module to a locked state to occupy the processing module as a current processing module; Using the thread to call the current processing module to process the audio data in the storage unit corresponding to the current processing module includes: Read the audio data from the corresponding storage unit; Determining whether the audio data is valid data that can be processed by the current processing module; In response to a determination result that the audio data is the valid data, the audio data is processed by the current processing module, and after the processing is completed, the state of the current processing module is converted to the unlocked state; In response to the judgment result that the current processing module has the processing module of the next level, the processed audio data is stored in the storage unit corresponding to the processing module of the next level, and the step of detecting the status of each processing module by thread polling is returned.
2. The processing method according to claim 1, It is characterized in that The using the thread to call the current processing module to process the audio data in the storage unit corresponding to the current processing module includes: In response to the detection result that the occupied processing module is the processing module of the last level, the processed audio data is output, and the step of detecting the status of each processing module by using thread polling is returned.
3. The processing method according to claim 2, It is characterized in that The using the thread to call the current processing module to process the audio data in the storage unit corresponding to the current processing module includes: In response to the judgment result that the audio data is not the valid data, the state of the current processing module is converted to the unlocked state, and the process returns to the step of detecting the state of each processing module by using thread polling.
4. The processing method according to any one of claims 1 to 3, It is characterized in that The processing method further comprises: In response to the processing module being in the locked state, returning to the step of detecting the state of each processing module by using thread polling.
5. The processing method according to any one of claims 1 to 3, It is characterized in that The number of the threads is at least two which are independent of each other.
6. The processing method according to any one of claims 1 to 3, It is characterized in that The at least two processing modules include a sound source localization module, an echo cancellation module, a beamforming module and a noise cancellation module.
7. An audio processing device, It is characterized in that The audio processing device comprises a processor and a memory; a computer program is stored in the memory, and the processor is used to execute the computer program to implement the steps of the processing method according to any one of claims 1 to 6.
8. A computer storage medium, It is characterized in that The computer storage medium stores a computer program, and when the computer program is executed, the steps of the processing method according to any one of claims 1 to 6 are implemented.
Citation Information
Patent Citations
Voice interaction method and device, equipment and storage medium
CN108337362A
Multi-thread access method and system, electronic terminal and storage medium
CN110837422A