Audio processing method, audio processing device, electronic equipment and storage medium

By adjusting the mask curve and frequency point amplitude value of the audio data and compressing audio for different speaker types, the problem of difficulty in taking into account both the sound quality and the compression ratio in the existing technology is solved, and more efficient storage space saving and sound quality maintenance are achieved.

CN119091893APending Publication Date: 2024-12-06北杉集成电路(深圳)有限公司
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411120171.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-14
Publication Date
2024-12-06

AI Technical Summary

Technical Problem

Existing audio compression and coding technologies are difficult to improve the overall audio compression ratio while maintaining sound quality and saving storage space.

Method used

By determining the frequency response curve of the target speaker, adjusting the mask curve of the full frequency segment of the audio data, and compressing according to the adjusted mask curve and the amplitude value of the frequency point, optimize compression for different types of speakers.

Benefits of technology

Improves the overall compression ratio of the audio, maintains sound quality, saves storage space, and adapts to the frequency response characteristics of different types of speakers.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119091893A_ABST
    Figure CN119091893A_ABST
Patent Text Reader

Abstract

The invention discloses an audio processing method, an audio processing device, electronic equipment and a computer readable storage medium. The audio processing method comprises the steps that a frequency response curve of a target loudspeaker is determined, the target loudspeaker is used for playing audio data, the audio data comprises a plurality of data frames, and each data frame can be analyzed into a plurality of frequency points; adjusting a mask curve of the full frequency band of the audio data by using the frequency response curve; and compressing the audio data according to the adjusted mask curve of the full frequency band and the amplitude value of each frequency point. Thus, the mask curve of the full frequency band is adjusted according to the frequency response curves of the different types of target loudspeakers, then the audio data is compressed according to the adjusted mask curve of the full frequency band and the amplitude value of each frequency point, and different compression ratio improvement effects are achieved for the different types of target loudspeakers. The audio is played through the target loudspeaker, so that better tone quality can be kept, the overall compression ratio of the audio can be improved, and the storage space is saved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of audio processing technology, and in particular to an audio processing method, an audio processing device, an electronic device, and a computer-readable storage medium. Background Art

[0002] At present, audio compression coding technology is widely used. Audio compression coding technology can be used to compress and encode audio signals, converting them into smaller data volumes, thereby reducing the bandwidth and storage space required for transmission. Therefore, how to further improve the overall audio compression ratio, save storage space, and maintain good sound quality when playing with speakers is an important issue that needs to be solved. Summary of the invention

[0003] Embodiments of the present application provide an audio processing method, an audio processing device, an electronic device, and a computer-readable storage medium.

[0004] The audio processing method of the implementation mode of the present application includes: determining a frequency response curve of a target speaker, the target speaker is used to play audio data, the audio data includes multiple data frames, each of the data frame can be parsed into multiple frequency points; using the frequency response curve to adjust the mask curve of the full frequency band of the audio data; compressing the audio data according to the adjusted mask curve of the full frequency band and the amplitude values ​​of each frequency point.

[0005] In some embodiments, the audio processing method includes: performing spectrum analysis on each of the frequency points in each of the data frames, and then performing human ear acoustic model analysis on each of the processed frequency points to obtain a threshold curve for the entire frequency band; and obtaining a mask curve for the entire frequency band based on the threshold curve for the entire frequency band and an absolute threshold curve of the human ear under silent conditions.

[0006] In some embodiments, the audio processing method includes: acquiring audio data; performing frame processing on the audio data to obtain multiple data frames, each of which can be parsed into multiple frequency points; and performing discrete operation transformation on each of the frequency points to obtain amplitude values ​​of multiple frequency points.

[0007] In some embodiments, using the frequency response curve to adjust the mask curve of the full frequency band of the audio data includes: determining the mask adjustment parameters of the mask curve of the full frequency band according to the frequency response curve of the target speaker; and adjusting the mask curve of the full frequency band according to the mask adjustment parameters.

[0008] In some embodiments, compressing the audio data according to the adjusted mask curve of the full frequency band and the amplitude value of each frequency point includes: at the same frequency, judging whether the amplitude value of the frequency point is greater than the amplitude value of the adjusted mask curve of the full frequency band; and determining that the frequency point is the frequency point required to be encoded when the amplitude value of the frequency point is greater than the amplitude value of the adjusted mask curve of the full frequency band.

[0009] In some embodiments, compressing the audio data according to the adjusted mask curve of the full frequency band and the amplitude value of each frequency point includes: compressing the audio data according to the mask curve of the full frequency band before adjustment, the adjusted mask curve of the full frequency band and the amplitude value of each frequency point.

[0010] In some embodiments, the audio data is compressed according to the mask curve of the full frequency band before adjustment, the mask curve of the full frequency band after adjustment, and the amplitude value of each frequency point, including: at the same frequency, judging whether the amplitude value of the frequency point is greater than the amplitude value of the mask curve of the full frequency band after adjustment; when the amplitude value of the frequency point is greater than the amplitude value of the mask curve of the full frequency band after adjustment, determining that the frequency point is a frequency point using a first preset encoding method; when the amplitude value of the frequency point is less than the amplitude value of the mask curve of the full frequency band after adjustment, judging whether the amplitude value of the frequency point is greater than the amplitude value of the mask curve of the full frequency band before adjustment; when the amplitude value of the frequency point is greater than the amplitude value of the mask curve of the full frequency band before adjustment, determining that the frequency point is a frequency point using a second preset encoding method, and the compression bit of the second preset encoding method is less than the compression bit of the first preset encoding method; when the amplitude value of the frequency point is less than the amplitude value of the mask curve of the full frequency band before adjustment, determining that the frequency point is not encoded.

[0011] In some embodiments, the frequency response curve includes a demarcation frequency, a frequency response value of a frequency point in the frequency response curve that is less than the demarcation frequency is less than a preset value, and a frequency response value of a frequency point in the frequency response curve that is greater than the demarcation frequency is greater than a preset value, and the audio processing method further includes: when the frequency value of the frequency point is less than the demarcation frequency, determining that the frequency point is not to be encoded.

[0012] The audio processing device of the embodiment of the present application includes a determination module, an adjustment module and a compression module. The determination module is used to determine the frequency response curve of the target speaker, the target speaker is used to play audio data, the audio data includes multiple data frames, each of which can be parsed into multiple frequency points; the adjustment module is used to adjust the mask curve of the full frequency band of the audio data using the frequency response curve; the compression module is used to compress the audio data according to the adjusted mask curve of the full frequency band and the amplitude value of each frequency point.

[0013] The electronic device according to the embodiment of the present application includes an electronic device body and an audio processing device according to any one of the above embodiments, wherein the audio processing device is arranged on the electronic device body.

[0014] The computer-readable storage medium of the embodiment of the present application stores a computer program thereon, and when the computer program is executed by a processor, the audio processing method of any of the above embodiments is implemented.

[0015] The audio processing method, audio processing device, electronic device and computer-readable storage medium of the embodiment of the present application can adjust the mask curve of the full frequency band according to the frequency response curve of different types of speakers, and then compress the audio data according to the adjusted mask curve of the full frequency band and the amplitude value of each frequency point, and have different compression ratio improvement effects for different types of speakers. The audio played through the speaker can maintain good sound quality, and can also improve the overall compression ratio of the audio and save storage space.

[0016] Additional aspects and advantages of the present application will be given in part in the description below, and in part will become apparent from the description below, or will be learned through the practice of the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] The above and / or additional aspects and advantages of the present application will become apparent and easily understood from the following description of the embodiments in conjunction with the accompanying drawings, in which:

[0018] Figure 1 is a flowchart of an audio processing method according to an embodiment of the present application;

[0019] Figure 2 is a module schematic diagram of an audio processing device according to an embodiment of the present application;

[0020] Figure 3 is a schematic diagram of a frequency response curve of a target speaker according to an embodiment of the present application;

[0021] Figure 4 is a flowchart of an audio processing method according to an embodiment of the present application;

[0022] Figure 5is a human ear absolute threshold curve under silent conditions in an embodiment of the present application;

[0023] Figure 6 is a schematic diagram of determining the frequency points required for encoding in an implementation manner of the present application;

[0024] Figures 7 to 12 is a flowchart of an audio processing method according to an embodiment of the present application;

[0025] Fig.13 is a schematic diagram of determining the frequency points required for encoding in an implementation manner of the present application;

[0026] Fig.14 is a schematic diagram of an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION

[0027] Embodiments of the present application are described in detail below, and examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are intended to be used to explain the present application, and should not be construed as limiting the present application.

[0028] In the description of the embodiments of the present application, the terms "first" and "second" are used for descriptive purposes only and cannot be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, the features defined as "first" and "second" may explicitly or implicitly include one or more of the features. In the description of the embodiments of the present application, the meaning of "plurality" is two or more, unless otherwise clearly and specifically defined.

[0029] See also Figure 1 , the audio processing method of the embodiment of the present application includes:

[0030] Step 01: Determine the frequency response curve of the target speaker, the target speaker is used to play audio data, the audio data includes multiple data frames, and each data frame can be parsed into multiple frequency points;

[0031] Step 02: Use the frequency response curve to adjust the mask curve of the full frequency band of the audio data;

[0032] Step 03: Compress the audio data according to the adjusted mask curve of the full frequency band and the amplitude value of each frequency point.

[0033] See also Figure 2The present application also discloses an audio processing device 100. The audio processing method of the embodiment of the present application can be implemented by the audio processing device 100 of the embodiment of the present application. The audio processing device 100 includes a determination module 10, an adjustment module 20 and a compression module 30. Among them, step 01 can be implemented by the determination module 10, step 02 can be implemented by the adjustment module 20, and step 03 can be implemented by the compression module 30. That is to say, the determination module 10 is used to determine the frequency response curve of the target speaker, and the target speaker is used to play audio data. The audio data includes multiple data frames, and each data frame can be parsed into multiple frequency points. The adjustment module 20 is used to adjust the mask curve of the full frequency band of the audio data using the frequency response curve. The compression module 30 is used to compress the audio data according to the adjusted mask curve of the full frequency band and the amplitude value of each frequency point.

[0034] The audio processing method and the audio processing device 100 of the embodiment of the present application can adjust the mask curve of the full frequency band according to the frequency response curve of different types of speakers, and then compress the audio data according to the adjusted mask curve of the full frequency band and the amplitude value of each frequency point, so that different types of speakers have different compression ratios, thereby improving the compression effect. Moreover, the audio can maintain good sound quality when played through the target speaker, and can also improve the overall compression ratio of the audio, saving storage space.

[0035] Specifically, when playing audio data, users usually use target speakers to play, and each target speaker has a corresponding frequency response curve (Frequency Response Curve, FR). The frequency response curve refers to the curve of gain change with frequency. The frequency response curve is also called frequency response curve, response curve, frequency response (Frequency Response), etc. The frequency response curve of each target speaker can be used to describe the difference in the processing ability of this target speaker for signals of different frequencies. The corresponding frequency response curve can reflect the effective bandwidth of this target speaker.

[0036] The target speaker is used to play audio data, and the audio data includes multiple data frames, each of which can be parsed into multiple frequency points. In one embodiment, the audio data is decomposed into multiple data frames after processing, and each data frame can be parsed into 512 frequency points. In another embodiment, the audio data is decomposed into multiple data frames after processing, and each data frame can be parsed into 1024 frequency points. In this way, the frequency response curve of the target speaker and the mask curve of the full frequency band of the audio data can be obtained, and then the frequency response curve is used to correct the mask curve of the full frequency band of the audio data, and the audio data is compressed by the adjusted mask curve of the full frequency band and the amplitude value of each frequency point.

[0037] It should be noted that the above examples and specific numerical values ​​are for the convenience of explaining the implementation of the present application and should not be construed as limiting the scope of protection of the present application.

[0038] It is worth mentioning that the audio processing method of the embodiment of the present application can improve the overall compression ratio of the audio while ensuring that the audio is played through the target speaker with good sound quality. Figure 3 , Figure 3 The frequency response curve of the target speaker shows that the sound response ability of a certain frequency band of the audio data is weak and attenuated more after passing through the target speaker. This is reflected in the mask curve of the full frequency band. We can use the frequency response curve to increase the mask value of the frequency point with weak response ability, so as to use the frequency response curve to adjust the mask curve of the full frequency band of the audio data. When encoding, more frequency points with weak response ability are removed to improve the overall compression ratio of the audio and save storage space.

[0039] Please also read Figure 4 , Figure 5 and Figure 6 In some embodiments, the audio processing method includes:

[0040] Step 04: Perform spectrum analysis on each frequency point in each data frame, and then perform human ear acoustic model analysis on each processed frequency point to obtain a threshold curve for the entire frequency range;

[0041] Step 05: Obtain the mask curve of the full frequency band based on the threshold curve of the full frequency band and the absolute threshold curve of the human ear under silent conditions.

[0042] The audio processing method of the embodiment of the present application can be implemented by the audio processing device 100 of the embodiment of the present application. The audio processing device 100 includes a first processing module and a second processing module. Step 04 can be implemented by the first processing module, and step 05 can be implemented by the second processing module. That is to say, the first processing module is used to perform spectrum analysis on each frequency point in each data frame, and then perform human ear acoustic model analysis on each processed frequency point to obtain a threshold curve for the entire frequency range. The second processing module is used to obtain a mask curve for the entire frequency range based on the threshold curve for the entire frequency range and the absolute threshold curve of the human ear under silent conditions.

[0043] Specifically, the audio data includes a plurality of data frames, each of which can be parsed into a plurality of frequency points. After obtaining a plurality of data frames, spectrum analysis is performed on each frequency point in each data frame. In some embodiments, spectrum analysis on frequency points may refer to fast Fourier transform (FFT) of frequency points for analysis. Then, human ear acoustic model analysis is performed on each frequency point after spectrum analysis, so that human auditory characteristics can be utilized to perform correlation analysis on audio data on the auditory spectrum. The human ear acoustic model can simulate the principle of the human auditory system, facilitate feature extraction and analysis of audio signals, and has good noise resistance. In this way, fast Fourier transform is performed on each frequency point and human ear acoustic model analysis is performed on this small segment of audio data, and the result of the model analysis is a threshold curve of the full frequency band. Then the threshold curve of the full frequency band is merged with the absolute threshold curve of the human ear under silent conditions to obtain the mask curve of the full frequency band. Figure 5 is the absolute threshold curve of human ear under silent conditions, Figure 6 It includes the mask curve of the full frequency band, the threshold curve of the full frequency band and the absolute threshold curve of the human ear under silent conditions. The absolute threshold curve of the human ear can be understood as a curve that can reflect the energy level of a pure tone that can be heard by the human ear in a silent environment. The meaning of the mask curve of the full frequency band is that when the amplitude (energy) value of the signal at a certain frequency point is above the mask curve of the full frequency band (for example: Figure 6 As shown, Figure 6 Including full frequency band mask curve, Figure 6 The amplitude value of frequency point A and the amplitude value of frequency point C in the whole frequency band are both above the mask curve of the whole frequency band), that is, the information of the frequency point is not masked and needs to be encoded. Figure 6 As shown, Figure 6 Including full frequency band mask curve, Figure 6 The amplitude value of frequency point B in the image is below the mask curve of the full frequency band), that is, the information of this frequency point is masked and does not need to be encoded because the human ear cannot hear this information. In this way, more frequency points that cannot be distinguished by the human ear can be removed, reducing the information that needs to be encoded and achieving better compression. The frequency point information that needs to be encoded will be less, achieving the purpose of increasing the compression ratio and saving storage space.

[0044] Please also read Figure 7 and Figure 8 In some embodiments, the audio processing method includes:

[0045] Step 061: Obtain audio data;

[0046] Step 062: Perform frame processing on the audio data to obtain multiple data frames, each of which can be parsed into multiple frequency points;

[0047] Step 063: Perform discrete operation transformation on each frequency point to obtain amplitude values ​​of multiple frequency points.

[0048] The audio processing method of the embodiment of the present application can be implemented by the audio processing device 100 of the embodiment of the present application. The audio processing device 100 includes an acquisition module, a third processing module and an operation module. Step 061 can be implemented by the acquisition module, step 062 can be implemented by the third processing module, and step 063 can be implemented by the operation module. In other words, the acquisition module is used to acquire audio data. The third processing module is used to perform frame processing on the audio data to obtain multiple data frames, and each data frame can be parsed into multiple frequency points. The operation module is used to perform discrete operation transformation on each frequency point to obtain the amplitude values ​​of multiple frequency points.

[0049] Specifically, after the audio data is acquired, the audio data is framed, and the data frame is obtained after the audio data is framed. Since the audio data is a long non-steady-state sequence, the non-steady-state audio data can be in a stable state for a short time through frame processing. The audio data is divided into sections for analysis, and each section is called a frame, that is, a data frame. Usually a data frame is tens of milliseconds, for example: a data frame takes 10ms to 30ms. Each data frame can be parsed into multiple frequency points, for example: each data frame can be parsed into 512 frequency points or each data frame can be parsed into 1024 frequency points. Then, each frequency point is discretely transformed to obtain the amplitude values ​​of multiple frequency points. Discrete transformation includes modified discrete cosine transform (MDCT), which is a transformation from time domain to frequency. The improved discrete cosine transform has advantages in eliminating boundary noise and improving signal quality. In this way, by performing improved discrete cosine transform on the frequency point, the amplitude value of the frequency point can be obtained.

[0050] In one embodiment, after acquiring the audio data, the audio data is framed to obtain multiple data frames, and each data frame can be parsed into n frequency points. The n frequency points are converted into n / 2 frequency points by performing an improved discrete cosine transform on the n frequency points, and then the n / 2 frequency points are arranged sequentially from front to back. The arrangement of multiple frequency points from front to back represents the frequencies of multiple frequency points from small to large. If n points become n / 2 points, these values ​​of n / 2 points are represented as distributed on 0-8k in frequency (the sampling rate of the signal is 16K), so it is known that the horizontal and vertical coordinates of each processed frequency point in the graph represent the frequency value and amplitude value respectively. As shown in FIG. Figure 6 As shown, Figure 6 The horizontal axis represents the frequency value, and the y-axis represents the amplitude value. Figure 6 The horizontal axis of the mid-frequency point A represents the frequency value of the frequency point A. Figure 6 The ordinate of the intermediate frequency point A represents the amplitude value of the frequency point A.

[0051] It should be noted that the above examples and specific numerical values ​​are for the convenience of explaining the implementation of the present application and should not be construed as limiting the scope of protection of the present application.

[0052] See also Fig. 9 In some embodiments, step 02 includes:

[0053] Step 021: determining the mask adjustment parameters of the mask curve of the full frequency range according to the frequency response curve of the target speaker;

[0054] Step 022: Adjust the mask curve of the entire frequency band according to the mask adjustment parameters.

[0055] The audio processing method of the embodiment of the present application can be implemented by the audio processing device 100 of the embodiment of the present application, and the audio processing device 100 includes an adjustment module 20, and the adjustment module 20 includes a first adjustment submodule and a second adjustment submodule. Step 021 can be implemented by the first adjustment submodule, and step 022 can be implemented by the second adjustment submodule. That is to say, the first adjustment submodule is used to determine the mask adjustment parameters of the mask curve of the full frequency band according to the frequency response curve of the target speaker. The second adjustment submodule is used to adjust the mask curve of the full frequency band according to the mask adjustment parameters.

[0056] Specifically, the frequency response curve of the target speaker can be used to know that the target speaker has a weak response ability to certain frequencies. Figure 3It is known that the target speaker has a weak response capability to frequencies below 700Hz, which means that even if the encoding information of the frequency points of the low-frequency part before 700Hz is described in detail during encoding, this part of the audio information is also partially lost when the audio data is played through the target speaker. Therefore, the mask adjustment parameters of the mask curve of the full frequency band can be determined according to the frequency response curve of the target speaker, and then the mask curve of the full frequency band can be adjusted according to the mask adjustment parameters. Therefore, after determining the mask adjustment parameters, the mask curve of the full frequency band is adjusted using the mask adjustment parameters to obtain the adjusted mask curve of the full frequency band, which can be understood as raising the amplitude value of the mask curve of the full frequency band. It is worth mentioning that the amplitude value of the mask curve of the full frequency band can be adjusted according to the frequency response capability of the target speaker at different frequencies corresponding to the frequency of the mask curve of the full frequency band, so as to raise the mask curve of the full frequency band. After raising the mask curve of the full frequency band, there will be more masked frequency points, and the frequency information of the frequency points required to be encoded will be less, so as to achieve the purpose of increasing the compression ratio and saving storage space. The audio processing method of the present application will be based on the human ear acoustic model and perfectly combine the speaker's own characteristics, and will have different compression ratio improvement effects on different types of speakers.

[0057] In one embodiment, for the frequency value of the target speaker at 62.50 (Hz), after analyzing the human ear acoustic model, the amplitude value of the threshold curve of the entire frequency range is obtained to be 35.63 (dB), and the corresponding amplitude value of the human ear absolute threshold curve can be calculated to be 33.43 (dB), and the corresponding amplitude value of the mask curve is 35.63 (dB). After many experiments, the mask adjustment parameter is determined to be 32.00 (dB), so the corresponding amplitude value of the mask curve in this frequency range after adjustment is 67.63 (dB). It is worth mentioning that the specific value of the mask adjustment parameter can be obtained by analysis after multiple experiments, or it can be obtained after linear analysis based on the frequency response characteristics of the target speaker, which is not limited here.

[0058] In another embodiment, refer to Figure 3 and Figure 6 , Figure 3is the frequency response curve of the target speaker. It can be seen that the target speaker has a weak response capability to frequencies below 700Hz. In Figure 6, the horizontal axis represents the frequency value, and the vertical axis represents the amplitude value. A linear analysis can be performed in combination with the frequency response characteristics of the target speaker to determine that the mask adjustment parameter for the mask curve in the 50dB-60dB segment is 30dB, the mask adjustment parameter for the mask curve in the 60dB-70dB segment is 20dB, the mask adjustment parameter for the mask curve in the 70dB-80dB segment is 10dB, and the mask adjustment parameter for the mask curve in the 80dB-85dB segment is 5dB. It should be noted that the examples and specific numerical values ​​cited above are for the convenience of explaining the implementation of the present application and should not be understood as limiting the scope of protection of the present application.

[0059] See also Fig.10 In some embodiments, step 03 includes:

[0060] 031: At the same frequency, determine whether the amplitude value of the frequency point is greater than the amplitude value of the mask curve of the full frequency band after adjustment;

[0061] 032: When the amplitude value of the frequency point is greater than the amplitude value of the adjusted mask curve of the full frequency band, the frequency point is determined to be the frequency point required to be encoded.

[0062] The audio processing method of the embodiment of the present application can be implemented by the audio processing device 100 of the embodiment of the present application, and the audio processing device 100 includes a compression module 30, and the compression module 30 includes a first compression submodule and a second compression submodule. Step 031 can be implemented by the first compression submodule, and step 032 can be implemented by the second compression submodule. That is to say, the first compression submodule is used to determine whether the amplitude value of the frequency point is greater than the amplitude value of the adjusted mask curve of the full frequency band at the same frequency. The second compression submodule is used to determine that the frequency point is the frequency point required for encoding when the amplitude value of the frequency point is greater than the amplitude value of the adjusted mask curve of the full frequency band.

[0063] Specifically, the mask curve of the full frequency band is adjusted according to the mask adjustment parameter to raise the mask curve of the full frequency band. In some embodiments, the mask adjustment parameter can be 1 parameter, and the mask adjustment parameter can also be multiple parameters, which is not limited here. It can be understood that the adjusted mask curve of the full frequency band is composed of multiple points, and the horizontal coordinate of each point represents the frequency value, and the vertical coordinate represents the amplitude value. Therefore, at the same frequency, it is possible to judge whether the amplitude value of the frequency point is greater than the amplitude value of the adjusted mask curve of the full frequency band. If it is judged that the amplitude value of the frequency point is greater than the amplitude value of the adjusted mask curve of the full frequency band, the frequency point is encoded; if it is judged that the amplitude value of the frequency point is not greater than the amplitude value of the adjusted mask curve of the full frequency band, the frequency point does not need to be encoded. In this way, more frequency points that the human ear cannot distinguish can be removed, the information that needs to be encoded is reduced, and better compression is achieved.

[0064] See also Fig.11 In some embodiments, step 03 includes:

[0065] 033: Compress the audio data according to the mask curve of the full frequency band before adjustment, the mask curve of the full frequency band after adjustment, and the amplitude value of each frequency point.

[0066] The audio processing method of the embodiment of the present application can be implemented by the audio processing device 100 of the embodiment of the present application, the audio processing device 100 includes a compression module 30, the compression module 30 includes a third compression submodule, and step 033 can be implemented by the second compression submodule. That is, the third compression submodule is used to compress the audio data according to the mask curve of the full frequency band before adjustment, the mask curve of the full frequency band after adjustment, and the amplitude value of each frequency point.

[0067] Specifically, at the same frequency, it is possible to determine whether the amplitude value of the frequency point is greater than the amplitude value of the mask curve of the full frequency band before adjustment, and similarly, it is possible to determine whether the amplitude value of the frequency point is less than the amplitude value of the mask curve of the full frequency band after adjustment. The audio data can be compressed according to the mask curve of the full frequency band before adjustment, the mask curve of the full frequency band after adjustment, and the amplitude value of each frequency point. In this way, multiple compression methods of audio data can be selected as needed.

[0068] Please also read Fig.12 and Fig.13 In some embodiments, step 033 includes:

[0069] Step 0331: at the same frequency, determine whether the amplitude value of the frequency point is greater than the amplitude value of the mask curve of the full frequency band after adjustment;

[0070] Step 0332: when the amplitude value of the frequency point is greater than the amplitude value of the mask curve of the entire frequency band after adjustment, determining the frequency point as a frequency point using the first preset encoding method;

[0071] Step 0333: when the amplitude value of the frequency point is less than the amplitude value of the mask curve of the full frequency band after adjustment, determine whether the amplitude value of the frequency point is greater than the amplitude value of the mask curve of the full frequency band before adjustment;

[0072] Step 0334: when the amplitude value of the frequency point is greater than the amplitude value of the mask curve of the full frequency band before adjustment, determine that the frequency point is a frequency point using the second preset encoding method, and the compression bit of the second preset encoding method is less than the compression bit of the first preset encoding method;

[0073] Step 0335: When the amplitude value of the frequency point is smaller than the amplitude value of the mask curve of the entire frequency band before adjustment, it is determined that the frequency point is not to be encoded.

[0074] The audio processing method of the embodiment of the present application can be implemented by the audio processing device 100 of the embodiment of the present application. The audio processing device 100 includes a compression module 30. Step 0331, step 0332, step 0333, step 0334 and step 0335 can all be implemented by the compression module 30. That is to say, the compression module 30 is used to determine whether the amplitude value of the frequency point is greater than the amplitude value of the mask curve of the full frequency band after adjustment at the same frequency; when the amplitude value of the frequency point is greater than the amplitude value of the mask curve of the full frequency band after adjustment, determine that the frequency point is a frequency point using the first preset encoding method; when the amplitude value of the frequency point is less than the amplitude value of the mask curve of the full frequency band after adjustment, determine whether the amplitude value of the frequency point is greater than the amplitude value of the mask curve of the full frequency band before adjustment; when the amplitude value of the frequency point is greater than the amplitude value of the mask curve of the full frequency band before adjustment, determine that the frequency point is a frequency point using the second preset encoding method, and the compression bit of the second preset encoding method is less than the compression bit of the first preset encoding method; when the amplitude value of the frequency point is less than the amplitude value of the mask curve of the full frequency band before adjustment, determine that the frequency point is not encoded.

[0075] Specifically, at the same frequency, when it is determined that the amplitude value of the frequency point is greater than the amplitude value of the mask curve of the full frequency band after adjustment, the first preset encoding method is used to encode the frequency point. At the same frequency, when it is determined that the amplitude value of the frequency point is less than the amplitude value of the mask curve of the full frequency band after adjustment, and the amplitude value of the frequency point is greater than the amplitude value of the mask curve of the full frequency band before adjustment, the frequency point of the second preset encoding method is used. Among them, the compression bit of the second preset encoding method is less than the compression bit of the first preset encoding method. In one embodiment, the first preset encoding method can be 8bit, and the second preset encoding method can be 4bit. For example: the first preset encoding method is 00001000, and the second preset encoding is 1000. The compression bit of the second preset encoding method is less than the compression bit of the first preset encoding method. Therefore, the compression bit of a part of the frequency points is smaller, which can improve the overall compression ratio of the audio and save storage space.

[0076] like Fig.13 As shown, Fig.13 Including the mask curve of the full frequency band before adjustment and the mask curve of the full frequency band after adjustment. Fig.13 The amplitude value of frequency point F in is above the mask curve of the full frequency band, that is, frequency point F is encoded using the first preset encoding method. The amplitude value of frequency point E and the amplitude value of frequency point D are both smaller than the amplitude value of the mask curve of the full frequency band after adjustment, and the amplitude value of frequency point E and the amplitude value of frequency point D are both larger than the amplitude value of the mask curve of the full frequency band before adjustment, and frequency point E and frequency point D are encoded using the second preset encoding method. The amplitude value of frequency point G is smaller than the amplitude value of the mask curve of the full frequency band before adjustment, and it is determined that frequency point G is not encoded.

[0077] In some embodiments, the frequency response curve includes a demarcation frequency, a frequency response value of a frequency point in the frequency response curve that is less than the demarcation frequency is less than a preset value, and a frequency response value of a frequency point in the frequency response curve that is greater than the demarcation frequency is greater than a preset value, and the audio processing method further includes:

[0078] When the frequency value of the frequency point is less than the boundary frequency, it is determined that the frequency point is not to be encoded.

[0079] The audio processing method of the embodiment of the present application can be implemented by the audio processing device 100 of the embodiment of the present application, that is, the audio processing device 100 is used to determine that the frequency point is not encoded when the frequency value of the frequency point is less than the boundary frequency.

[0080] Specifically, the frequency response curve of the target speaker can be analyzed to determine the demarcation frequency. In one embodiment, it can be seen from the frequency response curve of the target speaker that the target speaker has a weak response capability to frequencies below 700 Hz, so 700 Hz is the demarcation frequency, and the frequency response value corresponding to 700 Hz is a preset value. Figure 3 As shown, the demarcation frequency is 700Hz and the preset value is 85dB. When the frequency value of the frequency point is less than 700Hz, it is determined that the frequency point is not encoded. In this way, the frequency point with weak response ability can be removed during encoding, the overall compression ratio of the audio is improved, and storage space is saved.

[0081] See also Fig.14 The present application discloses an electronic device 500, which includes an electronic device body and an audio processing device 100 of any one of the above-mentioned embodiments, and the audio processing device 100 is arranged on the electronic device body.

[0082] In this way, the full-frequency mask curve is adjusted according to the frequency response curve of different types of speakers, and then the audio data is compressed according to the adjusted full-frequency mask curve and the amplitude value of each frequency point, which has different compression ratio improvement effects for different types of speakers. The audio played through the target speaker can maintain good sound quality, and can also improve the overall compression ratio of the audio and save storage space.

[0083] The embodiment of the present application further provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the processor executes the steps of the audio processing method of any of the above embodiments.

[0084] For example, when the program is executed by a processor, the following steps of the audio processing method are implemented:

[0085] Step 01: Determine the frequency response curve of the target speaker, the target speaker is used to play audio data, the audio data includes multiple data frames, and each data frame can be parsed into multiple frequency points;

[0086] Step 02: Use the frequency response curve to adjust the mask curve of the full frequency band of the audio data;

[0087] Step 03: Compress the audio data according to the adjusted mask curve of the full frequency band and the amplitude value of each frequency point.

[0088] In this way, the full-frequency mask curve is adjusted according to the frequency response curve of different types of speakers, and then the audio data is compressed according to the adjusted full-frequency mask curve and the amplitude value of each frequency point, which has different compression ratio improvement effects for different types of speakers. The audio played through the target speaker can maintain good sound quality, and can also improve the overall compression ratio of the audio and save storage space.

[0089] It is understood that a computer program includes computer program code. The computer program code may be in source code form, object code form, executable file or some intermediate form. Computer readable storage media may include: any entity or device capable of carrying computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), and software distribution medium.

[0090] The processor may refer to a processor included in the controller. The processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc.

[0091] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "illustrative embodiments", "examples", "specific examples" or "some examples" means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present application. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner.

[0092] Any process or method description in a flowchart or otherwise described herein may be understood to represent a module, segment or portion of code that includes one or more executable instructions for implementing the steps of a specific logical function or process, and the scope of the preferred embodiments of the present application includes alternative implementations in which functions may not be performed in the order shown or discussed, including performing functions in a substantially simultaneous manner or in the reverse order depending on the functions involved, which should be understood by technicians in the technical field to which the embodiments of the present application belong.

[0093] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as an ordered list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by an instruction execution system, device or apparatus (such as a computer-based system, a system including a processing module, or other system that can fetch instructions from an instruction execution system, device or apparatus and execute instructions), or in combination with these instruction execution systems, devices or apparatuses. For the purposes of this specification, "computer-readable medium" can be any device that can contain, store, communicate, propagate or transmit a program for use by an instruction execution system, device or apparatus, or in combination with these instruction execution systems, devices or apparatuses. More specific examples of computer-readable media (a non-exhaustive list) include the following: an electrical connection with one or more wires (electronic device), a portable computer disk box (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory), a fiber optic device, and a portable compact disk read-only memory (CDROM). In addition, the computer-readable medium may even be paper or other suitable medium on which the program is printed, since the program may be obtained electronically, for example, by optically scanning the paper or other medium and then editing, interpreting or processing in other suitable ways if necessary, and then stored in a computer memory.

[0094] It should be understood that the various parts of the embodiments of the present application can be implemented by hardware, software, firmware or a combination thereof. In the above embodiments, multiple steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.

[0095] A person skilled in the art may understand that all or part of the steps in the method for implementing the above-mentioned embodiment may be completed by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium. When the program is executed, it includes one or a combination of the steps of the method embodiment.

[0096] In addition, each functional unit in each embodiment of the present application may be integrated into a processing module, or each unit may exist physically separately, or two or more units may be integrated into one module. The above-mentioned integrated module may be implemented in the form of hardware or in the form of a software functional module. If the integrated module is implemented in the form of a software functional module and sold or used as an independent product, it may also be stored in a computer-readable storage medium.

[0097] The storage medium mentioned above can be a read-only memory, a magnetic disk or an optical disk, etc.

[0098] Although the embodiments of the present application have been shown and described above, it can be understood that the above embodiments are exemplary and cannot be understood as limitations on the present application. Ordinary technicians in this field can change, modify, replace and modify the above implementation methods within the scope of the present application.

Claims

1. An audio processing method, characterized in that: The audio processing method comprises: Determine a frequency response curve of a target speaker, the target speaker is used to play audio data, the audio data includes a plurality of data frames, each of the data frames can be parsed into a plurality of frequency points; Using the frequency response curve to adjust the mask curve of the full frequency band of the audio data; The audio data is compressed according to the adjusted mask curve of the full frequency band and the amplitude value of each frequency point.

2. The audio processing method according to claim 1, characterized in that: The audio processing method comprises: Performing spectrum analysis on each frequency point in each data frame, and then performing human ear acoustic model analysis on each processed frequency point to obtain a threshold curve for the entire frequency range; The mask curve of the full frequency band is obtained according to the threshold curve of the full frequency band and the absolute threshold curve of the human ear under silent conditions.

3. The audio processing method according to claim 1, characterized in that: The audio processing method comprises: Get audio data; Performing frame processing on the audio data to obtain a plurality of data frames, each of which can be parsed into a plurality of frequency points; Discrete operation transformation is performed on each of the frequency points to obtain amplitude values ​​of multiple frequency points.

4. The audio processing method according to claim 1, characterized in that: The step of adjusting the mask curve of the full frequency band of the audio data by using the frequency response curve comprises: Determining a mask adjustment parameter of the mask curve of the full frequency range according to the frequency response curve of the target speaker; The mask curve of the full frequency band is adjusted according to the mask adjustment parameter.

5. The audio processing method according to claim 1, characterized in that: The compressing the audio data according to the adjusted mask curve of the full frequency band and the amplitude value of each frequency point includes: At the same frequency, determining whether the amplitude value of the frequency point is greater than the amplitude value of the adjusted mask curve of the full frequency range; In a case where the amplitude value of the frequency point is greater than the amplitude value of the adjusted mask curve of the entire frequency band, the frequency point is determined to be a frequency point required for encoding.

6. The audio processing method according to claim 1, characterized in that: The compressing the audio data according to the adjusted mask curve of the full frequency band and the amplitude value of each frequency point includes: The audio data is compressed according to the mask curve of the full frequency band before adjustment, the mask curve of the full frequency band after adjustment, and the amplitude value of each frequency point.

7. The audio processing method according to claim 6, characterized in that: The audio data is compressed according to the mask curve of the full frequency band before adjustment, the mask curve of the full frequency band after adjustment, and the amplitude value of each frequency point, including: At the same frequency, determining whether the amplitude value of the frequency point is greater than the amplitude value of the adjusted mask curve of the full frequency range; When the amplitude value of the frequency point is greater than the amplitude value of the adjusted mask curve of the full frequency range, determining the frequency point as a frequency point using the first preset encoding method; In the case where the amplitude value of the frequency point is less than the amplitude value of the mask curve of the full frequency band after the adjustment, determining whether the amplitude value of the frequency point is greater than the amplitude value of the mask curve of the full frequency band before the adjustment; When the amplitude value of the frequency point is greater than the amplitude value of the mask curve of the full frequency band before adjustment, determining that the frequency point is a frequency point using a second preset encoding method, and the compression bit of the second preset encoding method is less than the compression bit of the first preset encoding method; When the amplitude value of the frequency point is smaller than the amplitude value of the mask curve of the entire frequency band before the adjustment, it is determined that the frequency point is not to be encoded.

8. The audio processing method according to claim 1, characterized in that: The frequency response curve includes a demarcation frequency, a frequency response value of a frequency point in the frequency response curve that is less than the demarcation frequency is less than a preset value, and a frequency response value of a frequency point in the frequency response curve that is greater than the demarcation frequency is greater than a preset value, and the audio processing method further includes: When the frequency value of the frequency point is less than the boundary frequency, it is determined that the frequency point is not to be encoded.

9. An audio processing device, characterized in that: The audio processing device comprises: A determination module, the determination module is used to determine a frequency response curve of a target speaker, the target speaker is used to play audio data, the audio data includes a plurality of data frames, each of the data frames can be parsed into a plurality of frequency points; An adjustment module, the adjustment module is used to adjust the mask curve of the full frequency band of the audio data using the frequency response curve; A compression module is used to compress the audio data according to the adjusted mask curve of the full frequency band and the amplitude value of each frequency point.

10. An electronic device, characterized in that: The electronic device comprises an electronic device body and the audio processing device according to claim 9, and the audio processing device is arranged on the electronic device body.

11. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the steps of the audio processing method according to any one of claims 1 to 8 are implemented.