Vehicle audio processing method and device, vehicle, electronic device and storage medium
By converting the audio sampling rate and data transfer within the microcontroller unit, the problem of audio transmission delay in vehicles is solved, achieving more efficient audio processing and transmission.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- BEIJING CO WHEELS TECH CO LTD
- Filing Date
- 2022-06-30
- Publication Date
- 2026-06-12
AI Technical Summary
During vehicle audio transmission, the long audio link results in a long delay.
The microcontroller receives the audio to be transmitted, converts its sampling rate to the target sampling rate corresponding to the audio controller at the receiving end, and then outputs it to the audio controller at the receiving end. Direct memory access is used for data transfer, shortening the audio link.
By performing audio sampling rate conversion and data transfer within the microcontroller unit, audio transmission latency is shortened, and audio transmission efficiency and stability are improved.
Smart Images

Figure CN115440257B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of data processing technology, and in particular to a method and apparatus for processing vehicle audio, a vehicle, an electronic device, and a storage medium. Background Technology
[0002] Currently, vehicle-based audio transmission has become a common function in vehicles. For example, after a terminal is connected to a vehicle, it can make phone calls, or it can make phone calls using the vehicle's built-in calling function.
[0003] During a call, the system relies on a submodule within the vehicle's system. The audio stream is transmitted and played through the Automatic Digital Signal Processor (ADSP) built into the System-on-a-Chip (SoC) chip and the vehicle's amplifier. The SoC chip is also controlled by the vehicle's Microcontroller Unit (MCU). As can be seen from the above audio link, while it can complete a call, the relatively long audio link results in a significant audio transmission delay. Summary of the Invention
[0004] This disclosure provides a method for processing vehicle audio, a vehicle, an apparatus, an electronic device, and a storage medium. Its main purpose is to solve the problem of long audio transmission delay caused by the long audio link in related technologies.
[0005] According to a first aspect of this disclosure, a method for processing vehicle audio is provided, the method being applied within a microcontroller unit, comprising:
[0006] Receive audio to be transmitted;
[0007] The sampling rate of the audio to be transmitted is converted into the target sampling rate corresponding to the audio controller at the receiving end;
[0008] The converted audio to be transmitted is output to the receiving end audio controller.
[0009] Optionally, receiving the audio to be transmitted includes:
[0010] The audio to be transmitted is received from the audio controller at the transmitting end via an audio receiving interface, wherein the audio receiving interface is the external receiving interface of the microcontroller.
[0011] Optionally, receiving the audio to be transmitted includes:
[0012] The audio to be transmitted is received from the audio controller at the transmitting end via an audio receiving interface, wherein the audio receiving interface is the external receiving interface of the microcontroller.
[0013] Optionally, the transmitting audio controller includes an uplink audio controller, and the receiving audio controller includes a downlink audio controller;
[0014] The step of converting the sampling rate of the audio to be transmitted into the target sampling rate corresponding to the audio controller at the receiving end includes:
[0015] Based on direct memory access, the first audio to be transmitted, received by the first audio receiving interface, is temporarily stored in the first receiving buffer; wherein, the audio receiving interface includes the first audio receiving interface, and the first audio to be transmitted is the audio to be transmitted sent by the uplink audio controller;
[0016] Obtain the target sampling rate corresponding to the downlink audio controller;
[0017] According to the audio order of the first audio to be transmitted in the first receiving buffer, the sampling rate of the first audio to be transmitted is converted into the target sampling rate corresponding to the downlink audio controller.
[0018] Optionally, outputting the converted audio to be transmitted to the receiving audio controller includes:
[0019] Based on the direct memory access, the converted first audio to be transmitted is moved to the first transmission buffer space;
[0020] According to the audio order of the first audio to be transmitted in the first transmission buffer, based on the direct memory access, the first audio to be transmitted in the first transmission buffer space is moved to the first audio transmission interface.
[0021] Optionally, the transmitting audio controller includes a downlink audio controller, and the receiving audio controller includes an uplink audio controller;
[0022] The step of converting the sampling rate of the audio to be transmitted into the target sampling rate corresponding to the audio controller at the receiving end includes:
[0023] The second audio to be transmitted, received by the second audio receiving interface, is temporarily stored in the second receiving buffer based on direct memory access. The audio receiving interface includes the second audio receiving interface, and the second audio to be transmitted is the audio to be transmitted sent by the downlink audio controller.
[0024] Obtain the target sampling rate corresponding to the uplink audio controller;
[0025] According to the audio order of the second audio to be transmitted in the second transmission buffer space, the sampling rate of the second audio to be transmitted is converted into the target sampling rate corresponding to the uplink audio controller.
[0026] Optionally, outputting the converted audio to be transmitted to the receiving audio controller includes:
[0027] Based on the direct memory access, the converted second audio to be transmitted is moved to the second transmission buffer space;
[0028] According to the audio order of the second audio to be transmitted in the second transmission buffer space, the second audio to be transmitted in the second transmission buffer space is moved to the second audio transmission interface based on the direct memory access.
[0029] Optionally, the audio to be transmitted is audio generated after being triggered by a preset emergency call event.
[0030] According to a second aspect of this disclosure, a vehicle audio processing apparatus is provided, the apparatus being applied to a microcontroller unit, comprising:
[0031] The receiving unit is used to receive the audio to be transmitted;
[0032] A conversion unit is used to convert the sampling rate of the audio to be transmitted into the target sampling rate corresponding to the audio controller at the receiving end;
[0033] The transmission unit is used to output the converted audio to be transmitted to the receiving end audio controller.
[0034] Optionally, the receiving unit is further configured to receive audio to be transmitted sent by the transmitting end audio controller based on the audio receiving interface, wherein the audio receiving interface is the external receiving interface of the microcontroller.
[0035] Optionally, the transmitting audio controller includes an uplink audio controller, and the receiving audio controller includes a downlink audio controller;
[0036] The conversion unit includes:
[0037] The first storage module is used to temporarily store the first audio to be transmitted received by the first audio receiving interface into the first receiving buffer area based on direct memory access; wherein, the audio receiving interface includes the first audio receiving interface, and the first audio to be transmitted is the audio to be transmitted sent by the uplink audio controller;
[0038] The first acquisition module is used to acquire the target sampling rate corresponding to the downlink audio controller;
[0039] The first conversion module is used to convert the sampling rate of the first audio to be transmitted into the target sampling rate corresponding to the downlink audio controller according to the audio order of the first audio to be transmitted in the first receiving buffer.
[0040] Optionally, the transmission unit includes:
[0041] The first transport module is used to transport the converted first audio to be transmitted to the first transmission buffer space based on the direct memory access;
[0042] The second transport module is used to transport the first audio to be transmitted from the first transmission buffer to the first audio transmission interface according to the audio order of the first audio to be transmitted in the first transmission buffer, based on the direct memory access.
[0043] Optionally, the transmitting audio controller includes a downlink audio controller, and the receiving audio controller includes an uplink audio controller;
[0044] The conversion unit includes:
[0045] The second storage module is used to temporarily store the second audio to be transmitted received by the second audio receiving interface into the second receiving buffer based on direct memory access, wherein the audio receiving interface includes the second audio receiving interface, and the second audio to be transmitted is the audio to be transmitted sent by the downlink audio controller;
[0046] The second acquisition module is used to acquire the target sampling rate corresponding to the uplink audio controller;
[0047] The second conversion module is used to convert the sampling rate of the second audio to be transmitted into the target sampling rate corresponding to the uplink audio controller according to the audio order of the second audio to be transmitted in the second transmission buffer space.
[0048] Optionally, the transmission unit includes:
[0049] The third storage module is used to move the converted second audio to be transmitted to the second transmission buffer space based on the direct memory access;
[0050] The fourth storage module is used to move the second audio to be transmitted from the second transmission buffer space to the second audio transmission interface according to the audio order of the second audio to be transmitted in the second transmission buffer space based on the direct memory access.
[0051] The transmission module is used to move the second audio to be transmitted from the second transmission buffer space to the second audio transmission interface based on the direct memory access.
[0052] Optionally, the audio to be transmitted is audio generated after being triggered by a preset emergency call event.
[0053] According to a third aspect of this disclosure, an electronic device is provided, comprising:
[0054] At least one processor; and
[0055] A memory communicatively connected to the at least one processor; wherein,
[0056] The memory stores instructions that can be executed by the at least one processor to enable the at least one processor to perform the method described in the first aspect above.
[0057] According to a fifth aspect of this disclosure, a non-transitory computer-readable storage medium is provided storing computer instructions, wherein the computer instructions are configured to cause the computer to perform the method described in the first aspect above.
[0058] According to a sixth aspect of this disclosure, a computer program product is provided, comprising a computer program that, when executed by a processor, implements the method described in the first aspect above.
[0059] According to a seventh aspect of this disclosure, a vehicle is provided, including the vehicle audio processing apparatus of the second aspect, or the electronic device of the third aspect, or the electronic device of the fourth aspect.
[0060] The vehicle audio processing method, apparatus, electronic device, and storage medium disclosed herein receive audio to be transmitted within an MCU, convert the sampling rate of the audio to be transmitted into a target sampling rate corresponding to a receiving audio controller, and output the converted audio to be transmitted to the receiving audio controller. Compared with related technologies where the audio link is long due to the SOC chip being controlled by the MCU, the embodiments of this application realize the sampling rate conversion of the audio to be transmitted within the MCU according to the target sampling rate corresponding to the receiving audio controller. This allows the converted audio output by the microcontroller unit to be received and recognized by the receiving audio controller, enabling the MCU to directly replace the SOC chip for audio processing, shortening the audio link, and thus reducing the audio transmission delay.
[0061] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of this application, nor is it intended to limit the scope of this application. Other features of this application will become readily apparent from the following description. Attached Figure Description
[0062] The accompanying drawings are provided to better understand this solution and do not constitute a limitation of this disclosure. Wherein:
[0063] Figure 1 A schematic flowchart illustrating a vehicle audio processing method provided in an embodiment of this disclosure;
[0064] Figure 2 A schematic diagram of a vehicle audio transmission system provided in an embodiment of this disclosure;
[0065] Figure 3 A schematic diagram illustrating the internal audio transmission of a microcontroller unit (MCU) according to an embodiment of this disclosure;
[0066] Figure 4 A schematic diagram of the structure of a vehicle audio processing device provided in an embodiment of this disclosure;
[0067] Figure 5 A schematic diagram of the structure of another vehicle audio processing device provided in an embodiment of this disclosure;
[0068] Figure 6 A schematic block diagram of an example electronic device 300 provided for embodiments of this disclosure. Detailed Implementation
[0069] The exemplary embodiments of this disclosure are described below with reference to the accompanying drawings, including various details of the embodiments to aid understanding, and should be considered merely exemplary. Therefore, those skilled in the art will recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of this disclosure. Similarly, for clarity and brevity, descriptions of well-known functions and structures are omitted in the following description.
[0070] The following description, with reference to the accompanying drawings, outlines a method, apparatus, electronic device, and storage medium for processing vehicle audio according to embodiments of the present disclosure.
[0071] Figure 1 This is a schematic flowchart illustrating a vehicle audio processing method provided in an embodiment of this disclosure. Figure 1 As shown, the method is applied to the microcontroller unit of a vehicle, and the method includes the following steps:
[0072] Step 101: Receive the audio to be transmitted.
[0073] This application embodiment is applied to a vehicle call process. In specific implementation, the call process is divided into two parts. One part involves, after the audio transmission command is triggered, collecting audio from the occupants of the vehicle using the vehicle's microphone and sending it to the Micro Control Unit (MCU). The MCU then transmits the first audio to be transmitted to the uplink audio controller, which in turn uploads the first audio to be transmitted to the call server (uplink audio transmission). The other part involves the MCU receiving the second audio to be transmitted from the call server and transmitting it to the downlink audio controller, which then plays the audio through the vehicle's speakers. The following embodiments will be described using an Automotive Audio Bus (A2B) as an example of an uplink audio controller and an Audio Amplifier (AMP) as an example of a downlink audio controller. This description is not intended to limit the specific types of the uplink and downlink audio controllers.
[0074] To facilitate understanding of the audio transmission process, such as Figure 2 As shown, Figure 2 This is a schematic diagram of a vehicle audio transmission system provided in an embodiment of this application. In the illustration, the upstream audio controller (Automotive Audio Bus, A2B) is used as an example for explanation, and the downstream audio controller is used as an audio amplifier (AMP) as an example for explanation. This explanation is not intended to limit the specific types of the upstream and downstream audio controllers.
[0075] It should be noted that the application scenario of this application embodiment is during vehicle audio transmission. When the call is not started, the uplink audio controller A2B and the downlink audio controller AMP are inactive. Only when the microcontroller unit MCU detects that the call function needs to be started will the uplink audio controller A2B and the downlink audio controller AMP be activated, that is, the microcontroller unit MCU enables the uplink audio controller A2B and the downlink audio controller AMP.
[0076] Therefore, before activating the uplink and downlink audio controllers respectively, the triggering of the determined audio transmission command is monitored in real time via the Controller Area Network (CAN) bus. For methods of real-time monitoring, please refer to any implementation in related technologies; these embodiments will not be elaborated upon here.
[0077] This step applies to Figure 2In the process of transmitting audio collected by the microphone to the microcontroller unit (MCU), or when audio sent from the cloud to the MCU, the MCU receives the audio to be transmitted via an audio receiving interface. The audio to be transmitted is then transferred to the MCU through the audio receiving interface. This audio receiving interface is the external receiving interface of the MCU. A single MCU contains multiple audio receiving interfaces. Once a different audio receiving interface is assigned the function of receiving audio data to be transmitted once, it cannot be changed subsequently. The audio to be transmitted can be transmitted to the MCU through the audio receiving interface.
[0078] By using the audio receiving interface to transmit the audio to be transmitted to the microcontroller unit (MCU), the transmission efficiency of audio data within the MCU is improved, and the sound latency is further reduced.
[0079] Step 102: Convert the sampling rate of the audio to be transmitted into the target sampling rate corresponding to the audio controller at the receiving end.
[0080] During a call, because the sampling rate of the audio data received by the in-vehicle microphone differs from that of the audio data received by the call server, it is necessary to convert them separately in the microcontroller unit (MCU) to enable audio transmission between the vehicle and the call server.
[0081] As one possible embodiment of this application, the sampling rate conversion includes, but is not limited to, the use of an asynchronous sample rate converter (ASRC). The ASRC, as a general-purpose software module, can be configured with different target sampling rates according to different specific scenarios. This application does not limit the specific implementation form of the target sampling rate conversion.
[0082] Step 103: Output the converted audio to be transmitted to the receiving audio controller.
[0083] Similar to the transfer process in step 101, the audio to be transmitted, after its sampling frequency conversion, is transferred to the audio transmission interface. This audio transmission interface is the external transmission interface of the microcontroller unit (MCU). After the converted audio is transferred to the audio transmission interface, it is output. The entire process described above completes the data reception, data conversion, and data output process of the audio to be transmitted within the MCU. For a better understanding of the audio transmission process within the MCU, please refer to [reference needed]. Figure 3 , Figure 3 This is a schematic diagram of an internal audio transmission method of a microcontroller unit (MCU) provided in an embodiment of this disclosure. Figure 3The example of ASRC performing target sampling rate conversion is used for illustration, but this approach is not intended to limit the implementation of sampling rate conversion.
[0084] The vehicle audio processing method disclosed herein receives the audio to be transmitted within an MCU, converts the sampling rate of the audio to be transmitted into a target sampling rate corresponding to the receiving audio controller, and outputs the converted audio to be transmitted to the receiving audio controller. Compared with related technologies where the audio link is long due to the SOC chip being controlled by the microcontroller unit (MCU), this embodiment of the application realizes the sampling rate conversion of the audio to be transmitted within the MCU according to the target sampling rate corresponding to the receiving audio controller. This allows the converted audio output by the microcontroller unit to be received and recognized by the receiving audio controller, enabling the MCU to directly replace the SOC chip for audio processing, shortening the audio link, and thus reducing the audio transmission delay.
[0085] As a refinement of the above embodiment, when converting the sampling rate of the audio to be transmitted to the target sampling rate corresponding to the receiving audio controller in step 102, the sampling rate of the audio to be transmitted is converted to the target sampling rate, which is a sampling rate that can be received by the receiving audio controller. For example, taking the upstream audio controller as the receiving end and transmitting the second audio to be transmitted as an example, the sampling rate of the second audio to be transmitted in the call server is 16kHz, and the audio sampling rate received by the in-vehicle speaker is 48kHz. Therefore, the sampling rate needs to be converted by ASRC in the microcontroller unit (MCU). Based on the second audio receiving interface SAI1, the second audio to be transmitted sent by the call server (sending audio controller) is received. At this time, the second audio to be transmitted reaches the microcontroller unit (MCU), and the sampling rate of the second audio to be transmitted is converted to the second target sampling rate (downstream audio controller) through ASRC or program control. The second target sampling rate is a sampling rate that the in-vehicle speaker can receive, that is, in this embodiment, the second target sampling rate is a sampling rate of 48kHz. The second audio to be transmitted after sampling rate conversion is sent to the second audio transmission interface SAI3, so that the second audio to be transmitted can be sent from the second audio transmission interface SAI3 to the downlink audio controller AMP, and then transmitted to the in-vehicle speakers for playback.
[0086] During uplink audio transmission, when converting the sampling rate of the audio to be transmitted to a target sampling rate, the description of the first target sampling rate (uplink audio controller) is used to indicate that the target sampling rate is the target sampling rate during uplink audio transmission. The first target sampling rate can be set to 16kHz.
[0087] As an extension of the embodiments of this application, in order to improve the transmission efficiency of audio data within the microcontroller unit (MCU) and further reduce sound latency, please continue reading. Figure 3 Taking downlink audio as an example, when the second audio to be transmitted arrives inside the microcontroller unit (MCU), the second audio to be transmitted is the audio to be transmitted sent to the uplink audio controller via the microcontroller unit. Based on Direct Memory Access (DMA), the second audio to be transmitted received by the second audio receiving interface is moved to the ASRC. Based on the DMA, the second audio to be transmitted after sampling rate conversion is moved to the second audio transmitting interface SAI3. Specifically, the process involves: temporarily storing the second audio to be transmitted received by the second audio receiving interface SAI1 in the second receiving buffer area using Direct Memory Access (DMA); using the second receiving buffer area as the second receiving buffer queue (ASRC-IN-FIFO); moving the second audio to be transmitted from the second receiving buffer queue ASRC-IN-FIFO to the ASRC based on the DMA; obtaining the target sampling rate corresponding to the uplink audio controller; converting the sampling rate of the second audio to be transmitted to the target sampling rate corresponding to the uplink audio controller according to the audio order of the second audio to be transmitted in the second transmitting buffer space; and moving the second audio to be transmitted after the sampling rate conversion to the second transmitting buffer space (RING-BUFFER) based on the DMA; and moving the second audio to be transmitted in the second transmitting buffer space RING-BUFFER to the second audio transmitting interface SAI3 according to the audio order of the second audio to be transmitted in the second transmitting buffer space RING-BUFFER based on the DMA.
[0088] To facilitate understanding of the data transfer process in Direct Memory Access (DMI), the second audio to be transmitted, with its sampling rate converted, is moved to a second transmit buffer (RING-BUFFER) via DMA. When the second audio transmit interface SAI3 needs to transmit the second audio, it triggers a DMA request to read data from the second transmit buffer (RING-BUFFER). This transforms the process of actively sending the second audio to be transmitted to the second audio transmit interface SAI3 into the second audio transmit interface SAI3 actively acquiring data. This ensures that the destination address of the previous DMA and the source address of the next DMA always read data at the same speed in this second transmit buffer (RING-BUFFER), thus achieving data transmission accuracy without loss or misalignment.
[0089] It should be noted that the microcontroller unit (MCU) contains multiple audio receiving interfaces, such as the first audio receiving interface SAI4, the first audio transmitting interface SAI1, the second audio receiving interface SAI2, and the second audio transmitting interface SAI3. Once an interface is assigned the function of receiving or transmitting, it will continue to be assigned this function during the link transmission process. This application embodiment does not limit the number of interfaces or their naming in the microcontroller unit (MCU).
[0090] The above embodiments describe in detail the processing procedure of the second audio to be transmitted within the microcontroller unit (MCU). Similar to the processing method described above, the specific processing procedure of the first audio to be transmitted within the microcontroller unit (MCU) includes:
[0091] The first audio to be transmitted, received by the uplink audio controller A2B via the first audio receiving interface SAI4, is temporarily stored in the first receiving buffer using direct memory access (DMA). The first audio to be transmitted is sent by the uplink audio controller. The target sampling rate corresponding to the downlink audio controller is obtained. The sampling rate of the first audio to be transmitted is converted to the target sampling rate corresponding to the downlink audio controller according to the audio order of the first audio to be transmitted in the first receiving buffer. The converted first audio to be transmitted is then moved to the first transmitting buffer space using direct memory access. Finally, the first audio to be transmitted in the first transmitting buffer space is moved to the first audio transmitting interface SAI1 according to the audio order of the first audio to be transmitted in the first transmitting buffer space using direct memory access.
[0092] In practical applications, there may be situations where the first transmit buffer, the first receive buffer, the second receive buffer, or the second transmit buffer is full. In such application scenarios, this can be achieved by increasing the memory.
[0093] When the microcontroller unit (MCU) processes the uplink audio data, it works in conjunction with the above-mentioned... Figure 3 The processing procedure for downlink audio data is similar, except that the target sampling rate is different; the uplink is converted to a first target sampling rate of 16kHz. The specific processing procedure for the first audio data to be transmitted within the microcontroller unit (MCU) described in this embodiment is the same as the processing procedure for the second audio data to be transmitted within the MCU, and will not be repeated here.
[0094] The car emergency call system (eCall) is a crucial life-saving mechanism, providing users with eCall rescue services in the event of a vehicle emergency. It supports an automatic triggering mode for the eCall rescue service, meaning that in the event of a collision and airbag deployment, it automatically dials a rescue number. After the eCall rescue service is connected, the backend will promptly arrange appropriate rescue services based on the vehicle's location. The method described in this application embodiment can be applied to eCall rescue service scenarios. When a preset emergency call event (eCall rescue service) is determined to be triggered, the generated audio can be processed using the processing method described in any of the above embodiments.
[0095] In summary, the transmission method described in this application realizes the parsing and transmission of audio at different sampling rates on the microcontroller unit (MCU) side. It utilizes the original hardware resources of the vehicle's infotainment system (MCU) to achieve audio data conversion and transmission. The second data to be transmitted, received from the 5G module, is transmitted from the peripheral device (call server) to the peripheral device (in-vehicle loudspeaker); from the peripheral device (in-vehicle microphone) to the memory (MCU); and from the memory to the MCU to the peripheral device (call server), all perfectly integrated.
[0096] In addition, the shortened audio transmission link (replacing the original SOC chip with a microcontroller unit MCU) results in lower sound latency and a better user experience for in-vehicle audio transmission.
[0097] Furthermore, it is implemented within the vehicle's smallest subsystem environment (microcontroller unit, MCU), ensuring the stability of the audio transmission function.
[0098] Corresponding to the vehicle audio processing method described above, the present invention also proposes a vehicle audio processing apparatus. Since the apparatus embodiments of the present invention correspond to the method embodiments described above, details not disclosed in the apparatus embodiments can be referred to in the method embodiments described above, and will not be repeated here.
[0099] Figure 4 This is a schematic diagram of the structure of a vehicle audio processing device provided in an embodiment of the present disclosure, as shown below. Figure 4 As shown, the microcontroller unit of the vehicle used in the device application includes:
[0100] Receiving unit 21 is used to receive audio to be transmitted;
[0101] The conversion unit 22 is used to convert the sampling rate of the audio to be transmitted into the target sampling rate corresponding to the audio controller at the receiving end;
[0102] The transmission unit 23 is used to output the converted audio to be transmitted to the receiving end audio controller.
[0103] The vehicle audio processing apparatus, electronic device, and storage medium disclosed herein receive audio to be transmitted within an MCU, convert the sampling rate of the audio to be transmitted into a target sampling rate corresponding to a receiving audio controller, and output the converted audio to be transmitted to the receiving audio controller. Compared with related technologies where the audio link is long due to the SOC chip being controlled by the MCU, the embodiments of this application realize the sampling rate conversion of the audio to be transmitted within the MCU according to the target sampling rate corresponding to the receiving audio controller. This allows the converted audio output by the microcontroller unit to be received and recognized by the receiving audio controller, enabling the MCU to directly replace the SOC chip for audio processing, shortening the audio link, and thus reducing the audio transmission delay.
[0104] Furthermore, in one possible implementation of this embodiment, the receiving unit 21 is also used to receive the audio to be transmitted sent by the transmitting end audio controller based on the audio receiving interface, wherein the audio receiving interface is the external receiving interface of the microcontroller.
[0105] Furthermore, in one possible implementation of this embodiment, such as Figure 5 As shown, the transmitting audio controller includes an uplink audio controller, and the receiving audio controller includes a downlink audio controller;
[0106] The conversion unit 22 includes:
[0107] The first storage module 221 is used to temporarily store the first audio to be transmitted received by the first audio receiving interface into the first receiving buffer area based on direct memory access; wherein, the audio receiving interface includes the first audio receiving interface, and the first audio to be transmitted is the audio to be transmitted sent by the uplink audio controller;
[0108] The first acquisition module 222 is used to acquire the target sampling rate corresponding to the downlink audio controller;
[0109] The first conversion module 223 is used to convert the sampling rate of the first audio to be transmitted into the target sampling rate corresponding to the downlink audio controller according to the audio order of the first audio to be transmitted in the first receiving buffer.
[0110] Furthermore, in one possible implementation of this embodiment, such as Figure 5 As shown, the transmission unit 23 includes:
[0111] The first transport module 231 is used to transport the converted first audio to be transmitted to the first transmission buffer space based on the direct memory access;
[0112] The second transport module 232 is used to transport the first audio to be transmitted in the first transmission buffer space to the first audio transmission interface according to the audio order of the first audio to be transmitted in the first transmission buffer space based on the direct memory access.
[0113] Furthermore, in one possible implementation of this embodiment, such as Figure 5 As shown, the transmitting audio controller includes a downlink audio controller, and the receiving audio controller includes an uplink audio controller;
[0114] The conversion unit 22 includes:
[0115] The second storage module 224 is used to temporarily store the second audio to be transmitted received by the second audio receiving interface into the second receiving buffer based on direct memory access, wherein the audio receiving interface includes the second audio receiving interface, and the second audio to be transmitted is the audio to be transmitted sent by the downlink audio controller;
[0116] The second acquisition module 225 is used to acquire the target sampling rate corresponding to the uplink audio controller;
[0117] The second conversion module 226 is used to convert the sampling rate of the second audio to be transmitted into the target sampling rate corresponding to the uplink audio controller according to the audio order of the second audio to be transmitted in the second transmission buffer space.
[0118] Furthermore, in one possible implementation of this embodiment, such as Figure 5 As shown, the transmission unit 23 includes:
[0119] The third storage module 233 is used to move the converted second audio to be transmitted to the second transmission buffer space based on the direct memory access;
[0120] The fourth storage module 234 is used to move the second audio to be transmitted in the second transmission buffer space to the second audio transmission interface according to the audio order of the second audio to be transmitted in the second transmission buffer space based on the direct memory access.
[0121] The transmission module 235 is used to move the second audio to be transmitted from the second transmission buffer space to the second audio transmission interface based on the direct memory access.
[0122] Furthermore, in one possible implementation of this embodiment, the audio to be transmitted is audio generated after being triggered by a preset emergency call event.
[0123] According to embodiments of this disclosure, this disclosure also provides an electronic device, a readable storage medium, and a computer program product.
[0124] Figure 6 A schematic block diagram of an example electronic device 300 that can be used to implement embodiments of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the present disclosure described and / or claimed herein.
[0125] like Figure 6 As shown, device 300 includes a computing unit 301, which can perform various appropriate actions and processes based on a computer program stored in ROM (Read-Only Memory) 302 or a computer program loaded from storage unit 308 into RAM (Random Access Memory) 303. RAM 303 can also store various programs and data required for the operation of device 300. The computing unit 301, ROM 302, and RAM 303 are interconnected via bus 304. I / O (Input / Output) interface 305 is also connected to bus 304.
[0126] Multiple components in device 300 are connected to I / O interface 305, including: input unit 303, such as keyboard, mouse, etc.; output unit 307, such as various types of monitors, speakers, etc.; storage unit 308, such as disk, optical disk, etc.; and communication unit 309, such as network card, modem, wireless transceiver, etc. Communication unit 309 allows device 300 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.
[0127] The computing unit 301 can be various general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the computing unit 301 include, but are not limited to, CPUs (Central Processing Units), GPUs (Graphics Processing Units), various special-purpose AI (Artificial Intelligence) computing chips, various computing units running machine learning model algorithms, DSPs (Digital Signal Processors), and any suitable processor, controller, microcontroller, etc. The computing unit 301 performs the various methods and processes described above, such as vehicle audio processing methods. For example, in some embodiments, the vehicle audio processing methods may be implemented as computer software programs tangibly contained in a machine-readable medium, such as storage unit 308. In some embodiments, part or all of the computer program may be loaded and / or installed on device 300 via ROM 302 and / or communication unit 309. When the computer program is loaded into RAM 303 and executed by the computing unit 301, one or more steps of the methods described above may be performed. Alternatively, in other embodiments, the computing unit 301 may be configured to perform the aforementioned vehicle audio processing method by any other suitable means (e.g., by means of firmware).
[0128] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, FPGAs (Field Programmable Gate Arrays), ASICs (Application-Specific Integrated Circuits), ASSPs (Application-Specific Standard Products), SOCs (System-on-Chips), CPLDs (Complex Programmable Logic Devices), computer hardware, firmware, software, and / or combinations thereof. These various implementations may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.
[0129] The program code used to implement the methods of this disclosure may be written in any combination of one or more programming languages. This program code may be provided to a processor or controller of a general-purpose computer, special-purpose computer, or other programmable data processing apparatus, such that when executed by the processor or controller, the program code causes the functions / operations specified in the flowcharts and / or block diagrams to be implemented. The program code may be executed entirely on a machine, partially on a machine, as a standalone software package partially on a machine and partially on a remote machine, or entirely on a remote machine or server.
[0130] In the context of this disclosure, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, RAM, ROM, EPROM (Electrically Programmable Read-Only Memory) or flash memory, optical fiber, CD-ROM (Compact Disc Read-Only Memory), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0131] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device for displaying information to the user (e.g., a CRT (Cathode-Ray Tube) or LCD (Liquid Crystal Display) monitor); and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the computer. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).
[0132] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as data servers), or middleware components (e.g., application servers), or frontend components (e.g., user computers with graphical user interfaces or web browsers through which users can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication (e.g., communication networks) of any form or medium. Examples of communication networks include LANs (Local Area Networks), WANs (Wide Area Networks), the Internet, and blockchain networks.
[0133] Computer systems can include clients and servers. Clients and servers are generally geographically separated and typically interact via communication networks. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. A server can be a cloud server, also known as a cloud computing server or cloud host, a hosting product within the cloud computing service ecosystem, addressing the shortcomings of traditional physical hosts and VPS (Virtual Private Server, or simply "VPS") services, such as high management difficulty and weak business scalability. Servers can also be servers for distributed systems or servers incorporating blockchain technology.
[0134] It's important to note that artificial intelligence (AI) is the study of enabling computers to simulate certain human thought processes and intelligent behaviors (such as learning, reasoning, thinking, and planning). It encompasses both hardware and software technologies. AI hardware technologies generally include sensors, dedicated AI chips, cloud computing, distributed storage, and big data processing. AI software technologies primarily include computer vision, speech recognition, natural language processing, machine learning / deep learning, big data processing, and knowledge graph technologies.
[0135] It should be understood that the various forms of processes shown above can be used to rearrange, add, or delete steps. For example, the steps described in this disclosure can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution disclosed in this disclosure can be achieved, and this is not limited herein.
[0136] The specific embodiments described above do not constitute a limitation on the scope of protection of this disclosure. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this disclosure should be included within the scope of protection of this disclosure.
Claims
1. A method for processing vehicle audio, characterized in that, The method is applied to a microcontroller unit, including: Receive audio to be transmitted; receiving audio to be transmitted includes: receiving audio to be transmitted sent by the audio controller at the transmitting end based on the audio receiving interface, wherein the audio receiving interface is the external receiving interface of the microcontroller; The sampling rate of the audio to be transmitted is converted into the target sampling rate corresponding to the audio controller at the receiving end; The converted audio to be transmitted is output to the receiving end audio controller; The step of converting the sampling rate of the audio to be transmitted into the target sampling rate corresponding to the audio controller at the receiving end includes: Based on direct memory access, the first audio to be transmitted, received by the first audio receiving interface, is temporarily stored in the first receiving buffer; wherein, the audio receiving interface includes the first audio receiving interface, and the first audio to be transmitted is the audio to be transmitted sent by the uplink audio controller; The step of outputting the converted audio to be transmitted to the receiving audio controller includes: Based on the direct memory access, the converted first audio to be transmitted is moved to the first transmission buffer space; wherein, the destination address of the previous direct memory access and the source address of the subsequent direct memory access read data at the same speed in the first transmission buffer space; According to the audio order of the first audio to be transmitted in the first transmission buffer space, based on the direct memory access, the first audio to be transmitted in the first transmission buffer space is moved to the first audio transmission interface.
2. The processing method according to claim 1, characterized in that, The transmitting audio controller includes an uplink audio controller, and the receiving audio controller includes a downlink audio controller; Obtain the target sampling rate corresponding to the downlink audio controller; According to the audio order of the first audio to be transmitted in the first receiving buffer, the sampling rate of the first audio to be transmitted is converted into the target sampling rate corresponding to the downlink audio controller.
3. The processing method according to claim 1, characterized in that, The transmitting audio controller includes a downlink audio controller, and the receiving audio controller includes an uplink audio controller; The step of converting the sampling rate of the audio to be transmitted into the target sampling rate corresponding to the audio controller at the receiving end includes: The second audio to be transmitted, received by the second audio receiving interface, is temporarily stored in the second receiving buffer based on direct memory access. The audio receiving interface includes the second audio receiving interface, and the second audio to be transmitted is the audio to be transmitted sent by the downlink audio controller. Obtain the target sampling rate corresponding to the uplink audio controller; According to the audio order of the second audio to be transmitted in the second transmission buffer space, the sampling rate of the second audio to be transmitted is converted into the target sampling rate corresponding to the uplink audio controller.
4. The processing method according to claim 3, characterized in that, The step of outputting the converted audio to be transmitted to the receiving audio controller includes: Based on the direct memory access, the converted second audio to be transmitted is moved to the second transmission buffer space; According to the audio order of the second audio to be transmitted in the second transmission buffer space, the second audio to be transmitted in the second transmission buffer space is moved to the second audio transmission interface based on the direct memory access.
5. The processing method according to any one of claims 1-4, characterized in that, The audio to be transmitted is generated after a preset emergency call event is triggered.
6. A vehicle audio processing device, characterized in that, The device is applied to a microcontroller unit and includes: A receiving unit is used to receive audio to be transmitted; receiving the audio to be transmitted includes: receiving the audio to be transmitted sent by the transmitting end audio controller based on the audio receiving interface, wherein the audio receiving interface is the external receiving interface of the microcontroller. A conversion unit is used to convert the sampling rate of the audio to be transmitted into the target sampling rate corresponding to the audio controller at the receiving end; The transmission unit is used to output the converted audio to be transmitted to the receiving end audio controller; The step of converting the sampling rate of the audio to be transmitted into the target sampling rate corresponding to the audio controller at the receiving end includes: Based on direct memory access, the first audio to be transmitted, received by the first audio receiving interface, is temporarily stored in the first receiving buffer; wherein, the audio receiving interface includes the first audio receiving interface, and the first audio to be transmitted is the audio to be transmitted sent by the uplink audio controller; The step of outputting the converted audio to be transmitted to the receiving audio controller includes: Based on the direct memory access, the converted first audio to be transmitted is moved to the first transmission buffer space; wherein, the destination address of the previous direct memory access and the source address of the subsequent direct memory access read data at the same speed in the first transmission buffer space; According to the audio order of the first audio to be transmitted in the first transmission buffer space, based on the direct memory access, the first audio to be transmitted in the first transmission buffer space is moved to the first audio transmission interface.
7. An electronic device, characterized in that, include: At least one processor; as well as A memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-4.
8. A non-transitory computer-readable storage medium storing computer instructions, characterized in that, The computer instructions are used to cause the computer to perform the method according to any one of claims 1-4.
9. A computer program product, characterized in that, Includes a computer program that, when executed by a processor, implements the method according to any one of claims 1-4.
10. A vehicle, characterized in that, This includes the vehicle audio processing apparatus as described in claim 6, or the electronic device as described in claim 7.