Recording synthesis method and system based on multiple fragments

Through the YOLOv3 algorithm and Darknet-53 network, adaptive synchronization of multi-shattered audio clips is achieved, and the audio jump or repetition problems caused by timestamp mismatch is solved, which improves the accuracy and quality of audio synthesis.

CN118968963APending Publication Date: 2024-11-15BEIJING BAILONG MAYUN TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411099419.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-12
Publication Date
2024-11-15

AI Technical Summary

Technical Problem

In the existing multi-shard recording synthesis technology, the mismatch between the timestamps between segments causes the combined audio to jump or repeat, and the lack of an effective synchronization mechanism.

Method used

The YOLOv3 algorithm and its Darknet-53 deep convolutional neural network are used to generate a synchronization threshold matrix through audio visualization, feature extraction, synchronization state judgment and dynamic adjustment of parameters, so as to achieve adaptive synchronization of time and rhythm of multi-shattered audio clips.

Benefits of technology

It improves the accuracy and adaptability of audio synchronization, reduces the sound quality problems caused by out-of-synchronization, significantly improves the efficiency and quality of audio synthesis, and makes the audio listening feel more natural and smooth.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118968963A_ABST
    Figure CN118968963A_ABST
Patent Text Reader

Abstract

The invention discloses a recording synthesis method and system based on multiple fragments. The invention relates to the technical field of speech synthesis. The method comprises the following steps: S1, audio visualization: converting a total audio signal of a plurality of recording fragments of a multi-fragment audio into an audio image AI, such as a spectrogram or a Mel-frequency cepstral coefficient diagram, and taking the audio image AI as the input of a YOLOv3 algorithm; s2, feature extraction: performing feature extraction on the converted audio image AI by using a YOLOv3 algorithm; the extracted features comprise an audio waveform w and a rhythm mode r; according to the method, the Darknet-53 deep convolutional neural network is used for carrying out nonlinear transformation and convolution operation on the audio features, and the scheme can extract the audio features of higher levels, so that the synchronization state of the audio clip is judged more accurately. When the multi-fragment audio is synthesized, the synchronization of each fragment in time and rhythm is more accurate, and the sound quality problem caused by asynchronization is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of speech synthesis, and in particular to a multi-slice-based recording synthesis method and system. Background Art

[0002] In the 1980s, with the development of integrated circuit technology, more complex combined electronic generators appeared, such as the series / parallel hybrid resonance peak synthesizer released by KLATT in 1980. In the 1980s and 1990s, with the introduction of the PSOLA method and the development of computer capabilities, unit selection and waveform splicing technology gradually matured.

[0003] In modern times, speech synthesis technology has been widely used in many fields, such as virtual anchors, voice assistants, audiobook production, etc. Among them, multi-slice recording synthesis technology is an important part of speech synthesis. By merging multiple recording segments, a longer and more complex audio file can be created, which is commonly used in the production of audio programs, music, audiobooks or any project that requires long-term recording.

[0004] However, if the timestamps between the segments do not match, the synthesized audio may jump or repeat. Therefore, how to synchronize the time and rhythm of multiple recording segments of multi-sliced ​​audio is a technical problem that needs to be solved at present.

[0005] To this end, the present invention proposes a recording synthesis method and system based on multiple slices. Summary of the invention

[0006] In view of this, the embodiment of the present invention hopes to provide a method and system for synthesizing recordings based on multiple slices to solve or alleviate the technical problems existing in the prior art, namely, how to synchronize multiple recording segments of multi-slice audio in time and rhythm, and at least provide a beneficial option for this; the technical solution of the present invention is implemented as follows:

[0007] First, a method for synthesizing recordings based on multiple slices:

[0008] 1. Overview:

[0009] This solution aims to solve the above technical problems. By using the YOLOv3 algorithm and its Darknet-53 deep convolutional neural network structure, richer audio waveform data, rhythm pattern data, and spectrum information data are obtained, and the features extracted are further used to judge and adjust the synchronization status of the audio clips, and the synchronization adjustment parameters of each clip are counted, and a synchronization threshold matrix is ​​generated, so that each element in the matrix corresponds to the adjustment threshold of each clip, and then the synchronization adjustment parameters are dynamically applied.

[0010] (II) Technical solution:

[0011] In order to achieve the above technical purpose, the following steps S1 to S5 need to be performed.

[0012] 2.1 Step S1, audio visualization:

[0013] The total audio signal of multiple recording segments of the multi-sliced ​​audio is converted into an audio image AI, such as a spectrogram or a Mel-frequency cepstral coefficient map, and the audio image AI is used as an input to the YOLOv3 algorithm.

[0014] 2.2 Step S2, feature extraction:

[0015] The converted audio image AI is subjected to feature extraction using the YOLOv3 algorithm; the extracted features include the audio waveform w and the rhythm pattern r; and the steps S200 to S201 are included.

[0016] 2.2.1 Step S200, apply Darknet-53 deep convolutional neural network:

[0017] The YOLOv3 algorithm has a Darknet-53 deep convolutional neural network; and in step S200, the output of the last convolutional layer of Darknet-53 is used as the feature representation. Assume that the output of this layer is a feature map, and a fixed-length feature vector is obtained by applying global average pooling on the feature map.

[0018] Specifically, let the feature map size of the last convolutional layer of Darknet-53 be H*W*C, where H is the height, W is the width, and C is the number of channels. Global average pooling will average the feature maps of each channel to obtain a feature vector of length C. This feature vector can be used as the (w i ,r i ), where w i and r i Represent the characteristic components related to the audio waveform and rhythm pattern respectively. Therefore:

[0019]

[0020] Among them, FV (wi,ri) represents the feature vector of the i-th recording segment, GAP represents the global average pooling operation, Darknet-53 represents the processing of the feature extractor, and A AIi represents the i-th audio image.

[0021] 2.2.2 Step S201, construct feature vector:

[0022] AI=[(w1,r1),(w2,r2),...,(w n ,r n )]

[0023] Among them, (w i ,r i ) is the feature vector of the i-th recording segment in the audio image AI.

[0024] 2.3 Step S3, synchronization status determination and adjustment:

[0025] For all extracted feature vectors (w i ,r i ) Apply the Darknet-53 deep convolutional neural network to determine the synchronization status of the audio clip.

[0026] According to the judgment result, the synchronization adjustment parameters (a, b) of each segment are calculated. The synchronization adjustment parameters (a, b) include the time offset a and the playback rate adjustment b. It includes the following steps S300-S301.

[0027] 2.3.1 Step S300, feature vector input and synchronization status determination:

[0028] The extracted feature vector (w i ,r i ) as the input of the Darknet-53 deep convolutional neural network.

[0029] The Darknet-53 deep convolutional neural network performs nonlinear transformation and convolution operations on the input feature vector to extract higher-level features. The Darknet-53 deep convolutional neural network then calculates and outputs the synchronization probability p:

[0030] p = σ(Darknet-53 θ ((w i ,r i )));

[0031] Among them, the synchronization probability p represents the degree of synchronization between the audio segment and the reference audio or the overall audio stream. σ is an activation function used to map the output of the network to (0,1). The sigmoid function can be used as an activation function. Darknet-53 θ Represents a Darknet-53 deep convolutional neural network with parameters θ. These parameters are learned through the training process and define the structure and behavior of the network.

[0032] (w i ,r i ) is the input feature vector, which contains the information of audio waveform and rhythm pattern.

[0033] 2.3.2 Step S301, calculate synchronization adjustment parameters:

[0034] According to the synchronization probability p, the synchronization adjustment parameters (a, b) are calculated based on another short-time neural network. Finally, the synchronization adjustment parameters (a, b) of each audio segment are obtained.

[0035] The short-term neural network is a simple fully connected network that accepts a synchronization probability p as input and outputs a time offset a and a playback rate adjustment b:

[0036] (a,b)=ShortTimeNN(p);

[0037] Among them, (a, b) are synchronization adjustment parameters, ShortTimeNN represents the processing process of the short-time neural network, and p is the synchronization probability.

[0038] 2.4 Step S4, generate synchronization threshold matrix P:

[0039] According to the synchronization adjustment parameters (a, b), a synchronization threshold matrix P is generated.

[0040] Each element in the synchronization threshold matrix P corresponds to each eigenvector (w i ,r i ), which is the adjustment threshold T of the corresponding recording segment.

[0041] 2.4.1 Step S400, calculate the adjustment threshold:

[0042] T i =α·|a i |+β·|b i |;

[0043] Among them, α and β are weight coefficients used to balance the time offset a i and playback rate adjustment b i Adjust the threshold T i The contribution of weight coefficients α and β are both values ​​between (0,1). If there is no specific requirement, 0.5 can be assigned. i ∣ and ∣b i ∣represents a respectively i and b i The absolute value of .

[0044] 2.4.2 Step S401, update the synchronization threshold matrix P:

[0045]

[0046] Among them, each T i All are based on the corresponding synchronization adjustment parameters (a i ,bi ) The adjustment threshold is calculated by the synchronization threshold matrix P. The synchronization threshold matrix P is an n*1 matrix, where n is the number of eigenvectors, that is, the number of recording segments.

[0047] 2.5 Step S5, dynamically apply synchronous adjustment parameters (a, b):

[0048] Based on the change of the elements of the synchronization threshold matrix P at each moment, the synchronization adjustment parameters (a, b) are dynamically applied to ensure the synchronization of the audio clips.

[0049] Step S5 is essentially a proportional controller:

[0050] a new =a old +k·(P current -P target )·Δa;

[0051] b new =b old +k·(P current -P target )·Δb;

[0052] Where k is the proportional coefficient, which determines the influence of the change of the synchronization threshold matrix P on the synchronization adjustment parameters (a, b); a new and b new is the updated synchronization adjustment parameter. old and b old is the synchronization adjustment parameter before updating. current is the corresponding element of the synchronization threshold matrix P at the current moment. target is the target synchronization threshold. Δa and Δb are the adjustment steps of the synchronization adjustment parameters, which determine the magnitude of the parameter change at each update.

[0053] (III) Mechanism for solving technical problems:

[0054] The Darknet-53 deep convolutional neural network is used to perform nonlinear transformation and convolution operations on the extracted feature vectors to extract higher-level features and determine the synchronization status of the audio clip. The network outputs the synchronization probability p, which indicates the possibility of synchronization between the audio clip and the reference audio or the overall audio stream.

[0055] Based on the synchronization adjustment parameters (a, b), a synchronization threshold matrix P is generated. Each element in the matrix corresponds to the adjustment threshold T of each feature vector, i.e. the corresponding recording segment. The elements of the synchronization threshold matrix P are updated in real time according to the changes in the audio stream. This dynamic update mechanism ensures that the synchronization adjustment parameters can adapt to different synchronization requirements in the audio stream.

[0056] The proportional controller is responsible for adjusting the synchronization parameters according to the real-time changes of the synchronization threshold. It adapts to different synchronization requirements in the audio stream by continuously updating the synchronization adjustment parameters to ensure the synchronization status of the audio clips.

[0057] Combining the Darknet-53 network’s feature extraction, synchronization state judgment, dynamic update of the synchronization threshold matrix, and the adjustment of the proportional controller, this solution achieves adaptive synchronization of multiple recording segments of multi-sliced ​​audio in terms of time and rhythm. This adaptive synchronization mechanism ensures that when synthesizing recordings, each segment can maintain a consistent synchronization state, thereby improving the overall audio quality and listening experience.

[0058] Second, a multi-slice based recording synthesis system:

[0059] like Figure 2 As shown, the system includes a processor and a memory connected to the processor, wherein program instructions are stored in the memory, and when the program instructions are executed by the processor, the processor executes the recording synthesis method as described above.

[0060] Compared with the prior art, the present invention has the following beneficial effects:

[0061] 1. Improved audio synchronization accuracy: The present invention uses the Darknet-53 deep convolutional neural network to perform nonlinear transformation and convolution operations on audio features. This solution can extract higher-level audio features, thereby more accurately determining the synchronization status of audio clips. When synthesizing multi-sliced ​​audio, the synchronization of each clip in time and rhythm is more accurate, reducing the sound quality problems caused by asynchrony.

[0062] Second, the adaptability of audio processing is enhanced: The present invention realizes the adaptability to different synchronization requirements in the audio stream by dynamically updating the synchronization threshold matrix and using a proportional controller to adjust the synchronization parameters. This adaptability enables the solution to cope with various complex audio scenarios, such as different recording devices and different recording environments, thereby maintaining high audio quality and synchronization.

[0063] 3. Improved audio synthesis efficiency and quality: The present invention significantly improves the efficiency of audio synthesis by automatically calculating synchronization adjustment parameters and dynamically applying these parameters. At the same time, due to the improvement of synchronization accuracy, the quality of the synthesized audio is also significantly improved, making the audio sound more natural and smooth.

[0064] Fourth, it provides more possibilities for audio processing: The multi-slice audio synchronization technology of the present invention provides more possibilities for audio processing and synthesis. For example, it can be used in multiple fields such as audio editing, audio repair, music production, etc., bringing more efficient and more accurate audio processing technology to these fields. BRIEF DESCRIPTION OF THE DRAWINGS

[0065] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or technical descriptions 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 paying creative work.

[0066] Figure 1 It is a schematic diagram of the method flow of the present invention;

[0067] Figure 2 It is a schematic diagram of the system composition of the present invention;

[0068] Figure 3 Schematic diagram of nonlinear transformation and convolution operation during prediction by the YOLOv3 algorithm of the present invention;

[0069] Figure 4 A schematic diagram of a Darknet-53 deep convolutional neural network structure processing residual unit of the present invention;

[0070] Figure 5 It is a schematic diagram of the Darknet-53 deep convolutional neural network structure of the present invention; its structure is convolution + (downsampled convolution + 1 residual unit) + (downsampled convolution + 2 residual units) + (downsampled convolution + 8 residual units) + (downsampled convolution + 8 residual units) + (downsampled convolution + 4* residual units). DETAILED DESCRIPTION

[0071] In order to make the above-mentioned purposes, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are described in detail below in conjunction with the accompanying drawings. In the following description, many specific details are set forth to facilitate a full understanding of the present invention. However, the present invention can be implemented in many other ways different from those described herein, and those skilled in the art can make similar improvements without violating the connotation of the present invention. Therefore, the present invention is not limited to the specific embodiments disclosed below;

[0072] It should be noted that the various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments, and the same or similar parts between the various embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part description.

[0073] Embodiment 1: Figure 1 As shown, this embodiment provides a multi-slice-based recording synthesis method, which includes the following steps S1 to S5.

[0074] In this embodiment, regarding step S1, audio visualization:

[0075] S100, audio signal preprocessing: First, extract the total audio signal from multiple recording segments of the multi-sliced ​​audio. These audio signals are recordings from different sources and different time periods, and need to be preprocessed, such as denoising, normalization, etc., to ensure the accuracy of subsequent conversion.

[0076] S101, audio to image conversion: Next, the preprocessed audio signal is converted into an audio image AI. This is usually achieved by calculating the spectrum or feature representation of the audio signal.

[0077] Exemplarily, a spectrogram or a Mel-Frequency Cepstral Coefficients (MFCC) is used as an audio image. These images show the distribution of the audio signal in frequency and time, so that the characteristics of the audio signal can be visualized.

[0078] S102, YOLOv3 algorithm input: The generated audio image AI is used as the input of the YOLOv3 algorithm. YOLOv3 is a target detection algorithm, which is originally used for object detection in images, but is applied to the processing of audio images in this embodiment. By training the YOLOv3 model, specific patterns or features in audio images can be identified, thereby providing useful information for subsequent audio synchronization and adaptive adjustment.

[0079] In this embodiment, regarding step S2, feature extraction: the YOLOv3 algorithm is used to extract features from the converted audio image AI. This process aims to obtain features related to the audio waveform w and the rhythm pattern r, and provide a data basis for subsequent synchronization and adaptive adjustment. It includes the following steps S200-S201.

[0080] Specifically, step S200, the Darknet-53 deep convolutional neural network is applied: the output of the last convolutional layer of Darknet-53 is used as the feature representation. When the audio image AI is input into the Darknet-53 network, it goes through multiple layers of convolution, activation, and pooling operations, and finally reaches the last convolutional layer. The output of this layer is a three-dimensional feature map of size HWC, where H represents the height of the feature map, W represents the width, and C represents the number of channels. In order to obtain a fixed-length feature vector, we perform a global average pooling operation on this feature map.

[0081] Global average pooling is a method of downsampling feature maps. It averages the feature maps of each channel to obtain a feature vector of length C. This feature vector contains both the feature components w of the audio waveform w i , which also contains the characteristic component ri of the rhythm pattern r. Therefore, we can express this feature vector as (w i ,r i ).

[0082] The feature vector obtained by global average pooling has a fixed length, which is conducive to subsequent processing and analysis. At the same time, due to the powerful feature extraction capability of the Darknet-53 network, this feature vector can well reflect the key information in the audio image, providing reliable data support for subsequent synchronization and adaptive adjustment:

[0083]

[0084] Among them, FV (wi,ri) represents the feature vector of the i-th recording segment, GAP represents the global average pooling operation, Darknet-53 represents the processing of the feature extractor, and A AIi represents the i-th audio image.

[0085] Specifically, step S201, constructing a feature vector:

[0086] AI=[(w1,r1),(w2,r2),...,(w n ,r n )]

[0087] Among them, (w i ,r i ) is the feature vector of the i-th recording segment in the audio image AI.

[0088] The purpose of constructing such a feature vector set is to provide comprehensive data support for subsequent synchronization and adaptive adjustment. By analyzing and processing these feature vectors, we can accurately determine the time and rhythm differences between each recording segment, and make corresponding adjustments to achieve synchronous playback.

[0089] In this embodiment, regarding step S3, synchronization state judgment and adjustment: for all extracted feature vectors (w i ,r i ) Apply Darknet-53 deep convolutional neural network to determine the synchronization status of the audio segment. According to the determination result, calculate the synchronization adjustment parameters (a, b) of each segment. The synchronization adjustment parameters (a, b) include time offset a and playback rate adjustment b. It includes the following steps S300 to S301.

[0090] Specifically, step S300, feature vector input and synchronization state judgment: the previously extracted feature vector (w i ,r i ) as the input of the Darknet-53 deep convolutional neural network. The Darknet-53 network can extract higher-level features by performing nonlinear transformation and convolution operations on the input feature vector.

[0091] The Darknet-53 network then calculates and outputs a synchronization probability p. This probability value indicates the degree of synchronization between the current audio segment and the reference audio or the overall audio stream. In order to map this output value to the range of (0,1), we use an activation function σ, where the sigmoid function can be used. This function can obtain a synchronization probability value between 0 and 1, where 1 indicates complete synchronization and 0 indicates complete synchronization:

[0092] p = σ(Darknet-53 θ ((w i ,r i )));

[0093] Specifically, step S301, calculate synchronization adjustment parameters: after obtaining the synchronization probability p, we need to calculate the synchronization adjustment parameters (a, b) according to this probability value. Here, a short-time neural network (ShortTimeNN) is introduced to complete this task. This neural network accepts the synchronization probability p as input and outputs two adjustment parameters: time offset a and playback rate adjustment b.

[0094] (1) The time offset a is used to adjust the time position of the audio segment to achieve synchronization with other segments. If a is a positive number, it means that the current segment needs to be moved backward by the corresponding time unit; if a is a negative number, it means that it needs to be moved forward.

[0095] (2) The playback rate adjustment value b is used to adjust the playback speed of the audio clip to ensure rhythm synchronization. If b is greater than 1, it means that the playback speed needs to be increased; if b is less than 1 but greater than 0, it means that the playback speed needs to be slowed down.

[0096] Through these two adjustment parameters, we can accurately adjust the time and rhythm of each audio clip, so as to achieve synchronous playback of multiple recording clips. This adaptive adjustment mechanism not only improves the quality and coherence of audio synthesis, but also makes the entire synthesis process more flexible and controllable.

[0097] Furthermore, the Python execution program of step S3 is as follows:

[0098]

[0099]

[0100]

[0101] In the above program, torch.nn.Module is used to define the network structure. The Darknet-53 network is used to calculate the synchronization probability p. This probability is then passed as input to the short-term neural network to calculate the synchronization adjustment parameters (a, b). In a neural network, the process of data flowing from the input layer to the output layer is called forward propagation. In this process, the output of each neuron is the weighted sum of its inputs, which may then be transformed nonlinearly through an activation function. The input is the synchronization probability p, and the output of the short-term neural network is a vector containing two values ​​(a, b). Among them, a represents the time offset, which is used to adjust the time position of the audio clip; b represents the playback rate adjustment, which is used to adjust the playback speed of the audio clip. These two parameters work together on the audio clip to achieve synchronized playback with other clips.

[0102] In this embodiment, regarding step S4, generating a synchronization threshold matrix P: The main goal of step S4 is to generate an adjustment threshold T for each recording segment according to the synchronization adjustment parameters (a, b) calculated previously, and combine these thresholds into a synchronization threshold matrix P. This matrix will be used for subsequent audio segment synchronization processing.

[0103] Specifically, step S400, calculating the adjustment threshold: calculating the adjustment threshold T of each recording segment according to the synchronous adjustment parameters (a, b) i :

[0104] T i =α·|a i |+β·|b i |;

[0105] Among them, α and β are weight coefficients used to balance the time offset a i and playback rate adjustment b i Adjust the threshold T i The weight coefficients α and β are both values ​​between (0,1). If there is no specific requirement, they can be assigned a value of 0.5 to indicate that the contribution of time offset and playback rate adjustment to the threshold is equal. i ∣ and ∣b i ∣represents a respectively i and b i The absolute value is used to ensure that the threshold T is adjusted i Always positive, because both positive and negative offset or rate adjustments require a positive threshold to measure the magnitude of the adjustment.

[0106] Specifically, in step S401, the synchronization threshold matrix P is updated:

[0107]

[0108] Among them, each T i All are based on the corresponding synchronization adjustment parameters (a i ,b i ) The synchronization threshold matrix P is an n*1 matrix, where n is the number of eigenvectors, that is, the number of recording segments. This synchronization threshold matrix P plays a key role in subsequent audio processing. It can help us determine which recording segments need to be adjusted in time and rhythm, and the magnitude of the adjustment. By setting appropriate adjustment thresholds, we can ensure that the synthesized audio maintains a high degree of synchronization and coherence in time and rhythm.

[0109] In this embodiment, regarding step S5, the synchronization adjustment parameters (a, b) are dynamically applied: the core goal of step S5 is to dynamically adjust the synchronization parameters (a, b) based on the element changes of the synchronization threshold matrix P to ensure that each audio clip remains synchronized during playback. This step essentially implements the function of a proportional controller by monitoring the difference between the current synchronization threshold and the target synchronization threshold and adjusting the synchronization parameters accordingly:

[0110] a new =a old +k·(P current -P target )·Δa;

[0111] b new =b old +k·(P current -P target )·Δb;

[0112] Where k is the proportional coefficient, which determines the influence of the change of the synchronization threshold matrix P on the synchronization adjustment parameters (a, b); a new and b new is the updated synchronization adjustment parameter. old and b old is the synchronization adjustment parameter before updating. current is the corresponding element of the synchronization threshold matrix P at the current moment. target is the target synchronization threshold. Δa and Δb are the adjustment steps of the synchronization adjustment parameters, which determine the magnitude of the parameter change at each update.

[0113] The beneficial effect of this dynamic adjustment mechanism is that it can flexibly adjust the playback speed and playback position of the audio clip according to the real-time synchronization status, thereby ensuring that each audio clip remains synchronized during playback. This adaptive adjustment capability enables the solution to cope with various complex recording environments and playback conditions, and improves the quality and stability of recording synthesis.

[0114] Embodiment 2: Figures 3 to 5 As shown, this embodiment further provides a python execution program of the YOLOv3 algorithm and its Darknet-53 deep convolutional neural network architecture as described in Example 1:

[0115]

[0116]

[0117]

[0118] audio_image = audio_image.permute(0,3,1,2) #The audio image is [B,H,W,C], converted to [B,C,H,W]

[0119] features = self.model(audio_image) # extract features

[0120] return features

[0121] defjudge_sync_status(self,features):

[0122] #Here we should implement the synchronization status of the audio clip based on the extracted features

[0123] #Return synchronization status: 'synced', 'unsynced', 'leading', 'lagging'

[0124] sync_status = 'synced' # The initial status is synchronized

[0125] return sync_status

[0126] defgenerate_sync_adjustment_params(self,sync_status):

[0127] #Generate synchronization adjustment parameters based on synchronization status

[0128] #Return (a,b), where a is the time offset and b is the playback rate adjustment

[0129] a=0#Time offset initialization

[0130] b=1#Play rate adjustment amount initialization (1 means original speed)

[0131] ifsync_status == 'leading':

[0132] #If the audio is ahead, you need to slow down the playback speed or adjust the time offset backwards a=-1#means to offset backwards by one time unit

[0133] b = 0.95 # slow down the playback speed by 5%

[0134] elifsync_status=='lagging':

[0135] #If the audio is lagging, you need to speed up the playback or adjust the time offset forward a=1#means to offset forward one time unit

[0136] b=1.05#Speed ​​up the playback speed by 5%

[0137]

[0138] Combined with the comments in the above program, the principles of the above YOLOv3 algorithm and its Darknet-53 deep convolutional neural network architecture are as follows:

[0139] (I) YOLOv3 algorithm principle:

[0140] 1.1 Object Detection Framework:

[0141] YOLOv3 (You Only Look Once version 3) is a real-time target detection algorithm that can predict the target location and category in an image through a single forward propagation.

[0142] It divides the input image into S×S grids, and predicts the object centered in each grid, achieving fast and accurate target detection.

[0143] 1.2 Multi-scale prediction:

[0144] YOLOv3 introduces predictions at three different scales, allowing the model to detect objects of different sizes. This multi-scale prediction enhances the model's generalization ability and detection accuracy for objects of different sizes.

[0145] 1.3 Loss Function:

[0146] YOLOv3 improves the loss function to make it more effective in training the model and improving the accuracy of detection.

[0147] (II) Darknet-53 network principle:

[0148] 2.1 Network structure:

[0149] Darknet-53 is the core network model of YOLOv3, which consists of 53 convolutional layers for feature extraction. The network structure is divided into multiple parts, including the convolution and max-pooling layers in the front section, the residual blocks in the middle section, and the global average pooling layer and fully connected layer in the back section.

[0150] 2.2 Residual Connection:

[0151] Darknet-53 uses the concept of residual network to solve the gradient vanishing problem in deep neural networks through residual connections, improving training efficiency and model performance. The residual block allows the model to learn the difference between the input and the expected output (i.e., the residual), thereby accelerating convergence and improving accuracy.

[0152] 2.3 Feature Extraction:

[0153] By stacking multiple convolutional and residual connection layers, Darknet-53 can capture high-level features in the image, which is very beneficial for complex target detection tasks.

[0154] (III) Program operation process and principle:

[0155] 3.1 Input processing:

[0156] The program first receives an audio image as input, and the input image is resized to a fixed size to meet the input requirements of the Darknet-53 network.

[0157] 3.2 Feature Extraction:

[0158] The resized image is passed to the Darknet-53 network for feature extraction. Darknet-53 uses its deep convolutional structure and residual connections to extract key features in the image.

[0159] 3.3 Feature Application:

[0160] The extracted features are then used to determine the synchronization status of the audio clip. Based on these features, the program calculates synchronization adjustment parameters, including time offset and playback rate adjustment, to achieve synchronization and adaptive adjustment of the audio clip.

[0161] 3.4 Determine the synchronization status:

[0162] The judge_sync_status method receives features extracted from the audio image as input. Based on these features, the method uses preset logic to determine whether the audio clip is in sync, leading, or lagging. The judgment logic includes comparing the timing information of the feature vectors, the degree of match between the rhythm pattern and the expected pattern, etc. Based on the judgment result, the method returns a string representing the synchronization status.

[0163] 3.5 Generate synchronization adjustment parameters:

[0164] The generate_sync_adjustment_params method generates synchronization adjustment parameters based on the synchronization status returned by the judge_sync_status method. If the audio is ahead, you need to synchronize the audio with the reference signal by reducing the time offset (i.e., adjusting backward) or reducing the playback rate. If the audio lags, you need to synchronize it by increasing the time offset (i.e., adjusting forward) or increasing the playback rate.

[0165] The method returns two parameters: the time offset a and the playback rate adjustment b. These parameters can then be used to adjust the playback of the audio to achieve synchronization.

[0166] All the above embodiments only express the implementation methods of the relevant practical applications of the present invention, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for ordinary technicians in this field, several variations and improvements can be made without departing from the concept of the present invention, which all belong to the protection scope of the present invention. Therefore, the protection scope of the patent of the present invention shall be based on the attached claims.

[0167] For those skilled in the art, it can be further appreciated 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 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 be beyond the scope of the present invention.

[0168] At the same time, those skilled in the art can understand that all or part of the processes in all the above-mentioned embodiments can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media provided in this application and used in the embodiments may include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (SSRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).

Claims

1. A method for synthesizing a multi-slice audio recording, comprising obtaining a plurality of audio recording segments of the multi-slice audio, It is characterized in that Perform the following steps on it: S1, audio visualization: convert the total audio signal of multiple recording segments of multi-sliced ​​audio into audio image AI and use it as input to the YOLOv3 algorithm; S2, feature extraction: use the YOLOv3 algorithm to extract features from the converted audio image AI; the extracted features include the audio waveform w and the rhythm pattern r; S3, for all extracted feature vectors (w i ,r i ) applying the Darknet-53 deep convolutional neural network to determine the synchronization status of the audio segment; and calculating the synchronization adjustment parameters (a, b) of each segment according to the determination result; the synchronization adjustment parameters (a, b) include a time offset a and a playback rate adjustment b; S4, generating a synchronization threshold matrix P: generated according to the synchronization adjustment parameters (a, b); each element in the synchronization threshold matrix P corresponds to each eigenvector (w i ,r i ), i.e., the adjustment threshold T of the corresponding recording segment; S5, dynamically apply synchronization adjustment parameters (a, b): based on the change of elements of the synchronization threshold matrix P at each moment, dynamically apply the synchronization adjustment parameters (a, b) to ensure the synchronization of the audio clips.

2. The recording synthesis method according to claim 1, Features: In S1, the audio image AI is a spectrogram or a Mel-frequency cepstral coefficient map.

3. The recording synthesis method according to claim 1, Features: In S2, the feature extraction is implemented based on the Darknet-53 deep convolutional neural network of the YOLOv3 algorithm: The feature map size of the last convolutional layer of Darknet-53 is H*W*C, where H is the height, W is the width, and C is the number of channels; global average pooling will average the feature maps of each channel to obtain a feature vector of length C (w i ,r i ): Among them, FV (wi,ri) represents the feature vector of the i-th recording segment, GAP represents the global average pooling operation, Darknet-53 represents the processing of the feature extractor, and A AIi represents the i-th audio image; w i and r i Represent the characteristic components of audio waveform and rhythm pattern respectively.

4. The recording synthesis method according to claim 3, Features: In S2, the feature vector is also constructed: AI =[(w 1 ,r 1 ),(w 2 ,r 2 ),...,(w n ,r n )] Among them, (w i ,r i ) is the feature vector of the i-th recording segment in the audio image AI.

5. The recording synthesis method according to claim 1, 3 or 4, Features: In the S3, the method of the application is as follows: The Darknet-53 deep convolutional neural network performs nonlinear transformation and convolution operations on the input feature vector to extract higher-level features. The Darknet-53 deep convolutional neural network then calculates and outputs the synchronization probability p: p=σ(Darknet-53 θ ((In i ,r i ))); Among them, the synchronization probability p represents the degree of synchronization between the audio clip and the reference audio or the overall audio stream; σ is an activation function; Darknet-53 θ represents the Darknet-53 deep convolutional neural network with parameter θ; (w i ,r i ) is the input feature vector.

6. The recording synthesis method according to claim 5, Features: In S3, the calculation method is as follows: According to the synchronization probability p, the synchronization adjustment parameters (a, b) are calculated based on another short-time neural network, and finally the synchronization adjustment parameters (a, b) of each audio segment are obtained.

7. The recording synthesis method according to claim 6, Features: The short-time neural network is a fully connected network that receives the synchronization probability p as input and outputs the time offset a and the playback rate adjustment b: (a,b)=SjortTimeNN(p); Among them, (a, b) are synchronization adjustment parameters, and ShortTimeNN represents the processing process of the short-time neural network.

8. The recording synthesis method according to claim 1, 3 or 4, Features: In S4, the generating method is: T i =α·|a i |+β·|b i |; Among them, α and β are weight coefficients; |a i ∣ and ∣b i ∣ represents the a corresponding to the i-th a and b respectively i and b i The absolute value of each T i All are based on the corresponding synchronization adjustment parameters (a i ,b i ) calculated; the synchronization threshold matrix P is an n*1 matrix, where n is the number of eigenvectors, that is, the number of recording segments.

9. The recording synthesis method according to claim 8, Features: In said S5, said dynamics is realized based on a proportional controller.

10. A recording synthesis system based on multi-slice, Features: The system includes a processor and a memory connected to the processor, wherein program instructions are stored in the memory, and when the program instructions are executed by the processor, the processor executes the recording synthesis method as described in any one of claims 1-9.