Audio transmission method and device, storage medium, vehicle-mounted terminal and mobile terminal

Through the audio interface technology of virtual microphone module and shared memory function, the problem of high equipment cost when singing in a car is solved, and the effect of singing in a car is achieved without the need to purchase an additional microphone or a high-configuration vehicle can be used, reducing costs And improves the user experience.

CN119314449APending Publication Date: 2025-01-14GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP LTD
View PDF 12 Cites 0 Cited by

Patent Information

Application Number
CN202310850320.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-07-11
Publication Date
2025-01-14

AI Technical Summary

Technical Problem

When playing karaokes on cars, you need to purchase an additional microphone or choose a high-configuration vehicle, which leads to high costs and the existing technology is difficult to effectively solve this problem.

Method used

The virtual microphone module receives the audio data of the person sent by the mobile terminal at the on-board terminal, and uses the audio interface of the shared memory function to transmit the data to the application layer, so as to achieve karaokes on the car without the need to purchase an additional microphone or a high-configured vehicle.

Benefits of technology

It reduces the cost of karaoke in cars, simplifies equipment configuration, improves the experience of karaoke, and reduces audio transmission delay.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119314449A_ABST
    Figure CN119314449A_ABST
Patent Text Reader

Abstract

The invention discloses an audio transmission method and device, a storage medium, a vehicle-mounted terminal and a mobile terminal. The audio transmission method is applied to the vehicle-mounted terminal, and comprises the following steps: receiving human voice audio data sent by a mobile terminal through a virtual microphone module; the virtual hardware abstraction module is used for sending the voice audio data to the hardware abstraction layer through the virtual microphone module; obtaining voice audio data from the virtual hardware abstraction module through an audio interface with a shared memory function; and sending the voice audio data to an application layer through an audio interface. According to the invention, the cost of karaoke on the automobile can be saved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the field of electronic technology, and in particular, relates to an audio transmission method, device, computer-readable storage medium, vehicle-mounted terminal and mobile terminal. Background Art

[0002] With the improvement of people's living standards, more and more families own cars. Cars have become the most intimate activity space in life, and people hope to get more diverse experiences in cars. Cars generally integrate various in-vehicle systems, such as in-vehicle entertainment systems, which refer to entertainment systems with radio and audio and video playback functions. As the level of intelligence of in-vehicle systems becomes higher and higher, many in-vehicle systems have gradually begun to integrate wireless communication function modules such as WiFi and Bluetooth, and can be wirelessly connected with external devices through wireless communication function modules.

[0003] With the rise of karaoke culture, car users have begun to have the need to sing karaoke in the car, and for the current powerful cars, singing karaoke in the car is completely feasible. In order to meet the needs of singing karaoke in the car, at least two major elements are required: one is an audio playback device, and the other is a good microphone. Therefore, many car users currently purchase additional microphones or choose high-configuration vehicles with on-board microphones in order to sing karaoke in the car. Although this can meet the needs of car users for singing karaoke in the car, the cost of meeting the above needs of car users is high because they need to purchase additional microphones or choose high-configuration vehicles. Summary of the invention

[0004] The embodiments of the present application provide an audio transmission method, device, storage medium, vehicle-mounted terminal and mobile terminal, which can save the cost of singing karaoke in a car.

[0005] In a first aspect, an embodiment of the present application provides an audio transmission method, which is applied to a vehicle-mounted terminal, comprising:

[0006] Receiving human voice audio data sent by the mobile terminal through the virtual microphone module;

[0007] Sending the human voice audio data to a virtual hardware abstraction module of a hardware abstraction layer through the virtual microphone module;

[0008] Acquire human voice audio data from the virtual hardware abstract module through an audio interface with a shared memory function enabled;

[0009] The human voice audio data is sent to the application layer through the audio interface.

[0010] In a second aspect, an embodiment of the present application provides an audio transmission method, which is applied to a mobile terminal, including:

[0011] Collect human voice audio data through a microphone;

[0012] Sending the human voice audio data to the hardware abstraction layer through a microphone;

[0013] Acquire the human voice audio data from the hardware abstraction layer through an audio interface with a shared memory function enabled;

[0014] Sending the human voice audio data to the application layer through the audio interface;

[0015] The human voice audio data is sent to the vehicle terminal at the application layer.

[0016] In a third aspect, an embodiment of the present application provides an audio transmission device, which is applied to a vehicle-mounted terminal, including:

[0017] A receiving unit, used for receiving human voice audio data sent by a mobile terminal through a virtual microphone module;

[0018] A first sending unit, configured to send the human voice audio data to a virtual hardware abstraction module of a hardware abstraction layer through the virtual microphone module;

[0019] An acquisition unit, used for acquiring human voice audio data from the virtual hardware abstract module through an audio interface with a shared memory function enabled;

[0020] The second sending unit is further used to send the human voice audio data to the application layer through the audio interface.

[0021] In a fourth aspect, an embodiment of the present application provides an audio transmission device, applied to a mobile terminal, comprising:

[0022] A collection unit, used for collecting human voice audio data through a microphone;

[0023] A first sending unit, configured to send the human voice audio data to a hardware abstraction layer via a microphone;

[0024] An acquisition unit, configured to acquire the human voice audio data from the hardware abstraction layer through an audio interface with a shared memory function enabled;

[0025] A second sending unit, used for sending the human voice audio data to the application layer through the audio interface;

[0026] The third sending unit is used to send the human voice audio data to the vehicle terminal at the application layer.

[0027] In a fifth aspect, an embodiment of the present application provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed on a computer, the computer executes the audio transmission method provided by the embodiment of the present application.

[0028] In a sixth aspect, an embodiment of the present application further provides a vehicle-mounted terminal, comprising a memory and a processor, wherein the processor is used to execute the audio transmission method applied to the vehicle-mounted terminal provided in an embodiment of the present application by calling a computer program stored in the memory.

[0029] In the seventh aspect, an embodiment of the present application also provides a mobile terminal, including a memory and a processor, wherein the processor is used to execute the audio transmission method applied to the mobile terminal provided in the embodiment of the present application by calling a computer program stored in the memory.

[0030] In an embodiment of the present application, human voice audio data sent by a mobile terminal is received through a virtual microphone module; the human voice audio data is sent to a virtual hardware abstraction module of a hardware abstraction layer through the virtual microphone module; the human voice audio data is sent from the virtual hardware abstraction module to an application layer through an audio interface with a shared memory function enabled. A mobile terminal such as a mobile phone can be used as a microphone, so that karaoke can be performed in a car without purchasing an additional microphone or selecting a high-configuration vehicle. Therefore, the cost of karaoke in a car can be saved. BRIEF DESCRIPTION OF THE DRAWINGS

[0031] The technical solution and beneficial effects of the present application will be made apparent by describing in detail the specific implementation methods of the present application in conjunction with the accompanying drawings.

[0032] Figure 1 It is a flowchart of the audio transmission method provided in an embodiment of the present application.

[0033] Figure 2 It is a flowchart of another audio transmission method provided in an embodiment of the present application.

[0034] Figure 3 It is a scenario diagram of the audio transmission method provided in an embodiment of the present application.

[0035] Figure 4 It is a structural diagram of the audio transmission device provided in an embodiment of the present application.

[0036] Figure 5 It is a structural diagram of the audio transmission device provided in an embodiment of the present application.

[0037] Figure 6 It is a structural diagram of the vehicle-mounted terminal provided in an embodiment of the present application.

[0038] Figure 7 It is a structural diagram of a mobile terminal provided in an embodiment of the present application. DETAILED DESCRIPTION

[0039] It should be noted that the terms "first", "second" and "third" in this application are used to distinguish different objects, rather than to describe a specific order. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or modules is not limited to the listed steps or modules, but some embodiments also include steps or modules that are not listed, or some embodiments also include other steps or modules inherent to these processes, methods, products or devices.

[0040] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.

[0041] The embodiments of the present application provide an audio transmission method, an audio transmission device, a storage medium, a vehicle-mounted terminal, and a mobile terminal. The execution subject of the audio transmission method may be the audio transmission device provided in the embodiments of the present application, or a vehicle-mounted terminal or a mobile terminal integrated with the audio transmission device, wherein the audio transmission device may be implemented in hardware or software. Among them, the vehicle-mounted terminal may include a vehicle machine, a vehicle-mounted computer, etc. The mobile terminal may include a mobile phone or a tablet computer, etc.

[0042] See also Figure 1 , Figure 1 : is a flow chart of an audio transmission method provided in an embodiment of the present application. The audio transmission method is applied to a vehicle-mounted terminal. The flow may include:

[0043] In 101, human voice audio data sent by a mobile terminal is received through a virtual microphone module.

[0044] The vehicle-mounted terminal may include a vehicle machine, a vehicle-mounted computer, etc. The mobile terminal may include a mobile phone or a tablet computer, etc.

[0045] The vehicle terminal includes a hardware abstraction layer, an application framework layer and an application layer. The mobile terminal includes a hardware abstraction layer, an application framework layer and an application layer.

[0046] The application layer consists of all applications running on electronic devices based on the Android system, including pre-installed system applications and third-party applications installed by users themselves. Most applications are written in Java and run in virtual machines, while the other part is local applications written in C++ / C. However, regardless of the programming language used, the two types of applications run in the same security environment and run in the application sandbox. Developers also develop in this layer through the components and interfaces (Application Programming Interface, API) provided by the Android system to write a variety of applications (Application, APP).

[0047] The application framework layer (FrameWork) is the core of Android application development, providing developers with a basic API framework when developing applications. The application framework layer is composed of multiple system services. Android applications are composed of several components, and the communication between components is achieved through centralized scheduling and message transmission provided by the application framework layer, rather than directly between components.

[0048] The Hardware Abstraction Layer (Hal) is an interface layer between the operating system kernel and the hardware circuit, and its purpose is to abstract the hardware. It hides the hardware interface details of a specific platform and provides a virtual hardware platform for the operating system, making it hardware-independent and portable on multiple platforms. From the perspective of software and hardware testing, the testing of software and hardware can be completed based on the hardware abstraction layer, making it possible to conduct software and hardware testing in parallel.

[0049] It can be understood that since the embodiment of the present application uses a mobile terminal such as a mobile phone as the microphone of the karaoke system of the vehicle terminal, and the vehicle terminal itself cannot recognize the data sent by the mobile terminal such as a mobile terminal serving as the microphone, it is necessary to simulate a virtual microphone module in the vehicle terminal, and after being recognized by the karaoke system, the human voice audio data sent by the mobile terminal is received through the virtual microphone module, so that the upper layer can recognize the human voice audio data, and process and send the human voice audio data accordingly.

[0050] In 102, the human voice audio data is sent to the virtual hardware abstraction module of the hardware abstraction layer through the virtual microphone module.

[0051] It can be understood that since the hardware abstraction layer of the vehicle-mounted terminal is used to process and transmit the audio data generated by the vehicle-mounted terminal itself, if the vehicle-mounted terminal has its own microphone, the audio data collected by the microphone can be processed and transmitted through the hardware abstraction layer. In order to realize the normal processing and sending of the human voice audio data collected by the mobile terminal, the embodiment of the present application also creates a virtual hardware abstraction module in the hardware abstraction layer of the vehicle-mounted terminal, and receives the human voice audio data sent by the virtual microphone module through the virtual hardware abstraction module.

[0052] In 103, human voice audio data is obtained from the virtual hardware abstraction module through the audio interface with the shared memory function enabled.

[0053] Among them, the audio interface can be an AAudio interface, which carries a shared memory function. When the shared memory function is turned on, the human voice audio data can be sent from the virtual hardware abstraction module to the application layer more quickly.

[0054] In this embodiment, after the virtual hardware abstract module receives the human voice audio data, the human voice audio data can be obtained from the virtual hardware abstract module through the audio interface with the shared memory function enabled.

[0055] In 104, the human voice audio data is sent to the application layer through the audio interface.

[0056] In this embodiment, after the audio interface with the shared memory function enabled obtains the human voice audio data, the human voice audio data can be sent to the application layer through the audio interface with the shared memory function enabled.

[0057] In an optional embodiment, the vehicle terminal may also include a digital signal processing (DSP) module. After the virtual microphone module receives the human voice audio data, the human voice audio data can be sent to the digital signal processing module through the virtual microphone module, so that the digital signal processing module performs corresponding digital signal processing on the human voice audio data, and then sends the processed human voice audio data to the virtual hardware abstraction module of the hardware abstraction layer; then, the human voice audio data is obtained from the virtual hardware abstraction module through an audio interface with a shared memory function enabled, and then the processed human voice audio data is sent to the application layer through an audio interface with a shared memory function enabled.

[0058] In this embodiment, human voice audio data sent by the mobile terminal is received through the virtual microphone module; the human voice audio data is sent to the virtual hardware abstraction module of the hardware abstraction layer through the virtual microphone module; the human voice audio data is sent from the virtual hardware abstraction module to the application layer through the audio interface with the shared memory function enabled. Mobile terminals such as mobile phones can be used as microphones, so that karaoke can be achieved in the car without purchasing an additional microphone or choosing a high-configuration vehicle. Therefore, the cost of karaoke in the car can be saved.

[0059] Moreover, since the audio transmission method provided in the embodiment of the present application can directly send the human voice audio data from the virtual hardware abstraction module to the application layer through the audio interface with the shared memory function enabled, without having to send it to the application layer via the application framework layer, it can save the time of audio transmission and reduce the delay of audio transmission.

[0060] In an optional embodiment, the audio transmission method may further include:

[0061] Acquire human voice audio data and its corresponding accompaniment audio data from the application layer through the audio track interface;

[0062] Sending the human voice audio data and the accompaniment audio data to the application framework layer through the audio track interface;

[0063] Sending vocal audio data and accompaniment audio data from the application framework layer to the hardware abstraction layer;

[0064] Sending vocal audio data and accompaniment audio data from the hardware abstraction layer to the speaker;

[0065] The vocal audio data and the accompaniment audio data are played through the speaker.

[0066] The audio track interface may be an AudioTrack interface.

[0067] Since the data sent by the mobile terminal usually only includes vocal audio data, it is also necessary to obtain the accompaniment audio data corresponding to the vocal audio data, and then send the vocal audio data and the accompaniment audio data together to the speaker of the vehicle terminal, and play the vocal audio data and the accompaniment audio data synchronously through the speaker.

[0068] For example, a customized voice recording APP (application, Application) can be installed in the application layer of the mobile terminal, and a three-party K song APP and a corresponding voice recording and playback APP can be installed in the application layer of the vehicle terminal. The mobile terminal can send the collected voice audio data to the voice recording and playback APP of the vehicle terminal through the voice recording APP. After the voice recording and playback APP receives the voice audio data, the vehicle terminal can obtain the voice audio data from the voice recording and playback APP through the audio track interface, and then send the voice audio data to the application framework layer through the audio track interface. At the same time, the vehicle terminal can also obtain the accompaniment audio data corresponding to the voice audio data from the three-party K song APP through the audio track interface, and send the accompaniment audio data to the application framework layer through the audio track interface. Then, the vehicle terminal can send the voice audio data and the accompaniment audio data from the application framework layer to the hardware abstraction layer, and then send the voice audio data and the accompaniment audio data from the hardware abstraction layer to the speaker, and play the corresponding voice audio data and accompaniment audio data synchronously through the speaker, thereby realizing the K song function.

[0069] In an optional embodiment, the third-party karaoke APP can also integrate a human voice audio data receiving interface, through which the vehicle-mounted terminal can receive the human voice audio data sent by the audio interface. Then, the vehicle-mounted terminal can obtain the human voice audio data and its corresponding accompaniment audio data from the third-party karaoke APP through the audio track interface, and send the human voice audio data and its corresponding accompaniment audio data to the application framework layer through the audio track interface. Then, the vehicle-mounted terminal can send the human voice audio data and accompaniment audio data from the application framework layer to the hardware abstraction layer, and then send the human voice audio data and accompaniment audio data from the hardware abstraction layer to the speaker, and play the human voice audio data and accompaniment audio data through the speaker, thereby realizing the karaoke function.

[0070] In an optional embodiment, after sending the human voice audio data and the accompaniment audio data to the application framework layer through the audio track interface, it also includes:

[0071] Performing mixing processing on the human voice audio data and the accompaniment audio data at the application framework layer to obtain mixed audio data;

[0072] Sending vocal audio data and accompaniment audio data from the application framework layer to the hardware abstraction layer includes:

[0073] Sending mixed audio data from the application framework layer to the hardware abstraction layer;

[0074] Sending vocal audio data and accompaniment audio data from the hardware abstraction layer to the speaker, including:

[0075] Sends mixed audio data from the hardware abstraction layer to the speakers;

[0076] Playing vocal audio data and accompaniment audio data through the speaker, including:

[0077] The mixed audio data is played through the speaker.

[0078] In this embodiment, after sending the human voice audio data and the accompaniment audio data to the application framework layer, the vehicle terminal can mix the human voice audio data and the accompaniment audio data at the application framework layer to obtain mixed audio data. Then, the vehicle terminal can send the mixed audio data from the application framework layer to the hardware abstraction layer, and then send the mixed audio data from the hardware abstraction layer to the speaker, and then directly play the mixed audio data through the speaker to realize the karaoke function.

[0079] In an optional embodiment, sending the human voice audio data and the accompaniment audio data to the application framework layer through the audio track interface includes:

[0080] Sending the human voice audio data and the accompaniment audio data to the buffer of the application framework layer through the audio track interface, the capacity of the buffer is smaller than the target capacity;

[0081] Sending vocal audio data and accompaniment audio data from the application framework layer to the hardware abstraction layer includes:

[0082] Send the vocal audio data and the accompaniment audio data from the buffer to the hardware abstraction layer.

[0083] In order to reduce the overall audio playback delay, the buffer capacity of the application framework layer can be set to be smaller than the target capacity, so as to achieve audio playback with relatively small delay.

[0084] For example, the vehicle terminal can obtain the human voice audio data and the accompaniment audio data from the application layer through the audio track interface. Then, the vehicle terminal can send the human voice audio data and the accompaniment audio data to the buffer of the application framework layer whose capacity is smaller than the target capacity through the audio track interface. Subsequently, the vehicle terminal can send the human voice audio data and the accompaniment audio data from the buffer to the hardware abstraction layer.

[0085] The target capacity may be pre-set before the vehicle-mounted terminal leaves the factory, may be set by the user after the vehicle-mounted terminal leaves the factory, or may be set by the vehicle-mounted terminal based on certain rules.

[0086] In an optional embodiment, the transmission mode of the audio track interface is a low-latency mode.

[0087] In order to further reduce the overall playback delay of the audio, the audio track interface can also be set to a low-latency mode, and the vocal audio data and the accompaniment audio data can be transmitted through the audio track interface set to the low-latency mode.

[0088] In an optional embodiment, after sending the human voice audio data and the accompaniment audio data to the application framework layer through the audio track interface, the vehicle terminal can mix the human voice audio data and the accompaniment audio data at the application framework layer to obtain mixed audio data, and then store the mixed audio data in the buffer. Then, the vehicle terminal can send the mixed audio data from the buffer to the hardware abstraction layer.

[0089] In an optional embodiment, before sending the human voice audio data from the virtual hardware abstraction module to the application layer through the audio interface, the method further includes:

[0090] Performing audio processing on human voice audio data through a virtual hardware abstract module to obtain processed human voice audio data;

[0091] Sending human voice audio data from the virtual hardware abstraction module to the application layer through the audio interface, including:

[0092] The processed human voice audio data is sent from the virtual hardware abstraction module to the application layer through the audio interface.

[0093] The audio processing may include noise reduction processing, howling prevention processing and other processing.

[0094] In an optional embodiment, since the microphone of the mobile terminal is collecting vocal audio data, the speaker of the vehicle terminal may also be playing corresponding vocal audio data and accompaniment audio data. Therefore, the microphone of the mobile terminal will also collect the vocal audio data and accompaniment audio data played by the speaker of the vehicle terminal. In order to improve the audio playback quality, the vocal audio data and accompaniment audio data played by the speaker of the vehicle terminal can be obtained from the digital signal processing module of the vehicle terminal, and used as reference data to perform noise reduction processing on the current vocal audio data.

[0095] In an optional embodiment, before receiving the human voice audio data sent by the mobile terminal through the virtual microphone module, the method further includes:

[0096] Turn on the hotspot;

[0097] Receiving human voice audio data sent by the mobile terminal through the virtual microphone module includes:

[0098] The virtual microphone module receives the human voice audio data sent by the mobile terminal after connecting to the hotspot.

[0099] For example, the vehicle terminal can turn on the 5G hotspot. After the vehicle terminal turns on the 5G hotspot, the mobile terminal can connect to the 5G hotspot to establish a communication connection with the vehicle terminal. After establishing a communication connection with the vehicle terminal, the mobile terminal can send human voice audio data to the virtual microphone module of the vehicle terminal through the communication connection, so that the vehicle terminal receives the human voice audio data sent by the mobile terminal after connecting to the hotspot through the virtual microphone module. Among them, the hotspot can be turned on or connected based on the user's trigger operation.

[0100] In an optional embodiment, the human voice audio data is transmitted using the User Datagram Protocol (UDP), so that the human voice audio data collected by the mobile terminal can be transmitted to the vehicle terminal with the lowest delay. Various network abnormal environments have been avoided in the in-vehicle environment, so there is no need to use stable transmission protocols such as the Transmission Control Protocol (TCP). At the same time, the use of 5G hotspots can be isolated from network transmissions of most frequencies, thereby achieving a better transmission environment. In other words, when the mobile terminal sends the human voice audio data to the virtual microphone module of the vehicle terminal through the communication connection, the human voice audio data can be sent to the virtual microphone module of the vehicle terminal based on the UDP protocol through the communication connection.

[0101] In an optional embodiment, after sending the human voice audio data to the virtual hardware abstraction module of the hardware abstraction layer through the virtual microphone module, the method further includes:

[0102] Acquire human voice audio data from the virtual hardware abstraction module through the audio recording interface;

[0103] Sending human voice audio data to the application framework layer through the audio recording interface;

[0104] Send human voice audio data from the application framework layer to the application layer.

[0105] The audio recording interface may be an AudioRecord interface.

[0106] For example, the vehicle terminal can obtain human voice audio data from the virtual hardware abstract module through the audio recording interface. Then, the vehicle terminal can send the human voice audio data to the application framework layer through the audio recording interface. Finally, the vehicle terminal can send the human voice audio data from the application framework layer to the third-party karaoke APP in the application layer. The human voice audio data and its corresponding accompaniment audio data are then saved through the third-party karaoke APP, so as to prepare a backup for subsequent sharing processing.

[0107] In an optional embodiment, after turning on the recording function of the vocal recording APP of the mobile terminal, the user can sing to the mobile terminal, and the mobile terminal can collect vocal audio data through the microphone; and then send the collected vocal audio data to the hardware abstraction layer through the microphone. Then, the mobile terminal can obtain the vocal audio data from the hardware abstraction layer through an audio interface with a shared memory function, such as an AAudio interface. Subsequently, the mobile terminal can send the vocal audio data to the application layer through an audio interface with a shared memory function. Finally, the mobile terminal can send the vocal audio data to the vehicle-mounted terminal at the application layer, such as the mobile terminal can send the vocal audio data to the vocal recording APP of the application layer through an audio interface with a shared memory function, and send the vocal audio data to the vehicle-mounted terminal through the vocal recording APP.

[0108] In an optional embodiment, when multiple mobile terminals are connected to the vehicle-mounted terminal, the human voice audio data sent by different mobile terminals can be received through multiple different channels by the virtual microphone module, and then the received human voice audio data can be mixed by the virtual microphone module. After the mixing is completed, the mixed human voice audio data can be sent to the virtual hardware abstraction module of the hardware abstraction layer through the virtual microphone module, and the subsequent processing flow can be continued to achieve karaoke with multiple users. It should be noted that the subsequent processing flow can be the same as the aforementioned processing flow for processing the human voice audio data sent by a mobile terminal, which will not be repeated here.

[0109] See also Figure 2 , Figure 2 : is a flow chart of another audio transmission method provided in an embodiment of the present application. The audio transmission method is applied to a mobile terminal. The flow may include:

[0110] In 201, human voice audio data is collected through a microphone.

[0111] In 202, human voice audio data is sent to a hardware abstraction layer through a microphone.

[0112] In 203, human voice audio data is obtained from the hardware abstraction layer through the audio interface with the shared memory function enabled.

[0113] In 204, the human voice audio data is sent to the application layer through the audio interface.

[0114] In 205 , the human voice audio data is sent to the vehicle terminal at the application layer.

[0115] In an optional embodiment, before the application layer sends the human voice audio data to the vehicle terminal, it also includes:

[0116] Connect to the hotspot opened by the vehicle terminal to establish a communication connection with the vehicle terminal;

[0117] Sending human voice audio data to the vehicle terminal at the application layer includes:

[0118] At the application layer, the human voice audio data is sent to the vehicle terminal through a communication connection.

[0119] In an optional embodiment, sending human voice audio data to the vehicle-mounted terminal through a communication connection at the application layer includes:

[0120] At the application layer, human voice audio data is sent to the vehicle terminal through a communication connection based on the user datagram protocol.

[0121] It can be understood that the relevant description of this embodiment can be found in other embodiments and will not be repeated here.

[0122] See also Figure 3 , Figure 3 The following is a schematic diagram of a scenario provided by an embodiment of the present application. The audio transmission method provided by an embodiment of the present application is described by taking the mobile terminal as a mobile phone and the vehicle terminal as a vehicle computer as an example.

[0123] The car computer can turn on the 5G hotspot, and the mobile phone can connect to the 5G hotspot to establish a communication connection with the car computer. The user can turn on the recording function of the voice recording APP on the mobile phone and sing to the mobile phone, so that the microphone of the mobile phone can collect the voice audio data. Then, the mobile phone can send the collected voice audio data to the digital signal processing module through the microphone to perform digital signal processing on the voice audio data. After the processing is completed, the mobile phone can send the voice audio data to the hardware abstraction layer through the digital signal processing module. Then, the mobile phone can obtain the voice audio data from the hardware abstraction layer through the AAudio interface with the shared memory function turned on, and send the voice audio data to the voice recording APP through the AAudio interface with the shared memory function turned on. The mobile terminal can send the voice audio data to the virtual microphone module of the car computer through the voice recording APP through the communication connection based on the UDP protocol.

[0124] After the virtual microphone module receives the human voice audio data, the car computer can send the human voice audio data to the digital signal processing module through the microphone virtual module to perform digital signal processing on the human voice audio data. After the processing is completed, the car computer can send the human voice audio data to the virtual hardware abstract module through the digital signal processing module. The car computer can obtain the corresponding reference data from the digital signal processing module through the virtual hardware abstract module to perform noise reduction, howling prevention and other processing on the human voice audio data. After the processing is completed, the car computer can obtain the human voice audio data from the hardware abstract module through the AAudio interface with the shared memory function turned on, and send the human voice audio data to the human voice recording and playback APP through the AAudio interface with the shared memory function turned on. The car computer can obtain the human voice audio data from the human voice recording and playback APP through the AudioTrack interface, and obtain the accompaniment audio data corresponding to the human voice audio data from the third-party K song APP, and send the human voice audio data and accompaniment audio data to the application framework layer through the AudioTrack interface. Subsequently, the car computer can send the human voice audio data and accompaniment audio data from the application framework layer to the hardware abstract layer. Then, the vehicle computer can send the human voice audio data and the accompaniment audio data to the digital signal processing module to perform digital signal processing on the human voice audio data and the accompaniment audio data. After the processing is completed, the vehicle computer can send the human voice audio data and the accompaniment audio data to the speaker, and synchronously play the human voice audio data and the accompaniment audio data through the speaker.

[0125] Through the above process, the overall audio data playback delay can be controlled to 50ms, making the karaoke experience smoother.

[0126] See also Figure 4 , Figure 4 The audio transmission device 300 is applied to a vehicle-mounted terminal, and includes: a receiving unit 301 , a first sending unit 302 , an acquiring unit 303 and a second sending unit 304 .

[0127] The receiving unit 301 is used to receive human voice audio data sent by the mobile terminal through the virtual microphone module.

[0128] The first sending unit 302 is used to send the human voice audio data to the virtual hardware abstraction module of the hardware abstraction layer through the virtual microphone module.

[0129] The acquisition unit 303 is used to acquire the human voice audio data from the virtual hardware abstract module through the audio interface with the shared memory function enabled.

[0130] The second sending unit 304 is further configured to send the human voice audio data to the application layer through the audio interface.

[0131] In an optional embodiment, the audio transmission device 300 may further include a playback unit, and the acquisition unit 303 may be used to: acquire the human voice audio data and its corresponding accompaniment audio data from the application layer through an audio track interface;

[0132] The second sending unit 304 may be used to: send the human voice audio data and the accompaniment audio data to the application framework layer through the audio track interface; send the human voice audio data and the accompaniment audio data from the application framework layer to the hardware abstraction layer; send the human voice audio data and the accompaniment audio data from the hardware abstraction layer to the speaker;

[0133] The playing unit can be used to play the human voice audio data and the accompaniment audio data through the speaker.

[0134] In an optional embodiment, the second sending unit 304 can be used to: send the human voice audio data and the accompaniment audio data to a buffer of the application framework layer through the audio track interface, the capacity of the buffer being less than the target capacity; and send the human voice audio data and the accompaniment audio data from the buffer to the hardware abstraction layer.

[0135] In an optional embodiment, the transmission mode of the audio track interface is a low-latency mode.

[0136] In an optional embodiment, the second sending unit 304 may be used to: perform mixing processing on the human voice audio data and the accompaniment audio data at the application framework layer to obtain mixed audio data; send the mixed audio data from the application framework layer to the hardware abstraction layer; send the mixed audio data from the hardware abstraction layer to the speaker;

[0137] The playing unit can be used to play the mixed audio data through the speaker.

[0138] In an optional embodiment, the audio transmission device 300 may further include a processing unit, which may be used to: perform audio processing on the human voice audio data through the virtual hardware abstract module to obtain processed human voice audio data;

[0139] The second sending unit 304 can be used to send the processed human voice audio data from the virtual hardware abstract module to the application layer through the audio interface.

[0140] In an optional embodiment, the audio transmission device 300 may further include an opening unit, which may be used to: open the hotspot;

[0141] The receiving unit 301 can be used to: receive, through the virtual microphone module, human voice audio data sent by the mobile terminal after connecting to the hotspot.

[0142] See also Figure 5 , Figure 5 The structure diagram of another audio transmission device provided in an embodiment of the present application is as follows: The audio transmission device 400 is applied to a mobile terminal, and the audio transmission device 400 includes: a receiving unit 401 , a first sending unit 402 , an acquiring unit 403 and a second sending unit 404 .

[0143] The collection unit 401 is used to collect human voice audio data through a microphone.

[0144] The first sending unit 402 is used to send the human voice audio data to the hardware abstraction layer through a microphone.

[0145] The acquisition unit 403 is used to acquire the human voice audio data from the hardware abstraction layer through the audio interface with the shared memory function enabled.

[0146] The second sending unit 404 is used to send the human voice audio data to the application layer through the audio interface.

[0147] The third sending unit 405 is used to send the human voice audio data to the vehicle terminal at the application layer.

[0148] In an optional embodiment, the audio transmission device 400 further includes a hotspot connection unit, which can be used to: connect to the hotspot turned on by the vehicle-mounted terminal to establish a communication connection with the vehicle-mounted terminal;

[0149] The third sending unit 405 can be used to: send the human voice audio data to the vehicle terminal through the communication connection at the application layer.

[0150] In an optional embodiment, the third sending unit 405 may be used to send the human voice audio data to the vehicle-mounted terminal through the communication connection based on the User Datagram Protocol at the application layer.

[0151] An embodiment of the present application provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed on a computer, the computer executes the audio transmission method provided in this embodiment.

[0152] An embodiment of the present application also provides a vehicle-mounted terminal, including a memory and a processor, wherein the processor is used to execute the audio transmission method applied to the vehicle-mounted terminal provided in the embodiment of the present application by calling a computer program stored in the memory.

[0153] An embodiment of the present application also provides a mobile terminal, including a memory and a processor, wherein the processor is used to execute the audio transmission method applied to the mobile terminal provided in the embodiment of the present application by calling a computer program stored in the memory.

[0154] See also Figure 6 , Figure 6 A schematic diagram of the structure of the vehicle-mounted terminal provided in an embodiment of the present application.

[0155] The vehicle terminal 500 may include components such as a processor 501 and a memory 502. Those skilled in the art will appreciate that Figure 6 The vehicle-mounted terminal structure shown in the figure does not constitute a limitation of the vehicle-mounted terminal, and may include more or fewer components than shown in the figure, or a combination of certain components, or different component arrangements. For example, the vehicle-mounted terminal may also include a radio frequency circuit for sending and receiving radio frequency signals to communicate with the mobile terminal through wireless communication.

[0156] Processor 501 is the control center of the vehicle terminal. It uses various interfaces and lines to connect various parts of the entire vehicle terminal. By running or executing applications stored in memory 502 and calling data stored in memory 502, it executes various functions of the vehicle terminal and processes data, thereby monitoring the vehicle terminal as a whole.

[0157] The memory 502 may be used to store applications and data. The applications stored in the memory 502 include executable codes. The applications may be composed of various functional modules. The processor 501 executes various functional applications and data processing by running the applications stored in the memory 502.

[0158] In this embodiment, the processor 501 in the vehicle terminal will load the executable code corresponding to the process of one or more application programs into the memory 502 according to the following instructions, and the processor 501 will run the application program stored in the memory 502, thereby achieving:

[0159] Receiving human voice audio data sent by the mobile terminal through the virtual microphone module;

[0160] Sending the human voice audio data to a virtual hardware abstraction module of a hardware abstraction layer through the virtual microphone module;

[0161] Acquire human voice audio data from the virtual hardware abstract module through an audio interface with a shared memory function enabled;

[0162] The human voice audio data is sent to the application layer through the audio interface.

[0163] In an optional embodiment, the processor 501 may also execute: obtaining the vocal audio data and its corresponding accompaniment audio data from the application layer through the audio track interface; sending the vocal audio data and the accompaniment audio data to the application framework layer through the audio track interface; sending the vocal audio data and the accompaniment audio data from the application framework layer to the hardware abstraction layer; sending the vocal audio data and the accompaniment audio data from the hardware abstraction layer to the speaker; playing the vocal audio data and the accompaniment audio data through the speaker.

[0164] In an optional embodiment, when the processor 501 executes the sending of the vocal audio data and the accompaniment audio data to the application framework layer through the audio track interface, it can execute: sending the vocal audio data and the accompaniment audio data to a buffer of the application framework layer through the audio track interface, the capacity of the buffer being less than the target capacity; when the processor 501 executes the sending of the vocal audio data and the accompaniment audio data from the application framework layer to the hardware abstraction layer, it can execute: sending the vocal audio data and the accompaniment audio data from the buffer to the hardware abstraction layer.

[0165] In an optional embodiment, the transmission mode of the audio track interface is a low-latency mode.

[0166] In an optional embodiment, after the processor 501 executes the sending of the vocal audio data and the accompaniment audio data to the application framework layer through the audio track interface, it can also execute: mixing the vocal audio data and the accompaniment audio data at the application framework layer to obtain mixed audio data; when the processor 501 executes the sending of the vocal audio data and the accompaniment audio data from the application framework layer to the hardware abstraction layer, it can execute: sending the mixed audio data from the application framework layer to the hardware abstraction layer; when the processor 501 executes the sending of the vocal audio data and the accompaniment audio data from the hardware abstraction layer to the speaker, it can execute: sending the mixed audio data from the hardware abstraction layer to the speaker; when the processor 501 executes the playing of the vocal audio data and the accompaniment audio data through the speaker, it can execute: playing the mixed audio data through the speaker.

[0167] In an optional embodiment, before the processor 501 executes the sending of the human voice audio data from the virtual hardware abstract module to the application layer through the audio interface, it can also execute: performing audio processing on the human voice audio data through the virtual hardware abstract module to obtain processed human voice audio data; when the processor 501 executes the sending of the human voice audio data from the virtual hardware abstract module to the application layer through the audio interface, it can execute: sending the processed human voice audio data from the virtual hardware abstract module to the application layer through the audio interface.

[0168] In an optional embodiment, before the processor 501 executes the receiving of human voice audio data sent by the mobile terminal through the virtual microphone module, it can also execute: turning on the hotspot; when the processor 501 executes the receiving of human voice audio data sent by the mobile terminal through the virtual microphone module, it can execute: receiving through the virtual microphone module the human voice audio data sent by the mobile terminal after connecting to the hotspot.

[0169] See also Figure 7 , Figure 7 A schematic diagram of the structure of a mobile terminal provided in an embodiment of the present application.

[0170] The mobile terminal 600 may include components such as a processor 601 and a memory 602. Those skilled in the art will appreciate that Figure 7 The mobile terminal structure shown in the figure does not constitute a limitation on the mobile terminal, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently. For example, the mobile terminal may also include a radio frequency circuit for sending and receiving radio frequency signals to communicate with the vehicle-mounted terminal through wireless communication; the mobile terminal may also include a microphone to collect human voice audio data.

[0171] Processor 601 is the control center of the mobile terminal. It uses various interfaces and lines to connect various parts of the entire mobile terminal. It executes various functions of the mobile terminal and processes data by running or executing applications stored in memory 602 and calling data stored in memory 602, thereby monitoring the mobile terminal as a whole.

[0172] The memory 602 may be used to store applications and data. The applications stored in the memory 602 include executable codes. The applications may be composed of various functional modules. The processor 601 executes various functional applications and data processing by running the applications stored in the memory 602.

[0173] In this embodiment, the processor 601 in the mobile terminal will load the executable code corresponding to the process of one or more application programs into the memory 602 according to the following instructions, and the processor 601 will run the application program stored in the memory 602, thereby achieving:

[0174] Collect human voice audio data through a microphone;

[0175] Sending the human voice audio data to the hardware abstraction layer through a microphone;

[0176] Acquire the human voice audio data from the hardware abstraction layer through an audio interface with a shared memory function enabled;

[0177] Sending the human voice audio data to the application layer through the audio interface;

[0178] The human voice audio data is sent to the vehicle terminal at the application layer.

[0179] In an optional embodiment, before the processor 601 executes the sending of the human voice audio data to the vehicle-mounted terminal at the application layer, it can also execute: connecting to the hotspot turned on by the vehicle-mounted terminal to establish a communication connection with the vehicle-mounted terminal; when the processor 601 executes the sending of the human voice audio data to the vehicle-mounted terminal at the application layer, it can execute: sending the human voice audio data to the vehicle-mounted terminal through the communication connection at the application layer.

[0180] In an optional embodiment, when the processor 601 executes the sending of the human voice audio data to the vehicle-mounted terminal through the communication connection at the application layer, it can execute: sending the human voice audio data to the vehicle-mounted terminal based on the user datagram protocol through the communication connection at the application layer.

[0181] In the above embodiments, the description of each embodiment has its own focus. For the part that is not described in detail in a certain embodiment, please refer to the detailed description of the audio transmission method above, and will not be repeated here.

[0182] The audio transmission device provided in the embodiment of the present application belongs to the same concept as the audio transmission method in the above embodiment. Any method provided in the audio transmission method embodiment can be run on the audio transmission device. The specific implementation process is detailed in the audio transmission method embodiment, which will not be repeated here.

[0183] It should be noted that, for the audio transmission method of the embodiment of the present application, a person skilled in the art can understand that all or part of the process of implementing the audio transmission method of the embodiment of the present application can be completed by controlling the relevant hardware through a computer program, and the computer program can be stored in a computer-readable storage medium, such as a memory, and executed by at least one processor, and the execution process may include the process of the embodiment of the audio transmission method. Among them, the computer-readable storage medium can be a disk, an optical disk, a read-only memory (ROM), a random access memory (RAM), etc.

[0184] It is understandable that in the specific implementation of this application, related data such as user information logs are involved. When the above embodiments of this application are applied to specific products or technologies, user permission or consent is required, and the collection, use and processing of relevant data need to comply with relevant laws, regulations and standards of relevant countries and regions.

[0185] For the audio transmission device of the embodiment of the present application, each functional module can be integrated into a processing chip, or each module can exist physically separately, or two or more modules can be integrated into one module. The above-mentioned integrated module can be implemented in the form of hardware or in the form of a software functional module. If the integrated module is implemented in the form of a software functional module and sold or used as an independent product, it can also be stored in a computer-readable storage medium, such as a read-only memory, a disk or an optical disk.

[0186] The above is a detailed introduction to an audio transmission method, device, storage medium, vehicle-mounted terminal and mobile terminal provided in the embodiments of the present application. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea; at the same time, for technical personnel in this field, according to the ideas of the present application, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.

Claims

1. An audio transmission method, applied to a vehicle-mounted terminal, characterized in that: include: Receiving human voice audio data sent by the mobile terminal through the virtual microphone module; Sending the human voice audio data to a virtual hardware abstraction module of a hardware abstraction layer through the virtual microphone module; Acquire human voice audio data from the virtual hardware abstract module through an audio interface with a shared memory function enabled; The human voice audio data is sent to the application layer through the audio interface.

2. The audio transmission method according to claim 1, characterized in that: The method further comprises: Acquire the human voice audio data and its corresponding accompaniment audio data from the application layer through an audio track interface; Sending the human voice audio data and the accompaniment audio data to the application framework layer through the audio track interface; Sending the human voice audio data and the accompaniment audio data from the application framework layer to the hardware abstraction layer; Sending the human voice audio data and the accompaniment audio data from the hardware abstraction layer to a speaker; The vocal audio data and the accompaniment audio data are played through the speaker.

3. The audio transmission method according to claim 2, characterized in that: The step of sending the human voice audio data and the accompaniment audio data to the application framework layer through the audio track interface includes: Sending the human voice audio data and the accompaniment audio data to a buffer of the application framework layer through the audio track interface, wherein the capacity of the buffer is less than the target capacity; The step of sending the human voice audio data and the accompaniment audio data from the application framework layer to the hardware abstraction layer comprises: The vocal audio data and the accompaniment audio data are sent from the buffer to the hardware abstraction layer.

4. The audio transmission method according to claim 3, characterized in that: The transmission mode of the audio track interface is low latency mode.

5. The audio transmission method according to claim 2, characterized in that: After sending the human voice audio data and the accompaniment audio data to the application framework layer through the audio track interface, it also includes: Performing mixing processing on the human voice audio data and the accompaniment audio data at the application framework layer to obtain mixed audio data; The step of sending the human voice audio data and the accompaniment audio data from the application framework layer to the hardware abstraction layer comprises: Sending the mixed audio data from the application framework layer to the hardware abstraction layer; The step of sending the human voice audio data and the accompaniment audio data from the hardware abstraction layer to the speaker comprises: sending the mixed audio data from the hardware abstraction layer to a speaker; The step of playing the human voice audio data and the accompaniment audio data through the loudspeaker comprises: The mixed audio data is played through the speaker.

6. The audio transmission method according to claim 1, characterized in that: Before sending the human voice audio data from the virtual hardware abstract module to the application layer through the audio interface, the method further includes: Performing audio processing on the human voice audio data through the virtual hardware abstract module to obtain processed human voice audio data; The step of sending the human voice audio data from the virtual hardware abstract module to the application layer through the audio interface includes: The processed human voice audio data is sent from the virtual hardware abstract module to the application layer through the audio interface.

7. The audio transmission method according to claim 1, characterized in that: Before receiving the human voice audio data sent by the mobile terminal through the virtual microphone module, the method further includes: Turn on the hotspot; The method of receiving human voice audio data sent by the mobile terminal through the virtual microphone module includes: The human voice audio data sent by the mobile terminal after connecting to the hotspot is received through the virtual microphone module.

8. An audio transmission method, applied to a mobile terminal, characterized in that: include: Collect human voice audio data through a microphone; Sending the human voice audio data to the hardware abstraction layer through a microphone; Acquire the human voice audio data from the hardware abstraction layer through an audio interface with a shared memory function enabled; Sending the human voice audio data to the application layer through the audio interface; The human voice audio data is sent to the vehicle terminal at the application layer.

9. The audio transmission method according to claim 8, characterized in that: Before the application layer sends the human voice audio data to the vehicle terminal, it also includes: Connecting to the hotspot opened by the vehicle-mounted terminal to establish a communication connection with the vehicle-mounted terminal; The sending of the human voice audio data to the vehicle-mounted terminal at the application layer includes: The human voice audio data is sent to the vehicle-mounted terminal through the communication connection at the application layer.

10. The audio transmission method according to claim 9, characterized in that: The sending the human voice audio data to the vehicle-mounted terminal through the communication connection at the application layer includes: The human voice audio data is sent to the vehicle-mounted terminal through the communication connection based on the User Datagram Protocol at the application layer.

11. An audio transmission device, applied to a vehicle terminal, characterized in that: include: A receiving unit, used for receiving human voice audio data sent by a mobile terminal through a virtual microphone module; A first sending unit, configured to send the human voice audio data to a virtual hardware abstraction module of a hardware abstraction layer through the virtual microphone module; An acquisition unit, used for acquiring human voice audio data from the virtual hardware abstract module through an audio interface with a shared memory function enabled; The second sending unit is further used to send the human voice audio data to the application layer through the audio interface.

12. An audio transmission device, applied to a mobile terminal, characterized in that: include: A collection unit, used for collecting human voice audio data through a microphone; A first sending unit, configured to send the human voice audio data to a hardware abstraction layer via a microphone; An acquisition unit, configured to acquire the human voice audio data from the hardware abstraction layer through an audio interface with a shared memory function enabled; A second sending unit, used for sending the human voice audio data to the application layer through the audio interface; The third sending unit is used to send the human voice audio data to the vehicle terminal at the application layer.

13. A computer-readable storage medium, characterized in that: The storage medium stores a computer program, and when the computer program is executed on a computer, the computer executes the audio transmission method according to any one of claims 1 to 7 or the audio transmission method according to any one of claims 8 to 10.

14. A vehicle-mounted terminal, characterized in that: The vehicle-mounted terminal includes a processor and a memory, wherein a computer program is stored in the memory, and the processor is used to execute the audio transmission method according to any one of claims 1 to 7 by calling the computer program stored in the memory.

15. A mobile terminal, characterized in that: The mobile terminal includes a processor and a memory, wherein a computer program is stored in the memory, and the processor is used to execute the audio transmission method according to any one of claims 8 to 10 by calling the computer program stored in the memory.

Citation Information

Patent Citations

  • Dummy drive system and method of apparatus drive layer

    CN101059763A

  • Configuration method and system for sharing the same recording device by multiple applications

    CN109032559A

  • Optimization system for Android audio playing and method thereof

    CN110175081A

  • Karaoke method, vehicle-mounted terminal and computer readable storage medium

    CN111968611A

  • Communication mode control method and device

    CN112669859A