Engine sound synthesis method, device, equipment and storage medium
By building an engine mapping model and obtaining engine parameters in real time, the engine speed set is determined, which solves the problem of uneven engine sound synthesis results and achieves a smoother engine sound synthesis effect.
Patent Information
- Application Number
- CN202411991083.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-31
- Publication Date
- 2025-10-03
- Estimated Expiration
- 2044-12-31
AI Technical Summary
Existing engine sound synthesis methods fail to effectively consider the frequency and phase differences between frames, resulting in uneven synthesis results.
By building an engine mapping model, acquiring engine sound signals and engine parameters in real time, determining the engine speed set, and using the engine mapping model and the engine speed set to determine the target engine signal data set, and performing signal synthesis, smooth engine sound synthesis is achieved.
The engine sound synthesis results are made smoother, the discontinuity problem caused by frequency and phase differences between frames is solved, and the synthesis effect is improved.
Smart Images

Figure CN119905082B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of sound synthesis, and in particular to an engine sound synthesis method, apparatus, device, and storage medium. Background Art
[0002] Engine sound synthesis aims to reproduce engine sounds through algorithms. It has important applications in racing games, sound wave synthesis, and pedestrian warning systems. Currently, the most common engine sound synthesis method is the particle method, which decomposes a recorded or produced sound signal and then synthesizes it to produce a real-time engine sound. However, this method does not account for frequency and phase differences between frames, and the parameters used in the decomposition and synthesis processes are fixed, resulting in an uneven engine sound synthesis. Therefore, how to make engine sound synthesis smoother remains an unresolved issue.
[0003] The above content is only used to assist in understanding the technical solution of this application and does not constitute an admission that the above content is prior art. Summary of the Invention
[0004] The main purpose of this application is to provide an engine sound synthesis method, device, equipment and storage medium, aiming to solve the technical problem of how to make the engine sound synthesis result smoother.
[0005] To achieve the above objectives, the present application proposes a method for synthesizing engine sounds, the method comprising:
[0006] Acquiring an engine sound signal and constructing an engine mapping model based on the engine sound signal;
[0007] acquiring engine parameters in real time, and determining an engine speed set based on the engine parameters;
[0008] determining a target engine signal data set according to the engine mapping model and the engine speed set;
[0009] Signal synthesis is performed on the target engine signal data set to obtain a target engine sound synthesis result.
[0010] In one embodiment, the step of acquiring an engine sound signal and constructing an engine mapping model according to the engine sound signal includes:
[0011] Acquire an engine sound signal, and divide the engine sound signal into frames to obtain a multi-frame target engine sound signal;
[0012] Windowing the target engine sound signal of each frame to obtain a windowed engine signal;
[0013] Calculating the relative energy of the target engine sound signal in each frame, and determining the engine speed corresponding to the relative energy of the signal;
[0014] An engine mapping model is constructed according to the windowed engine sound signal and the engine speed.
[0015] In one embodiment, the step of acquiring an engine sound signal and dividing the engine sound signal into frames to obtain a multi-frame target engine sound signal includes:
[0016] Acquire an engine sound signal generated when the engine speed increases from a preset lower speed limit to a preset upper speed limit;
[0017] The engine sound signal is divided into a plurality of frames of target engine sound signals according to a preset frame length and a preset frame shift, wherein the preset frame length is greater than the preset frame shift.
[0018] In one embodiment, the step of windowing each frame of the target engine sound signal to obtain a windowed engine signal includes:
[0019] Obtaining a windowing coefficient of the target engine sound signal of each frame according to a Hamming window function model;
[0020] Each frame of the target engine sound signal is multiplied by a windowing coefficient to obtain a windowed engine signal.
[0021] In one embodiment, the step of constructing an engine mapping model based on the windowed engine sound signal and the engine speed includes:
[0022] Determine the windowed engine sound signal corresponding to the engine speed and obtain a mapping list;
[0023] The mapping list is sorted according to the engine speed to obtain the engine speed and construct an engine mapping model.
[0024] In one embodiment, the step of determining the target engine signal data set based on the engine mapping model and the engine speed set includes:
[0025] determining a current engine speed and a historical engine speed based on the engine speed set;
[0026] determining a plurality of pending engine data of the current engine speed according to the engine mapping model;
[0027] Acquiring historical engine signal data corresponding to the historical engine speed;
[0028] respectively calculating the correlation between the plurality of pending engine data and the historical engine signal data;
[0029] determining current engine signal data from the plurality of pending engine data according to the correlation;
[0030] A target engine signal data set is obtained according to the historical engine signal data and the current engine signal data.
[0031] In one embodiment, the step of performing signal synthesis on the target engine signal data set to obtain a target engine sound synthesis result includes:
[0032] Obtaining a plurality of engine signals to be synthesized according to the target engine signal data set, and determining a predecessor engine signal and a successor engine signal of the engine signal to be synthesized;
[0033] determining predecessor overlapping data according to the engine signal to be synthesized and the predecessor engine signal, and determining subsequent overlapping data according to the engine signal to be synthesized and the subsequent engine signal;
[0034] The target engine sound synthesis result is obtained by overlapping and adding the engine signal to be synthesized and the preceding overlapping data and discarding the subsequent overlapping data.
[0035] In addition, to achieve the above-mentioned purpose, the present application also proposes an engine sound synthesis device, the engine sound synthesis device comprising:
[0036] A construction module, configured to obtain an engine sound signal and construct an engine mapping model according to the engine sound signal;
[0037] an acquisition module, configured to acquire engine parameters in real time and determine an engine speed set based on the engine parameters;
[0038] a determination module, configured to determine a target engine signal data set according to the engine mapping model and the engine speed set;
[0039] The synthesis module is used to perform signal synthesis on the target engine signal data set to obtain a target engine sound synthesis result.
[0040] In addition, to achieve the above-mentioned purpose, the present application also proposes an engine sound synthesis device, which includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the engine sound synthesis method described above.
[0041] In addition, to achieve the above-mentioned purpose, the present application also proposes a storage medium, which is a computer-readable storage medium and stores a computer program. When the computer program is executed by a processor, the steps of the engine sound synthesis method described above are implemented.
[0042] In addition, to achieve the above-mentioned purpose, the present application also provides a computer program product, which includes a computer program. When the computer program is executed by a processor, the steps of the engine sound synthesis method described above are implemented.
[0043] The present application provides an engine sound synthesis method, which obtains an engine sound signal and constructs an engine mapping model based on the engine sound signal; obtains engine parameters in real time and determines an engine speed set based on the engine parameters; determines a target engine signal data set based on the engine mapping model and the engine speed set; and performs signal synthesis on the target engine signal data set to obtain a target engine sound synthesis result.
[0044] In summary, the present application decomposes the engine signal to construct an engine mapping model, determines the target engine signal data through the engine mapping model, and synthesizes the engine sound through the target engine signal data, making the engine sound synthesis result smoother. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0046] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0047] Figure 1 A flow chart of the first embodiment of the engine sound synthesis method of the present application;
[0048] Figure 2 A schematic diagram of the engine signal synthesis process of the engine sound synthesis method provided in Example 1 of the present application;
[0049] Figure 3 A flow chart of the second embodiment of the engine sound synthesis method of the present application is provided;
[0050] Figure 4 A schematic diagram of a Hamming window image of the engine sound synthesis method provided in Example 2 of the present application;
[0051] Figure 5 A schematic diagram of a simplified flow chart of the engine sound synthesis method provided in Example 1 of the present application;
[0052] Figure 6 This is a schematic diagram of the module structure of the engine sound synthesis device according to an embodiment of the present application;
[0053] Figure 7Schematic diagram of the device structure of the hardware operating environment involved in the engine sound synthesis method in the embodiment of the present application.
[0054] The purpose, features and advantages of this application will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0055] It should be understood that the specific embodiments described herein are merely used to explain the technical solutions of the present application and are not intended to limit the present application.
[0056] In order to better understand the technical solution of the present application, a detailed description will be given below in conjunction with the accompanying drawings and specific implementation methods.
[0057] The main solution of this application is to obtain engine sound signals and build an engine mapping model based on the engine sound signals; obtain engine parameters in real time and determine an engine speed set based on the engine parameters; determine a target engine signal data set based on the engine mapping model and the engine speed set; and perform signal synthesis on the target engine signal data set to obtain a target engine sound synthesis result.
[0058] Currently, the most common method for synthesizing engine sounds is the particle method. This method decomposes a recorded or produced sound signal and then synthesizes it to produce a real-time engine sound. However, this method fails to account for the frequency and phase differences between frames. The parameters used in the decomposition and synthesis processes are fixed, resulting in an uneven engine sound. Therefore, how to make the engine sound synthesis smoother remains an unresolved issue.
[0059] This application decomposes the engine signal to construct an engine mapping model, determines the target engine signal data through the engine mapping model, and synthesizes the engine sound through the target engine signal data, making the engine sound synthesis result smoother.
[0060] Based on this, the embodiment of the present application provides an engine sound synthesis method, referring to Figure 1 , Figure 1 This is a flow chart of the first embodiment of the engine sound synthesis method of the present application.
[0061] In this embodiment, the engine sound synthesis method includes steps S10 to S40:
[0062] Step S10: Acquire an engine sound signal, and construct an engine mapping model according to the engine sound signal;
[0063] It should be noted that the execution subject of this embodiment can be a computing service device with data processing, network communication, and program execution capabilities, such as a tablet computer, personal computer, or mobile phone, or an electronic device or engine sound synthesis device capable of performing the aforementioned functions. This embodiment and the following embodiments will be described below using an engine sound synthesis device as an example.
[0064] It is understandable that after the engine mapping model is constructed, the engine speed can be converted into an engine sound signal through the engine mapping model to facilitate subsequent engine sound synthesis.
[0065] The specific process of constructing an engine mapping model based on the engine sound signal is to uniformly rotate the engine speed (Revolutions Per Minute, RPM) from 1000 to 6000 for 10 seconds. A 1 / 2-inch microphone is used with a sampling rate of 48kHz for recording. Assume that the measured engine signal is x(n), where n represents the sampling point, that is, the final received signal vector is [x(1), x(2), x(3)…x(n)]. In practical applications, it is impossible to use RPM with infinite resolution. That is, although RPM ranges from 1000 to 6000 and can be subdivided into 1000, 1001, 1002… or even finer, considering the data storage capacity limit, generally only one RPM is taken every few values, such as 1003, 1008, 1013, etc. After framing and windowing, the signal is considered stable during this very short period of time, and its corresponding RPM remains unchanged. For example, if the RPM is 1008, this data segment should theoretically represent RPMs 1006-1010, but we assume that this segment represents an RPM of 1008. Accordingly, during synthesis, if the calculated RPM is 1006, the nearest preset value 1008 is selected as its index value.
[0066] Step S20: acquiring engine parameters in real time, and determining an engine speed set according to the engine parameters;
[0067] It's understandable that engine speed typically can't be directly obtained, so it can be indirectly derived through other engine parameters, such as vehicle speed, pedal depth, and keyboard response. Taking vehicle speed as an example, engine speed can be determined through a mapping relationship between vehicle speed and engine speed. This embodiment uses the simplest mapping method: proportional mapping. Assuming a vehicle speed of 0:25 km / h corresponds to an RPM of 1000:6000, for example, a vehicle speed of 15 km / h would correspond to an RPM of 4000.
[0068] Step S30: determining a target engine signal data set according to the engine mapping model and the engine speed set;
[0069] It is understandable that after the engine speed set is acquired, the target engine signal corresponding to each engine speed in the engine speed set can be obtained through the engine mapping model, thereby obtaining the target engine signal set.
[0070] In a feasible manner, the step of determining the target engine signal data set according to the engine mapping model and the engine speed set includes:
[0071] determining a current engine speed and a historical engine speed based on the engine speed set;
[0072] determining a plurality of pending engine data of the current engine speed according to the engine mapping model;
[0073] Acquiring historical engine signal data corresponding to the historical engine speed;
[0074] respectively calculating the correlation between the plurality of pending engine data and the historical engine signal data;
[0075] determining current engine signal data from the plurality of pending engine data according to the correlation;
[0076] A target engine signal data set is obtained according to the historical engine signal data and the current engine signal data.
[0077] It is understandable that each engine speed corresponds to a unique engine signal data in the engine mapping model. However, since the actual engine speed is discontinuous, if the engine signal data corresponding to the engine speed is directly used for synthesis output, it is very likely that problems such as signal discontinuity and pitch mismatch will occur. In order to solve this problem, a new selection is made near the pre-selected engine signal data. The selection is based on calculating the signal frame with the strongest correlation with the overlapped part of the previous frame data within the set range. Figure 2 For example, assuming that Y(k) is output at this time, the next frame of data Y(k+1) needs to be output. At this time, it can be considered that the pre-selected data frame F(k+1) and the three consecutive frames of data after it in the engine mapping model are all possible to use, so the first 160 points of these 4 frames of data are taken out, and the Pearson correlation coefficient between them and the last 160 points of F(k) is calculated. The frame with the largest correlation coefficient result is used for the synthesized output. Among them, the Pearson correlation coefficient is very good at measuring the change trend of two vectors. If the change trends are consistent (the same increase and the same decrease), the value is large; if the change trends are opposite (one increases and the other decreases), the correlation coefficient is small. Its definition is as follows:
[0078]
[0079] Where X and Y are two vectors of equal length. and They represent their respective means, and ∑(·) represents accumulation.
[0080] Step S40: performing signal synthesis on the target engine signal data set to obtain a target engine sound synthesis result.
[0081] It is understandable that, since there is an overlapping portion between two adjacent target engine signal data in the target engine signal data set, data synthesis is required.
[0082] In a feasible manner, the step of performing signal synthesis on the target engine signal data set to obtain a target engine sound synthesis result includes:
[0083] Obtaining a plurality of engine signals to be synthesized according to the target engine signal data set, and determining a predecessor engine signal and a successor engine signal of the engine signal to be synthesized;
[0084] determining predecessor overlapping data according to the engine signal to be synthesized and the predecessor engine signal, and determining subsequent overlapping data according to the engine signal to be synthesized and the subsequent engine signal;
[0085] The target engine sound synthesis result is obtained by overlapping and adding the engine signal to be synthesized and the preceding overlapping data and discarding the subsequent overlapping data.
[0086] It is understandable that after obtaining the RPM from the vehicle speed, it is first rounded off, and then the nearest RPM value is calculated. The target engine signal data corresponding to the RPM value is determined by the engine mapping model. For example, the RPM calculated from the real-time vehicle speed is 2865.4, which is rounded off to 2865. The nearest RPM value is 2867. Therefore, the target engine signal data of RPM 2867 in the engine mapping model is selected. Figure 2 , Figure 2The data frame is divided into two major sections: "data frame" and "output." The data frame is data selected in real time within the engine mapping model based on different RPMs. This data requires an overlap-and-add process before it can be output. Taking the above example with a frame length of 640 and a frame shift of 480, the data before and after F(k) in the data frame require overlap-and-add (each consisting of 160 points, corresponding to the portion of the window function win that is not 1). The F(k) portion does not require overlap-and-add (each consisting of 320 points, corresponding to the portion of the window function win that is all 1). Assume that Y(k) has already been output and the next frame, Y(k+1), needs to be output. At this point, the frame corresponding to the RPM in the engine mapping model is taken as F(k+1). The first 160 points of this frame are added one-to-one with the last 160 points of the previous frame F(k). Then, the output Y(k+1) is formed by adding the 320 points in F(k+1) that do not require overlap-and-add. The last 160 points of F(k+1) are saved and added to the next frame of data F(k+2) to get the output Y(k+1). Obviously, the output of each frame is 480 points.
[0087] This embodiment acquires an engine sound signal and constructs an engine mapping model based on the engine sound signal; acquires engine parameters in real time and determines an engine speed set based on the engine parameters; determines a target engine signal data set based on the engine mapping model and the engine speed set; and performs signal synthesis on the target engine signal data set to obtain a target engine sound synthesis result.
[0088] In summary, this embodiment decomposes the engine signal to construct an engine mapping model, determines target engine signal data through the engine mapping model, and synthesizes the engine sound based on the target engine signal data, making the engine sound synthesis result smoother.
[0089] Based on the first embodiment of the present application, in the second embodiment of the present application, the same or similar contents as those in the above embodiment 1 can be referred to the above introduction and will not be described in detail later. Figure 3 , step S10 further includes steps S101 to S104:
[0090] Step S101: acquiring an engine sound signal and dividing the engine sound signal into frames to obtain a multi-frame target engine sound signal;
[0091] It is understood that to ensure that the acquired engine sound signal is sufficiently comprehensive and covers the sound signals corresponding to multiple engine speeds, the engine sound signal can be generated by increasing the engine speed from a preset lower speed limit to a preset upper speed limit. The frame is then divided according to the frame length and frame shift.
[0092] In a feasible manner, the steps of acquiring an engine sound signal and dividing the engine sound signal into frames to obtain a multi-frame target engine sound signal include:
[0093] Acquire an engine sound signal generated when the engine speed increases from a preset lower speed limit to a preset upper speed limit;
[0094] The engine sound signal is divided into a plurality of frames of target engine sound signals according to a preset frame length and a preset frame shift, wherein the preset frame length is greater than the preset frame shift.
[0095] It should be noted that the process of obtaining the engine sound signal is to uniformly adjust the engine speed RPM from 1000 to 6000 rpm for 10 seconds. A 1 / 2-inch microphone with a sampling rate of 48kHz is used for recording. Assuming that the measured engine signal is x(n), where n represents the sampling point, the final received signal vector is [x(1), x(2), x(3)…x(n)]. In practical applications, it is impossible to use RPM with infinite resolution. That is, although RPM ranges from 1000 to 6000 and can be subdivided into 1000, 1001, 1002… or even finer, considering the data storage capacity limit, generally only one RPM is taken every few values, such as 1003, 1008, 1013… and so on. After framing and windowing, the signal is considered to be stable in this very short period of time, and its corresponding RPM is fixed. For example, if the RPM is 1008, theoretically this data should represent the data of RPM1006-1010, but it can be considered that the RPM represented by this data is 1008. Accordingly, when synthesizing, if the calculated RPM is 1006, then the nearest preset value 1008 is selected as its index value. After that, the engine signal needs to be framed. In this embodiment, the frame length is 640 and the frame shift is 480, that is, each frame of data is
[0096] frame(1):[x(1),x(2),x(3)…x(640)]
[0097] frame(2):[x(481),x(482),x(483)…x(1120)]
[0098] frame(3):[x(961),x(962),x(963)…x(1600)]
[0099] frame(k): and so on
[0100] Here, k represents the frame index, i.e., the kth frame signal. If the final count does not contain 640 points, the last frame is discarded. It's easy to see that the frame length represents the number of points in each frame, the frame shift represents the difference between the first points in each frame, and the frame length minus the frame shift represents the 160 points that overlap between frames.
[0101] Step S102: windowing the target engine sound signal of each frame to obtain a windowed engine signal;
[0102] It's important to note that after acquiring the target engine sound signal, it needs to be windowed. Windowing is the process of multiplying a finite-length signal by a finite-length window function. This process aims to reduce adverse effects caused by the finite length of the signal during frequency domain analysis, particularly spectral leakage.
[0103] In a feasible manner, the step of windowing each frame of the target engine sound signal to obtain a windowed engine signal includes:
[0104] Obtaining a windowing coefficient of the target engine sound signal of each frame according to a Hamming window function model;
[0105] Each frame of the target engine sound signal is multiplied by a windowing coefficient to obtain a windowed engine signal.
[0106] It is understandable that the window function used in this embodiment is an improved window of the Hamming window, and its expression is:
[0107]
[0108] Among them, hamming 320 (n) represents the nth point of a standard 320-point Hamming window. The image of this window function can be found in Figure 4 , Figure 4 This is a diagram of a Hamming window. Windowing is to multiply each frame of data by the window function one by one. The signal of each frame after windowing is:
[0109]
[0110] in Represents the Hadamard product (corresponding to multiplication).
[0111] Step S103: calculating the relative energy of the target engine sound signal in each frame, and determining the engine speed corresponding to the relative energy of the signal;
[0112] It is understandable that to calculate the relative energy of the target engine sound signal of each frame, it is necessary to first perform Fourier transform on the unwindowed signal of each frame and then calculate the energy, that is:
[0113] power(frame(k))=abs(fft 640 (frame(k)))
[0114] Among them, fft 640(·) represents the Fast Fourier Transform of 640 points, and abs represents the absolute value, which for complex numbers is equivalent to finding the RMS value (i.e., signal energy). This gives the relative energy of each frame's 640 points. Next, we select the RPM corresponding to the maximum value of power(frame(k)) as the frame index. For example, if the second frame represents an RPM range of 1005-1011.6, the calculation formula is as follows:
[0115] n*5000 / 480000+1000,n∈(481,1120)
[0116] The energy of each frequency of the signal is power(frame(2)). Through peak search, its maximum value is found at the 400th point, so the corresponding RPM is (400+481)*5000 / 480000+1000=1009.18, which is rounded to 1009. The RPM corresponding to the second frame data is 1009, instead of the preset 1008.
[0117] It should be noted that if the RPM values calculated in this manner for two adjacent frames are the same, the frame with the greater deviation will be assigned the preset RPM. For example, if the RPM calculated for the second and third frames is both 1011, the RPM for the second frame will be 1008 (deviation of 3 from 1011) and the RPM for the third frame will be 1011 (deviation of 2 from 1013).
[0118] Step S104: constructing an engine mapping model according to the windowed engine sound signal and the engine speed.
[0119] It should be noted that the corresponding relationship between the engine speed and the windowed engine sound signal can be determined by comparing the windowed engine sound signal and the engine speed, thereby constructing an engine mapping model.
[0120] In one feasible manner, determining the windowed engine sound signal corresponding to the engine speed to obtain a mapping list;
[0121] The mapping list is sorted according to the engine speed to obtain the engine speed and construct an engine mapping model.
[0122] It is understandable that each frame of windowed data F(k) corresponds to the RPM value of each frame of data. Arrange them in order of RPM size to obtain an engine mapping model of RPM and data frame F(k), which is convenient for subsequent synthesis operations.
[0123] This embodiment acquires an engine sound signal and frames the engine sound signal to obtain multiple frames of target engine sound signals; windowing is performed on each frame of the target engine sound signal to obtain a windowed engine signal; the relative signal energy of each frame of the target engine sound signal is calculated and the engine speed corresponding to the relative signal energy is determined; and an engine mapping model is constructed based on the windowed engine sound signal and the engine speed.
[0124] In summary, this embodiment constructs an engine mapping model by recording engine signals corresponding to different engine sounds, which provides a data source for subsequent engine sound synthesis and makes the engine sound synthesis result smoother.
[0125] For example, to help understand the implementation process of the engine sound synthesis method obtained by combining this embodiment with the above embodiment 1, please refer to Figure 5 , Figure 5 This paper provides a simplified flow chart of an engine sound synthesis method. Specifically, the signal decomposition stage begins with recording stationary engine sound data, segmenting and windowing it. Next, the energy of each frame's signal at different frequencies is calculated, and the RPM corresponding to the maximum frequency is selected to form an RPM-to-frame database, known as the engine mapping model. This phase then proceeds to the signal synthesis stage. First, the corresponding RPM is calculated based on engine parameters, namely vehicle speed information. Signal frames are selected based on the RPM, and the signal frame with the highest correlation is calculated. The signal frames are then synthesized and output to produce the resulting engine sound synthesis result.
[0126] It should be noted that the above examples are only used to understand the present application and do not constitute a limitation on the engine sound synthesis method of the present application. More simple transformations based on this technical concept are all within the scope of protection of the present application.
[0127] This application also provides an engine sound synthesis device, please refer to Figure 6 , the engine sound synthesis device comprises:
[0128] A construction module 10 is configured to obtain an engine sound signal and construct an engine mapping model based on the engine sound signal;
[0129] an acquisition module 20 for acquiring engine parameters in real time and determining an engine speed set according to the engine parameters;
[0130] a determination module 30, configured to determine a target engine signal data set according to the engine mapping model and the engine speed set;
[0131] The synthesis module 40 is configured to perform signal synthesis on the target engine signal data set to obtain a target engine sound synthesis result.
[0132] This embodiment acquires an engine sound signal and constructs an engine mapping model based on the engine sound signal; acquires engine parameters in real time and determines an engine speed set based on the engine parameters; determines a target engine signal data set based on the engine mapping model and the engine speed set; and performs signal synthesis on the target engine signal data set to obtain a target engine sound synthesis result.
[0133] In summary, this embodiment decomposes the engine signal to construct an engine mapping model, determines target engine signal data through the engine mapping model, and synthesizes the engine sound based on the target engine signal data, making the engine sound synthesis result smoother.
[0134] In one embodiment, the construction module 10 is further configured to obtain an engine sound signal, frame the engine sound signal, and obtain multiple frames of target engine sound signals; window each frame of the target engine sound signal to obtain a windowed engine signal; calculate the relative energy of each frame of the target engine sound signal, and determine the engine speed corresponding to the relative energy of the signal;
[0135] An engine mapping model is constructed according to the windowed engine sound signal and the engine speed.
[0136] In one embodiment, the construction module 10 is further used to obtain an engine sound signal generated when the engine speed increases from a preset lower speed limit to a preset upper speed limit; and divide the engine sound signal into multiple frames of target engine sound signals according to a preset frame length and a preset frame shift, where the preset frame length is greater than the preset frame shift.
[0137] In one embodiment, the construction module 10 is further configured to obtain a windowing coefficient of the target engine sound signal of each frame according to a Hamming window function model; and multiply the target engine sound signal of each frame by the windowing coefficient to obtain a windowed engine signal.
[0138] In one embodiment, the construction module 10 is further configured to determine the windowed engine sound signal corresponding to the engine speed to obtain a mapping list; sort the mapping list according to the engine speed to obtain an engine speed to construct an engine mapping model.
[0139] In one embodiment, the determination module 30 is further configured to determine a current engine speed and a historical engine speed based on the engine speed set;
[0140] Determine multiple pending engine data of the current engine speed based on the engine mapping model; obtain historical engine signal data corresponding to the historical engine speed; calculate the correlation between the multiple pending engine data and the historical engine signal data respectively; determine the current engine signal data from the multiple pending engine data based on the correlation; and obtain a target engine signal data set based on the historical engine signal data and the current engine signal data.
[0141] In one embodiment, the synthesis module 40 is further configured to obtain a plurality of engine signals to be synthesized based on the target engine signal data set, and determine a predecessor engine signal and a successor engine signal of the engine signal to be synthesized; determine predecessor overlapping data based on the engine signal to be synthesized and the predecessor engine signal, and determine successor overlapping data based on the engine signal to be synthesized and the successor engine signal; and overlap-add the engine signal to be synthesized and the predecessor overlapping data and discard the successor overlapping data to obtain a target engine sound synthesis result.
[0142] The engine sound synthesis device provided in this application, utilizing the engine sound synthesis method described in the aforementioned embodiment, can address the technical problem of achieving smoother engine sound synthesis results. Compared to the prior art, the engine sound synthesis device provided in this application achieves the same beneficial effects as the engine sound synthesis method described in the aforementioned embodiment. Other technical features of the engine sound synthesis device are the same as those disclosed in the aforementioned embodiment and are not further elaborated here.
[0143] The present application provides an engine sound synthesis device, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the engine sound synthesis method of the above-mentioned embodiment 1.
[0144] Reference below Figure 7 , which shows a schematic diagram of the structure of an engine sound synthesis device suitable for implementing the embodiments of the present application. The engine sound synthesis device in the embodiments of the present application can include, but is not limited to, mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Descriptions), PMPs (Portable Media Players), and in-vehicle terminals (such as in-vehicle navigation terminals), as well as fixed terminals such as digital TVs and desktop computers. Figure 7 The engine sound synthesis device shown is merely an example and should not limit the functions and scope of use of the embodiments of the present application.
[0145] like Figure 7As shown, the engine sound synthesis device may include a processing device 1001 (e.g., a central processing unit, a graphics processor, etc.), which can perform various appropriate actions and processes based on programs stored in a read-only memory (ROM) 1002 or programs loaded from a storage device 1003 into a random access memory (RAM) 1004. RAM 1004 also stores various programs and data required for the operation of the engine sound synthesis device. Processing device 1001, ROM 1002, and RAM 1004 are interconnected via a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Typically, the following systems may be connected to I / O interface 1006: input devices 1007 including, for example, a touchscreen, touchpad, keyboard, mouse, image sensor, microphone, accelerometer, gyroscope, etc.; output devices 1008 including, for example, a liquid crystal display (LCD), speaker, vibrator, etc.; storage device 1003 including, for example, a magnetic tape, hard disk, etc.; and communication device 1009. Communication device 1009 can allow the engine sound synthesis device to communicate with other devices wirelessly or by wire to exchange data. Although the figure shows an engine sound synthesis device with various systems, it should be understood that it is not required to implement or have all of the systems shown. More or fewer systems may be implemented or provided instead.
[0146] In particular, according to the embodiments disclosed in the present application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, the embodiments disclosed in the present application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program comprising program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network via a communication device, or installed from a storage device 1003, or installed from a ROM 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the method of the embodiment disclosed in the present application are executed.
[0147] The engine sound synthesis device provided in this application, utilizing the engine sound synthesis method described in the aforementioned embodiment, solves the technical problem of achieving smoother engine sound synthesis results. Compared to the prior art, the engine sound synthesis device provided in this application achieves the same beneficial effects as the engine sound synthesis method described in the aforementioned embodiment. Other technical features of this engine sound synthesis device are the same as those disclosed in the aforementioned embodiment and are not further elaborated here.
[0148] It should be understood that the various parts disclosed in this application can be implemented using hardware, software, firmware, or a combination thereof. In the description of the above embodiments, specific features, structures, materials, or characteristics can be combined in any one or more embodiments or examples in a suitable manner.
[0149] The above description is merely a specific embodiment of the present application, but the scope of protection of the present application is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in this application should be included in the scope of protection of this application. Therefore, the scope of protection of this application should be based on the scope of protection of the claims.
[0150] The present application provides a computer-readable storage medium having computer-readable program instructions (ie, computer program) stored thereon, wherein the computer-readable program instructions are used to execute the engine sound synthesis method in the above embodiment.
[0151] The computer-readable storage medium provided in this application may be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, systems or devices, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In this embodiment, the computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, system or device. The program code contained on the computer-readable storage medium may be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination thereof.
[0152] The computer-readable storage medium may be included in the engine sound synthesis device, or may exist independently without being incorporated into the engine sound synthesis device.
[0153] The computer-readable storage medium carries one or more programs. When the one or more programs are executed by the engine sound synthesis device, the engine sound synthesis device is caused to: obtain an engine sound signal and construct an engine mapping model based on the engine sound signal; obtain engine parameters in real time and determine an engine speed set based on the engine parameters; determine a target engine signal data set based on the engine mapping model and the engine speed set; and perform signal synthesis on the target engine signal data set to obtain a target engine sound synthesis result.
[0154] Computer program code for performing the operations of the present application may be written in one or more programming languages, or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a stand-alone software package, partially on the user's computer and partially on a remote computer, or entirely on the remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., through the Internet using an Internet service provider).
[0155] The flow charts and block diagrams in the accompanying drawings illustrate the possible architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present application. In this regard, each box in the flow chart or block diagram can represent a module, program segment or a part of code, and the module, program segment or a part of code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order than that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flow chart, and the combination of the boxes in the block diagram and / or flow chart can be implemented by a dedicated hardware-based system that performs the specified function or operation, or can be implemented by a combination of dedicated hardware and computer instructions.
[0156] The modules described in the embodiments of the present application may be implemented in software or hardware, wherein the name of a module does not necessarily limit the unit itself.
[0157] The computer-readable storage medium provided in this application stores computer-readable program instructions (i.e., a computer program) for executing the aforementioned engine sound synthesis method. This computer-readable storage medium addresses the technical problem of achieving smoother engine sound synthesis results. Compared to the prior art, the beneficial effects of the computer-readable storage medium provided in this application are similar to those of the engine sound synthesis method provided in the aforementioned embodiment and are not further elaborated here.
[0158] The present application also provides a computer program product, comprising a computer program, which implements the steps of the above-mentioned engine sound synthesis method when executed by a processor.
[0159] The computer program product provided in this application can solve the technical problem of how to make the engine sound synthesis result smoother. Compared with the existing technology, the beneficial effects of the computer program product provided in this application are the same as those of the engine sound synthesis method provided in the above embodiment, and will not be repeated here.
[0160] The above description is only part of the embodiments of the present application and does not limit the patent scope of the present application. All equivalent structural transformations made by using the contents of the present application specification and drawings under the technical concept of the present application, or direct / indirect application in other related technical fields are included in the patent protection scope of the present application.
Claims
1. A method for synthesizing an engine sound, characterized in that: The method includes: Acquiring an engine sound signal and constructing an engine mapping model based on the engine sound signal; acquiring engine parameters in real time, and determining an engine speed set based on the engine parameters; determining a target engine signal data set according to the engine mapping model and the engine speed set; Performing signal synthesis on the target engine signal data set to obtain a target engine sound synthesis result; The step of determining the target engine signal data set according to the engine mapping model and the engine speed set includes: determining a current engine speed and a historical engine speed based on the engine speed set; determining a plurality of pending engine data of the current engine speed according to the engine mapping model; Acquiring historical engine signal data corresponding to the historical engine speed; respectively calculating the correlation between the plurality of pending engine data and the historical engine signal data; determining current engine signal data from the plurality of pending engine data according to the correlation; A target engine signal data set is obtained according to the historical engine signal data and the current engine signal data.
2. The method according to claim 1, wherein The step of acquiring the engine sound signal and constructing the engine mapping model according to the engine sound signal includes: Acquire an engine sound signal, and divide the engine sound signal into frames to obtain a multi-frame target engine sound signal; Windowing the target engine sound signal of each frame to obtain a windowed engine signal; Calculating the relative energy of the target engine sound signal in each frame, and determining the engine speed corresponding to the relative energy of the signal; An engine mapping model is constructed according to the windowed engine sound signal and the engine speed.
3. The method according to claim 2, wherein The step of acquiring an engine sound signal and dividing the engine sound signal into frames to obtain a multi-frame target engine sound signal includes: Acquire an engine sound signal generated when the engine speed increases from a preset lower speed limit to a preset upper speed limit; The engine sound signal is divided into a plurality of frames of target engine sound signals according to a preset frame length and a preset frame shift, wherein the preset frame length is greater than the preset frame shift.
4. The method according to claim 2, wherein The step of windowing the target engine sound signal of each frame to obtain a windowed engine signal comprises: Obtaining a windowing coefficient of the target engine sound signal of each frame according to a Hamming window function model; Each frame of the target engine sound signal is multiplied by a windowing coefficient to obtain a windowed engine signal.
5. The method according to claim 2, wherein The step of constructing an engine mapping model according to the windowed engine sound signal and the engine speed includes: Determine the windowed engine sound signal corresponding to the engine speed and obtain a mapping list; The mapping list is sorted according to the engine speed to obtain the engine speed and construct an engine mapping model.
6. The method according to claim 1, wherein The step of performing signal synthesis on the target engine signal data set to obtain a target engine sound synthesis result comprises: Obtaining a plurality of engine signals to be synthesized according to the target engine signal data set, and determining a predecessor engine signal and a successor engine signal of the engine signal to be synthesized; determining predecessor overlapping data according to the engine signal to be synthesized and the predecessor engine signal, and determining subsequent overlapping data according to the engine signal to be synthesized and the subsequent engine signal; The target engine sound synthesis result is obtained by overlapping and adding the engine signal to be synthesized and the preceding overlapping data and discarding the subsequent overlapping data.
7. An engine sound synthesis device, characterized in that: The device comprises: A construction module, configured to obtain an engine sound signal and construct an engine mapping model according to the engine sound signal; an acquisition module, configured to acquire engine parameters in real time and determine an engine speed set based on the engine parameters; a determination module, configured to determine a target engine signal data set according to the engine mapping model and the engine speed set; a synthesis module, configured to perform signal synthesis on the target engine signal data set to obtain a target engine sound synthesis result; The step of determining the target engine signal data set according to the engine mapping model and the engine speed set includes: determining a current engine speed and a historical engine speed based on the engine speed set; determining a plurality of pending engine data of the current engine speed according to the engine mapping model; Acquiring historical engine signal data corresponding to the historical engine speed; respectively calculating the correlation between the plurality of pending engine data and the historical engine signal data; determining current engine signal data from the plurality of pending engine data according to the correlation; A target engine signal data set is obtained according to the historical engine signal data and the current engine signal data.
8. An engine sound synthesis device, characterized in that: The device includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the engine sound synthesis method according to any one of claims 1 to 6.
9. A storage medium, characterized in that: The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, the engine sound synthesis method according to any one of claims 1 to 6 is implemented.
Citation Information
Patent Citations
Sound synthetic method and device and electronic equipment
CN108032800A
Method, system, medium and equipment for improving sound quality of automobile engine simulation sound
CN118942441A