Audio processing method and device

By determining the audio zero point during audio splicing and performing segmentation and reverse sequence processing, combined with cross-fade curve processing, the problem of unsmooth audio splicing is solved and the auditory effect of audio splicing is significantly improved.

CN118748004APending Publication Date: 2024-10-08ZHUHAI KINGSOFT ONLINE GAME TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411014840.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-26
Publication Date
2024-10-08

AI Technical Summary

Technical Problem

When splicing audio, the existing technology cannot achieve smooth splicing between audios, especially when it contains strong accents or coherent events, resulting in poor auditory effects.

Method used

By determining the audio zero point, the audio to be processed is divided into the target pre-sequence audio and the initial post-sequence audio, and the post-sequence audio is processed in reverse order in the audio sequence dimension, and then the pre-sequence audio and post-sequence audio are spliced, and the cross-fade curve is used for transition Processing for more natural audio splicing.

Benefits of technology

It improves the smoothness and listening experience of audio splicing, making the spliced ​​audio playback more natural and enhancing the user's listening experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118748004A_ABST
    Figure CN118748004A_ABST
Patent Text Reader

Abstract

The invention provides an audio processing method and device, and the method comprises the steps: determining the audio information of a to-be-processed audio, and determining an audio zero point in the to-be-processed audio based on the audio information; segmenting the audio to be processed into a target preorder audio and an initial postorder audio according to the audio zero point; and processing the initial post-order audio into a target post-order audio in an inverted order in an audio sequence dimension, and splicing the target pre-order audio and the target post-order audio into a target audio. The initial post-order audio is spliced with the target pre-order audio after being subjected to inverted-order processing, so that splicing of the target pre-order audio and the target post-order audio is smoother, the auditory effect is more natural when the target audio obtained through splicing is played, and the auditory experience of a user is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to an audio processing method and device. Background Art

[0002] With the development of Internet technology, in the field of audio processing, audio splicing is usually performed to extend the duration of audio. However, since the properties of audio, such as timbre, pitch and loudness, are not constant during the playback of an audio, this increases the difficulty of audio splicing.

[0003] In the prior art, after two audio segments are spliced, a crossfade process is usually performed on the audio splicing portion to achieve a transition at the audio splicing portion, so that the spliced ​​audio sounds smoother when played. However, due to the limited ability of the crossfade process, when the audio splicing portion contains a strong accent or a transient event, the smooth splicing between the audios cannot be achieved, resulting in poor auditory effects when the spliced ​​audio is played. Therefore, a more effective audio processing method is urgently needed to solve the above problem. Summary of the invention

[0004] In view of this, the embodiment of the present application provides an audio processing method to solve the technical defects existing in the prior art. The embodiment of the present application also provides an audio processing device, a computing device, a computer-readable storage medium, and a computer program product.

[0005] According to a first aspect of an embodiment of the present application, there is provided an audio processing method, comprising:

[0006] Determining audio information of the audio to be processed, and determining an audio zero point in the audio to be processed based on the audio information;

[0007] Splitting the to-be-processed audio into a target pre-order audio and an initial post-order audio according to the audio zero point;

[0008] In the audio sequence dimension, the initial subsequent audio is reversely processed into a target subsequent audio, and the target preceding audio and the target subsequent audio are spliced ​​into the target audio.

[0009] Optionally, determining an audio zero point in the audio to be processed based on the audio information includes:

[0010] Dividing the audio to be processed based on a window algorithm to obtain at least one window audio segment;

[0011] Determine a candidate audio zero point in each of the at least one window audio segment based on the audio information using a zero point detection algorithm;

[0012] The audio null point is determined based on at least one candidate audio null point.

[0013] Optionally, the performing window division on the audio to be processed based on a window algorithm to obtain at least one window audio segment includes:

[0014] Determine the window size information and window moving step information corresponding to the audio to be processed based on the window algorithm;

[0015] The audio to be processed is divided based on the window size information and the window moving step information to obtain at least one window audio segment.

[0016] Optionally, determining the audio zero point based on at least one candidate audio zero point comprises:

[0017] The audio zero point is determined based on at least one candidate audio zero point by using an interpolation algorithm; or the audio zero point is selected from at least one candidate audio zero point based on the audio information.

[0018] Optionally, the reverse processing of the initial subsequent audio to a target subsequent audio in the audio sequence dimension includes:

[0019] Determine an initial subsequent audio frame sequence of the initial subsequent audio in the audio sequence dimension;

[0020] The audio frames included in the initial subsequent audio frame sequence are processed in reverse order to obtain target subsequent audio.

[0021] Optionally, the step of splicing the target preceding audio and the target succeeding audio into a target audio includes:

[0022] Determine a leading head audio frame and a leading tail audio frame of the target leading audio, and a trailing head audio frame and a trailing tail audio frame of the target trailing audio;

[0023] The target audio is obtained by splicing the preceding tail audio frame and the succeeding head audio frame, and the preceding head audio frame and the succeeding tail audio frame.

[0024] Optionally, the step of splicing the preceding tail audio frame with the succeeding head audio frame, and splicing the preceding head audio frame with the succeeding tail audio frame to obtain the target audio comprises:

[0025] splicing the preceding tail audio frame and the succeeding head audio frame, and splicing the preceding head audio frame and the succeeding tail audio frame to obtain intermediate audio;

[0026] A spliced ​​audio frame is determined in the intermediate audio, and a cross-fade process is performed on the spliced ​​audio frame using a cross-fade curve to obtain the target audio.

[0027] According to a second aspect of an embodiment of the present application, there is provided an audio processing device, including:

[0028] A determination module, configured to determine audio information of the audio to be processed, and determine an audio zero point in the audio to be processed based on the audio information;

[0029] A segmentation module, configured to segment the to-be-processed audio into a target pre-order audio and an initial post-order audio according to the audio zero point;

[0030] The splicing module is configured to reversely process the initial subsequent audio in the audio sequence dimension into a target subsequent audio, and splice the target pre-order audio and the target subsequent audio into a target audio.

[0031] According to a third aspect of an embodiment of the present application, a computing device is provided, including:

[0032] Memory and processor;

[0033] The memory is used to store computer-executable instructions, and the processor implements the steps of the audio processing method when executing the computer-executable instructions.

[0034] According to a fourth aspect of an embodiment of the present application, a computer-readable storage medium is provided, which stores computer-executable instructions, and when the instructions are executed by a processor, the steps of the audio processing method are implemented.

[0035] According to a fifth aspect of the embodiments of the present application, a chip is provided, which stores a computer program, and the computer program implements the steps of the audio processing method when executed by the chip.

[0036] According to a sixth aspect of the embodiments of this specification, a computer program product is provided, including a computer program or instructions, which implement the steps of the above-mentioned audio processing method when executed by a processor.

[0037] The audio processing method provided by the present application determines the audio to be processed that needs to be split and spliced. The audio information of the audio to be processed is obtained, and the zero point detection is performed on the audio to be processed, and the audio zero point is determined in the audio to be processed based on the audio information. The audio to be processed is split into a target pre-order audio and an initial post-order audio according to the audio zero point. The precise audio zero point position can improve the accuracy and efficiency of the segmentation of the audio to be processed. In the audio sequence dimension, the initial post-order audio is reversely processed into the target post-order audio, and the target pre-order audio and the target post-order audio are spliced ​​into the target audio. By reversing the initial post-order audio and then splicing it with the target pre-order audio, the splicing of the target pre-order audio and the target post-order audio is smoother, so that the auditory effect of the target audio obtained by splicing is better and more natural when it is played, thereby improving the user's auditory experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] Figure 1 is a structural diagram of an audio processing method provided by an embodiment of the present application;

[0039] Figure 2 is a flowchart of an audio processing method provided by an embodiment of the present application;

[0040] Figure 3 is a processing flow chart of an audio processing method applied to game audio splicing provided by an embodiment of the present application;

[0041] Figure 4 is a structural schematic diagram of an audio processing device provided by an embodiment of the present application;

[0042] Figure 5 It is a structural block diagram of a computing device provided in one embodiment of the present application. DETAILED DESCRIPTION

[0043] Many specific details are described in the following description to facilitate a full understanding of the present application. However, the present application can be implemented in many other ways than those described herein, and those skilled in the art can make similar generalizations without violating the connotation of the present application, so the present application is not limited by the specific implementation disclosed below.

[0044] The terms used in one or more embodiments of the present application are only for the purpose of describing specific embodiments, and are not intended to limit one or more embodiments of the present application. The singular forms of "a", "said" and "the" used in one or more embodiments of the present application and the appended claims are also intended to include plural forms, unless the context clearly indicates other meanings. It should also be understood that the term "and / or" used in one or more embodiments of the present application refers to and includes any or all possible combinations of one or more associated listed items.

[0045] It should be understood that, although the terms first, second, etc. may be used to describe various information in one or more embodiments of the present application, such information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of one or more embodiments of the present application, the first may also be referred to as the second, and similarly, the second may also be referred to as the first.

[0046] First, the terms involved in one or more embodiments of the present invention are explained.

[0047] Zero-Crossing Detection Algorithm: A method used in signal processing, the main purpose of which is to determine the location where the signal crosses zero from positive to negative or from negative to positive. In many application scenarios, the zero-point detection algorithm can provide important information about the properties of the signal, such as frequency, periodicity, noise level, etc. This algorithm is widely used in audio signal processing, vibration analysis, electrocardiogram (ECG) signal analysis, radar signal processing and other fields.

[0048] Interpolation Algorithms: A class of mathematical methods used to estimate or predict missing data values ​​between known data points. Interpolation algorithms can be summarized as follows: given a set of discrete data points, the interpolation algorithm aims to construct a function that passes through all given data points and can be used to estimate the value of any position between the data points. There are many types of interpolation algorithms, the most common ones include: linear interpolation, polynomial interpolation, piecewise polynomial interpolation and nearest neighbor interpolation.

[0049] Crossfade: A transition technique commonly used in audio editing and mixing to smoothly blend two audio clips so that they sound like one continuous audio stream rather than two separate clips.

[0050] Crossfade Curve: Describes the pattern of volume changes during this process, which determines how two audio clips blend into each other.

[0051] Figure 1It is a structural schematic diagram of an audio processing method provided by an embodiment of the present application; audio processing can be applied to the processing of game background music, can also be applied to the processing of web page background music, and can also be applied to any scenario that needs to generate audio that can be played in a loop. When performing audio processing, determine the audio to be processed that needs to be split and spliced. Use the waveform data of the audio to be processed as audio information, and perform zero point detection on the audio to be processed. Based on the audio information, determine the audio zero point where the waveform amplitude change approaches zero in the audio to be processed. According to the audio zero point, split the audio to be processed into a target pre-order audio and an initial post-order audio. In the audio sequence dimension, reverse the initial post-order audio into the target post-order audio, and splice the target pre-order audio and the target post-order audio into a target audio that can be played in a loop.

[0052] The precise audio zero point position can improve the accuracy and efficiency of segmenting the processed audio. By processing the initial post-order audio in reverse order and then splicing it with the target pre-order audio, the splicing of the target pre-order audio and the target post-order audio is smoother, making the target audio obtained by splicing sound more natural when played, thus improving the user's auditory experience.

[0053] In the present application, an audio processing method is provided. The present application also relates to an audio processing device, a computing device, a computer-readable storage medium, and a computer program product, which are described in detail one by one in the following embodiments.

[0054] Figure 2 A flowchart of an audio processing method provided according to an embodiment of the present application is shown, which specifically includes the following steps:

[0055] Step 202: Determine audio information of the audio to be processed, and determine an audio zero point in the audio to be processed based on the audio information.

[0056] Specifically, the audio to be processed can be any audio with a fixed duration; the audio to be processed can be used in game scenes as background music for games, as background music in web pages, or as a piece of music that can be played by users. Audio information refers to the waveform data of the audio to be processed. The audio information can reflect the audio signal of the audio to be processed, and the audio signal has a trend of changing from strong to weak. The audio zero point refers to the point in time when the audio symbol changes in the waveform data corresponding to the audio to be processed, where the waveform approaches zero. The energy of the sound at the audio zero point is small, and from an auditory perspective, the sound at the audio zero point is weak.

[0057] Based on this, when performing audio processing, the audio to be processed and the audio information of the audio to be processed are determined. Based on the audio information, an audio frame with smaller sound energy can be determined in the audio to be processed as an audio zero point. This allows the audio to be segmented and spliced ​​based on the audio zero point in the future.

[0058] In practical applications, the audio to be processed can be preprocessed before the audio zero point detection is performed. This includes but is not limited to noise reduction processing, normalization and other operations, which can reduce the interference of high-frequency noise on zero point detection and improve the accuracy of subsequent audio processing. When determining the audio zero point, the first-order difference method can be introduced to calculate the change trend of the audio signal of the audio to be processed, traverse the difference array to find the sign change point, and accurately locate the key point in the audio to be processed where the waveform amplitude approaches zero or is exactly zero as the audio zero point.

[0059] Furthermore, when determining the audio zero point of the audio to be processed, considering that there may be multiple candidate audio zero points that can be used as the audio zero point in the audio to be processed, in order to accurately locate the audio zero point, the window algorithm can be used to optimize the zero point detection of the audio to be processed, and the audio zero point can be determined in the audio to be processed. The specific implementation is as follows:

[0060] The audio to be processed is divided based on a window algorithm to obtain at least one window audio segment; a candidate audio zero point is determined in each of the at least one window audio segment based on the audio information using a zero point detection algorithm; and the audio zero point is determined based on at least one candidate audio zero point.

[0061] Specifically, the window algorithm is a commonly used technique in signal processing, which is mainly used to divide a continuous signal into a series of shorter and possibly overlapping segments (windows) so as to analyze or process these segments separately. The window audio segment is the audio segment obtained by dividing the audio to be processed by the window algorithm. The candidate audio zero point is the audio zero point in the window audio segment.

[0062] Based on this, the audio to be processed is divided based on the window algorithm, and at least one window audio segment is obtained by moving the window. There may be overlapping audio segments between two adjacent window audio segments. Using the zero point detection algorithm, a candidate audio zero point is determined in at least one window audio segment based on the audio information, and the sign change point where the waveform amplitude in the window audio segment approaches zero is used as the candidate audio end in the window audio segment. The audio zero point of the audio to be processed is determined based on at least one candidate audio zero point.

[0063] For example, in the process of making background music for a web page, it is necessary to make background music for a web page that can be played in a loop. In order to make the audio connection smoother when the audio is played in a loop, the window algorithm and the zero point detection algorithm can be combined to determine the audio zero point in the audio to be processed, and the audio to be processed can be segmented at the audio zero point and the audio splicing can be performed. In the scenario of audio processing for a 30-second audio to be processed, the window algorithm can be used to divide the 30-second audio to be processed into 6 window audio segments. In each window audio segment, a candidate audio zero point whose waveform amplitude approaches zero is determined as a segmentation point for audio segmentation. The audio zero point is determined by comparing the smoothness of the audio signal and the strength of the sound of each candidate audio point.

[0064] In summary, the audio zero point is determined in the audio to be processed by using the window algorithm combined with the zero point detection algorithm, thereby improving the accuracy of the audio zero point determination.

[0065] Furthermore, considering that the window division of the processed audio using the window algorithm needs to be completed based on the determined window size and moving step length, the processed audio can be divided based on the window size information and the window moving step length information corresponding to the processed audio, and the specific implementation is as follows:

[0066] Based on the window algorithm, the window size information and the window moving step information corresponding to the audio to be processed are determined; based on the window size information and the window moving step information, the audio to be processed is divided to obtain at least one window audio segment.

[0067] Specifically, the window size information indicates the window size, which can reflect the length of time the window covers the signal; the moving step information indicates the sliding step, which can reflect the number of samples that jump each time when the window is moved on the signal. The sample can be an audio frame. By adjusting the window size and sliding step, the detection accuracy and computational efficiency can be balanced.

[0068] Based on this, the window size information and window moving step information corresponding to the audio to be processed are determined based on the window algorithm. The window size can be set to a cycle of the audio signal or a certain number of sampling points to ensure that a valid zero point can be detected in each window. The window moving step can be adjusted according to the sampling rate and characteristics of the audio signal to ensure the continuity and real-time performance of zero point detection. The audio to be processed is divided based on the window size information and the window moving step information to obtain at least one window audio segment.

[0069] In summary, the audio to be processed is divided based on the window size information and the window moving step information to obtain at least one window audio segment, thereby obtaining a sufficient number of window audio segments to ensure that a valid zero point can be detected in each window audio segment.

[0070] Furthermore, considering that the audio zero point may be located before two candidate audio zero points, or may be any candidate audio zero point, the audio zero point may be determined based on at least one candidate audio zero point by two audio zero point determination methods according to actual needs, and the specific implementation is as follows:

[0071] The audio zero point is determined based on at least one candidate audio zero point by using an interpolation algorithm; or the audio zero point is selected from at least one candidate audio zero point based on the audio information.

[0072] Specifically, the interpolation algorithm is used to determine the audio zero point between two candidate audio zero points by using linear interpolation, polynomial interpolation, piecewise polynomial interpolation, or nearest neighbor interpolation.

[0073] Based on this, when the audio zero point is determined to be between any two adjacent candidate audio zero points, an interpolation algorithm can be used to determine the audio zero point based on at least one candidate audio zero point. When the audio zero point is determined to be one of at least one candidate audio zero point, the audio zero point is selected from the at least one candidate audio zero point based on audio information.

[0074] Using the above example, the interpolation algorithm uses the known sampling point data and a specific interpolation formula such as linear interpolation, polynomial interpolation, piecewise polynomial interpolation or nearest neighbor interpolation to calculate the approximate value at the zero crossing point, and uses the approximate value as the audio zero point. The candidate audio zero point with a smaller waveform change amplitude and a weaker sound can also be determined as the audio zero point by comparing the waveform change amplitude and the sound strength of each candidate audio zero point.

[0075] In summary, the audio zero point is determined based on at least one candidate audio zero point using an interpolation algorithm, thereby improving the accuracy of zero point detection.

[0076] Step 204: dividing the audio to be processed into target pre-order audio and initial post-order audio according to the audio zero point.

[0077] Specifically, after determining the audio information of the audio to be processed as mentioned above and determining the audio zero point in the audio to be processed based on the audio information, the audio to be processed can be divided into a target preceding audio and an initial succeeding audio according to the audio zero point, wherein the target preceding audio refers to an audio segment located at the head obtained after the audio to be processed is split at the audio zero point, and correspondingly, the initial succeeding audio is an audio segment located at the tail obtained after the audio to be processed is split at the audio zero point.

[0078] Based on this, after determining the audio information of the audio to be processed as mentioned above and determining the audio zero point in the audio to be processed based on the audio information, the audio to be processed can be split at the audio zero point, and the audio to be processed can be split into the target pre-sequence audio at the head and the initial post-sequence audio at the tail.

[0079] In practical applications, an audio processing library can be used to segment the audio to be processed based on the audio zero point.

[0080] Step 206: In the audio sequence dimension, the initial subsequent audio is reversely processed into a target subsequent audio, and the target preceding audio and the target subsequent audio are spliced ​​into the target audio.

[0081] Specifically, after the audio to be processed is divided into the target pre-order audio and the initial post-order audio according to the audio zero point, the initial post-order audio can be reversely processed into the target post-order audio in the audio sequence dimension, and the target pre-order audio and the target post-order audio can be spliced ​​into the target audio, wherein the audio sequence dimension is the audio sequence frame dimension, and each audio frame in the audio sequence is arranged in the playback order of the audio to be processed. The target post-order audio is the audio obtained after the reverse processing, and the target post-order audio is the initial post-order audio after the reversal. The playback order of the initial post-order audio is opposite to the playback order of the target post-order audio. The target audio is the audio spliced ​​by the target pre-order audio and the target post-order audio, and the target pre-order audio and the target post-order audio can be spliced ​​end to end to form a target audio in a loop state. The target audio in the loop state is a closed loop structure, which can achieve uninterrupted loop playback.

[0082] Based on this, after the audio to be processed is divided into the target pre-order audio and the initial post-order audio according to the audio zero point, the initial post-order audio is reversely processed into the target post-order audio in the audio sequence dimension to obtain the reversed target post-order audio. The target pre-order audio and the target post-order audio are spliced ​​head to tail in sequence to obtain the target audio in a loop state.

[0083] Furthermore, considering that the initial subsequent audio is obtained by segmenting the audio to be processed at the audio zero point, the sound at the beginning of the audio of the initial subsequent audio is weak. The effect of a weak sound at the end of the obtained target subsequent audio can be achieved by reverse processing. The specific implementation is as follows:

[0084] An initial subsequent audio frame sequence of the initial subsequent audio is determined in the audio sequence dimension; and audio frames included in the initial subsequent audio frame sequence are reversely processed to obtain target subsequent audio.

[0085] Specifically, the initial subsequent audio frame sequence is a sequence of audio frames in the initial subsequent audio, and the initial subsequent audio frame sequence has an audio frame arrangement order. The reverse processing can be regarded as reversing the initial subsequent audio to achieve an audio effect of reverse playback.

[0086] Based on this, an initial subsequent audio frame sequence of the initial subsequent audio is determined in the audio sequence dimension, and the audio frames included in the initial subsequent audio frame sequence are reversed to complete the reversal of the initial subsequent audio and obtain the target subsequent audio.

[0087] Using the above example, in the 30-second audio to be processed, if the audio zero point is 21 seconds, the target pre-order audio of 0-21 seconds and the initial post-order audio of 22-30 seconds can be obtained. The initial post-order audio of 22-30 contains multiple continuous audio frames such as 22-30. The target post-order audio of 30-22 can be obtained by reverse processing the initial post-order audio of 22-30.

[0088] In summary, the audio frames included in the initial subsequent audio frame sequence are processed in reverse order, the initial subsequent audio is reversed, and the target subsequent audio is obtained. Thus, when the target subsequent audio and the target preceding audio are subsequently spliced, the spliced ​​target audio has a better audio playback effect, thereby improving the user's auditory experience.

[0089] Furthermore, when splicing the target preceding audio and the target succeeding audio, a target audio with a closed loop structure can be obtained by splicing the audio from beginning to end, which is specifically implemented as follows:

[0090] Determine a preceding header audio frame and a preceding tail audio frame of the target preceding audio, and a succeeding header audio frame and a succeeding tail audio frame of the target succeeding audio; splice the preceding tail audio frame and the succeeding header audio frame, and splice the preceding header audio frame and the succeeding tail audio frame to obtain the target audio.

[0091] Specifically, the pre-order header audio frame is the first audio frame of the audio segment corresponding to the target pre-order audio, and the pre-order tail audio frame is the last audio frame of the audio segment corresponding to the target pre-order audio. The post-order header audio frame is the first audio frame of the audio segment corresponding to the target post-order audio, and the post-order tail audio frame is the last audio frame of the audio segment corresponding to the target post-order audio.

[0092] Based on this, determine the pre-order header audio frame and the pre-order tail audio frame of the audio segment corresponding to the target pre-order audio, as well as the post-order header audio frame and the post-order tail audio frame of the audio segment corresponding to the target post-order audio. Splice the pre-order tail audio frame and the post-order header audio frame, and splice the pre-order header audio frame and the post-order tail audio frame to obtain a target audio with a closed loop structure. By performing the tail splicing of the target pre-order audio and the target post-order audio, a target audio that can be automatically looped is obtained. This allows the post-order tail audio frame to be naturally integrated with the pre-order header audio frame, and the sound wave form can also be naturally transitioned and integrated, so that the target audio can be seamlessly looped.

[0093] Using the above example, in the 30-second audio to be processed, after determining the target preceding audio from 0 to 21 seconds and the target following audio from 30 to 22 seconds, the target preceding audio and the target following audio can be spliced. Splice 21 with 30, and splice 22 with 0 to obtain a target audio with a closed loop structure.

[0094] In summary, by splicing the preceding tail audio frame with the succeeding head audio frame, and by splicing the preceding head audio frame with the succeeding tail audio frame, a target audio with a closed loop structure can be obtained, thereby achieving loop playback of the target audio.

[0095] Furthermore, considering that the target audio obtained after splicing the preceding tail audio frame and the succeeding head audio frame, and the preceding head audio frame and the succeeding tail audio frame may still have abrupt connection at the audio splicing point, after the splicing is completed, the splicing point can be cross-faded using a cross-fade curve, which is specifically implemented as follows:

[0096] The preceding tail audio frame and the succeeding head audio frame are spliced, and the preceding head audio frame and the succeeding tail audio frame are spliced ​​to obtain intermediate audio; a spliced ​​audio frame is determined in the intermediate audio, and a cross-fade process is performed on the spliced ​​audio frame using a cross-fade curve to obtain the target audio.

[0097] Specifically, the intermediate audio is the audio obtained by directly splicing the target preceding audio and the target succeeding audio. Crossfade is a transition technique commonly used in audio editing and mixing, which is used to smoothly mix two audio clips so that they sound like a continuous audio stream rather than two independent clips. The crossfade curve describes the pattern of volume changes in this process, which determines how the two audio clips blend with each other. The types of crossfade curves include but are not limited to linear crossfade curves, exponential crossfade curves, and sinusoidal crossfade curves. Crossfade processing is to perform transition processing on the spliced ​​audio frames.

[0098] Based on this, the preceding tail audio frame and the succeeding head audio frame are spliced, and the preceding head audio frame and the succeeding tail audio frame are spliced ​​to obtain the intermediate audio. In the intermediate audio, the spliced ​​audio frame obtained by splicing the preceding tail audio frame and the succeeding head audio frame, and the spliced ​​audio frame obtained by splicing the preceding head audio frame and the succeeding tail audio frame are determined. The spliced ​​audio frames are cross-faded using a cross-fade curve to obtain the target audio. By adjusting the parameters of the fade curve (such as the starting point, the ending point, the attenuation rate, etc.), the speed and range of the volume change can be accurately controlled to achieve the best transition effect.

[0099] Following the above example, after splicing the target preceding audio and the target following audio to obtain an intermediate audio with a closed loop structure, a crossfade curve is selected and the spliced ​​audio frames are crossfaded by setting the fade curve parameters to obtain the target audio. This achieves the transition effect of audio splicing. This can significantly improve the quality of audio loop playback and the user's listening experience.

[0100] In summary, the crossfade curve is used to crossfade the spliced ​​audio frames to obtain the target audio. The fade-in and fade-out processing is applied at the loop connection to make the audio clips gradually weaken and gradually increase when the head and tail are connected, ensuring a smooth transition and improving the seamless effect of the audio loop.

[0101] The audio processing method provided by the present application determines the audio to be processed that needs to be split and spliced. The audio information of the audio to be processed is obtained, and the zero point detection is performed on the audio to be processed, and the audio zero point is determined in the audio to be processed based on the audio information. The audio to be processed is split into a target pre-order audio and an initial post-order audio according to the audio zero point. The precise audio zero point position can improve the accuracy and efficiency of the segmentation of the audio to be processed. In the audio sequence dimension, the initial post-order audio is reversely processed into the target post-order audio, and the target pre-order audio and the target post-order audio are spliced ​​into the target audio. By reversing the initial post-order audio and then splicing it with the target pre-order audio, the splicing of the target pre-order audio and the target post-order audio is smoother, so that the auditory effect of the target audio obtained by splicing is better and more natural when it is played, thereby improving the user's auditory experience.

[0102] The following combination Figure 3 Taking the application of the audio processing method provided in this application to game audio splicing as an example, the audio processing method is further described. Figure 3 A processing flow chart of an audio processing method for game audio splicing provided by an embodiment of the present application is shown, which specifically includes the following steps:

[0103] Step 302: Determine the window size information and window moving step information corresponding to the audio to be processed based on the window algorithm, and divide the audio to be processed based on the window size information and the window moving step information to obtain at least one window audio segment.

[0104] In practical applications, any audio segment can be selected as the audio to be processed. The audio to be processed is converted into waveform data for subsequent audio processing. The window size is set to a cycle of the audio signal or a certain number of sampling points (for example, 100 sampling points, which can be the key points where the amplitude of the waveform in the audio to be processed approaches zero). The sliding step size is set to half the window size or adjusted according to actual needs (for example, 50 sampling points). The window algorithm is applied to segment the audio signal corresponding to the audio to be processed to obtain at least one window audio segment. In addition, the first-order difference method can be introduced to calculate the changing trend of the audio signal, and the difference array can be traversed to find the sign change point (i.e., the zero crossing point) to accurately locate the key points in the audio waveform where the amplitude approaches zero or is exactly zero.

[0105] Step 304: Determine a candidate audio zero point in at least one window audio segment using a zero point detection algorithm, and select an audio zero point from the at least one candidate audio zero point based on audio information.

[0106] In each window, a zero point detection algorithm is applied to find a zero crossing point that can be used as an audio zero point, i.e., a candidate audio zero point. For a zero crossing point found, if it is between two sampling points, an interpolation algorithm (such as linear interpolation) can be used to accurately locate the position of the audio zero point. Based on the known sampling point data, the approximate value at the zero crossing point can be calculated according to the interpolation formula, and this approximate value can be used as the audio zero point.

[0107] Step 306: Split the audio to be processed into target pre-order audio and initial post-order audio according to the audio zero point.

[0108] After accurately locating the audio zero point, the audio data to be processed can be cut at the audio zero point to obtain the target pre-sequence audio at the head and the initial post-sequence audio at the tail.

[0109] Step 308: Determine an initial subsequent audio frame sequence of the initial subsequent audio in the audio sequence dimension, and perform reverse processing on the audio frames included in the initial subsequent audio frame sequence to obtain the target subsequent audio.

[0110] The initial subsequent audio obtained by cutting the audio to be processed is reversed to obtain the target subsequent audio that can be played in reverse order.

[0111] Step 310: Determine a preceding header audio frame and a preceding tail audio frame of a target preceding audio, and a succeeding header audio frame and a succeeding tail audio frame of a target succeeding audio.

[0112] Step 312: splice the preceding tail audio frame and the succeeding head audio frame, and splice the preceding head audio frame and the succeeding tail audio frame to obtain intermediate audio.

[0113] The target preceding audio and the target succeeding audio are spliced ​​head to tail, that is, the head of the target preceding audio is spliced ​​with the tail of the target succeeding audio, and the tail of the target succeeding audio is spliced ​​with the head of the target preceding audio, to obtain an intermediate audio that can be played in a loop.

[0114] Step 314: determine the spliced ​​audio frame in the intermediate audio, and perform cross-fade processing on the spliced ​​audio frame using the cross-fade curve to obtain the target audio.

[0115] Apply fade curve design technology to the joint of the beginning and the end of the intermediate audio. Select the appropriate fade curve type (such as linear, exponential, sine, etc.) and adjust it according to the characteristics and needs of the intermediate audio. By setting the parameters of the fade curve (such as starting point, end point, attenuation rate, etc.), a smooth transition effect can be achieved.

[0116] In summary, by introducing window algorithms and interpolation algorithms to optimize zero-point detection, using multiple fade curves for refined cross-fade processing, and reverse splicing the cut audio, seamless connection of audio clips during loop playback is achieved. This can significantly improve the quality of audio loops and the user's listening experience. In the audio processing process, noise reduction and preprocessing technologies (such as noise reduction processing, normalization, etc.) are introduced to improve the purity of audio signals and the accuracy of subsequent processing, further improving the seamless effect of audio loops.

[0117] Corresponding to the above method embodiment, the present application also provides an audio processing device embodiment, Figure 4 FIG. 1 is a schematic diagram showing the structure of an audio processing device provided by an embodiment of the present application. Figure 4 As shown, the device comprises:

[0118] A determination module 402 is configured to determine audio information of the audio to be processed, and determine an audio zero point in the audio to be processed based on the audio information;

[0119] A segmentation module 404 is configured to segment the to-be-processed audio into a target pre-order audio and an initial post-order audio according to the audio zero point;

[0120] The splicing module 406 is configured to process the initial subsequent audio in reverse order in the audio sequence dimension into a target subsequent audio, and splice the target pre-order audio and the target subsequent audio into a target audio.

[0121] In an optional embodiment, the determining module 402 is further configured to:

[0122] Dividing the audio to be processed based on a window algorithm to obtain at least one window audio segment;

[0123] Determine a candidate audio zero point in each of the at least one window audio segment based on the audio information using a zero point detection algorithm;

[0124] The audio null point is determined based on at least one candidate audio null point.

[0125] In an optional embodiment, the determining module 402 is further configured to:

[0126] Determine the window size information and window moving step information corresponding to the audio to be processed based on the window algorithm;

[0127] The audio to be processed is divided based on the window size information and the window moving step information to obtain at least one window audio segment.

[0128] In an optional embodiment, the determining module 402 is further configured to:

[0129] Determine the audio zero point based on at least one candidate audio zero point using an interpolation algorithm; or,

[0130] The audio null point is selected from at least one candidate audio null point based on the audio information.

[0131] In an optional embodiment, the splicing module 406 is further configured to:

[0132] Determine an initial subsequent audio frame sequence of the initial subsequent audio in the audio sequence dimension;

[0133] The audio frames included in the initial subsequent audio frame sequence are processed in reverse order to obtain target subsequent audio.

[0134] In an optional embodiment, the splicing module 406 is further configured to:

[0135] Determine a leading head audio frame and a leading tail audio frame of the target leading audio, and a trailing head audio frame and a trailing tail audio frame of the target trailing audio;

[0136] The target audio is obtained by splicing the preceding tail audio frame and the succeeding head audio frame, and the preceding head audio frame and the succeeding tail audio frame.

[0137] In an optional embodiment, the splicing module 406 is further configured to:

[0138] splicing the preceding tail audio frame and the succeeding head audio frame, and splicing the preceding head audio frame and the succeeding tail audio frame to obtain intermediate audio;

[0139] A spliced ​​audio frame is determined in the intermediate audio, and a cross-fade process is performed on the spliced ​​audio frame using a cross-fade curve to obtain the target audio.

[0140] The audio processing method provided by the present application determines the audio to be processed that needs to be split and spliced. The audio information of the audio to be processed is obtained, and the zero point detection is performed on the audio to be processed, and the audio zero point is determined in the audio to be processed based on the audio information. The audio to be processed is split into a target pre-order audio and an initial post-order audio according to the audio zero point. The precise audio zero point position can improve the accuracy and efficiency of the segmentation of the audio to be processed. In the audio sequence dimension, the initial post-order audio is reversely processed into the target post-order audio, and the target pre-order audio and the target post-order audio are spliced ​​into the target audio. By reversing the initial post-order audio and then splicing it with the target pre-order audio, the splicing of the target pre-order audio and the target post-order audio is smoother, so that the auditory effect of the target audio obtained by splicing is better and more natural when it is played, thereby improving the user's auditory experience.

[0141] The above is a schematic scheme of an audio processing device of the present embodiment. It should be noted that the technical scheme of the audio processing device and the technical scheme of the audio processing method described above belong to the same concept. For details not described in detail in the technical scheme of the audio processing device, please refer to the description of the technical scheme of the audio processing method described above. In addition, each component in the device embodiment should be understood as a functional module that must be established to implement each step of the program flow or each step of the method, and each functional module is not an actual functional division or separation definition. The device claim defined by such a group of functional modules should be understood as a functional module architecture that mainly implements the solution through a computer program recorded in the specification, and should not be understood as a physical device that mainly implements the solution through hardware.

[0142] Figure 5 The block diagram of a computing device 500 provided according to an embodiment of the present application is shown. The components of the computing device 500 include but are not limited to a memory 510 and a processor 520. The processor 520 is connected to the memory 510 via a bus 530, and the database 550 is used to store data.

[0143] The computing device 500 also includes an access device 540 that enables the computing device 500 to communicate via one or more networks 560. Examples of these networks include a public switched telephone network (PSTN), a local area network (LAN), a wide area network (WAN), a personal area network (PAN), or a combination of communication networks such as the Internet. The access device 540 may include one or more of any type of network interface (e.g., a network interface card (NIC)) whether wired or wireless, such as an IEEE 802.11 wireless local area network (WLAN) wireless interface, a World Wide Interoperability for Microwave Access (Wi-MAX) interface, an Ethernet interface, a universal serial bus (USB) interface, a cellular network interface, a Bluetooth interface, a near field communication (NFC) interface, and the like.

[0144] In one embodiment of the present application, the above components of the computing device 500 and Figure 5 Other components not shown in the figure may also be connected to each other, for example, via a bus. It should be understood that Figure 5 The computing device structure block diagram shown is only for the purpose of illustration, and is not intended to limit the scope of the present application. Those skilled in the art may add or replace other components as needed.

[0145] The computing device 500 may be any type of stationary or mobile computing device, including a mobile computer or mobile computing device (e.g., a tablet computer, a personal digital assistant, a laptop computer, a notebook computer, a netbook, etc.), a mobile phone (e.g., a smart phone), a wearable computing device (e.g., a smart watch, smart glasses, etc.), or other types of mobile devices, or a stationary computing device such as a desktop computer or PC. The computing device 500 may also be a mobile or stationary server.

[0146] The processor 520 is used to execute computer executable instructions of the audio processing method.

[0147] The above is a schematic scheme of a computing device of this embodiment. It should be noted that the technical scheme of the computing device and the technical scheme of the above audio processing method belong to the same concept, and the details not described in detail in the technical scheme of the computing device can be referred to the description of the technical scheme of the above audio processing method.

[0148] An embodiment of the present application further provides a computer-readable storage medium storing computer instructions, which are used in an audio processing method when executed by a processor.

[0149] The above is a schematic scheme of a computer-readable storage medium of this embodiment. It should be noted that the technical scheme of the storage medium and the technical scheme of the above audio processing method belong to the same concept, and the details not described in detail in the technical scheme of the storage medium can be referred to the description of the technical scheme of the above audio processing method.

[0150] An embodiment of the present application further provides a chip storing a computer program, which implements the steps of the audio processing method when executed by the chip.

[0151] An embodiment of the present specification further provides a computer program product, including a computer program or instructions, which implement the steps of the above audio processing method when executed by a processor.

[0152] The above is a schematic scheme of a computer program product of this embodiment. It should be noted that the technical scheme of the computer program product and the technical scheme of the above audio processing method belong to the same concept, and the details not described in detail in the technical scheme of the computer program product can be referred to the description of the technical scheme of the above audio processing method.

[0153] The above describes specific embodiments of the present application. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the accompanying drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0154] The computer instructions include computer program codes, which may be in source code form, object code form, executable files or some intermediate forms, etc. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal and software distribution medium, etc. It should be noted that the content contained in the computer-readable medium may be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media do not include electric carrier signals and telecommunication signals.

[0155] It should be noted that, for the above-mentioned method embodiments, for the sake of simplicity of description, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the described action sequence, because according to the present application, certain steps can be performed in other sequences or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present application.

[0156] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0157] The preferred embodiments of the present application disclosed above are only used to help explain the present application. The optional embodiments do not describe all the details in detail, nor do they limit the invention to the specific implementation methods described. Obviously, many modifications and changes can be made according to the content of the present application. The present application selects and specifically describes these embodiments in order to better explain the principles and practical applications of the present application, so that those skilled in the art can understand and use the present application well. The present application is only limited by the claims and their full scope and equivalents.

Claims

1. An audio processing method, characterized in that: include: Determining audio information of the audio to be processed, and determining an audio zero point in the audio to be processed based on the audio information; Splitting the to-be-processed audio into a target pre-order audio and an initial post-order audio according to the audio zero point; In the audio sequence dimension, the initial subsequent audio is reversely processed into a target subsequent audio, and the target preceding audio and the target subsequent audio are spliced ​​into the target audio.

2. The audio processing method according to claim 1, characterized in that: The step of determining an audio zero point in the audio to be processed based on the audio information comprises: Dividing the audio to be processed based on a window algorithm to obtain at least one window audio segment; Determine a candidate audio zero point in each of the at least one window audio segment based on the audio information using a zero point detection algorithm; The audio null point is determined based on at least one candidate audio null point.

3. The audio processing method according to claim 2, characterized in that: The step of dividing the audio to be processed into windows based on a window algorithm to obtain at least one window audio segment includes: Determine the window size information and window moving step information corresponding to the audio to be processed based on the window algorithm; The audio to be processed is divided based on the window size information and the window moving step information to obtain at least one window audio segment.

4. The audio processing method according to claim 2, characterized in that: The determining the audio zero point based on at least one candidate audio zero point comprises: The audio zero point is determined based on at least one candidate audio zero point by using an interpolation algorithm; or the audio zero point is selected from at least one candidate audio zero point based on the audio information.

5. The audio processing method according to claim 1, characterized in that: The reverse processing of the initial subsequent audio into target subsequent audio in the audio sequence dimension includes: Determine an initial subsequent audio frame sequence of the initial subsequent audio in the audio sequence dimension; The audio frames included in the initial subsequent audio frame sequence are processed in reverse order to obtain target subsequent audio.

6. The audio processing method according to claim 1, characterized in that: The step of splicing the target preceding audio and the target succeeding audio into the target audio includes: Determine a leading head audio frame and a leading tail audio frame of the target leading audio, and a trailing head audio frame and a trailing tail audio frame of the target trailing audio; The target audio is obtained by splicing the preceding tail audio frame and the succeeding head audio frame, and the preceding head audio frame and the succeeding tail audio frame.

7. The audio processing method according to claim 6, characterized in that: The step of splicing the preceding tail audio frame with the succeeding head audio frame, and splicing the preceding head audio frame with the succeeding tail audio frame to obtain the target audio includes: splicing the preceding tail audio frame and the succeeding head audio frame, and splicing the preceding head audio frame and the succeeding tail audio frame to obtain intermediate audio; A spliced ​​audio frame is determined in the intermediate audio, and a cross-fade process is performed on the spliced ​​audio frame using a cross-fade curve to obtain the target audio.

8. An audio processing device, characterized in that: include: A determination module, configured to determine audio information of the audio to be processed, and determine an audio zero point in the audio to be processed based on the audio information; A segmentation module, configured to segment the to-be-processed audio into a target pre-order audio and an initial post-order audio according to the audio zero point; The splicing module is configured to reversely process the initial subsequent audio in the audio sequence dimension into a target subsequent audio, and splice the target pre-order audio and the target subsequent audio into a target audio.

9. A computing device, characterized in that include: Memory and processor; The memory is used to store computer-executable instructions, and the processor is used to execute the computer-executable instructions to implement the steps of the audio processing method according to any one of claims 1 to 7.

10. A computer-readable storage medium storing computer instructions, characterized in that: When the instruction is executed by a processor, the steps of the audio processing method described in any one of claims 1 to 7 are implemented.

11. A computer program product comprising a computer program or instructions, characterized in that When the computer program or instruction is executed by a processor, the steps of the audio processing method according to any one of claims 1 to 7 are implemented.