Audio processing method and device
By acquiring and adjusting the fundamental frequency and spectrum information in the audio signal and converting it into a nonlinear spectrum, the problem of low quality audio synthesis signals in the existing technology is solved, and audio synthesis of higher quality and applicability is achieved.
Patent Information
- Application Number
- CN202010758220.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-07-31
- Publication Date
- 2024-09-06
- Estimated Expiration
- 2040-07-31
AI Technical Summary
The quality of the audio synthesis signal synthesized in the existing technology is not high, and it is difficult to meet the needs of diverse applications.
By obtaining the fundamental frequency sequence, spectrum envelope sequence and aperiodic parameter sequence in the original audio signal, the fundamental frequency is adjusted and the linear spectrum is determined, and then converted into a nonlinear spectrum to generate the target audio signal. Specific steps include frame windowing processing, low-pass filtering, short-time Fourier transform, Mel filter bank processing, etc., and the pre-trained audio synthesis model is used to generate audio signals.
It significantly improves the quality of the audio synthesis signal, has higher applicability, and can better meet the needs of various applications such as film and television dubbing, medical treatment, military and daily life.
Smart Images

Figure CN111916093B
Abstract
Description
Technical Field
[0001] The present application relates to the field of audio signal processing, and in particular to an audio processing method and device. Background Art
[0002] With the development of artificial intelligence technology, there are more and more intelligent applications in voice. In the film and television dubbing industry, the timbre characteristics of the original actors can be added to the localized film dubbing to make the dubbing more authentic. In digital entertainment industries such as karaoke, the pitch information can be modified while retaining the timbre to achieve sound correction. In the medical field, voice conversion technology can improve the intelligibility of the voice of patients with damaged vocal tracts. In the military and defense field, voice conversion technology can disguise the speaker's voice in communication. In daily life, mobile phone voice assistants, question-and-answer robots, e-reading, and virtual singers are all related to timbre and pitch. In the prior art, most of them use voice signal models to separate the sound source information and vocal tract information in the voice signal to extract feature parameters. Among them, by converting these feature parameters, a new audio synthesis signal can be synthesized. However, the signal quality of the audio synthesis signal synthesized according to the prior art is not high. Summary of the invention
[0003] The embodiments of the present application provide an audio processing method and device, which can improve the signal quality of audio synthesis signals and have high applicability.
[0004] In a first aspect, an embodiment of the present application provides an audio processing method, the method comprising:
[0005] Acquire an original audio signal, and acquire a fundamental frequency sequence, a spectrum envelope sequence, and a non-periodic parameter sequence from the original audio signal;
[0006] Acquiring a baseband adjustment parameter, and adjusting the baseband sequence according to the baseband adjustment parameter to generate a target baseband sequence;
[0007] Determine a linear spectrum according to the target fundamental frequency sequence, the spectrum envelope sequence and the non-periodic parameter sequence;
[0008] The linear spectrum is converted into a nonlinear spectrum, and a target audio signal is generated according to the nonlinear spectrum.
[0009] In combination with the first aspect, in a possible implementation manner, determining a linear spectrum according to the target baseband sequence, the spectrum envelope sequence, and the non-periodic parameter sequence includes:
[0010] generating a coarse synthesized audio signal based on the target fundamental frequency sequence, the spectrum envelope sequence and the non-periodic parameter sequence;
[0011] Performing frame windowing processing on the coarse synthesized audio signal to obtain at least one first frame signal constituting the coarse synthesized audio signal;
[0012] Performing short-time Fourier transform on each first sub-frame signal in the at least one first sub-frame signal to obtain a sub-linear spectrum corresponding to each first sub-frame signal;
[0013] The sub-linear frequency spectra are concatenated to obtain a linear frequency spectrum corresponding to the coarse synthesized audio signal.
[0014] In combination with the first aspect, in a possible implementation manner, obtaining a baseband sequence from the original audio signal includes:
[0015] Performing frame and window processing on the original audio signal to obtain at least one second frame signal constituting the original audio signal;
[0016] For the second frame signal, use a plurality of low-pass filters with cutoff frequencies to filter the second frame signal respectively, so as to obtain a plurality of filtered signals obtained after the second frame signal is respectively filtered through the plurality of low-pass filters with cutoff frequencies;
[0017] Determining the confidence of the cutoff frequency of each filtered signal according to the period information of each filtered signal;
[0018] Determine a cutoff frequency corresponding to a maximum confidence level from a plurality of confidence levels as a base frequency corresponding to the second frame signal;
[0019] The base frequencies corresponding to the second frame signals are concatenated to obtain a base frequency sequence.
[0020] In combination with the first aspect, in a possible implementation manner, acquiring a spectrum envelope sequence from the original audio signal includes:
[0021] Performing short-time Fourier transform on each second frame signal in the at least one second frame signal to obtain a sub-linear spectrum corresponding to each second frame signal;
[0022] Calculating an absolute value of a sub-linear frequency spectrum corresponding to each second sub-frame signal to obtain a power spectrum of each second sub-frame signal;
[0023] The power spectrum corresponding to each second sub-frame signal is logarithmized and phase expanded, and then inverse Fourier transform is performed to obtain the cepstrum of the power spectrum corresponding to each second sub-frame signal;
[0024] Filtering the cepstrum of the power spectrum corresponding to each second frame signal based on a low-pass filter to obtain a spectrum envelope corresponding to each second frame signal;
[0025] The spectrum envelopes corresponding to the second frame signals are concatenated to obtain a spectrum envelope sequence corresponding to the original audio signal.
[0026] In combination with the first aspect, in a possible implementation manner, acquiring the non-periodic parameter sequence from the original audio signal includes:
[0027] Acquire a minimum phase spectrum corresponding to each second frame signal, and determine a non-periodic parameter corresponding to each second frame signal according to a sub-linear spectrum and a minimum phase spectrum corresponding to each second frame signal;
[0028] The non-periodic parameters corresponding to the second frame signals are concatenated to obtain a non-periodic parameter sequence corresponding to the original audio signal.
[0029] In combination with the first aspect, in a possible implementation manner, the nonlinear spectrum includes a Mel spectrum; and converting the linear spectrum into a nonlinear spectrum includes:
[0030] Inputting the sub-linear spectra included in the linear spectrum into a Mel filter bank to obtain Mel spectra corresponding to the sub-linear spectra output by the Mel filter bank, wherein one sub-linear spectrum corresponds to one Mel spectrum;
[0031] The mel-spectrums are concatenated to obtain a complete mel-spectrum corresponding to the coarse synthesized audio signal.
[0032] In combination with the first aspect, in a possible implementation manner, generating a target audio signal according to the nonlinear spectrum includes:
[0033] The nonlinear spectrum is input into a pre-trained audio synthesis model to obtain a target audio signal output by the audio synthesis model, wherein the audio synthesis model is trained according to audio signals of different users and nonlinear spectra corresponding to each audio signal.
[0034] In a second aspect, an embodiment of the present application provides an audio processing device, the device comprising:
[0035] An original audio processing module, used to obtain an original audio signal, and obtain a fundamental frequency sequence, a spectrum envelope sequence, and a non-periodic parameter sequence from the original audio signal;
[0036] A baseband adjustment module, used for acquiring a baseband adjustment parameter, and adjusting the baseband sequence according to the baseband adjustment parameter to generate a target baseband sequence;
[0037] A linear spectrum determination module, used to determine a linear spectrum according to the target fundamental frequency sequence, the spectrum envelope sequence and the non-periodic parameter sequence;
[0038] The target audio synthesis module is used to convert the linear spectrum into a non-linear spectrum and generate a target audio signal according to the non-linear spectrum.
[0039] In conjunction with the second aspect, in a possible implementation manner, the linear spectrum determination module includes:
[0040] An audio coarse synthesis unit, configured to generate a coarse synthesized audio signal based on the target fundamental frequency sequence, the spectrum envelope sequence and the non-periodic parameter sequence;
[0041] a first preprocessing unit, configured to perform frame-by-frame windowing processing on the coarse synthesized audio signal to obtain at least one first frame signal constituting the coarse synthesized audio signal;
[0042] A sub-linear spectrum determination unit, configured to perform a short-time Fourier transform on each first sub-frame signal in the at least one first sub-frame signal to obtain a sub-linear spectrum corresponding to each first sub-frame signal;
[0043] The linear spectrum determination unit is used to splice the sub-linear spectrum to obtain the linear spectrum corresponding to the coarse synthesized audio signal.
[0044] In combination with the second aspect, in a possible implementation, the original audio processing module includes a baseband sequence acquisition unit, and the baseband sequence acquisition unit includes:
[0045] A second preprocessing subunit, configured to perform frame and window processing on the original audio signal to obtain at least one second frame signal constituting the original audio signal;
[0046] A filtering subunit, configured to filter the second frame signal using a plurality of low-pass filters with cutoff frequencies to obtain a plurality of filtered signals obtained after the second frame signal passes through the plurality of low-pass filters with cutoff frequencies;
[0047] A confidence determination subunit, used to determine the confidence of the cutoff frequency of each filtered signal according to the period information of each filtered signal;
[0048] A fundamental frequency determination subunit, used to determine a cutoff frequency corresponding to a maximum confidence level from a plurality of confidence levels as the fundamental frequency corresponding to the second frame signal;
[0049] The baseband sequence generating subunit is used to concatenate the basebands corresponding to the second frame signals to obtain a baseband sequence.
[0050] In combination with the second aspect, in a possible implementation, the original audio processing module includes a spectrum envelope sequence acquisition unit, and the spectrum envelope sequence acquisition unit includes:
[0051] A sub-linear spectrum acquisition sub-unit, used for performing a short-time Fourier transform on each second sub-frame signal in the at least one second sub-frame signal to obtain a sub-linear spectrum corresponding to each second sub-frame signal;
[0052] A power spectrum acquisition subunit, used for obtaining an absolute value of a sub-linear spectrum corresponding to each second sub-frame signal to obtain a power spectrum of each second sub-frame signal;
[0053] A cepstrum acquisition subunit is used to calculate the logarithm of the power spectrum corresponding to each second sub-frame signal and perform phase expansion, and then perform inverse Fourier transform to obtain the cepstrum of the power spectrum corresponding to each second sub-frame signal;
[0054] A spectrum envelope determination subunit, configured to filter the cepstrum of the power spectrum corresponding to each second frame signal based on a low-pass filter to obtain a spectrum envelope corresponding to each second frame signal;
[0055] The spectrum envelope sequence generating subunit is used to splice the spectrum envelopes corresponding to the second frame signals to obtain the spectrum envelope sequence corresponding to the original audio signal.
[0056] In combination with the second aspect, in a possible implementation, the original audio processing module includes a non-periodic parameter sequence acquisition unit, and the non-periodic parameter sequence acquisition unit includes:
[0057] The non-periodic parameter determination subunit is used to obtain the minimum phase spectrum corresponding to each second sub-frame signal, and determine the non-periodic parameter corresponding to each second sub-frame signal according to the sub-linear spectrum and the minimum phase spectrum corresponding to each second sub-frame signal;
[0058] The non-periodic parameter sequence generating subunit is used to concatenate the non-periodic parameters corresponding to each second frame signal to obtain the non-periodic parameter sequence corresponding to the original audio signal.
[0059] In combination with the second aspect, in a possible implementation, the nonlinear spectrum includes a Mel spectrum; the target audio synthesis module includes a nonlinear spectrum determination unit, and the nonlinear spectrum determination unit is specifically used to:
[0060] Inputting the sub-linear spectra included in the linear spectrum into a Mel filter bank to obtain Mel spectra corresponding to the sub-linear spectra output by the Mel filter bank, wherein one sub-linear spectrum corresponds to one Mel spectrum;
[0061] The mel-spectrums are concatenated to obtain a complete mel-spectrum corresponding to the coarse synthesized audio signal.
[0062] In combination with the second aspect, in a possible implementation manner, the target audio synthesis module further includes an audio synthesis unit, and the audio synthesis unit is used to:
[0063] The nonlinear spectrum is input into a pre-trained audio synthesis model to obtain a target audio signal output by the audio synthesis model, wherein the audio synthesis model is trained according to audio signals of different users and nonlinear spectra corresponding to each audio signal.
[0064] In a fourth aspect, an embodiment of the present application provides a terminal device, the terminal device comprising a processor and a memory, the processor and the memory being connected to each other. The memory is used to store a computer program that supports the terminal device to execute the method provided by the first aspect and / or any possible implementation of the first aspect, the computer program comprising program instructions, and the processor is configured to call the program instructions to execute the method provided by the first aspect and / or any possible implementation of the first aspect.
[0065] In a fifth aspect, an embodiment of the present application provides a computer-readable storage medium, which stores a computer program. The computer program includes program instructions, which, when executed by a processor, enable the processor to execute the method provided by the above-mentioned first aspect and / or any possible implementation method of the first aspect.
[0066] In an embodiment of the present application, by acquiring the original audio signal, a baseband sequence, a spectrum envelope sequence, and a non-periodic parameter sequence can be obtained from the original audio signal. Further, by acquiring the baseband adjustment parameter, the baseband sequence can be adjusted according to the baseband adjustment parameter to generate a target baseband sequence. Among them, a linear spectrum can be determined according to the target baseband sequence, the spectrum envelope sequence, and the non-periodic parameter sequence. By converting the linear spectrum into a nonlinear spectrum, a target audio signal can be generated according to the nonlinear spectrum. By adopting the embodiment of the present application, the signal quality of the audio synthesis signal can be improved, and the applicability is high. BRIEF DESCRIPTION OF THE DRAWINGS
[0067] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0068] Figure 1 is a flowchart of an audio processing method provided by an embodiment of the present application;
[0069] Figure 2 is a waveform diagram of a sinusoidal wave signal provided in an embodiment of the present application;
[0070] Figure 3 is a schematic diagram of the relationship between frame length and frame shift provided in an embodiment of the present application;
[0071] Figure 4 is a structural schematic diagram of an audio processing device provided in an embodiment of the present application;
[0072] Figure 5 is another structural schematic diagram of the audio processing device provided in an embodiment of the present application;
[0073] Figure 6 It is a schematic diagram of the structure of the terminal device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0074] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0075] The audio processing method provided in the embodiment of the present application can be widely applied to terminal devices capable of performing audio signal processing. Among them, the above-mentioned terminal devices include but are not limited to servers, smart phones, tablet computers, laptops and desktop computers, etc., which are not limited here. For the convenience of description, the terminal device will be used as an example for explanation below. The method in the embodiment of the present application can obtain a baseband sequence, a spectrum envelope sequence, and a non-periodic parameter sequence from the original audio signal by obtaining the original audio signal. Further, by obtaining the baseband adjustment parameter, the baseband sequence can be adjusted according to the baseband adjustment parameter to generate a target baseband sequence. Among them, a linear spectrum can be determined according to the target baseband sequence, the spectrum envelope sequence and the non-periodic parameter sequence. By converting the linear spectrum into a nonlinear spectrum, a target audio signal can be generated according to the nonlinear spectrum. By adopting the embodiment of the present application, the signal quality of the audio synthesis signal can be improved, and the applicability is high.
[0076] The following will be combined Figures 1 to 6 The methods and related devices provided in the embodiments of the present application are described in detail respectively.
[0077] See also Figure 1 , Figure 1 A flowchart of an audio processing method provided in an embodiment of the present application. The method provided in an embodiment of the present application may include the following steps S101 to S104:
[0078] S101, obtaining an original audio signal, and obtaining a fundamental frequency sequence, a spectrum envelope sequence, and a non-periodic parameter sequence from the original audio signal.
[0079] In some feasible implementations, pre-stored audio may be obtained from a local storage of the terminal device or from an external storage device connected to the terminal device as the original audio signal. Alternatively, audio recorded by a microphone of the terminal device may be obtained in real time as the original audio signal. It should be understood that the original audio signal here is a dry sound, for example, a pure human voice without accompaniment or music.
[0080] In some feasible implementations, a fundamental frequency sequence can be extracted from the original audio signal. It should be understood that the fundamental frequency is also commonly referred to as pitch or intonation. Specifically, by performing frame windowing processing on the original audio signal, at least one frame signal constituting the original audio signal can be obtained (for the convenience of description, the second frame signal is taken as an example for explanation). Among them, the window function used in the above-mentioned frame windowing processing can be selected from Hanning window or Hamming window, etc., which is not limited here. The frame length can be selected within 8-32 milliseconds, for example, the frame length can be 10 milliseconds, etc., and the frame shift can be determined according to the actual application scenario, which is not limited here. Please refer to Figure 3 , Figure 3 It is a schematic diagram of the relationship between frame length and frame shift provided in an embodiment of the present application. Figure 3 Take the kth frame and the k+1th frame as an example for explanation, wherein the length of line segment ① is the frame shift of the k+1th frame relative to the kth frame, and the length of line segment ② is the frame length of the kth frame or the k+1th frame.
[0081] Among them, for each second sub-frame signal in at least one second sub-frame signal obtained, a plurality of low-pass filters with cutoff frequencies can be used to filter the second sub-frame signal respectively, so as to obtain a plurality of filtered signals obtained after the second sub-frame signal is respectively filtered through a plurality of low-pass filters with cutoff frequencies. For example, for any second sub-frame signal 1, when the second sub-frame signal 1 is filtered by a low-pass filter with a cutoff frequency of cutoff frequency 1, a corresponding filtered signal 1 can be obtained. When the second sub-frame signal 1 is filtered by a low-pass filter with a cutoff frequency of cutoff frequency 2, a corresponding filtered signal 2 can be obtained. When the second sub-frame signal 1 is filtered by a low-pass filter with a cutoff frequency of cutoff frequency 3, a corresponding filtered signal 3 can be obtained, and so on, without limitation here. Among them, the above-mentioned cutoff frequency 3 can be greater than the cutoff frequency 2, and the above-mentioned cutoff frequency 2 can be greater than the cutoff frequency 1, without limitation here.
[0082] Wherein, by obtaining the period information of each filtered signal, the confidence of the cutoff frequency of each filtered signal can be determined according to the period information of each filtered signal. Furthermore, the cutoff frequency corresponding to the maximum confidence can be determined from multiple confidences as the baseband corresponding to the second frame signal. Wherein, by splicing the baseband corresponding to each second frame signal in at least one second frame signal, the first baseband sequence corresponding to the original audio signal can be obtained. And further, the first baseband sequence obtained above can be determined as the target baseband sequence of the original audio signal. Wherein, the period information of the filtered signal can be the signal period of the filtered signal.
[0083] It should be understood that after the second frame signal is filtered using a low-pass filter with a suitable cutoff frequency, the resulting filtered signal should be a standard sine wave signal. Figure 2 , Figure 2 is a waveform diagram of a sine wave signal provided in an embodiment of the present application. Figure 2 As shown in the figure, the horizontal axis of the sine wave signal is time, and the vertical axis is amplitude. Figure 2 The signal period T of the sine wave signal shown can be (t4-t0) or (t6-t2) or (t5-t1) or (t7-t3). In other words, (t4-t0), (t6-t2), (t5-t1) and (t7-t3) can be used as the period information of the filtered signal. Assume that the filtered signal is a standard sine wave signal, such as Figure 2 As shown, in the standard sine wave signal, the signal period T=T1=T2=T3=T4, wherein T1=(t4-t0), T2=(t6-t2), T3=(t5-t1), T4=(t7-t3). That is to say, since the true fundamental frequency of each second frame signal is unknown, it is necessary to use a plurality of low-pass filters with different cut-off frequencies to try to determine the true fundamental frequency corresponding to each second frame signal. Here, the embodiment of the present application can determine the confidence of the cut-off frequency of each filtered signal according to the period information of the filtered signal. That is to say, the embodiment of the present application can determine the confidence of using the cut-off frequency as the filtered signal according to the period information of the filtered signal corresponding to each cut-off frequency.
[0084] For example, assuming that the second frame signal 1 is filtered by a low-pass filter with a cutoff frequency of cutoff frequency 1, a filtered signal 1 corresponding to the second frame signal 1 can be obtained. It is assumed that the period information of the filtered signal 1 is T1, T2, T3 and T4. Therefore, the standard deviation or the inverse of the variance between the period information T1, T2, T3 and T4 can be used as the confidence level of using the cutoff frequency 1 as the base frequency of the second frame signal 1. Alternatively, the average value of the period information T1, T2, T3 and T4 of the filtered signal 1 can be compared with The reciprocal of the absolute value of the difference between is used as the confidence level of taking the cutoff frequency 1 as the base frequency of the second frame signal 1, and no limitation is made here. It is easy to understand that the greater the confidence level, the higher the credibility of taking the cutoff frequency as the base frequency.
[0085] Among them, for each second sub-frame signal, multiple low-pass filters with different cutoff frequencies are respectively used for filtering, so multiple filtered signals corresponding to each second sub-frame signal can be obtained. Further, according to the period information of each filtered signal in the multiple filtered signals, the confidence of the cutoff frequency of each filtered signal can be determined, so multiple confidences can be obtained. Finally, the cutoff frequency corresponding to the maximum confidence can be determined from the multiple confidences corresponding to each second sub-frame signal as the base frequency corresponding to the second sub-frame signal.
[0086] Optionally, in some feasible implementations, after determining the multiple confidences corresponding to each second frame signal, for the multiple confidences corresponding to a second frame signal, the cutoff frequency corresponding to the maximum confidence among the multiple confidences corresponding to the second frame signal can be first used as the candidate fundamental frequency. Further, for the second frame signal, the average value of the cutoff frequencies corresponding to the maximum confidences of its n adjacent frames is calculated. Then, the absolute value of the difference between the candidate fundamental frequency and the above average value is determined as the deviation value p, where n is a positive integer, for example, n=4. Wherein, if the above deviation value p is less than or equal to the preset deviation threshold q, the candidate fundamental frequency can be determined as the fundamental frequency of the second frame signal. If the above deviation value p is greater than the above preset deviation threshold q, the cutoff frequency corresponding to the second largest confidence among the multiple confidences corresponding to the second frame signal can be used as the candidate fundamental frequency of the second frame signal, and the deviation value p between the candidate fundamental frequency and the average value is recalculated, and then the size relationship between the deviation value p and the preset deviation threshold q is compared. Similarly, if the first m cutoff frequencies with the largest confidence do not meet the condition that their deviation value p is less than or equal to the preset deviation threshold q, the average value of the cutoff frequencies corresponding to the maximum confidence of n adjacent frames can be used as the base frequency of the second frame signal. Wherein, m is a positive integer, for example, m=3.
[0087] For example, it is assumed that the multiple cutoff frequencies are respectively cutoff frequency 1, cutoff frequency 2 and cutoff frequency 3. Among them, cutoff frequency 1<cutoff frequency 2<cutoff frequency 3. Assume that after the original audio signal is framed and windowed, 4 second frame signals constituting the original audio signal can be obtained, which are second frame signal 1, second frame signal 2, second frame signal 3 and second frame signal 4. Among them, for each second frame signal, after filtering each second frame signal respectively by using the low-pass filter of the above-mentioned cutoff frequency 1 to cutoff frequency 3, a filtered signal 1-1 obtained by filtering the second frame signal 1 by the low-pass filter of cutoff frequency 1, a filtered signal 1-2 obtained by filtering the second frame signal 1 by the low-pass filter of cutoff frequency 2, and a filtered signal 1-3 obtained by filtering the second frame signal 1 by the low-pass filter of cutoff frequency 3 can be obtained. The second frame signal 2 is filtered by a low-pass filter with a cutoff frequency of 1 to obtain a filtered signal 2-1, the second frame signal 2 is filtered by a low-pass filter with a cutoff frequency of 2 to obtain a filtered signal 2-2, and the second frame signal 2 is filtered by a low-pass filter with a cutoff frequency of 3 to obtain a filtered signal 2-3. By analogy, the second frame signal 3 is filtered by low-pass filters with cutoff frequencies of 1 to 3 to obtain filtered signals 3-1, 3-2, and 3-3. The second frame signal 4 is filtered by low-pass filters with cutoff frequencies of 1 to 3 to obtain filtered signals 4-1, 4-2, and 4-3. Among them, according to the period information of each filtered signal, the confidence of the cutoff frequency of each filtered signal can be determined. Here, it is assumed that the multiple confidences corresponding to the second frame signal 1 are confidence 1-1 corresponding to the cutoff frequency 1, confidence 1-2 corresponding to the cutoff frequency 2, and confidence 1-3 corresponding to the cutoff frequency 3, and confidence 1-3>confidence 1-1>confidence 1-2. The multiple confidences corresponding to the second frame signal 2 are confidence 2-1 corresponding to the cutoff frequency 1, confidence 2-2 corresponding to the cutoff frequency 2, and confidence 2-3 corresponding to the cutoff frequency 3, and confidence 2-1>confidence 2-2>confidence 2-3. The multiple confidences corresponding to the second frame signal 3 are confidence 3-1 corresponding to the cutoff frequency 1, confidence 3-2 corresponding to the cutoff frequency 2, and confidence 3-3 corresponding to the cutoff frequency 3, and confidence 3-3>confidence 3-2>confidence 3-1. The multiple confidence levels corresponding to the second frame signal 4 are confidence level 4-1 corresponding to cutoff frequency 1, confidence level 4-2 corresponding to cutoff frequency 2, and confidence level 4-3 corresponding to cutoff frequency 3, and confidence level 4-3>confidence level 4-1>confidence level 4-2.
[0088] For the convenience of description, only the fundamental frequency corresponding to the second frame signal 1 is determined as an example. Specifically, the cutoff frequency corresponding to the maximum confidence among the three confidences corresponding to the second frame signal 1 can be used as the candidate fundamental frequency, that is, the cutoff frequency 3 corresponding to the confidence 1-3 can be used as the candidate fundamental frequency. Wherein, assuming n=2, m=2, by calculating the average value of the cutoff frequencies corresponding to the maximum confidence (that is, confidence 2-1 and confidence 3-3) of the two adjacent frames of the second frame signal 1 (that is, the second frame signal 2 and the second frame signal 3), it can be obtained Then, the absolute value of the difference between the candidate fundamental frequency and the above average value is calculated as the deviation value p, that is, the deviation value p = |candidate fundamental frequency-average value|. Assuming that the deviation value p is less than or equal to the preset deviation threshold q, the cutoff frequency 3 can be determined as the fundamental frequency of the second frame signal 1. If the above deviation value p is greater than the above preset deviation threshold q, the cutoff frequency corresponding to the second largest confidence level among the multiple confidence levels corresponding to the second frame signal 1 can be used as the candidate fundamental frequency of the above frame signal, and the cutoff frequency 1 corresponding to the confidence level 1-1 can be determined as the candidate fundamental frequency of the second frame signal 1, and the deviation value p between the candidate fundamental frequency and the average value is recalculated, and then the size relationship between the deviation value p and the preset deviation threshold q is compared. By analogy, if the first two cutoff frequencies with the largest confidence (i.e., cutoff frequency 3 corresponding to confidence 1-3, and cutoff frequency 1 corresponding to confidence 1-1) do not meet the condition that their deviation value p is less than or equal to the preset deviation threshold q, then the average value of the cutoff frequencies corresponding to the maximum confidence of the two adjacent frames of the second frame signal 1 (i.e., the second frame signal 2 and the second frame signal 3) can be used as the fundamental frequency of the above-mentioned second frame signal, that is, Determined as the fundamental frequency of the second frame signal 1.
[0089] In some feasible implementations, a spectrum envelope sequence can also be extracted from the original audio signal. Here, the spectrum envelope is what we often call timbre. Specifically, for each second sub-frame signal in at least one second sub-frame signal included in the original audio signal, by performing a short-time Fourier transform on each second sub-frame signal, a sub-linear spectrum corresponding to each second sub-frame signal can be obtained. Among them, by calculating the absolute value of the sub-linear spectrum corresponding to each second sub-frame signal, the power spectrum of each second sub-frame signal can be obtained. Furthermore, by calculating the logarithm of the power spectrum corresponding to each second sub-frame signal and performing phase unfolding, and then performing an inverse Fourier transform, the inverse spectrum of the power spectrum corresponding to each second sub-frame signal can be obtained. Finally, based on a low-pass filter, the inverse spectrum of the power spectrum corresponding to each second sub-frame signal is filtered to obtain the spectrum envelope corresponding to each second sub-frame signal. Here, by splicing the spectrum envelopes corresponding to each second sub-frame signal, a complete spectrum envelope corresponding to the original audio signal, that is, a spectrum envelope sequence, can be obtained.
[0090] In some feasible implementations, a non-periodic parameter sequence can also be extracted from the original audio signal. Wherein, by obtaining the minimum phase spectrum corresponding to each second frame signal, the non-periodic parameters corresponding to each second frame signal can be determined according to the sub-linear spectrum and the minimum phase spectrum corresponding to each second frame signal. Wherein, by splicing the non-periodic parameters corresponding to each second frame signal, the non-periodic parameter sequence corresponding to the original audio signal can be obtained. Specifically, a sine wave signal can be fitted according to the above-mentioned baseband sequence and spectrum envelope sequence. By performing frame windowing processing on the above-mentioned fitted sine wave signal, at least one frame signal constituting the sine wave signal can be obtained (for convenience of description, the third frame signal is taken as an example). Here, the frame length, frame shift and window function used when the sine wave signal is subjected to frame windowing processing are the same as the frame length, frame shift and window function used when the original audio signal is subjected to frame windowing processing. That is to say, the number of the third frame signal obtained after the fitted sine wave signal is subjected to frame windowing processing is equal to the number of the second frame signal after the original audio signal is subjected to frame windowing processing. Among them, by performing short-time Fourier transform on the third frame signal, the spectrum corresponding to the third frame signal can be obtained. It should be understood that the spectrum corresponding to the third frame signal is the minimum phase spectrum corresponding to the second frame signal at the corresponding position. Further, the ratio of the sub-linear spectrum corresponding to each second frame signal to the minimum phase spectrum can be determined as the non-periodic spectrum value corresponding to each second frame signal. Then, by performing inverse Fourier transform on the non-periodic spectrum value corresponding to each second frame signal, the value obtained after inverse Fourier transform can be determined as the non-periodic parameter corresponding to each second frame signal. Among them, by splicing the non-periodic parameters corresponding to each second frame signal, a non-periodic parameter sequence corresponding to the original audio signal can be obtained.
[0091] Optionally, in some feasible implementations, after obtaining at least one third sub-frame signal constituting the sine wave signal, the power spectrum corresponding to each third sub-frame signal can also be obtained to obtain a complete power spectrum corresponding to the sine wave signal. Further, the ratio between the power of each frequency band in the power spectrum of the original audio signal and the power of each frequency band in the power spectrum of the fitted sine wave signal can be determined as the non-periodic power value corresponding to each frequency band, and then the non-periodic power value can be inversely Fourier transformed to obtain the non-periodic parameter. Among them, by splicing the non-periodic parameters, the non-periodic parameter sequence corresponding to the original audio signal can be obtained. That is, by dividing the power spectrum of the frequency band corresponding to the second sub-frame signal and the third sub-frame signal, the corresponding non-periodic power value can be obtained. Then, by inverse Fourier transforming the non-periodic power value corresponding to each second sub-frame signal obtained, the value obtained after the inverse Fourier transform can be determined as the non-periodic parameter corresponding to each second sub-frame signal. Further, by splicing the non-periodic parameters corresponding to each second sub-frame signal, the non-periodic parameter sequence corresponding to the original audio signal can be obtained.
[0092] S102: Acquire a baseband adjustment parameter, and adjust a baseband sequence according to the baseband adjustment parameter to generate a target baseband sequence.
[0093] In some feasible implementations, after extracting the baseband sequence from the original audio signal, the baseband adjustment parameter can be further obtained. Then, the baseband sequence is adjusted according to the above baseband adjustment parameter, and the adjusted baseband sequence is determined as the target baseband sequence. It is not difficult to understand that when the application scenario of the present application is singing voice tuning, it is usually necessary to obtain the baseband adjustment parameter, and adjust the extracted baseband sequence by the baseband adjustment parameter to achieve the effect of raising or lowering the pitch. It should be understood that the baseband adjustment parameter can be a value or a sequence. Among them, when the baseband adjustment parameter is a value, it can be to raise or lower the baseband sequence as a whole. When the baseband adjustment parameter is a sequence, its sequence length is equal to the sequence length of the baseband sequence, that is, according to the baseband adjustment parameter sequence, each baseband value on the baseband sequence can be raised or lowered to varying degrees.
[0094] S103: Determine a linear spectrum according to the target fundamental frequency sequence, the spectrum envelope sequence, and the non-periodic parameter sequence.
[0095] In some feasible implementations, after obtaining the target baseband sequence, spectrum envelope sequence and non-periodic parameter sequence according to the above steps S101 and S102, a linear spectrum can be determined according to the above target baseband sequence, spectrum envelope sequence and non-periodic parameter sequence. Specifically, a coarse synthesized audio signal can be first generated according to the above target baseband sequence, spectrum envelope sequence and non-periodic parameter sequence. Among them, the target baseband sequence, spectrum envelope sequence and non-periodic parameter sequence can be input into a World vocoder to obtain a coarse synthesized audio signal output by the World vocoder. Among them, the World vocoder is a vocoder proposed by Professor Masaya Mori of Meiji University in Japan, which is widely used in the Merlin speech synthesis system as an open source vocoder. Alternatively, the Straight vocoder proposed by Professor Hideki Kawahara of Meiji University in Japan can also be used to generate a coarse synthesized audio signal, which is not limited here. It should be understood that the coarse synthesized audio signal generated here is a low-quality audio signal. That is to say, the sound quality of the coarse synthesized audio signal is relatively mechanical, and the electronic sound is obvious. The coarse synthesized audio signal is converted into a linear spectrum for the next step.
[0096] S104: Convert the linear spectrum into a nonlinear spectrum, and generate a target audio signal according to the nonlinear spectrum.
[0097] In some feasible implementations, by converting the linear spectrum into a nonlinear spectrum, a target audio signal can be generated according to the nonlinear spectrum. Specifically, the coarse synthesized audio signal can be subjected to a frame windowing process to obtain at least one frame signal constituting the coarse synthesized audio signal (for the convenience of description, the first frame signal is taken as an example for explanation). The frame length used in the above-mentioned frame windowing process can be selected within 8-32 milliseconds, and the window function can be selected as a Hanning window or a Hamming window, etc., which is specifically determined according to the actual application scenario and is not limited here.
[0098] In some feasible implementations, for each first sub-frame signal in at least one first sub-frame signal, by acquiring the sub-linear spectrum corresponding to each first sub-frame signal, the sub-linear spectrum corresponding to each first sub-frame signal can be converted into a sub-non-linear spectrum. The non-linear spectrum converted can be a Mel spectrum or a Bark scale spectrum, etc., which is not limited here. For ease of understanding, the embodiment of the present application is described by taking the non-linear spectrum as a Mel spectrum as an example. Specifically, by performing a short-time Fourier transform on each first sub-frame signal, a sub-linear spectrum corresponding to each first sub-frame signal can be obtained. By inputting the sub-linear spectrum corresponding to each first sub-frame signal into a Mel filter group, the Mel spectrum output by the above-mentioned Mel filter group can be obtained.
[0099] It should be understood that since the pitch of the sound heard by the human ear is not linearly related to the actual frequency, the Mel frequency is more in line with the auditory characteristics of the human ear. That is, it is linearly distributed below 1000Hz and logarithmically increases above 1000Hz. Therefore, the Mel frequency f mel The relationship with the linear frequency f can be expressed as:
[0100] f mel =1125·ln(1+f / 700)
[0101] Generally speaking, based on audio signals obtained at different sampling rates, different numbers of Mel filter banks can be used to convert the linear spectrum corresponding to the audio signal into a Mel spectrum. For example, for an audio signal with a sampling rate of 16000 Hz, 80 Mel filter banks can generally be selected, and for an audio signal with a sampling rate of 24000 Hz, 100 Mel filter banks can generally be selected.
[0102] In some feasible implementations, a complete nonlinear spectrum corresponding to the coarse synthesized audio signal may be obtained by splicing sub-nonlinear spectrums corresponding to the first sub-frame signals in the at least one first sub-frame signal.
[0103] In some feasible implementations, a target audio signal can be generated based on the nonlinear spectrum obtained above. Specifically, the nonlinear spectrum can be input into a pre-trained audio synthesis model to obtain the target audio signal output by the audio synthesis model. The audio synthesis model can be trained based on a large number of training samples included in the training sample set. Each training sample includes an audio signal and a nonlinear spectrum corresponding to the audio signal. It should be understood that the training sample set may include audio signals of different users and nonlinear spectra corresponding to each audio signal. Alternatively, the training sample set may include audio signals of the same user and nonlinear spectra corresponding to each audio signal, which is not limited here. The audio synthesis models used in this application include but are not limited to Wavenet models, Wavernn models, etc., which are determined according to the actual application scenario and are not limited here.
[0104] In an embodiment of the present application, by acquiring an original audio signal, a baseband sequence, a spectrum envelope sequence, and a non-periodic parameter sequence can be extracted from the original audio signal. By acquiring a baseband adjustment parameter, the baseband sequence can be adjusted according to the baseband adjustment parameter to generate a target baseband sequence. A linear spectrum can be determined according to the target baseband sequence, the spectrum envelope sequence, and the non-periodic parameter sequence. Further, by converting the linear spectrum into a non-linear spectrum, a target audio signal can be generated according to the non-linear spectrum. By adopting the embodiment of the present application, the signal quality of the audio synthesis signal can be improved, and the applicability is high.
[0105] See also Figure 4 , Figure 4 1 is a schematic diagram of a structure of an audio processing device provided in an embodiment of the present application. The audio processing device provided in an embodiment of the present application includes:
[0106] The original audio processing module 41 is used to obtain an original audio signal, and obtain a fundamental frequency sequence, a spectrum envelope sequence, and a non-periodic parameter sequence from the original audio signal;
[0107] A baseband adjustment module 42, configured to obtain a baseband adjustment parameter, and adjust the baseband sequence according to the baseband adjustment parameter to generate a target baseband sequence;
[0108] A linear spectrum determination module 43, configured to determine a linear spectrum according to the target fundamental frequency sequence, the spectrum envelope sequence and the non-periodic parameter sequence;
[0109] The target audio synthesis module 44 is used to convert the linear spectrum into a non-linear spectrum and generate a target audio signal according to the non-linear spectrum.
[0110] See also Figure 5 , Figure 5 is another structural diagram of the audio processing device provided in an embodiment of the present application.
[0111] In some feasible implementations, the linear spectrum determination module 43 includes:
[0112] An audio coarse synthesis unit 431, configured to generate a coarse synthesized audio signal based on the target baseband sequence, the spectrum envelope sequence and the non-periodic parameter sequence;
[0113] A first pre-processing unit 432, configured to perform frame windowing processing on the coarse synthesized audio signal to obtain at least one first frame signal constituting the coarse synthesized audio signal;
[0114] The sub-linear spectrum determining unit 433 is used to perform short-time Fourier transform on each first sub-frame signal in the at least one first sub-frame signal to obtain a sub-linear spectrum corresponding to each first sub-frame signal;
[0115] The linear spectrum determining unit 434 is configured to concatenate the sub-linear spectrums to obtain a linear spectrum corresponding to the coarse synthesized audio signal.
[0116] In some feasible implementations, the original audio processing module 41 includes a baseband sequence acquisition unit 411, and the baseband sequence acquisition unit 411 includes:
[0117] The second pre-processing sub-unit 4111 is used to perform frame windowing processing on the original audio signal to obtain at least one second frame signal constituting the original audio signal;
[0118] The filtering subunit 4112 is used to filter the second frame signal by using a plurality of low-pass filters with cutoff frequencies to obtain a plurality of filtered signals obtained after the second frame signal is respectively filtered by the low-pass filters with the plurality of cutoff frequencies;
[0119] A confidence determination subunit 4113, configured to determine the confidence of the cutoff frequency of each filtered signal according to the period information of each filtered signal;
[0120] A base frequency determination subunit 4114, configured to determine a cutoff frequency corresponding to a maximum confidence level from among a plurality of confidence levels as a base frequency corresponding to the second frame signal;
[0121] The baseband sequence generating subunit 4115 is configured to concatenate the basebands corresponding to the second frame signals to obtain a baseband sequence.
[0122] In some feasible implementations, the original audio processing module 41 includes a spectrum envelope sequence acquisition unit 412, and the spectrum envelope sequence acquisition unit 412 includes:
[0123] The sub-linear spectrum acquisition sub-unit 4121 is used to perform short-time Fourier transform on each second sub-frame signal in the at least one second sub-frame signal to obtain a sub-linear spectrum corresponding to each second sub-frame signal;
[0124] The power spectrum acquisition subunit 4122 is used to obtain the absolute value of the sub-linear spectrum corresponding to each second sub-frame signal to obtain the power spectrum of each second sub-frame signal;
[0125] The cepstrum acquisition subunit 4123 is used to calculate the logarithm of the power spectrum corresponding to each second frame signal and perform phase expansion, and then perform inverse Fourier transform to obtain the cepstrum of the power spectrum corresponding to each second frame signal;
[0126] The spectrum envelope determination subunit 4124 is used to filter the cepstrum of the power spectrum corresponding to each second frame signal based on a low-pass filter to obtain the spectrum envelope corresponding to each second frame signal;
[0127] The spectrum envelope sequence generating subunit 4125 is used to concatenate the spectrum envelopes corresponding to the second frame signals to obtain the spectrum envelope sequence corresponding to the original audio signal.
[0128] In some feasible implementations, the original audio processing module 41 includes a non-periodic parameter sequence acquisition unit 413, and the non-periodic parameter sequence acquisition unit 413 includes:
[0129] The non-periodic parameter determination subunit 4131 is used to obtain the minimum phase spectrum corresponding to each second frame signal, and determine the non-periodic parameter corresponding to each second frame signal according to the sub-linear spectrum and the minimum phase spectrum corresponding to each second frame signal;
[0130] The non-periodic parameter sequence generating subunit 4132 is used to concatenate the non-periodic parameters corresponding to each second frame signal to obtain a non-periodic parameter sequence corresponding to the original audio signal.
[0131] In some feasible implementations, the nonlinear spectrum includes a Mel spectrum; the target audio synthesis module 44 includes a nonlinear spectrum determination unit 441, and the nonlinear spectrum determination unit 441 is specifically used to:
[0132] Inputting the sub-linear spectra included in the linear spectrum into a Mel filter bank to obtain Mel spectra corresponding to the sub-linear spectra output by the Mel filter bank, wherein one sub-linear spectrum corresponds to one Mel spectrum;
[0133] The mel-spectrums are concatenated to obtain a complete mel-spectrum corresponding to the coarse synthesized audio signal.
[0134] In some feasible implementations, the target audio synthesis module 44 further includes an audio synthesis unit 442, and the audio synthesis unit 442 is used to:
[0135] The nonlinear spectrum is input into a pre-trained audio synthesis model to obtain a target audio signal output by the audio synthesis model, wherein the audio synthesis model is trained according to audio signals of different users and nonlinear spectra corresponding to each audio signal.
[0136] In a specific implementation, the above audio processing device can perform the above-mentioned Figure 1For example, the original audio processing module 41 may be used to perform the implementations of extracting the baseband sequence, the spectrum envelope sequence, and the non-periodic parameter sequence from the original audio signal acquired in the above steps. For details, please refer to the implementations provided in the above steps, which will not be repeated here. The baseband adjustment module 42 may be used to perform the implementations described in the above steps of obtaining the baseband adjustment parameters, determining the target baseband sequence based on the baseband adjustment parameters, and other related steps. For details, please refer to the implementations provided in the above steps, which will not be repeated here. The linear spectrum determination module 43 may be used to perform the implementations of determining the linear spectrum according to the target baseband sequence, the spectrum envelope sequence, and the non-periodic parameter sequence in the above steps. For details, please refer to the implementations provided in the above steps, which will not be repeated here. The target audio synthesis module 44 may be used to perform the implementations of converting the linear spectrum into a non-linear spectrum and generating the target audio signal according to the non-linear spectrum in the above steps. For details, please refer to the implementations provided in the above steps, which will not be repeated here.
[0137] In an embodiment of the present application, after extracting a fundamental frequency sequence, a spectrum envelope sequence, and a non-periodic parameter sequence from the acquired original audio signal, the audio processing device can adjust the fundamental frequency sequence according to the fundamental frequency adjustment parameter to generate a target fundamental frequency sequence. Among them, a linear spectrum can be determined according to the target fundamental frequency sequence, the spectrum envelope sequence, and the non-periodic parameter sequence. Furthermore, by converting the linear spectrum into a non-linear spectrum, a target audio signal can be generated according to the non-linear spectrum. By adopting the embodiment of the present application, the signal quality of the audio synthesis signal can be improved, and the applicability is high.
[0138] See also Figure 6 , Figure 6 Schematic diagram of the structure of the terminal device provided in the embodiment of the present application. Figure 6 As shown, the terminal device in this embodiment may include: one or more processors 501, one or more memories 502, and one or more transceivers 503. The processor 501, memory 502, and transceiver 503 are connected via a bus 504. The memory 502 is used to store a computer program, which includes program instructions, and the processor 501 is used to execute the program instructions stored in the memory 502 to perform the process described in step S101 to step S104 in the above embodiment.
[0139] It should be understood that in some feasible implementations, the processor 501 may be a central processing unit (CPU), and the processor may also be other general-purpose processors, digital signal processors (DSP), application specific integrated circuits (ASIC), field programmable gate arrays (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc. The memory 502 may include a read-only memory and a random access memory, and provide instructions and data to the processor 501. A portion of the memory 502 may also include a non-volatile random access memory. For example, the memory 502 may also store information about the device type.
[0140] In a specific implementation, the above terminal device can execute the above-mentioned functions through its built-in functional modules. Figure 1 For the implementation methods provided in each step, please refer to the implementation methods provided in the above steps for details, which will not be repeated here.
[0141] In an embodiment of the present application, after extracting the baseband sequence, spectrum envelope sequence and non-periodic parameter sequence from the acquired original audio signal, the terminal device can adjust the baseband sequence according to the baseband adjustment parameter to generate a target baseband sequence. Among them, the linear spectrum can be determined according to the target baseband sequence, the spectrum envelope sequence and the non-periodic parameter sequence. Furthermore, by converting the linear spectrum into a non-linear spectrum, the target audio signal can be generated according to the non-linear spectrum. By adopting the embodiment of the present application, the signal quality of the audio synthesis signal can be improved, and the applicability is high.
[0142] The present application also provides a computer-readable storage medium storing a computer program, wherein the computer program includes program instructions, and when the program instructions are executed by a processor, Figure 1 For the audio processing methods provided in each step, please refer to the implementation methods provided in the above steps for details, which will not be repeated here.
[0143] The above-mentioned computer-readable storage medium can be the internal storage unit of the audio processing device or the above-mentioned terminal device provided in any of the above-mentioned embodiments, such as the hard disk or memory of the electronic device. The computer-readable storage medium can also be an external storage device of the electronic device, such as a plug-in hard disk, a smart memory card (smartmedia card, SMC), a secure digital (secure digital, SD) card, a flash card (flash card), etc. equipped on the electronic device. Further, the computer-readable storage medium can also include both the internal storage unit of the electronic device and the external storage device. The computer-readable storage medium is used to store the computer program and other programs and data required by the electronic device. The computer-readable storage medium can also be used to temporarily store data that has been output or is to be output.
[0144] The terms "first", "second", "third", "fourth", etc. in the claims, specification and drawings of this application are used to distinguish different objects, rather than to describe a specific order. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not limited to the listed steps or units, but optionally includes steps or units that are not listed, or optionally includes other steps or units inherent to these processes, methods, products or devices.
[0145] Mentioning "embodiment" in this article means that the specific features, structures or characteristics described in conjunction with the embodiment may be included in at least one embodiment of the present application. Displaying the phrase at various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments. The term "and / or" used in the specification of this application and the appended claims refers to any combination of one or more of the items listed in association and all possible combinations, and includes these combinations. It can be appreciated by those of ordinary skill in the art that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to the function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of this application.
[0146] The method and related apparatus provided by the embodiment of the present application are described with reference to the method flow chart and / or structural diagram provided by the embodiment of the present application. Specifically, each process and / or box in the method flow chart and / or structural diagram, as well as the combination of the processes and / or boxes in the flow chart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the process in the process. Figure 1 A process or multiple processes and / or structures Figure 1 These computer program instructions can also be stored in a computer-readable memory that can guide a computer or other programmable data processing device to work in a specific way, so that the instructions stored in the computer-readable memory produce a product including an instruction device, which implements the functions specified in the process. Figure 1 A process or multiple processes and / or structures Figure 1 These computer program instructions can also be loaded onto a computer or other programmable data processing device, so that a series of operation steps are executed on the computer or other programmable device to produce a computer-implemented process, so that the instructions executed on the computer or other programmable device provide for implementing the process in the process. Figure 1 A flow or multiple flows and / or structures illustrate the steps of the functions specified in one block or multiple blocks.
Claims
1. An audio processing method, characterized in that: The method comprises: Acquire an original audio signal, and acquire a fundamental frequency sequence, a spectrum envelope sequence, and a non-periodic parameter sequence from the original audio signal, wherein acquiring the fundamental frequency sequence from the original audio signal comprises: performing frame windowing processing on the original audio signal to obtain at least one second frame signal constituting the original audio signal; filtering the second frame signal using low-pass filters with multiple cutoff frequencies to obtain multiple filtered signals obtained after the second frame signal is respectively filtered through the low-pass filters with the multiple cutoff frequencies; determining the confidence of the cutoff frequency of each filtered signal according to the period information of each filtered signal; taking the cutoff frequency corresponding to the maximum confidence among the multiple confidences corresponding to the second frame signal as a candidate fundamental frequency, and calculating The average value of the cutoff frequencies corresponding to the maximum confidences of n adjacent frames of the second frame signal, where n is a positive integer; determining the absolute value of the difference between the candidate fundamental frequency and the average value as a deviation value; if the deviation value is less than or equal to a preset deviation threshold, determining the candidate fundamental frequency as the fundamental frequency of the second frame signal; if the deviation value is greater than the preset deviation threshold, using the cutoff frequency corresponding to the second largest confidence among the multiple confidences corresponding to the second frame signal as the candidate fundamental frequency of the second frame signal, and recalculating the deviation value between the candidate fundamental frequency and the average value; if the deviation value is less than or equal to the preset deviation threshold, determining the candidate fundamental frequency as the fundamental frequency of the second frame signal; splicing the fundamental frequencies corresponding to the second frame signals to obtain a fundamental frequency sequence; Acquiring a baseband adjustment parameter, and adjusting the baseband sequence according to the baseband adjustment parameter to generate a target baseband sequence; Determine a linear spectrum according to the target fundamental frequency sequence, the spectrum envelope sequence and the non-periodic parameter sequence; The linear spectrum is converted into a nonlinear spectrum, and a target audio signal is generated according to the nonlinear spectrum, wherein the generating the target audio signal according to the nonlinear spectrum comprises: inputting the nonlinear spectrum into a pre-trained audio synthesis model, and obtaining a target audio signal output by the audio synthesis model, wherein the audio synthesis model is trained according to a plurality of training samples included in a training sample set, each training sample comprises an audio signal and a nonlinear spectrum corresponding to the audio signal, and the training sample set comprises audio signals of different users and the nonlinear spectrum corresponding to each audio signal is trained.
2. The method according to claim 1, characterized in that The determining of the linear spectrum according to the target baseband sequence, the spectrum envelope sequence and the non-periodic parameter sequence includes: generating a coarse synthesized audio signal based on the target fundamental frequency sequence, the spectrum envelope sequence and the non-periodic parameter sequence; Performing frame windowing processing on the coarse synthesized audio signal to obtain at least one first frame signal constituting the coarse synthesized audio signal; Performing short-time Fourier transform on each first sub-frame signal in the at least one first sub-frame signal to obtain a sub-linear spectrum corresponding to each first sub-frame signal; The sub-linear frequency spectra are concatenated to obtain a linear frequency spectrum corresponding to the coarse synthesized audio signal.
3. The method according to claim 1 or 2, characterized in that: The acquiring the baseband sequence from the original audio signal comprises: Performing frame and window processing on the original audio signal to obtain at least one second frame signal constituting the original audio signal; For the second frame signal, use a plurality of low-pass filters with cutoff frequencies to filter the second frame signal respectively, so as to obtain a plurality of filtered signals obtained after the second frame signal is respectively filtered through the plurality of low-pass filters with cutoff frequencies; Determining the confidence of the cutoff frequency of each filtered signal according to the period information of each filtered signal; Determine a cutoff frequency corresponding to a maximum confidence level from a plurality of confidence levels as a base frequency corresponding to the second frame signal; The base frequencies corresponding to the second frame signals are concatenated to obtain a base frequency sequence.
4. The method according to claim 3, characterized in that The acquiring of a spectrum envelope sequence from the original audio signal comprises: Performing short-time Fourier transform on each second frame signal in the at least one second frame signal to obtain a sub-linear spectrum corresponding to each second frame signal; Calculating an absolute value of a sub-linear frequency spectrum corresponding to each second sub-frame signal to obtain a power spectrum of each second sub-frame signal; The power spectrum corresponding to each second sub-frame signal is logarithmized and phase expanded, and then inverse Fourier transform is performed to obtain the cepstrum of the power spectrum corresponding to each second sub-frame signal; Filtering the cepstrum of the power spectrum corresponding to each second frame signal based on a low-pass filter to obtain a spectrum envelope corresponding to each second frame signal; The spectrum envelopes corresponding to the second frame signals are concatenated to obtain a spectrum envelope sequence corresponding to the original audio signal.
5. The method according to claim 3 or 4, characterized in that: The step of acquiring a non-periodic parameter sequence from the original audio signal comprises: Acquire a minimum phase spectrum corresponding to each second frame signal, and determine a non-periodic parameter corresponding to each second frame signal according to a sub-linear spectrum and a minimum phase spectrum corresponding to each second frame signal; The non-periodic parameters corresponding to the second frame signals are concatenated to obtain a non-periodic parameter sequence corresponding to the original audio signal.
6. The method according to claim 2, characterized in that The nonlinear spectrum includes a Mel spectrum; and converting the linear spectrum into a nonlinear spectrum includes: Inputting the sub-linear spectra included in the linear spectrum into a Mel filter bank to obtain Mel spectra corresponding to the sub-linear spectra output by the Mel filter bank, wherein one sub-linear spectrum corresponds to one Mel spectrum; The mel-spectrums are concatenated to obtain a complete mel-spectrum corresponding to the coarse synthesized audio signal.
7. An audio processing device, characterized in that: The device comprises: An original audio processing module, used to obtain an original audio signal, and obtain a fundamental frequency sequence, a spectrum envelope sequence, and a non-periodic parameter sequence from the original audio signal; A baseband adjustment module, used for acquiring a baseband adjustment parameter, and adjusting the baseband sequence according to the baseband adjustment parameter to generate a target baseband sequence; A linear spectrum determination module, used to determine a linear spectrum according to the target fundamental frequency sequence, the spectrum envelope sequence and the non-periodic parameter sequence; A target audio synthesis module, used for converting the linear spectrum into a nonlinear spectrum and generating a target audio signal according to the nonlinear spectrum; The target audio synthesis module is further used to input the nonlinear spectrum into a pre-trained audio synthesis model to obtain a target audio signal output by the audio synthesis model, wherein the audio synthesis model is trained according to a plurality of training samples included in a training sample set, each training sample includes an audio signal and a nonlinear frequency corresponding to the audio signal, and the training sample set includes audio signals of different users and nonlinear spectra corresponding to each audio signal. The original audio processing module is further used to perform frame windowing processing on the original audio signal to obtain at least one second frame signal constituting the original audio signal; for the second frame signal, use a plurality of low-pass filters with cutoff frequencies to filter the second frame signal respectively to obtain a plurality of filtered signals obtained after the second frame signal is respectively passed through the plurality of low-pass filters with cutoff frequencies; determine the confidence of the cutoff frequency of each filtered signal according to the period information of each filtered signal; use the cutoff frequency corresponding to the maximum confidence among the plurality of confidences corresponding to the second frame signal as the candidate fundamental frequency, and calculate the cutoff frequency corresponding to the maximum confidence of n adjacent frames of the second frame signal. The average value of the frequency, n is a positive integer; determining the absolute value of the difference between the candidate fundamental frequency and the average value as a deviation value; if the deviation value is less than or equal to a preset deviation threshold, determining the candidate fundamental frequency as the fundamental frequency of the second sub-frame signal; if the deviation value is greater than the preset deviation threshold, using the cutoff frequency corresponding to the second largest confidence level among the multiple confidence levels corresponding to the second sub-frame signal as the candidate fundamental frequency of the second sub-frame signal, and recalculating the deviation value between the candidate fundamental frequency and the average value; if the deviation value is less than or equal to the preset deviation threshold, determining the candidate fundamental frequency as the fundamental frequency of the second sub-frame signal; splicing the fundamental frequencies corresponding to the second sub-frame signals to obtain a fundamental frequency sequence.
8. A terminal device, characterized in that: comprising a processor and a memory, wherein the processor and the memory are connected to each other; The memory is used to store a computer program, the computer program includes program instructions, and the processor is configured to call the program instructions to execute the method according to any one of claims 1-6.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, wherein the computer program includes program instructions, and when the program instructions are executed by a processor, the processor is caused to perform the method according to any one of claims 1 to 6.
