CN115842885A - Vehicle communication method and device, electronic equipment and storage medium - Google Patents

Vehicle communication method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN115842885A
CN115842885A CN202111110644.2A CN202111110644A CN115842885A CN 115842885 A CN115842885 A CN 115842885A CN 202111110644 A CN202111110644 A CN 202111110644A CN 115842885 A CN115842885 A CN 115842885A
Authority
CN
China
Prior art keywords
voice data
vehicle
voice
call
mobile terminal
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202111110644.2A
Other languages
Chinese (zh)
Inventor
陆干东
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Xiaomi Mobile Software Co Ltd
Original Assignee
Beijing Xiaomi Mobile Software Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Xiaomi Mobile Software Co Ltd filed Critical Beijing Xiaomi Mobile Software Co Ltd
Priority to CN202111110644.2A priority Critical patent/CN115842885A/en
Publication of CN115842885A publication Critical patent/CN115842885A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Abstract

The disclosure relates to a vehicle communication method, a device, an electronic device and a storage medium, wherein the method comprises the following steps: establishing a communication connection with a vehicle; under the condition that a voice call program of the mobile terminal is in a call state, caching first voice data received by the voice call program into a first cache region in an audio hardware abstraction layer; acquiring first voice data from a first cache region through a vehicle-machine data processing process in the mobile terminal, and sending the first voice data to a vehicle for playing; receiving second voice data sent by the vehicle, and caching the second voice data into a second cache region in the audio hardware abstraction layer through the vehicle-mounted data processing process; and acquiring second voice data from the second cache region through the voice call program, and sending the second voice data to a call end for carrying out call with the mobile terminal. The method can improve the quality of vehicle communication.

Description

Vehicle communication method and device, electronic equipment and storage medium
Technical Field
The present disclosure relates to the field of communications technologies, and in particular, to a vehicle communication method and apparatus, an electronic device, and a storage medium.
Background
With the increase of safety awareness, vehicle driving safety is becoming a problem of wide concern. In the driving process, a scene of voice call of a driver may exist, and under the condition, if the driver holds a mobile phone and other terminals to answer the voice call while driving a vehicle, great potential safety hazard is brought to the driver.
In the related art, in order to avoid a situation where a driver holds a terminal such as a mobile phone to receive a voice call while driving a vehicle, the voice call of the terminal may be transferred to the vehicle, and the voice call may be performed through a microphone and a speaker of the vehicle. However, the method of transferring a voice call onto a vehicle in the related art has a problem of poor call quality.
Disclosure of Invention
To overcome the problems in the related art, the present disclosure provides a vehicle communication method, an apparatus, an electronic device, and a storage medium.
According to a first aspect of the embodiments of the present disclosure, there is provided a vehicle communication method applied to a mobile terminal, the method including:
establishing a communication connection with the vehicle;
under the condition that a voice call program of the mobile terminal is in a call state, caching first voice data received by the voice call program into a first cache region in an audio hardware abstraction layer;
acquiring the first voice data from the first cache region through a vehicle-mounted data processing process in the mobile terminal, and sending the first voice data to the vehicle for playing;
receiving second voice data sent by the vehicle, and caching the second voice data to a second cache region in the audio hardware abstraction layer through the vehicle-mounted computer data processing process;
and acquiring the second voice data from the second cache region through the voice call program, and sending the second voice data to a call end for carrying out call with the mobile terminal.
In some embodiments, the establishing a communication connection with the vehicle includes:
and establishing communication connection with the vehicle in a USB mode or a WIFI mode.
In some embodiments, the method further comprises:
and in response to the fact that the voice call program of the mobile terminal is in a call state, disabling the audio playing device of the mobile terminal and enabling the car machine data processing process.
In some embodiments, the caching the first voice data received by the voice call program to a first cache region in an audio hardware abstraction layer includes:
calling an audiotrack interface provided by the audio hardware abstraction layer, and caching the first voice data to the first cache region;
the obtaining the first voice data from the first buffer includes:
and calling an audio interface provided by the audio hardware abstraction layer, and acquiring the first voice data from the first cache region.
In some embodiments, the caching, by the car machine data processing process, the second voice data into a second cache region in the audio hardware abstraction layer includes:
calling an audiotrack interface provided by the audio hardware abstraction layer through the car machine data processing process, and caching the second voice data into the second cache region;
the obtaining the second voice data from the second buffer area through the voice call program includes:
and calling an audio interface provided by the audio hardware abstraction layer through the voice call program, and acquiring the second voice data from the second cache region.
In some embodiments, the voice call program includes a network call based program and a telephone network call based program.
According to a second aspect of the embodiments of the present disclosure, there is provided a vehicular communication apparatus applied to a mobile terminal, the apparatus including:
a communication establishment module configured to establish a communication connection with the vehicle;
the first cache module is configured to cache first voice data received by a voice call program of the mobile terminal to a first cache region in an audio hardware abstraction layer under the condition that the voice call program is in a call state;
the first voice data acquisition module is configured to acquire the first voice data from the first cache region through a vehicle-mounted data processing process in the mobile terminal, and send the first voice data to the vehicle for playing;
the second cache module is configured to receive second voice data sent by the vehicle and cache the second voice data to a second cache region in the audio hardware abstraction layer through the vehicle-mounted data processing process;
and the second voice data acquisition module is configured to acquire the second voice data from the second cache region through the voice call program and send the second voice data to a call terminal for making a call with the mobile terminal.
According to a third aspect of embodiments of the present disclosure, there is provided a computer readable storage medium having stored thereon computer program instructions which, when executed by a processor, implement the steps of the vehicle talk method provided by the first aspect of the present disclosure.
According to a fourth aspect of the embodiments of the present disclosure, there is provided an electronic apparatus including: a memory having a computer program stored thereon; a processor for executing a computer program in a memory for carrying out the steps of the vehicle talk method mentioned in the first aspect of the present disclosure.
The technical scheme provided by the embodiment of the disclosure can have the following beneficial effects: in the vehicle communication method of the embodiment of the disclosure, based on the native audio hardware abstraction layer of android and the newly added vehicle machine data processing process, data transmission between the mobile terminal and the vehicle through the audio hardware abstraction layer can be realized, the compatibility of the data transmission process can be improved by using the native audio hardware abstraction layer of android, and in addition, the tone quality of the voice communication data transmitted to the vehicle can also be ensured due to the fact that lossy compression can not be performed on the audio data, so that the vehicle communication quality is improved.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure, as claimed
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and together with the description, serve to explain the principles of the disclosure.
FIG. 1 is a schematic diagram illustrating an application environment in accordance with an exemplary embodiment.
FIG. 2 is a flow chart illustrating a vehicle speaking method according to one exemplary embodiment.
FIG. 3 is a flow chart illustrating another vehicle speaking method according to an exemplary embodiment.
FIG. 4 is a flow chart illustrating another vehicle talk process according to an exemplary embodiment.
Fig. 5 is a block diagram showing the structure of a vehicular call device according to an exemplary embodiment.
FIG. 6 is a block diagram illustrating an electronic device in accordance with an example embodiment.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the exemplary embodiments below do not represent all implementations consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present disclosure, as detailed in the appended claims.
In the related art, a method for transferring a voice call of a mobile terminal to a vehicle so as to perform a voice call through a microphone and a speaker of the vehicle is generally used to transfer a voice call to a vehicle through a bluetooth method. However, the inventor has found in long-term research that when a voice call is transferred to a vehicle by means of bluetooth, the voice call is transmitted through a bluetooth physical link. This process may perform lossy compression on the voice call data, thereby causing a reduction in the quality of the voice call data transmitted to the vehicle, and further causing a problem of poor call quality.
In order to solve the above problems, the inventor provides a content delivery method, a content delivery device, a content delivery server and a storage medium provided by the present application, based on an android native audio hardware abstraction layer and a newly added in-vehicle data processing process, data transmission between a mobile terminal and a vehicle through the audio hardware abstraction layer can be realized, compatibility of a data transmission process can be improved by using the android native audio hardware abstraction layer, in addition, since lossy compression is not performed on audio data, the tone quality of voice call data transmitted to the vehicle can also be ensured, thereby improving the vehicle call quality.
Before the technical solution of the embodiment of the present disclosure is explained in detail, an application environment of the embodiment of the present disclosure is explained.
As shown in fig. 1, fig. 1 is a schematic diagram of an application environment according to an embodiment of the present disclosure. The system comprises a mobile terminal 102, a communication terminal 101 for communicating with the mobile terminal 102, and a vehicle 103 for establishing communication connection with the mobile terminal 102.
The vehicle may establish a communication connection with the mobile terminal through a vehicle-mounted terminal (vehicle machine), and the vehicle-mounted terminal may include a speaker and a microphone. The communication terminal and the mobile terminal can be a mobile phone, a notebook, a tablet computer, a wearable device and the like.
In the call method implemented by applying the application environment of fig. 1, the voice data of the call end may be transmitted to the mobile terminal, and the mobile terminal sends the voice data to the vehicle and then plays the voice data through the audio data device (e.g., vehicle-mounted speaker) of the vehicle; in addition, the audio acquisition device (such as an on-board microphone) of the vehicle can acquire the voice data in the local environment of the vehicle and send the voice data to the mobile terminal, and the mobile terminal sends the voice data to the call terminal, so that the whole vehicle call process is completed.
Embodiments of the present application will be described in detail below with reference to the accompanying drawings.
Referring to fig. 2, fig. 2 is a flow chart illustrating a vehicle communication method according to an exemplary embodiment, which may be applied to a mobile terminal (e.g., the mobile terminal 102 shown in fig. 1), the mobile terminal including: cell-phones, notebook, panel computer, wearable equipment etc.. The method comprises the following steps:
and S210, establishing communication connection with the vehicle.
In the embodiment of the disclosure, in order to implement the vehicle communication method, that is, in order to transfer the voice communication of the mobile terminal to the vehicle, the mobile terminal may first establish communication connection with the vehicle.
In some embodiments, the mobile terminal may establish a communication connection with the vehicle through a USB mode, a WIFI mode, or the like.
It can be understood that after the mobile terminal establishes the communication connection with the vehicle through the USB mode or the WIFI mode, the mobile terminal may perform data transmission with the vehicle through the corresponding protocol. For example, after the mobile terminal establishes a communication connection with the vehicle in a USB manner, data transmission may be performed through a USB protocol. For another example, after the mobile terminal establishes a communication connection with the vehicle in a WIFI manner, data transmission may be performed through a TCP/IP protocol.
It should be noted that there are many situations when the mobile terminal establishes a communication connection with the vehicle, for example, the mobile terminal may establish a communication connection with the vehicle before receiving the initiation of the voice call, or for example, the mobile terminal may establish a communication connection with the vehicle after receiving the voice call, that is, the mobile terminal may establish a communication connection with the vehicle during the voice call. The time for establishing the communication connection between the mobile terminal and the vehicle is not limited in the embodiment of the disclosure.
S220, under the condition that the voice call program of the mobile terminal is in a call state, caching first voice data received by the voice call program into a first cache region in an audio hardware abstraction layer.
The audio hardware abstraction layer (audiohal) is a module part native to android, and the android native audio hardware abstraction layer is beneficial to keeping the compatibility and stability of a voice data transmission process.
In the embodiment of the present disclosure, the voice call program in the call state may be understood as that the mobile terminal has answered the voice call made by the call end, and at this time, the voice call program may receive the first voice data from the call end. Therefore, on the premise that the mobile terminal establishes communication connection with the vehicle, if the first voice data is received, the mobile terminal can cache the first voice data in the first cache region in the audio hardware abstraction layer.
In some embodiments, the first buffer may be a first-in first-out data buffer, thereby ensuring the playing timing of the voice data.
Among them, the voice call program may be of various types. Alternatively, the program may be a program based on a network over ip (VOIP) or a program based on a telephone network call, where the program based on the network call may be, for example, a WeChat Voice or a QQ Voice, and the program based on the telephone network call may be understood as a program that conventionally performs a call through a telephone card, for example, a program corresponding to a dial interface built in a mobile phone. Thus, the voice call program in the embodiment of the present disclosure includes a program based on a network call and a program based on a telephone network call.
And S230, acquiring the first voice data from the first cache region through a vehicle-machine data processing process in the mobile terminal, and sending the first voice data to the vehicle for playing.
In the embodiment of the disclosure, a vehicle-mounted data processing process is further arranged in the mobile terminal, and the process is used for transmitting voice data with a vehicle. Therefore, after the first voice data received by the voice call program is cached in the first cache region in the audio hardware abstraction layer, the vehicle-mounted data processing process can acquire the first voice data from the first cache region and then send the first voice data to the vehicle through the corresponding communication connection mode so as to enable the speaker of the vehicle to play.
In some embodiments, the in-vehicle data processing process may further perform format conversion on first voice data to be sent to the vehicle to obtain first voice data of a protocol corresponding to the communication connection mode, so as to send the first voice data to the vehicle in a corresponding communication mode.
And S240, receiving second voice data sent by the vehicle, and caching the second voice data into a second cache region in the audio hardware abstraction layer through the vehicle-mounted data processing process.
As can be seen from the foregoing, the vehicle-mounted audio collection device may also collect the local voice data of the vehicle, that is, the second voice data, and send the second voice data to the mobile terminal through the connection with the mobile terminal, and at this time, the mobile terminal may receive the second voice data sent by the vehicle.
In the embodiment of the present disclosure, in order to facilitate that a subsequent voice call program can obtain the second voice data, after receiving the second voice data, the mobile terminal may cache the second voice data in the second cache region in the audio hardware abstraction layer through the in-vehicle data processing process.
And S250, acquiring second voice data from the second cache region through the voice call program, and sending the second voice data to a call end for carrying out call with the mobile terminal.
In the embodiment of the disclosure, after the car machine data processing process caches the second voice data in the second cache region in the audio hardware abstraction layer, the voice call program may obtain the second voice data from the second cache region, and send the second voice data to the call end that makes a call with the mobile terminal.
It can be known that the steps S220 and S230 may correspond to a process of transmitting downlink voice data of a call end to a vehicle for playing, and the steps S240 and S250 may correspond to a process of transmitting uplink voice data of a vehicle local to the call end for playing, where in an actual call process, voice data in two directions may be processed in parallel, or may be processed successively according to an actual situation, and therefore, in some alternative implementations, an execution sequence of a part of the flow in the embodiment of the present invention may also be executed in an execution sequence different from that described in the foregoing specific embodiment. For example, the partial flows (steps S220, S230, and steps S240, S250) may be executed substantially in parallel, or they may be executed in reverse order depending on the functions involved.
By adopting the method, after the mobile terminal is in communication connection with the vehicle, under the condition that the voice call program of the mobile terminal is in a call state, the first voice data received by the voice call program can be cached in the first cache region in the audio hardware abstraction layer, the first voice data can be obtained from the first cache region through the vehicle-mounted machine data processing process in the mobile terminal, and the first voice data can be sent to the vehicle for playing; or the second voice data sent by the vehicle can be received, the second voice data is cached in a second cache region in the audio hardware abstraction layer through the vehicle-mounted computer data processing program, the second voice data is obtained from the second cache region through the voice communication program, and the second voice data is sent to a communication terminal for communicating with the mobile terminal. In the vehicle communication method of the embodiment of the disclosure, based on the native audio hardware abstraction layer of android and the newly added vehicle machine data processing process, data transmission between the mobile terminal and the vehicle through the audio hardware abstraction layer can be realized, the compatibility of the data transmission process can be improved by using the native audio hardware abstraction layer of android, and in addition, the tone quality of the voice communication data transmitted to the vehicle can also be ensured due to the fact that lossy compression is not performed on the audio data, so that the vehicle communication quality is improved.
Referring to fig. 3, fig. 3 is a flow chart illustrating a vehicle communication method according to an exemplary embodiment, which may be applied to a mobile terminal (e.g., the mobile terminal 102 shown in fig. 1), the mobile terminal including: cell-phones, notebook, panel computer, wearable equipment etc.. The method comprises the following steps:
and S310, establishing communication connection with the vehicle.
And S320, under the condition that the voice call program of the mobile terminal is in a call state, calling an audiotrack interface provided by the audio hardware abstraction layer, and caching the first voice data into a first cache region.
And S330, calling an audio interface provided by an audio hardware abstraction layer through a vehicle-machine data processing process in the mobile terminal, acquiring first voice data from the first cache region, and sending the first voice data to the vehicle for playing.
And S340, receiving second voice data sent by the vehicle, calling an audiotrack interface provided by the audio hardware abstraction layer through the vehicle data processing process, and caching the second voice data into a second cache region.
And S350, calling an audio interface provided by the audio hardware abstraction layer through the voice call program, acquiring second voice data from the second cache region, and sending the second voice data to a call end for carrying out call with the mobile terminal.
The AudioTrack interface class manages and plays a single audio resource for Java applications.
The audiocord interface class implements the collection of audio data.
The embodiment of the disclosure provides a data caching and data acquisition implementation method. The mobile terminal can call an audiotrack interface provided by the audio hardware abstraction layer, cache the first voice data in the first cache region, call an audiocord interface provided by the audio hardware abstraction layer through a car machine data processing process in the mobile terminal, and obtain the first voice data from the first cache region. In addition, the mobile terminal can call an audiotrack interface provided by the audio hardware abstraction layer through the car machine data processing process, cache the second voice data in the second cache region, and call an audiocord interface provided by the audio hardware abstraction layer through the voice call program, so as to obtain the second voice data from the second cache region.
For the content not described in detail in the steps S310 to S350, reference may be made to the description of the steps S210 to S250, and details are not repeated here.
By adopting the method, based on the android native audio hardware abstraction layer and the newly added vehicle data processing process, data can be transmitted between the mobile terminal and the vehicle through the audio hardware abstraction layer, the compatibility of the data transmission process can be improved by using the android native audio hardware abstraction layer, in addition, the tone quality of voice call data transmitted to the vehicle can be ensured due to the fact that lossy compression is not carried out on the audio data, and therefore the vehicle call quality is improved.
In addition, considering that if there are multiple audio output devices (for example, a speaker of a mobile terminal and a speaker of a vehicle) playing together in a call process, there are situations such as overlapping or noise of the audio played in the call process, and therefore, in order to avoid situations such as overlapping or noise of the audio played in the call process, in some embodiments, the method of the embodiment of the present disclosure may further include: and in response to the fact that the voice call program of the mobile terminal is in a call state, disabling the audio playing device of the mobile terminal and starting a data processing process of the mobile phone.
The audio playing device which disables the mobile terminal may be an audio playing device which prohibits the first audio data from being sent to the mobile terminal, or may be an audio playing device which allows the first audio data to be sent to a certain terminal, but prohibits the audio playing device of the mobile terminal from playing the first beverage data.
In addition, in order to avoid situations such as overlapping or noise of the audio played in the call process, in another embodiment, the method according to the embodiment of the present disclosure may further include: and detecting the state of the communication connection established between the mobile terminal and the vehicle, and under the condition that the detected state of the communication connection established between the mobile terminal and the vehicle is the state representing the established connection, forbidding the audio playing equipment of the mobile terminal and starting the vehicle-mounted machine data processing process.
In the embodiment of the present disclosure, after the mobile terminal establishes a communication connection with the vehicle, the audio playing device of the mobile terminal may be disabled, and the in-vehicle data processing process may be enabled.
In addition, in some embodiments, an audio capture device of the mobile terminal (e.g., a microphone of the mobile terminal) may be disabled while an audio playback device of the mobile terminal is disabled. When the audio acquisition device of the mobile terminal is forbidden, the audio acquisition device of the vehicle can be adopted to acquire the local voice data of the vehicle.
A vehicle communication method according to an embodiment of the present disclosure is described below with reference to a specific example.
As shown in fig. 4, a WeChat voice and a vehicle data processing process are built in the mobile phone, and the mobile phone establishes a communication connection with a vehicle (vehicle) through a USB.
At a certain moment, a WeChat call from other users (a call end in communication with the mobile phone) is received on the mobile phone, and after the mobile phone user answers the WeChat call, weChat voice is in a call state. At this time, the mobile phone may disable the audio playing device of the mobile terminal, and enable the in-vehicle data processing process, and at the same time, the mobile phone may process the downlink voice data corresponding to the wechat phone, that is, first invoke the audiotrack interface provided by the audio hardware abstraction layer, cache the first voice data in the first cache region, and then invoke the audiorecord interface provided by the audio hardware abstraction layer through the in-vehicle data processing process in the mobile terminal, obtain the first voice data from the first cache region, and send the first voice data to the speaker of the vehicle for playing. Meanwhile, a microphone of the vehicle can collect sound sent by a mobile phone user, second voice data corresponding to the sound are sent to the mobile terminal, the mobile terminal can receive the second voice data sent by the vehicle, an audiotrack interface provided by the audio hardware abstraction layer is called through the vehicle data processing process, the second voice data are cached in a second cache region, an audiocord interface provided by the audio hardware abstraction layer is called through a voice call program, the second voice data are obtained from the second cache region, and the second voice data are sent to a call terminal for calling the mobile terminal.
Fig. 5 is a block diagram illustrating a configuration of a vehicular call device 500 according to an exemplary embodiment. Referring to fig. 5, the apparatus is applied to a mobile terminal, and includes: a communication establishing module 510, a first buffer module 520, a first voice data obtaining module 530, a second buffer module 540, and a second voice data obtaining module 550. Wherein:
a communication establishment module 510 configured to establish a communication connection with a vehicle;
the first cache module 520 is configured to cache first voice data received by a voice call program of the mobile terminal to a first cache region in the audio hardware abstraction layer when the voice call program is in a call state;
a first voice data obtaining module 530, configured to obtain first voice data from the first buffer through a vehicle-mounted data processing process in the mobile terminal, and send the first voice data to the vehicle for playing;
the second cache module 540 is configured to receive second voice data sent by the vehicle, and cache the second voice data in a second cache region in the audio hardware abstraction layer through the vehicle-machine data processing process;
the second voice data obtaining module 550 is configured to obtain the second voice data from the second buffer through the voice call program, and send the second voice data to a call end for making a call with the mobile terminal.
In some embodiments, the communication establishment module 510 includes:
and the establishing submodule is configured to establish communication connection with the vehicle through a USB mode or a WIFI mode.
In some embodiments, the apparatus further comprises:
and the response module is configured to respond to that the voice call program of the mobile terminal is in a call state, disable the audio playing device of the mobile terminal and enable the car machine data processing process.
In some embodiments, the first caching module 520 is further configured to call an audiotrack interface provided by the audio hardware abstraction layer to cache the first speech data in the first cache region. In this case, the first voice data obtaining module 530 is further configured to call an audio hardware abstraction layer provided interface to obtain the first voice data from the first buffer.
In some embodiments, the second caching module 540 is further configured to call, by the car machine data processing process, an audiotrack interface provided by the audio hardware abstraction layer to cache the second voice data in the second cache region. In this case, the second voice data obtaining module 550 is further configured to obtain the second voice data from the second buffer by calling an audio interface provided by the audio hardware abstraction layer through the voice call program.
In some embodiments, the voice call program includes a network call based program and a telephone network call based program.
With regard to the apparatus in the above embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be described in detail here.
The present disclosure also provides a computer readable storage medium having stored thereon computer program instructions which, when executed by a processor, implement the steps of the vehicle talk method provided by the present disclosure.
Fig. 6 is a block diagram illustrating an electronic device 600 according to an example embodiment. For example, the electronic device 800 may be a cell phone, a notebook, a tablet, a wearable device, and the like.
Referring to fig. 6, electronic device 600 may include one or more of the following components: a processing component 602, a memory 604, a power component 606, a multimedia component 608, an audio component 610, an interface to input/output (I/O) 612, a sensor component 614, and a communication component 616.
The processing component 602 generally controls overall operation of the electronic device 600, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations. The processing component 602 may include one or more processors 620 to execute instructions to perform all or some of the steps of the vehicle talk method described above. Further, the processing component 602 can include one or more modules that facilitate interaction between the processing component 602 and other components. For example, the processing component 602 can include a multimedia module to facilitate interaction between the multimedia component 608 and the processing component 602.
The memory 604 is configured to store various types of data to support operations at the electronic device 600. Examples of such data include instructions for any application or method operating on the electronic device 600, contact data, phonebook data, messages, pictures, videos, and so forth. The memory 604 may be implemented by any type or combination of volatile and non-volatile memory devices such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disks.
Power component 606 provides power to the various components of electronic device 600. Power components 606 may include a power management system, one or more power sources, and other components associated with generating, managing, and distributing power for electronic device 600.
The multimedia component 608 includes a screen that provides an output interface between the electronic device 600 and a user. In some embodiments, the screen may include a Liquid Crystal Display (LCD) and a Touch Panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive an input signal from a user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundary of a touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 608 includes a front facing camera and/or a rear facing camera. The front camera and/or the rear camera may receive external multimedia data when the electronic device 600 is in an operating mode, such as a shooting mode or a video mode. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
The audio component 610 is configured to output and/or input audio signals. For example, the audio component 610 includes a Microphone (MIC) configured to receive external audio signals when the electronic device 600 is in an operational mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signals may further be stored in the memory 604 or transmitted via the communication component 616. In some embodiments, audio component 610 further includes a speaker for outputting audio signals.
The I/O interface 612 provides an interface between the processing component 602 and peripheral interface modules, which may be keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to: a home button, a volume button, a start button, and a lock button.
The sensor component 614 includes one or more sensors for providing various aspects of status assessment for the electronic device 600. For example, the sensor component 614 may detect an open/closed state of the electronic device 600, the relative positioning of components, such as a display and keypad of the electronic device 600, the sensor component 614 may also detect a change in the position of the electronic device 600 or a component of the electronic device 600, the presence or absence of user contact with the electronic device 600, orientation or acceleration/deceleration of the electronic device 600, and a change in the temperature of the electronic device 600. The sensor assembly 614 may include a proximity sensor configured to detect the presence of a nearby object without any physical contact. The sensor assembly 614 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 614 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
The communication component 616 is configured to facilitate communications between the electronic device 600 and other devices in a wired or wireless manner. The electronic device 600 may access a wireless network based on a communication standard, such as WiFi,2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 616 receives broadcast signals or broadcast related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 616 further includes a Near Field Communication (NFC) module to facilitate short-range communications. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID) technology, infrared data association (IrDA) technology, ultra Wideband (UWB) technology, bluetooth (BT) technology, and other technologies.
In an exemplary embodiment, the electronic device 600 may be implemented by one or more Application Specific Integrated Circuits (ASICs), digital Signal Processors (DSPs), digital Signal Processing Devices (DSPDs), programmable Logic Devices (PLDs), field Programmable Gate Arrays (FPGAs), controllers, micro-processors, or other electronic components for performing the above-described vehicle talk method.
In an exemplary embodiment, a non-transitory computer-readable storage medium comprising instructions, such as the memory 604 comprising instructions, executable by the processor 620 of the electronic device 600 to perform the vehicle talk method described above is also provided. For example, the non-transitory computer readable storage medium may be a ROM, a Random Access Memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like.
In another exemplary embodiment, a computer program product is also provided, which comprises a computer program executable by a programmable apparatus, the computer program having code portions for performing the above-described vehicle talk method when executed by the programmable apparatus.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure. This application is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
It will be understood that the present disclosure is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims (10)

1. A vehicle communication method is applied to a mobile terminal and comprises the following steps:
establishing a communication connection with the vehicle;
under the condition that a voice call program of the mobile terminal is in a call state, caching first voice data received by the voice call program into a first cache region in an audio hardware abstraction layer;
acquiring the first voice data from the first cache region through a vehicle-mounted data processing process in the mobile terminal, and sending the first voice data to the vehicle for playing;
receiving second voice data sent by the vehicle, and caching the second voice data to a second cache region in the audio hardware abstraction layer through the vehicle-mounted data processing process;
and acquiring the second voice data from the second cache region through the voice call program, and sending the second voice data to a call end for carrying out call with the mobile terminal.
2. The method of claim 1, further comprising:
and in response to the fact that the voice call program of the mobile terminal is in a call state, disabling the audio playing device of the mobile terminal and enabling the car machine data processing process.
3. The method according to claim 1 or 2, wherein the buffering the first voice data received by the voice call program into a first buffer area in an audio hardware abstraction layer comprises:
calling an audiotrack interface provided by the audio hardware abstraction layer, and caching the first voice data to the first cache region;
the obtaining the first voice data from the first buffer includes:
and calling an audio interface provided by the audio hardware abstraction layer to acquire the first voice data from the first cache region.
4. The method according to claim 1 or 2, wherein the caching the second voice data into a second cache region in the audio hardware abstraction layer by the car machine data processing process comprises:
calling an audiotrack interface provided by the audio hardware abstraction layer through the car machine data processing process, and caching the second voice data into the second cache region;
the obtaining the second voice data from the second buffer area through the voice call program includes:
and calling an audio interface provided by the audio hardware abstraction layer through the voice call program, and acquiring the second voice data from the second cache region.
5. The method according to claim 1 or 2, wherein the voice call program comprises a network call-based program and a telephone network call-based program.
6. A vehicle communication device is applied to a mobile terminal and comprises:
a communication establishment module configured to establish a communication connection with the vehicle;
the first cache module is configured to cache first voice data received by a voice call program of the mobile terminal to a first cache region in an audio hardware abstraction layer under the condition that the voice call program is in a call state;
the first voice data acquisition module is configured to acquire the first voice data from the first cache region through a vehicle-mounted data processing process in the mobile terminal, and send the first voice data to the vehicle for playing;
the second cache module is configured to receive second voice data sent by the vehicle and cache the second voice data to a second cache region in the audio hardware abstraction layer through the vehicle-mounted data processing process;
and the second voice data acquisition module is configured to acquire the second voice data from the second cache region through the voice call program and send the second voice data to a call end for calling the mobile terminal.
7. The apparatus of claim 6, further comprising:
and the response module is configured to respond to that the voice call program of the mobile terminal is in a call state, disable the audio playing device of the mobile terminal and enable the car machine data processing process.
8. The apparatus according to claim 6 or 7, wherein the first caching module is further configured to call an audiotrack interface provided by the audio hardware abstraction layer to cache the first speech data in the first cache region;
the first voice data obtaining module is further configured to call an audio interface provided by the audio hardware abstraction layer to obtain the first voice data from the first cache region.
9. An electronic device, comprising:
a memory having a computer program stored thereon;
a processor for executing the computer program in the memory to carry out the steps of the method of any one of claims 1 to 5.
10. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the steps of the method according to any one of claims 1 to 5.
CN202111110644.2A 2021-09-18 2021-09-18 Vehicle communication method and device, electronic equipment and storage medium Pending CN115842885A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111110644.2A CN115842885A (en) 2021-09-18 2021-09-18 Vehicle communication method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111110644.2A CN115842885A (en) 2021-09-18 2021-09-18 Vehicle communication method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN115842885A true CN115842885A (en) 2023-03-24

Family

ID=85574483

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111110644.2A Pending CN115842885A (en) 2021-09-18 2021-09-18 Vehicle communication method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN115842885A (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109559763A (en) * 2017-09-26 2019-04-02 华为技术有限公司 A kind of method and device of real time digital audio signal audio mixing
CN113286280A (en) * 2021-04-12 2021-08-20 沈阳中科创达软件有限公司 Audio data processing method and device, electronic equipment and computer readable medium

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109559763A (en) * 2017-09-26 2019-04-02 华为技术有限公司 A kind of method and device of real time digital audio signal audio mixing
CN113286280A (en) * 2021-04-12 2021-08-20 沈阳中科创达软件有限公司 Audio data processing method and device, electronic equipment and computer readable medium

Similar Documents

Publication Publication Date Title
JP6121621B2 (en) Voice call method, apparatus, program, and recording medium
US8379073B2 (en) Method for storing data of video telephony call in mobile terminal and system thereof
WO2020078330A1 (en) Voice call-based translation method and electronic device
CN112969096A (en) Media playing method and device and electronic equipment
US11284398B2 (en) Communication link configuration method and device
WO2021031865A1 (en) Call method and apparatus
CN105208089A (en) Information display method, apparatus and system
CN114513571A (en) Device connection method and device, electronic device and readable storage medium
CN111726516A (en) Image processing method and device
CN112243142B (en) Method, device and storage medium for processing audio data
CN112882622A (en) Data processing method and device, terminal and storage medium
RU2663355C1 (en) Method and device for installing connection for service
CN105227891A (en) A kind of video call method and device
CN114615647A (en) Call control method, device and storage medium
CN110213531B (en) Monitoring video processing method and device
CN115842885A (en) Vehicle communication method and device, electronic equipment and storage medium
CN109981729B (en) File processing method and device, electronic equipment and computer readable storage medium
CN107396415B (en) Communication method of dual-card intelligent terminal and terminal
CN112511686A (en) Recording method and earphone equipment
CN114125352A (en) Screen sharing method, electronic equipment and system
CN111836356A (en) Method, device, storage medium and mobile terminal for requesting data
CN111800836A (en) Communication method, communication device, electronic equipment and storage medium
CN106170038B (en) Recording method and device
CN112738341B (en) Call data processing method and earphone device
CN114007101B (en) Processing method, device and storage medium of fusion display device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination