Audio processing method and device, electronic equipment and computer readable storage medium
By extracting the phase feature information of the left and right channels to calculate the target weight, channel signal separation is performed, which solves the problem of incomplete channel signal separation in the existing technology and achieves high-accuracy separation of the center channel and other channel signals.
Patent Information
- Application Number
- CN202511687828.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-18
- Publication Date
- 2026-02-06
- Estimated Expiration
- 2045-11-18
AI Technical Summary
Existing center channel separation methods are mainly based on phase cancellation time-domain decomposition, which leads to incomplete separation of channel signals and poor separation effect.
By extracting the phase feature information of the left and right channels, the target weight is calculated, and the channel signals are separated based on the weight to obtain the center channel signal and other channel signals.
It improves the accuracy of center channel signal separation and enhances the separation accuracy of other channel signals, achieving comprehensive separation accuracy of all channel signals.
Smart Images

Figure CN121148414B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] Embodiments of the present application relate to the technical field of audio processing, and in particular to an audio processing method and device, electronic equipment and a computer readable storage medium. BACKGROUND
[0002] Audio processing technology refers to a technology of collecting, analyzing, modifying and synthesizing sound signals, and is widely used in music production, film post-production, communication, speech recognition and other fields.
[0003] Center channel extraction is a key technology in audio signal processing, and is particularly important in applications such as stereo upmixing, surround sound generation and speech enhancement. The core idea is to analyze the spatial distribution, spectral characteristics or statistical characteristics of stereo channel audio signals, separate the center channel signal from other channel signals, and retain the difference signal for other channels, to achieve the separation of pure signals of the center channel and other channels. Further, based on the scene requirements, the center channel signal or other channel signal is enhanced to meet the actual scene requirements.
[0004] However, the current center channel separation is still mainly based on the time domain decomposition method of phase cancellation, which uses the highly similar characteristics (same phase, similar amplitude) of the center channel signal in the left and right channels, while the background sound has phase or amplitude difference, and extracts the center component by subtracting the left and right channels. Its advantage is real-time processing, without the need for training data or complex algorithms, but it has the problem of incomplete separation of channel signals and poor separation effect. SUMMARY
[0005] Embodiments of the present application provide an audio processing method, device, electronic equipment and computer readable storage medium, which can improve the accuracy of channel signal separation.
[0006] In a first aspect, the embodiments of the present application provide an audio processing method, which comprises:
[0007] Obtaining a to-be-processed audio signal, the to-be-processed audio signal comprising a first left channel signal and a first right channel signal;
[0008] Extracting phase feature information of the first left channel signal and the first right channel signal;
[0009] Determining a target weight according to the phase feature information;
[0010] Separating and processing the first left channel signal and the first right channel signal based on the target weight to obtain a second left channel signal, a second right channel signal and a center channel signal.
[0011] In a second aspect, the embodiments of the present application further provide an audio processing device, which comprises:
[0012] an acquisition module, configured to acquire a to-be-processed audio signal, wherein the to-be-processed audio signal comprises a first left channel signal and a first right channel signal;
[0013] an extraction module, configured to extract phase feature information of the first left channel signal and the first right channel signal;
[0014] a determination module, configured to determine a target weight according to the phase feature information;
[0015] a separation module, configured to perform separation processing on the first left channel signal and the first right channel signal based on the target weight, to obtain a second left channel signal, a second right channel signal and a center channel signal.
[0016] Optionally, in some embodiments of the present application, the determination of the target weight according to the phase feature information comprises:
[0017] calculating angle similarity information of the first left channel signal and the first right channel signal according to the phase feature information;
[0018] calculating the target weight according to the angle similarity information.
[0019] Optionally, in some embodiments of the present application, the calculation of the target weight according to the angle similarity information comprises:
[0020] calculating a left channel energy envelope of the first left channel signal, and calculating a right channel energy envelope of the first right channel signal;
[0021] generating a non-zero mask according to the left channel energy envelope, the right channel energy envelope and an energy envelope threshold;
[0022] generating the target weight according to the angle similarity information and the non-zero mask.
[0023] Optionally, in some embodiments of the present application, the generation of the non-zero mask according to the left channel energy envelope, the right channel energy envelope and the energy envelope threshold comprises:
[0024] selecting a minimum energy envelope from the left channel energy envelope and the right channel energy envelope as a target energy envelope;
[0025] if the target energy envelope is greater than the energy envelope threshold, setting a first value as the non-zero mask;
[0026] If the target energy envelope is less than or equal to the energy envelope threshold, a second value is set as the non-zero mask.
[0027] Optionally, in some embodiments of the present application, the calculating the angle similarity information of the first left channel signal and the first right channel signal according to the phase feature information comprises:
[0028] calculating an absolute value of the phase feature information to obtain phase absolute value information;
[0029] calculating a difference between the similarity extreme value and the phase absolute value information to obtain the angle similarity information.
[0030] Optionally, in some embodiments of the present application, the separating processing the first left channel signal and the first right channel signal based on the target weight to obtain a second left channel signal, a second right channel signal and a center channel signal comprises:
[0031] calculating a signal mean value of the first left channel signal and the second left channel signal;
[0032] calculating a product of the target weight and the signal mean value to obtain the center channel signal;
[0033] separating the center channel signal from the first left channel signal to obtain the second left channel signal, and separating the center channel signal from the first right channel signal to obtain the second right channel signal.
[0034] Optionally, in some embodiments of the present application, the extracting the phase feature information of the first left channel signal and the first right channel signal comprises:
[0035] calculating an absolute value of the first left channel signal to obtain a left channel absolute value, and calculating an absolute value of the first right channel signal to obtain a right channel absolute value;
[0036] calculating a phase difference between the left channel absolute value and the right channel absolute value by a target arc tangent function;
[0037] converting the phase difference to a target interval range to obtain the phase feature information.
[0038] In a third aspect, the embodiments of the present application further provide an electronic device, which comprises a memory, a processor and a computer program stored in the memory and capable of running on the processor, and the computer program is executed by the processor to implement the steps in the above-mentioned audio processing method.
[0039] In a fourth aspect, an embodiment of the present application further provides a computer readable storage medium, and the computer readable storage medium stores a computer program. The computer program is executed by a processor to implement the steps of the audio processing method.
[0040] In a fifth aspect, an embodiment of the present application further provides a computer program product or a computer program. The computer program product or the computer program includes computer instructions stored in a computer readable storage medium. A processor of a computer device reads the computer instructions from the computer readable storage medium, and the processor executes the computer instructions to enable the computer device to perform the method provided in various optional implementation manners of the embodiments of the present application.
[0041] To sum up, an embodiment of the present application obtains a to-be-processed audio signal including a first left channel signal and a first right channel signal, extracts phase feature information of the first left channel signal and the first right channel signal, determines a target weight according to the phase feature information, and performs separation processing on the first left channel signal and the first right channel signal based on the target weight to obtain a second left channel signal, a second right channel signal, and a center channel signal.
[0042] In the embodiment of the present application, the target weight is calculated based on the phase features of the first left channel signal and the first right channel signal, and the separation of the center channel signal is performed based on the target weight. Compared with the method of directly obtaining the center channel by subtracting the left channel from the right channel, the embodiment of the present application can improve the accuracy of the separation of the center channel signal. Furthermore, when the signals of other channels are obtained based on the separation of the center channel signal, the accuracy of the signals of the other channels can also be improved, thereby comprehensively improving the accuracy of the separation of the signals of the channels. BRIEF DESCRIPTION OF DRAWINGS
[0043] In order to more clearly illustrate the technical solutions in the present application, the following will briefly introduce the drawings needed in the embodiment description. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can also be obtained by those skilled in the art without any creative effort.
[0044] Figure 1 is a scene schematic diagram of a terminal device executing the audio processing method provided by an embodiment of the present application;
[0045] Figure 2 is a flow schematic diagram of the audio processing method provided by an embodiment of the present application;
[0046] Figure 3 is a structure schematic diagram of the audio processing apparatus provided by an embodiment of the present application;
[0047] Figure 4Fig. 1 is a structural schematic diagram of an electronic device provided by an embodiment of the present application.
[0048] Explanation of reference numerals
[0049] 101-terminal device; 301-acquiring module; 302-extracting module; 303-determining module; 304-separating module; 401-processor; 402-memory; 403-power supply; 404-input unit. DETAILED DESCRIPTION
[0050] The technical solutions in the present application will be described clearly and completely below in conjunction with the drawings in the present application. Obviously, the described embodiments are only some of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work fall within the scope of protection of the present application.
[0051] In the description of the embodiments of the present application, it should be understood that the orientation or positional relationship indicated by the terms "center", "longitudinal", "lateral", "length", "width", "thickness", "upper", "lower", "front", "rear", "left", "right", "vertical", "horizontal", "top", "bottom", "inner", "outer" and the like is based on the orientation or positional relationship shown in the drawings, and is only for the convenience of describing the present application and simplifying the description, and therefore cannot be understood as indicating or implying that the device or element indicated must have a particular orientation, be constructed and operated in a particular orientation, and therefore cannot be understood as a limitation on the present application. In addition, the terms "first", "second", "third", "fourth" are only for the purpose of description, and cannot be understood as indicating or implying relative importance or implicitly indicating the number of the technical features indicated. Therefore, the features defined with "first", "second", "third", "fourth" can explicitly or implicitly include one or more features. In the description of the present application, the meaning of "a plurality of" is two or more, unless otherwise explicitly limited.
[0052] In the present application, the word "exemplary" is used to mean "serving as an example, instance, or illustration." Any implementation described as "exemplary" in the present application is not necessarily to be construed as preferred or advantageous over other implementations. The following description is presented to enable any person skilled in the art to make and use the application. In the following description, for purposes of explanation, specific details are set forth. It will be apparent to those skilled in the art that the present application can be practiced without the specific details. In other instances, well-known structures and processes are not described in detail in order to avoid obscuring the present application. Thus, the present application is not intended to be limited to the embodiments shown, but is to be accorded the widest scope consistent with the principles and features presented herein.
[0053] The embodiments of the present application provide an audio processing method and device, an electronic device and a computer readable storage medium. Specifically, the embodiments of the present application provide an audio processing device suitable for an electronic device, and the electronic device includes a terminal device, such as a mobile phone, a tablet computer, a notebook computer, a television, a soundbar, a smart speaker, or a vehicle-mounted audio and video device.
[0054] For example, refer to Figure 1 , Figure 1 is a schematic diagram of a scenario in which a terminal device executes the audio processing method provided by the embodiments of the present application. Specifically, the terminal device executes the audio processing method as follows:
[0055] The terminal device 101 obtains a to-be-processed audio signal including a first left channel signal and a first right channel signal. Then, the terminal device 101 extracts phase feature information of the first left channel signal and the first right channel signal, determines a target weight according to the phase feature information, and performs separation processing on the first left channel signal and the first right channel signal based on the target weight to obtain a second left channel signal, a second right channel signal and a center channel signal.
[0056] For example, after detecting a channel signal separation instruction for a to-be-processed audio, a terminal device (such as a soundbar) extracts phase feature information of a first left channel signal and a first right channel signal in the to-be-processed audio, and controls the separation of the first left channel signal and the first right channel signal through the phase feature information to obtain a center channel signal, a second left channel signal and a second right channel signal. The second left channel signal is a channel signal obtained by separating the first left channel signal from the center channel signal, and the second right channel signal is a channel signal obtained by separating the first right channel signal from the center channel signal.
[0057] In summary, the embodiments of the present application calculate a target weight based on the phase features of the first left channel signal and the first right channel signal, and separate the center channel signal based on the target weight. Compared with the method of directly obtaining the center channel by subtracting the left channel from the right channel, the embodiments of the present application can improve the accuracy of the center channel signal separation. Furthermore, when other channel signals are obtained based on the center channel signal separation, the accuracy of these other channel signals can also be improved, thereby comprehensively improving the accuracy of the channel signal separation.
[0058] The following will be described in detail. It should be noted that the order of the following embodiments is not limited as the order of priority of the embodiments.
[0059] For example, refer to Figure 2 , Figure 2A flowchart of an audio processing method provided by an embodiment of the present application is shown in FIG. 1. Although a logical sequence is shown in the flowchart, in some cases, the steps shown or described can be performed in a sequence different from that shown in the flowchart. Specifically, the audio processing method is applied to a terminal device, and the specific flow of the audio processing method is as follows:
[0060] S201: Obtain a to-be-processed audio signal, which includes a first left channel signal and a first right channel signal.
[0061] The to-be-processed audio signal includes stereo sound, which contains two-channel audio of left and right channels. The first left channel signal corresponds to the signal of the left channel, and the first right channel signal corresponds to the signal of the right channel.
[0062] S202: Extract phase feature information of the first left channel signal and the first right channel signal.
[0063] The phase feature information refers to the phase feature of the first left channel signal and the first right channel signal, for example, the phase feature information includes a phase angle or a phase difference, reflecting the phase angle relationship between the first left channel signal and the first right channel signal.
[0064] S203: Determine a target weight according to the phase feature information.
[0065] It should be noted that the target weight is a weight for controlling channel separation, which is calculated based on the phase feature information of the first left channel signal and the first right channel signal. In the embodiment of the present application, the target weight is used to control the reservation or suppression of the center of the first left channel signal and the first right channel signal, so as to improve the accuracy of the center channel signal separation.
[0066] S204: Perform separation processing on the first left channel signal and the first right channel signal based on the target weight, to obtain a second left channel signal, a second right channel signal, and a center channel signal.
[0067] The center channel signal refers to a signal that independently records or plays sounds located in the front (such as vocals, dialogues, main melodies, etc.). The second left channel signal is a channel signal obtained by separating the center channel signal from the first left channel signal, and the second right channel signal is a channel signal obtained by separating the center channel signal from the first right channel signal.
[0068] For example, based on the target weight, the center channel signal is separated from the first left channel signal and the first right channel signal, and then based on the center channel signal, the second left channel signal without the center channel signal is separated from the first left channel signal, and the second right channel signal without the center channel signal is separated from the first right channel signal.
[0069] For example, for a stereo signal containing human voice, background music, and environmental sound, a center channel signal corresponding to the human voice is separated from the stereo signal, and then the human voice is separated from the left channel of the stereo signal to obtain pure background music or environmental sound without human voice, and the human voice is separated from the right channel of the stereo signal to obtain pure background music or environmental sound without human voice.
[0070] In summary, in the embodiments of the present application, the target weight is calculated based on the phase characteristics of the first left channel signal and the first right channel signal, and the center channel signal is separated based on the target weight. Compared with the method of directly obtaining the center channel signal by subtracting the left channel signal from the right channel signal, the embodiments of the present application can improve the accuracy of the center channel signal separation. Furthermore, when the signals of other channels are separated based on the center channel signal, the accuracy of the signals of the other channels can also be improved, thereby comprehensively improving the accuracy of the separation of the signals of all channels.
[0071] In the embodiments of the present application, the phase characteristic information can be calculated based on an inverse tangent function, for example, the phase characteristic information of the first left channel signal and the first right channel signal is calculated using the function atan2(y, x) based on the inverse tangent of the four quadrants. That is, in some embodiments of the present application, the step of "extracting the phase characteristic information of the first left channel signal and the first right channel signal" comprises:
[0072] calculating the absolute value of the first left channel signal to obtain a left channel absolute value, and calculating the absolute value of the first right channel signal to obtain a right channel absolute value;
[0073] calculating the phase difference between the left channel absolute value and the right channel absolute value by a target inverse tangent function;
[0074] converting the phase difference to a target interval range to obtain the phase characteristic information.
[0075] For example, the calculation formula of the phase characteristic information a is as follows:
[0076] a = atan2(abs(R), abs(L)) * 4 / π - 1.
[0077] wherein R represents the first right channel signal, L represents the first left channel signal, abs(R) represents the right channel absolute value, which is obtained by taking the absolute value of the first right channel signal, abs(L) represents the left channel absolute value, which is obtained by taking the absolute value of the first left channel signal. atan2(abs(R), abs(L)) is the phase difference.
[0078] In the embodiments of the present application, the target interval range includes [-1, 1]. It can be understood that the values of abs(R) and abs(L) are greater than zero, and therefore the result of atan2(abs(R), abs(L)) is between [0, π / 2]. The operation of *4 / π maps the result of atan2(abs(R), abs(L)) from [0, π / 2] to [0, 2]. Finally, the value of the phase feature information a is mapped to the interval of [-1, 1] through the operation of -1.
[0079] It can be understood that when a = -1, it indicates that the sound image position corresponding to the stereo sound is completely left, when a = 0, it indicates that the sound image position corresponding to the stereo sound is centered, and when a = 1, it indicates that the sound image position corresponding to the stereo sound is completely right.
[0080] In the embodiments of the present application, the angle similarity of the first left channel signal and the first right channel signal can be used to quantify the confidence of the center channel signal, so as to improve the accuracy of the center channel signal separation as a reference, that is, in some embodiments of the present application, the step of “determining a target weight according to the phase feature information” includes:
[0081] calculating angle similarity information of the first left channel signal and the first right channel signal according to the phase feature information;
[0082] calculating the target weight according to the angle similarity information.
[0083] It can be understood that the angle similarity information refers to the similarity of the phase. The higher the angle similarity information (for example, the closer to 1), the more similar the first left channel signal and the first right channel signal, and vice versa. The lower the angle similarity information (for example, the closer to 0), the greater the difference between the first left channel signal and the first right channel signal. When the first left channel signal and the first right channel signal are more similar, it indicates that the component containing the center channel signal is more likely.
[0084] In the embodiments of the present application, the angle similarity information can be calculated by a similarity extremum, that is, in some embodiments of the present application, the step of “calculating angle similarity information of the first left channel signal and the first right channel signal according to the phase feature information” includes:
[0085] calculating an absolute value of the phase feature information to obtain phase absolute value information;
[0086] calculating a difference between the similarity extremum and the phase absolute value information to obtain the angle similarity information.
[0087] For example, the similarity extremum is 1, and the calculation formula of the angle similarity information simAng is as follows:
[0088] simAng = 1 - abs(a).
[0089] wherein a represents phase feature information, abs(a) represents taking absolute value of phase feature information,
[0090] In the embodiments of the present application, in order to improve the accuracy of the angle similarity information, avoid the angle similarity information from changing dramatically due to transient signals (such as drum points, short sound effects), and make the center channel signal extraction more stable, the embodiments of the present application adopt a smoothing filter to obtain stable and effective angle similarity information, for example, the stable angle similarity information SimAng is represented by the following formula:
[0091] SimAng = smoothingIIR(AT_g, RT_g, simAng).
[0092] wherein simAng is the angle similarity information calculated in the foregoing. smoothingIIR is a recursive smoothing filter, which mainly functions to smooth the input signal; AT_g and RT_g are time for controlling smoothing, generally in the order of milliseconds, for example, the value of AT_g includes but is not limited to 0.00015s, and the value of RT_g includes but is not limited to 0.0005s.
[0093] In the embodiments of the present application, in order to improve the accuracy of the target weight calculation, the generation of the target weight can also be controlled based on whether the channel signals (the first left channel signal and the first right channel signal) are valid, that is, in some embodiments of the present application, the step of "calculating the target weight according to the angle similarity information" includes:
[0094] calculating a left channel energy envelope of the first left channel signal, and calculating a right channel energy envelope of the first right channel signal;
[0095] generating a non-zero mask according to the left channel energy envelope, the right channel energy envelope and an energy envelope threshold;
[0096] generating the target weight according to the angle similarity information and the non-zero mask.
[0097] wherein the energy envelope is a characteristic describing the change of signal energy over time, and is usually used to analyze the dynamic characteristics of the signal, transient events (such as drum points) or long-time energy distribution, etc.
[0098] For example, the calculation formula of the left channel energy envelope Le is as follows:
[0099] Le = smoothingIIR(AT_z, RT_z, L*L).
[0100] The right channel energy includes the calculation formula of Re as follows:
[0101] Re = smoothingIIR(AT_z, RT_z, R*R).
[0102] Wherein, L*L represents the energy envelope of the first left channel signal, R*R represents the energy envelope of the first right channel signal, AT_z and RT_z are attack / release times for controlling the smoothing of the energy envelope, and affect the response speed of the signal effectiveness. The values of AT_z and RT_z are generally milliseconds, for example, the value of AT_z includes but is not limited to 0.0005s, and the value of RT_z includes but is not limited to 0.001s.
[0103] Wherein, the energy envelope threshold is a pre-set energy envelope value, which is used as a judgment boundary value for whether the channel signal is effective. For example, the value of the energy envelope threshold includes but is not limited to 0.
[0104] Wherein, the non-zero mask is used to indicate whether the first left channel signal and the first right channel signal are effective, for example, if the first left channel signal and the first right channel signal are effective, the non-zero mask takes the value of 1, and if the first left channel signal and the first right channel signal are not effective, the non-zero mask takes the value of 0.
[0105] In the embodiments of the present application, whether the channel signal is effective is determined by comparing the energy envelope of each channel with the set energy envelope threshold, for example, whether the channel signal is a low-level noise signal or a mute signal can be identified by comparing with the energy envelope threshold, thereby reducing the misjudgment of the center channel signal.
[0106] In the embodiments of the present application, the smaller energy envelope is selected from the left channel energy envelope and the right channel energy envelope and compared with the energy envelope threshold to determine whether the channel signal is effective, that is, in some embodiments of the present application, the step of “generating a non-zero mask according to the left channel energy envelope, the right channel energy envelope and the energy envelope threshold” includes:
[0107] Selecting the minimum energy envelope from the left channel energy envelope and the right channel energy envelope as a target energy envelope;
[0108] If the target energy envelope is greater than the energy envelope threshold, setting the first value as the non-zero mask;
[0109] If the target energy envelope is less than or equal to the energy envelope threshold, setting the second value as the non-zero mask.
[0110] For example, the calculation formula of the target energy envelope notZero is as follows:
[0111] notZero = min(Le, Re).
[0112] The calculation formula of the non-zero mask notZeroMask is as follows:
[0113] notZeroMask = (notZero > nzt? 1 : 0).
[0114] where nzt represents an energy envelope threshold. If notZero > nzt, notZeroMask takes the value 1, and if notZero≤ nzt, notZeroMask takes the value 0.
[0115] Correspondingly, the calculation formula of the target weight centerMask generated according to the angle similarity information and the non-zero mask is as follows:
[0116] centerMask = SimAng * notZeroMask.
[0117] where SimAng is the stable angle similarity information calculated after smoothing.
[0118] Similarly, in actual application, the target weight can be smoothed to obtain a smoothed target weight, so as to calculate the mid channel signal through the smoothed target weight. For example, the smoothed target weight CenterMask can be expressed as:
[0119] CenterMask = smoothingIIR(AT_g, RT_g, centerMask).
[0120] Specifically, in the embodiments of the present application, the mid channel signal is calculated through the product of the target weight and the mean value of the first left channel signal and the second left channel signal, that is, in some embodiments of the present application, the step of "separating and processing the first left channel signal and the first right channel signal based on the target weight to obtain the second left channel signal, the second right channel signal and the mid channel signal" includes:
[0121] calculating the signal mean value of the first left channel signal and the second left channel signal;
[0122] calculating the product of the target weight and the signal mean value to obtain the mid channel signal;
[0123] separating the mid channel signal from the first left channel signal to obtain the second left channel signal, and separating the mid channel signal from the first right channel signal to obtain the second right channel signal.
[0124] For example, the calculation formula of the center channel signal C is as follows:
[0125] C = CenterMask* (L + R) / 2.
[0126] Correspondingly, the calculation formula of the second left channel signal L2 is L2=L-C, and the calculation formula of the second right channel signal R2 is R2=R-C.
[0127] That is, on the basis of sum-averaging based on the first left channel signal and the first right channel signal, weighting processing is performed through the target weight, and when the signal is centered (phase feature information=0) and valid (CenterMask≈1), the result obtained by sum-averaging is completely retained. When the signal is left / right or invalid (CenterMask≈0), the center extraction is inhibited.
[0128] Further, the center channel signal is subtracted from the original channels of the stereo sound, and the left / right difference signal is retained, that is, the side signal of the left channel or the right channel is obtained.
[0129] In summary, the embodiment of the present application calculates the target weight based on the phase feature of the first left channel signal and the first right channel signal, and separates the center channel signal based on the target weight. Compared with the way of directly obtaining the center channel by subtracting the left and right channels, the embodiment of the present application can improve the accuracy of the center channel signal separation. Further, when the signals of other channels are obtained based on the center channel signal separation, the accuracy of these other channel signals can also be improved, thereby comprehensively realizing the accuracy of the channel signal separation.
[0130] In order to better implement the audio processing method of the present application, the present application also provides an application processing device based on the above-mentioned audio processing method. The meanings of the terms are the same as in the above-mentioned audio processing method, and the specific implementation details can be referred to the description in the method embodiment.
[0131] Please refer to Figure 3 , Figure 3 is a structural schematic diagram of an audio processing device provided by the embodiment of the present application, wherein the audio processing device can be specifically as follows:
[0132] The acquisition module 301 is configured to acquire a to-be-processed audio signal, wherein the to-be-processed audio signal includes a first left channel signal and a first right channel signal.
[0133] The extraction module 302 is configured to extract phase feature information of the first left channel signal and the first right channel signal.
[0134] The determination module 303 is configured to determine a target weight according to the phase feature information.
[0135] The separation module 304 is configured to separate the first left channel signal and the first right channel signal based on the target weight to obtain a second left channel signal, a second right channel signal and a center channel signal.
[0136] Optionally, in some embodiments of the present application, the target weight is determined according to the phase feature information, comprising:
[0137] calculating angle similarity information of the first left channel signal and the first right channel signal according to the phase feature information;
[0138] calculating the target weight according to the angle similarity information.
[0139] Optionally, in some embodiments of the present application, the target weight is calculated according to the angle similarity information, comprising:
[0140] calculating a left channel energy envelope of the first left channel signal, and calculating a right channel energy envelope of the first right channel signal;
[0141] generating a non-zero mask according to the left channel energy envelope, the right channel energy envelope and an energy envelope threshold;
[0142] generating the target weight according to the angle similarity information and the non-zero mask.
[0143] Optionally, in some embodiments of the present application, the non-zero mask is generated according to the left channel energy envelope, the right channel energy envelope and an energy envelope threshold, comprising:
[0144] selecting a minimum energy envelope from the left channel energy envelope and the right channel energy envelope as a target energy envelope;
[0145] if the target energy envelope is greater than the energy envelope threshold, setting a first value as the non-zero mask;
[0146] if the target energy envelope is less than or equal to the energy envelope threshold, setting a second value as the non-zero mask.
[0147] Optionally, in some embodiments of the present application, the angle similarity information of the first left channel signal and the first right channel signal is calculated according to the phase feature information, comprising:
[0148] calculating an absolute value of the phase feature information to obtain phase absolute value information;
[0149] calculating a difference between a similarity extreme value and the phase absolute value information to obtain the angle similarity information.
[0150] Optionally, in some embodiments of the present application, the separating processing of the first left channel signal and the first right channel signal based on the target weight to obtain a second left channel signal, a second right channel signal and a center channel signal comprises:
[0151] calculating a signal mean value of the first left channel signal and the second left channel signal;
[0152] calculating a product of the target weight and the signal mean value to obtain the center channel signal;
[0153] separating the center channel signal from the first left channel signal to obtain the second left channel signal, and separating the center channel signal from the first right channel signal to obtain the second right channel signal.
[0154] Optionally, in some embodiments of the present application, the extracting the phase feature information of the first left channel signal and the first right channel signal comprises:
[0155] calculating an absolute value of the first left channel signal to obtain a left channel absolute value, and calculating an absolute value of the first right channel signal to obtain a right channel absolute value;
[0156] calculating a phase difference of the left channel absolute value and the right channel absolute value by a target arctangent function;
[0157] converting the phase difference to a target interval range to obtain the phase feature information.
[0158] Embodiments of the present application first acquire a to-be-processed audio signal by an acquisition module 301, the to-be-processed audio signal comprising a first left channel signal and a first right channel signal, extract phase feature information of the first left channel signal and the first right channel signal by an extraction module 302, determine a target weight according to the phase feature information by a determination module 303, and separate process the first left channel signal and the first right channel signal based on the target weight by a separation module 304 to obtain a second left channel signal, a second right channel signal and a center channel signal.
[0159] In summary, embodiments of the present application calculate a target weight based on phase features of a first left channel signal and a first right channel signal, and separate a center channel signal based on the target weight. Compared with a method of directly obtaining a center channel by subtracting a left channel from a right channel, embodiments of the present application can improve the accuracy of center channel signal separation. Furthermore, when other channel signals are obtained based on the center channel signal separation, the accuracy of these other channel signals can also be improved, thereby comprehensively improving the accuracy of channel signal separation.
[0160] In addition, the present application also provides an electronic device, such as Figure 4As shown, it illustrates a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Specifically:
[0161] The electronic device may include components such as a processor 401 with one or more processing cores, a memory 402 with one or more computer-readable storage media, a power supply 403, and an input unit 404. Those skilled in the art will understand that... Figure 4 The electronic device structure shown does not constitute a limitation on the electronic device and may include more or fewer components than shown, or combine certain components, or have different component arrangements. Wherein:
[0162] The processor 401 is the control center of the electronic device. It connects various parts of the electronic device via various interfaces and lines. By running or executing software programs and / or modules stored in the memory 402, and by calling data stored in the memory 402, it performs various functions and processes data, thereby providing overall monitoring of the electronic device. Optionally, the processor 401 may include one or more processing cores; preferably, the processor 401 may integrate an application processor and a modem processor, wherein the application processor mainly handles the operating system, user interface, and applications, and the modem processor mainly handles wireless communication. It is understood that the modem processor may not be integrated into the processor 401.
[0163] The memory 402 can be used to store software programs and modules. The processor 401 executes various functional applications and data processing by running the software programs and modules stored in the memory 402. The memory 402 may mainly include a program storage area and a data storage area. The program storage area may store the operating system, application programs required for at least one function (such as sound playback function, image playback function, etc.), etc.; the data storage area may store data created according to the use of the electronic device, etc. In addition, the memory 402 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, or other volatile solid-state storage device. Accordingly, the memory 402 may also include a memory controller to provide the processor 401 with access to the memory 402.
[0164] The electronic device also includes a power supply 403 that supplies power to the various components. Preferably, the power supply 403 can be logically connected to the processor 401 through a power management system, thereby enabling functions such as charging, discharging, and power consumption management through the power management system. The power supply 403 may also include one or more DC or AC power supplies, recharging systems, power equipment debugging circuits, power converters or inverters, power status indicators, and other arbitrary components.
[0165] The electronic device can further include an input unit 404, which can be used to receive inputted digital or character information, and to generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function controls.
[0166] Although not shown, the electronic device can further include a display unit, etc., which will not be described here. Specifically in the present embodiment, the processor 401 in the electronic device will load the executable file corresponding to the process of one or more application programs into the memory 402 according to the following instructions, and run the application program stored in the memory 402 by the processor 401, thereby implementing the steps in any of the audio processing methods provided in the present application.
[0167] The embodiment of the present application obtains a to-be-processed audio signal including a first left channel signal and a first right channel signal, extracts phase feature information of the first left channel signal and the first right channel signal, determines a target weight according to the phase feature information, and performs separation processing on the first left channel signal and the first right channel signal based on the target weight to obtain a second left channel signal, a second right channel signal and a center channel signal.
[0168] Among them, the embodiment of the present application calculates the target weight based on the phase features of the first left channel signal and the first right channel signal, and separates the center channel signal based on the target weight. Compared with the way of directly obtaining the center channel by subtracting the left channel from the right channel, the embodiment of the present application can improve the accuracy of the center channel signal separation. Further, when the signals of other channels are obtained based on the center channel signal separation, the accuracy of these other channel signals can also be improved, thereby comprehensively realizing the accuracy of the separation of each channel signal.
[0169] The specific implementation of each of the above operations can be referred to the previous embodiments, which will not be described here.
[0170] Those of ordinary skill in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructions, or by instructions controlling relevant hardware, which can be stored in a computer readable storage medium and loaded and executed by a processor.
[0171] To this end, the present application provides a computer readable storage medium, which stores a computer program capable of being loaded by a processor to execute the steps in any of the audio processing methods provided in the present application.
[0172] The specific implementation of each of the above operations can be referred to the previous embodiments, which will not be described here.
[0173] The computer readable storage medium can include a read only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.
[0174] Due to the instructions stored in the computer readable storage medium, the steps of any of the audio processing methods provided in the present application can be executed, thus the beneficial effects of any of the audio processing methods provided in the present application can be achieved, which are described in detail in the foregoing embodiments and will not be repeated here.
[0175] The above describes in detail the audio processing method, device, electronic device and computer readable storage medium provided in the present application. The principles and implementation manners of the present application are described by applying specific examples. The above example is only used to help understand the method and core idea of the present application. Meanwhile, for those skilled in the art, the specific implementation manners and application range can be changed according to the idea of the present application. In conclusion, the content of the specification should not be understood as a limitation of the present application.
Claims
1. An audio processing method, characterized by, The method comprises: obtaining a to-be-processed audio signal, the to-be-processed audio signal comprising a first left channel signal and a first right channel signal; extracting phase feature information of the first left channel signal and the first right channel signal; determining a target weight according to the phase feature information; performing separation processing on the first left channel signal and the first right channel signal based on the target weight to obtain a second left channel signal, a second right channel signal and a center channel signal; the determining of the target weight according to the phase feature information comprises: calculating angle similarity information of the first left channel signal and the first right channel signal according to the phase feature information; calculating the target weight according to the angle similarity information.
2. The audio processing method of claim 1, wherein, the calculating of the target weight according to the angle similarity information comprises: calculating a left channel energy envelope of the first left channel signal and a right channel energy envelope of the first right channel signal; generating a non-zero mask according to the left channel energy envelope, the right channel energy envelope and an energy envelope threshold; generating the target weight according to the angle similarity information and the non-zero mask.
3. The audio processing method of claim 2, wherein, the generating of the non-zero mask according to the left channel energy envelope, the right channel energy envelope and the energy envelope threshold comprises: selecting a minimum energy envelope from the left channel energy envelope and the right channel energy envelope as a target energy envelope; if the target energy envelope is greater than the energy envelope threshold, setting a first value as the non-zero mask; if the target energy envelope is less than or equal to the energy envelope threshold, setting a second value as the non-zero mask.
4. The audio processing method of claim 1, wherein, the calculating of the angle similarity information of the first left channel signal and the first right channel signal according to the phase feature information comprises: calculating an absolute value of the phase feature information to obtain phase absolute value information; calculating a difference between a similarity extreme value and the phase absolute value information to obtain the angle similarity information.
5. The audio processing method of claim 1, wherein, the performing of the separation processing on the first left channel signal and the first right channel signal based on the target weight to obtain a second left channel signal, a second right channel signal and a center channel signal comprises: calculating a signal mean value of the first left channel signal and the second left channel signal; calculating a product of the target weight and the signal mean value to obtain the center channel signal; separating the center channel signal from the first left channel signal to obtain the second left channel signal, and separating the center channel signal from the first right channel signal to obtain the second right channel signal.
6. The audio processing method of claim 1, wherein, the extracting of the phase feature information of the first left channel signal and the first right channel signal comprises: calculating an absolute value of the first left channel signal to obtain a left channel absolute value, and calculating an absolute value of the first right channel signal to obtain a right channel absolute value; calculating a phase difference between the left channel absolute value and the right channel absolute value through a target arctangent function; converting the phase difference to a target interval range to obtain the phase feature information.
7. An audio processing apparatus, characterized by comprising: the device comprises: An acquisition module is configured to acquire a to-be-processed audio signal, the to-be-processed audio signal comprising a first left channel signal and a first right channel signal; An extraction module is configured to extract phase feature information of the first left channel signal and the first right channel signal; A determination module is configured to determine a target weight according to the phase feature information; A separation module is configured to perform separation processing on the first left channel signal and the first right channel signal based on the target weight, to obtain a second left channel signal, a second right channel signal, and a center channel signal. The determination of the target weight according to the phase feature information comprises: calculating angle similarity information of the first left channel signal and the first right channel signal according to the phase feature information; calculating the target weight according to the angle similarity information.
8. An electronic device, comprising: A computer program product is provided, which comprises a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor implements the steps in the audio processing method according to any one of claims 1-6 when executing the computer program.
9. A computer-readable storage medium, characterized in that, A computer readable storage medium stores a computer program, and the computer program is executable on a processor to implement the steps in the audio processing method according to any one of claims 1-6.
Citation Information
Patent Citations
Target mid-side signals for audio applications
CN119072931A
Target mid-side signals for audio applications
US20250184681A1