Warning sound control method and device, equipment and storage medium
By configuring an audio signal processor in the vehicle system chip, dynamically adjusting the sound source and tuning parameters of low-speed pedestrian alarm sound, the problems of high debugging and high resource utilization in the existing technology are solved, and flexible, safe and high-quality warnings are achieved Sound control.
Patent Information
- Application Number
- CN202411243709.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-05
- Publication Date
- 2024-12-06
- Estimated Expiration
- 2044-09-05
AI Technical Summary
The existing low-speed pedestrian alarm sound system is difficult to debug, difficult to guarantee sound quality and high resource utilization, especially in the case of high CPU load, sound stuttering may occur, affecting the user experience.
Configure an audio signal processor in the vehicle system chip, monitor the vehicle gear and speed, dynamically adjust the sound source and tuning parameters, and use preset audio libraries and buffers to achieve warning sound control, reduce system resource occupation, and improve sound adaptability and quality.
It realizes flexible warning sound control, enhances driving safety, reduces hardware resource usage, ensures sound quality, and simplifies hardware design and saves costs.
Smart Images

Figure CN119091659A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of electronic control units, and in particular to a warning sound control method, device, equipment and storage medium. Background Art
[0002] In the context of the rapid development of intelligent transportation systems, the importance of low-speed pedestrian warning sound systems as a key link in improving road safety has become increasingly prominent. The realization of low-speed pedestrian warning sound is to send clear and easily recognizable warning sounds to pedestrians around, effectively reminding pedestrians to pay attention to the dynamics of surrounding vehicles, especially when the vehicle is driving at a low speed or about to pass through a densely populated area, thereby reducing traffic accidents caused by blind spots and distraction, and ensuring safe interaction between pedestrians and vehicles. In related technologies, the generation of low-speed pedestrian warning sounds is mainly achieved through two methods. One is the real-time audio synthesis technology based on the digital signal processor (DSP), which can mix waveforms of multiple frequencies in real time through algorithms to generate sound signals with specific characteristics; the other is to use a fixed sound source for loop playback, that is, pre-recording and storing one or more warning sound files, and looping these files through the system to generate warning sounds when needed.
[0003] However, on the one hand, although DSP-based audio synthesis technology can achieve dynamic adjustment of sound, it is difficult to debug the sound, the sound quality is difficult to guarantee, and the hardware resources are high, which affects the pedestrians' auditory experience; on the other hand, the loop playback of fixed sound sources lacks flexibility and cannot be adaptively adjusted according to the real-time environment. It is difficult to adapt to the complex and changeable traffic environment, and the sound may be stuck when the CPU (central processing unit) is under high load, affecting the user experience. Summary of the invention
[0004] In order to provide a basic understanding of some aspects of the disclosed embodiments, a brief summary is given below. The summary is not an extensive review, nor is it intended to identify key / critical components or delineate the scope of protection of these embodiments, but rather serves as a prelude to the detailed description that follows.
[0005] In view of the above-mentioned shortcomings of the prior art, the present application discloses a warning sound control method, device, equipment and storage medium to solve at least one of the above-mentioned technical problems.
[0006] In a first aspect, the present application provides a warning sound control method, which is applied to an audio signal processor configured in a system chip in a vehicle, the method comprising: receiving the current gear position and speed of the vehicle monitored by the system chip; reading a preset audio library according to the gear position, obtaining a target audio file and caching it in a preset buffer, wherein the preset audio library stores audio files corresponding to different sound source modes, and there is a mapping relationship between the gear position and the sound source mode, and the preset buffer is arranged in the audio signal processor; matching tuning parameters in the target audio file according to the vehicle speed to determine the target tuning parameters, the target audio file including a target sound source and different tuning parameters, and there is a mapping relationship between the vehicle speed and the tuning parameters; after performing audio processing on the target sound source based on the target tuning parameters, sending it to the speaker for playback to achieve warning sound control.
[0007] In one embodiment of the present application, before receiving the current gear position and speed of the vehicle monitored by the system chip, it also includes: creating middleware in the system chip, and establishing a connection between the audio signal processor and the control unit in the vehicle through the middleware; if the system chip is started, running the middleware, monitoring the gear position and the vehicle speed currently collected by the control unit, and forwarding the gear position and the vehicle speed to the audio signal processor.
[0008] In one embodiment of the present application, the receiving of the current gear position and speed of the vehicle monitored by the system chip includes: creating a data flow path connecting the audio signal processor to the speaker, the nodes in the data flow path are integrated with an alarm program, the alarm program runs on the audio signal processor to realize warning sound control; using the middleware to generate a start request for activating the data flow path, and transmitting it to the audio signal processor, the start request carries a unique identification number of the data flow path; in response to the start request, activating the data flow path; if the middleware receives feedback that the data flow path is successfully activated, the gear position and the vehicle speed are sent to the alarm program.
[0009] In one embodiment of the present application, before reading the preset audio library according to the gear position, it also includes: determining the number of gear positions of the vehicle, and configuring the sound sources with the same number of gear positions; determining the speed range of the vehicle at low speed under different gear positions, and configuring the tuning parameters corresponding to each speed in each speed range; binding each gear position of the vehicle to a different audio mode, respectively, and the audio mode and the sound source have a one-to-one correspondence; constructing an audio file according to the sound source and each tuning parameter associated with the same sound source mode, and storing it in the preset audio library.
[0010] In one embodiment of the present application, the audio processing of the target sound source based on the target tuning parameters includes: calculating the target number of frames of the target sound source at the target playback speed according to the preset playback time and the preset sampling rate, and the target tuning parameters include the target playback speed and the target playback volume; if the target playback speed of the target sound source is greater than the preset speed threshold, resampling the target sound source of the preset data frame, and adjusting the frame number of the target sound source to the target frame number; if the target playback speed of the target sound source is less than the preset speed threshold, extracting the target sound source of the preset data frame, and adjusting the frame number of the target sound source to the target frame number; setting the adjusted playback volume of the target sound source to the target playback volume.
[0011] In one embodiment of the present application, after the target sound source is audio-processed based on the target tuning parameters, it is sent to the speaker for playback, and it also includes: if the current gear position of the received vehicle changes, the preset audio library is read according to the changed gear position to obtain a new target audio file; the new target audio file is cached to the preset buffer, and the target audio file previously cached in the preset buffer is released; the tuning parameters in the new target audio file are matched according to the vehicle speed to determine new target tuning parameters.
[0012] In one embodiment of the present application, after the sending to the speaker for playing, it also includes: if the received gear position has not changed and the vehicle speed has changed, the tuning parameters in the target audio file are matched according to the changed vehicle speed to determine new target tuning parameters; after performing audio processing on the target sound source based on the new target tuning parameters, the target sound source is played.
[0013] In a second aspect, the present application provides a warning sound control device, which is applied to an audio signal processor configured in a system chip in a vehicle, and the device includes: a receiving module, which is used to receive the current gear position and speed of the vehicle monitored by the system chip; an acquisition module, which is used to read a preset audio library according to the gear position, obtain a target audio file and cache it in a preset buffer, wherein the preset audio library stores audio files corresponding to different sound source modes, and there is a mapping relationship between the gear position and the sound source mode, and the preset buffer is arranged in the audio signal processor; a matching module, which is used to match the tuning parameters in the target audio file according to the vehicle speed, and determine the target tuning parameters, wherein the target audio file includes a target sound source and different tuning parameters, and there is a mapping relationship between the vehicle speed and the tuning parameters; a processing module, which is used to perform audio processing on the target sound source based on the target tuning parameters, and then send it to the speaker for playback to realize warning sound control.
[0014] In a third aspect, the present application also provides an electronic device, comprising: a processor, a memory and a communication bus; the communication bus is used to connect the processor and the memory; the processor is used to execute a computer program stored in the memory to implement the warning sound control method as described in the above embodiment.
[0015] In a fourth aspect, the present application provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor of a computer, the computer executes the warning sound control method as described in the above embodiments.
[0016] Beneficial effects of the present application: The present application proposes a warning sound control method, device, equipment and storage medium. By configuring an audio signal processor in the system chip in the vehicle, the audio signal processor is used to receive the current driving information of the vehicle monitored by the system chip, that is, at least including the gear position and vehicle speed; the preset audio library is read according to the gear position, the target audio file is obtained and cached in the preset buffer, wherein the preset audio library stores audio files corresponding to different sound source modes, there is a mapping relationship between the gear position and the sound source mode, and the preset buffer is set in the audio signal processor; the tuning parameters in the target audio file are matched according to the vehicle speed, and the target tuning parameters are determined, the target audio file includes the target sound source and different tuning parameters, and there is a mapping relationship between the vehicle speed and the tuning parameters; after the target sound source is processed based on the target tuning parameters, it is sent to the speaker for playback to achieve warning sound control. In this way, on the one hand, combined with the real-time driving information of the vehicle, the sound source and tuning parameters of the warning sound can be simply and dynamically adjusted, so that the warning sound control can distinguish different driving scenes, with high control flexibility, and enhanced driving safety; on the other hand, the warning sound is controlled by the audio signal processor built into the system chip, which significantly reduces the resource usage of the system chip and ensures the sound quality of the warning sound output. In addition, the system chip no longer needs to plug in additional DSP (digital signal processor) hardware, which simplifies the hardware design and saves hardware costs.
[0017] It should be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] The drawings herein are incorporated into the specification and constitute a part of the specification, showing embodiments consistent with the present application, and together with the specification, are used to explain the principles of the present application. Obviously, the drawings described below are only some embodiments of the present application, and for those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative work. In the drawings:
[0019] Figure 1 is a schematic diagram of an implementation environment of a warning sound control method shown in an exemplary embodiment of the present application;
[0020] Figure 2 is a flow chart of a warning sound control method shown in an exemplary embodiment of the present application;
[0021] Figure 3 is a schematic diagram of the overall architecture of warning sound control shown in an exemplary embodiment of the present application;
[0022] Figure 4 is a schematic diagram of an audio file configuration shown in an exemplary embodiment of the present application;
[0023] Figure 5 is a block diagram of a warning sound control device shown in an exemplary embodiment of the present application;
[0024] Figure 6 It is a structural diagram of a computer system suitable for implementing the electronic device of the present application, shown as an exemplary embodiment of the present application. DETAILED DESCRIPTION
[0025] The following will describe the implementation methods of the present application with reference to the accompanying drawings and preferred embodiments. Those skilled in the art can easily understand other advantages and effects of the present application from the contents disclosed in this specification. The present application can also be implemented or applied through other different specific implementation methods, and the details in this specification can also be modified or changed in various ways based on different viewpoints and applications without departing from the spirit of the present application. It should be understood that the preferred embodiments are only for illustrating the present application, not for limiting the scope of protection of the present application.
[0026] It should be noted that the illustrations provided in the following embodiments are only schematic illustrations of the basic concept of the present application, and thus the drawings only show components related to the present application rather than being drawn according to the number, shape and size of components in actual implementation. In actual implementation, the type, quantity and proportion of each component may be changed at will, and the component layout may also be more complicated.
[0027] In the following description, a large number of details are discussed to provide a more thorough explanation of the embodiments of the present application. However, it is obvious to those skilled in the art that the embodiments of the present application can be implemented without these specific details. In other embodiments, well-known structures and devices are shown in the form of block diagrams rather than in detail to avoid making the embodiments of the present application difficult to understand.
[0028] As autonomous driving and assisted driving technologies become increasingly mature, the performance and user experience of the low-speed pedestrian warning system, as an important part of improving road safety, have received widespread attention. As the system's direct output to pedestrians, the generation and playback technology of the low-speed pedestrian warning sound is crucial. At present, the implementation of the low-speed pedestrian warning sound mainly relies on two technical paths. First, one method is to use a digital signal processor to mix waveforms of multiple frequencies in real time to generate a warning sound, which can dynamically adjust audio parameters to adapt to different driving environments and speed conditions; the other method is to use a fixed sound source to play in a loop, that is, by pre-recording and storing one or more warning sound files, the system plays these files in a loop to generate a warning sound when needed. It is relatively simple to implement and can ensure the stability of the sound quality.
[0029] However, the method using digital signal processor has the following problems: First, the sound debugging is difficult. Since it is necessary to accurately control the waveform mixing ratio and phase relationship of multiple frequency points to achieve the ideal auditory effect, this often requires developers to have deep audio processing knowledge and rich debugging experience; Second, the quality of the generated sound is difficult to guarantee. Even after careful debugging, the generated warning sound may sound chaotic or even harsh due to problems such as mutual interference or phase cancellation between frequency points, affecting the pedestrian's auditory experience. The method of using fixed sound source for loop playback has the following disadvantages: First, the system resource occupation problem. Especially when the CPU (central processing unit) load is high, loop playback of audio may occupy more CPU resources, causing the system to respond slowly or even freeze, thereby affecting the smoothness and continuity of sound playback; Second, the sound adaptability is poor. Since a fixed sound source is used, the sound effect cannot be dynamically adjusted according to the actual driving conditions of the vehicle (such as speed, environmental noise, etc.), and the best warning effect may not be provided in different scenarios. Therefore, how to ensure the sound quality of the warning sound while achieving dynamic adjustment of the warning sound and reducing system resource usage, and improving sound adaptability and user experience is a technical problem that needs to be solved urgently.
[0030] Based on this, the present application proposes a warning sound control method to solve the problems of inflexible warning sound adjustment, excessive system resource occupation and poor sound quality.
[0031] See also Figure 1 , is a schematic diagram of an implementation environment of a warning sound control method shown in an exemplary embodiment of the present application. Figure 1 As shown, the implementation environment includes a vehicle 110 and an audio signal processor 120, wherein the audio signal processor 120 is embedded in a system-on-chip (SOC) in the vehicle 110, and is used to implement the warning sound control method.
[0032] See also Figure 2 , is a flowchart of a warning sound control method shown in an exemplary embodiment of the present application. The method can be applied to Figure 1 The implementation environment shown in FIG. 1 is shown in FIG. 1 . It should be understood that the method may also be applicable to other exemplary implementation environments, and this embodiment does not limit the implementation environment to which the method is applicable. Figure 2 As shown, in an exemplary embodiment, the warning sound control method is applied to an audio signal processor configured in a system chip in a vehicle, and the method includes at least steps S210 to S240, which are described in detail as follows:
[0033] Step S210, receiving the current gear position and speed of the vehicle monitored by the system chip.
[0034] In one embodiment of the present application, the audio signal processor is directly built into the system on chip (SOC), so that the audio signal processor can directly access and process audio-related data from the system chip. The hardware design no longer needs to transmit data through an external interface or bus, thereby reducing the delay in data transmission and improving the real-time performance of the warning sound control. External audio processing equipment is easily affected by factors such as electromagnetic interference and physical vibration, resulting in degraded sound quality or functional failure. The built-in audio signal processor can effectively avoid the problem of degraded sound quality of the warning sound due to external interference such as electromagnetic interference and physical vibration, and further improve the stability and reliability of the warning sound control.
[0035] Specifically, middleware is created in the system chip, and a connection is established between the audio signal processor and the control unit in the vehicle through the middleware; if the system chip is started, the middleware is run to monitor the gear position and vehicle speed currently collected by the control unit, and forward the gear position and vehicle speed to the audio signal processor.
[0036] See also Figure 3 , is a schematic diagram of the overall architecture of the warning sound control shown in an exemplary embodiment of the present application. Figure 3 As shown, the audio signal processor (ASDP) and the control unit (MCU) are connected to each other through the middleware in the system chip (SOC). The middleware runs on the CPU in the SOC and communicates with the MCU through the CAN line (controller area network bus) in the vehicle. The middleware runs automatically when the SOC starts. The middleware can provide monitoring services, that is, start a thread, register the monitoring of two control units in the thread, one monitor is used to monitor the driving information of the vehicle collected by the control unit, such as vehicle speed, gear position and power supply, and the other monitor is used to monitor the sound source mode corresponding to the gear position, so as to notify the alarm program through the middleware of the audio file that needs to be read.
[0037] Specifically, the middleware also provides services for opening data flow paths, including: creating a data flow path connecting the audio signal processor to the speaker, the nodes in the data flow path are integrated with an alarm program, the alarm program runs on the audio signal processor, and is used to implement warning sound control, which is not affected by the CPU resources of the system chip; when the SCO is started, the middleware is run, and a start request for activating the data flow path is generated by the middleware and transmitted to the audio signal processor, and the start request carries a unique identification number of the data flow path; in response to the start request, the data flow path is activated; if the middleware receives feedback that the data flow path is successfully activated, the gear position and vehicle speed are sent to the alarm program. Among them, the alarm program includes an audio processing algorithm for AVAS (Acoustic Vehicle Alerting System).
[0038] In one embodiment of the present application, the data flow path is an audio path, which is a logical path constructed to implement a specific audio processing function, which logically implements the flow and processing of audio signals through software code without relying on actual physical lines or interfaces. Among them, the data flow path can be created based on QACT (Qualcomm Audio Calibration Tool) or a similar audio processing architecture framework, and then the alarm program is added to the data flow path, that is, the pre-configured alarm program is used as a node in the data flow path, and the connection relationship between the node and other nodes in the data flow path, that is, the audio signal processor and the speaker is defined.
[0039] In one embodiment of the present application, when creating a data flow path, a unique identification number needs to be set for the path to ensure that it can be correctly identified by the middleware. The number of channels and specific channel configurations of the data flow path can be adjusted according to actual needs and are not restricted.
[0040] Step S220, read the preset audio library according to the gear position, obtain the target audio file and cache it in a preset buffer, wherein the preset audio library stores audio files corresponding to different sound source modes, there is a mapping relationship between the gear position and the sound source mode, and the preset buffer is set in the audio signal processor.
[0041] Specifically, configuring the preset audio library includes: determining the number of gears of the vehicle, and configuring sound sources with the same number of gears; determining the speed range of the vehicle at low speeds in different gears, and configuring tuning parameters corresponding to each speed in each speed range; binding each gear of the vehicle to a different audio mode, respectively, with the audio mode and the sound source corresponding one to one; constructing an audio file based on the sound sources and tuning parameters associated with the same sound source mode, and storing it in the preset audio library.
[0042] In one embodiment of the present application, different audio files can be generated by existing tuning software to form a preset audio library. Preferably, the preset audio library is stored in a shared memory between the system chip and the audio signal processor. In this way, the audio signal processor and the CPU of the SOC can directly access the same memory area, reducing the delay and power consumption of data transmission, and the efficiency of data transmission is high, further improving the real-time performance of the warning control.
[0043] In one embodiment of the present application, since the gear types of the vehicle include the forward gear and the reverse gear, the forward gear can be set to multiple, usually set to 5, and the reverse gear is generally set to only one. Since the vehicle speed is different in different gears, in order to enable pedestrians to receive appropriate warnings at different speeds, it is necessary to distinguish the sound sources used for the warning sound in different gears, so as to more effectively remind pedestrians to pay attention to the approach of the vehicle and improve driving safety. For example, when the vehicle is at a low speed, the warning sound is soft to avoid scaring pedestrians; at a medium speed, the warning sound is moderate to ensure that pedestrians can hear it; at a high speed, the warning sound is louder or sharper. Based on this, in order to further improve the auditory effect of the warning sound, it is still necessary to make a more detailed distinction between the tuning parameters corresponding to each vehicle speed in different gears.
[0044] See also Figure 4 , is a schematic diagram of an audio file configuration shown in an exemplary embodiment of the present application. Figure 4 As shown in the figure, when the vehicle has 5 gears, the sound source modes include Proset1 to Proset5, corresponding to 5 different sound sources. Figure 4 Take the sound source mode Proset2 in as an example, when the vehicle speed is 0, the play rate PlayRate is set to 0.9, and the play volume is set to -96, that is, the gain level of the audio signal of the warning sound is configured to -96; when the vehicle speed is 1 km / h (kilometer per hour), the play rate PlayRate is set to 0.91, and the play volume is set to -22, and so on, until the configuration of the corresponding tuning parameters for each vehicle speed within the vehicle speed range is completed. Finally, the sound source and tuning parameters corresponding to the sound source mode Proset2 are constructed into an audio file.
[0045] In one embodiment of the present application, each of the audio files is configured to have the same fixed size to match the size of a preset buffer (wavBuffer). In this way, the preset buffer can more easily buffer audio files, avoid complex dynamic memory allocation and release operations, and does not need to consider the impact of changes in data length, which helps to reduce computational complexity and error rate and improve processing efficiency and stability.
[0046] Step S230, matching the tuning parameters in the target audio file according to the vehicle speed to determine the target tuning parameters, the target audio file includes a target sound source and different tuning parameters, and there is a mapping relationship between the vehicle speed and the tuning parameters.
[0047] In one embodiment of the present application, Figure 4 For example, when the target audio file is an audio file corresponding to the sound source mode Proset2, if the vehicle speed is 5km / h, the target tuning parameters matching the vehicle speed include a playback rate of 0.95 and a playback volume of -20.
[0048] Step S240, after performing audio processing on the target sound source based on the target tuning parameters, the target sound source is sent to the speaker for playing to achieve warning sound control.
[0049] Specifically, the audio processing steps include: calculating the target number of frames of the target sound source at the target playback speed according to the preset playback time and the preset sampling rate, and the target tuning parameters include the target playback speed and the target playback volume; if the target playback speed of the target sound source is greater than the preset speed threshold, resampling the target sound source of the preset data frame, and adjusting the frame number of the target sound source to the target frame number; if the target playback speed of the target sound source is less than the preset speed threshold, extracting the target sound source of the preset data frame, and adjusting the frame number of the target sound source to the target frame number; setting the playback volume of the adjusted target sound source to the target playback volume.
[0050] In one embodiment of the present application, a target sound source of a preset data frame is taken out from a preset buffer, and the preset data frame is the number of frames of data of the target sound source that is an integer multiple of the target playback speed, and is stored in a temporary buffer set in the audio signal processor. For example, if the target playback speed is 0.8, the target frame number corresponding to 0.8 is 12, and the preset frame number is 10, which needs to be adjusted. The length of the data in the preset buffer is determined by the product of the time of each cycle of the target sound source (i.e., the preset playback time), the preset sampling rate, the target playback speed, and the sample bit number of the target sound source (i.e., the number of encoding bits of the sampling value), wherein the sample bit number can be set to 8 bits, 16 bits, 24 bits, and 32 bits, etc., without restriction. Taking the standard playback speed as 1, and the corresponding target frame number as the preset frame number as an example, if the target sound source is 32bit (bit) data, and the data size of each frame of the target sound source is 4byte (byte), the preset playback time is 10 milliseconds, and the preset sampling rate is 44100Hz (Hertz), then the target frame number is 441, and the data length of the target sound source output at last is 1764byte.
[0051] Specifically, after the processed target sound source is sent to the speaker for playback, if the sound source mode needs to be switched, it includes: if the current gear position of the received vehicle changes, the preset audio library is read according to the changed gear position to obtain a new target audio file; the new target audio file is cached to the preset buffer, and the target audio file previously cached in the preset buffer is released; the tuning parameters in the new target audio file are matched according to the vehicle speed to determine the new target tuning parameters.
[0052] In one embodiment of the present application, after playing the target sound source, if there is no need to switch the sound source mode, it includes: if the received gear position has not changed and the vehicle speed has changed, matching the tuning parameters in the target audio file according to the changed vehicle speed to determine new target tuning parameters; after performing audio processing on the target sound source based on the new target tuning parameters, playing the target sound source.
[0053] Through the above method, the process of switching the sound source or its tuning parameters is simple and convenient, and no program needs to be modified. Only the tuning-related parameters need to be updated. In this way, dynamic and rapid adjustment of the warning sound in different driving scenarios can be achieved, effectively reducing the risk of errors in the warning sound control process, and the control efficiency and reliability are high.
[0054] A warning sound control method proposed in the present application has the following advantages: first, it combines the real-time driving information of the vehicle, and can simply and dynamically adjust the sound source and tuning parameters of the warning sound, so that the warning sound control can distinguish different driving scenarios, the control flexibility is high, and the driving safety is enhanced; second, the warning sound is controlled by an audio signal processor built into the system chip, which significantly reduces the resource occupation of the system chip and ensures the sound quality of the warning sound output; third, the system chip no longer needs to be equipped with additional DSP (digital signal processor) hardware, which simplifies the hardware design and saves hardware costs.
[0055] See also Figure 5 , is a block diagram of a warning sound control device shown in an exemplary embodiment of the present application. The device can be applied to Figure 1 The implementation environment shown in the figure should be understood that the present application does not limit the implementation environment of the device. The warning sound control device is applied to an audio signal processor configured in a system chip in a vehicle, such as Figure 5 As shown, in an exemplary embodiment, the device at least includes a receiving module 510, an acquisition module 520, a matching module 530 and a processing module 540, which are described in detail as follows:
[0056] The receiving module 510 is used to receive the current gear position and speed of the vehicle monitored by the system chip;
[0057] The acquisition module 520 is used to read the preset audio library according to the gear position, obtain the target audio file and cache it in a preset buffer, wherein the preset audio library stores audio files corresponding to different sound source modes, there is a mapping relationship between the gear position and the sound source mode, and the preset buffer is set in the audio signal processor;
[0058] A matching module 530 is used to match the tuning parameters in the target audio file according to the vehicle speed to determine the target tuning parameters, where the target audio file includes a target sound source and different tuning parameters, and there is a mapping relationship between the vehicle speed and the tuning parameters;
[0059] The processing module 540 is used to perform audio processing on the target sound source based on the target tuning parameters and send the audio to the speaker for playing to achieve warning sound control.
[0060] It should be noted that the warning sound control device provided in the above embodiment and the warning sound control method provided in the above embodiment belong to the same concept, wherein the contents of the operations performed by each module have been described in detail in the method embodiment and will not be repeated here.
[0061] The present application also provides an electronic device, comprising: a processor, a memory and a communication bus; the communication bus is used to connect the processor and the memory; the processor is used to execute a computer program stored in the memory to implement the warning sound control method as in the above embodiment.
[0062] See also Figure 6 , shows a schematic diagram of the structure of a computer system suitable for implementing an electronic device of an embodiment of the present application. It should be noted that, Figure 6 The computer system 600 of the electronic device shown is only an example and should not bring any limitation to the functions and application scope of the embodiments of the present application.
[0063] like Figure 6 As shown, the computer system 600 includes a central processing unit (CPU) 601, which can perform various appropriate actions and processes according to the program stored in the read-only memory (ROM) 602 or the program loaded from the storage part 608 to the random access memory (RAM) 603, such as executing the method in the above embodiment. In the RAM 603, various programs and data required for system operation are also stored. The CPU 601, ROM 602 and RAM 603 are connected to each other through a bus 604. An input / output (I / O) interface 605 is also connected to the bus 604.
[0064] The following components are connected to the I / O interface 605: an input section 606 including a keyboard, a mouse, etc.; an output section 607 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 608 including a hard disk, etc.; and a communication section 604 including a network interface card such as a LAN (Local Area Network) card, a modem, etc. The communication section 609 performs communication processing via a network such as the Internet. A drive 610 is also connected to the I / O interface 609 as needed. A removable medium 611, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 610 as needed so that a computer program read therefrom is installed into the storage section 608 as needed.
[0065] In particular, according to an embodiment of the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present application includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a computer program for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication section 609, and / or installed from a removable medium 611. When the computer program is executed by a central processing unit (CPU) 601, various functions defined in the system of the present application are executed.
[0066] The present application also provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor of a computer, the computer executes the above-mentioned warning sound control method. The computer-readable storage medium may be included in the electronic device described in the above-mentioned embodiment, or may exist independently without being assembled into the electronic device.
[0067] It should be noted that the computer-readable medium shown in the embodiment of the present application may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, an electrical, magnetic, optical, electromagnetic, infrared or semiconductor system, system or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM), a flash memory, an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present application, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, wherein a computer-readable computer program is carried. This propagated data signal may take a variety of forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination of the above. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, system or device. A computer program contained on a computer-readable medium may be transmitted using any suitable medium, including but not limited to: wireless, wired, etc., or any suitable combination of the above.
[0068] The flowchart and block diagram in the accompanying drawings illustrate the possible architecture, functions and operations of the system, method and computer program product according to various embodiments of the present application. Wherein, each box in the flowchart or block diagram can represent a module, a program segment, or a part of the code, and the above-mentioned module, program segment, or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flowchart, and the combination of boxes in the block diagram or flowchart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0069] The above embodiments are merely illustrative of the principles and effects of the present application, and are not intended to limit the present application. Anyone familiar with the technology may modify or change the above embodiments without violating the spirit and scope of the present application. Therefore, all equivalent modifications or changes made by a person of ordinary skill in the art without departing from the spirit and technical ideas disclosed in the present application shall still be covered by the claims of the present application.
Claims
1. A warning sound control method, characterized in that: Applied to an audio signal processor configured in a system chip in a vehicle, the method comprises: Receiving the current gear position and speed of the vehicle monitored by the system chip; Reading a preset audio library according to the gear position, obtaining a target audio file and caching it in a preset buffer, wherein the preset audio library stores audio files corresponding to different sound source modes, there is a mapping relationship between the gear position and the sound source mode, and the preset buffer is set in the audio signal processor; Matching the tuning parameters in the target audio file according to the vehicle speed to determine the target tuning parameters, wherein the target audio file includes a target sound source and different tuning parameters, and there is a mapping relationship between the vehicle speed and the tuning parameters; After the target sound source is subjected to audio processing based on the target tuning parameters, it is sent to the speaker for playing to achieve warning sound control.
2. The warning sound control method according to claim 1, characterized in that: Before receiving the current gear position and speed of the vehicle monitored by the system chip, the method further includes: Creating middleware in the system chip, and establishing a connection between the audio signal processor and a control unit in the vehicle through the middleware; If the system chip is started, the middleware is run to monitor the gear position and the vehicle speed currently collected by the control unit, and the gear position and the vehicle speed are forwarded to the audio signal processor.
3. The warning sound control method according to claim 2, characterized in that: The receiving the current gear position and speed of the vehicle monitored by the system chip includes: Creating a data flow path connecting the audio signal processor to the speaker, wherein a node in the data flow path is integrated with an alarm program, and the alarm program runs on the audio signal processor to realize alarm sound control; Using the middleware to generate a start request for activating the data flow path, and transmitting the start request to the audio signal processor, wherein the start request carries a unique identification number of the data flow path; In response to the start request, activating the data flow path; If the middleware receives a feedback result indicating that the data flow path is successfully activated, the gear position and the vehicle speed are sent to the alarm program.
4. The warning sound control method according to claim 1, characterized in that: Before reading the preset audio library according to the gear position, the method further includes: Determining the number of gears of the vehicle, and configuring the sound sources with the same number of gears; Determine the speed range of the vehicle at low speed under different gears, and configure the tuning parameters corresponding to each speed in each speed range; Binding each gear of the vehicle to a different audio mode, respectively, wherein the audio mode corresponds to the sound source one by one; An audio file is constructed according to the sound source associated with the same sound source mode and each tuning parameter, and stored in the preset audio library.
5. The warning sound control method according to any one of claims 1 to 4, characterized in that: The performing audio processing on the target sound source based on the target tuning parameter includes: Calculating the target number of frames of the target sound source at the target playback speed according to the preset playback time and preset sampling rate, wherein the target tuning parameters include the target playback speed and the target playback volume; If the target playback speed of the target sound source is greater than a preset speed threshold, resampling the target sound source of the preset data frame, and adjusting the frame number of the target sound source to the target frame number; If the target playback speed of the target sound source is less than a preset speed threshold, extracting the target sound source of a preset data frame, and adjusting the frame number of the target sound source to the target frame number; The adjusted playback volume of the target sound source is set as the target playback volume.
6. The warning sound control method according to any one of claims 1 to 4, characterized in that: After the target sound source is subjected to audio processing based on the target tuning parameter, the target sound source is sent to a speaker for playing, and further includes: If the current gear position of the received vehicle changes, the preset audio library is read according to the changed gear position to obtain a new target audio file; Cache the new target audio file in the preset buffer, and release the target audio file previously cached in the preset buffer; The tuning parameters in the new target audio file are matched according to the vehicle speed to determine new target tuning parameters.
7. The warning sound control method according to claim 6, characterized in that: After the sending to the speaker for playing, it also includes: If the received gear position has not changed and the vehicle speed has changed, matching the tuning parameters in the target audio file according to the changed vehicle speed to determine new target tuning parameters; After performing audio processing on the target sound source based on the new target tuning parameters, the target sound source is played.
8. A warning sound control device, characterized in that: An audio signal processor configured in a system chip in a vehicle, the device comprising: A receiving module, used for receiving the current gear position and speed of the vehicle monitored by the system chip; an acquisition module, configured to read a preset audio library according to the gear position, acquire a target audio file and cache the target audio file in a preset buffer, wherein the preset audio library stores audio files corresponding to different sound source modes, a mapping relationship exists between the gear position and the sound source mode, and the preset buffer is provided in the audio signal processor; a matching module, used for matching the tuning parameters in the target audio file according to the vehicle speed to determine the target tuning parameters, wherein the target audio file includes a target sound source and different tuning parameters, and there is a mapping relationship between the vehicle speed and the tuning parameters; The processing module is used to perform audio processing on the target sound source based on the target tuning parameters and send the audio to the speaker for playing to achieve warning sound control.
9. An electronic device, characterized in that: include: processor, memory, and communication bus; The communication bus is used to connect the processor and the memory; The processor is configured to execute the computer program stored in the memory to implement the method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: A computer program is stored thereon, and the computer program is used to make a computer execute the method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Method for setting sound target of active sound generation system and active sound generation system
CN110718206A
External audio alert system and method for vehicular use
CN110869991A
A vehicle control method, apparatus, device, and storage medium
CN114937356A
Vehicle warning sound control method and device, control equipment, automobile and storage medium
CN115782746A
Low-speed alarm sound prompting method and device, electronic equipment and readable storage medium
CN116985709A
Cited By
Pedestrian warning sound control method and device, vehicle, storage medium and product
CN120039188A
Pedestrian warning method, device and equipment for low-speed driving of vehicle and medium
CN121305845A
Vehicle acoustic early warning method, computer program product, storage medium, controller and vehicle
CN121483269A
Smooth control method, system and equipment for vehicle low-speed warning tone and medium
CN121553038A
Electric vehicle simulation sound effect control method and system and storage medium
CN122481608A
