Audio detection method and related device
By implementing the audio detection method in the system chip, acquiring and analyzing the audio data to be detected, the problems of high audio detection cost and inconvenient operation in the prior art are solved, and efficient and intelligent noise detection is achieved.
Patent Information
- Application Number
- PCT/CN2024/121640
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-10-30
- Filing Date
- 2024-09-27
- Publication Date
- 2025-05-08
AI Technical Summary
The existing audio detection methods require additional hardware support, which is costly and inconvenient to operate, making it difficult to effectively detect noise in the car audio link.
By implementing an audio detection method in the system chip, the audio data to be detected, including reference audio signals, and data analysis is performed to obtain noise detection results, and automated detection is realized.
It improves the intelligence and convenience of noise detection, reduces dependence on additional hardware, reduces detection costs, and improves the accuracy of detection results.
Smart Images

Figure CN2024121640_08052025_PF_FP_ABST
Abstract
Description
Audio detection method and related device
[0001] This application claims priority to the Chinese patent application filed with the China Patent Office on October 30, 2023, with application number 202311432971.9 and invention name “Audio Detection Method and Related Device”, the entire contents of which are incorporated by reference into this application. Technical Field
[0002] The present application relates to the field of data processing technology, and in particular to an audio detection method and related devices. Background Art
[0003] With the development of smart cars, users are demanding increasingly advanced multimedia audio systems. To meet these demands, automakers are integrating more and more electronic components into car audio systems, resulting in varying data transmission harnesses. During production, poor wiring connections and unstable electronic components can lead to various noise levels, severely impacting the user's in-car listening experience. Therefore, noise level detection is a crucial step in audio testing during production. A common audio testing method in practice involves connecting test equipment to audio devices via audio cables. However, this method requires additional hardware to transmit audio data, which is costly and requires real-time operator input, making it inconvenient.
[0004] Therefore, an audio detection method is urgently needed to solve the above problems.
[0005] Summary of the Invention
[0006] In a first aspect, an embodiment of the present application provides an audio detection method, applied to a system chip, the method comprising:
[0007] Acquire audio data to be detected, wherein the audio data to be detected includes a reference audio signal, and the reference audio signal is an audio signal obtained after the audio source signal is transmitted through an audio playback link;
[0008] Data analysis is performed on the audio data to be detected to obtain a noise detection result.
[0009] In some embodiments of the present application, before obtaining the audio data to be detected obtained after data recording, the method further includes:
[0010] The audio source signal is transmitted to the power amplifier chip through the audio playback link.
[0011] In some embodiments of the present application, obtaining the audio data to be detected includes:
[0012] An audio signal returned by the power amplifier chip and corresponding to the audio source signal is obtained, and is to be pushed to an audio playback device for audio playback.
[0013] In some embodiments of the present application, transmitting the audio source signal to the power amplifier chip through the audio playback link includes:
[0014] transmitting the audio source signal to a digital signal processor connected to the system chip via a first communication protocol;
[0015] The digital signal processor processes the audio source signal and transmits the signal to the power amplifier chip connected to the digital signal processor via a second communication protocol.
[0016] In some embodiments of the present application, the audio data to be detected also includes microphone data; the microphone data is collected and sent by the digital signal processor.
[0017] In some embodiments of the present application, obtaining the audio data to be detected includes:
[0018] The reference audio signals are sorted according to a receiving order and a preset data arrangement mode to obtain sorted audio data to be detected.
[0019] In some embodiments of the present application, the microphone data includes left channel data and right channel data, and the reference audio signal includes a left channel reference signal and a right channel reference signal; the sorted microphone data and reference audio signal are used to represent the arrangement results obtained by arranging the left channel data, the right channel data, the left channel reference signal and the right channel reference signal in sequence according to bit depth.
[0020] In some embodiments of the present application, the performing data analysis on the audio data to be detected includes:
[0021] For the data to be detected, data separation is performed on the data at a fixed position using the fixed bit depth to obtain sampled data, wherein the sampled data is used to represent the data corresponding to the reference audio signal;
[0022] Converting the continuous signal in the time domain represented by the sampled data into a discrete frequency domain signal to obtain audio frequency data;
[0023] Performing amplitude calculation according to the audio frequency data to obtain an amplitude calculation result;
[0024] The noise detection result is obtained according to the amplitude calculation result.
[0025] In some embodiments of the present application, converting the continuous signal in the time domain represented by the sampled data into a discrete frequency domain signal includes:
[0026] Dividing the sampled data into at least one group using buffers of the same size;
[0027] Converting the continuous signal in the time domain represented by the sampled data of each buffer into a discrete frequency domain signal through a target algorithm to obtain frequency data of each buffer, wherein the frequency data corresponding to each buffer represents the amplitude and phase information of each frequency component in a complex form, the amplitude being used to represent the intensity of the frequency component in the reference audio signal corresponding to the sampled data, and the phase being used to represent the relative positional relationship between each frequency component and a reference time point;
[0028] The frequency data in each buffer is combined to obtain the audio frequency data corresponding to the sampling data.
[0029] In some embodiments of the present application, the amplitude calculation result includes at least one amplitude, and each amplitude is used to represent the energy of each frequency component in the corresponding buffer zone;
[0030] Obtaining the noise detection result according to the amplitude calculation result includes:
[0031] comparing each of the amplitudes with a preset threshold value;
[0032] If at least one amplitude value is greater than or less than the preset threshold, determining that the noise detection result is that noise occurs in the audio link;
[0033] If each of the amplitude values is equal to the preset threshold, it is determined that the noise detection result is that no noise occurs in the audio link.
[0034] In some embodiments of the present application, after determining that the noise detection result is that noise occurs in the audio link, the method further includes:
[0035] The noise detection result is recorded and displayed to the user in a visual manner.
[0036] In a second aspect, an embodiment of the present application provides an audio detection device, applied to a system chip, the device comprising:
[0037] an acquiring unit, configured to acquire audio data to be detected, wherein the audio data to be detected includes a reference audio signal, and the reference audio signal is an audio signal obtained after the audio source signal is transmitted through an audio playback link;
[0038] The detection unit is used to perform data analysis on the audio data to be detected to obtain a noise detection result.
[0039] In a third aspect, an embodiment of the present application provides an electronic device comprising a processor, a memory, and a communication interface, wherein one or more programs are stored in the above-mentioned memory and are configured to be executed by the above-mentioned processor, and the above-mentioned programs include instructions for executing the steps of any method in the first aspect of the embodiment of the present application.
[0040] In a fourth aspect, an embodiment of the present application provides a non-volatile computer-readable storage medium, wherein the non-volatile 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 any method of the first aspect of the embodiment of the present application.
[0041] In the fifth aspect, an embodiment of the present application provides a vehicle, characterized in that it includes a system chip, a power amplifier chip, a digital signal processor, and an audio playback device, the system chip establishes a communication connection with the digital signal processor, the digital signal processor establishes a communication connection with the power amplifier chip, and the system chip includes a method for executing some or all of the steps described in any method of the first aspect of the embodiment of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the embodiments or descriptions of the prior art. 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 any creative work.
[0043] FIG1A is a schematic diagram of a hardware architecture of audio detection provided in an embodiment of the present application;
[0044] FIG1B is a schematic diagram of the internal structure of a system chip for audio detection provided in an embodiment of the present application;
[0045] FIG2 is a flow chart of an audio detection method provided in an embodiment of the present application;
[0046] FIG3 is a schematic diagram of a data transmission process provided by an embodiment of the present application;
[0047] FIG4A is a schematic diagram of an arrangement of audio data to be detected provided by an embodiment of the present application;
[0048] FIG4B is a schematic diagram of an arrangement of sampled data provided in an embodiment of the present application;
[0049] FIG5 is a schematic structural diagram of an electronic device provided in an embodiment of the present application;
[0050] FIG6 is a schematic diagram of the functional unit structure of an audio detection device provided in an embodiment of the present application.
[0051] Description of reference numerals:
[0052] 600-audio detection device, 601-acquisition unit, 602-detection unit. DETAILED DESCRIPTION
[0053] In order to enable those skilled in the art to better understand the present invention, the following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0054] The terms "first," "second," and the like in the specification and claims of this application and the accompanying drawings are used to distinguish between different objects, not to describe a particular order. Furthermore, the terms "including," "having," and any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, system, product, or apparatus comprising a series of steps or elements is not limited to the listed steps or elements but may optionally include steps or elements not listed, or may optionally include other steps or elements inherent to the process, method, product, or apparatus.
[0055] References herein to "embodiments" mean that a particular feature, structure, or characteristic described in connection with the embodiments may be included in at least one embodiment of the present application. The appearance of this phrase in various places in the specification does not necessarily refer to the same embodiment, nor does it constitute an independent or alternative embodiment that is mutually exclusive of other embodiments. It is understood, both explicitly and implicitly, by those skilled in the art that the embodiments described herein may be combined with other embodiments.
[0056] In order to better understand the solutions of the embodiments of the present application, the electronic devices, related terms, concepts and related backgrounds that may be involved in the embodiments of the present application are first introduced below.
[0057] The electronic device may be a portable electronic device that also includes other functions such as a personal digital assistant and / or a music player function, such as a mobile phone, a tablet computer, a wearable electronic device with a wireless communication function (such as a smart watch), etc. Exemplary embodiments of portable electronic devices include but are not limited to portable electronic devices equipped with an IOS system, an Android system, a Microsoft system, or other operating systems. The above-mentioned portable electronic device may also be other portable electronic devices, such as a laptop computer (Laptop), etc. It should also be understood that in some other embodiments, the above-mentioned electronic device may also be the electronic device used to control the noise detection system in the present application solution.
[0058] An embodiment of the present application provides an audio detection method and related devices, which realize the transmission and return of audio data in the entire audio link through a transmission protocol, and provide a data recording node to process the returned reference audio signal and microphone data into audio data to be detected and transmit it to a detection application. The detection application automatically completes noise detection based on the audio data to be detected, so as to improve the intelligence and convenience of noise detection.
[0059] As can be seen, in the embodiment of the present application, by acquiring audio data to be detected, wherein the audio data to be detected includes a reference audio signal, which is an audio signal obtained after the source signal is transmitted through the audio playback link; and performing data analysis on the audio data to be detected, a noise detection result is obtained. This allows the application to automatically detect the returned audio data to be detected, and then determine whether there is a noise problem in the audio link, thereby achieving the purpose of improving the intelligence and convenience of noise detection.
[0060] To solve the above problem, please refer to Figure 1A, which is a schematic diagram of the hardware architecture of an audio detection provided by an embodiment of the present application. The present application proposes to abandon the traditional hard-wired connection and loop the downlink (i.e., audio playback link) playback data back to the uplink in the entire audio link, and the SoC completes the analysis of the reference audio signal, calculates and verifies the noise data, and obtains the noise detection result based on the calculation result. Specifically, as shown in Figure 1A, the system-on-a-chip (SoC) and the digital signal processor (DSP) establish a communication connection through a first communication protocol, and the DSP establishes a communication connection with the power amplifier chip (Audio Amplifier) through a second communication protocol. Then the power amplifier chip pushes the audio signal to the audio playback device to play the audio signal.
[0061] For example, a digital signal processor (DSP) is a unique microprocessor that uses digital signals to process large amounts of information. In car audio, a DSP can perform the following functions: audio signals from sources such as CD players, navigation systems, or head units pass through the DSP, extracting and adjusting, controlling, and modifying them. The processed signals are then fed into an amplifier chip, which amplifies the audio signal and ultimately drives the audio playback device. Simply put, the most obvious benefit of a DSP is its ability to enhance the sound quality of standard audio systems.
[0062] Exemplarily, as shown in FIG1A , the SoC includes a detection application module and a system data recording module. The SoC transmits the audio data to be played, including but not limited to silent data or data of a fixed frequency (for example, 1KHz), to the DSP via a first communication protocol. The DSP extracts the reference audio signal from the audio data to be played and transmits it to the power amplifier chip based on a second communication protocol. The power amplifier chip includes a Mixer module. After the reference audio signal is transmitted from the DSP to the Audio Amplifier, the Mixer module inside the Audio Amplifier amplifies the signal and the audio playback device plays the audio data. At the same time, the power amplifier chip loops the reference audio signal back to the DSP based on the second communication protocol to synchronize the data to the uplink path. While the DSP receives the returned reference audio signal, it also receives the microphone audio data recorded from the microphone, that is, the microphone acquisition link and the uplink of the Ref are designed to be shared.
[0063] Furthermore, the DSP transmits the reference audio signal and the microphone audio data to the SoC based on the first communication protocol.
[0064] Furthermore, the system data recording module of the SoC acts as a data recording node, records the received data to obtain the audio data to be detected, and transmits the audio data to be detected to the detection application module, which performs data analysis and processing to complete noise detection.
[0065] In this way, the data to be detected for noise detection is wirelessly transmitted through a complete audio link, making the detection results more accurate and convenient, and the detection application module automatically completes noise detection for the received data, thereby improving the intelligence and flexibility of noise detection.
[0066] Specifically, please refer to Figure 1B, which is a schematic diagram of the internal structure of a system-on-chip (SoC) for audio detection provided in an embodiment of the present application. As shown in Figure 1B, the SoC includes a detection application module and a system data recording module. After receiving the audio data to be detected from the system data recording module, the detection application module further performs data analysis and processing on the audio data to be detected by providing a detection application APP. This is specifically achieved through the following functional modules: data separation, data conversion processing, data calculation, noise detection, and detection result display.
[0067] In order to better understand the above process, this application is described in detail below in conjunction with specific embodiments.
[0068] Please refer to FIG2 , which is a flowchart of an audio detection method provided in an embodiment of the present application, which is applied to a system chip. As shown in FIG2 , the audio detection method specifically includes the following steps:
[0069] S201: Acquire audio data to be detected.
[0070] The audio data to be detected includes a reference audio signal, which is an audio signal obtained after the audio source signal is transmitted through an audio playback link.
[0071] Exemplarily, as shown in Figures 1A and 1B , the audio playback chain includes a playback chain formed by a system chip (SoC), a digital signal processor (DSP), a power amplifier chip, and an audio player. Exemplarily, after receiving a reference audio signal transmitted by the digital signal processor (DSP) or the power amplifier chip, the SoC records the received data through a system data recording module. Specifically, the received reference audio signal is sorted according to the order in which it is received and a preset data arrangement, thereby obtaining audio data to be tested for audio detection. In other words, the audio data stream to be tested passes through the entire audio chain.
[0072] S202: Analyze the audio data to be detected to obtain a noise detection result.
[0073] Exemplarily, the system data recording module transmits the audio data to be detected obtained by data recording to the detection application module of the SoC, and performs data analysis through the detection application APP in the detection application module, including but not limited to: data separation, data conversion processing, data calculation, noise detection, to obtain the final noise detection results, and display the detection results, etc.
[0074] As can be seen, the audio detection method described in the embodiment of this application obtains the audio data to be detected after data recording, wherein the audio data to be detected after data recording includes a reference audio signal; performs data analysis on the audio data to be detected, and obtains a noise detection result. This allows the application to automatically detect the returned audio data to determine whether there is a noise problem in the audio link, thereby achieving the purpose of improving the intelligence and convenience of noise detection.
[0075] In a possible example, before acquiring the audio data to be detected obtained after data recording, the method may include the following steps: transmitting the audio source signal to the power amplifier chip through the audio playback link.
[0076] For example, as shown in FIG1A , the audio playback link includes a playback link formed by a system-on-chip (SoC), a digital signal processor (DSP), a power amplifier chip, and an audio player. Specifically, the system-on-chip (SoC) establishes a communication connection with the digital signal processor (DSP) via a first communication protocol. The first communication protocol can be a TDM transmission protocol. The SoC transmits the audio data to be played to the external DSP via the TDM transmission protocol. A set of TDMs can transmit data from 8 slots, so detection can be performed on each slot individually.
[0077] Further, please refer to Figure 3, which is a schematic diagram of a data transmission process provided by an embodiment of the present application. Wherein, TX represents transmission (transport), and RX represents reception (receive). DSP-QC-RX means that SoC transmits the audio data to be played to DSP based on the first communication protocol QC, and DSP extracts the signal according to the received audio data to be played to obtain a reference audio signal. Since DSP and power amplifier chip Audio Amplifier are two different audio hardware, the data transmission between them is based on the second communication protocol for data transmission, wherein the second communication protocol can be an A2B transmission protocol, and A2B-TDM-RX means that DSP transmits the reference audio signal to the power amplifier chip based on the second communication protocol A2B.
[0078] It can be seen that in the example of this application, the communication connection between the SoC, DSP and power amplifier chip is realized through the first communication protocol and the second communication protocol to form an audio link to realize the transmission of audio data to be played and transmit the audio source signal to the power amplifier chip.
[0079] In a possible example, the obtaining of the audio data to be detected may include the following steps: obtaining an audio signal returned by the power amplifier chip and corresponding to the audio source signal to be pushed to an audio playback device for audio playback.
[0080] For example, after the data is transmitted to the audio amplifier chip, the mixer module inside the audio amplifier needs to synchronously loopback the reference audio signal played to the audio playback device to the upstream path DSP of the amplifier, and then the DSP transmits it back to the SoC.
[0081] Furthermore, the SoC receives a reference audio signal sent from the DSP.
[0082] It can be seen that in the example of this application, the system chip receives the reference audio signal sent back by the power amplifier chip through the DSP through the first communication protocol, thereby realizing the transmission of the audio data to be detected in the entire audio link without the need for a separate audio connection line to complete the connection between devices. This saves the equipment cost required for the test and facilitates the transmission and reception of the audio data to be detected, thereby improving the convenience and efficiency of noise detection.
[0083] In one possible example, the system chip is connected to a digital signal processor, and the digital signal processor is connected to the power amplifier chip. The transmission of the audio source signal to the power amplifier chip through the audio playback link may include the following steps: transmitting the audio source signal to the digital signal processor through a first communication protocol; processing the audio source signal by the digital signal processor and transmitting it to the power amplifier chip through a second communication protocol.
[0084] For example, as described above with respect to the data transmission process diagram shown in FIG3 , DSP-QC-RX indicates that the system-on-chip (SoC) transmits the audio data to be played to the DSP based on the first communication protocol, QC. The DSP then extracts the signal from the received audio data to be played to obtain a reference audio signal. Since the DSP and the audio amplifier chip (Audio Amplifier) are two different audio hardware components, data transmission between them is based on a second communication protocol, which may be an A2B transmission protocol. A2B-TDM-RX indicates that the DSP transmits the reference audio signal to the amplifier chip based on the second communication protocol, A2B.
[0085] In a possible example, the audio data to be detected further includes microphone data; the microphone data is collected and sent by the digital signal processor.
[0086] Exemplarily, the digital signal processor DSP receives the microphone audio data recorded from the microphone device Mic while receiving the returned reference audio signal.
[0087] Furthermore, the SoC receives the reference audio signal sent from the DSP while receiving the microphone audio data.
[0088] It can be seen that in the example of this application, the communication connection between the SoC and the DSP and the power amplifier chip is realized through the first communication protocol and the second communication protocol, thereby realizing the transmission of the audio data to be played and receiving the reference audio signal sent back by the power amplifier chip through the DSP, realizing the transmission of the audio data to be detected in the entire audio link without the need for a separate audio connection line to complete the connection between devices, thus saving the equipment cost required for the test and facilitating the transmission and reception of the audio data to be detected, improving the convenience and efficiency of noise detection. Moreover, the data received by the SoC are all obtained based on the transmission in the audio link, which to a certain extent reduces the interference of ambient sound when manually collecting audio, thereby improving the accuracy of noise detection.
[0089] In one possible example, the microphone data includes left channel data and right channel data, and the reference audio signal includes a left channel reference signal and a right channel reference signal; the sorted microphone data and reference audio signal are used to represent the arrangement result obtained by arranging the left channel data, the right channel data, the left channel reference signal and the right channel reference signal in sequence according to bit depth.
[0090] Specifically, the DSP receives microphone audio data recorded by the microphone and reference audio signals loopbacked back from the amplifier chip. The microphone audio data includes left voice data and right voice data, and the reference audio signals include a left ref reference signal and a right ref reference signal. The DSP receives the data in real time and sequentially transmits it to the system data recording module of the SoC.
[0091] Furthermore, referring to FIG4A , a schematic diagram of an arrangement of audio data to be detected provided in this application, the SoC arranges the received data in sequence as shown in FIG4A through the system data recording module to obtain the audio data to be detected with the arrangement result shown in FIG4A .
[0092] Furthermore, the SoC sends the audio data to be detected to the detection application module through the system data recording module, and the detection application APP completes the noise detection.
[0093] It can be seen that in the example of this application, a system data recording module is added to the SoC as a data recording node to enable the SoC to arrange the received microphone audio data and the reference audio signal to form the audio data to be detected, and serve as a data transmission path to transmit the received data to the detection application module, thereby realizing noise detection.
[0094] In one possible example, the method for performing data analysis on the audio data to be detected may include the following steps: obtaining sampling data by performing data separation on the data to be detected at a fixed position at the fixed bit depth, wherein the sampling data is used to represent the data corresponding to the reference audio signal; converting the continuous signal in the time domain represented by the sampling data into a discrete frequency domain signal to obtain audio frequency data; performing amplitude calculation based on the audio frequency data to obtain an amplitude calculation result; and obtaining the noise detection result based on the amplitude calculation result.
[0095] Exemplarily, as shown in FIG4B , after receiving the audio data to be detected shown in FIG4A , the detection application of the system data recording module of the SoC obtains the sampled data shown in FIG4B through the process of data separation. Among them, the sampled data is continuous audio signal data in the time domain corresponding to the reference audio signal passing through the entire audio link. Specifically, the arrangement of the audio data is regular, and the data is arranged for the left and right channels and the left and right reference signals according to the bit depth (Bit Depth), and the bit depth is the number of binary coded bits of the sampled value. Therefore, by extracting data with a fixed bit depth and a fixed position, the sampled data corresponding to the reference audio signal can be obtained.
[0096] Furthermore, the detection application performs fast Fourier transform processing on the sampled data to achieve data conversion, converting the continuous signal data in the time domain of the sampled data into a discrete frequency domain signal representation, where the representation is specifically implemented through audio frequency.
[0097] Furthermore, the detection application performs amplitude calculations based on the audio frequency data. If an amplitude inconsistent with a preset threshold occurs, it indicates that noise has occurred in the audio link. By comparing each amplitude with the preset threshold, the noise detection result is obtained.
[0098] As can be seen, in this example, by adding a detection application to the SoC, the detection application performs data analysis on the received audio data to be detected, thereby obtaining the noise detection result. This allows the detection application to automatically analyze the received audio data to be detected without human intervention, improving the convenience and intelligence of noise detection, and thus improving the efficiency of noise detection.
[0099] In a possible example, converting the continuous signal in the time domain represented by the sampled data into a discrete frequency domain signal may include the following steps: dividing the sampled data into at least one group with buffers of the same size; converting the continuous signal in the time domain represented by the sampled data of each buffer into a discrete frequency domain signal through a target algorithm to obtain frequency data of each buffer, wherein the frequency data corresponding to each buffer represents the amplitude and phase information of each frequency component in a complex form, the amplitude being used to represent the intensity of the frequency component in the reference audio signal corresponding to the sampled data, and the phase being used to represent the relative positional relationship between each frequency component and a reference time point; and combining the frequency data of each buffer to obtain the audio frequency data corresponding to the sampled data.
[0100] Specifically, the SoC obtains the sampled data after data separation of the audio data to be detected through the detection application, and performs data conversion processing according to a fixed buffer size. For example, through the fast Fourier transform FFT, the continuous signal in the time domain is converted into a discrete frequency domain signal, that is, the sound waveform represented by the reference audio signal is converted into the vibration frequency value representation of the sound.
[0101] For example, in audio signal processing, Fast Fourier Transform (FFT) can be used to convert time domain signals into frequency domain signals, which is often used in applications such as spectrum analysis, filtering, and audio feature extraction. Using a fixed-size buffer to process audio data is a common method.
[0102] For example, if the size of the buffer is 1024 (1k), the detection application can obtain 1024 complex points through FFT (the number of sampling points at the same time is equal to the number of corresponding frequency values in the frequency domain). Due to the symmetry of the data, the valid data obtained after the conversion includes a total of: 1+1+(1024-2) / 2=513 valid FFT data. Except for the point occupancy corresponding to DC and n / 2, other frequency data are composed of real part + imaginary part. For details, please refer to the following Table 1:
[0103] Table 1
[0104] The specific processing process includes determining the buffer size, that is, determining the buffer size based on the required sampling rate. For example, if the sampling rate is 1kHz, there will be 1,000 samples per second. If you want to perform an FFT on 25 milliseconds of continuous audio data, you need a buffer of 25 samples.
[0105] Furthermore, the detection application reads the sampled data and stores it into a fixed-size buffer.
[0106] Furthermore, a window function is determined, wherein the window function smoothes the reference audio signal in both the time and frequency domains to reduce spectral leakage. Common window functions include Hanning window, Hamming window, Blackman window, etc.
[0107] Furthermore, an FFT transform is applied to each window to convert the time domain signal into a frequency domain signal, obtaining frequency data for each buffer. The frequency data for each buffer is combined to obtain the audio frequency data corresponding to the sampled data. This audio frequency data can be used for subsequent processing, such as calculating amplitude, phase spectrum, power spectrum, and extracting useful frequency domain features.
[0108] It can be seen that in this example, by performing data conversion processing on the sampled data, audio frequency data for representing the frequency of the sampled data is obtained, and the obtained audio frequency data is then used in subsequent amplitude calculation and noise detection.
[0109] In one possible example, the amplitude calculation result includes at least one amplitude, each amplitude being used to characterize the energy of each frequency component in the corresponding buffer; obtaining the noise detection result based on the amplitude calculation result may include the following steps: comparing each amplitude with a preset threshold value respectively; if there is a target amplitude greater than or less than the preset threshold value, determining that the noise detection result is the presence of noise in the audio link; if each amplitude value is equal to the preset threshold value, determining that the noise detection result is the absence of noise in the audio link.
[0110] Exemplarily, the detection application determines whether noise is present in the current audio link based on a comparison result between each amplitude and a preset threshold. Specifically, the amplitude corresponding to the standard audio data is a fixed value, namely, the preset threshold. If a difference is determined between the target amplitude and the preset threshold, the current noise detection result is determined to be the presence of noise in the audio link. If no difference is determined between the target amplitude and the preset threshold, the current noise detection result is determined to be the absence of noise in the audio link.
[0111] It can be seen that in this example, the noise detection result is obtained by comparing the amplitude calculation result obtained based on the sampled data with the preset threshold, thereby determining whether noise occurs in the current audio link.
[0112] In a possible example, after determining that the noise detection result is the occurrence of noise in the audio link, the method may include the following steps: recording the noise detection result, and presenting the noise detection result to a user in a visual manner.
[0113] For example, the SoC performs noise detection to provide the results to developers or maintenance personnel so they can promptly adjust and optimize the system. Therefore, if the noise detection result indicates that there is noise in the audio link, the SoC records the noise detection result and presents it visually to the user, such as the developer or maintenance personnel.
[0114] Exemplarily, the visualization methods include but are not limited to: visualization on a vehicle display screen, visualization on a user terminal device sent via email, etc., which will not be elaborated here.
[0115] As can be seen, in this example, by providing the noise detection results to the user in a visual manner, timely inspection and optimization can be carried out when noise is detected in the audio link, thereby improving the audio playback effect of the device and the user experience.
[0116] Please refer to FIG5 , which is a schematic diagram of the structure of an electronic device. As shown in FIG5 , the electronic device includes a processor, a memory, a communication interface, and one or more programs. The one or more programs are stored in the memory and configured to be executed by the processor. The electronic device is applied to a system chip. The programs include instructions for performing the following steps:
[0117] Acquire audio data to be detected, wherein the audio data to be detected includes a reference audio signal, and the reference audio signal is an audio signal obtained after the audio source signal is transmitted through an audio playback link;
[0118] Data analysis is performed on the audio data to be detected to obtain a noise detection result.
[0119] As can be seen, the audio detection method described in the embodiment of the present application obtains audio data to be detected, wherein the audio data to be detected includes a reference audio signal, which is an audio signal obtained after the audio source signal is transmitted through the audio playback link; and performs data analysis on the audio data to be detected to obtain a noise detection result. In this way, the application can automatically detect the returned audio data to be detected and then determine whether there is a noise problem in the audio link, thereby achieving the purpose of improving the intelligence and convenience of noise detection.
[0120] In one possible example, before obtaining the audio data to be detected obtained after the data recording, the program includes instructions for performing the following steps:
[0121] The audio source signal is transmitted to the power amplifier chip through the audio playback link.
[0122] In one possible example, the procedure for obtaining the audio data to be detected includes instructions for performing the following steps:
[0123] An audio signal returned by the power amplifier chip and corresponding to the audio source signal is obtained, and is to be pushed to an audio playback device for audio playback.
[0124] In one possible example, the system chip is connected to a digital signal processor, the digital signal processor is connected to the power amplifier chip, and the audio source signal is transmitted to the power amplifier chip through the audio playback link. The program includes instructions for performing the following steps:
[0125] transmitting the audio source signal to the digital signal processor via a first communication protocol;
[0126] The digital signal processor processes the audio source signal and transmits it to the power amplifier chip via a second communication protocol.
[0127] In a possible example, the audio data to be detected further includes microphone data; the microphone data is collected and sent by the digital signal processor.
[0128] In one possible example, the microphone data includes left channel data and right channel data, and the reference audio signal includes a left channel reference signal and a right channel reference signal; the sorted microphone data and reference audio signal are used to represent the arrangement result obtained by arranging the left channel data, the right channel data, the left channel reference signal and the right channel reference signal in sequence according to bit depth.
[0129] In one possible example, the performing of data analysis on the audio data to be detected, the program includes instructions for executing the following steps:
[0130] Separating data at a fixed position of the data to be detected at the fixed bit depth to obtain sampled data, wherein the sampled data is used to represent data corresponding to the reference audio signal;
[0131] Converting the continuous signal in the time domain represented by the sampled data into a discrete frequency domain signal to obtain audio frequency data;
[0132] Performing amplitude calculation according to the audio frequency data to obtain an amplitude calculation result;
[0133] The noise detection result is obtained according to the amplitude calculation result.
[0134] In a possible example, the process of converting the continuous signal in the time domain represented by the sampled data into a discrete frequency domain signal includes instructions for executing the following steps:
[0135] Dividing the sampled data into at least one group using buffers of the same size;
[0136] Converting the continuous signal in the time domain represented by the sampled data of each buffer into a discrete frequency domain signal through a target algorithm to obtain frequency data of each buffer, wherein the frequency data corresponding to each buffer represents the amplitude and phase information of each frequency component in a complex form, the amplitude being used to represent the intensity of the frequency component in the reference audio signal corresponding to the sampled data, and the phase being used to represent the relative positional relationship between each frequency component and a reference time point;
[0137] The frequency data in each buffer is combined to obtain the audio frequency data corresponding to the sampling data.
[0138] In a possible example, the amplitude calculation result includes at least one amplitude, and each amplitude is used to represent the energy of each frequency component in the corresponding buffer zone;
[0139] The noise detection result is obtained based on the amplitude calculation result, and the above program includes instructions for performing the following steps:
[0140] comparing each of the amplitudes with a preset threshold value;
[0141] If the target amplitude is greater than or less than the preset threshold, determining that the noise detection result is that noise occurs in the audio link;
[0142] If each of the amplitude values is equal to the preset threshold, it is determined that the noise detection result is that no noise occurs in the audio link.
[0143] In a possible example, after determining that the noise detection result is that noise occurs in the audio link, the method further includes:
[0144] The noise detection result is recorded and displayed to the user in a visual manner.
[0145] The above mainly introduces the solution of the embodiment of the present application from the perspective of the execution process of the method side. It is understandable that, in order to realize the above functions, the electronic device includes a hardware structure and / or software module corresponding to the execution of each function. Those skilled in the art should easily realize that, in combination with the units and algorithm steps of each example described in the embodiment 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 a hardware or computer software driven hardware manner 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 this application.
[0146] The embodiment of the present application can divide the functional units of the electronic device 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.
[0147] In the case of dividing each functional module into corresponding functional modules, FIG6 shows a schematic diagram of the functional unit structure of an audio detection device. As shown in FIG6 , the audio detection device 600 is applied to a system chip. The audio detection device 600 may include an acquisition unit 601 and a detection unit 602; wherein,
[0148] The acquiring unit 601 is configured to acquire audio data to be detected, wherein the audio data to be detected includes a reference audio signal, which is an audio signal obtained after the audio source signal is transmitted through an audio playback link;
[0149] The detection unit 602 is configured to perform data analysis on the audio data to be detected to obtain a noise detection result.
[0150] As can be seen, the noise detection device provided in the embodiment of the present application obtains the audio data to be detected through an acquisition unit, wherein the audio data to be detected includes a reference audio signal, which is an audio signal obtained after the audio source signal is transmitted through the audio playback link; the detection unit performs data analysis on the audio data to be detected to obtain a noise detection result. In this way, the application can automatically detect the returned audio data to be detected and then determine whether there is a noise problem in the audio link, thereby achieving the purpose of improving the intelligence and convenience of noise detection.
[0151] In a possible example, before acquiring the audio data to be detected obtained after the data recording, the acquiring unit 601 is further configured to perform the following steps:
[0152] The audio source signal is transmitted to the power amplifier chip through the audio playback link.
[0153] In a possible example, in acquiring the audio data to be detected, the acquiring unit 601 is further configured to perform the following steps:
[0154] An audio signal returned by the power amplifier chip and corresponding to the audio source signal is obtained, and is to be pushed to an audio playback device for audio playback.
[0155] In a possible example, the system chip is connected to a digital signal processor, the digital signal processor is connected to the power amplifier chip, and the audio source signal is transmitted to the power amplifier chip through the audio playback link. The acquisition unit 601 is further configured to perform the following steps:
[0156] transmitting the audio source signal to the digital signal processor via a first communication protocol;
[0157] The digital signal processor processes the audio source signal and transmits it to the power amplifier chip via a second communication protocol.
[0158] In a possible example, the audio data to be detected further includes microphone data; the microphone data is collected and sent by the digital signal processor.
[0159] In a possible example, the system-on-chip (SoC) is connected to a digital signal processor (DSP); before acquiring the audio data to be detected obtained after data recording, the acquiring unit 601 is further configured to perform the following steps:
[0160] The DSP transmits the audio data to be played to the power amplifier chip via a first communication protocol, wherein the DSP establishes a communication connection with the power amplifier chip via a second communication protocol, the DSP is configured to extract a signal from the audio data to be played to obtain the reference audio signal, the power amplifier chip is configured to amplify the reference audio signal and then push it to the playback device for audio playback, and at the same time transmit the reference audio signal back to the DSP;
[0161] receiving the reference audio signal returned by the DSP; and
[0162] The microphone data sent by the DSP is received, wherein the microphone data is recorded by a microphone device.
[0163] In one possible example, the microphone data includes left channel data and right channel data, and the reference audio signal includes a left channel reference signal and a right channel reference signal; the sorted microphone data and reference audio signal are used to represent the arrangement result obtained by arranging the left channel data, the right channel data, the left channel reference signal and the right channel reference signal in sequence according to bit depth.
[0164] In a possible example, the data analysis is performed on the audio data to be detected, and the detection unit 602 is further configured to perform the following steps:
[0165] Separating data at a fixed position of the data to be detected at the fixed bit depth to obtain sampled data, wherein the sampled data is used to represent data corresponding to the reference audio signal;
[0166] Converting the continuous signal in the time domain represented by the sampled data into a discrete frequency domain signal to obtain audio frequency data;
[0167] Performing amplitude calculation according to the audio frequency data to obtain an amplitude calculation result;
[0168] The noise detection result is obtained according to the amplitude calculation result.
[0169] In a possible example, the continuous signal in the time domain represented by the sampled data is converted into a discrete frequency domain signal, and the detection unit 602 is further configured to perform the following steps:
[0170] Dividing the sampled data into at least one group using buffers of the same size;
[0171] Converting the continuous signal in the time domain represented by the sampled data of each buffer into a discrete frequency domain signal through a target algorithm to obtain frequency data of each buffer, wherein the frequency data corresponding to each buffer represents the amplitude and phase information of each frequency component in a complex form, the amplitude being used to represent the intensity of the frequency component in the reference audio signal corresponding to the sampled data, and the phase being used to represent the relative positional relationship between each frequency component and a reference time point;
[0172] The frequency data in each buffer is combined to obtain the audio frequency data corresponding to the sampling data.
[0173] In a possible example, the amplitude calculation result includes at least one amplitude, and each amplitude is used to represent the energy of each frequency component in the corresponding buffer zone;
[0174] The noise detection result is obtained according to the amplitude calculation result, and the detection unit 602 is further configured to perform the following steps:
[0175] comparing each of the amplitudes with a preset threshold value;
[0176] If the target amplitude is greater than or less than the preset threshold, determining that the noise detection result is that noise occurs in the audio link;
[0177] If each of the amplitude values is equal to the preset threshold, it is determined that the noise detection result is that no noise occurs in the audio link.
[0178] In a possible example, after determining that the noise detection result is that noise occurs in the audio link, the detection unit 602 is further configured to perform the following steps:
[0179] The noise detection result is recorded and displayed to the user in a visual manner.
[0180] It should be noted that all relevant contents of each step involved in the above method embodiment can be referred to the functional description of the corresponding functional module and will not be repeated here.
[0181] The electronic device provided in this embodiment is used to execute the above-mentioned audio detection method, and thus can achieve the same effect as the above-mentioned implementation method.
[0182] When integrated units are used, the electronic device may include a processing module, a storage module, and a communication module. The processing module may be used to control and manage the operation of the electronic device. For example, it may be used to support the electronic device in executing the steps performed by the acquisition unit 601 and the detection unit 602. The storage module may be used to support the electronic device in executing and storing program code and data. The communication module may be used to support communication between the electronic device and other devices.
[0183] The processing module may be a processor or a controller. It may implement or execute the various exemplary logic blocks, modules, and circuits described in conjunction with the disclosure of this application. The processor may also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of digital signal processing (DSP) and a microprocessor, and so on. The storage module may be a memory. The communication module may specifically be a device that interacts with other electronic devices, such as a radio frequency circuit, a Bluetooth chip, or a Wi-Fi chip.
[0184] An embodiment of the present application also provides a computer storage medium, wherein the computer 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 method described in the above method embodiments, and the above computer includes an electronic device.
[0185] The present application also provides a computer program product comprising a non-transitory computer-readable storage medium storing a computer program, wherein the computer program is operable to cause a computer to perform some or all of the steps of any of the methods described in the above method embodiments. The computer program product may be a software installation package, and the computer may comprise an electronic device.
[0186] An embodiment of the present application also provides a vehicle, which includes a system chip, a power amplifier chip, a digital signal processor and an audio playback device. The system chip establishes a communication connection with the digital signal processor, and the digital signal processor establishes a communication connection with the power amplifier chip. The vehicle can operate the system chip to execute part or all of the steps of any method recorded in the above method embodiments.
[0187] 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 this application is not limited by the order of the actions described, because according to this 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 this application.
[0188] In the above embodiments, the description of each embodiment has its own focus. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0189] In the several embodiments provided in this application, it should be understood that the disclosed devices can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of the above-mentioned units is only a logical function division. In actual implementation, there may be other division methods, 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 devices or units can be electrical or other forms.
[0190] The units described above as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0191] In addition, the functional units in the various embodiments of the present application may be integrated into a single processing unit, or each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.
[0192] If the above-mentioned 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 memory. Based on this understanding, the technical solution of the present application, 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, which is stored in a memory and includes a number of instructions for enabling a computer device (which can be a personal computer, server or network device, etc.) to execute all or part of the steps of the above-mentioned methods of each embodiment of the present application. The aforementioned memory includes: various media that can store program codes, such as a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk.
[0193] Those skilled in the art will appreciate 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 may include a flash drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, etc.
[0194] The above is a detailed introduction to the embodiments of the present application. Specific examples are used herein 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 those skilled in the art, according to the idea of the present application, there may be changes in the specific implementation methods 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 detection method, characterized in that: Applied to a system chip, the method comprises: Acquiring (S201) audio data to be detected, wherein the audio data to be detected includes a reference audio signal, and the reference audio signal is an audio signal obtained after the audio source signal is transmitted through an audio playback link; and The audio data to be detected is analyzed (S202) to obtain a noise detection result.
2. The method according to claim 1, characterized in that Before obtaining the audio data to be detected, the method further includes: The audio source signal is transmitted to the power amplifier chip through the audio playback link.
3. The method according to claim 2, characterized in that The step of obtaining the audio data to be detected includes: An audio signal returned by the power amplifier chip and corresponding to the audio source signal is obtained and is to be pushed to an audio playback device for audio playback.
4. The method according to claim 3, characterized in that The method of transmitting the audio source signal to the power amplifier chip through the audio playback link includes: Transmitting the audio source signal to a digital signal processor connected to the system chip through a first communication protocol; and The digital signal processor processes the audio source signal and transmits it to the power amplifier chip connected to the digital signal processor through a second communication protocol.
5. The method according to claim 4, characterized in that The audio data to be detected also includes microphone data; the microphone data is collected and sent by the digital signal processor.
6. The method according to claim 5, characterized in that Acquiring the audio data to be detected includes: The reference audio signals are sorted according to a receiving order and a preset data arrangement mode to obtain sorted audio data to be detected.
7. The method according to claim 6, characterized in that The microphone data includes left channel data and right channel data, and the reference audio signal includes a left channel reference signal and a right channel reference signal; the sorted microphone data and reference audio signal are used to represent the arrangement result obtained by arranging the left channel data, the right channel data, the left channel reference signal and the right channel reference signal in sequence according to bit depth.
8. The method according to claim 7, characterized in that The performing data analysis on the audio data to be detected includes: For the data to be detected, data separation is performed on the data at a fixed position with the fixed bit depth to obtain sampled data, wherein the sampled data is used to represent the data corresponding to the reference audio signal; Converting the continuous signal in the time domain represented by the sampled data into a discrete frequency domain signal to obtain audio frequency data; Performing amplitude calculation according to the audio frequency data to obtain an amplitude calculation result; and The noise detection result is obtained according to the amplitude calculation result.
9. The method according to claim 8, characterized in that The step of converting the continuous signal in the time domain represented by the sampled data into a discrete signal in the frequency domain comprises: Dividing the sampled data into at least one group with buffers of the same size; Converting the continuous signal in the time domain represented by the sampling data of each buffer into a discrete frequency domain signal through a target algorithm to obtain the frequency data of each buffer, wherein the frequency data corresponding to each buffer represents the amplitude and phase information of each frequency component in a complex form, the amplitude is used to represent the intensity of the frequency component in the reference audio signal corresponding to the sampling data, and the phase is used to represent the relative position relationship between each frequency component and a reference time point; and The frequency data of each buffer is combined to obtain the audio frequency data corresponding to the sampling data.
10. The method according to claim 9, characterized in that The amplitude calculation result includes at least one amplitude, and each amplitude is used to characterize the energy of each frequency component in the corresponding buffer zone; The step of obtaining the noise detection result according to the amplitude calculation result includes: Comparing each of the amplitudes with a preset threshold value respectively; If there is at least one amplitude greater than or less than the preset threshold, determining that the noise detection result is that noise occurs in the audio link; and If each of the amplitude values is equal to the preset threshold, the noise detection result is determined to be that no noise occurs in the audio link.
11. The method according to claim 10, characterized in that After determining that the noise detection result is that noise occurs in the audio link, the method further includes: The noise detection result is recorded and displayed to the user in a visual manner.
12. An audio detection device (600), characterized in that: Applied to a system chip, the device (600) comprises: An acquisition unit (601) is used to acquire audio data to be detected, wherein the audio data to be detected includes a reference audio signal, and the reference audio signal is an audio signal obtained after the audio source signal is transmitted through an audio playback link; The detection unit (602) is used to perform data analysis on the audio data to be detected to obtain a noise detection result.
13. An electronic device, characterized in that: The method comprises a processor, a memory, and a communication interface, wherein one or more programs are stored in the memory and configured to be executed by the processor, wherein the programs include instructions for executing the steps in the method according to any one of claims 1 to 11.
14. A non-volatile computer-readable storage medium, characterized in that: A computer program for electronic data exchange is stored, wherein the computer program causes a computer to execute the method according to any one of claims 1 to 11.
15. A vehicle, characterized in that: It includes a system chip, a power amplifier chip, a digital signal processor, and an audio playback device, wherein the system chip establishes a communication connection with the digital signal processor, the digital signal processor establishes a communication connection with the power amplifier chip, and the system chip includes a method for executing any one of claims 1 to 11.
Citation Information
Patent Citations
Audio signal testing method, device and equipment
CN111343557A
Audio detection method and device, equipment and storage medium
CN111787476A
Audio data processing method and system and storage medium
CN112509595A
Remote audio test system for vehicle machine
CN116156406A
Audio detection method and related device
CN118280383A