Warning Tone Control Method, Device, Equipment and Storage Medium
By configuring an audio signal processor in the vehicle system chip, and dynamically adjusting the warning sound with gear and vehicle speed information, the problems of high difficulty in sound debugging and high resource utilization in the prior art are solved, and flexible warning sound control and high-quality sound output are achieved.
Patent Information
- Application Number
- CN202411243709.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-05
- Publication Date
- 2025-08-05
- Estimated Expiration
- 2044-09-05
AI Technical Summary
In the prior art, low-speed pedestrian alarm sound system is difficult to debug sound, difficult to guarantee sound quality, and high resource utilization, and cannot adaptively adjust according to the real-time environment, affecting the user experience.
The audio signal processor is configured in the vehicle system chip. By receiving gear and vehicle speed information, the preset audio library is read and the target audio file is cached, the tuning parameters are matched according to the vehicle speed, the audio is processed and then sent to the speaker to play, realizing warning sound control.
Dynamic adjustment of warning sound is realized, driving safety is improved, system resource occupation is reduced, sound quality is ensured, hardware design is simplified, and hardware costs are saved.
Smart Images

Figure CN119091659B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the technical field of electronic control units, and particularly 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 low-speed pedestrian warning sound system, as a key link in enhancing road safety, has become increasingly important. The implementation of the low-speed pedestrian warning sound is achieved by emitting clear and distinguishable warning sounds to surrounding pedestrians, effectively reminding pedestrians to pay attention to the dynamic of surrounding vehicles, especially when the vehicle is driving at a low speed or about to pass through a crowded pedestrian area, thereby reducing traffic accidents caused by reasons such as line-of-sight blind spots and distracted attention, 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 a digital signal processor (DSP), which can mix waveforms of multiple frequency points in real time through algorithms to generate sound signals with specific characteristics; the other is the method of loop-playing a fixed sound source, that is, pre-recording and storing one or more warning sound files, and playing these files in a loop through the system when needed to generate warning sounds.
[0003] However, on the one hand, although the DSP-based audio synthesis technology can achieve dynamic adjustment of sounds, the debugging of sounds is difficult, the sound quality is difficult to guarantee, and it has high requirements for hardware resources, affecting the auditory experience of pedestrians; on the other hand, the loop-playing of a fixed sound source lacks flexibility, cannot be adaptively adjusted according to the real-time environment, is difficult to adapt to complex and changeable traffic environments, and may experience sound stuttering under high CPU (Central Processing Unit) load, affecting the user experience. Summary of the Invention
[0004] To provide a basic understanding of some aspects of the disclosed embodiments, a simple summary is given below. This summary is not a comprehensive review, nor is it intended to identify key / important elements or delineate the scope of protection of these embodiments, but rather serves as a preface to the following detailed description.
[0005] In view of the above-mentioned disadvantages of the prior art, this application discloses a warning sound control method, device, equipment, and storage medium to solve at least one of the above 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 of a vehicle. The method includes: receiving the current gear position and vehicle speed of the vehicle monitored by the system chip; reading a preset audio library according to the gear position to obtain a target audio file and caching it in a preset buffer. 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. The preset buffer is provided in the audio signal processor; matching the tuning parameters in the target audio file according to the vehicle speed to determine 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; after performing audio processing on the target sound source based on the target tuning parameters, sending it to a speaker for playback to achieve warning sound control.
[0007] In an embodiment of the present application, before receiving the current gear position and vehicle speed of the vehicle monitored by the system chip, it further includes: creating a 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, running the middleware, listening to 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 an embodiment of the present application, receiving the current gear position and vehicle speed of the vehicle monitored by the system chip includes: creating a data flow path for the audio signal processor to connect to the speaker. Nodes in the data flow path are integrated with an alarm program, and the alarm program runs on the audio signal processor to achieve warning sound control; generating a start request for activating the data flow path by using the middleware 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 a feedback result that the data flow path is successfully activated, sending the gear position and the vehicle speed to the alarm program.
[0009] In an embodiment of the present application, before reading the preset audio library according to the gear position, it further includes: determining the number of gear positions of the vehicle and configuring the same number of sound sources as the number of gear positions; determining the vehicle speed ranges for low-speed driving of the vehicle in different gear positions and configuring the tuning parameters corresponding to each vehicle speed within each vehicle speed range; binding each gear position of the vehicle to different audio modes, and the audio mode and the sound source correspond one by one; constructing an audio file based on the sound source and each tuning parameter associated with the same sound source mode and storing it in the preset audio library.
[0010] In an 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 a preset playback time and a preset sampling rate, where 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 a preset data frame and adjusting the number of frames of the target sound source to the target number of frames; if the target playback speed of the target sound source is less than the preset speed threshold, decimating the target sound source of the preset data frame and adjusting the number of frames of the target sound source to the target number of frames; setting the playback volume of the adjusted target sound source to the target playback volume.
[0011] In an embodiment of the present application, after the audio processing of the target sound source based on the target tuning parameters and before sending it to a speaker for playback, it further includes: if the gear of the vehicle received changes, reading a preset audio library according to the changed gear to obtain a new target audio file; caching the new target audio file to the preset buffer and releasing the target audio file cached in the preset buffer last time; matching the tuning parameters in the new target audio file according to the vehicle speed to determine new target tuning parameters.
[0012] In an embodiment of the present application, after sending it to the speaker for playback, it further includes: if the received gear does not change and the vehicle speed changes, 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.
[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 of a vehicle. The device includes: a receiving module, configured to receive the current gear and vehicle speed of the vehicle monitored by the system chip; an obtaining module, configured to read a preset audio library according to the gear to obtain a target audio file and cache it to a preset buffer, where the preset audio library stores audio files corresponding to different sound source modes, there is a mapping relationship between the gear and the sound source mode, and the preset buffer is arranged in the audio signal processor; a matching module, configured to match the tuning parameters in the target audio file according to the vehicle speed to determine 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; a processing module, configured to perform audio processing on the target sound source based on the target tuning parameters and then send it to a speaker for playback to implement warning sound control.
[0014] In a third aspect, the present application also provides an electronic device, including: 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 embodiments.
[0015] In a fourth aspect, the present application 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 is made to execute the warning sound control method as described in the above embodiments.
[0016] Advantages 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 a vehicle, the audio signal processor is used to receive the current driving information of the vehicle monitored by the system chip, which at least includes the gear position and vehicle speed; read a preset audio library according to the gear position, obtain a target audio file and cache it to a preset buffer area. 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. The preset buffer area is provided in the audio signal processor; match 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; after performing audio processing on the target sound source based on the target tuning parameters, send it to a speaker for playback to implement warning sound control. In this way, on the one hand, by combining the real-time driving information of the vehicle, it is possible to simply and dynamically adjust the sound source and tuning parameters of the warning sound, enabling the warning sound control to distinguish different driving scenarios, with high control flexibility and enhanced driving safety; on the other hand, the warning sound control is performed by the audio signal processor built into the system chip, significantly reducing the resource occupancy of the system chip and ensuring the sound quality of the warning sound output. In addition, the system chip no longer needs to externally connect an additional DSP (Digital Signal Processor) hardware, simplifying the hardware design and saving hardware costs.
[0017] It should be understood that the above general description and the following detailed description are only exemplary and explanatory, and cannot limit the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] The accompanying drawings here are incorporated into the specification and form a part of this specification, showing embodiments consistent with the present application, and are used together with the specification to explain the principles of the present application. Obviously, the accompanying drawings in the following description are only some embodiments of the present application. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts. In the drawings:
[0019] Figure 1 It is a schematic diagram of the implementation environment of a warning sound control method shown in an exemplary embodiment of the present application;
[0020] Figure 2 It is a flowchart of a warning sound control method shown in an exemplary embodiment of the present application;
[0021] Figure 3 It is a schematic diagram of the overall architecture of warning sound control shown in an exemplary embodiment of the present application;
[0022] Figure 4 It is a schematic diagram of audio file configuration shown in an exemplary embodiment of the present application;
[0023] Figure 5 It 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 schematic diagram of the structure of a computer system of an electronic device suitable for implementing the present application shown in an exemplary embodiment of the present application. Detailed implementation manners
[0025] The following will describe the implementation manners of the present application by referring to the drawings and preferred embodiments. Those skilled in the art can easily understand other advantages and effects of the present application from the content disclosed in this specification. The present application can also be implemented or applied through other different specific implementation manners. Various details in this specification can also be modified or changed 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 explaining the present application, rather than for limiting the protection scope of the present application.
[0026] It should be noted that the diagrams provided in the following embodiments only illustrate the basic concept of the present application in a schematic manner. Therefore, only the components related to the present application are shown in the diagrams, rather than being drawn according to the number, shape, and size of the components in actual implementation. The type, number, and proportion of each component in actual implementation can be arbitrarily changed, and the component layout type may also be more complex.
[0027] In the following description, a large number of details are explored 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 mature, the performance and user experience of low-speed pedestrian warning systems, as an important component for improving road safety, have received widespread attention. As the system's direct output to pedestrians, the generation and playback technology of low-speed pedestrian warning sounds is crucial. Currently, the implementation of low-speed pedestrian warning sounds relies primarily on two technical approaches. One method uses a digital signal processor to generate warning sounds by mixing waveforms of multiple frequencies in real time. The method can dynamically adjust audio parameters to adapt to different driving environments and speed conditions. The other method uses a fixed sound source for loop playback. This involves pre-recording and storing one or more warning sound files, and then looping these files through the system to generate warning sounds when needed. This method is relatively simple to implement and can ensure the stability of sound quality.
[0029] However, the approach of using digital signal processors has the following problems: First, sound debugging is difficult. Because the waveform mixing ratio and phase relationship of multiple frequency points must be precisely controlled to achieve the desired auditory effect, this often requires developers to have in-depth audio processing knowledge and extensive debugging experience. Second, the quality of the generated sound is difficult to guarantee. Even after careful debugging, problems such as mutual interference or phase cancellation between frequency points may cause the generated warning sound to sound disorganized or even harsh, affecting the pedestrian's auditory experience. The method of using a fixed sound source for looping playback has the following disadvantages: First, system resource usage issues. Especially under high CPU (central processing unit) load, looping audio may occupy a large amount of CPU resources, resulting in slow system response and even lag, which in turn affects the smoothness and continuity of the sound playback. Second, the sound adaptability is poor. Because it uses a fixed sound source, the sound effect cannot be dynamically adjusted according to the actual driving conditions (such as speed and ambient noise), and may not provide the optimal warning effect 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, 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 for implementing the warning sound control method.
[0032] See alsoFigure 2 , which is a flowchart of a warning sound control method shown in an exemplary embodiment of the present application. This method can be applied to Figure 1 the implementation environment shown. It should be understood that this method can also be applicable to other exemplary implementation environments, and this embodiment does not limit the implementation environment applicable to this method. As Figure 2 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. This method at least includes steps S210 to step S240, which are introduced in detail as follows:
[0033] Step S210, receive the current gear and vehicle speed monitored by the system chip.
[0034] In an embodiment of the present application, the audio signal processor is directly built into the system chip (SOC), so that the audio signal processor can directly access and process audio-related data from the system chip. In terms of hardware design, there is no need to transfer data through an external interface or bus anymore, thereby reducing the delay of data transmission and improving the real-time performance of warning sound control. External audio processing devices are easily affected by factors such as electromagnetic interference and physical vibration, resulting in a decline in sound quality or failure of functions. However, the built-in audio signal processor can effectively avoid problems such as the decline in the sound quality of warning sounds caused by external electromagnetic interference, physical vibration, etc., and further improve the stability and reliability of warning sound control.
[0035] Specifically, a middleware is created in the system chip, and a connection between the audio signal processor and the control unit in the vehicle is established through the middleware; if the system chip is started, the middleware runs, listens to the current gear and vehicle speed collected by the control unit, and forwards the gear and vehicle speed to the audio signal processor.
[0036] Please refer to Figure 3 , which is a schematic diagram of the overall architecture of warning sound control shown in an exemplary embodiment of the present application. As Figure 3 shown, the audio signal processor (ASDP) and the control unit (MCU) are communicatively connected through the middleware in the system chip (SOC). The middleware runs on the CPU in the SOC, and the middleware communicates with the MCU through the CAN line (controller area network bus) in the vehicle. The middleware automatically runs when the SOC is started. The middleware can provide a listening service, that is, start a thread, register two listeners for the control unit in this thread. One listener is used to listen to the driving information of the vehicle collected by the control unit, such as vehicle speed, gear, and power, and the other listener is used to listen to the sound source mode corresponding to the gear, so as to notify the warning program of the audio file that needs to be read through the middleware.
[0037] Specifically, the middleware also provides a service for opening a data stream path, including: creating a data stream path for the audio signal processor to connect to the speaker, where the nodes in the data stream path are integrated with an alarm program. The alarm program runs on the audio signal processor and is used to implement warning sound control, without being 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 stream path is generated by the middleware and transmitted to the audio signal processor. The start request carries the unique identification number of the data stream path. In response to the start request, the data stream path is activated. If the middleware receives a feedback result indicating that the data stream path activation is successful, 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 an embodiment of the present application, the data stream path is an audio path, which is a logical path constructed to implement specific audio processing functions. It logically realizes the flow and processing of audio signals through software code, without relying on actual physical lines or interfaces. Among them, the data stream 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 stream path, that is, the pre-configured alarm program is used as a node in the data stream path, and the connection relationship between this node and other nodes in the data stream path, that is, the audio signal processor and the speaker, is defined.
[0039] In an embodiment of the present application, a unique identification number needs to be set for the data stream path when creating it to ensure that it can be correctly recognized by the middleware. The number of channels and the specific channel configuration of the data stream path can be adjusted according to actual needs, and no limitation is imposed on this.
[0040] Step S220, read the preset audio library according to the gear position, obtain the target audio file and cache it in the preset buffer. Among them, 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. The preset buffer is provided in the audio signal processor.
[0041] Specifically, configuring the preset audio library includes: determining the number of gear positions of the vehicle and configuring the same number of sound sources as the number of gear positions; determining the vehicle speed range for low-speed driving in different gear positions and configuring the tuning parameters corresponding to each vehicle speed within each speed range; binding each gear position of the vehicle to different audio modes, and the audio mode corresponds to the sound source one by one; constructing an audio file based on the sound source and each tuning parameter associated with the same sound source mode and storing it in the preset audio library.
[0042] In an embodiment of the present application, different audio files can be generated through existing tuning software to form a preset audio library. Preferably, the preset audio library is stored in the 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 latency and power consumption of data transmission, with high data transmission efficiency, and further improving the real-time performance of warning control.
[0043] In an embodiment of the present application, since the gear types of the vehicle include the forward gears and the reverse gear of the vehicle, among which, multiple forward gears can be set, usually set to 5, and generally only one reverse gear is set. Since the vehicle speeds are different in different gears, in order to enable pedestrians to obtain appropriate warnings at different vehicle speeds, it is necessary to distinguish the sound sources used for warning sounds in different gears, so as to more effectively remind pedestrians of the approach of the vehicle and improve driving safety. For example, the warning sound is soft when the vehicle is at a low speed to avoid scaring pedestrians; the warning sound is moderate when the vehicle is at a medium speed to ensure that pedestrians can hear it; the warning sound is louder or sharper when the vehicle is at a high speed. Based on this, in order to further improve the auditory effect of the warning sound, it is still necessary to make a more refined distinction of the tuning parameters corresponding to each vehicle speed in different gears.
[0044] Please refer to Figure 4 , which is a schematic diagram of the audio file configuration shown in an exemplary embodiment of the present application. As Figure 4 shown, when the number of gears of the vehicle is 5, the sound source modes include Proset1 to Proset5, corresponding to 5 different sound sources. Taking the sound source mode Proset2 in Figure 4 as an example, when the vehicle speed is 0, the playback rate PlayRate is set to 0.9, and the playback volume is set to -96, that is, the gain gainlevel of the audio signal of the warning sound is configured to -96. When the vehicle speed is 1 km / h (kilometer per hour), the playback rate PlayRate is set to 0.91, and the playback volume is set to -22, and so on, until the corresponding tuning parameters for each vehicle speed within the vehicle speed range are configured. Finally, the sound source corresponding to the sound source mode Proset2 and each tuning parameter are constructed into an audio file.
[0045] In an embodiment of the present application, each of the audio files is configured to have the same fixed size to match the size of the preset buffer (wavBuffer). In this way, the preset buffer can more easily buffer the audio files, avoiding complex dynamic memory allocation and release operations, without considering the influence brought by the change of data length, which helps to reduce the calculation complexity and error rate, and improve the processing efficiency and stability.
[0046] Step S230: Match the tuning parameters in the target audio file according to the vehicle speed to determine the target tuning parameters. 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.
[0047] In an embodiment of the present application, taking Figure 4 as an example, when the target audio file is the audio file corresponding to the sound source mode Proset2, if the vehicle speed is 5 km / 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, send it to the speaker for playback to achieve warning sound control.
[0049] Specifically, the steps of audio processing 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. 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, resample the target sound source of the preset data frame and adjust the number of frames of the target sound source to the target number of frames; if the target playback speed of the target sound source is less than the preset speed threshold, decimate the target sound source of the preset data frame and adjust the number of frames of the target sound source to the target number of frames; set the playback volume of the adjusted target sound source to the target playback volume.
[0050] In an embodiment of the present application, take out the target sound source of the preset data frame from the preset buffer. The preset data frame is the number of frames of the data of the target sound source that is an integer multiple of the target playback speed, and store it in the temporary buffer set in the audio signal processor. For example, if the target playback speed is 0.8, the corresponding target number of frames is 12, and the preset number of frames is 10, then adjustment is required. The length of the data in the preset buffer is determined by the product of the time for each cycle of the target sound source (i.e., the preset playback time), the preset sampling rate, the target playback speed, and the sample bits of the target sound source (i.e., the coding bits of the sampling value). Among them, the sample bits can be set to 8 bits, 16 bits, 24 bits, 32 bits, etc., and no limitation is imposed on this. Taking the standard playback speed set to 1 and its corresponding target number of frames set to the preset number of frames as an example, if the target sound source is 32-bit (bit) data, and the data size of each frame of the target sound source is 4 byte (bytes), the preset playback time is 10 milliseconds, and the preset sampling rate is 44100 Hz (hertz), then the target number of frames is 441, and the data length of the finally output target sound source is 1764 byte.
[0051] Specifically, after the processed target sound source is sent to the speaker for playback, if it is necessary to switch the sound source mode, it includes: if the current gear of the vehicle received changes, read the preset audio library according to the changed gear to obtain a new target audio file; cache the new target audio file to the preset buffer, and release the target audio file cached in the preset buffer last time; match the tuning parameters in the new target audio file according to the vehicle speed to determine the new target tuning parameters.
[0052] In an embodiment of the present application, after playing the target sound source, if it is not necessary to switch the sound source mode, it includes: if the received gear does not change and the vehicle speed changes, match the tuning parameters in the target audio file according to the changed vehicle speed to determine the new target tuning parameters; after performing audio processing on the target sound source based on the new target tuning parameters, play 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 there is no need to modify any programs. Only the tuning-related parameters read need to be updated. In this way, it can achieve dynamic and rapid adjustment of warning sounds in different driving scenarios, effectively reducing the risk of errors in the process of warning sound control, 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, can simply and dynamically adjust the sound source and tuning parameters of the warning sound, enables the warning sound control to distinguish different driving scenarios, has high control flexibility, and enhances driving safety; Second, the warning sound is controlled by the audio signal processor built into the system chip, significantly reducing the resource occupancy of the system chip and ensuring the sound quality of the warning sound output; Third, the system chip no longer needs to externally connect an additional DSP (Digital Signal Processor) hardware, simplifies the hardware design, and saves hardware costs.
[0055] Please refer to Figure 5 , which is a block diagram of a warning sound control device shown in an exemplary embodiment of the present application. This device can be applied to Figure 1 the implementation environment shown. It should be understood that the present application does not limit the implementation environment of this device. The warning sound control device is applied to the audio signal processor configured in the system chip of the vehicle. As Figure 5 shown, in an exemplary embodiment, this device at least includes a receiving module 510, an obtaining module 520, a matching module 530, and a processing module 540, which are introduced in detail as follows:
[0056] The receiving module 510 is used to receive the current gear and vehicle speed of the vehicle monitored by the system chip;
[0057] An acquisition module 520 is configured to read a preset audio library according to a gear position, acquire a target audio file and cache it in a preset buffer. 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. The preset buffer is provided in an audio signal processor;
[0058] A matching module 530 is configured to match tuning parameters in the target audio file according to the vehicle speed to determine 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;
[0059] A processing module 540 is configured to perform audio processing on the target sound source based on the target tuning parameters and then send it to a speaker for playback to implement 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. The content of the operations performed by each module has been described in detail in the method embodiment, and will not be repeated here.
[0061] The present application further provides an electronic device, including: a processor, a memory, and a communication bus; the communication bus is used to connect the processor and the memory; the processor is configured to execute a computer program stored in the memory to implement the warning sound control method as in the above embodiment.
[0062] Please refer to Figure 6 , which shows a schematic structural diagram of a computer system of an electronic device suitable for implementing the embodiments of the present application. It should be noted that Figure 6 the shown computer system 600 of the electronic device is only an example and should not bring any limitation to the functions and application scope of the embodiments of the present application.
[0063] As Figure 6 shown, the computer system 600 includes a central processing unit (CPU) 601, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 602 or a program loaded from a storage section 608 into a 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 operations 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 required. 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 required so that a computer program read from it can be installed into the storage section 608 as required.
[0065] Specifically, 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 that 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 the network through the communication section 609, and / or installed from the 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 having a computer program stored thereon, and when the computer program is executed by a processor of a computer, it causes the computer to execute the warning sound control method as described above. The computer-readable storage medium may be included in the electronic device described in the above embodiment, or may exist separately without being assembled into the electronic device.
[0067] It should be noted that the computer-readable medium shown in the embodiments of the present application can be a computer-readable signal medium, a computer-readable storage medium, or any combination of the two. A computer-readable storage medium can be, for example, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the above. More specific examples of the computer-readable storage medium 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 disc 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 can include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable computer program. Such a propagated data signal can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. A computer-readable signal medium can also be any computer-readable medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in combination with an instruction execution system, apparatus, or device. The computer program contained on the computer-readable medium can be transmitted using any appropriate medium, including but not limited to: wireless, wired, etc., or any suitable combination of the above.
[0068] The flowcharts and block diagrams in the accompanying drawings illustrate the possible architectures, functions, and operations of systems, methods, and computer program products according to various embodiments of the present application. Among them, each block in the flowchart or block diagram can represent a module, a program segment, or a part of code, and the above module, program segment, or part of code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the blocks may occur in a different order than that marked in the accompanying drawings. For example, two consecutive blocks shown may actually be executed substantially in parallel, and they may sometimes be executed in the reverse order, depending on the functions involved. It should also be noted that each block in the block diagram or flowchart, and the combination of blocks in the block diagram or flowchart, can be implemented by a dedicated hardware-based system for performing the specified functions or operations, or can be implemented by a combination of dedicated hardware and computer instructions.
[0069] The above embodiments are only illustrative of the principles and effects of the present application and are not intended to limit the present application. Any person familiar with this technology can modify or change the above embodiments without departing from the spirit and scope of the present application. Therefore, all equivalent modifications or changes completed by those with ordinary knowledge in the technical field without departing from the spirit and technical idea disclosed by the present application should still be covered by the claims of the present application.
Claims
1. A warning sound control method, characterized in that: Applicable to an audio signal processor configured in a system-on-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, the gear position and the sound source mode have a mapping relationship, and the preset buffer is set in the audio signal processor; matching tuning parameters in the target audio file according to the vehicle speed to determine target tuning parameters, wherein the target audio file includes a target sound source and different tuning parameters, and a mapping relationship exists between the vehicle speed and the tuning parameters; After audio processing is performed on the target sound source based on the target tuning parameters, the audio is sent to the speaker for playback 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 within 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 forward the gear position and the vehicle speed 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 implement warning sound control; generating a start request for activating the data flow path by using the middleware, 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 same number of sound sources as the number of gears; Determining a speed range for the vehicle to travel at a low speed in different gears, and configuring the tuning parameters corresponding to each speed within each speed range; Binding each gear of the vehicle to a different audio mode, wherein the audio mode corresponds to the sound source in a one-to-one manner; An audio file is constructed according to the sound source associated with the same sound source mode and each tuning parameter, and is 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 a target number of frames of the target sound source at a target playback speed according to a preset playback time and a 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 a 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 performing audio processing on the target sound source based on the target tuning parameter, the target sound source is sent to a speaker for playing, further comprising: 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; caching the new target audio file in the preset buffer and releasing 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, the method further 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-on-chip in a vehicle, the device comprising: A receiving module, configured to receive 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, obtain 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, configured to match tuning parameters in the target audio file according to the vehicle speed to determine target tuning parameters, wherein the target audio file includes a target sound source and different tuning parameters, and a mapping relationship exists 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 playback 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