Audio parameter setting method and electronic device
By automatically detecting the turning point of the smoothing response curve and the target frequency response curve of the audio signal of the speaker device, the problem of manual manual setting of the intelligent speaker equalizer parameter is solved, improving audio quality and adaptability.
Patent Information
- Application Number
- CN202310663679.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-06
- Publication Date
- 2024-12-06
AI Technical Summary
The setting of smart speaker equalizer parameters mainly relies on manual manual, which makes it difficult for users to determine appropriate parameters and affects audio quality.
By obtaining the audio signal of the speaker device, a frequency response curve is generated, and smoothing is performed. The turning point is detected using the neural network model, and the equalizer parameters are determined based on the turning point and the target frequency response curve, so that automatic setting is achieved.
Automatically setting equalizer parameters can compensate for audio distortion of the speaker device, improve audio quality, and adapt to different music types.
Smart Images

Figure CN119094959A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to audio signal processing, and in particular to an audio parameter setting method and an electronic device. Background Art
[0002] Smart speakers can obtain audio signals through the Internet or from mobile electronic devices. After the smart speakers decode the audio signals and perform sound effects processing, they can play music. Generally speaking, the audio processing process can adjust the equalizer parameters to increase or decrease one or more frequency bands of the sound signal to achieve the purpose of adjusting the timbre.
[0003] However, currently, the equalizer parameters of smart speakers are mostly set manually, which is inconvenient for general users and it is not certain how to adjust the equalizer parameters to an appropriate state. Summary of the invention
[0004] The embodiments of the present invention provide an audio parameter setting method and an electronic device, which can solve the above technical problems.
[0005] The audio parameter setting method of the embodiment of the present invention includes (but is not limited to) the following steps: obtaining a sound signal played by a speaker device; generating a frequency response curve of the sound signal; smoothing the frequency response curve of the sound signal to obtain a smoothed response curve of the sound signal; determining a target frequency response curve based on the sound signal; detecting multiple turning points of the smoothed response curve of the sound signal using a neural network model; and determining equalizer parameters based on the multiple turning points of the smoothed response curve and the target frequency response curve.
[0006] The electronic device of the embodiment of the present invention includes (but is not limited to) a storage device and a processor. The storage device is used to store multiple modules. The processor is coupled to the storage device. The processor is coupled to the storage device, accesses multiple modules and is configured to execute: obtaining a sound signal played by a speaker; generating a frequency response curve of the sound signal; smoothing the frequency response curve of the sound signal to obtain a smoothed response curve of the sound signal; determining a target frequency response curve according to the sound signal; detecting multiple turning points of the smoothed response curve of the sound signal using a neural network model; and determining equalizer parameters according to the multiple turning points of the smoothed response curve and the target frequency response curve.
[0007] Based on the above, in an embodiment of the present invention, a neural network model can be used to detect multiple turning points of the smoothed response curve of the sound signal, so as to determine the equalizer parameters according to the frequency difference between these turning points and the target frequency response curve. In this way, by automatically generating and applying the above equalizer parameters, the audio distortion caused by the mechanical design of the speaker device can be compensated to improve the audio quality. BRIEF DESCRIPTION OF THE DRAWINGS
[0008] Figure 1 is a block diagram of an audio parameter setting system according to an embodiment of the present invention;
[0009] Figure 2 is a flow chart of an audio parameter setting method according to an embodiment of the present invention;
[0010] Figure 3 is a schematic diagram illustrating the generation of a smoothed response curve according to an embodiment of the present invention;
[0011] Figure 4 is a schematic diagram illustrating determination of a target frequency response curve according to an embodiment of the present invention;
[0012] Figure 5 is a schematic diagram illustrating determining a center frequency according to a turning point of a smoothed response curve according to an embodiment of the present invention;
[0013] Figure 6 is a schematic diagram illustrating determination of a Q value according to an embodiment of the present invention;
[0014] Figure 7 is a flow chart of an audio parameter setting method according to an embodiment of the present invention;
[0015] Fig. 8A is a schematic diagram of data set allocation according to an embodiment of the present invention;
[0016] Figure 8B is a schematic diagram of cross validation according to an embodiment of the present invention.
[0017] Description of Reference Numerals
[0018] 10: Audio parameter setting system;
[0019] 100: electronic device;
[0020] 200: radio receiver;
[0021] 300: speaker device;
[0022] 110: storage device;
[0023] 120: processor;
[0024] S210-S260, S710-S740, S801-S803: steps;
[0025] C1: frequency response curve;
[0026] C2: smoothed response curve;
[0027] C3: target frequency response curve;
[0028] fL: lower limit frequency;
[0029] fU: upper limit frequency;
[0030] C3_2: high frequency part;
[0031] C3_1: low frequency part;
[0032] f1~f6: turning frequency;
[0033] C4: virtual equalizer parameter curve;
[0034] θ1~θ4: angle;
[0035] DS: dataset;
[0036] TS: training set;
[0037] TS2: test set. DETAILED DESCRIPTION
[0038] Reference will now be made in detail to exemplary embodiments of the present invention, examples of which are illustrated in the accompanying drawings. Whenever possible, the same reference numerals are used in the drawings and the description to refer to the same or like parts.
[0039] Figure 1 The block diagram of an audio parameter setting system according to an embodiment of the present invention is shown in FIG. 1. The audio parameter setting system 10 includes an electronic device 100 , a sound receiving device 200 , and a speaker device 300 .
[0040] In some embodiments, the audio parameter setting system 10 can be integrated into a single electronic device, such as a smart speaker, a laptop computer, a smart phone or a tablet computer, etc. Alternatively, in some embodiments, the audio parameter setting system 10 can be implemented by multiple electronic devices. For example, the speaker device 300 is a smart speaker with a built-in sound receiving device 200, and this smart speaker can be connected to the electronic device 100. Alternatively, the speaker device 300 is a smart speaker, and this smart speaker can be connected to the electronic device 100 with a built-in sound receiving device 200. Alternatively, the sound receiving device 200 and the speaker device 300 can be connected to the electronic device 100 via a wired / wireless transmission interface. The electronic device 100 can be a computer device with computing capabilities such as a desktop computer, a laptop computer, an AIO computer, etc.
[0041] The electronic device 100 includes a storage device 110 and a processor 120. The storage device 110 may be any type of fixed or removable random access memory (RAM), read only memory (ROM), flash memory, hard disk drive (HDD), solid-state drive (SSD) or similar components. In one embodiment, the storage device 110 is used to record program code, software modules, configurations, data or files (e.g., sound signals, sound features, data sets and model parameters), which will be described in detail in subsequent embodiments.
[0042] The processor 120 is coupled to the storage device 110. The processor 120 may be a central processing unit (CPU), a graphics processing unit (GPU), or other programmable general-purpose or special-purpose microprocessor, a digital signal processor (DSP), a programmable controller, a field programmable gate array (FPGA), an application-specific integrated circuit (ASIC), a neural network accelerator, or other similar components or a combination of the above components. In one embodiment, the processor 120 is used to perform all or part of the operations of the electronic device 100, and can access and execute software modules, files and / or data stored in the storage device 110. The above-mentioned software module can be broadly interpreted as meaning instructions, instruction sets, codes, program codes, programs, applications, software suites, threads, functions, etc., regardless of whether it is called software, firmware, middleware, microcode, hardware description language or other.
[0043] The sound receiving device 200 may be a microphone (eg, a dynamic, condenser, electret condenser, etc.). The speaker device 300 has a speaker unit for playing sound signals. The sound receiving device 200 is used to receive the sound signals played by the speaker device 300.
[0044] In some embodiments, the electronic device 100 may determine the equalizer parameters suitable for the speaker device 300 according to the sound signal played by the speaker device 300. The electronic device 100 may provide the equalizer parameters to the digital audio processor of the speaker device 300 so that the speaker device 300 can adjust the frequency response of the audio signal according to the equalizer parameters.
[0045] Hereinafter, the method described in the embodiment of the present invention will be described in conjunction with various components, modules and signals in the audio parameter setting system 10. Each process of the method can be adjusted according to the implementation situation, and is not limited thereto.
[0046] Figure 2 is a flow chart of an audio parameter setting method according to an embodiment of the present invention. Figure 2 In step S210, the processor 120 obtains the sound signal played by the speaker device 300 through the sound receiving device 200. The above-mentioned sound signal includes human voice, music, animal sound, environmental sound, machine operation sound, synthetic sound or a combination thereof, and the present invention is not limited thereto. For example, the processor 120 obtains the white noise signal or the pink noise signal played by the speaker device 300 through the sound receiving device 200.
[0047] In step S220, the processor 120 generates a frequency response curve of the sound signal. Specifically, the processor 120 may use Fast Fourier Transform (FFT) to transform the sound signal from the time domain to the frequency domain to obtain the frequency response curve of the sound signal.
[0048] In step S230, the processor 120 performs a smoothing process on the frequency response curve of the sound signal to obtain a smoothed response curve of the sound signal. In some embodiments, the processor 120 may perform a moving average process on the frequency response curve of the sound signal to obtain a smoothed response curve. In some embodiments, the processor 120 may generate a smoothed response curve according to the following equations (1) and (2).
[0049]
[0050]
[0051] Among them, P k is the frequency f k Power; N k is proportional to the frequency f k α is the smoothing coefficient, which can be set to 0.1, for example; Δf s is the sampling frequency interval.
[0052] For example, Figure 3 FIG. 1 is a schematic diagram illustrating the generation of a smoothed response curve according to an embodiment of the present invention. The processor 120 may perform smoothing processing on the frequency response curve C1 of the sound signal to obtain a smoothed response curve C2 of the sound signal. Figure 3 As shown, the smoothed response curve C2 is smoother than the frequency response curve C1.
[0053] In step S240, the processor 120 determines a target frequency response curve according to the sound signal based on the application mode. The target frequency response curve corresponds to an adjustment frequency range, and the lower limit frequency and the upper limit frequency of this adjustment frequency range can be set according to the actual application. In some embodiments, when the application mode is a specific music mode, the processor 120 can calculate the average root mean square (RMS) power of the sound signal and set the target frequency response curve according to the average RMS power of the sound signal. That is, when the application mode is a specific music mode, the target frequency response curve can be a straight line. In some embodiments, when the application mode is an audio adjustment mode, the processor 120 can directly set the high frequency part of the target frequency response curve to the average RMS power of the sound signal, and generate the low frequency part of the target frequency response curve according to another smoothed response curve of the sound signal. That is, when the application mode is an audio adjustment mode, the target frequency response curve can be a broken line with a turning point.
[0054] In detail, Figure 4 is a schematic diagram illustrating how to determine a target frequency response curve according to an embodiment of the present invention. Figure 4, the processor 120 may set a lower limit frequency fL and an upper limit frequency fU of the target frequency response curve C3. For example, considering the characteristics of the speaker unit and the hearing characteristics of the human ear, the lower limit frequency fL may be 70 Hz and the upper limit frequency fU may be 10000 Hz. Because the audio components below 70 Hz may easily cause the speaker unit to be damaged, and the human ear is not easy to detect the audio components above 10000 Hz. In addition, the processor 120 may use the average RMS power of the sound signal to determine the high frequency part C3_2 of the target frequency response curve C3. In detail, the processor 120 may calculate the average RMS power of the sound signal and directly set the high frequency part C3_2 of the target frequency response curve C3 to the average RMS power of the sound signal. In addition, the processor 120 may use the low frequency part of another smoothed response curve of the sound signal to determine the low frequency part C3_1 of the target frequency response curve C3. For example, when generating the smoothed response curve C2 according to equations (1) and (2), the processor 120 may set the smoothing coefficient to 0.1. Furthermore, the processor 120 may set the smoothing coefficient to 0.5 to generate another smoothed response curve, and set the low-frequency portion of the other smoothed response curve as the low-frequency portion C3_1 of the target frequency response curve C3.
[0055] It should be noted that Figure 4 The target frequency response curve C3 is defined based on compensating for the performance of the speaker device 300. In other embodiments, when the sound effect of a specific type of music is to be adjusted, the processor 120 may set the entire target frequency response curve according to the average RMS power of the sound signal, that is, the target frequency response curve will be a straight line without a turn.
[0056] Next, in step S250, the processor 120 uses a neural network model to detect multiple turning points of the smoothed response curve of the sound signal. The neural network model may be a convolutional neural network (CNN) model. In some embodiments, this neural network model is, for example, a U-net model including an encoder layer and a decoder layer. By using a neural network model with peak detection capability, the processor 120 can detect multiple turning points of the smoothed response curve. Based on the input data, the neural network model can output the peak position (i.e., the turning frequency). In one embodiment, this neural network model can be trained based on multiple groups of pulse wave signals mixed with noise and marked peak positions. The input data of the neural network model may be a one-dimensional matrix including multiple data points.
[0057] In some embodiments, the processor 120 may calculate the gap data between the smoothed response curve and the target frequency response curve. This gap data may be a one-dimensional matrix including multiple frequency gaps, and these frequency gaps correspond to multiple frequency positions respectively. By subtracting the power values corresponding to the same frequency position on the smoothed response curve and the target frequency response curve, the processor 120 can obtain the frequency gaps corresponding to different frequency positions. The processor 120 may input the gap data into the neural network model so that the neural network model outputs the turning frequencies of each turning point. That is, the multiple turning points on the smoothed response curve correspond to multiple turning frequencies respectively.
[0058] For example, Figure 5 FIG. 1 is a schematic diagram illustrating how to determine the center frequency based on the turning point of the smoothed response curve according to an embodiment of the present invention. Figure 5 , the processor 120 can calculate the difference data between the smoothed response curve C2 and the target frequency response curve C3, and these difference data can be the frequency differences corresponding to different frequency positions. Assuming that the adjustment frequency range of the target frequency response curve C3 includes M sampling points, the processor 120 can input a one-dimensional matrix including M frequency differences into the neural network model, so that the neural network model detects multiple turning points on the smoothed response curve C2. In this example, these turning points correspond to turning frequencies f1 to f6 respectively.
[0059] Then, in step S260, the processor 120 determines the equalizer parameters according to the multiple turning points of the smoothed response curve and the target frequency response curve. In some embodiments, the equalizer parameters include multiple center frequencies, and multiple relative powers and multiple Q values corresponding to these center frequencies. In some embodiments, the equalizer parameters can be used to determine the filtering characteristics of multiple infinite impulse response filters (IIR) filters used to implement the equalizer.
[0060] In one embodiment, the processor 120 may obtain the lowest center frequency among the multiple center frequencies according to the lowest corner frequency among the multiple corner frequencies. Furthermore, the processor 120 may set the filtering state of the lowest center frequency to high-pass filtering. Specifically, if the lowest corner frequency among the multiple corner frequencies is within a default range, the processor 120 may directly set the filtering state of the lowest center frequency of the equalizer to high-pass filtering to filter out the audio components below the lowest center frequency. In this way, the speaker unit can be protected from being damaged by low-frequency DC.
[0061] In some embodiments, the processor 120 may calculate a plurality of power gaps between a plurality of turning points of the smoothed response curve and a target frequency response curve. The processor 120 may select a plurality of first turning frequencies from a plurality of turning frequencies as a plurality of center frequencies based on the comparison results of the plurality of power gaps and the frequency gaps between the turning frequencies. The processor 120 determines a plurality of relative powers corresponding to the plurality of center frequencies, respectively, based on the plurality of power gaps corresponding to the plurality of first turning frequencies.
[0062] For example, please refer again to Figure 5 , after obtaining the turning points corresponding to the turning frequencies f1 to f6, the processor 120 may first set the lowest turning frequency among the turning frequencies f1 to f6 as the lowest center frequency among the multiple center frequencies. Thereafter, the processor 120 calculates the multiple power gaps between these turning points corresponding to the turning frequencies f2 to f6 and the target frequency response curve. Thereafter, the processor 120 may sort these power gaps and preferentially take out the turning frequency f4 corresponding to the maximum power gap as one of the center frequencies. Thereafter, the processor 120 may discard the turning frequency f3 that is too close to the turning frequency f4. Specifically, when the frequency gap between the turning frequency f4 and the turning frequency f3 is less than the threshold value, the processor 120 may discard the turning frequency f3. Next, the processor 120 finds another maximum power gap from the power gaps corresponding to the remaining turning frequencies that have not been discarded and have not been selected as the center frequencies, and may decide to use the turning frequency f5 corresponding to this other large power gap as one of the center frequencies. By analogy, the processor 120 may traverse and determine whether all turning frequencies can be used as the center frequencies of the equalizer parameters. In this example, the processor 120 may select a plurality of corner frequencies f1, f2, f4, f5, and f6 (ie, first corner frequencies) as a plurality of center frequencies.
[0063] Next, the processor 120 determines the relative powers corresponding to the multiple center frequencies according to the multiple power gaps corresponding to the multiple corner frequencies f1, f2, f4, f5, and f6 (i.e., the first corner frequencies). In some embodiments, these relative powers can be represented by Y m =βg m , where β = 0.9; g m represents the power difference between the smoothed response curve and the target frequency response curve at a certain center frequency. Alternatively, in some embodiments, these relative powers can be represented by Y m =-βg m , where β = 0.9. In some embodiments, the relative power corresponding to each of the above center frequencies is in direct proportion to the gain value of the equalizer.
[0064] In some embodiments, the processor 120 may generate a virtual equalizer parameter curve based on multiple center frequencies and corresponding multiple relative powers. Specifically, based on the connection between each center frequency and the corresponding relative power, the processor 120 may obtain a virtual equalizer parameter curve. The positive and negative values of the relative power may be set according to actual needs. The processor 120 may determine multiple angles corresponding to multiple center frequencies based on the virtual equalizer parameter curve. Thus, the processor 120 may determine the Q value corresponding to each center frequency based on each angle. The Q value refers to the quality factor of the filter in the equalizer. The smaller the Q value, the wider the frequency band of the filter. Conversely, the larger the Q value, the narrower the frequency band of the filter.
[0065] For example, Figure 6 is a schematic diagram illustrating determination of a Q value according to an embodiment of the present invention. Figure 5 After selecting the transition frequencies f1, f2, f4, f5, and f6 as the multiple center frequencies, the processor 120 can calculate the relative power Y according to the center frequencies and the corresponding relative power Y. m The processor 120 can determine multiple angles θ1-θ4 corresponding to multiple center frequencies on the virtual equalizer parameter curve C4. For example, the angle θ4 can be calculated based on three adjacent center frequencies (i.e., the turning frequencies f2, f4, and f5) and the corresponding three relative powers. m The smaller it is, the wider the frequency band of the filter Δf m The narrower. m The larger the value, the wider the filter frequency band Δf m Therefore, the processor 120 can calculate multiple Q values according to the following formula (3).
[0066] Q m +1+sin 2 θ m Formula (3)
[0067] In this way, the processor 120 can generate equalizer parameters including a plurality of center frequencies, a plurality of relative powers, and a plurality of Q values to control the output sound effect of the speaker device 200 accordingly.
[0068] In some embodiments, the processor 120 may also provide different equalizer parameters for music of different music types. This allows the user to control the speaker device 200 to play music according to the corresponding equalizer parameters by setting the music type. In some embodiments, the sound signal includes a plurality of first sound signals corresponding to a music type. Figure 2 The equalizer parameters generated by the process include a plurality of first equalizer parameters corresponding to the plurality of first sound signals respectively. The processor 120 can learn the equalizer parameters suitable for different music types through a machine learning model.
[0069] Figure 7 is a flow chart of an audio parameter setting method according to an embodiment of the present invention. Figure 7 In step S720, the processor 120 determines a plurality of first equalizer parameters of a plurality of first sound signals. Specifically, the first sound signals belong to the same music genre. The music genre is, for example, jazz, rock, pop, or classical. The processor 120 may determine a plurality of first equalizer parameters of the plurality of first sound signals according to the first equalizer parameters. Figure 2 The process and operation principle shown in the figure are used to generate corresponding first equalizer parameters for each first sound signal. For example, by repeatedly executing Figure 2 According to the process shown, the processor 120 can generate the equalizer parameters corresponding to each of the 100 jazz songs.
[0070] In step S720, the processor 120 obtains the sound features of each first sound signal. In one embodiment, the sound features include peak value, maximum root mean square (RMS) power, minimum root mean square power, average root mean square power and / or spectral characteristics (e.g., low, medium and / or high frequency). However, according to different design requirements, there are other changes in the type of sound features. For example, zero crossing rate (ZCR), spectral centroid or spectral rolloff point (Spectral Rolloff) or Mel Frequency Cepstral Coefficients (MFCCs). The processor 120 can obtain the sound features through a function or feature acquirer corresponding to each sound feature. For example, the processor 120 can generate sound features corresponding to each of 100 jazz songs.
[0071] In step S730, the processor 120 establishes a data set including sound features of multiple first sound signals and multiple first equalizer parameters of multiple first sound signals. Specifically, the data set includes multiple data samples, and each data sample includes the sound features of a first sound signal and the corresponding first equalizer parameters. In some embodiments, the processor 120 may divide the multiple data sets into training sets, validation sets, or test sets for use in different stages of subsequent model construction. For example, a training set is a set of data samples used to adjust the parameters of a machine learning model. The validation set provides an unbiased evaluation of the model adjusted on the training set. The test set can be used to provide an unbiased evaluation of the final model.
[0072] In step S740, the processor 120 uses the data set and the machine learning algorithm to establish a parameter inference model, wherein the parameter inference model is used to determine the optimized equalizer parameters of the input audio signal belonging to the music type. For example, the processor 120 can use the sound features of 100 jazz songs and the corresponding equalizer parameters to train the parameter inference model. After training, the parameter inference model can learn the correlation between the input sound features and the optimized equalizer parameters of the sound signal of the same music type. The machine learning algorithm is, for example, a regression analysis algorithm or other machine learning algorithms. For example, the parameter inference model can be a regression model. The parameter inference model can generate corresponding optimized equalizer parameters based on the sound features of the input audio signal. Therefore, after generating the parameter inference model, when the user sets the speaker device 300 to the jazz mode, the speaker device 300 or the electronic device 100 can use the parameter inference model to generate equalizer parameters suitable for jazz.
[0073] In one embodiment, the multiple data sets established include a first data subset and a second data subset. In a first model training stage, the processor 120 can use the first data subset as a training set and the second data subset as a validation set. In a second model training stage, the processor 120 uses the second data subset as a training set and the first data subset as a validation set. Cross-validation (or cyclic estimation) is to analyze a part of the data set first, and other data sets are used as subsequent confirmation and verification of this analysis. The data set analyzed at the beginning is called the training set. And other data sets are called validation sets or test sets. One of the purposes of cross-validation is to use new data that has not been used to train the model to test the performance of the model in order to reduce problems such as overfitting and selection bias. Cross-validation is, for example, K-Fold cross-validation, Holdout validation or Leave-One-Out Cross-validation (LOOC).
[0074] For example, Fig. 8A is a schematic diagram of data set allocation according to an embodiment of the present invention. Fig. 8A , the processor 120 can use the multiple data sets DS as a training set TS and a test set TS2 respectively.
[0075] Figure 8B is a schematic diagram of cross validation (step S801) according to an embodiment of the present invention. Fig. 8A and Figure 8B, taking K-fold cross validation as an example, each row represents a stage. In the first stage, the data set DS1 (including individual equalizer parameters) in the original training set TS is used as the training set, and the other data sets DS2~DS5 (including individual equalizer parameters) in the original training set TS are used as the validation set, and the parameter inference model is trained based on it (step S802). In the second stage, the data set DS2 (including individual equalizers) in the original training set TS is used as the training set, and the other data sets DS1, DS3~DS5 (including individual equalizer parameters) in the original training set TS are used as the validation set, and the parameter inference model is trained based on it (step S802). In the third stage, the data set DS3 (including individual equalizer parameters) in the original training set TS is used as the training set, and the other data sets DS1, DS2, DS4, DS5 (including individual equalizer parameters) in the original training set TS are used as the validation set, and the parameter inference model is trained based on it (step S802). The rest is similar and will not be repeated here. The average of the errors obtained in all stages can be used as an error reference for model training. Next, the trained parameter inference model may be evaluated using the test set TS2 (step S803 ).
[0076] In summary, in the embodiment of the present invention, a neural network model can be used to detect multiple turning points of the smoothed response curve of the sound signal, so as to determine the equalizer parameters according to the frequency difference between these turning points and the target frequency response curve. In this way, by automatically generating and applying the above-mentioned equalizer parameters, the audio distortion caused by the mechanical design of the speaker device can be compensated to improve the audio quality. In addition, in the embodiment of the present invention, suitable equalizer parameters can be determined for sound signals of the same music type.
[0077] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for setting audio parameters, characterized in that: include: Acquire the sound signal played by the speaker; generating a frequency response curve of the sound signal; Smoothing the frequency response curve of the sound signal to obtain a smoothed response curve of the sound signal; determining a target frequency response curve according to the sound signal based on the application mode; Detecting a plurality of turning points of the smoothed response curve of the sound signal using a neural network model; as well as Equalizer parameters are determined according to the plurality of turning points of the smoothed response curve and the target frequency response curve.
2. The audio parameter setting method according to claim 1, characterized in that: The step of determining the target frequency response curve according to the sound signal based on the application mode comprises: Setting a lower frequency limit and an upper frequency limit of the target frequency response curve; When the application mode is an audio adjustment mode, a high frequency portion of the target frequency response curve is determined using an average root mean square power of the sound signal, and a low frequency portion of another smoothed response curve of the sound signal is determined using a low frequency portion of the target frequency response curve; and When the application mode is a specific music mode, the target frequency response curve is determined using the average root mean square power of the sound signal.
3. The audio parameter setting method according to claim 1, characterized in that: The step of detecting the plurality of turning points of the smoothed response curve of the sound signal using the neural network model comprises: calculating the difference data between the smoothed response curve and the target frequency response curve; and The gap data is input into the neural network model so that the neural network model outputs the turning frequency of each of the plurality of turning points.
4. The audio parameter setting method according to claim 1, characterized in that: The equalizer parameters include a plurality of center frequencies, and the plurality of turning points correspond to a plurality of turning frequencies respectively. The step of determining the equalizer parameters according to the plurality of turning points of the smoothed response curve and the target frequency response curve includes: According to the lowest corner frequency among the multiple corner frequencies, obtaining the lowest center frequency among the multiple center frequencies; and The filtering state of the lowest center frequency is set to high-pass filtering.
5. The audio parameter setting method according to claim 1, characterized in that: The equalizer parameters include a plurality of center frequencies, and the plurality of turning points correspond to a plurality of turning frequencies respectively. The step of determining the equalizer parameters according to the plurality of turning points of the smoothed response curve and the target frequency response curve includes: calculating a plurality of power gaps between the plurality of turning points of the smoothed response curve and the target frequency response curve; Selecting a plurality of first corner frequencies from the plurality of corner frequencies as the plurality of center frequencies according to the comparison results of the plurality of power gaps and the frequency gaps between the corner frequencies; and A plurality of relative powers respectively corresponding to the plurality of center frequencies are determined according to the plurality of power gaps corresponding to the plurality of first corner frequencies.
6. The audio parameter setting method according to claim 5, characterized in that: The step of determining equalizer parameters according to the plurality of turning points of the smoothed response curve and the target frequency response curve further comprises: generating a virtual equalizer parameter curve according to the plurality of center frequencies and the corresponding plurality of relative powers; Determining a plurality of angles corresponding to the plurality of center frequencies according to the virtual equalizer parameter curve; and The Q value corresponding to each of the plurality of center frequencies is determined according to each of the plurality of angles.
7. The audio parameter setting method according to claim 1, characterized in that: The sound signal includes a plurality of first sound signals corresponding to music types, the equalizer parameters include a plurality of first equalizer parameters respectively corresponding to the plurality of first sound signals, and the method further includes: Obtaining a sound feature of each of the plurality of first sound signals; establishing a data set including sound features of the plurality of first sound signals and the plurality of first equalizer parameters of the plurality of first sound signals; and A parameter inference model is established using the data set and a machine learning algorithm, wherein the parameter inference model is used to determine optimized equalizer parameters for an input audio signal belonging to the music type.
8. The audio parameter setting method according to claim 7, characterized in that: The sound feature of each of the plurality of first sound signals comprises at least one of a peak value, a maximum root mean square power, a minimum root mean square power, an average root mean square power, and a spectrum characteristic.
9. The audio parameter setting method according to claim 7, characterized in that: The data set includes a first data subset and a second data subset, and the step of using the multiple data sets and the machine learning algorithm to establish a parameter inference model includes: In a first model training phase, the first data subset is used as a training set and the second data subset is used as a validation set; and In the second model training phase, the second data subset is used as the training set and the first data subset is used as the validation set.
10. An electronic device, characterized in that: include: A storage device for storing a plurality of modules; as well as A processor, coupled to the storage device, accesses the plurality of modules and is configured to execute: Get the sound signal played by the speaker; generating a frequency response curve of the sound signal; Smoothing the frequency response curve of the sound signal to obtain a smoothed response curve of the sound signal; determining a target frequency response curve according to the sound signal based on the application mode; Detecting a plurality of turning points of the smoothed response curve of the sound signal using a neural network model; as well as Equalizer parameters are determined according to the plurality of turning points of the smoothed response curve and the target frequency response curve.
Citation Information
Cited By
Optimized audio acquisition method and device based on Bluetooth headset, equipment and medium
CN119521113A
