A siren identification and reminding method and system
By using an external microphone array and AI recognition technology, the system accurately filters and plays horn signals in a targeted manner, solving the problem that garbage truck horns are difficult to receive and improving driving safety and cabin comfort.
Patent Information
- Application Number
- CN202611313842.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-27
- Publication Date
- 2026-11-17
AI Technical Summary
In the quiet environment of the vehicle cabin, the horn signal of the garbage truck is difficult to be effectively received due to the high sound insulation performance of the sound insulation material, which makes it impossible for the driver to respond in time and affects driving safety. At the same time, the existing external sound pickup system transmits all the sound into the vehicle, which destroys the quietness of the cabin and causes driver fatigue.
The system collects ambient sound signals using an external microphone array, uses Mel frequency cepstral coefficient feature extraction and convolutional neural network to identify horn sounds, calculates the direction of the sound source, and determines the warning audio and speaker sound effect parameters based on the direction information, driving the speaker to play the warning audio.
Accurately filter and direct the horn signal to avoid irrelevant noise, allowing drivers to quickly identify the source of the horn and improve driving safety and comfort.
Smart Images

Figure CN123119952A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of vehicle safety technology, and more specifically, to a method and system for horn recognition and alerting. Background Technology
[0002] With the continuous development of automotive cabin comfort technology, automotive sound insulation and active noise cancellation technologies have been widely applied. Automakers use sound insulation materials in the vehicle body and active noise cancellation algorithms to suppress external noise, effectively reducing the ambient noise entering the vehicle and creating a quiet cabin environment for drivers and passengers.
[0003] However, garbage trucks often sound their horns or are sounded by other vehicles during transport. At this time, the high sound insulation performance will attenuate the acoustic signals outside the vehicle. When surrounding vehicles sound their horns to warn others, the horn signal is blocked by the vehicle body and the volume of the signal entering the vehicle is greatly reduced. This can easily cause the garbage truck driver to be unable to effectively receive the horn warning information. Moreover, the large size of garbage trucks poses a safety hazard to both the truck itself and other vehicles.
[0004] Currently, some garbage truck models are equipped with external sound pickup systems that directly import all ambient sounds collected from outside the vehicle into the cabin. This method does not classify or filter the sounds, and irrelevant noises such as construction noise, wind noise, and engine noise will be transmitted into the cabin, disrupting the quietness of the cabin. Prolonged and excessive noise input can also cause driver fatigue, making them less responsive to truly warning horn signals, thus compromising both comfort and safety.
[0005] Therefore, how to use the car horn to alert passengers in a quiet cabin environment while ensuring comfortable driving and improving driving safety is an issue that needs attention. Summary of the Invention
[0006] In view of the above problems, this application provides a horn recognition and reminder method and system to remind drivers to honk their horns outside the vehicle in a quiet environment inside the vehicle cabin, thereby improving driving safety while ensuring user comfort.
[0007] To achieve the above objectives, the following specific solutions are proposed:
[0008] A method for identifying and alerting users by honking a horn includes:
[0009] The system acquires ambient sound signals collected by an external microphone array, which includes multiple microphones deployed at different locations outside the vehicle body.
[0010] Extract the Mel frequency cepstral coefficient feature set of the environmental sound signal, and construct a feature vector using the Mel frequency cepstral coefficient feature set;
[0011] The feature vector is input into a pre-trained horn recognition model, and the output is a binary result of whether it is a horn sound and its confidence level.
[0012] When the binary search result is a horn sound and its confidence level is higher than the confidence level threshold, the directional information of the horn sound source is calculated based on the time difference between the reception of the ambient sound signal by each microphone.
[0013] Based on the location information, determine the warning audio and the sound effect parameters of the speakers in each location inside the vehicle;
[0014] Each of the speakers is driven to play the warning audio according to its sound parameters.
[0015] Optionally, the Mel-frequency cepstral coefficient feature set of the ambient sound signal is extracted, and a feature vector is constructed using the Mel-frequency cepstral coefficient feature set, including:
[0016] For each frame of the ambient sound signal, the multidimensional Mel frequency cepstral coefficient features of the signal are extracted, as well as the first-order and second-order difference features of each Mel frequency cepstral coefficient of the signal are extracted, and the logarithmic energy features of the signal are extracted.
[0017] Based on the multidimensional Mel frequency cepstral coefficient features, first-order difference features, and second-order difference features of each frame of signal, construct the Mel frequency cepstral coefficient feature set of the frame of signal;
[0018] Based on the Mel frequency cepstral coefficient feature set of each frame of signal, construct the feature vector of that frame of signal.
[0019] Optionally, when the binary search result is a horn sound and its confidence level is higher than the confidence level threshold, the directional information of the horn sound source is calculated based on the time difference between the arrival times of the horn sound source received by each of the microphones, including:
[0020] When each frame signal is identified as a horn sound by the horn recognition model, and the confidence level of the frame signal as a horn sound is higher than the confidence level threshold, it is determined whether several consecutive target frame signals within a preset time window are all identified as horn sounds with a confidence level higher than the confidence level threshold.
[0021] If so, the directional information of the horn source is calculated based on the time difference between the reception of the ambient sound signals by each microphone.
[0022] Optionally, calculating the directional information of the horn source based on the time difference between the reception of the ambient sound signals by each microphone includes:
[0023] The ambient sound signal received by each microphone in each subarray of the vehicle external microphone array is subjected to a generalized cross-correlation phase transform to obtain the time difference in which each microphone in that subarray receives the ambient sound signal.
[0024] The deviation angle in the direction of each subarray is calculated based on the time difference of the ambient sound signal obtained by each microphone in each subarray.
[0025] Based on the deflection angle in each subarray direction, the azimuth angle between the horn sound source and the vehicle's forward direction is determined, and azimuth information is generated based on the azimuth angle.
[0026] Optionally, each subarray in the external microphone array is equipped with two microphones;
[0027] The step of calculating the deviation angle in the direction of each subarray based on the time difference of the ambient sound signal obtained from each microphone in each subarray includes:
[0028] Using the following formula, the deviation angle in the direction of each subarray is calculated based on the time difference between the ambient sound signals obtained by each microphone in each subarray:
[0029]
[0030] in, The time difference for the two microphones in this subarray to obtain the ambient sound signal. The distance between the two microphones in this subarray. The speed of sound.
[0031] Optionally, the orientation information includes four directions: left, right, front, and rear, in the direction of vehicle travel, as well as the interior. The speakers in each direction inside the vehicle include a left speaker, a right speaker, a front speaker, and a rear speaker.
[0032] Based on the location information, determine the warning audio and the sound effect parameters of the speakers in each location inside the vehicle, including:
[0033] If the location information is not internal, then the warning audio is determined to be a preset electronic warning sound, and the gain of the speaker in the direction corresponding to the location information is increased, the gain of the speaker in the opposite direction of the location information is decreased, and the playback delay of the speaker in the opposite direction of the location information is increased.
[0034] If the location information is internal, then the warning audio is determined to be a horn playback, and the sound effect parameters of each speaker are determined to be standard gain and without delay.
[0035] Optionally, the method further includes:
[0036] Adjust the playback volume of the warning audio based on the decibel level of the in-vehicle noise, so that the playback volume is greater than the in-vehicle noise level.
[0037] Optionally, the method further includes:
[0038] When media audio is playing in the vehicle, the volume of the media audio is reduced before each speaker is driven to play the warning audio according to its sound effect parameters, and then restored to the original volume after the warning audio has finished playing.
[0039] Optionally, the model architecture of the horn recognition model is a network architecture that integrates convolutional neural networks and attention mechanisms. The model architecture includes a first convolutional layer, a second convolutional layer, a squeeze reward attention module, a bidirectional long short-term memory network temporal modeling layer, and a fully connected classification layer. The kernel size of the first convolutional layer is 3×3 and the number of channels is 64. The kernel size of the second convolutional layer is 5×5 and the number of channels is 128.
[0040] A horn recognition and alert system includes:
[0041] An external ambient sound acquisition module is used to acquire ambient sound signals collected by an external microphone array, wherein the external microphone array includes multiple microphones deployed at different locations outside the vehicle body;
[0042] The sound signal feature extraction module is used to extract the Mel frequency cepstral coefficient feature set of the environmental sound signal and construct a feature vector using the Mel frequency cepstral coefficient feature set;
[0043] The horn sound recognition module is used to input the feature vector into a pre-trained horn sound recognition model and output a binary result of whether it is a horn sound and its confidence level.
[0044] The sound source location identification module is used to calculate the location information of the horn sound source based on the time difference of the ambient sound signals received by each microphone when the binary result is a horn sound and its confidence level is higher than the confidence level threshold.
[0045] The sound effect parameter determination module is used to determine the warning audio based on the location information, and to determine the sound effect parameters of the speakers in each location inside the vehicle;
[0046] The in-vehicle warning playback module is used to drive each of the speakers to play the warning audio according to its sound effect parameters.
[0047] Optionally, the sound signal feature extraction module includes:
[0048] The feature extraction module is used to extract the multidimensional Mel frequency cepstral coefficient features of the signal for each frame of the environmental sound signal, as well as the first-order difference features and second-order difference features of each Mel frequency cepstral coefficient of the signal, and the logarithmic energy features of the signal.
[0049] The Mel frequency cepstral coefficient feature set construction module is used to construct the Mel frequency cepstral coefficient feature set of each frame of signal based on the multidimensional Mel frequency cepstral coefficient features, first-order difference features, and second-order difference features of each frame of signal.
[0050] The feature vector construction module is used to construct the feature vector of each frame of signal based on the Mel frequency cepstral coefficient feature set of each frame of signal.
[0051] Optionally, the sound source location identification module includes:
[0052] The continuous frame judgment module is used to determine whether several consecutive target frame signals within a preset time window are all recognized as horn sounds with a confidence level higher than the confidence threshold when each frame signal is identified as a horn sound by the horn recognition model and the confidence level of the frame signal as a horn sound is higher than the confidence threshold. If so, the module calculates the directional information of the horn sound source based on the time difference between the reception of the ambient sound signal by each microphone.
[0053] Optionally, the sound source location identification module further includes:
[0054] The signal time difference calculation module is used to perform a generalized cross-correlation phase transformation on the ambient sound signal received by each microphone in each subarray of the vehicle external microphone array to obtain the time difference between the acquisition of the ambient sound signal by each microphone in that subarray.
[0055] The bias angle calculation module is used to calculate the bias angle in the direction of each subarray based on the time difference of the ambient sound signal obtained by each microphone in each subarray.
[0056] The azimuth angle determination module is used to determine the azimuth angle between the horn sound source and the vehicle's forward direction based on the deviation angle in each subarray direction, and to generate azimuth information based on the azimuth angle.
[0057] Optionally, each subarray in the external microphone array is equipped with two microphones;
[0058] The bias angle calculation module includes:
[0059] The bias angle calculation submodule is used to calculate the bias angle in the direction of each subarray based on the time difference of the ambient sound signal obtained by each microphone in each subarray:
[0060]
[0061] in, The time difference for the two microphones in this subarray to obtain the ambient sound signal. The distance between the two microphones in this subarray. The speed of sound.
[0062] Optionally, the orientation information includes four directions: left, right, front, and rear, in the direction of vehicle travel, as well as the interior. The speakers in each direction inside the vehicle include a left speaker, a right speaker, a front speaker, and a rear speaker.
[0063] The sound effect parameter determination module includes:
[0064] The first sound effect parameter determination submodule is used to determine the warning audio as a preset electronic warning sound if the directional information is not internal, and to increase the gain of the speaker in the direction corresponding to the directional information, decrease the gain of the speaker in the opposite direction of the directional information, and increase the playback delay of the speaker in the opposite direction of the directional information.
[0065] The second sound effect parameter determination submodule is used to determine that if the location information is internal, the warning audio is a horn playback, and to determine that the sound effect parameters of each speaker are standard gain and no delay.
[0066] Optionally, the system may also include:
[0067] The warning volume adaptive adjustment module is used to adjust the playback volume of the warning audio according to the decibel value of the noise inside the vehicle, so that the playback volume is greater than the noise inside the vehicle.
[0068] Optionally, the system may also include:
[0069] The warning audio priority triggering module is used to reduce the volume of the media audio playback before driving each speaker to play the warning audio according to its sound effect parameters when media audio is being played in the vehicle, until the original volume of the media audio playback is restored after the warning audio playback is completed.
[0070] Optionally, the model architecture of the horn recognition model is a network architecture that integrates convolutional neural networks and attention mechanisms. The model architecture includes a first convolutional layer, a second convolutional layer, a squeeze reward attention module, a bidirectional long short-term memory network temporal modeling layer, and a fully connected classification layer. The kernel size of the first convolutional layer is 3×3 and the number of channels is 64. The kernel size of the second convolutional layer is 5×5 and the number of channels is 128.
[0071] By employing the aforementioned technical solution, this application acquires ambient sound signals collected by an external microphone array, which includes multiple microphones deployed at different locations outside the vehicle. It extracts the Mel-frequency cepstral coefficient feature set of the ambient sound signals and constructs a feature vector using this feature set. This feature vector is then input into a pre-trained horn recognition model, which outputs a binary result indicating whether the sound is a horn and its confidence level. When the binary result indicates a horn sound and its confidence level is higher than a confidence threshold, the model calculates the directional information of the horn source based on the time difference between the ambient sound signals received by each microphone. Based on this directional information, it determines the warning audio and the sound effect parameters of each speaker in the vehicle, driving each speaker to play the warning audio according to its sound effect parameters. Therefore, AI-powered horn recognition accurately filters valid horn signals, preventing irrelevant noise from entering the vehicle. Combined with sound source location calculation and directional playback within the vehicle, this allows the driver to quickly perceive the direction of the horn source, shortening the reaction time for emergency avoidance and thus improving driving safety while ensuring user comfort. Attached Figure Description
[0072] Various other advantages and benefits will become apparent to those skilled in the art upon reading the following detailed description of preferred embodiments. The accompanying drawings are for illustrative purposes only and are not intended to limit the scope of this application. Furthermore, the same reference numerals denote the same parts throughout the drawings. In the drawings:
[0073] Figure 1 This is a schematic diagram of a process for implementing horn recognition and alerting, provided in an embodiment of this application.
[0074] Figure 2 A schematic diagram of a layout for a vehicle speaker system that enables horn recognition and alerting, provided in an embodiment of this application.
[0075] Figure 3 This is a schematic diagram of a system module structure for implementing horn recognition and alerting, provided as an embodiment of this application. Detailed Implementation
[0076] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0077] This application solution can be implemented based on a terminal with data processing capabilities, which can be a driving system. Specifically, the core processing module of the driving system can be deployed below the sub-dashboard. The system power supply is taken from the vehicle's 12V / 24V power system, and after DC-DC (Direct Current to Direct Current) conversion, it provides two power supplies: 3.3V (digital logic power supply) and 5V (analog circuit power supply), with a power not exceeding 5W.
[0078] Next, combined Figure 1 The horn recognition and alert method of this application may include the following steps:
[0079] Step S110: Acquire the ambient sound signal collected by the external microphone array, wherein the external microphone array may include multiple microphones deployed in different locations outside the vehicle body.
[0080] Specifically, the external microphone array is connected to the core processing module via waterproof wiring harnesses, and differential signal transmission is used to reduce electromagnetic interference. This step can be accomplished by MEMS microphone arrays deployed at different physical locations on the exterior of the vehicle to capture acoustic signals. More specifically, the microphone array can be divided into a front sub-array and a rear sub-array, with the front sub-array positioned at the vehicle grille and the rear sub-array positioned above the license plate. Each microphone uses a waterproof and dustproof housing to adapt to the complex outdoor working environment of the vehicle. The system continuously samples the external sound field at a sampling rate of no less than 48kHz and a quantization accuracy of 16bit. The collected signals are transmitted to the main control ECU via differential wiring harnesses to suppress electromagnetic interference during vehicle operation. The collected ambient sounds include valid car horn sounds, as well as various interfering sound sources such as wind noise, road tire noise, conversations of surrounding people, construction noise, and engine noise from other vehicles. The microphone array maintains a multi-channel synchronous acquisition mode to ensure that the time reference of each pickup channel is aligned, providing a time consistency basis for subsequent sound source arrival time difference calculation. The raw audio data stream is temporarily buffered to avoid signal frame loss and ensure that there is complete original material for subsequent feature extraction and orientation calculation.
[0081] Understandably, by synchronously acquiring multiple channels of the external sound field, raw acoustic data is obtained at the hardware level. By deploying a regional array to provide multiple time-displaced signals for TDOA sound source localization, differential transmission avoids vehicle-mounted electromagnetic interference, and synchronous acquisition ensures the timing alignment of each channel.
[0082] Step S120: Extract the Mel frequency cepstral coefficient feature set of the ambient sound signal, and construct a feature vector using the Mel frequency cepstral coefficient feature set.
[0083] Specifically, after acquiring the original audio signal, signal preprocessing operations can be performed, including removing DC bias, pre-emphasis filtering, setting the pre-emphasis coefficient to 0.95-0.97 to compensate for high-frequency signal attenuation, and then performing frame-by-frame windowing processing with a frame length of 25ms and a frame shift of 10ms, using a Hamming window to reduce spectral leakage.
[0084] Specifically, for each frame of the environmental sound signal, the multidimensional Mel frequency cepstral coefficient features of the signal are extracted, as well as the first-order and second-order difference features of each Mel frequency cepstral coefficient of the signal, and the logarithmic energy features of the signal are extracted.
[0085] Understandably, the logarithmic energy feature reflects the total energy strength of the signal within an audio frame, used to distinguish effective acoustic signals from silence and low-amplitude noise. Horn signals exhibit a significant energy spike, while ambient noise generally has lower energy. This feature can supplement the amplitude dimension information beyond the MFCC spectral features, assisting the model in distinguishing horn sounds from background noise, improving the accuracy of horn recognition in complex driving scenarios, and reducing the probability of missed or false recognition.
[0086] Based on the multidimensional Mel frequency cepstral coefficient features, first-order difference features, and second-order difference features of each frame of signal, a Mel frequency cepstral coefficient feature set of the frame of signal is constructed.
[0087] Based on the Mel frequency cepstral coefficient feature set of each frame of signal, construct the feature vector of that frame of signal.
[0088] Specifically, the cepstral coefficients of each dimension of Mel frequency, their first-order difference, second-order difference, and logarithmic energy features obtained from a single frame of audio are spliced and combined to complete amplitude normalization processing, eliminate numerical deviations caused by volume fluctuations, and integrate to generate a complete one-dimensional feature vector for that frame, unifying data dimensions and formats to adapt to the input requirements of the subsequent horn recognition model.
[0089] For example, for each frame of audio, 13-dimensional fundamental Mel-Frequency Cepstral Coefficients (MFCCs) are calculated. The first and second differences of these coefficients are then obtained to capture the dynamic characteristics of the sound signal over time. These are then superimposed with the single-frame logarithmic energy features, resulting in a 40-dimensional feature set. Further, these multi-dimensional features are normalized to eliminate amplitude fluctuations caused by volume variations. The normalized features are then concatenated to form a single-frame feature vector. These multi-frame feature vectors constitute a temporal feature sequence. After format alignment according to the model input dimension requirements, invalid zero frames are removed, and a standardized feature sequence is output.
[0090] Understandably, MFCC and differential features are used to capture the unique spectral and temporal variation patterns of the horn. Normalization is then performed to eliminate volume interference, and frame-by-frame processing is used to adapt to the short-term stability characteristics of the sound. This reduces the dimensionality of complex audio into vectors that the model can process, significantly reducing the computational load of the model and improving recognition stability under complex noise conditions.
[0091] Step S130: Input the feature vector into the pre-trained horn recognition model and output the binary result of whether it is a horn sound and its confidence level.
[0092] The horn recognition model can be structured as a network architecture that integrates convolutional neural networks and an attention mechanism. Specifically, the model architecture may include a first convolutional layer, a second convolutional layer, a squeezed reward attention module, a bidirectional long short-term memory network temporal modeling layer, and a fully connected classification layer. The first convolutional layer has a 3×3 kernel size and 64 channels, while the second convolutional layer has a 5×5 kernel size and 128 channels.
[0093] Specifically, the feature vectors are fed into the horn recognition model, which has already been trained offline. The network model first uses two convolutional layers to extract local spectral features, then a squeezed reward attention module automatically assigns weights to the feature channels, strengthening key horn frequency bands and suppressing irrelevant noise bands. A bidirectional long short-term memory network temporal modeling layer models the temporal features, learning the temporal envelope variation characteristics of the horn sound. Finally, a fully connected classification layer outputs binary classification probability results. The model output includes two labels: horn sound and non-horn sound, along with corresponding confidence scores. The system settings allow configuration of the confidence threshold, with a default of 0.85 and a range of 0.70-0.95. Model inference is performed locally on the vehicle's ECU, without relying on the cloud, reducing network latency. After each frame of audio completes inference, the output labels and confidence scores are cached for use in the next stage's time window verification logic.
[0094] Step S140: When the binary search result is a horn sound and its confidence level is higher than the confidence level threshold, calculate the directional information of the horn sound source based on the time difference between the reception of the ambient sound signal by each microphone.
[0095] It's important to note that after the model outputs a horn label with a confidence level exceeding the threshold, it doesn't immediately confirm a horn event. The system activates a time window misidentification suppression mechanism, setting a default 500ms time window to verify the inference results of N consecutive frames (e.g., 3 frames, but adjustable to 2-5 frames) within that window. Only when all frames output high-confidence horn judgments is a genuine horn event confirmed, filtering out false triggers caused by transient impulse noise. Therefore, a binary result of a horn sound with a confidence level higher than the confidence threshold does not refer to the judgment result of a single frame, but rather the judgment results of multiple consecutive frames.
[0096] Specifically, when each frame signal is identified as a horn sound by the horn recognition model, and the confidence level of the frame signal as a horn sound is higher than the confidence level threshold, it is determined whether several consecutive target frame signals within the preset time window are all identified as horn sounds with a confidence level higher than the confidence level threshold. If not, the time window is canceled to wait for the next horn frame that is identified as a horn sound with a confidence level higher than the confidence level threshold before restarting the 500ms time window.
[0097] If so, the directional information of the horn source is calculated based on the time difference between the reception of ambient sound signals by each microphone.
[0098] Specifically, after confirming the horn blast, the system reads the multi-channel synchronous buffered audio from the microphone array. It then performs a GCC-PHAT generalized cross-correlation-phase transform operation on the signals from each microphone within the sub-array to calculate the time difference τ between the sound waves arriving at each microphone. Combining the physical distance d between the microphones and the speed of sound c = 340 m / s, the system calculates the sound source deflection angle using the arcsine formula. By combining the calculation results from each sub-array, the system obtains the absolute azimuth angle of the sound source relative to the vehicle. Finally, it divides the area into four regions—front, right, rear, and left—based on the angle intervals, and outputs standardized azimuth encoding information to the main controller.
[0099] Understandably, the continuous frame time window verification mechanism can suppress instantaneous noise false triggering. The generalized cross-correlation-phase transformation is used to solve the sound wave arrival time difference, calculate the sound source azimuth angle and map it to the vehicle body orientation, convert the acoustic signal into azimuth code, provide azimuth input for in-vehicle directional playback, and enable the system to determine the direction from which the horn is coming from.
[0100] Step S150: Based on the location information, determine the warning audio and the sound effect parameters of the speakers in each location inside the vehicle.
[0101] Specifically, after receiving the horn confirmation signal and location code, the system selects the warning audio mode. It supports two operating modes: original sound playback mode and electronic alert mode. Original sound playback mode plays the noise-reduced, real horn audio as the warning source. Electronic alert mode calls a preset "ding-dong" alert tone or a voice prompt saying "Watch out for oncoming traffic from XX direction," which users can freely switch between via the vehicle's settings interface. The system can configure two sets of key sound effect parameters—gain and playback delay—for each speaker channel in the left, right, front, and rear directions based on the location code. For example, when the horn comes from behind, the rear speaker gain is increased by +6dB to +10dB, the front speaker gain is attenuated by -3dB to -6dB, and a small playback delay of 0-5ms is applied to the opposite direction channel to enhance the driver's sense of spatial depth; corresponding gain and delay strategies are applied to other directions.
[0102] The sound effect parameters can also include volume (decibels i). The system can read the cabin background noise decibels collected by the in-vehicle reference microphone, and pre-calculate the base playback volume of the warning audio accordingly, ensuring that the warning audio is 10-15dB higher than the background noise to ensure the effect of the warning audio.
[0103] The sound effect parameters also include playback duration. Playback duration can be customized or set to follow the actual duration of horn blasts outside the vehicle. The shortest playback duration is no less than 500ms, and the longest is no more than 5 seconds, to avoid excessively long warning sounds interfering with driving.
[0104] Understandably, by combining the location of the sound source to select the warning sound source, configuring the gain and delay parameters of each speaker, simulating the difference in sound level and time between the two ears of the human ear to achieve in-vehicle sound image localization, and combining the pre-adjustment of the basic volume with the in-vehicle noise, the directional code is converted into multi-channel audio control parameters, thereby creating a more accurate and user-friendly directional auditory prompt for the driver.
[0105] Step S160: Drive each speaker to play the warning audio according to its sound effect parameters.
[0106] It is important to note that, considering the close relationship between warning audio and driving safety, to ensure that the warning audio clearly reminds the driver, during in-vehicle media audio playback, if warning audio needs to be played, it will receive the highest priority and be played first. Specifically, when media audio is playing in the vehicle, the volume of the media audio is reduced before each speaker plays the warning audio according to its sound parameters, and then restored to the original volume after the warning audio has finished playing.
[0107] The horn recognition and alert method provided in this embodiment acquires ambient sound signals collected by an external microphone array, which includes multiple microphones deployed at different locations outside the vehicle. It extracts the Mel-frequency cepstral coefficient feature set of the ambient sound signals and constructs a feature vector using this feature set. This feature vector is then input into a pre-trained horn recognition model, which outputs a binary result indicating whether the sound is a horn and its confidence level. When the binary result indicates a horn sound and its confidence level is higher than a confidence threshold, the model calculates the directional information of the horn source based on the time difference between the ambient sound signals received by each microphone. Based on this directional information, it determines the warning audio and the sound effect parameters of each speaker in the vehicle, driving each speaker to play the warning audio according to its sound effect parameters. Therefore, by using AI-based horn recognition to accurately filter valid horn signals and prevent irrelevant noise from entering the vehicle, combined with sound source location calculation and directional playback within the vehicle, the driver can quickly perceive the direction of the horn source, shortening the reaction time for emergency avoidance, thereby improving driving safety while ensuring user comfort.
[0108] In some embodiments of this application, the process of calculating the directional information of the horn source based on the time difference of the ambient sound signals received by each microphone, as mentioned in the foregoing embodiments, is described. This process may include:
[0109] S1. Perform a generalized cross-correlation phase transformation on the ambient sound signals received by each microphone in each subarray of the vehicle's external microphone array to obtain the time difference between the ambient sound signals received by each microphone in that subarray.
[0110] Specifically, after confirming the validity of the horn blast, the original audio segments synchronously acquired by the two microphones within the same subarray can be retrieved. The short-time signal frame corresponding to the horn blast is selected, and the GCC-PHAT generalized cross-correlation-phase transform algorithm is used for processing. This algorithm performs phase weighting on the signal spectrum, suppressing reverberation and multipath reflection interference caused by vehicle movement, and weakening the impact of signal amplitude differences on correlation peaks. The cross-correlation function of the two signals is calculated, and the peak position of the cross-correlation function is searched. This peak position corresponds to the time offset of the sound wave arriving at the two microphones, i.e., the signal arrival time difference. The above operation is performed independently on the two subarrays at the front and rear of the vehicle, respectively, and the arrival time difference results corresponding to each subarray are output and cached.
[0111] Understandably, by using the GCC-PHAT algorithm to solve for the time difference of sound waves arriving between microphones, phase weighting can resist acoustic reverberation and multipath interference in the driving environment, weaken the calculation deviation caused by signal amplitude, and ensure the stability of time difference calculation under complex in-vehicle sound fields.
[0112] S2. Calculate the bias angle in the direction of each subarray based on the time difference between the ambient sound signals obtained by each microphone in each subarray.
[0113] In this embodiment, the external microphone array contains a total of 4 microphones: two microphones in the front array and two microphones in the rear array. Based on this, the deflection angle of the subarray direction is:
[0114]
[0115] in, The time difference for the two microphones in this subarray to obtain the ambient sound signal. The distance between the two microphones in this subarray. The speed of sound is 340 m / s at room temperature.
[0116] In addition, if each subarray contains three or more microphones, the bias angle of each pair of microphones can be calculated using the above formula, and then the bias angles of each pair of microphones can be fused to obtain the bias angle of the subarray.
[0117] S3. Determine the azimuth angle between the horn source and the vehicle's forward direction based on the deviation angle in each subarray direction, and generate azimuth information based on the azimuth angle.
[0118] Understandably, since different subarrays have different deflection angles, the deflection angles of multiple subarrays can be fused to locate the specific position of the horn sound source, and then obtain the azimuth information of the vehicle relative to the horn sound source.
[0119] Specifically, the bias angles output from the front and rear subarrays are obtained, and the two sets of angle results are fused and verified to eliminate erroneous calculations caused by occlusion or noise from a single array. The overall calculation yields the global absolute azimuth angle of the horn source relative to the vehicle's direction of travel. The calculated azimuth angle is compared with preset angle partitioning thresholds to divide the vehicle into four azimuth regions: front, right, rear, and left. The physical angles are mapped into standardized digital codes, such as 00 for front, 01 for right, 10 for rear, and 11 for left, and encapsulated as structured azimuth information.
[0120] Understandably, fusing and verifying the angles of multiple subarrays reduces the calculation error of a single array, outputs a global azimuth angle relative to the vehicle's forward direction, and then maps it into a standardized azimuth code. This transforms the raw angles into azimuth information recognizable by the system, establishing a data link between the sound source localization module and the audio playback module, supporting the subsequent implementation of in-vehicle spatial sound and image directional alert functions.
[0121] In some embodiments of this application, the location information of the vehicle and the layout of the in-vehicle speakers mentioned in the foregoing embodiments are described, with reference to... Figure 2 A front speaker is positioned in front of the driver's seat, a rear speaker is positioned behind the driver's seat, a left speaker is positioned to the left of the driver's seat, and a right speaker is positioned to the right of the driver's seat. All four speakers are controlled and triggered by the ECU. The directional information mentioned in the aforementioned embodiment includes not only the azimuth angle and directional code of the horn sound source, but may also include directional information for indication, such as the four directions of the vehicle's direction of travel: left, right, front, and rear, as well as the interior.
[0122] Based on this, the process of determining the warning audio based on the location information and determining the sound effect parameters of the speakers in each location inside the vehicle, as mentioned in the foregoing embodiments, will be described. This process may include the following two scenarios:
[0123] 1) If the location information is not internal, the warning audio is set to the preset electronic warning sound, and the gain of the speaker in the direction corresponding to the location information is increased, the gain of the speaker in the opposite direction of the location information is decreased, and the playback delay of the speaker in the opposite direction of the location information is increased.
[0124] Specifically, when the main control module receives location information indicating that the horn is coming from any direction outside the vehicle—front, rear, left, or right—the system can switch the sound source to a preset electronic warning tone. This can be a short, sharp "ding-dong" sound or a directional voice announcement, with the content customizable on the vehicle's infotainment interface. The system increases the gain of the speaker in the direction of the horn (up 6dB to +10dB) and attenuates the gain of the speaker in the opposite direction (down 3dB to -6dB). Simultaneously, a 0-5ms playback delay is applied to the opposite speaker, utilizing the principles of binaural sound level difference and binaural time difference to construct a spatial sound image. The system synchronously reads the cabin background noise collected by the in-vehicle microphones and adaptively compensates for the warning tone's base volume, ensuring the warning tone is 10-15dB higher than the background noise. It then generates all channel gain and delay parameters and sends them to the execution module that drives the playback.
[0125] Understandably, using electronic warning sounds can avoid the problem of external horn sounds mixed with noise, resulting in a clean, clear, and less confusing warning tone. By increasing the gain of the speakers in the corresponding direction, attenuating the gain in the opposite direction, and adding a playback delay, the difference in sound levels and time between the two ears is simulated to synthesize a virtual sound source in the driver's seat, allowing the driver to intuitively perceive the direction of the horn. Combined with adaptive volume adjustment for in-vehicle noise, this balances the visibility of the warning, shortens the driver's reaction time to judge the direction of danger, and improves driving hazard avoidance efficiency.
[0126] 2) If the location information is internal, then the warning audio is determined to be a horn playback, and the sound effect parameters of each speaker are determined to be standard gain and without delay.
[0127] Specifically, when the location information indicates it's inside, it means the horn sound source is located within the interior area of the vehicle's enclosure, suggesting it's an active horn sound emitted by the vehicle itself. In this case, the system audio source can switch to the actual horn playback audio after noise reduction filtering, instead of the electronic alert tone. All in-vehicle speakers are configured with standard gain, without channel gain offset, and all channel playback delay is set to 0ms, with no directional imaging processing applied. Simultaneously, adaptive volume logic can still be executed, adjusting the playback volume based on the in-vehicle background noise to ensure the horn signal is clearly audible. The entire set of unified sound effect parameters is then sent to the warning playback module for output.
[0128] The following describes the system for implementing horn recognition and alerting provided in the embodiments of this application.
[0129] The system for implementing horn recognition and alert described below can be referred to in correspondence with the method for implementing horn recognition and alert described above.
[0130] See Figure 3 , Figure 3 This is a schematic diagram of a system module structure for implementing horn recognition and alerting, as disclosed in an embodiment of this application.
[0131] like Figure 3 As shown, the system may include:
[0132] The vehicle exterior ambient sound acquisition module 11 is used to acquire ambient sound signals collected by the vehicle exterior microphone array, which includes multiple microphones deployed in different locations outside the vehicle body.
[0133] The sound signal feature extraction module 12 is used to extract the Mel frequency cepstral coefficient feature set of the environmental sound signal and construct a feature vector using the Mel frequency cepstral coefficient feature set;
[0134] The horn sound recognition module 13 is used to input the feature vector into the pre-trained horn sound recognition model and output a binary result of whether it is a horn sound and its confidence level.
[0135] The sound source location identification module 14 is used to calculate the location information of the horn sound source based on the time difference of the environmental sound signal received by each microphone when the binary result is a horn sound and its confidence level is higher than the confidence level threshold.
[0136] The sound effect parameter determination module 15 is used to determine the warning audio based on the location information, and to determine the sound effect parameters of the speakers in each location inside the vehicle.
[0137] The in-vehicle warning playback module 16 is used to drive each of the speakers to play the warning audio according to its sound effect parameters.
[0138] Optionally, the sound signal feature extraction module includes:
[0139] The feature extraction module is used to extract the multidimensional Mel frequency cepstral coefficient features of the signal for each frame of the environmental sound signal, as well as the first-order difference features and second-order difference features of each Mel frequency cepstral coefficient of the signal, and the logarithmic energy features of the signal.
[0140] The Mel frequency cepstral coefficient feature set construction module is used to construct the Mel frequency cepstral coefficient feature set of each frame of signal based on the multidimensional Mel frequency cepstral coefficient features, first-order difference features, and second-order difference features of each frame of signal.
[0141] The feature vector construction module is used to construct the feature vector of each frame of signal based on the Mel frequency cepstral coefficient feature set of each frame of signal.
[0142] Optionally, the sound source location identification module includes:
[0143] The continuous frame judgment module is used to determine whether several consecutive target frame signals within a preset time window are all recognized as horn sounds with a confidence level higher than the confidence threshold when each frame signal is identified as a horn sound by the horn recognition model and the confidence level of the frame signal as a horn sound is higher than the confidence threshold. If so, the module calculates the directional information of the horn sound source based on the time difference between the reception of the ambient sound signal by each microphone.
[0144] Optionally, the sound source location identification module further includes:
[0145] The signal time difference calculation module is used to perform a generalized cross-correlation phase transformation on the ambient sound signal received by each microphone in each subarray of the vehicle external microphone array to obtain the time difference between the acquisition of the ambient sound signal by each microphone in that subarray.
[0146] The bias angle calculation module is used to calculate the bias angle in the direction of each subarray based on the time difference of the ambient sound signal obtained by each microphone in each subarray.
[0147] The azimuth angle determination module is used to determine the azimuth angle between the horn sound source and the vehicle's forward direction based on the deviation angle in each subarray direction, and to generate azimuth information based on the azimuth angle.
[0148] Optionally, each subarray in the external microphone array is equipped with two microphones;
[0149] The bias angle calculation module includes:
[0150] The bias angle calculation submodule is used to calculate the bias angle in the direction of each subarray based on the time difference of the ambient sound signal obtained by each microphone in each subarray:
[0151]
[0152] in, The time difference for the two microphones in this subarray to obtain the ambient sound signal. The distance between the two microphones in this subarray. The speed of sound.
[0153] Optionally, the orientation information includes four directions: left, right, front, and rear, in the direction of vehicle travel, as well as the interior. The speakers in each direction inside the vehicle include a left speaker, a right speaker, a front speaker, and a rear speaker.
[0154] The sound effect parameter determination module includes:
[0155] The first sound effect parameter determination submodule is used to determine the warning audio as a preset electronic warning sound if the directional information is not internal, and to increase the gain of the speaker in the direction corresponding to the directional information, decrease the gain of the speaker in the opposite direction of the directional information, and increase the playback delay of the speaker in the opposite direction of the directional information.
[0156] The second sound effect parameter determination submodule is used to determine that if the location information is internal, the warning audio is a horn playback, and to determine that the sound effect parameters of each speaker are standard gain and no delay.
[0157] Optionally, the system may also include:
[0158] The warning volume adaptive adjustment module is used to adjust the playback volume of the warning audio according to the decibel value of the noise inside the vehicle, so that the playback volume is greater than the noise inside the vehicle.
[0159] Optionally, the system may also include:
[0160] The warning audio priority triggering module is used to reduce the volume of the media audio playback before driving each speaker to play the warning audio according to its sound effect parameters when media audio is being played in the vehicle, until the original volume of the media audio playback is restored after the warning audio playback is completed.
[0161] Optionally, the model architecture of the horn recognition model is a network architecture that integrates convolutional neural networks and attention mechanisms. The model architecture includes a first convolutional layer, a second convolutional layer, a squeeze reward attention module, a bidirectional long short-term memory network temporal modeling layer, and a fully connected classification layer. The kernel size of the first convolutional layer is 3×3 and the number of channels is 64. The kernel size of the second convolutional layer is 5×5 and the number of channels is 128.
[0162] Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0163] The various embodiments in this specification are described in a progressive manner. Each embodiment focuses on the differences from other embodiments. The various embodiments can be combined as needed, and the same or similar parts can be referred to each other.
[0164] The above description of the disclosed embodiments enables those skilled in the art to make or use this application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of this application. Therefore, this application is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A siren identification alerting method, characterized by, include: The system acquires ambient sound signals collected by an external microphone array, which includes multiple microphones deployed at different locations outside the vehicle body. Extract the Mel frequency cepstral coefficient feature set of the environmental sound signal, and construct a feature vector using the Mel frequency cepstral coefficient feature set; The feature vector is input into a pre-trained horn recognition model, and the output is a binary result of whether it is a horn sound and its confidence level. When the binary search result is a horn sound and its confidence level is higher than the confidence level threshold, the directional information of the horn sound source is calculated based on the time difference between the reception of the ambient sound signal by each microphone. Based on the location information, determine the warning audio and the sound effect parameters of the speakers in each location inside the vehicle; Each of the speakers is driven to play the warning audio according to its sound parameters.
2. The method of claim 1, wherein, Extracting the Mel-frequency cepstral coefficient feature set of the ambient sound signal, and constructing a feature vector using the Mel-frequency cepstral coefficient feature set, including: For each frame of the ambient sound signal, the multidimensional Mel frequency cepstral coefficient features of the signal are extracted, as well as the first-order and second-order difference features of each Mel frequency cepstral coefficient of the signal are extracted, and the logarithmic energy features of the signal are extracted. Based on the multidimensional Mel frequency cepstral coefficient features, first-order difference features, and second-order difference features of each frame of signal, construct the Mel frequency cepstral coefficient feature set of the frame of signal; Based on the Mel frequency cepstral coefficient feature set of each frame of signal, construct the feature vector of that frame of signal.
3. The method of claim 2, wherein, When the binary search result is a horn sound and its confidence level is higher than the confidence threshold, the directional information of the horn sound source is calculated based on the time difference between the arrival times of the horn sound source received by each of the microphones, including: When each frame signal is identified as a horn sound by the horn recognition model, and the confidence level of the frame signal as a horn sound is higher than the confidence level threshold, it is determined whether several consecutive target frame signals within a preset time window are all identified as horn sounds with a confidence level higher than the confidence level threshold. If so, the directional information of the horn source is calculated based on the time difference between the reception of the ambient sound signals by each microphone.
4. The method of claim 1, wherein, The step of calculating the directional information of the horn source based on the time difference of the ambient sound signals received by each microphone includes: The ambient sound signal received by each microphone in each subarray of the vehicle external microphone array is subjected to a generalized cross-correlation phase transform to obtain the time difference in which each microphone in that subarray receives the ambient sound signal. The deviation angle in the direction of each subarray is calculated based on the time difference of the ambient sound signal obtained by each microphone in each subarray. Based on the deflection angle in each subarray direction, the azimuth angle between the horn sound source and the vehicle's forward direction is determined, and azimuth information is generated based on the azimuth angle.
5. The method of claim 4, wherein, Each subarray in the external microphone array is equipped with two microphones; The step of calculating the deviation angle in the direction of each subarray based on the time difference of the ambient sound signal obtained from each microphone in each subarray includes: Using the following formula, the deviation angle in the direction of each subarray is calculated based on the time difference between the ambient sound signals obtained by each microphone in each subarray: wherein a time difference of the ambient sound signals for the two microphones of the sub-array, a distance between the two microphones of the sub-array, is the speed of sound.
6. The method of claim 1, wherein, The directional information includes four directions: left, right, front, and rear, in the direction of vehicle movement, as well as the interior. The speakers in each direction inside the vehicle include a left speaker, a right speaker, a front speaker, and a rear speaker. Based on the location information, determine the warning audio and the sound effect parameters of the speakers in each location inside the vehicle, including: If the location information is not internal, then the warning audio is determined to be a preset electronic warning sound, and the gain of the speaker in the direction corresponding to the location information is increased, the gain of the speaker in the opposite direction of the location information is decreased, and the playback delay of the speaker in the opposite direction of the location information is increased. If the location information is internal, then the warning audio is determined to be a horn playback, and the sound effect parameters of each speaker are determined to be standard gain and without delay.
7. The method of claim 1, wherein, Also includes: Adjust the playback volume of the warning audio based on the decibel level of the in-vehicle noise, so that the playback volume is greater than the in-vehicle noise level.
8. The method of claim 1, wherein, Also includes: When media audio is playing in the vehicle, the volume of the media audio is reduced before each speaker is driven to play the warning audio according to its sound effect parameters, and then restored to the original volume after the warning audio has finished playing.
9. The method according to any one of claims 1 to 8, characterized in that, The horn recognition model has a network architecture that integrates convolutional neural networks and attention mechanisms. The model architecture includes a first convolutional layer, a second convolutional layer, a squeeze reward attention module, a bidirectional long short-term memory network temporal modeling layer, and a fully connected classification layer. The first convolutional layer has a kernel size of 3×3 and 64 channels, while the second convolutional layer has a kernel size of 5×5 and 128 channels.
10. A siren identification alert system, characterized by, include: An external ambient sound acquisition module is used to acquire ambient sound signals collected by an external microphone array, wherein the external microphone array includes multiple microphones deployed at different locations outside the vehicle body; The sound signal feature extraction module is used to extract the Mel frequency cepstral coefficient feature set of the environmental sound signal and construct a feature vector using the Mel frequency cepstral coefficient feature set; The horn sound recognition module is used to input the feature vector into a pre-trained horn sound recognition model and output a binary result of whether it is a horn sound and its confidence level. The sound source location identification module is used to calculate the location information of the horn sound source based on the time difference of the ambient sound signals received by each microphone when the binary result is a horn sound and its confidence level is higher than the confidence level threshold. The sound effect parameter determination module is used to determine the warning audio based on the location information, and to determine the sound effect parameters of the speakers in each location inside the vehicle; The in-vehicle warning playback module is used to drive each of the speakers to play the warning audio according to its sound effect parameters.
