Audio synthesis method and device, electronic equipment and storage medium
By determining and aligning the overlapping characteristics of the adjacent two frames in the audio processing, the noise and poor sound quality problems during audio splicing at low overlap rate are solved, and higher quality audio synthesis is achieved.
Patent Information
- Application Number
- CN202311360125.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-10-19
- Publication Date
- 2025-04-22
AI Technical Summary
In audio processing, when the overlap rate is low, the spliced audio is prone to problems such as noise and poor sound quality.
Locally synthesized audio is generated by determining overlapping features in adjacent two frames of audio features and aligning features according to preset audio lengths to reduce phase deviation and noise.
It effectively reduces the noise and noise of local synthetic audio in overlapping areas, and improves the sound quality and accuracy of audio content.
Smart Images

Figure CN119864005A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the technical field of audio signal processing, and in particular to an audio synthesis method, device, electronic device and storage medium. Background Art
[0002] For audio data, in order to improve audio processing efficiency or adapt to the needs of audio processing algorithms, the entire audio segment will be divided into multiple audio segments with a certain overlap rate. After completing the processing of each audio segment, the processed audio segments are spliced into the entire audio based on the overlapping parts. However, when the overlap rate is low, the spliced audio is prone to problems such as noise and poor sound quality. Summary of the invention
[0003] In order to solve the above technical problems, the embodiments of the present disclosure provide an audio synthesis method, device, electronic device and storage medium.
[0004] In a first aspect, an embodiment of the present disclosure provides an audio synthesis method, the method comprising:
[0005] Determine a first overlapping feature of a previous frame of two adjacent frames of audio features, and determine a second overlapping feature of a subsequent frame of the two adjacent frames of audio features; wherein the overlapping feature is an audio feature of an overlapping area between the two adjacent frames of audio features;
[0006] According to a preset audio length, determining a first local feature from the first overlapping features, and determining a second local feature from the second overlapping features; wherein the first local feature and the second local feature satisfy an audio feature alignment condition;
[0007] Based on the first local feature and the second local feature, the first overlapping feature and the second overlapping feature are synthesized to generate local synthesized audio of the overlapping area.
[0008] In a second aspect, an embodiment of the present disclosure further provides an audio synthesis device, the device comprising:
[0009] An overlapping feature determination module, used to determine a first overlapping feature of a previous frame of two adjacent frames of audio features, and to determine a second overlapping feature of a subsequent frame of the two adjacent frames of audio features; wherein the overlapping feature is an audio feature of an overlapping area between the two adjacent frames of audio features;
[0010] A local feature determination module, configured to determine a first local feature from the first overlapping features and determine a second local feature from the second overlapping features according to a preset audio length; wherein the first local feature and the second local feature satisfy an audio feature alignment condition;
[0011] An audio synthesis module is used to synthesize the first overlapping feature and the second overlapping feature based on the first local feature and the second local feature to generate local synthesized audio of the overlapping area.
[0012] In a third aspect, an embodiment of the present disclosure further provides an electronic device, the electronic device comprising:
[0013] processor;
[0014] A memory for storing executable instructions;
[0015] The processor is used to read executable instructions from the memory and execute the executable instructions to implement the audio synthesis method described in any embodiment of the present disclosure.
[0016] In a fourth aspect, an embodiment of the present disclosure further provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the processor implements the audio synthesis method described in any embodiment of the present disclosure.
[0017] In a fifth aspect, the embodiments of the present disclosure further provide a computer program product, which is used to execute the audio synthesis method described in any embodiment of the present disclosure.
[0018] The audio synthesis method, device, electronic device and storage medium of the embodiments of the present disclosure can determine the overlapping first overlapping features from the audio features of the previous frame of audio features in the front time dimension of the two adjacent frames of audio features, and determine the overlapping second overlapping features from the audio features of the latter frame of audio features in the rear time dimension of the two adjacent frames of audio features; then perform feature alignment detection on the first overlapping features and the second overlapping features according to the preset audio length to obtain the first local features of the first overlapping features with aligned audio features, and the second local features of the second overlapping features with aligned audio features; then, based on the first local features and the second local features, perform synthesis processing on the first overlapping features and the second overlapping features to generate local synthesized audio in the overlapping area; so that the audio signal waveforms between the first local features and the second local features determined from the overlapping parts of the audio features of the two adjacent frames overlap as much as possible, greatly reducing the phase deviation between the first local features and the second local features; then, the first overlapping features and the second overlapping features are synthesized with reference to the actually overlapping first local features and the second local features, so as to reduce the hum and noise of the local synthesized audio in the overlapping area and improve the sound quality and accuracy of the audio content of the local synthesized audio in the overlapping area. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] The above and other features, advantages and aspects of the embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the accompanying drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and that components and elements are not necessarily drawn to scale.
[0020] Figure 1 A flowchart of an audio synthesis method provided by an embodiment of the present disclosure;
[0021] Figure 2 A schematic diagram of the principle of audio framing and synthesis provided by an embodiment of the present disclosure;
[0022] Figure 3 A schematic diagram of comparing the waveforms of an audio signal before and after audio synthesis processing provided by an embodiment of the present disclosure;
[0023] Figure 4 A flowchart of another audio synthesis method provided by an embodiment of the present disclosure;
[0024] Figure 5 A schematic diagram of the structure of an audio synthesis device provided by an embodiment of the present disclosure;
[0025] Figure 6 A schematic diagram of the structure of an electronic device provided in an embodiment of the present disclosure. DETAILED DESCRIPTION
[0026] Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as being limited to the embodiments described herein, which are instead provided for a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are only for exemplary purposes and are not intended to limit the scope of protection of the present disclosure.
[0027] It should be understood that the various steps described in the method embodiments of the present disclosure may be performed in different orders and / or in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present disclosure is not limited in this respect.
[0028] The term "including" and its variations used herein are open inclusions, i.e., "including but not limited to". The term "based on" means "based at least in part on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". The relevant definitions of other terms will be given in the following description.
[0029] It should be noted that the concepts such as "first" and "second" mentioned in the present disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.
[0030] It should be noted that the modifications of "one" and "plurality" mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, it should be understood as "one or more".
[0031] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.
[0032] With the development of technology, technologies that use machine learning models (such as neural network models, deep learning models, etc.) to implement audio signal processing have emerged in the field of audio signal processing. For example, a vocoder model based on a neural network can be used to process text or text-processed features (such as phonemes, phoneme duration, basic frequency contours for phonemes, and the probability of whether a phoneme is pronounced, etc.) in a text-to-speech scenario to output audio.
[0033] In the related art, the vocoder model accepts the processed features corresponding to the entire audio segment as input and returns the entire synthesized audio at one time. In order to reduce the waiting time of the first frame of audio or to improve resource utilization through parallel computing, the entire audio segment can be divided into audio segments with overlapping areas for model processing respectively. After the model processing is completed, the processing results of each audio segment are spliced together according to the overlapping parts to obtain the synthesized audio. If the overlapping area between the audio segments is large enough, the final synthesized audio is the same as the audio obtained by the entire segment processing. However, if the overlapping area is small, the boundary position of each audio segment will not receive sufficient contextual information input, resulting in a phase deviation between the audio signals of two adjacent frames in the overlapping area, and ultimately introducing noise in the synthesized audio, resulting in poor accuracy and poor sound quality of the audio content of the synthesized audio.
[0034] Based on the above situation, an embodiment of the present disclosure provides an audio synthesis solution to determine feature-aligned audio features from the overlapping parts of the audio features of two adjacent frames, and synthesize the audio features of the overlapping parts based on the feature-aligned audio features, thereby reducing the phase deviation in the audio synthesis process, thereby reducing the probability of introducing noise and improving the content accuracy and sound quality of the synthesized audio.
[0035] The audio synthesis method provided in the embodiments of the present disclosure can be applied to scenarios involving audio synthesis processing, such as text-to-speech scenarios or audio encoding and decoding scenarios. The method can be performed by an audio synthesis device, which can be implemented by software and / or hardware, and the device can be integrated in an electronic device with certain computing capabilities. The electronic device can include but is not limited to a smart phone, a personal digital assistant (PDA), a tablet PC (Tablet Personal Computer, Tablet PC), a laptop computer, a desktop computer, a server, etc.
[0036] Figure 1 FIG. 1 is a flow chart of an audio synthesis method provided by an embodiment of the present disclosure. Figure 1 As shown, the audio synthesis method may include the following steps:
[0037] S110: Determine a first overlapping feature of a previous frame among two adjacent frames of audio features, and determine a second overlapping feature of a subsequent frame among two adjacent frames of audio features.
[0038] Among them, the audio features of two adjacent frames refer to the audio features of two frames that are adjacent to each other in the time dimension. The previous frame and the next frame refer to the previous frame in the time dimension and the next frame in the time dimension respectively. The first overlapping feature and the second overlapping feature are the overlapping features in the audio features of the previous frame and the overlapping features in the audio features of the next frame respectively. The overlapping feature is the audio feature corresponding to the overlapping area between the audio features of two adjacent frames. The audio features here can be audio features that have been processed in the early stage and need to be synthesized, for example, they can be audio features output by a vocoder model.
[0039] Specifically, in the related art, the complete initial audio features to be processed are processed by dividing the frames. Figure 2 As shown, the entire audio initial feature Z is segmented according to the pre-set number of frames n and overlap rate (such as o frames) to obtain n-frame initial features, such as the k-th frame initial features, the (k+1)-th frame initial features, and the (k+2)-th frame initial features. In each frame initial feature, there are independent feature regions (referred to as independent regions) that do not overlap with the initial features of adjacent frames, and there are also overlapping regions that overlap with adjacent frames. These independent regions and overlapping regions remain unchanged during the audio processing process. For example, Figure 2 There is an overlapping area 201 filled with white and aligned with a dotted straight line and an independent area filled with gray between the k-th frame audio feature and the (k+1)-th frame audio feature.
[0040] The initial features of each frame can be used to perform certain audio processing. For example, they can be input into the vocoder model for model calculation to obtain the audio features of each frame. There are still independent areas and overlapping areas in the audio features of each frame. However, audio framing will cut off the continuity of the initial features, resulting in a lack of some contextual information in the overlapping areas when performing audio processing on the initial features of each frame. This causes some deviations between the audio features after audio processing. These deviations are reflected in the audio signal, that is, there is a phase deviation between the overlapping features of two adjacent frames in the overlapping area. Figure 3 As shown in (a), the dark curve and the light curve represent the audio signals of the overlapping features in the overlapping area of two adjacent frames. Since the initial features of the overlapping area are the same, the waveforms of the audio signals of the overlapping features of the two adjacent frames are similar. However, due to the lack of contextual information caused by framing, there will be a certain phase deviation between the waveforms of the audio signals of the two overlapping features, rather than overlap.
[0041] In view of the above situation, in the embodiment of the present disclosure, the overlapping features of any two adjacent frames can be processed to reduce the above phase deviation as much as possible. Therefore, for the audio features of two adjacent frames to be processed, the electronic device can extract the overlapping features of the two adjacent audio features according to the overlapping area between the two adjacent audio features to obtain the first overlapping feature and the second overlapping feature.
[0042] See also Figure 2 Assuming that the two adjacent audio features to be processed are the k-th frame audio feature and the (k+1)-th frame audio feature, a first overlapping feature 202 corresponding to the k-th frame audio feature and a second overlapping feature 203 corresponding to the (k+1)-th frame audio feature can be obtained.
[0043] S120. According to a preset audio length, determine a first local feature from the first overlapping feature, and determine a second local feature from the second overlapping feature; the first local feature and the second local feature satisfy an audio feature alignment condition.
[0044] Among them, the preset audio length is a pre-set audio length measured in the time dimension, which is a smaller time granularity than the audio length corresponding to the overlapping area, and is used to divide the overlapping features into local features with shorter duration. The first local feature and the second local feature are local audio features (referred to as local features for short) determined in the previous frame audio feature and the next frame audio feature, respectively. The audio length corresponding to the local feature is less than the audio length corresponding to the overlapping feature. The audio feature alignment condition is a pre-set condition for determining whether two local features are aligned, which matches the detection index used for audio feature alignment detection. For example, when performing feature alignment detection using the matching degree between audio features, the audio feature alignment condition can be a threshold value of the matching degree between local features, or a maximum value of the matching degree, etc.; for another example, when performing feature alignment detection using the signal waveform similarity between audio features, the audio feature alignment condition can be a threshold value of the similarity between the signal waveforms of local features, or a maximum value of the similarity, etc.
[0045] Specifically, according to the above description, there is a phase deviation between the first overlapping features and the second overlapping features of two adjacent frames, and this phase deviation will cause noise in the directly spliced audio. Then, the two overlapping features can be processed for phase matching at a smaller granularity to screen out the first local features and the second local features whose phases are aligned (or approximately aligned) in the first overlapping features and the second overlapping features. Then, in the waveform diagram, if Figure 3 As shown in (b), the phase deviation between the dark curve and the light curve corresponding to the first local feature and the second local feature respectively is weakened to a great extent, so that an overlapping (or approximately overlapping) waveform shape can be presented.
[0046] like Figure 2 As shown, after the electronic device processes according to the preset audio length p, a first local feature 204 in the first overlapping feature 202 and a second local feature 205 in the second overlapping feature 203 in an actual overlapping state indicated by slash filling can be obtained.
[0047] S130: Based on the first local feature and the second local feature, synthesize the first overlapping feature and the second overlapping feature to generate local synthesized audio in the overlapping area.
[0048] Specifically, the position offset of the first local feature and the second local feature can reflect the phase offset between the two. Then, the synthesis process of the first overlapping feature and the second overlapping feature with reference to the actually overlapping first local feature and the second local feature can weaken the influence of the above phase offset and obtain a synthesized audio with less phase deviation in the overlapping area. The synthesized audio can be a local synthesized audio relative to the whole frame audio or the whole segment audio.
[0049] In some embodiments, considering that the more severe the lack of context information is in the overlapping region that is farther away from the independent region, the less reliable the audio features obtained by the audio processing are. In this embodiment, the overlapping features with higher reliability can be respectively intercepted from the first overlapping features and the second overlapping features for audio synthesis, while the audio features with lower reliability are discarded. In this way, S130 can be implemented as the following steps A to D.
[0050] Step A: extracting an audio feature between the first independent feature and the first local feature from the first overlapping feature as the third local feature.
[0051] The first independent feature is the non-overlapping audio feature in the audio feature of the previous frame, that is, the audio feature of the independent area in the audio feature of the previous frame.
[0052] Specifically, the closer the overlapping features are to the independent regions, the higher the reliability. Figure 2 The electronic device can intercept a portion of the audio feature that is closer to the first independent feature from the first overlapping area 202, that is, the audio feature between the first independent feature (that is, the k-th frame audio feature) and the first local feature 204, which is called the third local feature 206.
[0053] Step B: extracting an audio feature between the second local feature and the second independent feature from the second overlapping feature as the fourth local feature.
[0054] The second independent feature is the non-overlapping audio feature in the audio feature of the next frame, that is, the audio feature of the independent area in the audio feature of the next frame.
[0055] Specifically, the closer the overlapping features are to the independent regions, the higher the reliability. Figure 2 The electronic device can intercept a portion of the audio feature that is closer to the second independent feature from the second overlapping area 203, that is, the audio feature between the second independent feature (that is, the (k+1)th frame audio feature) and the second local feature 205, which is called the fourth local feature 207.
[0056] Step C: generating a fifth local feature based on the first local feature and the second local feature.
[0057] Specifically, the first local feature and the second local feature are local features where the signal waveform actually overlaps, and the two have extremely high similarity. Therefore, the audio features of the corresponding area can be determined from the two as the fifth area feature.
[0058] In one example, since the first local feature and the second local feature have high feature similarity, one of them can be selected as the fifth local feature.
[0059] In another example, since there may still be some feature differences between the first local feature and the second local feature, the two can be superimposed to obtain a comprehensive fifth local feature.
[0060] In another example, the first local feature and the second local feature can be faded in and out respectively according to the front-to-back relationship in the time dimension, and then superimposed to further improve the smoothness and fluency of the synthesized audio. That is, step C can be implemented as follows: the first local feature is processed using the first window function, and the second local feature is processed using the second window function; the two windowing processing results are superimposed to generate the fifth local feature.
[0061] Specifically, the first local feature may be windowed using a first window function to obtain a corresponding windowing result, thereby achieving a fade-in effect of the first local feature. The second local feature may be windowed using a second window function to obtain a corresponding windowing result, thereby achieving a fade-out effect of the second local feature. Afterwards, the two windowing results are superimposed to obtain a fifth local adjustment.
[0062] The functional forms of the first window function and the second window function can be designed according to the requirements of the fade-in and fade-out effects, and are not specifically limited in the embodiments of the present disclosure.
[0063] Step D: concatenate the third local feature, the fifth local feature and the fourth local feature to generate local synthetic audio.
[0064] Specifically, the third local feature 206, the fifth local feature and the fourth local feature 207 are spliced according to the time dimension to obtain the local synthetic audio corresponding to the first overlapping feature and the second overlapping feature.
[0065] In other embodiments, the first overlapping feature and the second overlapping feature may be offset aligned with reference to the position offset between the first local feature and the second local feature, and the local synthetic audio may be generated according to the aligned overlapping features. In this way, S130 may be implemented as the following steps E to G.
[0066] Step E: aligning the first overlapping feature and the second overlapping feature based on the phase offset between the first local feature and the second local feature.
[0067] Specifically, according to the phase offset between the first local feature and the second local feature, the previous frame audio feature or the next frame audio feature is moved to obtain the first overlapping feature and the aligned second overlapping feature.
[0068] Continue to see Figure 2 , the latter frame of audio features can be moved with reference to the above-mentioned phase offset or its corresponding time difference in the time dimension to obtain the aligned second overlapping features 208, and the first overlapping features are used as the aligned first overlapping features.
[0069] Step F: extracting the audio features of the overlapping parts from the aligned first overlapping features and the aligned second overlapping features respectively, and generating a modified first overlapping feature and a modified second overlapping feature.
[0070] Specifically, there is a new overlapping area between the realigned two frames of audio features, and feature extraction can be performed according to the new overlapping area to obtain a modified first overlapping feature 209 and a modified second overlapping feature 210 .
[0071] Step G: superimpose the corrected first overlapping features and the corrected second overlapping features to generate local synthesized audio.
[0072] Specifically, the modified first overlapping feature 209 and the modified second overlapping feature 210 are superimposed to obtain local synthetic audio corresponding to the first overlapping feature and the second overlapping feature.
[0073] In some embodiments, after S130, the audio synthesis method further includes: splicing non-overlapping first independent features in the audio features of the previous frame, the local synthesized audio, and non-overlapping second independent features in the audio features of the next frame to generate target synthesized audio corresponding to the audio features of two adjacent frames.
[0074] Specifically, for the audio features of two adjacent frames, after obtaining the local synthetic audio corresponding to the overlapping area, the first independent feature (the audio feature of the kth frame) and the second independent feature (the audio feature of the (k+1)th frame) can be spliced with the local synthetic audio to obtain the synthetic audio corresponding to the audio features of the two adjacent frames (i.e., the target synthetic audio).
[0075] It should be noted that the electronic device can perform the audio synthesis processing of the embodiment of the present disclosure on any two adjacent frames of audio features among the n frames of audio features to obtain the target synthesized audio corresponding to the two adjacent frames of audio. If each two adjacent frames of audio features are processed sequentially according to the time dimension, the entire synthesized audio W corresponding to the initial feature Z of the entire audio segment can be obtained.
[0076] The audio synthesis method provided by the above-mentioned embodiments of the present disclosure can determine the overlapping first overlapping features from the previous frame audio features of the adjacent two frames of audio features that are closer in time dimension, and determine the overlapping second overlapping features from the subsequent frame audio features of the adjacent two frames of audio features that are closer in time dimension; then, according to the preset audio length, feature alignment detection is performed on the first overlapping features and the second overlapping features to obtain the first local features of the first overlapping features with aligned audio features, and the second local features of the second overlapping features with aligned audio features; then, based on the first local features and the second local features, the first overlapping features and the second overlapping features are synthesized to generate local synthesized audio in the overlapping area; so that the audio signal waveforms between the first local features and the second local features determined from the overlapping parts of the adjacent two frames of audio features overlap as much as possible, greatly reducing the phase deviation between the first local features and the second local features; then, the first overlapping features and the second overlapping features are synthesized with reference to the actually overlapping first local features and the second local features, so as to reduce the hum and noise of the local synthesized audio in the overlapping area and improve the sound quality and accuracy of the audio content of the local synthesized audio in the overlapping area.
[0077] In some embodiments, S120 can be implemented as follows: according to a preset audio length and a preset step size, each local feature segment in the first overlapping feature and the second overlapping feature is traversed, and the matching degree between the traversed local feature segment in the first overlapping feature and the traversed local feature segment in the second overlapping feature is determined; the local feature segment in the first overlapping feature and the local feature segment in the second overlapping feature corresponding to the largest matching degree are respectively determined as the first local feature and the second local feature.
[0078] The preset step size is a pre-set moving step size for determining local features.
[0079] Specifically, in order to more accurately determine the first local feature and the second local feature, the electronic device can determine multiple local feature segments from the first overlapping feature and the second overlapping feature according to the preset audio length and the preset step size, and then traverse these local feature segments to calculate the matching degree between any local feature segment in the first overlapping feature and any local feature segment in the second overlapping feature. The matching degree can be a waveform matching calculation, or it can be a calculation of the similarity or correlation between audio features. Then, the local feature segment in the first overlapping feature and the local feature segment in the second overlapping feature corresponding to the maximum value in each matching degree are respectively determined as the first local feature and the second local feature. This ensures that the first local feature and the second local feature can always be obtained, and ensures that the phase deviation between the first local feature and the second local feature is minimized.
[0080] Figure 4A flowchart of another audio synthesis method provided by an embodiment of the present disclosure. Based on the above embodiments, this embodiment further refines "traversing each local feature segment in the first overlapping feature and the second overlapping feature according to a preset audio length and a preset step length, and determining the matching degree between the local feature segment in the traversed first overlapping feature and the local feature segment in the traversed second overlapping feature". The explanations of the terms / steps that are the same or similar to those in the above embodiments are not repeated here. Figure 4 , the audio synthesis method provided in this embodiment includes:
[0081] S401: Determine a first overlapping feature of a previous frame of audio features of two adjacent frames, and determine a second overlapping feature of a subsequent frame of audio features of two adjacent frames.
[0082] S402: According to a preset audio length, determine the first local feature segment in the first overlapping feature as the first current feature segment, and determine the first local feature segment in the second overlapping feature as the second current feature segment.
[0083] Specifically, according to the preset audio length p and the starting position 0 of the first overlapping feature and the starting position 0 of the second overlapping feature, the first local feature segment Sx[0+p] in the first overlapping feature is determined to be the first current feature segment, and the first local feature segment Sy[0+p] in the second overlapping feature is determined to be the second current feature segment.
[0084] S403: Determine a correlation coefficient between the first current feature segment and the second current feature segment as a matching degree.
[0085] Specifically, the correlation coefficient between the first current feature segment Sx[i:i+p] and the second current feature segment Sy[j:j+p] is calculated as the matching degree. The correlation coefficient here can be, for example, a Pearson correlation coefficient, a Sapirman correlation coefficient, etc., which is not limited in the embodiment of the present disclosure. The value changes of i and j depend on the corresponding first step length and second step length, respectively.
[0086] S404: Based on the second current feature segment, the preset audio length and the second step length, determine the next local feature segment in the second overlapping features, and update the second current feature segment.
[0087] The second step length is a preset moving step length corresponding to the second overlapping feature.
[0088] Specifically, the first current feature segment remains unchanged, and according to the second step length, the preset audio length p is shifted back one by one in the second overlapping features to obtain a new local feature segment as a new second current feature segment.
[0089] S405 , returning to the step of determining the correlation coefficient between the first current feature segment and the second current feature segment as the matching degree, until the second overlapping features are traversed.
[0090] Specifically, the loop returns to S403 - S404 to calculate the correlation coefficient between the first current feature segment and each second current feature segment, and the correlation coefficient between the first current feature segment and each local feature segment in the second overlapping feature can be obtained.
[0091] S406: Based on the first current feature segment, the preset audio length and the first step length, determine the next local feature segment in the first overlapping feature, and update the first current feature segment.
[0092] The second step length is a preset moving step length corresponding to the second overlapping feature.
[0093] Specifically, according to the second step length, the preset audio length p is shifted back one by one in the first overlapping features to obtain a new local feature segment as a new first current feature segment.
[0094] S407 , returning to the step of determining the correlation coefficient between the first current feature segment and the second current feature segment as the matching degree, until the first overlapping features are traversed.
[0095] Specifically, looping back to S403 - S406 to calculate the correlation coefficient between each first current feature segment and each second current feature segment, the correlation coefficient between each local feature segment in the first overlapping feature and each local feature segment in the second overlapping feature can be obtained.
[0096] S408 . Determine the local feature segment in the first overlapping feature and the local feature segment in the second overlapping feature corresponding to the largest correlation coefficient as the first local feature and the second local feature, respectively.
[0097] S409: Based on the first local feature and the second local feature, synthesize the first overlapping feature and the second overlapping feature to generate local synthesized audio in the overlapping area.
[0098] The following is an embodiment of an audio synthesis device provided by an embodiment of the present invention. The device and the audio synthesis methods of the above embodiments belong to the same inventive concept. For details not described in detail in the embodiment of the audio synthesis device, reference can be made to the embodiment of the above audio synthesis method.
[0099] Figure 5 FIG. 2 shows a schematic diagram of the structure of an audio synthesis device provided by an embodiment of the present disclosure. Figure 5 As shown, the audio synthesis device 500 may include:
[0100] The overlapping feature determination module 510 is used to determine the first overlapping feature of the previous frame of the audio features of two adjacent frames, and determine the second overlapping feature of the next frame of the audio features of two adjacent frames; wherein the overlapping feature is the audio feature of the overlapping area between the audio features of two adjacent frames;
[0101] A local feature determination module 520, configured to determine a first local feature from the first overlapping features and a second local feature from the second overlapping features according to a preset audio length; wherein the first local feature and the second local feature satisfy an audio feature alignment condition;
[0102] The audio synthesis module 530 is used to synthesize the first overlapping feature and the second overlapping feature based on the first local feature and the second local feature to generate local synthesized audio in the overlapping area.
[0103] The audio synthesis device provided by the embodiment of the present disclosure can determine the overlapping first overlapping features from the previous frame audio features in the time dimension of the two adjacent frames of audio features, and determine the overlapping second overlapping features from the latter frame audio features in the time dimension of the two adjacent frames of audio features; then perform feature alignment detection on the first overlapping features and the second overlapping features according to the preset audio length to obtain the first local features of the first overlapping features with aligned audio features, and the second local features of the second overlapping features with aligned audio features; then, based on the first local features and the second local features, perform synthesis processing on the first overlapping features and the second overlapping features to generate local synthesized audio in the overlapping area; so that the audio signal waveforms between the first local features and the second local features determined from the overlapping parts of the two adjacent frames of audio features overlap as much as possible, greatly reducing the phase deviation between the first local features and the second local features; then, with the actually overlapping first local features and the second local features as reference, synthesize the first overlapping features and the second overlapping features, reduce the hum and noise of the local synthesized audio in the overlapping area, and improve the sound quality and accuracy of the audio content of the local synthesized audio in the overlapping area.
[0104] In some embodiments, the local feature determination module 520 includes:
[0105] A matching degree determination submodule, used to traverse each local feature segment in the first overlapping feature and the second overlapping feature according to a preset audio length and a preset step length, and determine the matching degree between the traversed local feature segment in the first overlapping feature and the traversed local feature segment in the second overlapping feature;
[0106] The local feature determination submodule is used to determine the local feature segment in the first overlapping feature and the local feature segment in the second overlapping feature corresponding to the maximum matching degree as the first local feature and the second local feature, respectively.
[0107] Furthermore, the matching degree determination submodule is specifically used for:
[0108] According to the preset audio length, determining the first local feature segment in the first overlapping feature as the first current feature segment, and determining the first local feature segment in the second overlapping feature as the second current feature segment;
[0109] Determine a correlation coefficient between the first current feature segment and the second current feature segment as a matching degree;
[0110] Based on the second current feature segment, the preset audio length and the second step length, determine the next local feature segment in the second overlapping feature, and update the second current feature segment;
[0111] Return to the step of determining the correlation coefficient between the first current feature segment and the second current feature segment as the matching degree until the second overlapping feature is traversed;
[0112] Based on the first current feature segment, the preset audio length and the first step length, determine the next local feature segment in the first overlapping feature, and update the first current feature segment;
[0113] Return to the step of determining the correlation coefficient between the first current feature segment and the second current feature segment as the matching degree until the first overlapping feature is traversed.
[0114] In some embodiments, the audio synthesis module 530 includes:
[0115] A third local feature extraction submodule is used to extract an audio feature between the first independent feature and the first local feature from the first overlapping feature as a third local feature; wherein the first independent feature is an audio feature without overlap in the audio feature of the previous frame;
[0116] A fourth local feature extraction submodule is used to extract an audio feature between the second local feature and the second independent feature from the second overlapping feature as a fourth local feature; wherein the second independent feature is an audio feature without overlap in the audio feature of the next frame;
[0117] A fifth local feature generating submodule, configured to generate a fifth local feature based on the first local feature and the second local feature;
[0118] The local synthetic audio generation submodule is used to splice the third local feature, the fifth local feature and the fourth local feature to generate local synthetic audio.
[0119] Furthermore, the fifth local feature generation submodule is specifically used for:
[0120] Processing the first local feature using a first window function, and processing the second local feature using a second window function;
[0121] The two windowing processing results are superimposed to generate the fifth local feature.
[0122] In some other embodiments, the audio synthesis module 530 is specifically used for:
[0123] aligning the first overlapping feature and the second overlapping feature based on a phase offset between the first local feature and the second local feature;
[0124] Extracting audio features of the overlapping parts from the aligned first overlapping features and the aligned second overlapping features respectively, and generating a modified first overlapping feature and a modified second overlapping feature;
[0125] The modified first overlapping features and the modified second overlapping features are superimposed to generate local synthesized audio.
[0126] In some embodiments, the audio synthesis device 500 further includes a target synthesized audio generation module, which is used to:
[0127] After synthesizing the first overlapping feature and the second overlapping feature based on the first local feature and the second local feature to generate local synthetic audio in the overlapping area, the first independent feature without overlap in the audio feature of the previous frame, the local synthetic audio and the second independent feature without overlap in the audio feature of the next frame are spliced to generate the target synthetic audio corresponding to the audio features of two adjacent frames.
[0128] The audio synthesis device provided in the embodiment of the present invention can execute the audio synthesis method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.
[0129] It is worth noting that in the embodiment of the above-mentioned audio synthesis device, the various modules and sub-modules included are only divided according to functional logic, but are not limited to the above-mentioned division, as long as the corresponding functions can be achieved; in addition, the specific names of the functional modules / sub-modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of the present disclosure.
[0130] The present disclosure also provides an electronic device, which may include a processor and a memory, wherein the memory may be used to store executable instructions, wherein the processor may be used to read the executable instructions from the memory and execute the executable instructions to implement the audio synthesis method in the above embodiment.
[0131] Figure 6 A schematic structural diagram of an electronic device provided by an embodiment of the present disclosure is shown.
[0132] like Figure 6As shown, the electronic device 600 may include a processing device 601 (e.g., a central processing unit, a graphics processing unit, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 602 or a program loaded from a storage device 608 into a random access memory (RAM) 603. In the RAM 603, various programs and data required for the operation of the electronic device 600 are also stored. The processing device 601, the ROM 602, and the RAM 603 are connected to each other via a bus 604. An input / output interface (I / O interface) 605 is also connected to the bus 604.
[0133] Typically, the following devices may be connected to the I / O interface 605: an input device 606 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 607 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 608 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 609. The communication device 609 may allow the electronic device 600 to communicate with other devices wirelessly or by wire to exchange data.
[0134] It should be noted that Figure 6 The electronic device 600 shown is only an example and should not limit the functions and scope of use of the embodiments of the present disclosure. Figure 6 The electronic device 600 is shown with various devices, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead.
[0135] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a non-transitory computer-readable medium, and the computer program contains program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication device 609, or installed from the storage device 608, or installed from the ROM 602. When the computer program is executed by the processing device 601, the above-mentioned functions defined in the audio synthesis method of any embodiment of the present disclosure are executed.
[0136] The embodiments of the present disclosure further provide a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the processor implements the audio synthesis method in any embodiment of the present disclosure.
[0137] It should be noted that the computer-readable medium disclosed above may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in combination with an instruction execution system, device or device. In the present disclosure, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, in which a computer-readable program code is carried. This propagated data signal may take a variety of forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination of the above. The computer readable signal medium may also be any computer readable medium other than a computer readable storage medium, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer readable medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.
[0138] In some embodiments, the client and server may communicate using any currently known or future developed network protocol such as HTTP, and may be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), an internet (e.g., the Internet), and a peer-to-peer network (e.g., an ad hoc peer-to-peer network), as well as any currently known or future developed network.
[0139] The computer-readable medium may be included in the electronic device, or may exist independently without being installed in the electronic device.
[0140] The computer-readable medium carries one or more programs. When the one or more programs are executed by the electronic device, the electronic device executes the steps of the audio synthesis method described in any embodiment of the present disclosure.
[0141] In embodiments of the present disclosure, computer program code for performing the operations of the present disclosure may be written in one or more programming languages or a combination thereof, including but not limited to object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on a user's computer, partially on a user's computer, as a separate software package, partially on a user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0142] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the equipment, method and computer program product according to various embodiments of the present disclosure. In this regard, each box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flow chart, and the combination of the boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0143] The functions described above herein may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.
[0144] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0145] The above description is only a preferred embodiment of the present disclosure and an explanation of the technical principles used. Those skilled in the art should understand that the scope of disclosure involved in the present disclosure is not limited to the technical solutions formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above disclosed concept. For example, the above features are replaced with the technical features with similar functions disclosed in the present disclosure (but not limited to) by each other to form a technical solution.
[0146] In addition, although each operation is described in a specific order, this should not be understood as requiring these operations to be performed in the specific order shown or in a sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Similarly, although some specific implementation details are included in the above discussion, these should not be interpreted as limiting the scope of the present disclosure. Some features described in the context of a separate embodiment can also be implemented in a single embodiment in combination. On the contrary, the various features described in the context of a single embodiment can also be implemented in multiple embodiments individually or in any suitable sub-combination mode.
[0147] Although the subject matter has been described in language specific to structural features and / or methodological logical actions, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. On the contrary, the specific features and actions described above are merely example forms of implementing the claims.
Claims
1. An audio synthesis method, characterized in that: include: Determine a first overlapping feature of a previous frame of two adjacent frames of audio features, and determine a second overlapping feature of a subsequent frame of the two adjacent frames of audio features; wherein the overlapping feature is an audio feature of an overlapping area between the two adjacent frames of audio features; According to a preset audio length, determining a first local feature from the first overlapping features, and determining a second local feature from the second overlapping features; wherein the first local feature and the second local feature satisfy an audio feature alignment condition; Based on the first local feature and the second local feature, the first overlapping feature and the second overlapping feature are synthesized to generate local synthesized audio of the overlapping area.
2. The method according to claim 1, characterized in that The step of determining the first local feature from the first overlapping features and determining the second local feature from the second overlapping features according to the preset audio length includes: According to the preset audio length and the preset step length, traverse each local feature segment in the first overlapping feature and the second overlapping feature, and determine the matching degree between the traversed local feature segment in the first overlapping feature and the traversed local feature segment in the second overlapping feature; The local feature segment in the first overlapping feature and the local feature segment in the second overlapping feature corresponding to the maximum matching degree are respectively determined as the first local feature and the second local feature.
3. The method according to claim 2, characterized in that The traversing each local feature segment in the first overlapping feature and the second overlapping feature according to the preset audio length and the preset step length, and determining the matching degree between the local feature segment in the traversed first overlapping feature and the local feature segment in the traversed second overlapping feature, includes: According to the preset audio length, determining the first local feature segment in the first overlapping feature as the first current feature segment, and determining the first local feature segment in the second overlapping feature as the second current feature segment; determining a correlation coefficient between the first current feature segment and the second current feature segment as the matching degree; Based on the second current feature segment, the preset audio length and the second step size, determining the next local feature segment in the second overlapping features, and updating the second current feature segment; Returning to the step of determining the correlation coefficient between the first current feature segment and the second current feature segment as the matching degree until the second overlapping features are traversed; Based on the first current feature segment, the preset audio length and the first step length, determining the next local feature segment in the first overlapping features, and updating the first current feature segment; Return to the step of determining the correlation coefficient between the first current feature segment and the second current feature segment as the matching degree until the first overlapping features are traversed.
4. The method according to claim 1, characterized in that: The synthesizing the first overlapping feature and the second overlapping feature based on the first local feature and the second local feature to generate the local synthesized audio of the overlapping area includes: Extracting an audio feature between the first independent feature and the first local feature from the first overlapping features as a third local feature; wherein the first independent feature is an audio feature without overlap in the audio features of the previous frame; Extracting an audio feature between the second local feature and the second independent feature from the second overlapping feature as a fourth local feature; wherein the second independent feature is an audio feature without overlap in the audio features of the subsequent frame; generating a fifth local feature based on the first local feature and the second local feature; The third local feature, the fifth local feature and the fourth local feature are concatenated to generate the local synthetic audio.
5. The method according to claim 4, characterized in that The step of generating a fifth local feature based on the first local feature and the second local feature comprises: Processing the first local feature using a first window function, and processing the second local feature using a second window function; The two windowing processing results are superimposed to generate the fifth local feature.
6. The method according to claim 1, characterized in that The synthesizing the first overlapping feature and the second overlapping feature based on the first local feature and the second local feature to generate the local synthesized audio of the overlapping area includes: aligning the first overlapping feature and the second overlapping feature based on a phase offset between the first local feature and the second local feature; Extracting audio features of the overlapping parts from the aligned first overlapping features and the aligned second overlapping features respectively, and generating a modified first overlapping feature and a modified second overlapping feature; The modified first overlapping features and the modified second overlapping features are superimposed to generate the local synthesized audio.
7. The method according to claim 1, characterized in that After synthesizing the first overlapping feature and the second overlapping feature based on the first local feature and the second local feature to generate the local synthesized audio of the overlapping area, the method further includes: The non-overlapping first independent features in the audio features of the previous frame, the local synthetic audio, and the non-overlapping second independent features in the audio features of the next frame are spliced to generate target synthetic audio corresponding to the audio features of the two adjacent frames.
8. An audio synthesis device, characterized in that: include: An overlapping feature determination module, used to determine a first overlapping feature of a previous frame of two adjacent frames of audio features, and to determine a second overlapping feature of a subsequent frame of the two adjacent frames of audio features; wherein the overlapping feature is an audio feature of an overlapping area between the two adjacent frames of audio features; A local feature determination module, configured to determine a first local feature from the first overlapping features and determine a second local feature from the second overlapping features according to a preset audio length; wherein the first local feature and the second local feature satisfy an audio feature alignment condition; An audio synthesis module is used to synthesize the first overlapping feature and the second overlapping feature based on the first local feature and the second local feature to generate local synthesized audio of the overlapping area.
9. An electronic device, characterized in that: include: processor; A memory for storing executable instructions; The processor is used to read the executable instructions from the memory and execute the executable instructions to implement the audio synthesis method described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: The storage medium stores a computer program, and when the computer program is executed by a processor, the processor implements the audio synthesis method according to any one of claims 1 to 7.