Vehicle sound effect generation method and apparatus, device, and storage medium
By acquiring and processing the audio data of real vehicles, the sound resources of virtual vehicle sound effects are generated, and the problem of lack of characteristics and recognition in traditional racing games has solved the problem of lack of characteristics and recognition in the traditional racing games, and achieved the effect of personalized sound effects and improving user experience.
Patent Information
- Application Number
- PCT/CN2024/101227
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-07-21
- Filing Date
- 2024-06-25
- Publication Date
- 2025-01-30
AI Technical Summary
The vehicle sound effects in traditional racing games lack characteristics and are seriously homogenized, resulting in low recognition and difficult to remember.
By obtaining the audio recording files of the preset parts in the real vehicle, the audio data is extracted according to the default frequency parameter of the preset site, and the sound resource of the real vehicle corresponds to the virtual vehicle in the virtual scene.
Make sound resources closer to the sound of real vehicles, provide personalized vehicle sound effects, and improve the user experience.
Smart Images

Figure CN2024101227_30012025_PF_FP_ABST
Abstract
Description
Vehicle sound effect generation method, device, equipment and storage medium
[0001] CROSS-REFERENCE TO RELATED APPLICATIONS
[0002] This disclosure claims priority to Chinese patent application number 202310908361.5, filed on July 21, 2023, entitled “A method, device, apparatus and storage medium for generating vehicle sound effects”, the entire contents of which are incorporated herein by reference. Technical Field
[0003] The present disclosure relates to the field of audio technology, and in particular to a method, apparatus, device, and storage medium for generating vehicle sound effects. Background Art
[0004] In traditional game sound development methods, most vehicle sound effects for racing games can only be produced using a library of assets. These assets are all relatively uniform, making it impossible to highlight the sound characteristics of the vehicle and making most vehicle sound effects similar, making it impossible to differentiate between different vehicle sound effects.
[0005] In traditional racing games, the vehicle sound effects have no obvious characteristics and are highly homogenized, making it difficult to have high recognition and difficult to be remembered.
[0006] Summary of the Invention
[0007] The purpose of the present disclosure is to address the deficiencies in the above-mentioned related technologies. The present disclosure provides a vehicle sound effect generation method, device, equipment and storage medium to solve the problems such as low vehicle sound effect recognition in the related technologies.
[0008] To achieve the above objectives, the technical solutions adopted in the embodiments of the present disclosure are as follows:
[0009] In a first aspect, an embodiment of the present disclosure provides a method for generating vehicle sound effects, the method comprising:
[0010] Obtain audio recording files of preset locations in a real vehicle;
[0011] Acquiring audio data of the preset part from the audio recording file according to the preset frequency parameter corresponding to the preset part;
[0012] According to the audio data of the preset part, a sound effect resource of the preset part in the virtual vehicle corresponding to the real vehicle in the virtual scene is generated.
[0013] In a second aspect, an embodiment of the present disclosure provides a vehicle sound effect generating device, the device comprising:
[0014] A first acquisition module is configured to execute acquisition of an audio recording file of a preset location in a real vehicle;
[0015] A second acquisition module is configured to acquire audio data of the preset part from the audio recording file according to a preset frequency parameter corresponding to the preset part;
[0016] The generating module is configured to generate the sound effect resources of the preset part of the virtual vehicle corresponding to the real vehicle in the virtual scene according to the audio data of the preset part.
[0017] In a third aspect, an embodiment of the present disclosure provides an electronic device, comprising: a processor and a storage medium, wherein the processor and the storage medium are communicatively connected via a bus, the storage medium stores program instructions executable by the processor, and the processor calls the program stored in the storage medium to execute the steps of the vehicle sound effect generation method as described in any one of the first aspects.
[0018] In a fourth aspect, an embodiment of the present disclosure provides a storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the steps of the vehicle sound effect generation method as described in any one of the first aspects are executed.
[0019] Compared with the related art, the present disclosure has the following beneficial effects:
[0020] This disclosure provides a vehicle sound effect generation method, device, equipment, and storage medium. These methods obtain audio recordings of preset locations in a real vehicle; then, based on preset frequency parameters corresponding to the preset locations, extract audio data from the audio recordings; and, based on the audio data, generate sound effect resources for the corresponding preset locations in a virtual vehicle in a real vehicle scene. This makes the sound effect resources more similar to the sounds of a real vehicle, provides personalized vehicle sound effects, and enhances the user experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] In order to more clearly illustrate the technical solutions of the embodiments of the present disclosure, the following briefly introduces the drawings required for use in the embodiments. It should be understood that the following drawings only illustrate certain embodiments of the present disclosure and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other relevant drawings can be obtained based on these drawings without creative work.
[0022] FIG1 is a schematic diagram of a process of generating a vehicle sound effect provided by the present disclosure;
[0023] FIG2 is a flow chart of a method for generating turbine audio data according to one embodiment of the present disclosure;
[0024] FIG3 is a flow chart of a method for extracting raw audio data of a turbine according to one embodiment of the present disclosure;
[0025] FIG4 is a flow chart of a method for generating audio data of a turbine according to one embodiment of the present disclosure;
[0026] FIG5 is a flow chart of a method for processing raw audio data of a turbine according to one embodiment of the present disclosure;
[0027] FIG6 is a flow chart of a method for generating tempered audio data according to one embodiment of the present disclosure;
[0028] FIG7 is a flow chart of a method for generating virtual scene sound effect resources according to one embodiment of the present disclosure;
[0029] FIG8 is a flow chart of a method for generating a turbo sound effect resource according to one embodiment of the present disclosure;
[0030] FIG9 is a flow chart of a method for generating a backfire sound effect resource according to one embodiment of the present disclosure;
[0031] FIG10 is a schematic diagram of a vehicle sound effect generating device provided by one embodiment of the present disclosure;
[0032] FIG11 is a schematic diagram of an electronic device provided in accordance with one embodiment of the present disclosure.
[0033] Icons: 1001 - first acquisition module, 1002 - second acquisition module, 1003 - generation module, 1101 - processor, 1102 - storage medium. DETAILED DESCRIPTION
[0034] To make the objectives, technical solutions, and advantages of the embodiments of the present disclosure more clear, the technical solutions of the embodiments of the present disclosure will be clearly and completely described below in conjunction with the accompanying drawings of the embodiments of the present disclosure. Obviously, the described embodiments are only some of the embodiments of the present disclosure, but not all of them. Generally, the components of the embodiments of the present disclosure described and shown in the drawings herein can be arranged and designed in various different configurations.
[0035] Therefore, the following detailed description of the embodiments of the present disclosure provided in the accompanying drawings is not intended to limit the scope of the present disclosure as claimed, but merely represents selected embodiments of the present disclosure. All other embodiments derived by persons of ordinary skill in the art based on the embodiments of the present disclosure without creative effort shall fall within the scope of protection of the present disclosure.
[0036] It should be noted that similar reference numerals and letters denote similar items in the following drawings, and therefore, once an item is defined in one drawing, it does not need to be further defined or explained in subsequent drawings.
[0037] In addition, the terms "first", "second", etc., if used, are merely used to distinguish and describe, and should not be understood as indicating or implying relative importance.
[0038] It should be noted that, in the absence of conflict, the features in the embodiments of the present disclosure may be combined with each other.
[0039] In order to provide more realistic sound effects, the present disclosure provides a vehicle sound effect generation method, apparatus, device, and storage medium.
[0040] Before describing a vehicle sound effect generation method provided by the present disclosure, the vehicle sound effect is first explained. In a virtual scene (eg, a game scene), commonly used vehicle sound effects include: turbine sound effect and backfire sound effect.
[0041] A vehicle's turbine consists of two rotating impellers, one located between the intake and exhaust ducts. Exhaust gas flows from the engine's exhaust port into the turbocharger's exhaust impeller, causing it to spin. When the accelerator is pressed, the vehicle's engine begins to run. At this point, the turbocharger's impeller begins to rotate, drawing in air and compressing it. The moment the turbocharger begins to spin, the turbo activation sound is triggered. Typically, this sound includes the sounds of the turbocharger starting and accelerating, such as a high-pitched hissing sound. As the vehicle accelerates and the turbocharger spools up, the turbo activation sound gradually becomes louder and higher-pitched. As the turbocharger operates, pressure in the intake system continues to rise. At this time, the turbo pressure relief valve installed in the intake system is primed to operate. The turbo pressure relief valve opens when pressure reaches a set threshold, releasing high-pressure air into the atmosphere through the pressure relief valve, thereby relieving pressure on the turbocharger and intake system. A distinctive "whooshing" sound is emitted when the pressure relief valve opens, due to the vortex created inside the pressure relief valve as the high-pressure air is released.
[0042] The above is the working principle and sound characteristics of the turbine. The high-frequency hissing sound of the turbine running, the high-frequency sound of the turbine accelerating, and the hissing sound of the turbine pressure relief valve are exactly the sounds that need to be picked up.
[0043] When a car is driving at high speed or braking suddenly, the engine produces a large amount of exhaust gas, which is discharged into the intake manifold. When the exhaust gas encounters unburned fuel in the intake manifold, it will reignite, producing a strong popping sound. This phenomenon is called "backfire."
[0044] The following is an explanation of a vehicle sound effect generation method provided by the present disclosure using a specific example. FIG1 is a flow chart of a vehicle sound effect generation method provided by the present disclosure. The execution subject of the method may be an electronic device, which may be a device with computing and processing capabilities, such as a desktop computer, a laptop computer, etc. As shown in FIG1 , the method includes:
[0045] S101. Obtain an audio recording file of a preset location in a real vehicle.
[0046] A recording device is provided at a preset location in the real vehicle to record sounds made by the real vehicle during operation to form an audio recording file. The audio recording file of the preset location in the real vehicle is obtained from the recording device.
[0047] It should be noted that due to the limitations of the recording environment, the audio recording file contains not only the sound emitted by the real vehicle during operation, but also the ambient noise.
[0048] S102: Acquire audio data of the preset part from the audio recording file according to the preset frequency parameter corresponding to the preset part.
[0049] The audio recording file contains all the actual vehicle sounds and ambient noise. The preset frequency parameters corresponding to the preset locations can characterize the frequency characteristics of the audio data at the preset locations. Based on the preset frequency parameters corresponding to the preset locations, the audio data at the preset locations can be extracted from the audio recording file. This ensures that the audio data only contains the sounds from the preset locations of the vehicle.
[0050] S103 , generating sound effect resources for the preset parts of the virtual vehicle corresponding to the real vehicle in the virtual scene according to the audio data of the preset parts.
[0051] For example, the audio data for a preset location can be directly used as a sound effect resource for the preset location in the virtual vehicle corresponding to the real vehicle in the virtual scene. Alternatively, the audio data for the preset location can be refined to generate a sound effect resource for the preset location in the virtual vehicle corresponding to the real vehicle in the virtual scene. This makes the sound effect resource more similar to the sound of the real vehicle, providing personalized vehicle sound effects and improving the user experience.
[0052] In summary, in this embodiment, an audio recording file for a preset location in a real vehicle is obtained; audio data for that location is retrieved from the audio recording file based on the preset frequency parameters corresponding to that location; and based on the audio data for that location, a sound effect resource is generated for the real vehicle in the virtual scene corresponding to the preset location in the virtual vehicle. This makes the sound effect resource more similar to the sound of a real vehicle, providing personalized vehicle sound effects and enhancing the user experience.
[0053] Based on the embodiment corresponding to Figure 1, the embodiment of the present disclosure further provides a method for generating turbo audio data. Figure 2 is a flow chart of a method for generating turbo audio data provided by the embodiment of the present disclosure.
[0054] In this embodiment, the preset part includes: a turbine.
[0055] The recording device can be placed at the turbo blow-off valve, using a DPA 4062 microphone. Due to the extremely narrow location of the turbo blow-off valve and the extremely high sound pressure levels generated by the blow-off valve, conventional microphones struggle to withstand these high levels. The DPA 4062, despite its compact size, can withstand a maximum sound pressure level of 144dB SPL and boasts a dynamic range of 123dB, making it ideal for recording turbo blow-off valve effects.
[0056] The recording device can be set up at the turbine, using a DPA 2011 microphone. The DPA 2011 features a supercardioid pattern, effectively isolating ambient noise from the sides while maintaining high sensitivity to forward sound sources. As the turbine rotates, the vehicle's engine also runs, and using a supercardioid pattern minimizes interference from the engine's sound, allowing for clean recording of the turbine's operating sound. Furthermore, the DPA 2011 has a maximum sound pressure level of 154dB SPL, which is sufficient for capturing turbine sound effects.
[0057] As shown in FIG. 2 , before obtaining audio data of a preset part from an audio recording file according to a preset frequency parameter corresponding to the preset part in S102 , the method further includes:
[0058] S201: Extracting original audio data of the turbine from an audio recording file.
[0059] Audio recordings primarily contain turbine audio data and engine audio data near the turbine. Extracting the original turbine audio data from the audio recordings allows for more accurate turbine sound effects.
[0060] The step of obtaining audio data of a preset part from an audio recording file according to a preset frequency parameter corresponding to the preset part in S103 includes:
[0061] S202 : Obtaining turbine signature audio data from the original audio data of the turbine according to a preset frequency parameter corresponding to the turbine.
[0062] For example, the signature audio may be: hiss sound effect and spindle sound effect, and the signature audio can more prominently represent the sound characteristics of the turbine sound effect.
[0063] The original audio data of the turbine includes audio data of multiple frequencies, and in order to present the logo audio data of the turbine, the logo audio data of the turbine is obtained from the original audio data of the turbine according to the preset frequency parameters corresponding to the turbine.
[0064] For example, the reference frequency in the preset frequency parameters corresponding to the turbine is 2000 Hz, and the audio data near 2000 Hz (such as 1980 Hz-2020 Hz, where the frequency difference is 20 Hz) in the original audio data of the turbine can be used as the signature audio data of the turbine.
[0065] S203: loop processing the turbine logo audio data to generate turbine audio data.
[0066] In order to play the logo audio data smoothly and coherently in the virtual scene, the turbine logo audio data is looped to generate a loopable loop segment. Finally, the turbine audio data is generated.
[0067] Furthermore, the audio data of the turbine includes both the loop-processed mark audio data and the original audio data of the turbine.
[0068] In summary, in this embodiment, the preset part includes the turbine; the original audio data of the turbine is extracted from the audio recording file; the turbine signature audio data is obtained from the original audio data of the turbine according to the preset frequency parameters corresponding to the turbine; and the turbine signature audio data is looped and processed to generate the turbine audio data. Thus, the turbine audio data is accurately generated.
[0069] Based on the embodiment corresponding to FIG2 , the present disclosure further provides a method for extracting raw audio data of a turbine. FIG3 is a flow chart of a method for extracting raw audio data of a turbine provided by the present disclosure. As shown in FIG3 , extracting raw audio data of a turbine from an audio recording file in S201 includes:
[0070] S301 , determining a turbine sounding time period from the recording time of the audio recording file according to preset square wave parameters and the audio waveform of the audio recording file.
[0071] The waveform of turbine audio is square wave, and it is a periodic square wave. Engine audio is mostly triangle wave or sawtooth wave.
[0072] According to the preset square wave parameters of the turbine audio and the audio waveform of the audio recording file, the time period in which the turbine emits sound is determined from the entire recording time of the audio recording file.
[0073] S302: Extracting original audio data of the turbine from the audio recording file according to the turbine sounding time period.
[0074] According to the turbine sounding time period, the audio data of the corresponding time period of the audio recording file is used as the original audio data of the turbine.
[0075] In summary, in this embodiment, based on the preset square wave parameters and the audio waveform of the audio recording file, the turbine sound period is determined from the recording time of the audio recording file. Based on the turbine sound period, the original audio data of the turbine is extracted from the audio recording file. Thus, the original audio data of the turbine is accurately extracted.
[0076] Based on the embodiment corresponding to Figure 2, the embodiment of the present disclosure further provides a method for extracting original audio data of a turbine. Figure 3 is a flow chart of a method for extracting original audio data of a turbine provided by the embodiment of the present disclosure.
[0077] The preset frequency parameters corresponding to the turbine include: a preset reference frequency and a preset semitone frequency difference.
[0078] In the evenly tempered musical system, a semitone is the smallest pitch difference. Therefore, a semitone pitch difference is used as the threshold for indicating pitch change in audio data, meaning the frequency variation is within 26.16 Hz. This frequency difference is used for conversion and judgment, replacing scanning and analysis of engine sounds.
[0079] The frequency ratio between two semitones is 2^(1 / 12)≈1.05946. Therefore, we can first determine the fundamental frequency of a note (such as A4, 440hz) and further use this ratio to calculate the frequency of a note that is a semitone higher or lower.
[0080] For example, if you move from A4 (440hz) up a semitone (A#4, Bb4), its frequency will be: 440hz×2^(1 / 12)≈466.16hz; if you move from A4 down a semitone (Ab4, G#4), its frequency will be: 440hz÷2^(1 / 12)≈415.30hz.
[0081] Therefore, the frequency difference between two semitones is:
[0082] 466.16 Hz - 440 Hz = 26.16 Hz, or 440 Hz - 415.3 Hz = 24.7 Hz.
[0083] As shown in FIG3 , in S202 , based on the preset frequency parameter corresponding to the turbine, the turbine signature audio data is obtained from the original audio data of the turbine, including:
[0084] The turbine's signature audio data is obtained from the turbine's original audio data according to a preset reference frequency and a preset semitone frequency difference corresponding to the turbine.
[0085] For example, if the preset base frequency is 2000 Hz and the preset half-tone frequency difference is 26.16 Hz or 24.7 Hz, the frequency intervals of the marker audio data can be determined to be 1973.84 Hz-2026.16 Hz, 1975.3 Hz-2026.16 Hz, and 1975.3 Hz-2024.7 Hz. The turbine's marker audio data is obtained from the turbine's original audio data based on the frequency intervals of the marker audio data.
[0086] In summary, in this embodiment, the turbine signature audio data is obtained from the turbine's original audio data based on the preset reference frequency and the preset semitone frequency difference corresponding to the turbine, thereby accurately obtaining the turbine signature audio data.
[0087] Based on the embodiment corresponding to FIG2 , the present disclosure further provides a method for generating turbine audio data. FIG4 is a flow chart of a method for generating turbine audio data provided by the present disclosure. As shown in FIG4 , in S203 , the turbine signature audio data is cyclically processed to generate the turbine audio data, including:
[0088] S401. Perform loop processing on the turbine logo audio data according to a preset duration to generate loop audio of the turbine.
[0089] For example, the preset duration is 2 seconds, and the turbine logo audio data is looped and spliced so that the duration of the turbine loop audio exceeds 2 seconds.
[0090] S402: Smoothing the volume of the looped audio of the turbine to generate audio data of the turbine.
[0091] Smooths the volume at the joints of looped audio. Using a preset attenuation curve, the tail of the previous audio marker is smoothed, gradually decreasing the volume. Using a preset growth curve, the beginning of the next audio marker is smoothed, gradually increasing the volume. This reduces the abruptness of the loop joints and creates smoother audio data, improving the user experience.
[0092] In summary, in this embodiment, the turbine's signature audio data is looped according to a preset duration to generate the turbine's looped audio; and the volume of the turbine's looped audio is smoothed to generate the turbine's audio data. This makes the looped audio's splicing less abrupt, improving the user experience.
[0093] Based on the embodiment corresponding to FIG2 , the present disclosure further provides a method for processing raw audio data of a turbine. FIG5 is a flow chart of the method for processing raw audio data of a turbine provided by the present disclosure. As shown in FIG5 , in S103 , audio data of a preset portion is obtained from an audio recording file based on a preset frequency parameter corresponding to the preset portion, and the method further includes:
[0094] S501. According to a preset fundamental frequency range and a preset mid-high frequency range of the engine sound, data in the fundamental frequency range of the original audio data of the turbine is filtered out, and the volume of the mid-high frequency range of the original audio data of the turbine is reduced.
[0095] For example, the base frequency of the preset engine sound is 120 Hz, the base frequency range may be 110 Hz-130 Hz, the mid-high frequency of the preset engine sound is 6000 Hz, and the mid-high frequency range may be 5990-6010 Hz.
[0096] For example, the volume of the high frequency range in the original audio data of the turbine may be reduced by 5 dB.
[0097] S502: Perform noise reduction processing on the filtered original audio data of the turbine to generate audio data of the turbine.
[0098] The original audio data of the turbine after filtering is divided into multiple frequency sub-bands, the audio data of the multiple frequency sub-bands are filtered and denoised respectively, and the audio data of the multiple frequency sub-bands after filtering and denoising are merged to generate the audio data of the turbine.
[0099] In summary, in this embodiment, based on the preset fundamental frequency range and mid-high frequency range of the engine sound, the fundamental frequency range of the raw turbine audio data is filtered out, and the volume of the mid-high frequency range of the raw turbine audio data is reduced. Noise reduction is then performed on the filtered raw turbine audio data to generate the turbine audio data. This makes the turbine audio data more accurate.
[0100] Based on the embodiment corresponding to Figure 1 , the embodiment of the present disclosure further provides a method for generating tempered audio data. Figure 6 is a flow chart of a method for generating tempered audio data provided by the embodiment of the present disclosure.
[0101] Preset locations include: exhaust pipe.
[0102] Recording equipment can be placed on the exhaust pipe, using microphones such as the DPA 4062, DPA 4007, Shure SM58, or Shure 52A. These microphones not only have extremely high maximum sound pressure levels (SPLs) but also boast a wide frequency response, effectively capturing the low and extreme low frequencies of a vehicle's backfire. The low frequencies captured in the original recording will be fuller and more robust than those added later.
[0103] As shown in FIG6 , the step S103 of obtaining audio data of a preset part from an audio recording file according to a preset frequency parameter corresponding to the preset part includes:
[0104] S601 : Acquire the backfire original audio data of the exhaust pipe from the original audio data of the exhaust pipe according to the preset frequency parameter of the backfire.
[0105] The backfire sound produced by the exhaust pipe is more prominent than the exhaust sound produced by the exhaust pipe. The frequency of the backfire sound produced by the exhaust pipe is higher than the frequency of the exhaust sound produced by the exhaust pipe. Therefore, the original audio data of the exhaust pipe with a frequency greater than or equal to the preset backfire frequency parameter is used as the original audio data of the exhaust pipe backfire.
[0106] S602: Smoothing the tail volume of the tempered original audio data to generate tempered audio data.
[0107] A preset attenuation curve is used to smooth the tail volume of the return original audio data, so that the tail volume gradually decreases, improving the user experience.
[0108] In summary, in this embodiment, the preset location includes the exhaust pipe; based on the preset frequency parameters of the backfire, the original audio data of the exhaust pipe is obtained from the original audio data of the exhaust pipe; and the volume of the tail of the original audio data of the backfire is smoothed to generate the backfire audio data. Thus, the backfire audio data is obtained and the user experience is improved.
[0109] Based on the embodiment corresponding to FIG2 , the present disclosure further provides a method for generating virtual scene sound effect resources. FIG7 is a flow chart of a method for generating virtual scene sound effect resources provided by the present disclosure. As shown in FIG7 , in S103 , based on the audio data of the preset location, generating sound effect resources for the preset location of the virtual vehicle corresponding to the real vehicle in the virtual scene includes:
[0110] S701: compress the volume fluctuation range of the audio data of the preset portion to generate compressed audio data of the preset portion.
[0111] During actual recording, the loudness at the beginning of the sound may be too loud, while the loudness at the end of the sound may be too soft, resulting in poor audio volume balance and excessive dynamic range, thus affecting the overall audio effect.
[0112] The volume fluctuation range of the audio data in the preset part is compressed, which reduces the gap between the maximum and minimum values of the audio data, so that the compressed audio data achieves a more balanced volume effect.
[0113] S702: Perform frequency and volume equalization on the compressed audio data of the preset portion to generate sound effect resources of the preset portion.
[0114] Boost or reduce different frequencies in a preset portion of compressed audio data, changing the sound's timbre, pitch, and volume balance. This balances the frequency and volume levels, generating a sound effect resource for the preset portion.
[0115] In summary, in this embodiment, the volume fluctuation range of the audio data in a preset location is compressed to generate compressed audio data for that location. The frequency and volume of the compressed audio data in that location are then balanced to generate sound effect resources for that location. This allows for precise generation of sound effect resources for that location, improving the user experience.
[0116] Based on the embodiment corresponding to FIG7 , the present disclosure further provides a method for generating a turbine sound effect resource. FIG8 is a flow chart of a method for generating a turbine sound effect resource provided by the present disclosure. If the preset portion includes a turbine, as shown in FIG8 , in S701 , the audio data of the preset portion is compressed within a volume fluctuation range to generate compressed audio data of the preset portion, including:
[0117] S801: Using preset compression parameters of the turbine, compress the audio data of the turbine within a volume fluctuation range to generate compressed audio data of the turbine.
[0118] For example, the preset compression parameters for a turbine include: threshold, attack time, release time, compression ratio, and gain adjustment. The threshold refers to the threshold at which compression begins when the signal strength exceeds the threshold. The compression ratio refers to the ratio of the output data to the input data after the signal exceeds the threshold. A higher ratio setting results in less compression, meaning the output data changes less relative to the input data.
[0119] For example, consider the Turbine audio data with an attack of -9dB and a tail of -28dB. Set the threshold to -15dB, the compression ratio to 3:1, the gain adjustment to 5dB, the attack time to 1ms, and the release time to 10ms. Since the gain adjustment is 5dB, the entire audio segment will be boosted by 5dB. When the signal strength exceeds -15dB, the compressor compresses the output signal, reducing the amplitude above the threshold to one-third of its original amplitude. With both the attack and release times set to their fastest, the compressor immediately activates when the pressure relief valve effect exceeds -15dB and stops when it falls below the threshold. After this processing, the Turbine audio data has an attack of -6.1dB and a tail of -20dB. The overall loudness of the Turbine audio data becomes more balanced, the dynamic range is reduced, and the tail of the sound effect is better expressed.
[0120] In S702, the frequency and volume of the compressed audio data of the preset portion are balanced to generate the sound effect resource of the preset portion, including:
[0121] S802: Using preset equalization parameters of the turbine, perform frequency and volume equalization on the compressed audio data of the turbine to generate a sound effect resource of the turbine.
[0122] For example, the preset equalization parameters for Turbine include the high frequency, low frequency, bandwidth, and gain of the original audio data. For example, if the high frequency of the original audio data is 8 kHz, the low frequency is 100 Hz, the bandwidth is 2, and the gain is -5 dB, then the low-frequency noise with a bandwidth of 2 around 100 Hz and the high-frequency noise with a bandwidth of 2 around 8 kHz will be attenuated by -5 dB.
[0123] For example, the preset equalization parameters of the marker audio data after loop processing include: the high-frequency point, low-frequency point, characteristic frequency point, and gain of the marker audio data. For example, the high-frequency point of the marker audio data is 3kHz, the low-frequency point is 12kHz, the characteristic frequency point is 6kHz, and the gain is 5dB. Then, audio data with frequencies below 3kHz and above 12kHz are filtered out, and audio data with a frequency of 6kHz is enhanced by 5dB. It should be noted that after filtering and denoising the engine sound, the frequency that best represents the marker audio data becomes 6kHz.
[0124] In summary, in this embodiment, if the preset part includes a turbine, the preset compression parameters of the turbine are used to compress the volume fluctuation range of the turbine audio data to generate compressed turbine audio data; and the preset equalization parameters of the turbine are used to equalize the frequency and volume of the compressed turbine audio data to generate the turbine sound effect resource. Thus, the turbine sound effect resource is accurately generated, improving the user experience.
[0125] Based on the embodiment corresponding to FIG7 , the present disclosure further provides a method for generating a flashback sound effect resource. FIG9 is a flow chart illustrating a method for generating a flashback sound effect resource provided by the present disclosure. If the preset location includes an exhaust pipe, as shown in FIG9 , in S701 , the audio data of the preset location is compressed within a volume fluctuation range to generate compressed audio data of the preset location, including:
[0126] S901: Using preset compression parameters of tempering, compress the volume fluctuation range of tempered audio data to generate tempered compressed audio data.
[0127] For example, the preset compression parameters of the backfire include: threshold, attack time, release time, compression ratio and gain adjustment. The specific compression principle is similar to the compression processing of the audio data of the turbine in the above embodiment, and will not be repeated here.
[0128] In S702, the frequency and volume of the compressed audio data of the preset portion are balanced to generate the sound effect resource of the preset portion, including:
[0129] S902: Using preset equalization parameters of tempering, equalize the frequency and volume of the tempered compressed audio data to generate a tempering sound effect resource.
[0130] For example, the preset equalization parameters for back-testing include: a characteristic frequency point that identifies the audio data, a low-frequency range, and a gain. For example, if the characteristic frequency point is 4 kHz, the low-frequency range is 50 Hz-200 Hz, and the gain is 5 dB, then the audio data with a frequency of 50 Hz-200 Hz will be attenuated by 5 dB. Meanwhile, the audio data with a frequency of 4 kHz will be boosted by 5 dB.
[0131] In summary, in this embodiment, if the preset location includes an exhaust pipe, the preset compression parameters for backfire are used to compress the volume fluctuation range of the backfire audio data to generate compressed exhaust pipe audio data; and the preset equalization parameters for backfire are used to equalize the frequency and volume of the compressed exhaust pipe audio data to generate a backfire sound effect resource. This allows for precise generation of the backfire sound effect resource, improving the user experience.
[0132] The following describes a vehicle sound effect generation device, equipment, and storage medium provided by the present disclosure for implementation. The specific implementation process and technical effects are described above and will not be repeated below.
[0133] FIG10 is a schematic diagram of a vehicle sound effect generating device provided by an embodiment of the present disclosure. As shown in FIG10 , the device includes:
[0134] The first acquisition module 1001 is configured to acquire an audio recording file of a preset location in a real vehicle.
[0135] The second acquisition module 1002 is configured to acquire audio data of a preset part from an audio recording file according to a preset frequency parameter corresponding to the preset part.
[0136] The generating module 1003 is configured to generate sound effect resources of the preset parts of the virtual vehicle corresponding to the real vehicle in the virtual scene according to the audio data of the preset parts.
[0137] Furthermore, the second acquisition module 1002 is specifically configured to execute, the preset parts include: turbine; extract the original audio data of the turbine from the audio recording file; obtain the turbine's logo audio data from the original audio data of the turbine according to the preset frequency parameters corresponding to the turbine; loop process the turbine's logo audio data to generate the turbine's audio data.
[0138] Furthermore, the second acquisition module 1002 is specifically configured to determine the turbine sound time period from the recording time of the audio recording file based on the preset square wave parameters and the audio waveform of the audio recording file; and extract the original audio data of the turbine from the audio recording file based on the turbine sound time period.
[0139] Furthermore, the second acquisition module 1002 is further configured to acquire the turbine signature audio data from the original audio data of the turbine according to a preset reference frequency and a preset semitone frequency difference corresponding to the turbine.
[0140] Furthermore, the second acquisition module 1002 is specifically configured to execute loop processing of the turbine's logo audio data according to a preset duration to generate the turbine's loop audio; and to smooth the volume of the turbine's loop audio to generate the turbine's audio data.
[0141] Furthermore, the second acquisition module 1002 is specifically configured to filter out the data in the fundamental frequency range of the turbine's original audio data according to the fundamental frequency range of the preset engine sound and the mid-high frequency range of the preset engine sound, and reduce the volume of the mid-high frequency range of the turbine's original audio data; perform noise reduction processing on the filtered original audio data of the turbine to generate audio data of the turbine.
[0142] Furthermore, the second acquisition module 1002 is specifically configured to execute, where the preset location includes: the exhaust pipe; obtaining the backfire original audio data of the exhaust pipe from the original audio data of the exhaust pipe according to the preset frequency parameter of the backfire; and smoothing the tail volume of the backfire original audio data to generate the backfire audio data.
[0143] Furthermore, the generation module 1003 is specifically configured to perform compression of the volume fluctuation range of the audio data of the preset part to generate compressed audio data of the preset part; and perform frequency and volume equalization on the compressed audio data of the preset part to generate sound effect resources of the preset part.
[0144] Furthermore, the generation module 1003 is specifically configured to execute, if the preset parts include: a turbine; using the preset compression parameters of the turbine, compressing the volume fluctuation range of the turbine's audio data, and generating compressed audio data of the turbine; using the preset equalization parameters of the turbine, equalizing the frequency and volume of the compressed audio data of the turbine, and generating the sound effect resources of the turbine.
[0145] Furthermore, the generation module 1003 is specifically configured to execute, if the preset part includes: an exhaust pipe; using the preset compression parameters of tempering, compressing the volume fluctuation range of the tempered audio data, and generating compressed audio data of the exhaust pipe; using the preset equalization parameters of tempering, equalizing the frequency and volume of the compressed audio data of the exhaust pipe, and generating a tempering sound effect resource.
[0146] FIG11 is a schematic diagram of an electronic device provided in an embodiment of the present disclosure, which may be a device with computing and processing functions.
[0147] The electronic device includes: a processor 1101 and a storage medium 1102. The processor 1101 and the storage medium 1102 are connected via a bus.
[0148] The storage medium 1102 is used to store programs, and the processor 1101 calls the programs stored in the storage medium 1102 to execute the above method embodiment. The specific implementation methods and technical effects are similar and will not be repeated here.
[0149] Optionally, the present disclosure also provides a storage medium, including a program, which is used to execute the above-mentioned method embodiment when executed by a processor. In the several embodiments provided in the present disclosure, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are merely schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0150] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected to achieve the purpose of this embodiment according to actual needs.
[0151] In addition, the functional units in the various embodiments of the present disclosure may be integrated into a single processing unit, each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or in the form of hardware plus software functional units.
[0152] The above-mentioned integrated unit implemented in the form of a software functional unit can be stored in a storage medium. The above-mentioned software functional unit is stored in a storage medium and includes a number of instructions for causing a computer device (which can be a personal computer, server, or network device, etc.) or a processor (English: processor) to execute some steps of the method described in each embodiment of the present disclosure. The aforementioned storage medium includes: a USB flash drive, a mobile hard disk, a read-only memory (English: Read-Only Memory, abbreviated: ROM), a random access memory (English: Random Access Memory, abbreviated: RAM), a magnetic disk or an optical disk, and other media that can store program code.
Claims
1. A method for generating vehicle sound effects, the method comprising: Get audio recording files of preset parts in real vehicles; Acquiring audio data of the preset part from the audio recording file according to the preset frequency parameter corresponding to the preset part; According to the audio data of the preset part, the sound effect resource of the preset part in the virtual vehicle corresponding to the real vehicle in the virtual scene is generated.
2. The method according to claim 1, wherein: The preset parts include: turbine; Before acquiring the audio data of the preset part from the audio recording file according to the preset frequency parameter corresponding to the preset part, the method further includes: extracting raw audio data of the turbine from the audio recording file; The step of acquiring the audio data of the preset part from the audio recording file according to the preset frequency parameter corresponding to the preset part includes: According to the preset frequency parameter corresponding to the turbine, acquiring the signature audio data of the turbine from the original audio data of the turbine; The logo audio data of the turbine is processed in a loop to generate the audio data of the turbine.
3. The method according to claim 2, wherein: The step of extracting the original audio data of the turbine from the audio recording file comprises: Determine the turbine sounding time period from the recording time of the audio recording file according to the preset square wave parameters and the audio waveform of the audio recording file; According to the turbine sounding time period, original audio data of the turbine is extracted from the audio recording file.
4. The method according to claim 2, wherein: The preset frequency parameters corresponding to the turbine include: a preset reference frequency and a preset semitone frequency difference; and obtaining the signature audio data of the turbine from the original audio data of the turbine according to the preset frequency parameters corresponding to the turbine includes: The turbine marker audio data is obtained from the original audio data of the turbine according to the preset reference frequency and the preset semitone frequency difference corresponding to the turbine.
5. The method according to claim 2, wherein: The loop processing of the turbine logo audio data to generate the turbine audio data includes: According to a preset duration, loop processing is performed on the logo audio data of the turbine to generate loop audio of the turbine; The volume of the loop audio of the turbine is smoothed to generate audio data of the turbine.
6. The method according to claim 2, wherein: The step of acquiring the audio data of the preset part from the audio recording file according to the preset frequency parameter corresponding to the preset part further includes: According to the fundamental frequency range of the preset engine sound and the mid-high frequency range of the preset engine sound, the data of the fundamental frequency range in the original audio data of the turbine is filtered out, and the volume of the mid-high frequency range in the original audio data of the turbine is reduced; The filtered original audio data of the turbine is subjected to noise reduction processing to generate audio data of the turbine.
7. The method according to claim 1, wherein: The preset parts include: an exhaust pipe; The step of acquiring the audio data of the preset part from the audio recording file according to the preset frequency parameter corresponding to the preset part includes: According to a preset frequency parameter of the backfire, acquiring the backfire original audio data of the exhaust pipe from the original audio data of the exhaust pipe; The tail volume of the tempered original audio data is smoothed to generate tempered audio data.
8. The method according to claim 1, wherein: The step of generating the sound effect resource of the preset part of the virtual vehicle corresponding to the real vehicle in the virtual scene according to the audio data of the preset part includes: The volume fluctuation range of the audio data of the preset part is compressed to generate the compressed audio data of the preset part. Frequency data; The frequency and volume of the compressed audio data of the preset part are balanced to generate the sound effect resource of the preset part.
9. The method according to claim 8, wherein: If the preset part includes: a turbine; The step of compressing the volume fluctuation range of the audio data of the preset part to generate the compressed audio data of the preset part includes: Using the preset compression parameters of the turbine, compressing the audio data of the turbine within a volume fluctuation range to generate compressed audio data of the turbine; The step of performing frequency and volume balancing on the compressed audio data of the preset part to generate the sound effect resource of the preset part includes: The preset equalization parameters of the turbine are used to equalize the frequency and volume of the compressed audio data of the turbine to generate the sound effect resources of the turbine.
10. The method according to claim 8, wherein: If the preset location includes: an exhaust pipe; The step of compressing the volume fluctuation range of the audio data of the preset part to generate the compressed audio data of the preset part includes: Using preset compression parameters of tempering, compressing the volume fluctuation range of the tempered audio data to generate tempered compressed audio data; The step of performing frequency and volume balancing on the compressed audio data of the preset part to generate the sound effect resource of the preset part includes: The preset equalization parameters of tempering are used to equalize the frequency and volume of the tempered compressed audio data to generate a tempering sound effect resource.
11. A vehicle sound effect generating device, the device comprising: A first acquisition module is configured to execute acquisition of an audio recording file of a preset position in a real vehicle; A second acquisition module is configured to acquire the audio data of the preset part from the audio recording file according to the preset frequency parameter corresponding to the preset part; The generation module is configured to execute, based on the audio data of the preset part, generating the sound effect resource of the preset part in the virtual vehicle corresponding to the real vehicle in the virtual scene.
12. An electronic device comprising: A processor and a storage medium, wherein the processor and the storage medium are communicatively connected via a bus, the storage medium stores program instructions executable by the processor, and the processor calls the program stored in the storage medium to execute the steps of the vehicle sound effect generation method as described in any one of claims 1 to 10.
13. A storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, executes the steps of the vehicle sound effect generation method according to any one of claims 1 to 10.
Citation Information
Patent Citations
Method and device for stereophonic depiction of virtual noise sources in vehicle
CN108401210A
Method and device for recognizing position of virtual object, mobile terminal and storage medium
CN109550248A
Audio control method and device, electronic equipment and storage medium
CN114225411A
Audio particle extraction method and device, sound synthesis method and device, equipment and medium
CN115662470A
Vehicle sound effect generation method, device and equipment and storage medium
CN116778884A