Sound wave synthesis method and device and vehicle

Through time domain to frequency domain transformation and phase compensation of electric vehicle audio signals, the applicability problem of time-varying sinusoidal and non-sinusoidal signal processing in electric vehicles is solved, and the matching of sound quality and audio signals is improved.

CN118692489APending Publication Date: 2024-09-24XIAOMI EV TECH CO LTD +1
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202310295210.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-03-23
Publication Date
2024-09-24

AI Technical Summary

Technical Problem

It is difficult for the existing technology to effectively simulate the sound of traditional engines in electric vehicles, especially in the processing of time-varying sinusoidal signals and non-sinusoidal signals. The applicability is poor, resulting in damage to the sound quality.

Method used

By transforming the audio signal of the pre-stored sound wave from time domain to frequency domain, determining the conversion coefficient according to the vehicle's working condition parameters, performing phase compensation, transforming from frequency domain to time domain, adjusting the signal length to match the original signal, and realizing time-varying Frequency shift processing of sinusoidal and non-sinusoidal signals.

Benefits of technology

The sound quality of the audio signal is improved, the applicability and continuity of the audio signal are enhanced, and the problem of poor applicability in the existing technology is solved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 00000000_0000
    Figure 00000000_0000
Patent Text Reader

Abstract

The invention relates to a sound synthesis method and device and a vehicle, and the method comprises the steps: carrying out the time domain-to-frequency domain conversion of a multi-frame signal in a first audio signal of a pre-stored sound, so as to obtain each frequency domain component of the multi-frame signal; and for the at least one frequency domain component, according to the conversion coefficient corresponding to the working condition parameter, on the basis of the original phase of the corresponding frequency domain component in the adjacent frames and on the basis of the original phases of different frequency domain components in the same frame, performing phase compensation to obtain a target phase. And carrying out conversion from a frequency domain to a time domain according to the target phase, and adjusting the signal length to obtain a target audio signal of which the signal length is matched with the first audio signal. During phase compensation, phase compensation is performed on the basis of the corresponding frequency domain components in the adjacent frames in the time domain, and phase compensation is performed on the basis of different frequency domain components in the same frame in the time domain, so that frequency shift processing can be performed on time-varying sinusoidal signals and non-sinusoidal signals, and the technical problem of poor applicability in related technologies is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the technical field of intelligent cockpits, and in particular to a sound wave synthesis method, device and vehicle. Background Art

[0002] With the development of electric vehicles, the driving performance of vehicles has been continuously improved. At the same time, higher requirements are also placed on smart cockpit technologies including display and sound effects.

[0003] Compared with traditional vehicles, electric vehicles have fewer engine cylinders, and even traditional engines are directly replaced by electric motors. Therefore, it is more difficult to have a unique engine sound by optimizing the mechanical system including the intake and exhaust systems. In order to maintain the uniqueness of the engine sound, using active sound generation technology to obtain the vehicle engine sound is one of the most effective methods, which has been widely used in electric vehicles. Among them, sound wave synthesis is a key part of active sound generation technology. Through sound wave synthesis, the audio can be modulated to generate a rich sound spectrum that is closer to the traditional engine sound. Summary of the invention

[0004] In order to overcome the problems existing in the related art, the present disclosure provides a sound wave synthesis method, device and vehicle.

[0005] According to a first aspect of an embodiment of the present disclosure, there is provided a sound wave synthesis method, comprising:

[0006] Divide the first audio signal of the pre-stored sound wave into frames to obtain a multi-frame signal, and transform the multi-frame signal from the time domain to the frequency domain to obtain each frequency domain component of the multi-frame signal;

[0007] Determine the conversion coefficient according to the vehicle's operating parameters;

[0008] For at least one frequency domain component, phase compensation is performed based on the original phase of the corresponding frequency domain component in adjacent frames, and phase compensation is performed based on the original phase of different frequency domain components in the same frame, wherein the compensated phase is determined based on the conversion coefficient;

[0009] Performing a frequency domain to time domain transformation according to a target phase after compensation of at least one frequency domain component of the multi-frame signal, and performing audio synthesis based on the time domain frame signal obtained by the frequency domain to time domain transformation to obtain a second audio signal;

[0010] The signal length of the second audio signal is adjusted to obtain a target audio signal whose signal length matches that of the first audio signal.

[0011] According to a second aspect of an embodiment of the present disclosure, there is provided a sound wave synthesis device, comprising:

[0012] A first transformation module is used to divide the first audio signal of the pre-stored sound wave into frames to obtain a multi-frame signal, and transform the multi-frame signal from the time domain to the frequency domain to obtain each frequency domain component of the multi-frame signal;

[0013] A determination module, used for determining a conversion coefficient according to a working condition parameter of a vehicle;

[0014] A compensation module, configured to perform phase compensation on at least one frequency domain component based on an original phase of a corresponding frequency domain component in adjacent frames, and to perform phase compensation based on an original phase of different frequency domain components in the same frame, wherein the compensated phase is determined based on the conversion coefficient;

[0015] A second transformation module, configured to perform a frequency domain to time domain transformation according to a target phase after compensation of at least one frequency domain component of the multi-frame signal, and perform audio synthesis based on the time domain frame signal obtained by the frequency domain to time domain transformation to obtain a second audio signal;

[0016] The adjustment module is used to adjust the signal length of the second audio signal to obtain a target audio signal whose signal length matches that of the first audio signal.

[0017] According to a third aspect of an embodiment of the present disclosure, a vehicle is provided, comprising:

[0018] processor;

[0019] a memory for storing processor-executable instructions;

[0020] Wherein, the processor is configured to:

[0021] Implement the method described in the first aspect.

[0022] According to a fourth aspect of an embodiment of the present disclosure, a computer-readable storage medium is provided, on which computer program instructions are stored. When the program instructions are executed by a processor, the steps of the processing method provided in the first aspect of the present disclosure are implemented.

[0023] The technical solution provided by the embodiments of the present disclosure may include the following beneficial effects: by transforming the multi-frame signals in the first audio signal of the pre-stored sound wave from the time domain to the frequency domain, so as to obtain the frequency domain components of the multi-frame signals. For at least one frequency domain component, according to the conversion coefficient corresponding to the operating condition parameter, phase compensation is performed on the basis of the original phase of the corresponding frequency domain component in the adjacent frames, and on the basis of the original phase of different frequency domain components in the same frame, to obtain the target phase. Then, according to the target phase, the frequency domain is transformed to the time domain, and the signal length is adjusted to obtain the target audio signal whose signal length matches the first audio signal. Since during phase compensation, phase compensation is performed not only in the time domain based on the corresponding frequency domain components in the adjacent frames, but also in the time domain based on the different frequency domain components in the same frame, frequency shift processing can be performed on time-varying sinusoidal signals and non-sinusoidal signals, solving the technical problem of poor applicability in the related technology.

[0024] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0025] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.

[0026] Figure 1 is a flow chart of a sound wave synthesis method according to an exemplary embodiment;

[0027] Figure 2 is a flow chart of another sound wave synthesis method according to an exemplary embodiment;

[0028] Figure 3 It is the flowchart of the pre-processing stage;

[0029] Figure 4 is a flow chart of the phase compensation stage;

[0030] Figure 5 This is a flow chart of the pitch change stage;

[0031] Figure 6 is a block diagram of a sound wave synthesis device 600 according to an exemplary embodiment;

[0032] Figure 7 is a block diagram of a vehicle 700 according to an exemplary embodiment. DETAILED DESCRIPTION

[0033] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.

[0034] It should be noted that all actions of acquiring signals, information or data in this application are carried out in compliance with the relevant data protection laws and policies of the country where they are located and with the authorization given by the owner of the corresponding device.

[0035] The vehicle emits different audio in different operating states, so that the driver and passengers can know the change of the vehicle's operating state through the audio changes emitted by the vehicle. In the related art, this pitch change processing of the audio signal is often achieved by performing audio frequency shift on the audio signal through a phase vocoder.

[0036] Phase vocoder is a widely used frequency shifting technology. It accumulates the phase estimate of the instantaneous frequency and compensates the phase to maintain the continuity of the audio signal, so as to achieve the signal scaling in the time domain, and then returns the signal to the initial duration by resampling, thus completing the frequency shifting of the audio signal. This method treats each frequency as a constant sine wave, accumulates the phase estimate at the instantaneous frequency, and performs linear phase processing on it, so as to maintain phase continuity.

[0037] However, the current phase vocoder cannot perform frequency shift processing on time-varying sinusoidal signals and non-sinusoidal signals, has a narrow application range, and cannot guarantee the phase continuity and interpolation continuity of the signal, which in turn deteriorates the sound quality. In the embodiment of the present application, transient phase compensation and an improved interpolation scheme in the time dimension and frequency dimension are used to improve the robustness of the algorithm and the sound quality of the synthesized audio signal.

[0038] For details, please refer to the embodiments of the present application for explaining the sound wave synthesis method, device and vehicle.

[0039] Figure 1 is a flow chart of a sound wave synthesis method according to an exemplary embodiment. Figure 1 As shown, the processing method can be executed by the vehicle system of the vehicle, and is mainly used for the sound wave synthesis of the vehicle. The vehicle system executes the processing method provided in this embodiment to process the first audio signal, and plays the obtained target audio signal in real time through the vehicle speaker.

[0040] like Figure 1 As shown, the vehicle audio processing method includes the following steps:

[0041] Step 101: divide a first audio signal of a pre-stored sound wave into frames to obtain a multi-frame signal, and transform the multi-frame signal from the time domain to the frequency domain to obtain each frequency domain component of the multi-frame signal.

[0042] The first audio signal of the pre-stored sound wave is an original audio signal. The method of this embodiment performs frequency shifting on the audio signal to obtain a target audio signal after frequency shifting.

[0043] Optionally, for the convenience of processing in the time domain dimension, the pre-stored first audio signal is usually divided into a plurality of blocks, ie, block signals. Then, for each block signal, a sliding window method is adopted to divide it into a plurality of frames.

[0044] As a possible way to divide multiple frames, the sliding window adopts a Hanning window or a Hamming window, and the window length is the same as the frame length. The step length of the sliding window is a set percentage of the frame length, and the value range can be 10% to 90%, for example: it can be 25%, 50% and 75%. Every time the sliding window moves a step length, the sampling points in the sliding window are regarded as a frame. For each frame, Fourier transform is used to realize the transformation from time domain to frequency domain, so as to obtain the frequency domain components of the multi-frame signal.

[0045] For example, the length of the audio signal is 10s, and the sampling rate is 16000, 44100 or 48000. In this scenario, the minimum number of sampling points of the block data obtained by block division is L = 2048 sampling points. The block data is framed and windowed, and the selected window length, i.e., frame length, is N = 1024 sampling points. The step length of the sliding window, i.e., the time domain frame shift, is 256 sampling points.

[0046] Step 102, determining a conversion coefficient according to the operating parameters of the vehicle.

[0047] The operating parameters of the vehicle may include: a rotational speed, which may be a motor rotational speed of a pure electric vehicle, or a motor rotational speed and an internal combustion engine rotational speed of a hybrid vehicle, which is not limited in this embodiment.

[0048] As a possible implementation manner, the vehicle operating parameters may also include other operating parameters for indirectly indicating the rotation speed, such as the opening degree of the accelerator pedal.

[0049] Optionally, when the operating condition parameter is specifically the rotational speed, in response to the change in rotational speed caused by the user's driving operation, the conversion coefficient corresponding to the current operating condition parameter of the vehicle is determined according to the current rotational speed and based on a mapping relationship between the rotational speed and the conversion coefficient.

[0050] The conversion coefficient is the required extension or compression ratio for extending or compressing the first audio signal in the time domain without changing the pitch. In this embodiment, by performing such operations as stretching or compressing, compensating, etc. on the first audio signal in the time domain, and then restoring the target audio of the original length by the difference, the modulation of the audio based on the user's driving operation can be achieved. Due to different rotation speeds and different conversion coefficients, the target audio obtained in the end will also be different.

[0051] Step 103, performing phase compensation on at least one frequency domain component based on the original phase of the corresponding frequency domain component in adjacent frames, and performing phase compensation based on the original phase of different frequency domain components in the same frame, wherein the compensated phase is determined based on the conversion coefficient.

[0052] Based on the aforementioned steps, multiple frame signals belonging to the same block signal can be determined for the first audio signal, wherein each frame signal can obtain multiple frame frequency domain components through time-frequency domain transformation. In this step, phase compensation can be performed on all frequency domain components in a frame signal, or phase compensation can be performed on only part of the frequency domain components, which is not limited in this embodiment.

[0053] As a possible implementation method, for any frame, all frequency domain components can be phase compensated in the time dimension, and the phases of all frequency domain components in the current frame can be updated so that the phases of all frequency domain components in the frame are continuous with the corresponding frequency domain components in the previous frame. And for any frame, at least part of the frequency domain components can be phase compensated based on the original phases of frequency domain components different from the frequency domain in the same frame.

[0054] Step 104: Perform a frequency domain to time domain transformation according to the target phase after compensation of at least one frequency domain component of the multi-frame signal to obtain a second audio signal.

[0055] Optionally, the transformation from frequency domain to time domain is performed on all frequency domain components of all multi-frame signals, wherein, for at least one frame of frequency domain components whose phase has been compensated in the multi-frame signals, the transformation from frequency domain to time domain is based on the target phase after compensation of the at least one frame of frequency domain components, and for the frequency domain components that have not been compensated in the multi-frames, the transformation from frequency domain to time domain is performed based on the original phase.

[0056] Step 105: Adjust the signal length of the second audio signal to obtain a target audio signal whose signal length matches that of the first audio signal.

[0057] Since the phase is compensated in the above steps, the second audio signal obtained after the frequency domain to time domain transformation has more sampling points in the time domain than the first audio signal, or may have fewer sampling points. In this step, the signal length is aligned, and the second audio signal is restored to the required signal length by interpolating or merging sampling points, usually to the same length as the first audio signal.

[0058] In the embodiment of the present application, a multi-frame signal in the first audio signal of the pre-stored sound wave is transformed from the time domain to the frequency domain to obtain each frequency domain component of the multi-frame signal, and a conversion coefficient is determined according to the working condition parameters of the vehicle. For at least one frequency domain component, phase compensation is performed based on the original phase of the corresponding frequency domain component in the adjacent frames and the original phase of different frequency domain components in the same frame according to the conversion coefficient to obtain the compensated target phase. Then, according to the target phase of at least one frequency domain component of the multi-frame signal, the frequency domain to time domain transformation of the transformation is performed to obtain a second audio signal, and according to the second audio signal, the signal length is adjusted to obtain a target audio signal whose signal length matches the first audio signal. Since during phase compensation, phase compensation is performed not only based on the corresponding frequency domain components in the adjacent frames in the time domain, but also based on the different frequency domain components in the same frame in the time domain, frequency shift processing can be performed on time-varying sinusoidal signals and non-sinusoidal signals, solving the technical problem of poor applicability in the related art.

[0059] Figure 2 is a flow chart of another sound wave synthesis method according to an exemplary embodiment. Figure 2 As shown, the method includes three stages executed sequentially, the first stage is a preprocessing stage, the second stage is a phase compensation stage, and the third stage is a modulation stage.

[0060] The following is an introduction to these stages:

[0061] First, there is the preprocessing stage. Figure 3 This is the flow chart of the preprocessing stage, such as Figure 3 As shown, in some possible implementations, the following steps are included:

[0062] Step 201 : transform multiple frame signals in a first audio signal of a pre-stored sound wave from a time domain to a frequency domain to obtain frequency domain components of the multiple frame signals.

[0063] Optionally, for the convenience of processing in the time domain dimension, the pre-stored first audio signal is usually divided into a plurality of blocks, i.e., block signals. Then, for each block signal, a sliding window method can be used to divide it into a plurality of frames. For details, please refer to the relevant steps in the aforementioned embodiment, which will not be described in detail in this embodiment.

[0064] Among them, the step length of the sliding window is the time domain frame shift denoted as hop tin The t in the subscript refers to the time domain, and in refers to the time domain frame shift between adjacent frames before scaling according to the conversion coefficient.

[0065] Step 202, determining a conversion coefficient according to the operating parameters of the vehicle.

[0066] The conversion coefficient α is related to the current speed rpm of the vehicle. As a possible implementation method, the mapping relationship between the conversion coefficient α and the current speed rpm of the vehicle is shown in the formula:

[0067]

[0068] Among them, RPM_MAX represents the maximum speed of the electric vehicle, RPM_MIN represents the minimum speed of the electric vehicle, and R represents the value range of the conversion coefficient α.

[0069] Step 203: Use the conversion coefficient to scale the time domain interval between multiple frames in the first audio signal to obtain a set time interval.

[0070] The time domain interval between multiple frames in the first audio signal is the time domain frame shift hop tin .

[0071] The conversion coefficient α is related to the time domain interval hop between multiple frames in the first audio signal. tin The product between them is used as the set time interval, that is, the time domain frame shift hop after scaling tout .

[0072] Therefore, the conversion coefficient α can also be expressed as hop tout With hop tin Ratio, i.e. α = hop tout / hop tin Therefore, if the length of each frame signal of the first audio signal in the time domain is L before scaling, the length of each frame signal of the second audio signal obtained after scaling the first audio signal in the time domain is αL.

[0073] Step 204, for a target frequency component of any target frame, determine the time domain dimension deviation according to the original phase difference between the target frequency component and the corresponding frequency component in the previous frame.

[0074] Since the first audio signal is a variable frequency signal, the frequency deviation Δω(n,m) is a function of the time dimension and the frequency dimension. Where m is the frame number of the frame in the multi-frame signal, and n is the frequency point number of the frequency domain component in the m frame. The time domain dimension deviation in the frequency deviation Δω(n,m) is expressed as Δw t (n,m), the frequency domain dimension deviation is expressed as Δωf (n,m).

[0075] The following takes the frequency domain component of the nth frequency point in the mth frame as an example to illustrate the time domain dimension deviation Δω t The determination process of (n,m).

[0076] In the time domain, according to the phase of the previous frame and the current frame phase The time domain dimension deviation Δω of the frequency domain component of the nth frequency point in the mth frame can be obtained by the following formula: t (n,m) is:

[0077]

[0078] Wherein, N represents the total number of frequency components of the m-th frame signal.

[0079] It should be noted that wrap is used in the above formula. This is because the data needs to be controlled between [-π,π] when calculating the phase deviation. The process of controlling the phase deviation calculation is shown in the formula:

[0080]

[0081] In the above formula, round means rounding to the nearest integer, which is mainly to ensure that the phase compensation does not exceed the upper and lower phase boundaries. wrap(x) represents the phase deviation after the control value range, and x represents the phase deviation before the control value range.

[0082] Step 205: Use the conversion coefficient to scale the frequency interval between different frequency domain components in the same frame of the first audio signal to obtain a set frequency interval.

[0083] Referring to step 203, similarly, the frequency interval between different frequency domain components of the same frame in the first audio signal is recorded as hop fin , after scaling, the set frequency interval hop is obtained fout =αhop fin .

[0084] Step 206: For a target frequency component of any target frame, determine the frequency domain dimension deviation according to the original phase difference between the target frequency component and an adjacent frequency component within the target frame.

[0085] Optionally, for a target frequency component of any target frame, a forward frequency domain deviation is determined based on an original phase difference between the target frequency component and a previous frequency component within the target frame, and a backward frequency domain deviation is determined based on an original phase difference between the target frequency component and a subsequent frequency component; the frequency domain dimension deviation is determined based on the forward frequency domain deviation and the backward frequency domain deviation.

[0086] The following takes the frequency domain component of the nth frequency point in the mth frame as an example to illustrate the frequency domain dimension deviation Δω f The determination process of (n,m).

[0087] According to the phase of the previous frequency point Current frequency phase and the phase of the next frequency point The forward frequency deviation Δω can be obtained by the following formulas: f,before (n,m), backward frequency deviation Δω f,after (n,m):

[0088]

[0089]

[0090] As a possible implementation, the frequency domain dimension deviation Δω is determined by the following formula according to the forward frequency domain deviation and the backward frequency domain deviation: f (n,m):

[0091]

[0092] It should be noted that steps 203-204 and steps 205-206 can be executed in parallel as shown by the dashed arrows, or can be executed as shown by the dashed arrows. Figure 3 The solid arrow in the middle indicates that step 205 is executed after step 204, that is, it is executed serially, which is not limited in this embodiment.

[0093] The second stage, the phase compensation stage, Figure 4 It is the flow chart of the phase compensation stage, as shown in Figure 4 As shown, in some possible implementations, the following steps are included:

[0094] Step 207: For any target frequency domain component, determine a first phase difference at a set time interval according to the time domain dimension deviation.

[0095] Optionally, the product of the time domain dimension deviation and the set time interval is used as the first phase difference of the target frequency domain component. The frequency domain component of the nth frequency point in the mth frame is taken as an example and used as the target frequency domain component. As in the above steps, the time domain dimension deviation is Δω t (n,m), set the time interval to hop tout , then the first phase difference is hop tout ·Δω t (n,m).

[0096] Step 208: Compensate the first phase difference based on the original phase of the corresponding frequency domain component in adjacent frames.

[0097] As a possible implementation method, the following formula is used to calculate the original phase of the corresponding frequency domain component in adjacent frames: Compensate the first phase difference based on:

[0098]

[0099] in, The phase of the frequency domain component of the nth frequency point in the mth frame after compensating the first phase difference. is the current phase of the frequency domain component of the nth frequency point in the (m-1)th frame. Specifically, when the frequency domain component of the nth frequency point in the (m-1)th frame needs to compensate for the first phase difference, To compensate for the phase after the first phase difference, when there is no need to compensate for the first phase difference, is the phase before compensation.

[0100] It should be noted that, in this embodiment, this step can be performed on all frequency domain components, that is, the first phase difference is compensated. Those skilled in the art can know that only some frequency domain components can be selected to perform this step. For example, after selecting the frequency domain components based on the amplitude, some frequency domain components are selected to perform this step.

[0101] Step 209: For any target frequency domain component, determine a second phase difference at a set frequency interval according to the frequency domain dimension deviation.

[0102] Optionally, the product of the frequency domain dimension deviation and the set frequency interval is used as the second phase difference of the target frequency domain component. The frequency domain component of the nth frequency point in the mth frame is taken as an example and used as the target frequency domain component. As in the above steps, the frequency domain dimension deviation is Δω f (n,m), set the time interval to hop fout , then the second phase difference is hop fout ·Δω f (n,m).

[0103] In order to reduce the amount of calculation, the second phase difference may be compensated for only part of the frequency domain components. As a possible implementation method, the target frequency domain components that need to be compensated for the second phase difference may be determined in the following manner:

[0104] For any target frame in the multi-frame signal, an amplitude threshold is determined according to the amplitude of each frequency domain component in the target frame and its previous frame; and an update set of the target frame is generated according to at least one frequency domain component in the target frame whose amplitude is greater than the amplitude threshold. That is, the frequency domain components in the update set are used as target frequency domain components for which the second phase difference is to be compensated.

[0105] For example, the amplitude threshold to be smoothed is determined by the maximum amplitude value of the sampling points in the current frame and the previous frame (the amplitude threshold in this embodiment is equal to 0.8 of the maximum amplitude value), and the update set Λ is created. The frequency points whose amplitudes in the current frame are greater than the threshold are added to the update set as the frequency points to be updated, and are recorded as (n h ,m). If n h =0 or n h =N-1, the element is not added to the update set Λ to prevent the phase compensation from exceeding the frequency point boundary.

[0106] Step 210: Compensate the second phase difference based on the original phases of adjacent frequency domain components in the same frame to obtain the compensated target phase.

[0107] Optionally, the update set is traversed, and for the target frequency component of the target frame in the update set, when the original frequency of the adjacent frequency domain component is less than the target frequency component, the second phase difference is subtracted from the current phase of the adjacent frequency domain component to obtain the compensated target phase. As a possible implementation, the following formula is used to calculate the current phase of the adjacent frequency domain component: Based on this, subtract the second phase difference, for example:

[0108]

[0109] For the target frequency component of the target frame, when the original frequency of the adjacent frequency domain component is greater than the target frequency component, the second phase difference is added to the current phase of the adjacent frequency domain component to obtain the compensated target phase. As a possible implementation, the following formula is used to calculate the current phase of the adjacent frequency domain component: On the basis of, increase the second phase difference, for example:

[0110]

[0111] When the update set Λ is traversed to completion, the target phase of each frequency component in each frame signal is obtained.

[0112] Step 211, performing frequency domain to time domain transformation according to the target phase of at least one frequency domain component of the multi-frame signal, and performing audio synthesis based on the time domain frame signal obtained by the frequency domain to time domain transformation to obtain a second audio signal.

[0113] Optionally, an inverse Fourier transform is performed on each frame and smoothed by windowing to obtain the signal of each frame. For example, the following formula is used to perform inverse Fourier transform and smoothing on the mth frame to obtain the signal in the time domain:

[0114]

[0115] Where N is the total number of frequency components of the m-th frame signal, is the target phase of the frequency component of the nth frequency point in the mth frame signal. X(n,m) is the amplitude of the frequency component of the nth frequency point in the mth frame signal. is the truncation function. It's a signal The sampling point index.

[0116] By superimposing each frame of signal in the time domain, an audio signal with variable speed but unchanged pitch is synthesized, and the signal is stretched or compressed without changing the pitch. The frame superposition process is shown in the following formula:

[0117]

[0118] in,

[0119] is a unit step sequence commonly used in digital signals. Sampling point index The value of can be As the index of the sampling point in the stretched or compressed second audio signal, compared with the first audio signal x(l), the second audio signal has been stretched or compressed in time, represents the second audio signal after stretching or compression, and its pitch does not change relative to x(l).

[0120] The third stage, the pitch change stage, Figure 5 This is the flow chart of the pitch change stage. Figure 5 As shown, in some possible implementations, the following steps are included:

[0121] Step 212: Adjust the signal length of the second audio signal to obtain a target audio signal whose signal length matches that of the first audio signal.

[0122] In a possible scenario, when a first audio signal is compressed to obtain a second audio signal, a cubic spline interpolation algorithm is used to perform sampling point interpolation on sampling points in each subinterval of the second audio signal to obtain a target audio signal whose signal length matches that of the first audio signal.

[0123] Alternatively, in another possible scenario, when the first audio signal is stretched to obtain the second audio signal, a cubic spline difference algorithm is used to merge the sampling points in each subinterval of the second audio signal to obtain a target audio signal whose signal length matches that of the first audio signal.

[0124] The sampling points in the second audio signal are represented as Where i is the sampling point number, i = 0, 1, 2, ..., αL-1. Interpolation calculation is required to restore the signal of length αL to the original length L, and finally complete the signal modulation.

[0125] Optionally, in order to avoid the Runge phenomenon, the second audio signal is divided into a plurality of sub-intervals, and piecewise interpolation is performed in each sub-interval. Meanwhile, in order to ensure the smoothness of the interpolated signal at the nodes, cubic spline interpolation is used.

[0126] By sampling point and The interpolation l′ is used as an example to illustrate, where The interpolation process is performed using the following formula:

[0127]

[0128] Where, l′=0,…,L-1 represents the data point index of the resampled audio data, a i , b i 、c i and d i are the coefficients of the cubic spline curve:

[0129]

[0130]

[0131]

[0132]

[0133] in, is the length of each subinterval, At the interpolation point At this time, the second audio signal with variable length but not modulated is resampled to a target audio signal with the same length as the original, thereby changing the pitch of the first audio signal. Represents the target audio signal after resampling.

[0134] In the embodiment of the present application, a multi-frame signal in the first audio signal of the pre-stored sound wave is transformed from the time domain to the frequency domain to obtain each frequency domain component of the multi-frame signal, and a conversion coefficient is determined according to the working condition parameters of the vehicle. For at least one frequency domain component, phase compensation is performed based on the original phase of the corresponding frequency domain component in the adjacent frames and the original phase of different frequency domain components in the same frame according to the conversion coefficient to obtain the compensated target phase. Then, according to the target phase of at least one frequency domain component of the multi-frame signal, the frequency domain to time domain transformation of the transformation is performed to obtain a second audio signal, and according to the second audio signal, the signal length is adjusted to obtain a target audio signal whose signal length matches the first audio signal. Since during phase compensation, phase compensation is performed not only based on the corresponding frequency domain components in the adjacent frames in the time domain, but also based on the different frequency domain components in the same frame in the time domain, frequency shift processing can be performed on time-varying sinusoidal signals and non-sinusoidal signals, solving the technical problem of poor applicability in the related art.

[0135] Figure 6 FIG. 6 is a block diagram of a sound wave synthesis device 600 according to an exemplary embodiment. Figure 6 The sound wave synthesis device 600 includes: a first transformation module 610, a determination module 620, a compensation module 630, a second transformation module 640 and an adjustment module 650.

[0136] The first transformation module 610 is used to divide the first audio signal of the pre-stored sound into frames to obtain a multi-frame signal, and transform the multi-frame signal from the time domain to the frequency domain to obtain each frequency domain component of the multi-frame signal.

[0137] The determination module 620 is used to determine the conversion coefficient according to the operating parameters of the vehicle.

[0138] The compensation module 630 is used to perform phase compensation on at least one frequency domain component based on the original phase of the corresponding frequency domain component in adjacent frames, and to perform phase compensation based on the original phase of different frequency domain components in the same frame, wherein the compensated phase is determined based on the conversion coefficient.

[0139] The second transformation module 640 is used to perform frequency domain to time domain transformation according to the target phase after compensation of at least one frequency domain component of the multi-frame signal, and perform audio synthesis based on the time domain frame signal obtained by the frequency domain to time domain transformation to obtain a second audio signal.

[0140] The adjustment module 650 is configured to adjust the signal length of the second audio signal to obtain a target audio signal whose signal length matches that of the first audio signal.

[0141] In some possible implementations, the compensation module 630 is used to:

[0142] Using the conversion coefficient to scale the time domain interval between multiple frames in the first audio signal to obtain a set time interval;

[0143] For a target frequency component of any target frame, determine the time domain dimension deviation according to the original phase difference between the target frequency component and the corresponding frequency component in the previous frame;

[0144] For the target frequency domain component, determining a first phase difference at a set time interval according to the time domain dimension deviation;

[0145] The first phase difference is compensated based on the original phases of the corresponding frequency domain components in adjacent frames.

[0146] Optionally, the compensation module 630 determines, for the target frequency domain component, a first phase difference at a set time interval according to the time domain dimension deviation, including:

[0147] The product of the time domain dimension deviation and the set time interval is used as the first phase difference of the target frequency domain component.

[0148] In some possible implementations, the compensation module 630 is used to:

[0149] Using the conversion coefficient, scaling the frequency interval between different frequency domain components in the same frame of the first audio signal to obtain a set frequency interval;

[0150] For a target frequency component of any target frame, determining a frequency domain dimension deviation according to an original phase difference between the target frequency component and an adjacent frequency component within the target frame;

[0151] For the target frequency domain component, determining a second phase difference at a set frequency interval according to the frequency domain dimension deviation;

[0152] The second phase difference is compensated based on the original phases of adjacent frequency domain components in the same frame to obtain the compensated target phase.

[0153] Optionally, the compensation module 630 determines, for the target frequency domain component, a second phase difference at a set frequency interval according to the frequency domain dimension deviation, including:

[0154] The product of the frequency domain dimension deviation and the set frequency interval is used as the second phase difference of the target frequency domain component.

[0155] Optionally, the compensation module 630 compensates the second phase difference based on the original phases of adjacent frequency domain components in the same frame to obtain the compensated target phase, including:

[0156] For the target frequency component of the target frame, when the original frequency of the adjacent frequency domain component is less than the target frequency component, the second phase difference is added on the basis of the original phase of the adjacent frequency domain component to obtain the compensated target phase;

[0157] For the target frequency component of the target frame, when the original frequency of the adjacent frequency domain component is greater than the target frequency component, the second phase difference is reduced based on the original phase of the adjacent frequency domain component to obtain the compensated target phase.

[0158] Optionally, the compensation module 630 determines the frequency domain dimension deviation for a target frequency component of any target frame according to a phase difference between the target frequency component and an adjacent frequency component within the target frame, including:

[0159] For a target frequency component of any target frame, a forward frequency domain deviation is determined according to an original phase difference between the target frequency component and a previous frequency component within the target frame, and a backward frequency domain deviation is determined according to an original phase difference between the target frequency component and a subsequent frequency component;

[0160] The frequency domain dimension deviation is determined according to the forward frequency domain deviation and the backward frequency domain deviation.

[0161] In some possible implementations, the adjustment module 650 is used to: use a cubic spline interpolation algorithm to perform sampling point interpolation on sampling points in each subinterval of the second audio signal to obtain a target audio signal whose signal length matches that of the first audio signal.

[0162] Alternatively, in some possible implementations, the adjustment module 650 is configured to: adopt a cubic spline difference algorithm to merge sampling points in each subinterval of the second audio signal to obtain a target audio signal having a signal length matching that of the first audio signal.

[0163] In some possible implementations, the compensation module 630 determines an amplitude threshold for any target frame in the multi-frame signal according to the amplitudes of each frequency domain component in the target frame and its previous frame;

[0164] generating an update set of the target frame according to at least one frequency domain component in the target frame whose amplitude is greater than the amplitude threshold;

[0165] For at least one frequency domain component in the update set, phase compensation is performed based on the original phase of the adjacent frequency domain component in the target frame according to the conversion coefficient.

[0166] Alternatively, in some possible implementations, the compensation module 630 performs phase compensation for a target frequency component of any target frame in the multi-frame signal based on the original phase of a corresponding frequency domain component in an adjacent frame according to the conversion coefficient.

[0167] Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.

[0168] The device in this embodiment transforms the multi-frame signals in the first audio signal of the pre-stored sound wave from the time domain to the frequency domain to obtain the frequency domain components of the multi-frame signals. For at least one frequency domain component, phase compensation is performed on the basis of the original phase of the corresponding frequency domain component in the adjacent frames and the original phase of different frequency domain components in the same frame according to the conversion coefficient corresponding to the operating condition parameter to obtain the target phase. Then, the frequency domain is transformed to the time domain according to the target phase, and the signal length is adjusted to obtain the target audio signal whose signal length matches the first audio signal. Since during phase compensation, phase compensation is performed not only in the time domain based on the corresponding frequency domain components in the adjacent frames, but also in the time domain based on the different frequency domain components in the same frame, frequency shift processing can be performed on time-varying sinusoidal signals and non-sinusoidal signals, solving the technical problem of poor applicability in related technologies.

[0169] Figure 7 is a block diagram of a vehicle 700 according to an exemplary embodiment. For example, the vehicle 700 may be a hybrid vehicle, a non-hybrid vehicle, an electric vehicle, a fuel cell vehicle, or other types of vehicles. The vehicle 700 may be an autonomous vehicle, a semi-autonomous vehicle, or a non-autonomous vehicle.

[0170] Reference Figure 7 , the vehicle 700 may include various subsystems, for example, an infotainment system 710, a perception system 720, a decision control system 730, a drive system 740, and a computing platform 750. The vehicle 700 may also include more or fewer subsystems, and each subsystem may include multiple components. In addition, each subsystem and each component of the vehicle 700 may be interconnected by wire or wireless means.

[0171] In some embodiments, the infotainment system 710 may include a communication system, an entertainment system, and a navigation system, etc.

[0172] The perception system 720 may include several sensors for sensing information about the environment around the vehicle 700. For example, the perception system 720 may include a global positioning system (the global positioning system may be a GPS system, or a Beidou system or other positioning systems), an inertial measurement unit (IMU), a laser radar, a millimeter wave radar, an ultrasonic radar, and a camera.

[0173] The decision control system 730 may include a computing system, a vehicle controller, a steering system, a throttle, and a braking system.

[0174] The drive system 740 may include components that provide power movement for the vehicle 700. In one embodiment, the drive system 740 may include an engine, an energy source, a transmission system, and wheels. The engine may be one or a combination of an internal combustion engine, an electric motor, and an air compression engine. The engine is capable of converting energy provided by the energy source into mechanical energy.

[0175] Some or all functions of the vehicle 700 are controlled by a computing platform 750. The computing platform 750 may include at least one processor 751 and a memory 752, and the processor 751 may execute instructions 753 stored in the memory 752.

[0176] The processor 751 may be any conventional processor, such as a commercially available CPU. The processor may also include a graphics processor (Graphic Process Unit, GPU), a field programmable gate array (Field Programmable Gate Array, FPGA), a system on chip (System on Chip, SOC), an application specific integrated circuit (Application Specific Integrated Circuit, ASIC) or a combination thereof.

[0177] Memory 752 can be implemented by any type of volatile or nonvolatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.

[0178] In addition to instructions 753 , memory 752 may also store data, such as road maps, route information, vehicle location, direction, speed, etc. The data stored in memory 752 may be used by computing platform 750 .

[0179] In the embodiment of the present disclosure, the processor 751 may execute the instruction 753 to complete all or part of the steps of the above-mentioned sound wave synthesis method.

[0180] The present disclosure also provides a computer-readable storage medium having computer program instructions stored thereon, and when the program instructions are executed by a processor, the steps of the sound wave synthesis method provided by the present disclosure are implemented.

[0181] The vehicle and computer-readable storage medium provided in this embodiment perform a time domain to frequency domain transformation on multiple frames of signals in the first audio signal of the pre-stored sound in the aforementioned processing method to obtain each frequency domain component of the multiple frames of signals. For at least one frequency domain component, phase compensation is performed on the basis of the original phase of the corresponding frequency domain component in adjacent frames and on the basis of the original phase of different frequency domain components in the same frame according to the conversion coefficient corresponding to the operating condition parameter to obtain a target phase. Then, a frequency domain to time domain transformation is performed according to the target phase, and the signal length is adjusted to obtain a target audio signal whose signal length matches the first audio signal. Since during phase compensation, phase compensation is performed not only in the time domain based on the corresponding frequency domain components in adjacent frames, but also in the time domain based on different frequency domain components in the same frame, frequency shift processing can be performed on time-varying sinusoidal signals and non-sinusoidal signals, solving the technical problem of poor applicability in related technologies.

[0182] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the present disclosure. This application is intended to cover any variations, uses or adaptations of the present disclosure, which follow the general principles of the present disclosure and include common knowledge or customary technical means in the art that are not disclosed in the present disclosure. The specification and examples are to be considered as exemplary only, and the true scope and spirit of the present disclosure are indicated by the following claims.

[0183] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims

1. A sound wave synthesis method, characterized in that: include: Divide the first audio signal of the pre-stored sound wave into frames to obtain a multi-frame signal, and transform the multi-frame signal from the time domain to the frequency domain to obtain each frequency domain component of the multi-frame signal; Determine the conversion coefficient according to the vehicle's operating parameters; For at least one frequency domain component, phase compensation is performed based on the original phase of the corresponding frequency domain component in adjacent frames, and phase compensation is performed based on the original phase of different frequency domain components in the same frame, wherein the compensated phase is determined based on the conversion coefficient; Performing a frequency domain to time domain transformation according to a target phase after compensation of at least one frequency domain component of the multi-frame signal, and performing audio synthesis based on the time domain frame signal obtained by the frequency domain to time domain transformation to obtain a second audio signal; The signal length of the second audio signal is adjusted to obtain a target audio signal whose signal length matches that of the first audio signal.

2. The method according to claim 1, characterized in that The phase compensation for at least one frequency domain component is performed based on the original phase of the corresponding frequency domain component in adjacent frames, and the phase compensation is performed based on the original phase of different frequency domain components in the same frame, wherein the compensated phase is determined based on the conversion coefficient, including: Using the conversion coefficient to scale the time domain interval between multiple frames in the first audio signal to obtain a set time interval; For a target frequency component of any target frame, determine the time domain dimension deviation according to the original phase difference between the target frequency component and the corresponding frequency component in the previous frame; For the target frequency domain component, determining a first phase difference at a set time interval according to the time domain dimension deviation; The first phase difference is compensated based on the original phases of the corresponding frequency domain components in adjacent frames.

3. The method according to claim 2, characterized in that The determining, for the target frequency domain component, a first phase difference at a set time interval according to the time domain dimension deviation, comprises: The product of the time domain dimension deviation and the set time interval is used as the first phase difference of the target frequency domain component.

4. The method according to claim 1, characterized in that: The phase compensation for at least one frequency domain component is performed based on the original phase of the corresponding frequency domain component in adjacent frames, and the phase compensation is performed based on the original phase of different frequency domain components in the same frame, wherein the compensated phase is determined based on the conversion coefficient, including: Using the conversion coefficient, scaling the frequency interval between different frequency domain components in the same frame of the first audio signal to obtain a set frequency interval; For a target frequency component of any target frame, determining a frequency domain dimension deviation according to an original phase difference between the target frequency component and an adjacent frequency component within the target frame; For the target frequency domain component, determining a second phase difference at a set frequency interval according to the frequency domain dimension deviation; The second phase difference is compensated based on the original phases of adjacent frequency domain components in the same frame to obtain the compensated target phase.

5. The method according to claim 4, characterized in that The step of determining, for the target frequency domain component, a second phase difference at a set frequency interval according to the frequency domain dimension deviation, comprises: The product of the frequency domain dimension deviation and the set frequency interval is used as the second phase difference of the target frequency domain component.

6. The method according to claim 4, characterized in that Based on the original phases of the adjacent frequency domain components in the same frame, compensating the second phase difference to obtain the compensated target phase includes: For the target frequency component of the target frame, when the original frequency of the adjacent frequency domain component is less than the target frequency component, the second phase difference is added on the basis of the original phase of the adjacent frequency domain component to obtain the compensated target phase; For the target frequency component of the target frame, when the original frequency of the adjacent frequency domain component is greater than the target frequency component, the second phase difference is reduced based on the original phase of the adjacent frequency domain component to obtain the compensated target phase.

7. The method according to claim 4, characterized in that The determining of the frequency domain dimension deviation for a target frequency component of any target frame according to a phase difference between the target frequency component and an adjacent frequency component within the target frame includes: For a target frequency component of any target frame, a forward frequency domain deviation is determined according to an original phase difference between the target frequency component and a previous frequency component within the target frame, and a backward frequency domain deviation is determined according to an original phase difference between the target frequency component and a subsequent frequency component; The frequency domain dimension deviation is determined according to the forward frequency domain deviation and the backward frequency domain deviation.

8. The method according to any one of claims 1 to 7, characterized in that: The adjusting the signal length of the second audio signal to obtain a target audio signal whose signal length matches the first audio signal includes: Using a cubic spline interpolation algorithm, sampling point interpolation is performed on the second audio signal to obtain a target audio signal whose signal length matches that of the first audio signal; Alternatively, a cubic spline difference algorithm is used to merge sampling points of the second audio signal to obtain a target audio signal whose signal length matches that of the first audio signal.

9. The method according to any one of claims 1 to 7, characterized in that: The phase compensation for at least one frequency domain component is performed based on the original phase of the corresponding frequency domain component in adjacent frames, and the phase compensation is performed based on the original phase of different frequency domain components in the same frame, wherein the compensated phase is determined based on the conversion coefficient, including: For any target frame in the multi-frame signal, determine an amplitude threshold according to the amplitudes of each frequency domain component in the target frame and its previous frame; generating an update set of the target frame according to at least one frequency domain component in the target frame whose amplitude is greater than the amplitude threshold; For at least one frequency domain component in the update set, phase compensation is performed based on the original phase of the adjacent frequency domain component in the target frame according to the conversion coefficient.

10. The method according to any one of claims 1 to 7, characterized in that: The phase compensation for at least one frequency domain component is performed based on the original phase of the corresponding frequency domain component in adjacent frames, and the phase compensation is performed based on the original phase of different frequency domain components in the same frame, wherein the compensated phase is determined based on the conversion coefficient, including: For a target frequency component of any target frame in the multi-frame signal, phase compensation is performed based on the original phase of the corresponding frequency domain component in an adjacent frame according to the conversion coefficient.

11. A sound wave synthesis device, characterized in that: include: A first transformation module is used to divide the first audio signal of the pre-stored sound wave into frames to obtain a multi-frame signal, and transform the multi-frame signal from the time domain to the frequency domain to obtain each frequency domain component of the multi-frame signal; A determination module, used for determining a conversion coefficient according to a working condition parameter of a vehicle; A compensation module, configured to perform phase compensation on at least one frequency domain component based on an original phase of a corresponding frequency domain component in adjacent frames, and to perform phase compensation based on an original phase of different frequency domain components in the same frame, wherein the compensated phase is determined based on the conversion coefficient; A second transformation module, configured to perform a frequency domain to time domain transformation according to a target phase after compensation of at least one frequency domain component of the multi-frame signal, and perform audio synthesis based on the time domain frame signal obtained by the frequency domain to time domain transformation to obtain a second audio signal; The adjustment module is used to adjust the signal length of the second audio signal to obtain a target audio signal whose signal length matches that of the first audio signal.

12. A vehicle, characterized in that: include: processor; a memory for storing processor-executable instructions; Wherein, the processor is configured to: Implement the method according to any one of claims 1 to 10.

13. A computer-readable storage medium having computer program instructions stored thereon, characterized in that: When the program instructions are executed by a processor, the method according to any one of claims 1 to 10 is implemented.

Citation Information

Cited By

  • Data missing compensation method, system and equipment of digital audio conference system and medium

    CN121281536A