Audio control method, and device and medium
By monitoring the status of the pickup unit of the PC in real time and controlling the occupation and release of the pickup unit of the vehicle-mounted electronic equipment, it solves the application conflict and echo problems caused by the PC occupying the pickup unit under the Windows operating system, and realizes the normal use and release of the vehicle-mounted electronic equipment. Clear capture of audio streams.
Patent Information
- Application Number
- PCT/CN2024/078089
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-03-10
- Filing Date
- 2024-02-22
- Publication Date
- 2024-09-19
AI Technical Summary
The Windows operating system lacks an audio focus management function, causing the PC to still occupy the pickup unit of the in-vehicle electronic device when it is not needed to pick up sound. As a result, the in-vehicle electronic device's own application cannot use the pickup unit, and there is an echo problem.
By detecting the status of the pickup unit of the PC in real time, sending occupation or release instructions to control the pickup unit of the vehicle electronic equipment to avoid long-term occupation, and using the same terminal to play the audio stream to avoid echo.
It solves the problem of PC applications occupying the pickup unit of in-vehicle electronic equipment for a long time, ensures the use of the in-vehicle electronic equipment's own applications, and avoids echoes in the process of collecting audio streams.
Smart Images

Figure CN2024078089_19092024_PF_FP_ABST
Abstract
Description
Audio control method, device and medium
[0001] This application claims priority to the Chinese patent application filed with the China Patent Office on March 10, 2023, with application number 202310268995.9 and application name “A method, device and medium for audio control”. The entire contents of the above application are incorporated by reference into this application. Technical Field
[0002] The present application relates to the field of media playback technology, and in particular to an audio control method, device, and medium. Background Art
[0003] Currently, some users choose to work in their cars due to reasons such as working away from home or experiencing a temporary power outage. As shown in Figure 1, after a user's personal computer (PC) establishes a collaborative connection with the car's central control system, the user can initiate a remote conference call with a remote client using the PC. The PC can then transmit captured images and / or audio streams to the central control system via Bluetooth. The central control system then controls the car's screen to display the captured images and the car's speakers to produce sound, with the PC's microphone (MIC) picking up the sound. However, because cars are relatively enclosed spaces, echo is a common phenomenon. When someone inside speaks, the PC's microphone will simultaneously pick up the sound from the car's speakers and the person's voice, causing the remote client to hear an echo.
[0004] In some solutions, as shown in Figure 2, after the PC receives the audio stream sent by the remote client, it can transmit the audio stream to the car's central control via Bluetooth. The car's central control controls the car's speakers to play the audio stream and control the car's MIC to pick up sound. It is understandable that based on existing audio technology, it is possible to achieve the problem of echo during the sound pickup process when playing and picking up sound through the same device. However, in the current solution, because the PC uses the Windows operating system, and the Windows operating system does not have an audio focus management function, it cannot guarantee that the PC's application (such as a communication application) using the MIC of the collaborative device will always keep the MIC occupied during use. For example, if any other application needs to use the MIC while the current application is using the MIC, the MIC will be directly preempted by the other application, resulting in the interruption of the sound reception of the application currently using the MIC. Therefore, in order to avoid the above-mentioned problem of the sound reception of the application using the MIC being interrupted, in the solution shown in Figure 2, after the PC establishes collaboration with the vehicle-mounted electronic device, the PC will remain in a state of occupying the car's MIC to achieve normal sound pickup throughout the entire collaboration process. As a result, even if there is no application on the PC that needs to use the MIC, the car's own applications cannot use the car's MIC.
[0005] Summary of the Invention
[0006] In order to solve the above-mentioned problem that when a PC using the Windows operating system does not need to pick up sound, it will always occupy the sound pickup unit of the cooperative vehicle-mounted electronic device, resulting in the vehicle-mounted electronic device's own applications or other electronic devices being unable to use the vehicle-mounted electronic device's sound pickup unit, an audio control method, device and medium are provided in an embodiment of the present application.
[0007] In a first aspect, an embodiment of the present application provides an audio control method, which includes: when a first sound pickup unit of a first electronic device is in an activated state, the first electronic device collects audio data through a second sound pickup unit of a second electronic device; when the first electronic device detects that the first sound pickup unit is switched from an activated state to an inactivated state, the first electronic device stops collecting audio data through the second sound pickup unit of the second electronic device.
[0008] It is understood that the first electronic device can be an electronic device using the Windows system, such as a PC. The second electronic device can be any terminal device such as a PC, a tablet computer, a mobile phone, a foldable electronic device, a cellular phone, etc. The first sound pickup unit and the second sound pickup unit can be devices with sound pickup functions such as a microphone.
[0009] Based on the above solution, it is possible to effectively avoid the problem that during the collaboration between the first electronic device and the second electronic device, the application of the first electronic device occupies the sound pickup unit of the second electronic device for a long time (or occupies the sound pickup focus of the sound pickup unit of the second electronic device), thereby affecting the use of the sound pickup unit by the application of the second electronic device itself. This ensures that when the first electronic device does not need to use the sound pickup unit, the second electronic device's own application or the application of other electronic devices can use the sound pickup unit of the second electronic device.
[0010] In one possible implementation, the first electronic device detects that the first pickup unit is switched from an activated state to an inactivated state, including: the first electronic device receives a state change notification of the first pickup unit; the first electronic device determines whether there is an application using the first pickup unit; when the first electronic device determines that there is no application using the first pickup unit, the first electronic device determines that the first pickup unit is switched from an activated state to an inactivated state.
[0011] In a possible implementation, the first electronic device determines whether there is an application using the first sound pickup unit, including: the first electronic device obtains a list of applications registered to use the first sound pickup unit; the first electronic device determines whether there is an application in the application list using the first sound pickup unit.
[0012] In one possible implementation, the first electronic device stops collecting audio data through the second sound pickup unit of the second electronic device, including: the first electronic device sends a sound pickup unit release instruction to the second electronic device; and the second sound pickup unit stops collecting audio data based on the sound pickup unit release instruction.
[0013] It is understood that the first electronic device sending the pickup unit release instruction to the second electronic device can achieve that the first electronic device no longer occupies the second pickup unit of the second electronic device. When the second electronic device receives the pickup unit release instruction, the second pickup unit no longer sends the collected audio data to the first electronic device.
[0014] In a possible implementation, the method further includes: the first electronic device detects that the first sound pickup unit switches from an inactive state to an active state, and the first electronic device collects audio data through a second sound pickup unit of the second electronic device.
[0015] In a possible implementation, the first electronic device collects audio data through the second sound pickup unit of the second electronic device, including: the first electronic device sends a sound pickup unit occupation instruction to the second electronic device; and the second sound pickup unit collects audio data based on the sound pickup unit occupation instruction.
[0016] It is understood that the first electronic device sending the pickup unit occupation instruction to the second electronic device can enable the first electronic device to occupy the second pickup unit of the second electronic device. When the second electronic device receives the pickup unit occupation instruction, the second pickup unit sends the collected audio data to the first electronic device.
[0017] In one possible implementation, the method further includes: the first electronic device detects an instruction by a user to select a second playback unit of the second electronic device to play audio data, muting the first playback unit of the first electronic device; and the first electronic device plays the audio data through the second playback unit.
[0018] In some embodiments, the first playback unit can be a device with a sound playback function, such as a speaker. When the first electronic device receives an instruction from the user to select the second electronic device to play audio data, for example, when the user inputs an instruction on the screen of the first electronic device to instruct the second electronic device to play the audio stream to be played, the first electronic device obtains the audio stream to be played, mutes the speaker of the first electronic device, and sends the audio stream to be played and the sound pickup unit occupation instruction to the second electronic device, so that the sound is emitted through the speaker of the second electronic device and the sound is picked up by the sound pickup unit of the second electronic device. The embodiment of the present application uses the same terminal to play the audio stream and collect the audio stream, avoiding the problem of echo in the process of collecting the audio stream.
[0019] In one possible implementation, the method further includes: after the first application of the first electronic device is started, the first application obtains the initial state of the first pickup unit; the first application detects that the initial state is an inactivated state, and the first electronic device stops collecting audio data through the second pickup unit of the second electronic device.
[0020] In a possible implementation, the operating system of the first electronic device is a Windows operating system.
[0021] In a possible implementation, the second electronic device is an in-vehicle electronic device.
[0022] In a second aspect, an embodiment of the present application provides an electronic device, comprising: a memory for storing instructions executed by one or more processors of the electronic device, and a processor, which is one of the one or more processors of the electronic device, for implementing any one of the audio control methods provided by the above-mentioned first aspect and various possible implementations of the above-mentioned first aspect.
[0023] In a third aspect, an embodiment of the present application provides a readable medium having instructions stored thereon. When the instructions are executed on an electronic device, the electronic device implements any one of the audio control methods provided by the first aspect and various possible implementations of the first aspect. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] FIG1 shows a schematic diagram of a collaborative scenario of an audio control method;
[0025] FIG2 shows a schematic diagram of a collaborative scenario of an audio control method;
[0026] FIG3 shows a schematic structural diagram of a PC according to an embodiment of the present application;
[0027] FIG4 shows a schematic diagram of the software structure of an in-vehicle electronic device according to an embodiment of the present application.
[0028] FIG5 is a schematic diagram showing a PC-vehicle electronic equipment collaborative system architecture according to an embodiment of the present application;
[0029] FIG6 shows a schematic diagram of the architecture of a PC manager according to an embodiment of the present application;
[0030] FIG7 shows a schematic diagram of the architecture of a collaborative assistant according to an embodiment of the present application;
[0031] FIG8 shows an interactive schematic diagram of an audio control method according to an embodiment of the present application;
[0032] FIG9 is a schematic diagram showing a flow chart of an audio control method according to an embodiment of the present application;
[0033] 10a-10b are interactive diagrams illustrating an audio control method according to an embodiment of the present application. DETAILED DESCRIPTION
[0034] Currently, the Windows operating system does not have the audio focus management function. Therefore, when a PC using the Windows operating system does not need to pick up sound, it will always occupy the sound pickup unit of the cooperative vehicle electronic device, causing the vehicle electronic device's own applications or other electronic devices to be unable to use the vehicle electronic device's sound pickup unit.
[0035] To solve the above problem, an embodiment of the present application provides an audio control method for any two electronic devices that can perform sound pickup collaboration. The method can confirm whether the sound pickup unit of the second electronic device is occupied by detecting the activation state of the sound pickup unit of the first electronic device in real time (wherein the sound pickup unit can refer to any device that can receive sound, such as a MIC, etc.), so as to avoid the problem that the first electronic device continuously occupies the sound pickup unit of the second electronic device, resulting in the second electronic device's own application being unable to use the sound pickup unit. For example, when the first electronic device detects that the sound pickup unit of the first electronic device changes from an unactivated state to an activated state, it sends a sound pickup unit occupation instruction to the second electronic device to use the sound pickup unit of the second electronic device to pick up sound; when the first electronic device detects that the sound pickup unit of the first electronic device changes from an activated state to an inactivated state, that is, when the current state of the sound pickup unit of the first electronic device is an inactivated state, it sends a sound pickup unit release instruction to the second electronic device to release the first electronic device's occupation of the sound pickup unit of the second electronic device, so that other applications of the second electronic device can use the sound pickup unit of the second electronic device.
[0036] It can be understood that when the sound pickup unit of the first electronic device is in an activated state, it means that the application that activates the sound pickup unit needs to occupy the sound pickup focus of the sound pickup unit of the second electronic device to pick up sound through the sound pickup unit of the second electronic device; when the sound pickup unit of the first electronic device is in an inactivated state, it means that it does not need to occupy the sound pickup focus of the sound pickup unit of the second electronic device.
[0037] Based on the above solution, it is possible to effectively avoid the problem that during the collaboration between the first and second electronic devices, the application of the first electronic device occupies the sound pickup unit of the second electronic device for a long time (or occupies the sound pickup focus of the sound pickup unit of the second electronic device), affecting the use of the sound pickup unit by the application of the second electronic device itself. This ensures that when the first electronic device does not need to use the sound pickup unit, the second electronic device's own application or the application of other electronic devices can use the sound pickup unit of the second electronic device. In addition, the embodiment of the present application uses the same terminal to play the audio stream and collect the audio stream, avoiding the problem of echo in the process of collecting the audio stream.
[0038] The following first introduces the electronic device involved in the embodiments of the present application.
[0039] In the embodiment of the present application, the first electronic device may be the aforementioned electronic device using the Windows system, such as a PC. Alternatively, the first electronic device may be any one of terminal devices such as a tablet computer, a mobile phone, a foldable electronic device, a cellular phone, a personal digital assistant (PDA), an artificial intelligence (AI) device, a wearable device, or an in-vehicle electronic device. The second electronic device may be any one of terminal devices such as a PC, a tablet computer, a mobile phone, a foldable electronic device, a cellular phone, a PDA, an AI device, a wearable device, or an in-vehicle electronic device.
[0040] The following takes the first electronic device as a PC 10 and the second electronic device as a vehicle-mounted electronic device 20 as an example to introduce the hardware structures of the first electronic device and the second electronic device.
[0041] As shown in FIG3 , the PC 10 may include a processor 110 , a power module 140 , a memory 180 , a mobile communication module 130 , a wireless communication module 120 , a sensor module 190 , an audio module 150 , a camera 170 , an interface module 160 , a button 101 , and a display screen 102 .
[0042] It should be understood that the illustrated structure of the embodiment of the present invention does not constitute a specific limitation on the PC 10. In other embodiments of the present application, the PC 10 may include more or fewer components than illustrated, or may combine or separate certain components, or may have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of hardware and software.
[0043] The processor 110 may include one or more processing units, for example, a processing module or processing circuit including a central processing unit (CPU), a graphics processing unit (GPU), a digital signal processing (DSP), a microprocessor (MCU), an artificial intelligence (AI) processor, or a programmable logic device (FPGA). Different processing units may be independent devices or integrated into one or more processors. A storage unit may be provided in the processor 110 for storing instructions and data. In some embodiments, the storage unit in the processor 110 is a cache memory.
[0044] It can be understood that the audio control method in the embodiment of the present application can be executed by the processor 110 of the corresponding electronic device. The power module 140 may include a power supply, a power management component, etc. The power supply may be a battery. The power management component is used to manage the charging of the power supply and the supply of power to other modules. In some embodiments, the power management component includes a charging management module and a power management module. The charging management module is used to receive charging input from the charger; the power management module is used to connect the power supply, the charging management module and the processor 110. The power management module receives input from the power supply and / or the charging management module to power the processor 110, the display screen 102, the camera 170, and the wireless communication module 120.
[0045] The wireless communication module 120 may include an antenna and transmit and receive electromagnetic waves via the antenna. The wireless communication module 120 may provide wireless communication solutions for the PC 10, including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR), and the like. The PC 10 may communicate with the network and other devices via wireless communication technologies.
[0046] Display screen 102 is used to display human-computer interaction interfaces, images, videos, etc. Display screen 102 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), a quantum dot light-emitting diode (QLED), etc.
[0047] The sensor module 190 may include a proximity sensor, a pressure sensor, a temperature sensor, a touch sensor, an ambient light sensor, and the like.
[0048] The audio module 150 is used to convert digital audio information into analog audio signal output, or convert analog audio input into digital audio signal. The audio module 150 can also be used to encode and decode audio signals. In some embodiments, the audio module 150 can be provided in the processor 110, or some functional modules of the audio module 150 can be provided in the processor 110. In some embodiments, the audio module 150 can include a speaker, an earpiece, a MIC, and a headphone jack.
[0049] Camera 170 is used to capture still images or video. The lens generates an optical image of an object and projects it onto a photosensitive element. The photosensitive element converts the optical signal into an electrical signal, which is then passed to an image signal processing unit (ISP) for conversion into a digital image signal. PC 10 implements its camera function through the ISP, camera 170, video codec, graphics processing unit (GPU), display 102, and application processor.
[0050] The interface module 160 includes an external memory interface, a USB interface, and a subscriber identification module (SIM) card interface. The external memory interface can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the PC 10. The external memory card communicates with the processor 110 via the external memory interface to implement data storage. The universal serial bus interface is used for communication between the PC 10 and other electronic devices. The subscriber identification module card interface is used to communicate with a SIM card installed in the PC 10, for example, to read or write phone numbers stored in the SIM card.
[0051] In some embodiments, the PC 10 further includes a button 101 indicator, etc. The button 101 may include a volume button, a power on / off button, etc. The indicator may include a laser indicator, a radio frequency indicator, an LED indicator, etc.
[0052] FIG4 is a schematic diagram of the hardware structure of an in-vehicle electronic device according to an embodiment of the present application. The schematic structure of the in-vehicle electronic device 20 may be as shown in FIG4 .
[0053] The in-vehicle electronic device 20 may include a sensor system 204, a control system 206, one or more peripheral devices 208, a power supply 210, a computer system 212, and a user interface 216. Alternatively, the in-vehicle electronic device 20 may include more or fewer subsystems, and each subsystem may include multiple components. In addition, each subsystem and component of the in-vehicle electronic device 20 may be interconnected via wired or wireless connections.
[0054] The sensor system 204 may include several sensors that sense information about the environment surrounding the vehicle. For example, the sensor system 204 may include a positioning system 222 (the positioning system 222 may be a global positioning system (GPS), a BeiDou system, or other positioning systems), an inertial measurement unit (IMU) 224, a radar 226, a laser rangefinder 228, and a camera 230. The sensor system 204 may also include sensors of the internal systems of the on-board electronic device 20 being monitored (for example, an in-vehicle air quality monitor, a fuel gauge, an oil temperature gauge, etc.). Sensor data from one or more of these sensors can be used to detect objects and their corresponding characteristics (position, shape, direction, speed, etc.). This detection and recognition is a key function for the safe operation of the on-board electronic device 20.
[0055] Positioning system 222 may be used to estimate the geographic location of the vehicle.
[0056] The IMU 224 is used to sense the position and orientation changes of the vehicle based on inertial acceleration. In one embodiment, the IMU 224 can be a combination of an accelerometer and a gyroscope. For example, the IMU 224 can be used to measure the curvature of the vehicle's electronic device 20.
[0057] The radar 226 can use radio signals to sense objects in the surrounding environment of the intelligent vehicle electronic device 20. In some embodiments, in addition to sensing objects, the radar 226 can also be used to sense the speed and / or heading of the object.
[0058] The laser rangefinder 228 may utilize laser light to sense objects in the environment the vehicle is located in. In some embodiments, the laser rangefinder 228 may include one or more laser sources, a laser scanner, and one or more detectors, among other system components.
[0059] The camera 230 may be configured to capture multiple images of the surrounding environment of the in-vehicle electronic device. The camera 230 may be a still camera or a video camera.
[0060] Control system 206 may include various elements, including a steering system 232 , a throttle 234 , a braking unit 236 , a computer vision system 240 , a path control system 242 , and an obstacle avoidance system 244 .
[0061] The steering system 232 can be operated to adjust the forward direction of the vehicle. For example, in one embodiment, it can be a steering wheel system that can be used for the angle of steering wheel rotation.
[0062] Throttle 234 is used to control the operating speed of the engine and, therefore, the speed of the vehicle.
[0063] Braking unit 236 is used to control vehicle deceleration. Braking unit 236 can use friction to slow the wheels. In other embodiments, braking unit 236 can convert the kinetic energy of the wheels into electrical current. Braking unit 236 can also take other forms to slow the wheel speed and thus control the speed of the vehicle.
[0064] The computer vision system 240 can be operated to process and analyze images captured by the camera 230 to identify objects and / or features in the vehicle's surrounding environment. The objects and / or features may include traffic signs, road boundaries, and obstacles. The computer vision system 240 can use object recognition algorithms, structure from motion (SFM) algorithms, video tracking, and other computer vision techniques. In some embodiments, the computer vision system 240 can be used to map the environment, track objects, estimate the speed of objects, and so on.
[0065] The route control system 242 is used to determine the driving route of the vehicle. In some embodiments, the route control system 242 can combine data from the sensor system 204, the positioning system 222, and one or more predetermined maps to determine the driving route for the vehicle.
[0066] Obstacle avoidance system 244 is used to identify, assess, and avoid or otherwise negotiate potential obstacles in the vehicle's environment.
[0067] Of course, in one example, the control system 206 may include additional or alternative components other than those shown and described, or may also include fewer than some of the components shown.
[0068] The vehicle interacts with external sensors, other vehicles, other computer systems, or users through peripherals 208. Peripherals 208 may include a wireless communication system 246, an onboard computer 248, a microphone 250, and / or a speaker 252.
[0069] In some embodiments, peripheral devices 208 provide a means for a vehicle user to interact with user interface 216. For example, onboard computer 248 can provide information to the vehicle user. User interface 216 can also operate onboard computer 248 to receive user input. Onboard computer 248 can be operated via a touch screen. In other cases, peripheral devices 208 can provide a means for the vehicle to communicate with other devices located within the vehicle. For example, microphone 250 can receive audio (e.g., voice commands or other audio input) from the vehicle user. Similarly, speaker 252 can output audio to the user of the smart vehicle.
[0070] The wireless communication system 246 can communicate wirelessly with one or more devices directly or via a communication network. For example, the wireless communication system 246 can use 3G cellular communication, such as CDMA, EVDO, GSM / GPRS, or 4G cellular communication, such as LTE. Or 5G cellular communication. The wireless communication system 246 can use WiFi to communicate with a wireless local area network (WLAN). In some embodiments, the wireless communication system 246 can use an infrared link or Bluetooth to communicate directly with the device. Other wireless protocols, such as various vehicle communication systems, for example, the wireless communication system 246 may include one or more dedicated short range communications (DSRC) devices, which may include public and / or private data communications between vehicles and / or roadside stations.
[0071] Power supply 210 can provide power to various components of the vehicle. In one embodiment, power supply 210 can be a rechargeable lithium-ion or lead-acid battery. One or more battery packs of such batteries can be configured as a power supply to provide power to various components of the vehicle.
[0072] Some or all functions of the vehicle are controlled by a computer system 212. The computer system 212 may include at least one processor 213 that executes instructions 215 stored in a non-transitory computer-readable medium, such as a data storage device 214. The computer system 212 may also be a plurality of computing devices that control individual components or subsystems of the vehicle in a distributed manner.
[0073] Processor 213 can be any conventional processor, such as commercially available processor central processing unit (CPU). Alternatively, the processor can be a dedicated device such as an application specific integrated circuit (ASIC) or other hardware-based processor. Although FIG. 4 functionally illustrates a processor, memory, and other elements of a computer in the same block, those skilled in the art will appreciate that the processor, computer, or memory can actually include multiple processors, computers, or memories that may or may not be stored in the same physical housing. For example, the memory can be a hard drive or other storage medium that is located in a housing different from the computer. Therefore, reference to a processor or computer will be understood to include reference to a collection of processors or computers or memories that may or may not operate in parallel. Different from using a single processor to perform the steps described herein, each of some components such as a steering assembly and a deceleration assembly can have its own processor that only performs the calculations related to the functions of the component.
[0074] In various aspects described herein, the processor can be located remotely from the vehicle and in wireless communication with the vehicle. In other aspects, some of the processes described herein are performed on a processor disposed within the vehicle while others are performed by a remote processor, including taking the necessary steps to perform a single maneuver.
[0075] In some embodiments, data storage 214 may include instructions 215 (e.g., program logic) that may be executed by processor 213 to perform various functions of the vehicle, including those described above. Data storage 224 may also include additional instructions, including instructions for sending data to, receiving data from, interacting with, and / or controlling one or more of sensor system 204, control system 206, and peripheral device 208.
[0076] In addition to instructions 215, data storage device 214, which functions as a memory, may also store data such as road maps, route information, the vehicle's location, direction, speed, and other such vehicle data, as well as other information. This information may be used by the vehicle and computer system 212 during operation of the vehicle in autonomous, semi-autonomous, and / or manual modes.
[0077] User interface 216 is used to provide information to or receive information from a user of the vehicle. Optionally, user interface 216 may include one or more input / output devices within the set of peripherals 208, such as wireless communication system 246, onboard computer 248, microphone 250, and speaker 252.
[0078] Computer system 212 may control functions of the vehicle based on input received from various subsystems (e.g., sensor system 204 and control system 206) and from user interface 216. For example, computer system 212 may utilize input from control system 206 to control steering system 232 to avoid obstacles detected by sensor system 204 and obstacle avoidance system 244. In some embodiments, computer system 212 may be operable to provide control over many aspects of the vehicle and its subsystems.
[0079] Alternatively, one or more of the above components may be installed or associated separately from the vehicle-mounted electronic device 20. For example, the data storage device 214 may be partially or completely separate from the vehicle-mounted electronic device 20. The above components may be communicatively coupled together in a wired and / or wireless manner.
[0080] Optionally, the above components are only an example. In actual applications, the components in the above modules may be added or deleted according to actual needs. Figure 4 should not be understood as a limitation to the embodiments of the present application.
[0081] The following describes the software structures of the first and second electronic devices, taking the first electronic device as a PC and the second electronic device as an in-vehicle electronic device as an example. In some embodiments, the PC may be a Windows operating system, and the sound pickup unit in the PC may be a MIC.
[0082] As shown in FIG5 , the PC may include upper-layer applications that require MIC, such as call applications, audio applications, and video applications, as well as a PC manager, a registry, a speaker driver module, and a MIC driver module.
[0083] As shown in FIG6 , the PC manager includes an audio stream forwarding module and an audio focus management module.
[0084] In an embodiment of the present application, the audio stream forwarding module of the PC can be used to serialize or deserialize the obtained audio stream. Wherein, serialization means that after the audio stream forwarding module receives the audio stream sent by the upper application, the audio stream can be serialized into a sound byte stream, and then sent to a second electronic device (such as an electronic device such as an in-vehicle electronic device or a tablet) via wireless fidelity (WIFI) or Bluetooth, and the sound byte stream is played through the speaker of the second electronic device. Deserialization means that after the audio stream forwarding module obtains the sound byte stream from the second electronic device (such as an electronic device such as an in-vehicle electronic device or a tablet), it can be deserialized into an audio stream, and then the deserialized audio stream is sent to the upper application.
[0085] In an embodiment of the present application, the PC's audio focus management module can be used to monitor a registry and obtain the current state of the MIC recorded in the registry, then generate a corresponding MIC control instruction based on the current state of the MIC, and then send the MIC control instruction to the second electronic device. Specifically, if the MIC is in an activated state, a MIC occupation instruction is sent to the second electronic device to cause the second electronic device to occupy the MIC pickup focus; if the MIC is in an inactivated state, a MIC release instruction is sent to the second electronic device to cause the second electronic device to release the MIC pickup focus. In some embodiments, the MIC control instruction can carry control data, such as call status.
[0086] In an embodiment of the present application, the registry can be used to record the activation status of the MIC; the PC manager can monitor the registry and send MIC control instructions to the vehicle-mounted electronic device based on the information recorded in the registry.
[0087] In an embodiment of the present application, the speaker driver module of the PC can be used to drive the speaker to play the audio stream.
[0088] In the embodiment of the present application, the MIC driver module of the PC can be used to drive the MIC to pick up sound.
[0089] In an embodiment of the present application, the in-vehicle electronic device may include a collaborative assistant, a speaker driver module, a MIC driver module, an audio framework, a speaker and a MIC; the collaborative assistant can be used to release or occupy the MIC audio focus of the in-vehicle electronic device according to the MIC control instruction sent by the PC manager, such as releasing or occupying the MIC pickup focus; as shown in Figure 7, the collaborative assistant includes an audio stream forwarding module and an audio focus management module.
[0090] In an embodiment of the present application, the audio stream forwarding module of the vehicle-mounted electronic device can be used to send the audio stream acquired via Wi-Fi or Bluetooth to the speaker driver module, so as to drive the speaker to produce sound through the speaker driver module; it can also send the audio stream acquired by the MIC to the PC manager; and it can also perform serialization processing on the acquired audio stream. Serialization means that after the MIC acquires the audio stream, it performs serialization processing on the audio stream to obtain a sound byte stream, and then sends the sound byte stream to the PC manager via Wi-Fi or Bluetooth.
[0091] In an embodiment of the present application, the audio focus management module of the in-vehicle electronic device can be used to control the MIC driver module to occupy or release the MIC pickup focus according to the MIC control instruction sent by the PC manager. Specifically, if the audio focus management module receives the MIC occupation instruction, it controls the MIC driver module to occupy the MIC pickup focus to activate the MIC to start picking up sound; if the audio focus management module receives the MIC release instruction, it controls the MIC driver module to release the MIC pickup focus. The audio focus management module can send the MIC control instruction to the audio framework, and the audio framework distributes the MIC control instruction to the MIC driver module.
[0092] In the embodiment of the present application, the speaker driver module of the vehicle-mounted electronic device can be used to drive the speaker to play the audio stream. The MIC driver module can be used to drive the MIC to pick up sound.
[0093] In an embodiment of the present application, the audio framework of the in-vehicle electronic device can be used to receive the MIC control instructions sent by the audio focus management module of the collaborative assistant and distribute the MIC control instructions to the MIC driver module.
[0094] The following is a brief introduction to the interaction process between the PC and the in-vehicle electronic equipment.
[0095] In some embodiments, as shown in FIG5 , the PC manager can monitor changes in the registry, and when it monitors changes in the status of the MIC in the registry, obtain the list of applications registered to use the MIC in the registry, and traverse the list of applications registered to use the MIC to query whether there is an application using the MIC in the list of applications registered to use the MIC. If the judgment result is yes, it is determined that the current state of the PC's MIC is activated; the PC manager sends a MIC occupation instruction to the collaborative assistant of the in-vehicle electronic device via Bluetooth or WIFI. The collaborative assistant of the in-vehicle electronic device controls the MIC pickup of the in-vehicle electronic device according to the MIC occupation instruction, and sends the collected audio stream to the PC manager via Bluetooth or WIFI. The PC manager then sends the collected audio stream to the remote client. In some embodiments, the MIC control instruction can carry control data, such as call status.
[0096] If the judgment result is no, it is determined that the current state of the PC's MIC is inactive. The PC manager then sends a MIC release command to the collaborative assistant of the in-vehicle electronic device via Bluetooth or Wi-Fi. The collaborative assistant of the in-vehicle electronic device controls the MIC of the in-vehicle electronic device to stop sending the collected audio stream to the PC manager according to the MIC release command.
[0097] It will be appreciated that in some embodiments, the registry includes a list of applications using the MIC. The list of applications using the MIC is used to record the applications in the PC that use the MIC and the real-time status of each application using the MIC. For example, if an application is currently using the MIC, the PC may determine that the current MIC status is active; if no application is currently using the MIC, the PC may determine that the current MIC status is inactive.
[0098] It is understood that when the real-time status of an application using the MIC on the PC changes, the PC will be able to detect a change in the current status of the MIC in the registry. For example, when the PC changes from having no applications using the MIC to having one, such as when a video application begins using the MIC, the status of the MIC in the application list changes from inactive to active, i.e., the status of the MIC in the registry changes.
[0099] In some embodiments, when a change in the current state of the MIC in the registry is detected, such as when a video application for communicating with a remote client activates the MIC, a list of applications using the MIC is obtained and the list of applications using the MIC is traversed to query whether any application has activated the MIC.
[0100] In some embodiments, before detecting a change in the current state of the PC's MIC, the initial state of the PC's MIC can also be obtained. If the initial state of the PC's MIC is an activated state, a MIC occupation instruction is sent to the on-board electronic device; if the initial state of the PC's MIC is an inactivated state, a MIC release instruction is sent to the on-board electronic device.
[0101] In some embodiments, when the PC receives an instruction from the user to select the in-vehicle electronic device to make a sound, for example, when the user enters an instruction on the PC screen to instruct the in-vehicle electronic device to play the audio stream to be played, the PC can mute the PC's speaker and send the audio stream to be played to the in-vehicle electronic device so that the sound is made through the speaker of the in-vehicle electronic device and the sound is picked up by the MIC of the in-vehicle electronic device.
[0102] The following takes the first electronic device as a PC, the second electronic device as a vehicle-mounted electronic device, and the sound pickup unit as a MIC as an example to describe in detail the audio control method provided in the embodiment of the present application. FIG8 shows an interactive schematic diagram of an audio control method according to the embodiment of the present application, and the audio control method includes:
[0103] 801: The PC monitors the MIC status.
[0104] In an embodiment of the present application, after the PC establishes a connection with the in-vehicle electronic device, the PC can monitor the registry through the audio focus management module in the PC manager to obtain the status of the PC's MIC, wherein the registry records the usage status of the MIC.
[0105] Specifically, the audio focus management module may call the interface for opening a specified registry (RegOpenKeyEx) to open the MIC key in the registry, and then call the interface for monitoring registry key changes (RegNotifyChangeKeyValue) to subscribe to notifications of changes in the MIC activation state. The audio focus management module may need to use the path information of the parameter MIC when calling the interface for opening a specified registry (RegOpenKeyEx). The path information may be:
[0106] "\\SOFTWARE\\MICrosoft\\Windows\\CurrentVersion\\CapabilityAccessManager\\ConsentStore\\MICrophone."
[0107] It can be understood that when the MIC status is activated, it means that the application that activates the MIC needs to occupy the MIC pickup focus of the vehicle-mounted electronic device to collect the audio stream through the MIC of the vehicle-mounted electronic device; when the MIC status is inactive, it means that it does not need to occupy the MIC pickup focus, that is, the MIC of the vehicle-mounted electronic device is not needed to collect the audio stream.
[0108] 802: When the PC receives the MIC status change notification, it obtains a list of applications using the MIC.
[0109] In an embodiment of the present application, the audio focus management module of the PC manager in the PC can call the registry to obtain the key (Registry::GetKeys) interface to obtain a list of applications that use the MIC.
[0110] It can be understood that when an application on the PC, such as a video application, activates the MIC, the MIC status recorded in the registry is activated; when an application on the PC, such as a video application, deactivates the MIC, the MIC status recorded in the registry is inactivated. Because PC Manager monitors the registry in real time, when the MIC status recorded in the registry changes from activated to inactivated or from inactivated to activated, the audio focus management module in PC Manager will receive the MIC status change notification sent by the registry.
[0111] 803: The PC traverses the list of applications registered to use the MIC.
[0112] 804: The PC determines whether there is an application using the MIC in the list of applications registered to use the MIC.
[0113] If the judgment result is yes, the process goes to 805 , where the PC sends a MIC occupation instruction to the onboard electronic device; if the judgment result is no, the process goes to 812 , where the PC sends a MIC release instruction to the onboard electronic device.
[0114] In an embodiment of the present application, the audio focus management module in the PC manager can traverse the application list registered to use the MIC, call the registry get value (Registry::GetValue) interface to query whether there is an application in the application list using the MIC, and when there is an application in the application list using the MIC, determine that the current state of the MIC is an activated state; when no application in the application list uses the MIC, determine that the current state of the MIC is an inactivated state, and then generate a corresponding MIC control instruction according to the current activation state of the MIC, wherein the MIC control instruction includes a MIC occupation instruction or a MIC release instruction.
[0115] 805: The PC sends a MIC occupation instruction to the vehicle-mounted electronic device.
[0116] It can be understood that in the embodiment of the present application, when there is an application in the application list that uses the MIC, it is determined that the current state of the MIC is the activated state, and the PC sends a MIC occupation instruction to the vehicle-mounted electronic device, thereby realizing sound pickup through the MIC of the vehicle-mounted electronic device, that is, realizing the PC's occupation of the MIC of the vehicle-mounted electronic device.
[0117] In the embodiment of the present application, the in-vehicle electronic device will keep the MIC in an occupied state for picking up sound before receiving the MIC release instruction, and when the in-vehicle electronic device obtains the audio stream data, it will send the audio stream data to the PC.
[0118] 806: The vehicle-mounted electronic equipment controls the MIC to pick up sound.
[0119] 807: The in-vehicle electronic device sends audio stream data to the PC.
[0120] It can be understood that after the collaborative assistant of the in-vehicle electronic device receives the MIC occupation instruction, it can control the MIC to start picking up sound to obtain audio stream data, and serialize the collected audio stream to obtain a sound byte stream, and then send the serialized sound byte stream to the PC manager of the PC via WIFI or Bluetooth.
[0121] In an embodiment of the present application, when the PC manager of the PC receives the collected audio stream sent by the in-vehicle electronic device, the audio stream forwarding module of the PC manager can deserialize the received collected audio stream and then send the deserialized audio stream to the upper-layer application.
[0122] 808: PC mutes the PC's speakers.
[0123] In some embodiments, when the PC receives an instruction from the user to select collaborative sounding, for example, when the user enters an instruction on the PC screen to instruct the in-vehicle electronic device to play the audio stream to be played, the PC can mute the PC's speakers and send the audio stream to be played to the in-vehicle electronic device so that the audio stream to be played is played through the speakers of the in-vehicle electronic device.
[0124] It can be understood that in the embodiment of the present application, after the PC receives the user's instruction to select collaborative sound, the same terminal, that is, the in-vehicle electronic device, is used to play the audio stream and collect the audio stream, thereby avoiding the problem of echo in the process of collecting the audio stream.
[0125] 809: The PC obtains the audio stream to be played.
[0126] In an embodiment of the present application, when the PC manager of the PC obtains the audio stream to be played, the audio stream to be played can be serialized into a sound byte stream through the audio stream forwarding module of the PC manager.
[0127] It is understandable that the audio stream to be played may be an audio stream obtained by the application that activates the MIC, such as call data, music, etc. sent by a remote device.
[0128] 810: The PC sends the audio stream to be played to the in-vehicle electronic device.
[0129] In an embodiment of the present application, the PC can send the serialized audio stream to be played to the collaborative assistant of the vehicle-mounted electronic device via WIFI or Bluetooth, so that the serialized audio stream to be played is played through the speaker of the vehicle-mounted electronic device and the sound is picked up through the MIC of the vehicle-mounted electronic device.
[0130] 811: The in-vehicle electronic device controls the speaker to play the audio stream to be played.
[0131] In an embodiment of the present application, after the collaborative assistant of the in-vehicle electronic device receives the serialized audio stream to be played, the audio stream to be played can be sent to the speaker driving module through the audio stream forwarding module of the collaborative assistant, so as to drive the speaker to play the audio stream to be played through the speaker driving module.
[0132] 812: The PC sends a MIC release instruction to the onboard electronic device.
[0133] In an embodiment of the present application, when the PC determines that there is no application using the MIC in the list of applications registered to use the MIC, the PC can send a MIC release instruction to the vehicle-mounted electronic device via WIFI or Bluetooth to release the PC's occupation of the MIC of the vehicle-mounted electronic device, so that the vehicle-mounted electronic device's own applications or applications of other electronic devices can use the MIC of the vehicle-mounted electronic device.
[0134] 813: The in-vehicle electronic device stops sending audio stream data to the PC, releasing the PC's use of the MIC.
[0135] In an embodiment of the present application, when the collaborative assistant of the in-vehicle electronic device receives a MIC release instruction, the MIC pickup focus can be released. At this time, the PC stops occupying the MIC of the in-vehicle electronic device. For example, the in-vehicle electronic device stops sending audio stream data to the PC, and the in-vehicle electronic device allows other applications of its own or other applications that collaborate with the in-vehicle electronic device to occupy the MIC.
[0136] In an embodiment of the present application, by real-time monitoring of the current state of the PC's MIC, the occupancy state of the MIC of the on-board electronic device is controlled in real time according to the current state of the PC's MIC, thereby avoiding the problem that during the collaboration between the PC and the on-board electronic device, the PC application occupies the MIC of the on-board electronic device for a long time, thereby affecting the use of the MIC by the on-board electronic device's own application. This ensures that when the PC application does not need to use the MIC of the on-board electronic device, the on-board electronic device's own application uses the MIC of the on-board electronic device.
[0137] The following describes another audio control method provided by an embodiment of the present application. Unlike FIG8 , FIG9 shows a detailed process in which the first electronic device obtains the MIC activation status according to the registration table in the audio control method. As shown in FIG9 , the audio control method includes:
[0138] 901: Open the MIC registry key.
[0139] In some embodiments, the audio focus management module in the PC manager can call the RegOpenKeyEx interface to open the MIC key in the registry. When calling the RegOpenKeyEx interface, the path information of the parameter MIC is required. The path information can be:
[0140] "\\SOFTWARE\\MICrosoft\\Windows\\CurrentVersion\\CapabilityAccessManager\\ConsentStore\\MICrophone."
[0141] 902: Subscribe to MIC status change notifications.
[0142] In some embodiments, the audio focus management module in the PC manager can call the RegNotifyChangeKeyValue interface to subscribe to the MIC status change notification, and obtain the MIC status change information when the MIC status changes.
[0143] 903: Query the current status of the MIC for the first time.
[0144] It can be understood that in the embodiment of the present application, after the PC manager is opened, the current status of the MIC can be queried first, and steps 904-908 can be executed to send corresponding MIC control instructions to the vehicle-mounted electronic equipment in a timely manner.
[0145] 904: Traverse the list of applications registered to use MIC.
[0146] It can be understood that traversing the list of applications registered to use the MIC may be sequentially querying the MIC usage status of each application in the list of applications registered to use the MIC.
[0147] 905: Determine whether the traversal is completed.
[0148] In the embodiment of the present application, if the judgment result is yes, the process goes to 906 to determine whether there is an application using MIC; if the judgment result is no, the process goes to 904 to continue traversing.
[0149] 906: Determine whether there is an application using MIC.
[0150] In the embodiment of the present application, if the judgment result is yes, the process goes to 907 and sends a MIC occupation instruction to the on-board electronic device; if the judgment result is no, the process goes to 908 and sends a MIC release instruction to the on-board electronic device.
[0151] In some embodiments, the audio focus management module can call the registry get value (Registry::GetValue) interface to query whether there is an application using the MIC in the application list using the MIC. If the judgment result is yes, a MIC occupation instruction is sent to the vehicle-mounted electronic device; if the judgment result is no, a MIC release instruction is sent to the vehicle-mounted electronic device.
[0152] 907: Sending a MIC occupation instruction to the vehicle-mounted electronic device.
[0153] In some embodiments, the MIC occupation instruction may enable the in-vehicle electronic device to control the MIC to pick up sound to obtain audio stream data, and send the obtained audio stream data to the PC.
[0154] 908: Sending a MIC release instruction to the onboard electronic device.
[0155] In some embodiments, the MIC release instruction can be used to release the PC's occupation of the MIC of the in-vehicle electronic device. For example, when the in-vehicle electronic device receives the MIC release instruction, the in-vehicle electronic device stops sending audio stream data to the PC and controls the MIC to receive occupation by other applications.
[0156] It is understood that in the embodiment of the present application, after the current state of the MIC is first queried and the MIC control instruction is sent to the on-board electronic device, if a notification of a change in the current state of the MIC is received, steps 909-910 and steps 904-908 may be executed to determine the control instruction to be sent to the on-board electronic device, as shown below:
[0157] 909: Received MIC status change notification.
[0158] It can be understood that in an embodiment of the present application, after the MIC status is queried for the first time and the MIC control instruction is sent to the on-board electronic device, if the MIC status change notification is received again, steps 910, 904-908 can be executed to determine the MIC control instruction sent to the on-board electronic device.
[0159] 910: Obtain a list of applications using MIC.
[0160] In some embodiments, the audio focus management module can call the Registry::GetKeys interface to obtain a list of applications using the MIC. After obtaining the list of applications using the MIC, steps 904-908 can be executed to determine the control instructions to be sent to the in-vehicle electronic device. Steps 904-908 are as described above and will not be repeated here.
[0161] It can be understood that the above-mentioned opening of the specified registry (RegOpenKeyEx), monitoring of registry key changes (RegNotifyChangeKeyValue), obtaining the registry key (Registry::GetKeys), and obtaining the registry value (Registry::GetValue) are Windows software development kit (SDK) interfaces used to obtain the MIC activation status.
[0162] The embodiment of the present application uses an on-board electronic device to play audio streams and collect audio streams, avoiding the problem of echo in the process of collecting audio streams, and by real-time monitoring the current state of the PC's MIC, it is possible to control the occupancy state of the on-board electronic device's MIC in real time according to the current state of the PC's MIC, thereby avoiding the problem that during the collaborative process between the PC and the on-board electronic device, the PC application occupies the on-board electronic device's MIC for a long time, affecting the use of the MIC by the on-board electronic device's own application, and ensuring that when the PC application does not need to use the on-board electronic device's MIC, the on-board electronic device's own application uses the on-board electronic device's MIC.
[0163] The audio control method provided by the embodiment of the present application is described in detail below in conjunction with the software structure of the PC and the vehicle-mounted electronic device. Among them, Figures 10a and 10b show an interactive schematic diagram of an audio control method of the embodiment of the present application. The difference from the audio control method shown in Figures 8 and 9 is that the audio control method can be executed by the various modules in the PC and vehicle-mounted electronic device mentioned in Figures 5, 6, and 7 above. The audio control method can include a PC-vehicle-mounted electronic device collaborative initialization stage, a vehicle-mounted electronic device generation stage, a vehicle-mounted electronic device pickup stage, and a MIC audio focus release stage. The above four stages are introduced below respectively.
[0164] First, the process of the PC-vehicle electronic equipment collaborative initialization phase is introduced. As shown in Figure 10a, the initialization phase includes:
[0165] 1001: The user opens PC Manager.
[0166] In some embodiments, after the PC manager is opened, a collaborative connection with the in-vehicle electronic device can be initiated, and the collaborative assistant of the in-vehicle electronic device will start running.
[0167] 1002: The speaker driver module of the PC subscribes to the audio stream from the audio stream forwarding module of the PC manager.
[0168] 1003: The audio focus management module of PC Manager queries the registry for the MIC entry.
[0169] It can be understood that the manner in which the audio focus management module of the PC manager queries the registry for the MIC entry is as described in step 804 of the embodiment shown in FIG8 , and will not be described in detail here.
[0170] 1004: The registry returns the MIC inactive status to the audio focus management module of PC Manager.
[0171] 1005: The audio focus management module of the PC manager sends a MIC release instruction to the audio focus management module of the collaborative assistant.
[0172] It can be understood that if the MIC is in an activated state, the audio focus management module of the PC butler can send a MIC activation instruction to the audio focus management module of the collaborative assistant. After receiving the MIC activation instruction, the audio focus management module of the collaborative assistant starts to occupy the MIC of the on-board electronic device to pick up sound, and sends audio stream data to the PC; if the MIC is in an inactivated state, the audio focus management module of the PC butler can send a MIC release instruction to the audio focus management module of the collaborative assistant. After receiving the MIC release instruction, the audio focus management module of the collaborative assistant releases the PC's occupation of the MIC pickup focus of the on-board electronic device. For example, the on-board electronic device can be controlled to stop sending audio stream data to the PC, and allow other applications to occupy the MIC of the on-board electronic device.
[0173] 1006: The audio focus management module of the collaborative assistant sends a MIC release instruction to the audio framework.
[0174] 1007: The audio focus management module of PC Manager subscribes to the MIC status change notification from the registry.
[0175] It can be understood that the manner in which the audio focus management module of the PC manager subscribes to the MIC status change notification is as described in step 801 of the embodiment shown in FIG8 , and will not be described in detail here.
[0176] In an embodiment of the present application, the audio focus of the PC is managed by subscribing to the status of the MIC in the Windows registry, which solves the problem that the PC with the Windows operating system cannot manage the audio focus. It is realized that the occupation and release of the MIC pickup focus of the vehicle-mounted electronic device is controlled according to the changes of the MIC table item in the registry, and the MIC pickup focus of the vehicle-mounted electronic device is occupied as needed.
[0177] The following describes the process of the car computer making sounds. As shown in Figure 10a, the process of the car electronic equipment making sounds includes:
[0178] 1008: The remote application initiates a call to the upper-layer application.
[0179] It is understood that the remote application can be an application that remotely communicates with the upper-layer application of the PC, such as a call application, an audio application, a video application, etc. For example, a remote call application initiates a call to a call application on the PC. When the user selects to answer the call on the call application interface of the PC, the call application activates the PC's speakers and microphone to play the voice sent by the remote call application through the PC's speakers and pick up the voice through the PC's microphone.
[0180] 1009: The user sends a user answer instruction to the upper-layer application.
[0181] 1010: The upper layer application activates the PC's speaker.
[0182] 1011: The upper-layer application activates the PC's MIC.
[0183] 1012: The registry sends a notification of receiving a MIC status change to the audio focus management module of PC Manager.
[0184] It can be understood that when an application in the PC (such as a call application) activates the MIC, the MIC status recorded in the registry will change. Since the audio focus management module of the PC manager monitors the registry in real time, the audio focus management module in the PC manager will receive notification of the MIC status change.
[0185] 1013: The audio focus management module of PC Manager traverses the list of applications using MIC.
[0186] It can be understood that the manner in which the audio focus management module of PC Manager traverses the application list using MIC is as described in step 803 of the embodiment shown in FIG8 , and will not be described in detail here.
[0187] 1014: When the MIC is activated, the audio focus management module of the PC manager sends a MIC occupation instruction to the audio focus management module of the collaborative assistant.
[0188] 1015: The audio focus management module of the collaborative assistant applies to the audio framework for occupying the MIC pickup focus of the in-vehicle electronic device.
[0189] 1016: The audio framework sends an on-vehicle electronic device MIC occupation instruction to the MIC driver module of the on-vehicle electronic device.
[0190] 1017: The remote application sends voice to the upper-layer application.
[0191] 1018: The upper-layer application sends voice to the speaker driver module of the PC.
[0192] 1019: The user selects the vehicle electronic device to make a sound.
[0193] In some embodiments, the user can select the "make the vehicle electronic device sound" option in the hands-free option of the PC screen, such as the call application interface, to activate the speaker of the vehicle electronic device to make the sound.
[0194] 1020: The audio stream forwarding module of the PC manager sends a command to mute the PC's speakers to the PC's speaker driver module.
[0195] In some embodiments, when the user selects the in-vehicle electronic device to make sound, the audio stream forwarding module of PC Manager can mute the PC's speakers to avoid collecting echoes during the process of the in-vehicle electronic device's MIC collecting the audio stream, thereby improving the quality of the collected audio stream.
[0196] In some embodiments, the audio stream forwarding module of the PC manager may mute the speakers of the PC by sending a mute instruction to the speaker driving module of the PC.
[0197] 1021: The speaker driver module of the PC distributes the audio stream to the audio stream management module of the PC manager.
[0198] In some embodiments, the audio stream forwarding module of the PC manager can serialize the audio stream into a sound byte stream, and then send the serialized audio stream to the audio stream forwarding module of the collaborative assistant via WIFI or Bluetooth.
[0199] 1022: The audio stream forwarding module of the PC manager sends the audio stream to the audio stream forwarding module of the collaborative assistant.
[0200] 1023: The audio stream forwarding module of the collaborative assistant sends a voice instruction to the speaker driving module of the in-vehicle electronic device.
[0201] It can be understood that after receiving the sound generation instruction, the speaker driving module of the vehicle-mounted electronic device can drive the speaker to generate sound.
[0202] The following describes the process of sound pickup by the vehicle-mounted electronic device. As shown in FIG10b , the process of sound pickup by the vehicle-mounted electronic device includes:
[0203] 1024: The MIC driver module of the in-vehicle electronic device sends the collected audio stream to the audio stream forwarding module of the collaborative assistant.
[0204] 1025: The audio stream forwarding module of the collaborative assistant sends the audio stream to the audio stream forwarding module of the PC manager.
[0205] In some embodiments, the audio stream forwarding module of the collaborative assistant serializes the collected audio stream to obtain a sound byte stream, and then sends the serialized sound byte stream to the PC manager of the mobile terminal via WIFI or Bluetooth.
[0206] 1026: The audio stream forwarding module of the PC manager sends the audio stream to the MIC driver module of the PC.
[0207] In an embodiment of the present application, after the PC manager receives the audio stream, the audio stream forwarding module of the PC manager can deserialize the received collected audio stream, and then send the deserialized audio stream to the MIC driver module of the PC.
[0208] 1027: The PC's MIC driver module sends the audio stream to the upper-layer application.
[0209] 1028: The upper-layer application on the PC sends an audio stream to the remote application.
[0210] The following describes the process of releasing the MIC pickup focus. As shown in FIG10b , the process of releasing the MIC pickup focus includes:
[0211] 1029: The user ends the call.
[0212] It can be understood that when the PC call ends, the MIC table entry in the PC registry changes, and the PC manager will receive a notification. Then the audio focus management module of the PC manager can obtain that the current MIC is in an inactive state, and then send a MIC release instruction to the on-board electronic device. After receiving the MIC release instruction, the collaborative assistant releases the MIC pickup focus of the on-board electronic device.
[0213] 1030: The upper layer application deactivates the PC's speakers.
[0214] 1031: The upper-layer application deactivates the PC's MIC.
[0215] 1032: The registry sends a notification of receiving a MIC status change to the audio focus management module of PC Manager.
[0216] 1033: The audio focus management module of PC Manager traverses the list of applications using MIC.
[0217] It can be understood that the manner in which the audio focus management module of PC Manager traverses the application list using MIC is as described in step 803 of the embodiment shown in FIG8 , and will not be described in detail here.
[0218] 1034: When the MIC is in an inactive state, the audio focus management module of the PC manager sends a MIC release instruction to the audio focus management module of the collaborative assistant.
[0219] 1035: The audio focus management module of the collaborative assistant sends a vehicle-mounted electronic device MIC release instruction to the audio framework.
[0220] In an embodiment of the present application, when the collaborative assistant of the in-vehicle electronic device receives a MIC release instruction, the MIC pickup focus can be released. At this time, the PC stops occupying the MIC of the in-vehicle electronic device. For example, the in-vehicle electronic device stops sending audio stream data to the PC, and the in-vehicle electronic device allows other applications of its own or other applications that collaborate with the in-vehicle electronic device to occupy the MIC.
[0221] In this embodiment, PC applications can enable in-vehicle electronic devices to collaborate on sound generation and pickup without requiring any modifications, achieving end-to-end collaborative sound generation and pickup between the PC and in-vehicle electronic devices. When the PC call is terminated, the in-vehicle electronic device's own applications can use the in-vehicle electronic device's MIC. While the PC call is ongoing, the in-vehicle electronic device's MIC is used for audio pickup, resolving the issue of persistent audio focus occupation of the in-vehicle electronic device's MIC.
[0222] In summary, in the embodiments of the present application, by real-time monitoring of the current status of the PC's MIC, the occupancy status of the MIC of the vehicle-mounted electronic device is controlled in real time according to the current status of the PC's MIC, thereby avoiding the problem that during the collaborative process between the PC and the vehicle-mounted electronic device, the PC application occupies the MIC of the vehicle-mounted electronic device for a long time, affecting the use of the MIC by the vehicle-mounted electronic device's own application, and ensuring that when the PC application does not need to use the MIC of the vehicle-mounted electronic device, the vehicle-mounted electronic device's own application uses the MIC of the vehicle-mounted electronic device.
[0223] In the accompanying drawings, some structural or method features may be shown in a particular arrangement and / or order. However, it should be understood that such a particular arrangement and / or order may not be required. Rather, in some embodiments, these features may be arranged in a manner and / or order different from that shown in the illustrative drawings. In addition, the inclusion of a structural or method feature in a particular figure does not imply that such feature is required in all embodiments, and in some embodiments, such features may not be included or may be combined with other features.
[0224] It should be noted that the units / modules mentioned in the various device embodiments of the present application are all logical units / modules. Physically, a logical unit / module can be a physical unit / module, or a part of a physical unit / module, or can be implemented as a combination of multiple physical units / modules. The physical implementation of these logical units / modules themselves is not the most important. The combination of functions implemented by these logical units / modules is the key to solving the technical problems raised by this application. In addition, in order to highlight the innovative part of this application, the above-mentioned device embodiments of this application do not introduce units / modules that are not closely related to solving the technical problems raised by this application. This does not mean that other units / modules do not exist in the above-mentioned device embodiments.
[0225] It should be noted that in the examples and description of this patent, relational terms such as first and second, etc. are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device that includes a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "including a" does not exclude the presence of other identical elements in the process, method, article or device that includes the element.
[0226] While the present application has been shown and described with reference to certain preferred embodiments thereof, it will be understood by those skilled in the art that various changes in form and details may be made therein without departing from the scope of the present application.
Claims
1. An audio control method, characterized in that: The method comprises: The first sound pickup unit of the first electronic device is in an activated state, and the first electronic device collects audio data through the second sound pickup unit of the second electronic device; When the first electronic device detects that the first sound pickup unit is switched from an activated state to an inactivated state, the first electronic device stops collecting audio data through the second sound pickup unit of the second electronic device.
2. The audio control method according to claim 1, characterized in that: The first electronic device detects that the first sound pickup unit is converted from an activated state to an inactivated state, including: The first electronic device receives a notification of a state change of the first sound pickup unit; The first electronic device determines whether there is an application using the first pickup unit; When the first electronic device determines that no application uses the first sound pickup unit, the first sound pickup unit is determined to be switched from an activated state to an inactivated state.
3. The audio control method according to claim 2, characterized in that: The first electronic device determines whether there is an application using the first sound pickup unit, including: The first electronic device obtains a list of applications registered to use the first sound pickup unit; The first electronic device determines whether there is an application in the application list that uses the first sound pickup unit.
4. The audio control method according to any one of claims 1 to 3, characterized in that: The first electronic device stops collecting audio data through the second sound pickup unit of the second electronic device, including: The first electronic device sends a sound pickup unit release instruction to the second electronic device; The second sound pickup unit stops collecting audio data based on the sound pickup unit release instruction.
5. The audio control method according to any one of claims 1 to 4, characterized in that: The method further comprises: The first electronic device detects that the first sound pickup unit is switched from an inactive state to an active state, and the first electronic device collects audio data through the second sound pickup unit of the second electronic device.
6. The audio control method according to claim 5, characterized in that: The first electronic device collects audio data through a second sound pickup unit of the second electronic device, including: The first electronic device sends a sound pickup unit occupation instruction to the second electronic device; The second sound pickup unit collects audio data based on the sound pickup unit occupation instruction.
7. The audio control method according to any one of claims 1 to 6, characterized in that: The method further comprises: The first electronic device detects an instruction by a user to select a second playback unit of the second electronic device to play audio data, and mutes the first playback unit of the first electronic device; The first electronic device plays audio data through the second playing unit.
8. The audio control method according to any one of claims 1 to 7, characterized in that: The method further comprises: After the first application of the first electronic device is started, the first application obtains the initial state of the first sound pickup unit; The first application detects that the initial state is an inactive state, and the first electronic device stops collecting audio data through the second sound pickup unit of the second electronic device.
9. The audio control method according to any one of claims 1 to 8, characterized in that: The operating system of the first electronic device is a Windows operating system.
10. The audio control method according to any one of claims 1 to 9, characterized in that: The second electronic device is a vehicle-mounted electronic device.
11. An electronic device, characterized in that: The device comprises: a memory for storing instructions executed by one or more processors of the electronic device, and the processor, which is one of the one or more processors of the electronic device, for executing the audio control method according to any one of claims 1 to 10.
12. A readable medium, characterized in that The readable medium stores instructions, which, when executed on an electronic device, enable the electronic device to execute the audio control method according to any one of claims 1 to 10.
Citation Information
Patent Citations
Audio control method, equipment and medium
CN118626038A
Device calling method and device, interaction system, electronic equipment and storage medium
CN112181344A
Call method and related equipment
CN113612957A
Control method and system for automatically switching microphones, electronic equipment and storage medium
CN114400003A
Audio focus control method and related device
CN115407961A
