Audio processing method, device, electronic device and storage medium
By determining the lower limit of the fundamental frequency of the audio signal and the vocal reference curve, combined with high-pass filtering information and device compensation information, the audio signal is adjusted, which solves the problem of low quality of songs recorded by mobile devices and achieves significant improvements in audio signal quality. promote.
Patent Information
- Application Number
- CN202210942048.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-08-08
- Publication Date
- 2024-10-25
- Estimated Expiration
- 2042-08-08
AI Technical Summary
In the existing technology, when users record songs through mobile devices such as mobile phones, due to factors such as equipment, environment, and singing level, the quality of the recorded songs is not high, and it is difficult for ordinary users to improve the quality through an equalizer. A simple and effective method is needed. Methods to improve audio recording quality.
Determine the lower limit of the fundamental frequency based on the fundamental frequency sequence of the audio signal, filter the low-frequency noise below the lower limit of the fundamental frequency, and use the human voice reference curve to adjust the spectrum of the audio signal. Combined with high-pass filtering information and equipment compensation information, the audio The signal is adjusted.
Significantly improves the quality of audio signals, thus improving the quality of recorded songs, allowing ordinary users to improve audio recording effects through automated processing.
Smart Images

Figure CN115331683B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of multimedia technology, and in particular to an audio processing method, device, electronic device and storage medium. Background Art
[0002] With the development of multimedia technology, users can conveniently record audio, such as songs, short videos, etc., through multimedia applications in mobile devices such as mobile phones. Taking songs as an example, due to the influence of multiple factors such as equipment, environment, and singing level, the quality of the recorded songs will be low. How to improve the quality of songs recorded by users is a problem that needs to be solved.
[0003] In the related art, in order to improve the quality of songs, an equalizer is usually provided in a multimedia application so that a user can perform manual tuning through the equalizer to improve the quality of recorded songs.
[0004] However, manual tuning requires strong professional knowledge and has a high learning cost, which makes it impossible for ordinary users to improve the quality of recorded songs through equalizers. Summary of the invention
[0005] The present disclosure provides an audio processing method, device, electronic device and storage medium, which can improve the quality of audio signals and thus improve the quality of audio. The technical solution of the present disclosure is as follows:
[0006] According to one aspect of an embodiment of the present disclosure, there is provided an audio processing method, including:
[0007] Determine a fundamental frequency lower limit value of the audio signal based on a fundamental frequency sequence of the audio signal to be processed, wherein the fundamental frequency lower limit value is used to indicate a lower limit of the fundamental frequency in the audio signal;
[0008] Determine high-pass filter information according to the fundamental frequency lower limit value, wherein the high-pass filter information is used to filter low-frequency noise below the fundamental frequency lower limit value without affecting the fundamental frequency of the audio signal;
[0009] Determine vocal compensation information based on a vocal reference curve and the frequency spectrum of the audio signal, wherein the vocal compensation information is used to adjust the frequency spectrum curve of the vocal in the audio signal based on the vocal reference curve;
[0010] The audio signal is adjusted based on the high-pass filter information and the vocal compensation information.
[0011] According to another aspect of an embodiment of the present disclosure, there is provided an audio processing device, including:
[0012] A first determining unit is configured to determine a fundamental frequency lower limit value of the audio signal to be processed based on a fundamental frequency sequence of the audio signal, wherein the fundamental frequency lower limit value is used to indicate a lower limit of the fundamental frequency in the audio signal;
[0013] A second determining unit is configured to determine high-pass filtering information according to the fundamental frequency lower limit value, wherein the high-pass filtering information is used to filter low-frequency noise below the fundamental frequency lower limit value without affecting the fundamental frequency of the audio signal;
[0014] a third determining unit configured to determine vocal compensation information based on a vocal reference curve and the spectrum of the audio signal, wherein the vocal compensation information is used to adjust a spectrum curve of the vocal in the audio signal based on the vocal reference curve;
[0015] The audio adjustment unit is configured to adjust the audio signal based on the high-pass filter information and the vocal compensation information.
[0016] In some embodiments, the first determination unit is configured to perform fundamental frequency extraction on the audio signal to obtain the fundamental frequency sequence; determine the fundamental frequency mean and fundamental frequency standard deviation of the fundamental frequency sequence through the fundamental frequency sequence; and determine the difference between the fundamental frequency mean and the fundamental frequency standard deviation as the fundamental frequency lower limit value.
[0017] In some embodiments, the vocal compensation information includes vocal compensation coefficients for multiple frequencies; the third determination unit is configured to normalize the frequency spectrum of the audio signal to obtain a normalized spectrum; for any frequency in the normalized spectrum, the vocal compensation coefficient of the frequency is determined based on the difference between the energy value of the frequency in the normalized spectrum and the energy value of the frequency in the vocal reference curve.
[0018] In some embodiments, the third determination unit is configured to determine an energy difference value based on the difference between the energy value of the frequency in the normalized spectrum and the energy value of the frequency in the vocal reference curve; when the energy difference value is within a difference range, the energy difference value is determined as the vocal compensation coefficient of the frequency; when the energy difference value exceeds the difference range, the target boundary value of the difference range is determined as the vocal compensation coefficient of the frequency, and the target boundary value is the boundary value with the smallest difference between the two boundary values of the difference range and the energy difference value.
[0019] In some embodiments, the audio adjustment unit is configured to determine style compensation information in response to a style selection operation, wherein the style compensation information is used to compensate the audio signal according to the style corresponding to the style selection operation; and adjust the audio signal based on the high-pass filter information, the vocal compensation information and the style compensation information.
[0020] In some embodiments, the audio adjustment unit is configured to obtain device compensation information, where the device compensation information is used to compensate for the impact of the audio acquisition device on the audio signal; and adjust the audio signal based on the high-pass filter information, the human voice compensation information and the device compensation information.
[0021] In some embodiments, the audio adjustment unit is configured to determine style compensation information in response to a style selection operation, wherein the style compensation information is used to compensate the audio signal according to the style corresponding to the style selection operation; obtain device compensation information, wherein the device compensation information is used to compensate for the impact of the audio acquisition device on the audio signal; and adjust the audio signal based on the high-pass filter information, the vocal compensation information, the style compensation information and the device compensation information.
[0022] In some embodiments, the audio adjustment unit is configured to obtain a first frequency response curve and multiple second frequency response curves, where the first frequency response curve is a frequency response curve of a reference audio acquisition device, and the second frequency response curve is a frequency response curve of other audio acquisition devices; and determine the device compensation information based on a difference between an average of the multiple second frequency response curves and the first frequency response curve.
[0023] According to another aspect of an embodiment of the present disclosure, an electronic device is provided, the electronic device comprising:
[0024] one or more processors;
[0025] A memory for storing program codes executable by the processor;
[0026] The processor is configured to execute the program code to implement the above audio processing method.
[0027] According to another aspect of an embodiment of the present disclosure, a computer-readable storage medium is provided. When a program code in the computer-readable storage medium is executed by a processor of an electronic device, the electronic device is enabled to perform the above-mentioned audio processing method.
[0028] According to another aspect of an embodiment of the present disclosure, a computer program product is provided, including a computer program, and when the computer program is executed by a processor, the above-mentioned audio processing method is implemented.
[0029] The disclosed embodiments provide an audio processing solution, which determines a fundamental frequency lower limit of an audio signal through a fundamental frequency sequence of the audio signal, and further determines high-pass filtering information, so that low-frequency noise below the fundamental frequency lower limit in the audio signal can be filtered out through the high-pass filtering information, and then determines human voice compensation information through a human voice reference curve and the spectrum of the audio signal, so that based on the human voice compensation information, the spectrum curve of the human voice can be adjusted with the human voice reference curve as a reference, so as to compensate for the human voice in the audio signal, thereby improving the quality of the audio signal, and further improving the quality of the audio.
[0030] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0031] The drawings herein are incorporated into and constitute a part of the specification, illustrate embodiments consistent with the present disclosure, and together with the description are used to explain the principles of the present disclosure, and do not constitute improper limitations on the present disclosure.
[0032] Figure 1 It is a schematic diagram of an implementation environment of an audio processing method according to an exemplary embodiment.
[0033] Figure 2 The present invention is a flowchart of an audio processing method according to an exemplary embodiment.
[0034] Figure 3 The flowchart of another audio processing method is shown according to an exemplary embodiment.
[0035] Figure 4 It is a schematic diagram of a frequency response curve of a high-pass filter according to an exemplary embodiment.
[0036] Figure 5 is a schematic diagram of a human voice reference curve according to an exemplary embodiment.
[0037] Figure 6 It is a schematic diagram of a frequency spectrum curve according to an exemplary embodiment.
[0038] Figure 7 is a schematic diagram of another frequency spectrum curve according to an exemplary embodiment.
[0039] Figure 8 is a schematic diagram of a frequency response curve according to an exemplary embodiment.
[0040] Fig. 9 is a schematic diagram showing style compensation information according to an exemplary embodiment.
[0041] Fig.10It is a flowchart of another audio processing method provided according to an embodiment of the present application.
[0042] Fig.11 The invention is a device block diagram showing an audio processing method according to an exemplary embodiment.
[0043] Fig.12 It is a block diagram of a terminal according to an exemplary embodiment.
[0044] Fig.13 It is a block diagram of a server according to an exemplary embodiment. DETAILED DESCRIPTION
[0045] In order to enable ordinary persons in the art to better understand the technical solutions of the present disclosure, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the accompanying drawings.
[0046] It should be noted that the terms "first", "second", etc. in the specification and claims of the present disclosure and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present disclosure described herein can be implemented in an order other than those illustrated or described herein. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.
[0047] The user information involved in the present disclosure may be information authorized by the user or fully authorized by all parties.
[0048] The YIN algorithm is one of the algorithms for fundamental frequency extraction. Its name comes from the "yin" in "yin and yang", indicating that the core idea of the algorithm is to find the "valley" on the difference function rather than the "peak" on the autocorrelation function.
[0049] The PYIN algorithm is an improved fundamental frequency extraction algorithm based on the YIN algorithm. The improvement of PYIN is that for each frame, multiple peak and valley values are selected as candidate points, which can effectively avoid the problem of wrong estimation.
[0050] FIR (Finite Impulse Response) filter: Finite length unit impulse response filter, also known as non-recursive filter, is the most basic component in digital signal processing system. FIR filter can have strict linear phase-frequency characteristics while ensuring arbitrary amplitude-frequency characteristics.
[0051] In an embodiment of the present disclosure, the electronic device may be provided as a terminal or a server. When the electronic device is provided as a terminal, the audio processing method may be implemented by the terminal; when provided as a server, the audio processing method may be implemented by the server. The server may receive an audio signal sent by the terminal, and the server may adjust the audio signal based on determined high-pass filtering information and vocal compensation information; the audio processing method may also be implemented by interaction between the server and the terminal, which is not limited by the embodiment of the present disclosure.
[0052] Figure 1 FIG. 1 is a schematic diagram of an implementation environment of an audio processing method according to an exemplary embodiment. Figure 1 , the implementation environment specifically includes: a terminal 101 and a server 102.
[0053] The terminal 101 may be at least one of a smart phone, a smart watch, a desktop computer, a laptop computer, an MP3 player (Moving Picture Experts Group Audio Layer III), an MP4 player (Moving Picture Experts Group Audio Layer IV), a laptop computer, etc. An application for audio processing may be installed and run on the terminal 101. The terminal 101 may be connected to the server 102 via a wireless network or a wired network.
[0054] The terminal 101 may generally refer to one of a plurality of terminals. This embodiment is only illustrated by taking the terminal 101 as an example. Those skilled in the art may know that the number of the above terminals may be more or less. For example, the above terminals may be only a few, or the above terminals may be dozens or hundreds, or a greater number. The embodiment of the present disclosure does not limit the number and device type of the terminals.
[0055] The server 102 may be at least one of a single server, multiple servers, a cloud computing platform, and a virtualization center. The server 102 may be connected to the terminal 101 and other terminals via a wireless network or a wired network. Optionally, the number of the above servers may be more or less, which is not limited in the embodiments of the present disclosure. Of course, the server 102 may also include other functional servers to provide more comprehensive and diversified services.
[0056] Figure 2 is a flowchart of an audio processing method according to an exemplary embodiment. Figure 2 As shown, the audio processing method is applied to an electronic device, comprising the following steps:
[0057] In step S201, based on the fundamental frequency sequence of the audio signal to be processed, a fundamental frequency lower limit value of the audio signal is determined, where the fundamental frequency lower limit value is used to indicate the lower limit of the fundamental frequency in the audio signal.
[0058] In the embodiment of the present disclosure, the audio signal to be processed is a signal collected by an audio collection device. By extracting the fundamental frequency of the audio signal, a fundamental frequency sequence of the audio signal can be obtained, and then the fundamental frequency lower limit value of the audio signal can be determined through the fundamental frequency value in the fundamental frequency sequence.
[0059] For example, the audio signal is a human voice signal collected by a microphone of a mobile phone or an external audio collection device. Alternatively, the audio signal is a human voice signal extracted from a collected sound signal, and the sound signal includes a human voice signal and a background music signal.
[0060] In step S202, high-pass filter information is determined according to the fundamental frequency lower limit value, and the high-pass filter information is used to filter low-frequency noise below the fundamental frequency lower limit value without affecting the fundamental frequency of the audio signal.
[0061] In the embodiment of the present disclosure, the high-pass filter information is parameter information of a high-pass filter, and the high-pass filter is configured based on the baseband lower limit value.
[0062] In step S203, based on the vocal reference curve and the spectrum of the audio signal, vocal compensation information is determined, where the vocal compensation information is used to adjust the spectrum curve of the vocal in the audio signal based on the vocal reference curve.
[0063] In the embodiment of the present disclosure, the frequency spectrum of the audio signal can be obtained by transforming the audio signal, and then the human voice reference curve is used as a reference. The human voice compensation information can be determined by the difference between the frequency spectrum and the human voice reference curve.
[0064] In step S204, the audio signal is adjusted based on the high-pass filtering information and the vocal compensation information.
[0065] In the embodiment of the present disclosure, the high-pass filtering information obtained through the above steps can filter out low-frequency noise in the audio signal, and the human voice in the audio signal can be compensated through the human voice compensation information to achieve adjustment of the audio signal.
[0066] For example, the audio signal is a vocal signal collected when the user records a song. By adjusting the vocal signal, the quality of the vocal signal can be significantly improved, thereby improving the quality of the recorded song.
[0067] The disclosed embodiments provide an audio processing solution, which determines a fundamental frequency lower limit of an audio signal through a fundamental frequency sequence of the audio signal, and further determines high-pass filtering information, so that low-frequency noise below the fundamental frequency lower limit in the audio signal can be filtered out through the high-pass filtering information, and then determines human voice compensation information through a human voice reference curve and the spectrum of the audio signal, so that based on the human voice compensation information, the spectrum curve of the human voice can be adjusted with the human voice reference curve as a reference, so as to compensate for the human voice in the audio signal, thereby improving the quality of the audio signal, and further improving the quality of the audio.
[0068] In some embodiments, determining the fundamental frequency lower limit value based on the fundamental frequency sequence of the audio signal includes:
[0069] Extracting the baseband of the audio signal to obtain the baseband sequence;
[0070] Determine the fundamental frequency mean and fundamental frequency standard deviation of the fundamental frequency sequence through the fundamental frequency sequence;
[0071] The difference between the fundamental frequency mean and the fundamental frequency standard deviation is determined as the fundamental frequency lower limit value of the audio signal.
[0072] In the disclosed embodiment, the fundamental frequency is extracted from the audio signal to obtain a fundamental frequency sequence, and then the fundamental frequency mean and the fundamental frequency standard deviation are determined. Finally, the difference between the fundamental frequency mean and the fundamental frequency standard deviation is used as the fundamental frequency lower limit of the audio signal, so that the fundamental frequency lower limit can more accurately identify the lower limit of the fundamental frequency in the fundamental frequency sequence.
[0073] In some embodiments, the vocal compensation information includes vocal compensation coefficients of multiple frequencies; the vocal compensation information is determined based on the vocal reference curve and the frequency spectrum of the audio signal, including:
[0074] Normalizing the frequency spectrum of the audio signal to obtain a normalized frequency spectrum;
[0075] For any frequency in the normalized spectrum, a vocal compensation coefficient of the frequency is determined based on a difference between an energy value of the frequency in the normalized spectrum and an energy value of the frequency in the vocal reference curve.
[0076] In the embodiment of the present disclosure, the spectrum of the audio signal is normalized so that the energy value of the obtained normalized spectrum is near 0, thereby quantitatively reflecting the characteristics of the spectrum, making it easier to compare the energy value of each frequency with the human voice reference curve, and then determine the human voice compensation coefficient of each frequency, so that the human voice compensation coefficient is more accurate.
[0077] In some embodiments, determining the vocal compensation coefficient of the frequency based on the difference between the energy value of the frequency in the normalized spectrum and the energy value of the frequency in the vocal reference curve includes:
[0078] Determine an energy difference value based on a difference between an energy value of the frequency in the normalized spectrum and an energy value of the frequency in the human voice reference curve;
[0079] When the energy difference value is within the difference range, determining the energy difference value as a vocal compensation coefficient of the frequency;
[0080] When the energy difference value exceeds the difference range, the target boundary value of the difference range is determined as the vocal compensation coefficient of the frequency, and the target boundary value is the boundary value with the smallest difference with the energy difference value among the two boundary values of the difference range.
[0081] In the embodiment of the present disclosure, by determining the energy difference value, the coefficient required to compensate the human voice can be determined, and by setting the difference range, the situation of excessive compensation can be avoided, thereby maintaining the stability of the audio signal.
[0082] In some embodiments, the adjusting the audio signal based on the high-pass filtering information and the vocal compensation information includes:
[0083] In response to the style selection operation, determining style compensation information, the style compensation information being used to compensate the audio signal according to the style corresponding to the style selection operation;
[0084] The audio signal is adjusted based on the high-pass filter information, the vocal compensation information, and the style compensation information.
[0085] In the embodiment of the present disclosure, by selecting an operation according to the style, style compensation information is determined, so that on the basis of filtering low-frequency noise and compensating for human voice, the audio signal can also be compensated at the style level through the style compensation information, so that the compensated audio signal conforms to the style.
[0086] In some embodiments, the adjusting the audio signal based on the high-pass filtering information and the vocal compensation information includes:
[0087] Obtaining device compensation information, where the device compensation information is used to compensate for the impact of the audio acquisition device on the audio signal;
[0088] The audio signal is adjusted based on the high-pass filter information, the vocal compensation information and the device compensation information.
[0089] In the disclosed embodiment, by acquiring device compensation information, it is possible to perform compensation on the audio signal at the acquisition device level on the basis of filtering low-frequency noise and compensating for human voice, thereby reducing the impact of the acquisition device on the audio signal.
[0090] In some embodiments, the adjusting the audio signal based on the high-pass filtering information and the vocal compensation information includes:
[0091] In response to the style selection operation, determining style compensation information, the style compensation information being used to compensate the audio signal according to the style corresponding to the style selection operation;
[0092] Obtain device compensation information, which is used to compensate for the impact of the audio acquisition device on the audio signal;
[0093] The audio signal is adjusted based on the high-pass filter information, the vocal compensation information, the style compensation information, and the device compensation information.
[0094] In the embodiment of the present disclosure, by selecting an operation according to the style, determining the style compensation information, and obtaining the device compensation information, the audio signal can be compensated at the style level on the basis of filtering the low-frequency noise and compensating the human voice, so that the compensated audio signal conforms to the style. By obtaining the device compensation information, the audio signal can also be compensated at the acquisition device level to reduce the influence of the acquisition device on the audio signal.
[0095] In some embodiments, obtaining device compensation information includes:
[0096] Acquire a first frequency response curve and a plurality of second frequency response curves, wherein the first frequency response curve is a frequency response curve of a reference audio acquisition device, and the second frequency response curve is a frequency response curve of other audio acquisition devices;
[0097] The device compensation information is determined based on a difference between an average of the plurality of second frequency response curves and the first frequency response curve.
[0098] In the embodiment of the present disclosure, the device compensation information is determined by referring to the difference between the frequency response curves of the audio acquisition device and other audio acquisition devices, so that the device compensation information can more accurately reduce the impact of the acquisition device on the audio signal.
[0099] Above Figure 2 The following is only a basic process of the present disclosure. The solution provided by the present disclosure is further described based on a specific implementation method. Figure 3 FIG. 1 is a flowchart of another audio processing method according to an exemplary embodiment. Figure 3 , the method comprising:
[0100] In step S301, the terminal determines a fundamental frequency lower limit value based on the fundamental frequency sequence of the audio signal, where the fundamental frequency lower limit value is used to indicate a lower limit of the fundamental frequency in the audio signal.
[0101] In the embodiment of the present disclosure, the terminal is Figure 1 The terminal 101 shown can collect audio signals through an audio collection device and then obtain a baseband sequence of the audio signal. The baseband sequence includes multiple basebands arranged in time sequence. The baseband sequence can be obtained by the terminal extracting the baseband of the audio signal; or the terminal can send the audio signal to a server, and the server returns the baseband sequence, which is not limited in the embodiments of the present disclosure.
[0102] In some embodiments, the baseband sequence is extracted by the terminal, and then the baseband lower limit is determined by multiple baseband values in the baseband sequence. Correspondingly, the terminal extracts the baseband of the audio signal to obtain the baseband sequence. Then, the terminal determines the baseband mean and baseband standard deviation of the baseband sequence through the baseband sequence. Finally, the terminal determines the difference between the baseband mean and the baseband standard deviation as the baseband lower limit. Among them, the audio signal includes multiple audio frames, and one audio frame corresponds to a baseband value in the baseband sequence. The baseband sequence is obtained by extracting the baseband from the audio signal, and then the baseband mean and baseband standard deviation are determined. Finally, the difference between the baseband mean and the baseband standard deviation is used as the baseband lower limit, so that the baseband lower limit can more accurately identify the lower limit of the baseband in the baseband sequence.
[0103] In some embodiments, the terminal may use a YIN or PYIN algorithm to extract the baseband of the collected audio signal, as shown in the following formula (1).
[0104] f0(n)=yin(vocal(n)) (1)
[0105] Wherein, vocal(n) represents N audio frames in the audio signal, yin() represents the fundamental frequency extraction algorithm, f0(n) represents the fundamental frequency sequence composed of N fundamental frequency values, and N is a positive integer. Wherein, the audio frame includes a number of sampling points, which is not limited in the embodiment of the present disclosure.
[0106] In some embodiments, the terminal may average multiple baseband values in the baseband sequence and then calculate the standard deviation to obtain the above baseband mean and baseband standard deviation, as shown in the following formulas (2) and (3).
[0107] mean vocal =mean(f0(n)) (2)
[0108] stdev vocal =std(f0(n)) (3)
[0109] Among them, mean vocal represents the fundamental frequency mean, mean() represents the averaging algorithm, f0(n) represents the fundamental frequency sequence, stdev vocalIt represents the fundamental frequency standard deviation, and std() represents the standard deviation algorithm.
[0110] In some embodiments, the terminal may calculate the baseband lower limit value by using the following formula (4).
[0111] f0_low=mean vocal -stdev vocal (4)
[0112] Among them, f0_low represents the lower limit of the fundamental frequency of the audio signal, mean vocal Indicates the fundamental frequency mean, stdev vocal Represents the standard deviation of the fundamental frequency.
[0113] In step S302, the terminal determines the high-pass filter information through the base frequency lower limit value, and the high-pass filter information is used to filter the low-frequency noise lower than the base frequency lower limit value.
[0114] In the disclosed embodiment, the terminal configures a high-pass filter with the baseband lower limit as a critical value to filter low-frequency noise through the high-pass filter, or uses the baseband lower limit as a high-pass filter coefficient to adjust the low-frequency signal in the audio signal.
[0115] For example, see Figure 4 As shown, Figure 4 FIG. 1 is a schematic diagram of a frequency response curve of a high-pass filter according to an exemplary embodiment. Figure 4 , the lower limit of the fundamental frequency is 300Hz, and the audio signal with a frequency greater than 300Hz will not be affected by the high-pass filter and will remain unchanged; while the audio signal with a frequency less than 300Hz will be attenuated based on the frequency response curve to suppress the low-frequency signal. The attenuation method is multiplied by the attenuation coefficient, which is expressed as: dB Figure 4 The decibel value on the vertical axis. When dB is 0, the attenuation coefficient is 1, indicating no attenuation; when dB is less than 0, the attenuation coefficient is a decimal, indicating attenuation.
[0116] In step S303, the terminal normalizes the frequency spectrum of the audio signal to obtain a normalized frequency spectrum.
[0117] In the disclosed embodiment, the terminal can first transform the audio signal from the time domain to the frequency domain to obtain the spectrum of the audio signal, and then normalize the spectrum of the audio signal based on the mean of the spectrum to obtain a normalized spectrum.
[0118] In some embodiments, the terminal can perform a fast Fourier transform on the audio signal to obtain the original spectrum of the audio signal. Then, a speech spectrum is generated based on the original spectrum, and the energy value of each frequency in the speech spectrum is the average of the energy values of N audio frames in the audio signal at the frequency. Then, the average energy value of each frequency is determined. Finally, based on the average energy value, the spectrum is normalized. By normalizing the spectrum of the audio signal, the energy value of the obtained normalized spectrum is located near 0, thereby quantitatively reflecting the characteristics of the spectrum, facilitating the comparison of the energy value of each frequency with the human voice reference curve, and then determining the human voice compensation coefficient of each frequency, so that the human voice compensation coefficient is more accurate. See the following formulas (5) and (6).
[0119]
[0120]
[0121] Among them, P in represents the speech spectrum of the audio signal, the speech spectrum includes I spectrum points, for the i-th spectrum point, the energy value of the i-th spectrum point is the average of the energy values of the frequency corresponding to the spectrum point of N audio frames; N represents the number of audio frames in the audio signal; fft() represents fast Fourier transform; vocal(n) represents N audio frames in the audio signal; mean() represents the averaging algorithm; represents the normalized spectrum.
[0122] In step S304, for any frequency in the normalized spectrum, the vocal compensation coefficient of the frequency is determined based on the difference between the energy value of the frequency in the normalized spectrum and the energy value of the frequency in the vocal reference curve. The vocal compensation coefficients of multiple frequencies constitute vocal compensation information. The vocal compensation information is used to adjust the spectrum curve of the vocal in the audio signal based on the vocal reference curve.
[0123] In the disclosed embodiment, due to the influence of the vocal conditions of the singers, the fundamental frequency average values of different singers may be different. By dividing the fundamental frequency average value into several regions, the human voice in the audio signal can be compensated based on the region where the fundamental frequency average value of the audio signal is located.
[0124] For example, referring to Table 1, Table 1 exemplarily shows four groups within the range of 110 Hz to 392 Hz: G1, G2, G3 and G4. Among them, the values of A2, B2 and A#3 in the range column represent the range corresponding to the frequency.
[0125] Table 1
[0126]
[0127]
[0128] It should be noted that, in each region, the average value of the frequency response of a vocal signal with several timbres that meet the requirements can be used to obtain a reference frequency response curve of the region, which can also be called a vocal reference curve.
[0129] For example, see Figure 5 As shown, Figure 5 FIG. 1 is a schematic diagram showing a human voice reference curve according to an exemplary embodiment. Figure 5 , exemplarily showing a human voice reference curve 501 in the range of 155Hz to 207Hz. Figure 5 The circles in the figure represent energy values of several human voice signals whose timbre meets the requirements at different frequencies, which are used to determine the human voice reference curve 502 . Figure 5 The distance between the dotted lines 502 and 503 on both sides of the vocal reference curve and the vocal reference curve 501 represents the difference range when making adjustments based on the vocal reference curve 501, that is, the upper and lower limits when compensating for the vocals.
[0130] In some embodiments, the terminal determines the vocal compensation information with reference to the vocal reference curve corresponding to the fundamental frequency mean of the audio signal, and the vocal compensation information includes vocal compensation coefficients of multiple frequencies. That is, the terminal can determine the vocal compensation coefficients of each frequency. Correspondingly, for any frequency in the normalized spectrum, the terminal determines the energy difference value based on the difference between the energy value of the frequency in the normalized spectrum and the energy value of the frequency in the vocal reference curve. In the case where the energy difference value is within the difference range, the energy difference value is determined as the vocal compensation coefficient of the frequency. In the case where the energy difference value exceeds the difference range, the target boundary value of the difference range is determined as the vocal compensation coefficient of the frequency, and the target boundary value is the boundary value with the smallest difference between the two boundary values of the difference range and the energy difference value. By determining the energy difference value, the coefficient that needs to be compensated for the vocal can be determined, and by setting the difference range, the situation of excessive compensation can be avoided, thereby maintaining the stability of the audio signal.
[0131] In some embodiments, the calculation method of the vocal compensation coefficient is shown in the following formulas (7) and (8).
[0132]
[0133] actual eq =max(min(raw eq , g), -g) (8)
[0134] Among them, raw eq Represents the difference curve of human voice; Pref Indicates the vocal reference curve; represents the normalized spectrum; formula (7) represents that for any spectrum point in the normalized spectrum, the difference between the energy value corresponding to the spectrum point in the human voice reference curve and the energy value corresponding to the normalized spectrum is used as the energy value of the spectrum point in the human voice difference curve. actual eq represents a vocal compensation curve, which includes vocal compensation coefficients corresponding to multiple spectrum points; max() represents a maximum value acquisition function; min() represents a minimum value acquisition function; [-g, g] represents a difference range. Optionally, the value of g is 6dB, 5dB or 9dB, which is not limited in the embodiments of the present disclosure.
[0135] For example, see Figure 6 As shown, Figure 6 FIG. 1 is a schematic diagram of a spectrum curve according to an exemplary embodiment. Figure 6 , exemplarily showing the normalized spectrum of the audio signal and the human voice reference curve. The human voice reference curve is the above Figure 5 The vocal reference curve in . The vocal difference curve can be obtained by subtracting the vocal reference curve from the normalized spectrum. Figure 7 As shown, Figure 7 FIG. 1 is a schematic diagram of another spectrum curve according to an exemplary embodiment. Figure 7 , exemplarily showing a vocal difference curve and a vocal compensation curve. The vocal difference curve is substantially consistent with the vocal compensation curve, except that the portion of the vocal difference curve exceeding -6db is adjusted to -6db.
[0136] In step S305, the terminal obtains device compensation information, where the device compensation information is used to compensate for the influence of the audio acquisition device on the audio signal.
[0137] In the embodiment of the present disclosure, the terminal can directly obtain the device compensation information, or generate the device compensation information according to the frequency response curve of the audio acquisition device. The embodiment of the present disclosure does not limit the way in which the terminal directly obtains the device compensation information. The following describes the process of the terminal generating the device compensation information.
[0138] In some embodiments, different audio acquisition devices have different frequency response curves, and audio acquisition devices with lower quality have more serious attenuation at low frequencies (such as below 400Hz). The frequency response curve of an audio device with better quality is approximately a straight line. Therefore, the device compensation information can be determined with reference to the frequency response curve of an audio device with better quality. Accordingly, the terminal can obtain a first frequency response curve and multiple second frequency response curves. Then, based on the difference between the mean of the multiple second frequency response curves and the first frequency response curve, the device compensation information is determined. Among them, the first frequency response curve is the frequency response curve of the reference audio acquisition device, and the second frequency response curve is the frequency response curve of other audio acquisition devices. By selecting the operation according to the style, the style compensation information is determined, so that through the style compensation information, on the basis of filtering low-frequency noise and compensating for human voice, the audio signal can also be compensated at the style level, so that the compensated audio signal conforms to the style.
[0139] For example, see Figure 8 As shown, Figure 8 is a schematic diagram of a frequency response curve according to an exemplary embodiment. Figure 8 , Figure 8 (a) in the figure exemplarily shows frequency response curves of various audio acquisition devices, wherein the dotted line represents the frequency response curve of the reference audio acquisition device, and the bold line represents the average of multiple frequency response curves of multiple other audio acquisition devices. Figure 8 (b) in the figure shows four curves as an example, wherein curve 3 is the frequency response curve of the reference audio acquisition device, curve 4 represents the average of multiple frequency response curves of multiple other audio acquisition devices, and curve 1 represents the difference between curve 4 and curve 3. Since the gain of curve 1 at extremely low frequencies and high frequencies is too large, the terminal adjusts the low-frequency part of curve 1 based on the first energy value range, and adjusts the high-frequency part of curve 1 based on the second energy value range, to obtain curve 2. The first energy value range is used to limit the energy value of the low frequency, and the second energy value range is used to limit the energy value of the high frequency.
[0140] In step S306, in response to the style selection operation, the terminal determines style compensation information, where the style compensation information is used to compensate the audio signal according to the style corresponding to the style selection operation.
[0141] In an embodiment of the present disclosure, the terminal can display a style selection interface, which displays multiple style options. In response to a trigger operation on any style option, the style compensation information of the style corresponding to the style option is determined. The style compensation information is in the form of a style compensation curve. The terminal can dynamically adjust the frequency corresponding to the low-frequency inflection point of the style compensation curve based on the above-mentioned fundamental frequency lower limit value while maintaining the shape of the style compensation curve, so that the frequency is equal to the fundamental frequency lower limit value, thereby obtaining the style compensation information of the audio signal.
[0142] For example, see Fig. 9 As shown, Fig. 9 FIG. 1 is a schematic diagram showing style compensation information according to an exemplary embodiment. Fig. 9 , exemplarily showing the style compensation curves corresponding to four styles. Taking the base frequency lower limit of 300Hz as an example, Fig. 9 The low frequency inflection points of the four tone compensation curves shown are equal to 300 Hz.
[0143] It should be noted that the above steps S305 and S306 are optional steps, that is, the terminal can adjust the audio signal based on the high-pass filter information and the voice compensation information.
[0144] In step S307, the terminal adjusts the audio signal based on the high-pass filter information, the vocal compensation information, the device compensation information, and the style compensation information.
[0145] In the disclosed embodiment, the terminal can superimpose the high-pass filter information, the vocal compensation information, the device compensation information and the style compensation information to obtain the total compensation information. Then, the terminal loads the total compensation information into the above audio signal through a filter bank or an FIR filter to achieve automatic adjustment of the audio signal.
[0146] In some embodiments, since high-pass filter information, vocal compensation information, device compensation information, and style compensation information can all be expressed in the form of curves, the terminal can sum the curves corresponding to the above four types of information to obtain a curve representing the total compensation information. The calculation method of the total compensation information is shown in the following formula (9).
[0147] EQ total =Correction EQ+High Pass EQ+Actual EQ+Style EQ (9)
[0148] Among them, EQ total Represents total compensation information, Correction EQ represents device compensation information, High Pass EQ represents high-pass filter information, Actual EQ represents vocal compensation information, and Style EQ represents style compensation information.
[0149] It should be noted that, in order to make the audio processing method provided by the embodiment of the present disclosure easier to understand, the following Fig.10 See Fig.10 As shown, Fig.10 FIG. 1 is a flowchart of another audio processing method provided according to an embodiment of the present application. Fig.10, for the audio signal to be processed, based on the fundamental frequency extraction algorithm, determine the fundamental frequency lower limit value of the audio signal. According to the audio acquisition device of the audio signal, determine the device compensation information of the audio signal. Then, based on the above audio lower limit value, determine the high-pass filter information of the audio signal. Then, based on the above audio lower limit value, determine the vocal compensation information of the audio signal. Then, based on the audio lower limit value, determine the style compensation information of the audio signal. Then, based on the superposition of the above multiple information, obtain the total compensation information. Finally, adjust the audio signal through the total compensation information to obtain the adjusted audio signal.
[0150] The disclosed embodiment provides an audio processing solution, which determines high-pass filtering information through a fundamental frequency sequence of an audio signal, so that low-frequency noise in the audio signal can be filtered out through the high-pass filtering information, and then determines human voice compensation information through a human voice reference curve and the frequency spectrum of the audio signal, so that the human voice in the audio signal can be compensated based on the human voice compensation information, thereby improving the quality of the audio signal and further improving the quality of the audio.
[0151] All the above optional technical solutions can be arbitrarily combined to form optional embodiments of the present disclosure, and will not be described in detail here.
[0152] Fig.11 is a block diagram of an audio processing device according to an exemplary embodiment. Fig.11 The device includes: a first determining unit 1101, a second determining unit 1102, a third determining unit 1103 and an audio adjusting unit 1104.
[0153] The first determining unit 1101 is configured to determine a fundamental frequency lower limit value of the audio signal based on the fundamental frequency sequence of the audio signal to be processed, where the fundamental frequency lower limit value is used to indicate a lower limit of the fundamental frequency in the audio signal;
[0154] The second determining unit 1102 is configured to determine high-pass filtering information according to the fundamental frequency lower limit value, where the high-pass filtering information is used to filter low-frequency noise below the fundamental frequency lower limit value without affecting the fundamental frequency of the audio signal;
[0155] The third determining unit 1103 is configured to determine vocal compensation information based on the vocal reference curve and the spectrum of the audio signal, where the vocal compensation information is used to adjust the spectrum curve of the vocal in the audio signal based on the vocal reference curve;
[0156] The audio adjustment unit 1104 is configured to adjust the audio signal based on the high-pass filter information and the vocal compensation information.
[0157] The disclosed embodiments provide an audio processing solution, which determines a fundamental frequency lower limit of an audio signal through a fundamental frequency sequence of the audio signal, and further determines high-pass filtering information, so that low-frequency noise below the fundamental frequency lower limit in the audio signal can be filtered out through the high-pass filtering information, and then determines human voice compensation information through a human voice reference curve and the spectrum of the audio signal, so that based on the human voice compensation information, the spectrum curve of the human voice can be adjusted with the human voice reference curve as a reference, so as to compensate for the human voice in the audio signal, thereby improving the quality of the audio signal, and further improving the quality of the audio.
[0158] In some embodiments, the first determination unit 1101 is configured to perform fundamental frequency extraction on the audio signal to obtain the fundamental frequency sequence; determine the fundamental frequency mean and fundamental frequency standard deviation of the fundamental frequency sequence through the fundamental frequency sequence; and determine the difference between the fundamental frequency mean and the fundamental frequency standard deviation as the fundamental frequency lower limit value.
[0159] In some embodiments, the vocal compensation information includes vocal compensation coefficients of multiple frequencies; the third determination unit 1103 is configured to normalize the frequency spectrum of the audio signal to obtain a normalized spectrum; for any frequency in the normalized spectrum, based on the difference between the energy value of the frequency in the normalized spectrum and the energy value of the frequency in the vocal reference curve, determine the vocal compensation coefficient of the frequency.
[0160] In some embodiments, the third determination unit 1103 is configured to determine an energy difference value based on the difference between the energy value of the frequency in the normalized spectrum and the energy value of the frequency in the vocal reference curve; when the energy difference value is within a difference range, the energy difference value is determined as the vocal compensation coefficient of the frequency; when the energy difference value exceeds the difference range, the target boundary value of the difference range is determined as the vocal compensation coefficient of the frequency, the target boundary value being the boundary value with the smallest difference between the two boundary values of the difference range and the energy difference value.
[0161] In some embodiments, the audio adjustment unit 1104 is configured to determine style compensation information in response to a style selection operation, and the style compensation information is used to compensate the audio signal according to the style corresponding to the style selection operation; and adjust the audio signal based on the high-pass filter information, the vocal compensation information and the style compensation information.
[0162] In some embodiments, the audio adjustment unit 1104 is configured to obtain device compensation information, which is used to compensate for the impact of the audio acquisition device on the audio signal; and adjust the audio signal based on the high-pass filter information, the human voice compensation information and the device compensation information.
[0163] In some embodiments, the audio adjustment unit 1104 is configured to determine style compensation information in response to a style selection operation, where the style compensation information is used to compensate the audio signal according to the style corresponding to the style selection operation; obtain device compensation information, where the device compensation information is used to compensate for the impact of the audio acquisition device on the audio signal; and adjust the audio signal based on high-pass filter information, vocal compensation information, style compensation information and device compensation information.
[0164] In some embodiments, the audio adjustment unit 1104 is configured to obtain a first frequency response curve and multiple second frequency response curves, where the first frequency response curve is a frequency response curve of a reference audio acquisition device, and the second frequency response curve is a frequency response curve of other audio acquisition devices; and determine the device compensation information based on the difference between the average of the multiple second frequency response curves and the first frequency response curve.
[0165] It should be noted that the audio processing device provided in the above embodiment only uses the division of the above functional units as an example when adjusting the audio signal. In actual applications, the above functions can be assigned to different functional units as needed, that is, the internal structure of the electronic device is divided into different functional units to complete all or part of the functions described above. In addition, the audio processing device provided in the above embodiment and the audio processing method embodiment belong to the same concept. The specific implementation process is detailed in the method embodiment and will not be repeated here.
[0166] Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.
[0167] When an electronic device is provided as a terminal, Fig.12 is a block diagram of a terminal 1200 according to an exemplary embodiment. Fig.12 The structure block diagram of a terminal 1200 provided by an exemplary embodiment of the present disclosure is shown. Generally, the terminal 1200 includes: a processor 1201 and a memory 1202 .
[0168] The processor 1201 may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 1201 may be implemented in at least one hardware form of DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), and PLA (Programmable Logic Array). The processor 1201 may also include a main processor and a coprocessor. The main processor is a processor for processing data in the awake state, also known as a CPU (Central Processing Unit); the coprocessor is a low-power processor for processing data in the standby state. In some embodiments, the processor 1201 may be integrated with a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor 1201 may also include an AI (Artificial Intelligence) processor, which is used to process computing operations related to machine learning.
[0169] The memory 1202 may include one or more computer-readable storage media, which may be non-transitory. The memory 1202 may also include a high-speed random access memory, and a non-volatile memory, such as one or more disk storage devices, flash memory storage devices. In some embodiments, the non-transitory computer-readable storage medium in the memory 1202 is used to store at least one program code, which is used to be executed by the processor 1201 to implement the audio processing method provided by the method embodiment of the present disclosure.
[0170] In some embodiments, the terminal 1200 may also optionally include: a peripheral device interface 1203 and at least one peripheral device. The processor 1201, the memory 1202 and the peripheral device interface 1203 may be connected via a bus or a signal line. Each peripheral device may be connected to the peripheral device interface 1203 via a bus, a signal line or a circuit board. Specifically, the peripheral device includes: at least one of a radio frequency circuit 1204, a display screen 1205, a camera assembly 1206, an audio circuit 1207, a positioning assembly 1208 and a power supply 1209.
[0171] The peripheral device interface 1203 may be used to connect at least one peripheral device related to I / O (Input / Output) to the processor 1201 and the memory 1202. In some embodiments, the processor 1201, the memory 1202, and the peripheral device interface 1203 are integrated on the same chip or circuit board; in some other embodiments, any one or two of the processor 1201, the memory 1202, and the peripheral device interface 1203 may be implemented on a separate chip or circuit board, which is not limited in this embodiment.
[0172] The radio frequency circuit 1204 is used to receive and transmit RF (Radio Frequency) signals, also known as electromagnetic signals. The radio frequency circuit 1204 communicates with the communication network and other communication devices through electromagnetic signals. The radio frequency circuit 1204 converts electrical signals into electromagnetic signals for transmission, or converts received electromagnetic signals into electrical signals. Optionally, the radio frequency circuit 1204 includes: an antenna system, an RF transceiver, one or more amplifiers, a tuner, an oscillator, a digital signal processor, a codec chipset, a user identity module card, and the like. The radio frequency circuit 1204 can communicate with other terminals through at least one wireless communication protocol. The wireless communication protocol includes, but is not limited to: a metropolitan area network, various generations of mobile communication networks (2G, 3G, 4G and 5G), a wireless local area network and / or a WiFi (Wireless Fidelity) network. In some embodiments, the radio frequency circuit 1204 may also include circuits related to NFC (Near Field Communication), which is not limited in the present disclosure.
[0173] The display screen 1205 is used to display a UI (User Interface). The UI may include graphics, text, icons, videos, and any combination thereof. When the display screen 1205 is a touch display screen, the display screen 1205 also has the ability to collect touch signals on the surface or above the surface of the display screen 1205. The touch signal can be input to the processor 1201 as a control signal for processing. At this time, the display screen 1205 can also be used to provide virtual buttons and / or virtual keyboards, also known as soft buttons and / or soft keyboards. In some embodiments, the display screen 1205 can be one, and the front panel of the terminal 1200 is set; in other embodiments, the display screen 1205 can be at least two, which are respectively set on different surfaces of the terminal 1200 or are folded; in some other embodiments, the display screen 1205 can be a flexible display screen, which is set on the curved surface or folded surface of the terminal 1200. Even, the display screen 1205 can also be set to a non-rectangular irregular shape, that is, a special-shaped screen. The display screen 1205 can be made of materials such as LCD (Liquid Crystal Display) and OLED (Organic Light-Emitting Diode).
[0174] The camera assembly 1206 is used to capture images or videos. Optionally, the camera assembly 1206 includes a front camera and a rear camera. Typically, the front camera is arranged on the front panel of the terminal, and the rear camera is arranged on the back of the terminal. In some embodiments, there are at least two rear cameras, which are any one of a main camera, a depth of field camera, a wide-angle camera, and a telephoto camera, so as to realize the fusion of the main camera and the depth of field camera to realize the background blur function, the fusion of the main camera and the wide-angle camera to realize the panoramic shooting and VR (Virtual Reality) shooting function or other fusion shooting functions. In some embodiments, the camera assembly 1206 may also include a flash. The flash can be a monochrome temperature flash or a dual-color temperature flash. A dual-color temperature flash refers to a combination of a warm light flash and a cold light flash, which can be used for light compensation at different color temperatures.
[0175] The audio circuit 1207 may include a microphone and a speaker. The microphone is used to collect sound waves from the user and the environment, and convert the sound waves into electrical signals and input them into the processor 1201 for processing, or input them into the radio frequency circuit 1204 to achieve voice communication. For the purpose of stereo acquisition or noise reduction, there may be multiple microphones, which are respectively arranged at different parts of the terminal 1200. The microphone may also be an array microphone or an omnidirectional acquisition microphone. The speaker is used to convert the electrical signal from the processor 1201 or the radio frequency circuit 1204 into sound waves. The speaker may be a traditional film speaker or a piezoelectric ceramic speaker. When the speaker is a piezoelectric ceramic speaker, it can not only convert the electrical signal into sound waves audible to humans, but also convert the electrical signal into sound waves inaudible to humans for purposes such as ranging. In some embodiments, the audio circuit 1207 may also include a headphone jack.
[0176] The positioning component 1208 is used to locate the current geographical location of the terminal 1200 to implement navigation or LBS (Location Based Service). The positioning component 1208 can be a positioning component based on the US GPS (Global Positioning System), China's Beidou system, Russia's Grenas system or the European Union's Galileo system.
[0177] The power supply 1209 is used to power various components in the terminal 1200. The power supply 1209 can be an alternating current, a direct current, a disposable battery, or a rechargeable battery. When the power supply 1209 includes a rechargeable battery, the rechargeable battery can support wired charging or wireless charging. The rechargeable battery can also be used to support fast charging technology.
[0178] In some embodiments, the terminal 1200 further includes one or more sensors 1210 , including but not limited to: an acceleration sensor 1211 , a gyroscope sensor 1212 , a pressure sensor 1213 , a fingerprint sensor 1214 , an optical sensor 1215 , and a proximity sensor 1216 .
[0179] The acceleration sensor 1211 can detect the magnitude of acceleration on the three coordinate axes of the coordinate system established by the terminal 1200. For example, the acceleration sensor 1211 can be used to detect the components of gravity acceleration on the three coordinate axes. The processor 1201 can control the display screen 1205 to display the user interface in a horizontal view or a vertical view according to the gravity acceleration signal collected by the acceleration sensor 1211. The acceleration sensor 1211 can also be used to collect motion data of games or users.
[0180] The gyro sensor 1212 can detect the body direction and rotation angle of the terminal 1200, and the gyro sensor 1212 can cooperate with the acceleration sensor 1211 to collect the user's 3D actions on the terminal 1200. The processor 1201 can implement the following functions based on the data collected by the gyro sensor 1212: motion sensing (such as changing the UI according to the user's tilt operation), image stabilization during shooting, game control, and inertial navigation.
[0181] The pressure sensor 1213 can be set on the side frame of the terminal 1200 and / or the lower layer of the display screen 1205. When the pressure sensor 1213 is set on the side frame of the terminal 1200, the user's holding signal of the terminal 1200 can be detected, and the processor 1201 performs left and right hand recognition or shortcut operations according to the holding signal collected by the pressure sensor 1213. When the pressure sensor 1213 is set on the lower layer of the display screen 1205, the processor 1201 controls the operability controls on the UI interface according to the user's pressure operation on the display screen 1205. The operability controls include at least one of a button control, a scroll bar control, an icon control, and a menu control.
[0182] The fingerprint sensor 1214 is used to collect the user's fingerprint, and the processor 1201 identifies the user's identity based on the fingerprint collected by the fingerprint sensor 1214, or the fingerprint sensor 1214 identifies the user's identity based on the collected fingerprint. When the user's identity is identified as a trusted identity, the processor 1201 authorizes the user to perform relevant sensitive operations, which include unlocking the screen, viewing encrypted information, downloading software, paying, and changing settings. The fingerprint sensor 1214 can be set on the front, back, or side of the terminal 1200. When a physical button or a manufacturer logo is set on the terminal 1200, the fingerprint sensor 1214 can be integrated with the physical button or the manufacturer logo.
[0183] The optical sensor 1215 is used to collect the ambient light intensity. In one embodiment, the processor 1201 can control the display brightness of the display screen 1205 according to the ambient light intensity collected by the optical sensor 1215. Specifically, when the ambient light intensity is high, the display brightness of the display screen 1205 is increased; when the ambient light intensity is low, the display brightness of the display screen 1205 is reduced. In another embodiment, the processor 1201 can also dynamically adjust the shooting parameters of the camera assembly 1206 according to the ambient light intensity collected by the optical sensor 1215.
[0184] The proximity sensor 1216, also called a distance sensor, is usually arranged on the front panel of the terminal 1200. The proximity sensor 1216 is used to collect the distance between the user and the front of the terminal 1200. In one embodiment, when the proximity sensor 1216 detects that the distance between the user and the front of the terminal 1200 is gradually decreasing, the processor 1201 controls the display screen 1205 to switch from the screen-on state to the screen-off state; when the proximity sensor 1216 detects that the distance between the user and the front of the terminal 1200 is gradually increasing, the processor 1201 controls the display screen 1205 to switch from the screen-off state to the screen-on state.
[0185] Those skilled in the art will understand that Fig.12 The structure shown in the figure does not constitute a limitation on the terminal 1200, and the terminal 1200 may include more or fewer components than those shown in the figure, or combine certain components, or adopt a different component arrangement.
[0186] When the electronic device is provided as a server, Fig.13 It is a block diagram of a server 1300 according to an exemplary embodiment. The server 1300 may have relatively large differences due to different configurations or performances, and may include one or more processors (Central Processing Units, CPU) 1301 and one or more memories 1302, wherein the memory 1302 stores at least one program code, and the at least one program code is loaded and executed by the processor 1301 to implement the audio processing methods provided by the above-mentioned various method embodiments. Of course, the server may also have components such as a wired or wireless network interface, a keyboard, and an input and output interface for input and output. The server 1300 may also include other components for implementing device functions, which will not be described in detail here.
[0187] In an exemplary embodiment, a computer-readable storage medium including instructions is also provided, such as a memory 1202 or a memory 1302 including instructions, and the instructions can be executed by the processor 1201 of the terminal 1200 or the processor 1301 of the server 1300 to complete the above method. Alternatively, the computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.
[0188] In an exemplary embodiment, a computer program product is also provided, including a computer program, and when the computer program is executed by a processor, the above audio processing method is implemented.
[0189] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. The present disclosure is intended to cover any variations, uses or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art that are not disclosed in the present disclosure. The description and examples are to be considered exemplary only, and the true scope and spirit of the present disclosure are indicated by the following claims.
[0190] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.
Claims
1. An audio processing method, characterized in that: The method comprises: Extract the base frequency of the audio signal to be processed to obtain a base frequency sequence; Determine the fundamental frequency mean and fundamental frequency standard deviation of the fundamental frequency sequence through the fundamental frequency sequence; Determine the difference between the fundamental frequency mean and the fundamental frequency standard deviation as the fundamental frequency lower limit of the audio signal, wherein the fundamental frequency lower limit is used to indicate the lower limit of the fundamental frequency in the audio signal; Determine high-pass filter information according to the fundamental frequency lower limit value, wherein the high-pass filter information is used to filter low-frequency noise below the fundamental frequency lower limit value without affecting the fundamental frequency of the audio signal; Normalizing the frequency spectrum of the audio signal to obtain a normalized frequency spectrum; For any frequency in the normalized spectrum, determining a vocal compensation coefficient of the frequency based on a difference between an energy value of the frequency in the normalized spectrum and an energy value of the frequency in a vocal reference curve; The audio signal is adjusted based on the high-pass filter information and the vocal compensation information, wherein the vocal compensation information includes vocal compensation coefficients of multiple frequencies, and the vocal compensation information is used to adjust the spectrum curve of the vocal in the audio signal based on the vocal reference curve.
2. The audio processing method according to claim 1, characterized in that: The determining the vocal compensation coefficient of the frequency based on the difference between the energy value of the frequency in the normalized spectrum and the energy value of the frequency in the vocal reference curve comprises: determining an energy difference value based on a difference between an energy value of the frequency in the normalized spectrum and an energy value of the frequency in the human voice reference curve; When the energy difference value is within the difference range, determining the energy difference value as a vocal compensation coefficient of the frequency; When the energy difference value exceeds the difference range, the target boundary value of the difference range is determined as the vocal compensation coefficient of the frequency, and the target boundary value is the boundary value with the smallest difference with the energy difference value between the two boundary values of the difference range.
3. The audio processing method according to claim 1 or 2, characterized in that: The adjusting the audio signal based on the high-pass filtering information and the vocal compensation information includes: In response to a style selection operation, determining style compensation information, the style compensation information being used to compensate the audio signal according to a style corresponding to the style selection operation; The audio signal is adjusted based on the high-pass filter information, the vocal compensation information, and the style compensation information.
4. The audio processing method according to claim 1 or 2, characterized in that: The adjusting the audio signal based on the high-pass filtering information and the vocal compensation information includes: Acquire device compensation information, where the device compensation information is used to compensate for the influence of the audio acquisition device on the audio signal; The audio signal is adjusted based on the high-pass filter information, the vocal compensation information, and the device compensation information.
5. The audio processing method according to claim 1 or 2, characterized in that: The adjusting the audio signal based on the high-pass filtering information and the vocal compensation information includes: In response to a style selection operation, determining style compensation information, the style compensation information being used to compensate the audio signal according to a style corresponding to the style selection operation; Acquire device compensation information, where the device compensation information is used to compensate for the influence of the audio acquisition device on the audio signal; The audio signal is adjusted based on the high-pass filter information, the vocal compensation information, the style compensation information, and the device compensation information.
6. The audio processing method according to claim 5, characterized in that: The obtaining of equipment compensation information includes: Acquire a first frequency response curve and a plurality of second frequency response curves, wherein the first frequency response curve is a frequency response curve of a reference audio acquisition device, and the second frequency response curve is a frequency response curve of other audio acquisition devices; The device compensation information is determined based on a difference between an average of the plurality of second frequency response curves and the first frequency response curve.
7. An audio processing device, characterized in that: The device comprises: A first determining unit is configured to extract the fundamental frequency of the audio signal to be processed to obtain a fundamental frequency sequence; determine the fundamental frequency mean and fundamental frequency standard deviation of the fundamental frequency sequence through the fundamental frequency sequence; determine the difference between the fundamental frequency mean and the fundamental frequency standard deviation as the fundamental frequency lower limit value of the audio signal, wherein the fundamental frequency lower limit value is used to indicate the lower limit of the fundamental frequency in the audio signal; A second determining unit is configured to determine high-pass filtering information according to the fundamental frequency lower limit value, wherein the high-pass filtering information is used to filter low-frequency noise below the fundamental frequency lower limit value without affecting the fundamental frequency of the audio signal; A third determination unit is configured to normalize the spectrum of the audio signal to obtain a normalized spectrum; for any frequency in the normalized spectrum, determine a vocal compensation coefficient of the frequency based on a difference between an energy value of the frequency in the normalized spectrum and an energy value of the frequency in a vocal reference curve; The audio adjustment unit is configured to adjust the audio signal based on the high-pass filter information and the vocal compensation information, wherein the vocal compensation information includes vocal compensation coefficients of multiple frequencies, and the vocal compensation information is used to adjust the frequency spectrum curve of the vocal in the audio signal based on the vocal reference curve.
8. An electronic device, characterized in that: The electronic device comprises: one or more processors; a memory for storing program code executable by the processor; The processor is configured to execute the program code to implement the audio processing method according to any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that: When the instructions in the computer-readable storage medium are executed by a processor of an electronic device, the electronic device is enabled to perform the audio processing method as described in any one of claims 1 to 6.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the audio processing method according to any one of claims 1 to 6 is implemented.
Citation Information
Patent Citations
Chinese speech signal processing method, Chinese speech signal processing device and hearing aid device
CN103035252A
Signal processing device and signal processing method
CN106663448A
Sound effect compensation method, sound effect compensation device, readable storage medium and terminal
CN108430003A
Audio processing method and device, terminal and computer readable storage medium
CN110191396A
Audio processing method and device, electronic equipment and storage medium
CN114598970A
