Audio processing method and device, electronic equipment and storage medium
By listening to audio events, the system automatically sets and adjusts the device's audio mode, solving the intelligence issue of wireless headphones when switching between multiple devices and improving the user experience and the intelligence of audio switching between devices.
Patent Information
- Application Number
- CN202311403307.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-10-26
- Publication Date
- 2026-08-25
- Estimated Expiration
- 2043-10-26
AI Technical Summary
In scenarios where wireless headphones switch between multiple devices, how can we reduce user operations and improve the intelligence of audio switching?
By listening to audio events, the system automatically sets and adjusts the device's audio mode, including identifying the target audio playback device, establishing a connection, disconnecting the existing connection, and adjusting the audio mode to meet the audio playback needs of different scenarios.
It reduces manual operation by users during wireless headphone switching, improves intelligence and user experience, and meets audio playback needs in various scenarios.
Smart Images

Figure CN119907139B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of audio processing technology, and in particular to an audio processing method, apparatus, electronic device and storage medium. Background Technology
[0002] For multiple devices that support the same account, the same wireless headset can be connected, allowing the headset to switch between multiple devices that support the same account. However, in scenarios where the wireless headset switches between multiple devices, how to adjust the audio mode of each device to reduce user operations and improve the intelligence of audio switching is a technical problem that urgently needs to be solved. Summary of the Invention
[0003] This application aims to at least partially address one of the technical problems in the related art.
[0004] Therefore, this application proposes an audio processing method, apparatus, electronic device, and storage medium that, when a target audio playback device capable of audio switching is determined to exist, automatically sets and adjusts the audio mode of the device based on monitored audio events, reducing manual operation by the user and improving intelligence and user experience.
[0005] One embodiment of this application proposes an audio processing method applied to a first terminal device, comprising:
[0006] In response to the detection of an audio event, it is determined whether there is a target audio playback device to be connected, wherein the target audio playback device has established a connection with a second terminal device, and the second terminal device has the same account information as the first terminal device;
[0007] In response to the existence of a target audio playback device to be connected, the first audio mode corresponding to the first terminal device is set according to the monitored audio events;
[0008] Establish a connection with the target audio playback device, and disconnect the connection between the target audio playback device and the second terminal device;
[0009] The first audio mode of the first terminal device is adjusted to the second audio state, and the audio of the target audio event is sent to the target audio playback device.
[0010] One embodiment of this application proposes an audio processing method applied to a second terminal device, comprising:
[0011] In response to the first information broadcast by the first terminal device, it is determined whether the currently playing audio is in a playback state; wherein, the first information is used to instruct the target audio playback device connected to the second terminal device to establish a connection with the first terminal device, and the second terminal device and the first terminal device have the same account information; wherein, the first information is broadcast by the first terminal device in response to the listening of an audio event, determining whether there is a target audio playback device to be connected, and in response to the existence of a target audio playback device to be connected, setting the first terminal device to a first audio mode according to the listened audio event, proposing a connection with the target audio playback device, disconnecting the connection between the target audio playback device and the second terminal device, adjusting the first audio mode of the first terminal device to a second audio mode, and sending the audio of the target audio event to the target audio playback device;
[0012] In response to the current audio being played in earpiece playback mode, the second terminal device is controlled to switch from earpiece playback mode to silent playback mode.
[0013] Another embodiment of this application proposes an audio mode processing apparatus, applied to a first terminal device, comprising:
[0014] The determination module is used to determine whether there is a target audio playback device to be connected in response to the detection of an audio event, wherein the target audio playback device has established a connection with a second terminal device, and the second terminal device has the same account information as the first terminal device;
[0015] The setting module is used to respond to the presence of a target audio playback device to be connected, and to set the first audio mode corresponding to the first terminal device according to the monitored audio events;
[0016] The module is used to establish a connection with the target audio playback device and to disconnect the connection between the target audio playback device and the second terminal device.
[0017] The adjustment module is used to adjust the first audio mode of the first terminal device to the second audio mode and send the audio of the target audio event to the target audio playback device.
[0018] Another embodiment of this application proposes an audio processing apparatus for use in a second terminal device, comprising:
[0019] The determination module is used to determine whether the currently playing audio is in a playback state in response to the first information broadcast by the first terminal device; wherein, the first information is used to instruct the target audio playback device connected to the second terminal device to establish a connection with the first terminal device, and the second terminal device and the first terminal device have the same account information; wherein, the first information is broadcast by the first terminal device in response to the listening of an audio event, determining whether there is a target audio playback device to be connected, and in response to the existence of a target audio playback device to be connected, setting the first terminal device to a first audio mode according to the listened audio event, proposing a connection with the target audio playback device, disconnecting the connection between the target audio playback device and the second terminal device, adjusting the first audio mode of the first terminal device to a second audio mode, and sending the audio of the target audio event to the target audio playback device;
[0020] The adjustment module is used to control the second terminal device to switch from earpiece playback mode to silent playback mode in response to the current audio being in earpiece playback mode.
[0021] Another embodiment of this application provides an electronic device including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, it implements the method described in one aspect above or the method described in another aspect above.
[0022] Another embodiment of this application proposes a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the method described in one aspect above or the method described in another aspect above.
[0023] Another embodiment of this application proposes a computer program product having a computer program stored thereon, which, when executed by a processor, implements the method described in one aspect above or the method described in the other aspect above.
[0024] The audio processing method, apparatus, electronic device, and storage medium proposed in this application, in response to the detection of an audio event, determine whether a target audio playback device to be connected exists. The target audio playback device is connected to a second terminal device, and the second terminal device has the same account information as the first terminal device. In response to determining the existence of a target audio playback device, based on the detected audio event, the method sets a first audio mode for the first terminal device, establishes a connection with the target audio playback device, disconnects the connection between the target audio playback device and the second terminal device, adjusts the first audio mode of the first terminal device to a second audio mode, and sends the audio of the target audio event to the target audio playback device. If a target audio playback device capable of audio switching is determined to exist, the method connects to the target audio playback device and automatically sets and adjusts the audio mode of the first terminal device based on the detected audio event to meet the user's audio playback needs in various scenarios, thereby improving intelligence and user experience.
[0025] Additional aspects and advantages of this application will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of this application. Attached Figure Description
[0026] The above and / or additional aspects and advantages of this application will become apparent and readily understood from the following description of the embodiments taken in conjunction with the accompanying drawings, wherein:
[0027] Figure 1 This is a schematic flowchart of an audio processing method provided in an embodiment of this application;
[0028] Figure 2 A flowchart illustrating another audio processing method provided in an embodiment of this application;
[0029] Figure 3 A flowchart illustrating another audio processing method provided in an embodiment of this application;
[0030] Figure 4 A flowchart illustrating an interactive audio processing method provided in an embodiment of this application;
[0031] Figure 5 This is a schematic diagram of an interactive audio processing scenario provided in an embodiment of this application;
[0032] Figure 6 This is a schematic diagram of the structure of an audio processing device provided in an embodiment of this application;
[0033] Figure 7 This is a schematic diagram of another audio processing device provided in an embodiment of this application;
[0034] Figure 8This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation
[0035] The embodiments of this application are described in detail below. Examples of these embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and intended to explain this application, and should not be construed as limiting this application.
[0036] The audio processing method, apparatus, electronic device, and storage medium according to embodiments of this application are described below with reference to the accompanying drawings.
[0037] Figure 1 This is a schematic flowchart of an audio processing method provided in an embodiment of this application.
[0038] The audio processing method in this embodiment is executed by an audio processing device, which can be located in a first terminal device. The first terminal device can be a smartphone, smartwatch, tablet, etc., and is not limited in this embodiment.
[0039] like Figure 1 As shown, the method may include the following steps:
[0040] Step 101: In response to the detection of an audio event, determine whether there is a target audio playback device to be connected.
[0041] The target audio playback device is connected to the second terminal device, and the second terminal device has the same account information as the first terminal device.
[0042] In this scenario, both the first and second terminal devices share the same account signal and information—the account information used to log in to the service platform. This means that both devices can use the same account to log in to the service platform, such as a cloud service platform, to access the corresponding services. For example, using a certain Apple device, the phone and tablet share the same account A*ID, which is the login account for cloud storage. Multiple devices with the same account information can connect to the same audio playback device, such as a Bluetooth headset.
[0043] In a real-world scenario, a user may have at least one audio playback device, and these devices may be connected to other devices under the same account. The target audio playback device to be connected, determined by the first terminal device, is one of these at least one audio playback devices. For the target audio playback device, it is connected to the second terminal device and is in a wearing state. The priority of the audio event corresponding to the first terminal device is higher than the priority of the audio currently playing on the target audio playback device, satisfying the conditions for audio switching. Therefore, the first terminal device can connect to the target audio playback device and use it to play the audio event corresponding to the target audio playback device. The second terminal device is a device that has already established a connection with the target audio playback device. The second terminal device can be a smartphone, smartwatch, tablet, laptop, projector, smart glasses, etc., and is not limited in this embodiment.
[0044] As an example, a user has two devices: a mobile phone and a tablet. The user also has a Bluetooth headset. The first terminal device is the tablet, and the second terminal device is the mobile phone. The Bluetooth headset has already established a connection with the mobile phone. Optionally, the Bluetooth headset is not playing any music, or the Bluetooth headset is playing audio from the mobile phone with a volume greater than 0.
[0045] One implementation involves determining the target audio playback device to be connected. This involves obtaining the status information of at least one audio playback device to be filtered. The audio playback devices to be filtered are pre-stored audio playback devices that can be directly connected to by each terminal device. The audio playback devices to be filtered can be connected to the first terminal device and the second terminal device. Based on the status information of each audio playback device and the priority of audio events, it is determined whether there is an audio playback device that meets the audio switching conditions. In response to the existence of an audio playback device that meets the audio switching conditions, the target audio playback device is determined from the audio playback devices that meet the audio switching conditions. In response to the absence of an audio playback device that meets the audio switching conditions, it is determined that there is no target audio playback device to be connected.
[0046] The status information of at least one audio playback device to be filtered can be determined from the current status information of at least one audio playback device stored in a set list, or by searching for broadcast information of at least one audio playback device and parsing it to obtain the current status information of at least one candidate audio playback device. The headphone status information includes the headphone wearing status, audio status, and audio focus status. The wearing status indicates whether the corresponding headphone is being worn; the audio status indicates whether the corresponding headphone is playing audio; and the audio focus status indicates which application the audio played by the corresponding headphone belongs to, thus identifying whether the audio type is a call or media type. The audio type can be used to indicate the audio priority; different types of audio have different priorities during playback.
[0047] Step 102: In response to determining that there is a target audio playback device to be connected, the first terminal device is set to the first audio mode according to the monitored audio events.
[0048] In this embodiment, the first terminal device listens to audio events. The audio events indicate the audio to be played and its type. The audio type includes voice audio and media audio. Voice audio includes voice audio from ordinary telephone calls and voice audio from third-party applications (e.g., voice calls or voice / video calls from instant messaging software). Media audio includes music, video, and live audio. When the first terminal device detects an audio event and determines that a target audio playback device exists to be connected, it can set a corresponding audio mode based on the detected audio event. The audio mode includes a first audio mode and a second audio mode, which can be the same or different. When different audio events are detected, the first audio mode and second audio mode set by the first terminal device will also be different, as will be explained later based on different audio events.
[0049] Step 103: Establish a connection with the target audio playback device and disconnect the connection between the target audio playback device and the second terminal device.
[0050] In one implementation of this application, if the first terminal device and the target audio playback device have been paired, the first terminal device can directly call the target audio playback device and establish a connection with it based on the address and pairing password of the target audio playback device. This disconnects the connection between the target audio playback device and the second terminal device, enabling the first terminal device to preemptively connect to the target audio playback device that is already connected to the second terminal device, thus achieving automatic switching of the terminal devices connected to the target audio playback device.
[0051] In the second implementation of this application, if the first terminal device and the target audio playback device have not been paired, the user can be guided through the user interface of the first terminal device to long-press the target audio playback device to enter the pairing mode, thereby completing the pairing process between the first terminal device and the target audio playback device. After pairing is completed, a connection is established between the first terminal device and the target audio playback device, and the connection between the target audio playback device and the second terminal device is disconnected. This enables the first terminal device to preemptively connect to the target audio playback device that is already connected to the second terminal device, avoiding user operation and achieving automatic switching of the terminal device connected to the target audio playback device. This achieves consistency among multiple devices and covers more scenarios.
[0052] In the third implementation of this application, if the first terminal device and the target audio playback device have not been paired, then the first terminal device is paired and connected to the target audio playback device. Specifically, based on the same account quick connection protocol, the first terminal device can identify the target audio playback device belonging to the user, that is, it can identify the target audio playback device that can be connected to by devices with the same account. Then, the pairing process between the first terminal device and the target audio playback device is completed through the quick connection protocol. There is no need to guide the user to long press the target audio playback device to enter the pairing mode, avoiding user operation. After pairing is completed, the connection is made, realizing consistency between multiple devices and covering more scenarios.
[0053] It is important to understand that the Quick Connect protocol can be custom-defined by the manufacturer. It defines the data format and content that the target audio playback device must follow when sending broadcast data to the terminal device and connecting data, in order to identify whether a connection can be established and data from the target audio playback device can be stored.
[0054] Step 104: Adjust the first audio mode of the first terminal device to the second audio mode, and send the audio of the target audio event to the target audio playback device.
[0055] In this embodiment, when a connection is established between the first terminal device and the target audio playback device, the first audio mode already set on the first terminal device is adjusted to the second audio mode. This allows the audio of the audio event to be played using different audio modes before and after the first terminal device is connected to the target audio playback device. The audio corresponding to the audio event is then sent to the target audio playback device via Bluetooth for playback. This automatic setting and adjustment of the audio mode of the first terminal device meets the user's audio playback needs in various scenarios, improving intelligence and user experience.
[0056] In the audio processing method of this application embodiment, in response to the detection of an audio event, it is determined whether there is a target audio playback device to be connected. The target audio playback device is connected to a second terminal device, and the second terminal device has the same account information as the first terminal device. In response to determining the existence of a target audio playback device to be connected, based on the detected audio event, a first audio mode is set for the first terminal device, a connection is established with the target audio playback device, and the connection between the target audio playback device and the second terminal device is disconnected. The first audio mode of the first terminal device is adjusted to a second audio mode, and the audio of the target audio event is sent to the target audio playback device. If it is determined that a target audio playback device capable of audio switching exists, the target audio playback device is connected. Based on the detected audio event, the audio mode of the first terminal device is automatically set and adjusted to meet the user's audio playback needs in various scenarios, improving intelligence and user experience.
[0057] Based on the above embodiments, this application describes how to set audio modes for different scenarios to meet the audio playback requirements of different scenarios, as detailed below:
[0058] In one scenario, the audio event's audio type is a call type, such as a voice call, video call, or regular phone call. To prevent the user from missing call information, in response to determining the existence of a target audio playback device to connect to, based on the monitored audio event, the first terminal device's first audio mode is set to speaker playback mode. Speaker playback mode means the first terminal device plays audio aloud through its speaker. This enables the first terminal device to play the call ringtone to remind the user to prepare to answer and avoid missing the call. Then, a connection is established with the target audio playback device. In response to establishing a connection with the target audio playback device, the first terminal device's corresponding audio mode is changed from speaker playback mode to earpiece playback mode. Earpiece playback mode means the first terminal can play audio through the target audio playback device. This allows the audio event to be played through the target audio playback device after it is sent. When the first terminal device detects that the audio type corresponding to the audio event is a call, it sets the first audio mode of the first terminal device to speaker playback mode. This ensures that users are aware of incoming calls in call scenarios, such as regular phone calls or voice / video calls from third-party applications, preventing them from missing the call due to audio transmission issues. Furthermore, when connected to the target audio playback device, the device is set to earpiece mode for playback, meeting playback needs in various scenarios.
[0059] In another scenario, the audio event is of a multimedia type. Since multimedia playback includes music, videos, live streams, etc., using the first terminal device to play the audio aloud usually creates ambient noise. Therefore, in response to the confirmation of a target audio playback device to be connected, the audio mode of the first terminal device is set to silent playback mode based on the monitored audio event. Silent playback mode means that the audio event's voice is still playing, but the first terminal device does not emit sound. This establishes a connection with the target audio playback device. In response to establishing the connection, the audio mode of the first terminal device is switched from silent playback mode to earpiece playback mode, allowing the target audio playback device connected to the first terminal device to play the audio corresponding to the audio event. In other words, the target audio playback device automatically switches from playing audio from the second terminal device to playing audio from the first terminal device. This enables the setting and switching of the terminal device's audio mode during the audio flow process, when different devices are connected to the target audio playback device, to meet user needs in different scenarios and provide greater intelligence.
[0060] Based on the above embodiments, Figure 2 A flowchart illustrating another audio mode processing method provided in this application embodiment is shown below. Figure 2 As shown, the method includes the following steps:
[0061] Step 201: Obtain the status information of at least one audio playback device to be filtered.
[0062] As one implementation method, the status information of each audio playback device is determined based on the information broadcast by each audio playback device.
[0063] In this embodiment, the description focuses on a setting list storing the status information of at least one audio playback device to be filtered. The audio playback devices to be filtered are pre-stored, directly connectable audio playback devices on each terminal device. For example, the audio playback device might be a Bluetooth headset. If a user has two Bluetooth headsets, their phone stores a setting list including the status information of these two headsets. The status information of the Bluetooth headsets can be determined based on information broadcast by each headset or in response to user input. The first terminal device maintains a setting list storing the status information of Bluetooth headsets that can be automatically switched to, i.e., headsets that can be automatically connected. The status information of each Bluetooth headset in the setting list is updated periodically, with the update frequency matching the broadcast frequency of each Bluetooth headset. In other words, each Bluetooth headset can broadcast its status message via Bluetooth according to a set period, complying with the requirements of the Quick Connect protocol.
[0064] The headphone status information includes the headphone wearing status, audio status, and audio focus status. The wearing status indicates whether the corresponding headphone is being worn and used; the audio status indicates whether the corresponding headphone is playing audio; and the audio focus status indicates which application the audio being played belongs to, thus identifying whether the audio type is a call or media type.
[0065] Step 202: Based on the status information of each audio playback device and the priority of audio events, determine whether there is an audio playback device that meets the audio switching conditions.
[0066] The audio events include incoming call events, voice call events, video call events, and media audio playback events. Therefore, the corresponding audio includes incoming call audio, voice call audio, video call audio, and media audio (music, video, etc.). Audio priorities can be preset, typically set as follows:
[0067] The priority of incoming call audio = the priority of voice call audio = the priority of video call audio > the priority of media audio > the priority of no audio.
[0068] Among them, "no audio" means that the audio playback device is connected to a device with the same device account, but no audio data is played, which has the lowest priority.
[0069] In this embodiment, for each audio playback device's status information, the first terminal device determines whether the audio playback device is being worn, i.e., whether the user is currently using the audio playback device, based on the wearing status in the audio playback device's status information. If the audio playback device is being worn, it determines whether the audio playback device is currently playing audio from a certain application based on the audio status and audio focus status. If no audio is being played, the audio priority is determined to be the lowest. If audio is being played, the audio type is determined based on the application corresponding to the audio, thereby determining the corresponding audio priority. The audio priority of the audio played by the audio playback device is compared with the audio priority corresponding to the audio event to determine whether the audio priority of the audio playback device is less than or equal to the audio priority corresponding to the audio event. If the audio priority of the audio playback device is less than or equal to the audio priority corresponding to the audio event, and the audio playback device is not a call audio, and the audio event is not a call audio, then it is determined that there is an audio playback device that meets the audio switching conditions. The first terminal device can then connect to the audio playback device to play the audio event through the audio playback device, thereby switching the audio data played by the audio playback device.
[0070] Step 203: In response to the existence of an audio playback device that meets the audio switching conditions, determine the target audio playback device from the audio playback devices that meet the audio switching conditions.
[0071] In this embodiment of the application, since there are multiple audio playback devices that can be automatically switched or connected in the setting list, there are multiple audio playback devices that meet the audio switching conditions. As one implementation method, the audio playback device corresponding to the most recently received broadcast information can be used as the target audio playback device based on the order in which the broadcast information of each audio playback device that meets the audio switching conditions is received.
[0072] As another implementation method, the audio playback device corresponding to the first received broadcast information can be determined based on the time information of the broadcast information received from each audio playback device that meets the audio switching conditions, and then used as the target audio playback device.
[0073] As another implementation method, the audio playback device with the lowest audio priority can be determined based on the priority of the audio played by each audio playback device that meets the audio switching conditions of the second terminal device. This audio playback device is then used as the target audio playback device that the first terminal device wants to connect to, thus achieving automatic audio flow without the need for user operation, making it more convenient and intelligent.
[0074] As an example, the first terminal device is a Pad, and the second terminal devices are two phones, namely mobile phone 1 and mobile phone 2. The audio playback devices are headphones, and both pairs of headphones are playing audio. Headphone 1 is playing call audio from mobile phone 1, and headphone 2 is playing media audio from mobile phone 2. The audio event detected by the Pad is call audio. In this case, the Pad will try to connect to the pair of headphones playing media audio because media audio has a lower priority than call audio. If both pairs of headphones are playing media audio, the Pad will try to connect to headphone 1 first if it receives the broadcast information from headphone 1 first. Alternatively, if the Pad last received the broadcast information from headphone 2, meaning that headphone 2 is still periodically updating its headphone status information, then headphone 2 is definitely in a connected state, and the Pad will try to connect to headphone 2 first, thus improving the reliability of the connection.
[0075] Optionally, in response to the absence of an audio playback device that meets the audio switching conditions, it is determined that there is no target audio playback device to be connected, thus preventing the connection of any audio playback device.
[0076] Step 204: In response to determining that there is a target audio playback device to be connected, the first terminal device is set to the first audio mode according to the audio type corresponding to the monitored audio event.
[0077] The target audio playback device is connected to a second terminal device among multiple devices.
[0078] Step 205: Establish a connection with the target audio playback device and disconnect the connection between the target audio playback device and the second terminal device.
[0079] Step 206: Adjust the first audio mode of the first terminal device to the second audio mode, and send the audio of the target audio event to the target audio playback device.
[0080] Steps 204-206 can be explained in the foregoing embodiments, as the principle is the same, and will not be repeated here.
[0081] Step 207: Broadcast first information, wherein the first information is used to indicate that the first terminal device has been connected to the target audio playback device.
[0082] In this embodiment, when the first terminal device establishes a connection with the target audio playback device and controls the target audio playback device to play the audio corresponding to the audio event, a first message is broadcast. This allows the second terminal device, upon detecting the first message broadcast by the first terminal device, to determine that the target audio playback device has been preempted by the first terminal device. This clarifies that the first terminal device has a higher priority voice request and needs to use the target audio playback device, thus disconnecting from the target audio playback device. This prevents the second terminal device from reconnecting to the target audio playback device. Instead, when the target audio playback device is disconnected, the second terminal device automatically adjusts its own audio mode to improve the user experience.
[0083] In the audio mode processing method of this application embodiment, the first terminal device automatically sets and adjusts the audio mode of the first terminal device according to the audio type corresponding to the monitored audio event. This enables the automatic audio mode processing process when multiple terminal devices with the same account information are competing to connect to the audio playback device. At the same time, it has low requirements for the computing power of the audio playback device, can be applied to more audio playback devices, meets the audio playback needs of users in various scenarios, and improves intelligence and user experience.
[0084] Based on the above embodiments, in one implementation of this application, a prompt message is displayed on the interactive interface of the first terminal device. This prompt message indicates the continuous status of the first terminal device and the target audio playback device. Specifically, during the process of establishing a connection between the first terminal device and the target audio playback device, the prompt message is displayed through the interactive interface of the first terminal device. This prompt message indicates to the user that the connection status between the first terminal device and the user's target audio playback device is "connecting." Furthermore, once the connection is complete, the displayed prompt message indicates to the user that the connection status between the first terminal device and the user's target audio playback device has been completed.
[0085] Based on the above embodiments, this application provides another audio mode processing method. Figure 3 A flowchart illustrating another audio mode processing method provided in this application embodiment is shown below. Figure 3 As shown, the method includes the following steps:
[0086] Step 301: In response to the first information broadcast by the first terminal device, determine whether the currently playing audio is in earpiece playback mode.
[0087] The execution subject of this embodiment is a second terminal device. The second terminal device and the first terminal device have the same account information and can connect to the same target audio playback device. Currently, the target audio playback device connected to the second terminal device is being preempted by the first terminal device. The second terminal device can be a smartphone, smartwatch, Pad, tablet, laptop, projector, smart glasses, etc., and is not limited in this embodiment.
[0088] The first information is broadcast in response to the existence of a target audio playback device to be connected. The first terminal device, based on a detected audio event, sets its corresponding first audio mode, proposes a connection with the target audio playback device, disconnects the connection between the target audio playback device and the second terminal device, adjusts its first audio mode to a second audio mode, and sends the audio of the target audio event to the target audio playback device. The first information also indicates that the target audio playback device, which was originally connected to the second terminal device, has now established a connection with the first terminal device.
[0089] The explanations and descriptions regarding the first information in the foregoing embodiments, as well as other explanations and descriptions related to this embodiment, also apply to this embodiment and will not be repeated here.
[0090] In this embodiment of the application, the second terminal device is a terminal device that is connected to the target audio playback device before the first terminal device and the target audio playback device are connected.
[0091] Step 302: In response to the current audio being played in earpiece playback mode, control the second terminal device to switch from earpiece playback mode to silent playback mode.
[0092] In this embodiment, when the second terminal device determines that the target audio playback device has been connected to the first terminal device based on the first information, it will determine whether the second terminal device is currently playing audio. If there is playing audio, since the target audio playback device has been disconnected, the second terminal device will be controlled to switch from earpiece playback mode to silent playback mode. That is, the second terminal device will not use earpiece playback mode for voice playback, so as to avoid environmental noise interference or to protect user privacy.
[0093] In the audio mode processing method of this application embodiment, in response to the first information broadcast by the first terminal device, it is determined whether the currently playing audio is in earpiece playback mode. If the currently playing audio is in earpiece playback mode, the second terminal device is controlled to switch from earpiece playback mode to mute playback mode. This enables the second terminal device, among multiple terminal devices connected under the same account, to determine whether to switch to mute playback mode when the target audio playback device is preempted, based on whether the audio is still in earpiece playback mode. This process is also automatically triggered, reducing the need for users to manually pause or mute playback, improving intelligence, and ultimately enhancing the user experience.
[0094] Based on the above embodiments, in one implementation of this application embodiment, before determining whether the currently playing audio is in a playback state in response to the first information broadcast by the first terminal device, the method further includes: obtaining headphone preemption information sent by the connected target audio playback device; wherein, the headphone preemption information is used to indicate that the target audio playback device is connecting to the first terminal device, so that during the process of the target audio playback device being connected by the first terminal device, the second terminal device is notified by AT commands that the target audio playback device is being preempted by the first terminal device, so as to remind the user who is using the target audio playback device to play audio from the second terminal device, thereby improving the user experience.
[0095] In one implementation of this application, after the second terminal device and the audio playback device disconnect, and in response to the currently playing audio being in earpiece playback mode, the second terminal device is controlled to switch from earpiece playback mode to silent playback mode, the method further includes: displaying a prompt message on the interactive interface of the second terminal device; wherein the prompt message is used to indicate that the target audio playback device connected to the second terminal device has been connected to the first terminal device, so as to prompt the user that the target audio playback device has been connected to another terminal device, so as to let the user know the reason for the disconnection from the target audio playback device and improve the user experience.
[0096] Based on the above embodiments, as one implementation, in response to detecting a target operation on the second terminal device, the second terminal device is controlled to switch from silent playback mode to speaker playback mode. In this embodiment, if a user, after learning that the target audio playback device has been preempted by another device, still wants to continue playing the original audio, they can click a target button on the second terminal device, such as the power button, to turn the screen on or off. Alternatively, the user can manually increase or decrease the volume, or change the audio playback status. In this case, the second terminal device will cancel the silent playback mode and switch to speaker playback mode.
[0097] Based on the above embodiments, this application provides an interactive method for audio processing. Figure 4 This is a flowchart illustrating an interactive method for audio mode processing provided in an embodiment of this application. In this embodiment, headphones are used as an example for illustration. Figure 4 As shown, the method includes:
[0098] In this embodiment of the application, there are two terminal devices with the same account signal, referred to as Device 1 and Device 2 respectively, and one earphone that can be connected, referred to as Earphone 1.
[0099] (1) Device 2 is connected to headphone 1 and is playing audio, and the volume value is greater than 0.
[0100] (2) The earphone 1 periodically sends broadcast information, namely the same account quick connection broadcast. The device 1 receives the broadcast information, parses the broadcast information, obtains the status information of the earphone 1, including wearing status, audio status, audio focus status and other information, and uses the earphone 1 as an earphone that can be used for automatic switching, and stores the status information of the earphone 1 in the earphone list.
[0101] (3) Device 1 listens for audio events, which may be audio / video playback / voice VoIP calls, or regular telephone calls.
[0102] (4) Device 1 receives an audio event and checks if there are any connected headphones. If no headphones are connected, it queries the headphone list to determine if there are any headphones that meet the audio switching conditions. The audio switching conditions are: headphones must be worn on both ears and the audio priority must meet certain conditions for switching to occur. That is, if the audio detected by Device 1 and the audio played by Device 1 are not both call audio, the priority of the audio currently played by the headphones must be less than or equal to the audio priority of the device to be preempted for the audio switching condition to be met. The audio priority is: Telephone = VoIP > Audio = Video > None. If there are headphones that meet the audio switching conditions, headphone 1 is selected as the target headphone to be connected. In this embodiment, taking media audio as an example, since the media audio played by Device 1 is played later, although the media audio to be played by Device 1 and the media audio played by Device 2 have the same priority, according to the principle that later playback has a higher priority, Device 1 can connect to headphone 1, and the audio played by headphone 1 can be switched.
[0103] It should be noted that if the audio to be played on device 1 is call audio, and device 2 is also playing call audio, the user needs to confirm device 1 before they can connect to headset 1.
[0104] The method of setting the audio mode of device 2 during the process of connecting to earphone 1 can be referred to the description of different scenarios in the aforementioned embodiments, and will not be repeated here.
[0105] (5) If the earphone 1 is not paired with the device 1, the same account pairing process needs to be performed, and then the device 1 can connect to the earphone 1. Otherwise, connect directly to the earphone 1.
[0106] (6) When device 1 connects to earphone 1, earphone 1 sends an AT command to device 2 to notify device 1 that it is preempting earphone 1.
[0107] (7) After device 1 is connected, device 2 is disconnected. At this time, device 1 cancels the silent playback mode.
[0108] (8) Device 1 broadcasts the first message, namely the same account quick connection broadcast, to notify Device 2 that the headset 1 has been preempted by Device 1. Device 2 first sets the playback mode to mute (i.e. audio mute) to stop the sound of the currently playing audio. Then, on the interactive interface of Device 2, it prompts the user that the headset has been connected to other devices with the same account.
[0109] (9) When the monitoring device turns on or off, changes the volume, or changes the playback status, that is, when device 2 detects that the target button is clicked, such as the power button, causing the second terminal device to turn on or off, or when the user manually increases or decreases the volume, or when the user changes the audio playback status, device 2 cancels the silent playback mode and switches to the speaker playback mode to continue playing the original audio by playing the sound externally, so as to avoid interruption or pause of the original audio playback.
[0110] The explanations and beneficial effects in the foregoing embodiments also apply to this embodiment, and the principle is the same, so they will not be repeated here.
[0111] Based on the above embodiments, Figure 5 This is a schematic diagram of an interactive scenario for audio mode processing provided in an embodiment of this application. In this embodiment, headphones are used as an example for illustration. Figure 5 As shown, the method includes:
[0112] As an example scenario, consider multiple terminal devices with the same device account. The first terminal device is a tablet, the second terminal device is a mobile phone, and the user only has one headset. When the user uses the mobile phone to play music through the headset, and the tablet suddenly receives a voice call from a third-party application (WeChat, QQ, etc.), the audio processing process of the first and second terminal devices is as follows:
[0113] 1) The phone is connected to headphones and music is playing;
[0114] 2) The tablet computer detects the same account quick connection broadcast sent by the headset, which carries the headset's status information. The tablet computer stores the headset's status information. When the tablet computer answers a voice or video call from a third-party application, i.e., the tablet computer listens to the call event, the audio priority of the music played on the phone through the headset is lower than the audio priority of the tablet computer's voice call that is taking over the headset. This triggers the audio switching condition, meaning the tablet computer can connect to the headset to play the audio of the voice call through the headset.
[0115] 3) The tablet's audio mode is set to speaker playback mode, which allows the tablet to play the ringtone of a voice call to notify the user that a voice call is in progress.
[0116] 4) The tablet receives a quick connection broadcast message from the headset with the same account, starts pairing, and tries to connect to the headset.
[0117] 5) The headset sends AT commands to the mobile phone, which carry headset preemption information to notify the mobile phone or tablet that it is preempting the headset.
[0118] 6) The headphones and tablet are successfully connected.
[0119] 7) The headphones and the phone are disconnected.
[0120] 8) The tablet computer switches from speaker playback mode to earpiece playback mode, allowing the headphones to play voice call audio.
[0121] 9) The tablet computer broadcasts the first message, and the same account quickly connects to the broadcast, notifying the mobile phone that the headset has been taken over by the tablet computer.
[0122] 10) Set the phone's audio to mute mode, i.e., silent playback mode.
[0123] 11) When the user manually turns the screen on or off, that is, by clicking the target button on the second terminal device, such as the power button, the second terminal device will turn the screen on or off, or the user will manually increase or decrease the volume, or the user will manually change the audio / video playback status, then the second terminal device will cancel the silent playback mode and switch to speaker playback mode.
[0124] The explanations and beneficial effects in the foregoing embodiments also apply to this embodiment, and the principle is the same, so they will not be repeated here.
[0125] To implement the above embodiments, this application also proposes an audio processing device applied to a first terminal device.
[0126] Figure 6 This is a schematic diagram of an audio mode processing device provided in an embodiment of this application.
[0127] like Figure 6 As shown, the device may include:
[0128] The determination module 61 is used to determine whether there is a target audio playback device to be connected in response to the detection of an audio event, wherein the target audio playback device has established a connection with the second terminal device and the second terminal device has the same account information as the first terminal device;
[0129] Setting module 62 is used to set the first terminal device to the first audio mode in response to the existence of a target audio playback device to be connected, based on the monitored audio events;
[0130] Establishment module 63 is used to establish a connection with the target audio playback device and to disconnect the connection between the target audio playback device and the second terminal device.
[0131] The adjustment module 64 is used to adjust the first audio mode of the first terminal device to the second audio mode and send the audio of the target audio event to the target audio playback device.
[0132] Furthermore, in one implementation of this application embodiment, the determining module 61 is further configured to:
[0133] Obtain the status information of at least one audio playback device to be filtered;
[0134] Based on the status information of each audio playback device and the priority of the audio event, determine whether there is an audio playback device that meets the audio switching conditions;
[0135] In response to the existence of an audio playback device that meets the audio switching conditions, the target audio playback device is determined from the audio playback devices that meet the audio switching conditions;
[0136] In response to the absence of an audio playback device that meets the audio switching conditions, it is determined that there is no target audio playback device to be connected.
[0137] In one implementation of this application, the determining module 61 is further configured to: search for and obtain the broadcast information of the at least one audio playback device, and parse and obtain the current status information of the at least one candidate audio playback device.
[0138] In one implementation of this application, the determining module 61 is further configured to: obtain the current status information of the at least one audio playback device stored in the set list.
[0139] In one implementation of this application embodiment, the audio type corresponding to the audio event is a call type, and the adjustment module 64 is further used for:
[0140] Adjust the speaker playback mode of the first terminal device to the earpiece playback mode.
[0141] In one implementation of this application embodiment, the audio type corresponding to the audio event is a multimedia type, and the adjustment module 64 is further used for:
[0142] The mute playback mode corresponding to the first terminal device is adjusted to the earpiece playback mode.
[0143] In one implementation of this application, the apparatus further includes:
[0144] A broadcast module is used to broadcast first information; wherein the first information is used to indicate that the first terminal device has been connected to the target audio playback device.
[0145] In one implementation of this application, the apparatus further includes:
[0146] The display module is used to display prompt information in the interactive interface of the first terminal device.
[0147] In one implementation of this application embodiment, the establishment module 63 is further used for:
[0148] In response to detecting that the first terminal device and the target audio playback device are not paired, the device is paired with the target audio playback device and connected.
[0149] In one implementation of this application, the apparatus further includes:
[0150] The determination module is used to, in response to listening to an audio event and detecting that no headphones are connected, obtain the status information of each headphone stored in the headphone list; wherein, the status information of each headphone is determined based on the broadcast information periodically sent by each headphone.
[0151] Based on the status information of each of the headphones and the audio priority corresponding to the audio event, determine whether there are headphones that meet the audio switching conditions;
[0152] In response to the presence of headphones that meet the audio switching conditions, the target audio playback device is determined from the headphones that meet the audio switching conditions.
[0153] It should be noted that the foregoing explanation of the method embodiments also applies to the apparatus of this embodiment, and will not be repeated here.
[0154] In the audio mode processing apparatus proposed in this application, in response to determining the existence of a target audio playback device that meets the audio switching conditions, the audio mode of a first terminal device is set according to the monitored audio event. The target audio playback device is connected to a second terminal device, establishing a connection with the target audio playback device. The audio mode of the first terminal device is adjusted from a first audio mode to a second audio mode to control the target audio playback device to play the audio corresponding to the audio event. In scenarios where the target audio playback device can connect to any of multiple terminal devices with the same device account, the audio mode of the first terminal device is automatically set and adjusted according to the monitored audio event to meet the user's audio playback needs in various scenarios, improving intelligence and user experience.
[0155] To implement the above embodiments, this application also proposes an audio mode processing device for use in a second terminal device.
[0156] Figure 7 This is a schematic diagram of an audio mode processing device provided in an embodiment of this application.
[0157] like Figure 7 As shown, the device may include:
[0158] The determining module 71 is used to determine whether the currently playing audio is in earpiece playback mode in response to the first information broadcast by the first terminal device; wherein, the first information is used to instruct the target audio playback device connected to the second terminal device to establish a connection with the first terminal device, and the second terminal device and the first terminal device have the same account information; wherein, the first information is broadcast by the first terminal device in response to the listening of an audio event, determining whether there is a target audio playback device to be connected, and in response to the existence of a target audio playback device to be connected, setting the first terminal device to a first audio mode according to the listened audio event, suggesting a connection with the target audio playback device, and disconnecting the connection between the target audio playback device and the second terminal device, adjusting the first audio mode of the first terminal device to a second audio mode, and sending the audio of the target audio event to the target audio playback device;
[0159] The adjustment module 72 is used to control the second terminal device to switch from earpiece playback mode to silent playback mode in response to the current audio being in earpiece playback mode.
[0160] Furthermore, in one implementation of this application embodiment, the apparatus further includes:
[0161] The display module is used to display prompt information on the interactive interface of the second terminal device; wherein the prompt information is used to indicate that the target audio playback device connected to the second terminal device has been connected to the first terminal device.
[0162] In one implementation of this application, the apparatus further includes:
[0163] The information to be acquired is used to acquire headphone preemption information sent by the connected target audio playback device; wherein, the headphone preemption information is used to indicate that the target audio playback device is connecting to the first terminal device.
[0164] In one implementation of this application embodiment, the adjustment module 72 is further configured to:
[0165] In response to detecting a target operation on the second terminal device, the second terminal device is controlled to switch from silent playback mode to speaker playback mode.
[0166] It should be noted that the foregoing explanation of the method embodiments also applies to the apparatus of this embodiment, and will not be repeated here.
[0167] In the audio mode processing device of this application embodiment, in response to detecting first information broadcast by the first terminal device, it determines whether the currently playing audio is in earpiece playback mode. If the currently playing audio is in earpiece playback mode, it controls the second terminal device to switch from earpiece playback mode to silent playback mode. This enables the second terminal device, among multiple terminal devices connected under the same account, to determine whether to put the second terminal device into voice-mute playback mode when the target audio playback device being connected is preempted, based on whether the audio is still playing. This process is also automatically triggered, reducing the need for users to manually pause playback or mute, improving intelligence, and ultimately enhancing the user experience.
[0168] To implement the above embodiments, this application also proposes an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, it implements the method described in the foregoing method embodiments.
[0169] To implement the above embodiments, this application also proposes a non-transitory computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the method described in the foregoing method embodiments.
[0170] To implement the above embodiments, this application also proposes a computer program product having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the method described in the foregoing method embodiments.
[0171] Figure 8 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. For example, the electronic device 800 may be a mobile phone, computer, digital broadcasting terminal, messaging device, game console, tablet device, medical device, fitness equipment, personal digital assistant, etc.
[0172] Reference Figure 8 The electronic device 800 may include one or more of the following components: processing component 802, memory 804, power component 806, multimedia component 808, audio component 810, input / output (I / O) interface 812, sensor component 814, and communication component 816.
[0173] Processing component 802 typically controls the overall operation of electronic device 800, such as operations associated with display, telephone calls, data communication, camera operation, and recording operations. Processing component 802 may include one or more processors 820 to execute instructions to complete all or part of the steps of the methods described above. Furthermore, processing component 802 may include one or more modules to facilitate interaction between processing component 802 and other components. For example, processing component 802 may include a multimedia module to facilitate interaction between multimedia component 808 and processing component 802.
[0174] Memory 804 is configured to store various types of data to support the operation of electronic device 800. Examples of this data include instructions for any application or method operating on electronic device 800, contact data, phonebook data, messages, pictures, videos, etc. Memory 804 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, 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 storage, flash memory, magnetic disk, or optical disk.
[0175] Power component 806 provides power to various components of electronic device 800. Power component 806 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to electronic device 800.
[0176] Multimedia component 808 includes a screen that provides an output interface between the electronic device 800 and the 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 touchscreen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touches, swipes, and gestures on the touch panel. The touch sensors may sense not only the boundaries of the touch or swipe action but also the duration and pressure associated with the touch or swipe operation. In some embodiments, multimedia component 808 includes a front-facing camera and / or a rear-facing camera. When the electronic device 800 is in an operating mode, such as a shooting mode or a video mode, the front-facing camera and / or the rear-facing camera may receive external multimedia data. Each front-facing camera and rear-facing camera may be a fixed optical lens system or have focal length and optical zoom capabilities.
[0177] Audio component 810 is configured to output and / or input audio signals. For example, audio component 810 includes a microphone (MIC) configured to receive external audio signals when electronic device 800 is in an operating mode, such as call mode, recording mode, and voice recognition mode. The received audio signals may be further stored in memory 804 or transmitted via communication component 816. In some embodiments, audio component 810 also includes a speaker for outputting audio signals.
[0178] I / O interface 812 provides an interface between processing component 802 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to, home buttons, volume buttons, power buttons, and lock buttons.
[0179] Sensor assembly 814 includes one or more sensors for providing state assessments of various aspects of electronic device 800. For example, sensor assembly 814 can detect the on / off state of electronic device 800, the relative positioning of components such as the display and keypad of electronic device 800, changes in position of electronic device 800 or a component of electronic device 800, the presence or absence of user contact with electronic device 800, orientation or acceleration / deceleration of electronic device 800, and temperature changes of electronic device 800. Sensor assembly 814 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. Sensor assembly 814 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, sensor assembly 814 may also include an accelerometer, gyroscope, magnetometer, pressure sensor, or temperature sensor.
[0180] Communication component 816 is configured to facilitate wired or wireless communication between electronic device 800 and other devices. Electronic device 800 can access wireless networks based on communication standards, such as WiFi, 4G, or 5G, or combinations thereof. In one exemplary embodiment, communication component 816 receives broadcast signals or broadcast-related information from an external broadcast management system via a broadcast channel. In one exemplary embodiment, communication component 816 also includes a near-field communication (NFC) module to facilitate short-range communication. 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.
[0181] In an exemplary embodiment, the electronic device 800 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, microcontrollers, microprocessors, or other electronic components to perform the methods described above.
[0182] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 804 including instructions, which can be executed by a processor 820 of an electronic device 800 to perform the above-described method. For example, the non-transitory computer-readable storage medium may be a ROM, random access memory (RAM), CD-ROM, magnetic tape, floppy disk, and optical data storage device, etc.
[0183] In the description of this specification, the references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., refer to specific features, structures, materials, or characteristics described in connection with that embodiment or example, which are included in at least one embodiment or example of this application. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. Moreover, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification, as well as the features of different embodiments or examples.
[0184] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of that feature. In the description of this application, "multiple" means at least two, such as two, three, etc., unless otherwise explicitly specified.
[0185] Any process or method description in the flowchart or otherwise herein can be understood as representing a module, segment, or portion of code comprising one or more executable instructions for implementing custom logic functions or processes, and the scope of the preferred embodiments of this application includes additional implementations in which functions may be performed not in the order shown or discussed, including substantially simultaneously or in reverse order depending on the functions involved, as should be understood by those skilled in the art to which embodiments of this application pertain.
[0186] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as a sequenced list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by, or in conjunction with, an instruction execution system, apparatus, or device (such as a computer-based system, a processor-included system, or other system that can fetch and execute instructions from, an instruction execution system, apparatus, or device). For the purposes of this specification, "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transmit programs for use by, or in conjunction with, an instruction execution system, apparatus, or device. More specific examples (a non-exhaustive list) of computer-readable media include: an electrical connection having one or more wires (electronic device), a portable computer disk drive (magnetic device), random access memory (RAM), read-only memory (ROM), erasable and editable read-only memory (EPROM or flash memory), fiber optic devices, and portable optical disc read-only memory (CDROM). Alternatively, the computer-readable medium may be paper or other suitable media on which the program can be printed, since the program can be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, interpreting, or otherwise processing as necessary, and then stored in a computer memory.
[0187] It should be understood that various parts of this application can be implemented using hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented using software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware as in another embodiment, it can be implemented using any one or a combination of the following techniques known in the art: discrete logic circuits having logic gates for implementing logical functions on data signals, application-specific integrated circuits (ASICs) having suitable combinational logic gates, programmable gate arrays (PGAs), field-programmable gate arrays (FPGAs), etc.
[0188] Those skilled in the art will understand that all or part of the steps of the methods in the above embodiments can be implemented by a program instructing related hardware. The program can be stored in a computer-readable storage medium, and when executed, the program includes one or a combination of the steps of the method embodiments.
[0189] Furthermore, the functional units in the various embodiments of this application can be integrated into a processing module, or each unit can exist physically separately, or two or more units can be integrated into a module. The integrated module can be implemented in hardware or as a software functional module. If the integrated module is implemented as a software functional module and sold or used as an independent product, it can also be stored in a computer-readable storage medium.
[0190] The storage medium mentioned above can be a read-only memory, a disk, or an optical disk, etc. Although embodiments of this application have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting this application. Those skilled in the art can make changes, modifications, substitutions, and variations to the above embodiments within the scope of this application.
Claims
1. An audio processing method, characterized in that, Applied to the first terminal device, including: In response to the detection of an audio event, it is determined whether there is a target audio playback device to be connected, wherein the target audio playback device has established a connection with a second terminal device, and the second terminal device has the same account information as the first terminal device; In response to the existence of a target audio playback device to be connected, the first terminal device is set to the first audio mode based on the monitored audio events; Establish a connection with the target audio playback device, and disconnect the connection between the target audio playback device and the second terminal device; The first audio mode of the first terminal device is adjusted to the second audio mode, and the audio of the audio event is sent to the target audio playback device; Establishing a connection with the target audio playback device includes: In response to the detection that the first terminal device and the target audio playback device are not paired, the system identifies the target audio playback device that can be connected to by devices with the same account based on the same account quick connection protocol, and pairs and connects with the target audio playback device based on the same account quick connection protocol.
2. The method as described in claim 1, characterized in that, The process of determining whether a target audio playback device to be connected exists includes: Obtain the status information of at least one audio playback device to be filtered; Based on the status information of each audio playback device and the priority of the audio event, determine whether there is an audio playback device that meets the audio switching conditions; In response to the existence of an audio playback device that meets the audio switching conditions, the target audio playback device is determined from the audio playback devices that meet the audio switching conditions; In response to the absence of an audio playback device that meets the audio switching conditions, it is determined that there is no target audio playback device to be connected.
3. The method as described in claim 2, characterized in that, The step of obtaining the status information of at least one audio playback device to be filtered includes: Obtain the current status information of at least one audio playback device stored in the configuration list.
4. The method as described in claim 1, characterized in that, The audio type corresponding to the audio event is a call type, and adjusting the first audio mode of the first terminal device to the second audio mode includes: Adjust the speaker playback mode of the first terminal device to the earpiece playback mode.
5. The method as described in claim 1, characterized in that, The audio event corresponds to a multimedia type, and adjusting the first audio mode of the first terminal device to a second audio mode includes: The mute playback mode corresponding to the first terminal device is adjusted to the earpiece playback mode.
6. The method according to any one of claims 1-5, characterized in that, After adjusting the first audio mode of the first terminal device to the second audio mode and sending the audio of the audio event to the target audio playback device, the method further includes: Broadcast first information; wherein, the first information is used to indicate that the first terminal device has been connected to the target audio playback device.
7. The method as described in claim 6, characterized in that, The method further includes: A prompt message is displayed in the interactive interface of the first terminal device; wherein the prompt message is used to indicate the continuous status of the first terminal device and the target audio playback device.
8. An audio processing method, characterized in that, Applied to second terminal devices, including: In response to the first information broadcast by the first terminal device, it is determined whether the currently playing audio is in earpiece playback mode; wherein, the first information is used to instruct the target audio playback device connected to the second terminal device to establish a connection with the first terminal device, and the second terminal device and the first terminal device have the same account information; wherein, the first information is broadcast by the first terminal device in response to the listening of an audio event, determining whether there is a target audio playback device to be connected, and in response to the existence of a target audio playback device to be connected, setting the first terminal device to a first audio mode according to the listened audio event, establishing a connection with the target audio playback device, disconnecting the connection between the target audio playback device and the second terminal device, adjusting the first audio mode of the first terminal device to a second audio mode, and sending the audio of the audio event to the target audio playback device; In response to the fact that the currently playing audio is in earpiece playback mode, the second terminal device is controlled to switch from earpiece playback mode to silent playback mode; The first terminal device establishes a connection with the target audio playback device, and further includes: In response to detecting that the first terminal device and the target audio playback device are not paired, the first terminal device identifies the target audio playback device that can be connected to by devices with the same account based on the same account quick connection protocol, and pairs and connects with the target audio playback device based on the same account quick connection protocol.
9. The method as described in claim 8, characterized in that, After responding to the current audio playback being in earpiece playback mode and controlling the second terminal device to switch from earpiece playback mode to silent playback mode, the method further includes: On the interactive interface of the second terminal device, a prompt message is displayed; wherein the prompt message is used to indicate that the target audio playback device connected to the second terminal device has been connected to the first terminal device.
10. The method as described in claim 8, characterized in that, Before determining whether the currently playing audio is in earpiece playback mode in response to the first information broadcast by the first terminal device, the method further includes: Obtain headphone preemption information sent by the connected target audio playback device; wherein, the headphone preemption information is used to indicate that the target audio playback device is connecting to the first terminal device.
11. The method according to any one of claims 8-10, characterized in that, After responding to the current audio playback being in earpiece playback mode and controlling the second terminal device to switch from earpiece playback mode to silent playback mode, the method further includes: In response to detecting a target operation on the second terminal device, the second terminal device is controlled to switch from silent playback mode to speaker playback mode.
12. An audio processing device, characterized in that, Applied to the first terminal device, including: The determination module is used to determine whether there is a target audio playback device to be connected in response to the detection of an audio event, wherein the target audio playback device has established a connection with a second terminal device, and the second terminal device has the same account information as the first terminal device; The setting module is used to respond to the presence of a target audio playback device to be connected, and to set the first terminal device to the first audio mode according to the monitored audio events; The module is used to establish a connection with the target audio playback device and to disconnect the connection between the target audio playback device and the second terminal device. An adjustment module is used to adjust the first audio mode of the first terminal device to a second audio mode and send the audio of the audio event to the target audio playback device; The establishment module is also used for: In response to the detection that the first terminal device and the target audio playback device are not paired, the system identifies the target audio playback device that can be connected to by devices with the same account based on the same account quick connection protocol, and pairs and connects with the target audio playback device based on the same account quick connection protocol.
13. An audio processing apparatus, characterized in that, Applied to second terminal devices, including: The determination module is used to determine whether the currently playing audio is in earpiece playback mode in response to first information broadcast by the first terminal device; wherein, the first information is used to instruct the target audio playback device connected to the second terminal device to establish a connection with the first terminal device, and the second terminal device and the first terminal device have the same account information; wherein, the first information is broadcast by the first terminal device in response to listening to an audio event, determining whether there is a target audio playback device to be connected, and in response to the existence of a target audio playback device to be connected, setting the first terminal device to a first audio mode according to the listened audio event, suggesting a connection with the target audio playback device, disconnecting the connection between the target audio playback device and the second terminal device, adjusting the first audio mode of the first terminal device to a second audio mode, and sending the audio of the audio event to the target audio playback device; The adjustment module is used to control the second terminal device to switch from earpiece playback mode to silent playback mode in response to the current audio being in earpiece playback mode; The first terminal device establishes a connection with the target audio playback device, and further includes: In response to detecting that the first terminal device and the target audio playback device are not paired, the first terminal device identifies the target audio playback device that can be connected to by devices with the same account based on the same account quick connection protocol, and pairs and connects with the target audio playback device based on the same account quick connection protocol.
14. An electronic device, characterized in that, It includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, it implements the method as described in any one of claims 1-7, or implements the method as described in any one of claims 8-11.
15. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the method as described in any one of claims 1-7, or the method as described in any one of claims 8-11.
Citation Information
Patent Citations
Wireless earphone box and system
CN111601199A