WO2024119926A1 - 耳机贴合度检测方法和耳机 - Google Patents

耳机贴合度检测方法和耳机 Download PDF

Info

Publication number
WO2024119926A1
WO2024119926A1 PCT/CN2023/117305 CN2023117305W WO2024119926A1 WO 2024119926 A1 WO2024119926 A1 WO 2024119926A1 CN 2023117305 W CN2023117305 W CN 2023117305W WO 2024119926 A1 WO2024119926 A1 WO 2024119926A1
Authority
WO
WIPO (PCT)
Prior art keywords
earphone
service
headset
fit detection
fit
Prior art date
Application number
PCT/CN2023/117305
Other languages
English (en)
French (fr)
Inventor
杨荣芝
Original Assignee
荣耀终端有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 荣耀终端有限公司 filed Critical 荣耀终端有限公司
Publication of WO2024119926A1 publication Critical patent/WO2024119926A1/zh

Links

Definitions

  • the present application relates to the field of electronic technology, and in particular to a method for detecting the fit of an earphone and an earphone.
  • In-ear true wireless stereo (TWS) headphones can use the headphone fit detection function to determine whether the user's ear canal fits the headphone.
  • the basic principle of headphone fit detection is: when the speaker part of the headphone is inserted into the user's ear canal, the speaker in the headphone plays a preset audio according to the preset headphone fit detection parameters (such as noise reduction parameters), and the microphone in the headphone (located outside the ear canal) collects the ambient sound (including the preset audio leaked from the gap between the ear canal and the headphone).
  • the headphone determines the leakage value of the preset audio by analyzing the preset audio played and the received leaked preset audio. The smaller the leakage value, the closer the user's ear canal fits the headphone.
  • This scenario is referred to as the mutually exclusive scenario of headphone fit detection.
  • the headphone application on the electronic device side handles such mutually exclusive scenarios.
  • the headphone application has limited permissions.
  • the same mutually exclusive scenarios are handled differently when the headphone fit test is performed, causing trouble for users.
  • the embodiments of the present application provide an earphone fit detection method and an earphone, which are used to enable the earphone to process mutually exclusive scenarios of earphone fit detection, so as to improve the compatibility of the earphone fit detection function.
  • a method for detecting fit of an earphone which is applied to an earphone, and the method comprises: receiving a service start command from an electronic device, the service start command being used to instruct the earphone to start a first service, the first service being a service for changing noise reduction parameters of the earphone, or a service for playing other audio besides audio required for earphone fit detection; starting the first service; receiving a fit detection command from an electronic device, the fit detection command being used to instruct the earphone to perform an earphone fit detection; if it is determined that the ongoing first service and the earphone fit detection are mutually exclusive, prohibiting the earphone fit detection.
  • the headphone is already performing a first service, and the first service can change the noise reduction parameters of the headphone, or play audio other than the audio required for the headphone fit detection, which will reduce the accuracy of the headphone fit detection.
  • the headphone receives a fit detection command (the fit detection command is used to instruct the headphone to perform a headphone fit detection)
  • the headphone prohibits the headphone fit detection (that is, the headphone fit detection is not started). Therefore, the headphone executes the control logic to avoid conflicts with the first service by lowering the priority of the headphone fit detection, and does not rely on the operating system in the electronic device to be open to the headphone application.
  • the headset handles mutually exclusive scenarios in a consistent manner, thereby improving the compatibility of headset fit detection.
  • the first service includes at least one of the following services: a media playback service, a call service, a long prompt tone playback service, and a voice assistant wake-up service.
  • the first service is a call service or a voice assistant wake-up service
  • determining that the ongoing first service is mutually exclusive with the earphone fit detection includes: determining that the voice transmission channel of the earphone is in a connected state.
  • the voice transmission channel of the headset When the voice transmission channel of the headset is in a connected state, it indicates that the electronic device is transmitting audio data of a call service or a voice assistant wake-up service with the headset through the voice transmission channel of the headset.
  • the voice transmission channel is a synchronous connection oriented (SCO) channel.
  • SCO synchronous connection oriented
  • the present application does not limit the specific type of the voice transmission channel, and other types of channels may be used as the protocol evolves.
  • the first service is a media playback service or a long prompt tone playback service
  • determining that the ongoing first service is mutually exclusive with the earphone fit detection includes: determining that the audio transmission channel of the earphone is in a playback state or a paused state.
  • the audio transmission channel of the headset When the audio transmission channel of the headset is in the playing state or the paused state, it indicates that the electronic device is transmitting audio data of a media playing service or a long prompt tone playing service with the headset through the audio transmission channel of the headset.
  • the audio transmission channel is an advanced audio distribution profile (A2DP) channel.
  • A2DP advanced audio distribution profile
  • the present application does not limit the specific type of the audio transmission channel, and other types of channels may be used as the protocol evolves.
  • the method further includes: sending first error indication information to the electronic device, where the first error indication information is used to instruct the earphone to prohibit the earphone fit detection.
  • the electronic device can prompt the user that if the earphone fit detection is to be performed, the ongoing first service that is mutually exclusive with the earphone fit detection needs to be stopped to avoid reducing the accuracy of the earphone fit detection.
  • a headphone fit detection method which is applied to the headphone, and the method includes: receiving a fit detection command from an electronic device, the fit detection command being used to instruct the headphone to perform a headphone fit detection; if it is determined that a first service that is mutually exclusive with the headphone fit detection is not being performed, starting the headphone fit detection, the first service referring to: a service for changing noise reduction parameters of the headphone, or a service for playing audio other than audio required for the headphone fit detection; before completing the headphone fit detection, if a service start command is received from the electronic device, interrupting the headphone fit detection and starting the first service, the service start command being used to instruct the headphone to start the first service.
  • the earphone fit detection method when the earphone is already performing the earphone fit detection, if a command is received instructing the earphone to perform a first service that is mutually exclusive with the earphone fit detection, the earphone interrupts the earphone fit detection.
  • the first service that is mutually exclusive with the earphone fit detection may change the noise reduction parameters of the earphone, or play other audio besides the audio required for the earphone fit detection, resulting in reduced accuracy of the earphone fit detection. Therefore, the earphone executes the control logic to avoid conflicts with the first service by lowering the priority of the earphone fit detection. It will not rely on the permissions granted to the headset application by the operating system of the electronic device. For electronic devices using different operating systems, the headset handles mutually exclusive scenarios in a consistent manner, thus improving the compatibility of the headset fit detection.
  • the first service includes at least one of the following services: a media playback service, a call service, a long prompt tone playback service, and a voice assistant wake-up service.
  • the first service is a call service or a voice assistant wake-up service
  • determining that the first service that is mutually exclusive with the earphone fit detection is not being performed includes: determining that the voice transmission channel of the earphone is in a disconnected state, and determining that the audio transmission channel of the earphone is in an idle state.
  • the voice transmission channel of the headset When the voice transmission channel of the headset is disconnected, it indicates that the electronic device is not transmitting audio data for call services or waking up the voice assistant service to the headset through the voice transmission channel of the headset.
  • the audio transmission channel of the headset When the audio transmission channel of the headset is idle, it indicates that the electronic device is not transmitting audio data for playing media services or playing long prompt tone services to the headset through the audio transmission channel of the headset. Therefore, the accuracy of the headset fit detection will not be reduced.
  • the voice transmission channel is a SCO channel.
  • the present application does not limit the specific type of the voice transmission channel, and it may be other types of channels as the protocol evolves.
  • the audio transmission channel is an A2DP channel.
  • the present application does not limit the specific type of the audio transmission channel, and other types of channels may also be used as the protocol evolves.
  • the first service is a media playback service or a long prompt tone playback service
  • the service startup command is a state switching command of the audio transmission channel, which is used to instruct the headset to switch the audio transmission channel from an idle state to a playback state or a pause state.
  • the electronic device instructs the headset to transmit audio data of a media service or a long prompt tone service through the audio transmission channel of the headset, which will reduce the accuracy of the headset fit detection.
  • the first service is a call service or a voice assistant wake-up service
  • the service startup command is a state switching command of the voice transmission channel, which is used to instruct the headset to switch the voice transmission channel from an idle state to a connected state.
  • the electronic device instructs the headset to transmit audio data for call services or wake-up voice assistant services through the voice transmission channel of the headset, which will reduce the accuracy of the headset fit detection.
  • the method further includes: sending second error indication information to the electronic device, where the second error indication information is used to instruct the earphone to interrupt the earphone fit detection.
  • a headset comprising a processor and a memory, wherein instructions are stored in the memory, and when the processor executes the instructions, the method described in the first aspect to the second aspect and any embodiment thereof is executed.
  • a computer-readable storage medium comprising instructions, which, when executed on a headset, cause the headset to execute the method as described in the first aspect to the second aspect and any embodiment thereof.
  • a computer program product comprising instructions is provided.
  • the instructions When the instructions are executed on the above-mentioned earphones, the earphones execute the method as described in the first aspect to the second aspect and any embodiment thereof.
  • a chip system including a processor, configured to support the headset to implement the functions involved in the first to second aspects above.
  • the device also includes an interface circuit, which can be used to receive signals from other devices (such as a memory) or send signals to other devices (such as a communication interface).
  • the chip system may include a chip and may also include other discrete devices.
  • FIG1 is a schematic diagram of the architecture of a communication system provided in an embodiment of the present application.
  • FIG2 is a schematic diagram of the structure of an earphone provided in an embodiment of the present application.
  • FIG3 is a schematic diagram of a flow chart of a method for detecting earphone fit provided in an embodiment of the present application
  • FIG4 is a schematic diagram of a mutually exclusive scenario with earphone fit detection provided in an embodiment of the present application.
  • FIG5 is a flow chart of a method for detecting earphone fit provided in an embodiment of the present application.
  • FIG6 is a second flow chart of a method for detecting earphone fit provided in an embodiment of the present application.
  • FIG7 is a schematic diagram of a display interface of a music player on an electronic device provided in an embodiment of the present application.
  • FIG8 is a schematic diagram of a display interface for earphone fit detection on an electronic device provided in an embodiment of the present application.
  • FIG9 is a schematic diagram of a display interface for detecting the fit between a music player and earphones on an electronic device provided by an embodiment of the present application;
  • FIG10 is a third flow chart of a method for detecting earphone fit provided in an embodiment of the present application.
  • FIG11 is a fourth flow chart of a method for detecting earphone fit provided in an embodiment of the present application.
  • FIG. 12 is a second schematic diagram of a display interface for detecting the fit between a music player and earphones on an electronic device provided by an embodiment of the present application;
  • FIG13 is a schematic diagram of the structure of a chip system provided in an embodiment of the present application.
  • Coupled and “connection” involved in the embodiments of the present application should be understood in a broad sense. For example, they may refer to a direct physical connection, or an indirect connection achieved through electronic devices, such as a connection achieved through resistors, inductors, capacitors or other electronic devices.
  • the embodiment of the present application introduces a communication system including an electronic device and a headset, where the electronic device can transmit audio data to the headset (e.g., play music), or transmit voice data to and from the headset (e.g., make calls). Then, the process of the electronic device and the headset performing headset fit detection in the prior art is introduced.
  • the earphone fit detection if the earphone is still playing other sounds or changing the noise reduction parameters (i.e., mutually exclusive services for the earphone fit detection), it will affect the accuracy of the earphone fit detection, and specifically introduces several scenarios that affect the accuracy of the earphone fit detection. This application collectively refers to these scenarios as mutually exclusive scenarios for the earphone fit detection.
  • the earphone fit detection method provided by the embodiment of the present application is introduced.
  • the earphone detects that the ongoing service is mutually exclusive with the earphone fit detection, the earphone fit detection is prohibited.
  • the earphone fit detection is interrupted. Thereby, it is possible to process the mutually exclusive scenarios for the earphone fit detection to improve the compatibility of the earphone fit detection function.
  • an embodiment of the present application provides a communication system, including an electronic device 20 and a headset 10.
  • the electronic device 20 can transmit audio data to the headset 10 in a wired communication mode or a wireless communication mode, or transmit voice data to and from the headset 10.
  • the wireless communication mode can be a Bluetooth (BT) communication mode, for example, a traditional Bluetooth communication mode or a low-power Bluetooth (for example, Bluetooth low energy (BLE)) communication mode.
  • BT Bluetooth
  • BLE Bluetooth low energy
  • the electronic device 20 may be a mobile phone, a multimedia player, a tablet computer, a laptop computer, an augmented reality (AR) device, a virtual reality (VR) device, an ultra-mobile personal computer (UMPC), a personal digital assistant (PDA), a television, a smart watch or other devices.
  • the earphone 10 may be a Bluetooth earphone, for example, an in-ear TWS earphone.
  • the Bluetooth earphone may be of various types, for example, an earplug-type, in-ear, head-mounted, earmuff-type or ear-hanging Bluetooth earphone.
  • the embodiment of the present application does not impose any special restrictions on the specific forms of the electronic device 20 and the earphone 10.
  • the memory 102 can be used to store computer program instructions, which can be used to execute the earphone fit detection method involved in the present application.
  • the memory can be a volatile memory or a non-volatile memory, or can include both volatile and non-volatile memories.
  • the non-volatile memory can be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory.
  • the volatile memory can be a random access memory (RAM), which is used as an external cache.
  • the processor 101 may include one or more processing units, and different processing units may be independent devices. It can also be integrated in one or more processors 101.
  • the processor 101 can specifically be an integrated control chip.
  • the processor 101 can be used to execute the above instructions and call related modules to execute the earphone fit detection method involved in the embodiment of the present application.
  • the processor can be a chip. For example, it can be a field programmable gate array (FPGA), an application specific integrated circuit (ASIC), a system on chip (SoC), a central processor unit (CPU), a network processor (NP), a digital signal processor (DSP), a micro controller unit (MCU), a programmable logic device (PLD) or other integrated chips.
  • FPGA field programmable gate array
  • ASIC application specific integrated circuit
  • SoC system on chip
  • CPU central processor unit
  • NP network processor
  • DSP digital signal processor
  • MCU micro controller unit
  • PLD programmable logic device
  • the audio module 104 can be used to manage audio data and implement the input and output of audio streams by the headset 10.
  • the audio module 104 can obtain an audio stream from the wireless communication module 103, or transmit an audio stream to the wireless communication module 103, to implement functions such as making calls, playing music, waking up or turning off the voice assistant of an electronic device connected to the headset 10, receiving or sending the user's voice data, etc. through a Bluetooth headset.
  • the audio module 104 may include a speaker (or earpiece, receiver) component for outputting an audio stream, a microphone (or microphone, microphone), a microphone receiving circuit that cooperates with the microphone, etc.
  • the speaker can convert an audio electrical signal into a sound signal and play it.
  • the microphone can convert a sound signal into an audio electrical signal.
  • the various components shown in Figure 2 can be implemented in hardware, software, or a combination of hardware and software, including one or more signal processing or application-specific integrated circuits.
  • the headset 10 may include an earphone body (also called a left earphone) worn on the left ear and an earphone body (also called a right earphone) worn on the right ear.
  • the earphone body may include a housing and internal components.
  • the internal components are arranged in a cavity formed by the housing.
  • the internal components may include devices in modules such as the above-mentioned audio module, power module, and wireless communication module.
  • the Bluetooth headset is a TWS headset
  • the user can use the TWS headset in binaural mode or monaural mode.
  • monaural mode the user wears the left earphone, or the right earphone, to listen to music or make calls and other audio services.
  • binaural mode the user can wear two earphones to enjoy music or perform other audio services.
  • binaural mode the two earphones are divided into main earphones and sub-earphones.
  • the main and sub-roles of the two earphones can also be switched based on different conditions. For example, the earphone with higher power can be switched to the main earphone, and the earphone with lower power can be switched to the sub-earphone.
  • the power module 105 can be used to provide system power for the headset 10, power each module of the headset 10, and support the headset 10 to receive charging input.
  • the power module 105 may include a power management unit (PMU) and a battery.
  • the power management unit can receive external charging input, transform the electrical signal input from the charging circuit and provide it to the battery for charging, and can also transform the electrical signal provided by the battery and provide it to the audio module 104,
  • the power management unit 105 may also be used to monitor parameters such as battery capacity, battery cycle number, battery health status (leakage, impedance), etc.
  • the sensor 106 may include a distance sensor or a proximity light sensor for determining whether the user is wearing the headset 10.
  • the headset 10 may use the distance sensor to detect whether there is an object near the headset 10, thereby determining whether the headset 10 is worn by the user.
  • the headset 10 may turn on the speaker.
  • the sensor 106 may also include a bone conduction sensor.
  • the earphone 10 can obtain the vibration signal of the vibrating bone of the human vocal part, parse the voice signal, realize the voice function, and thus receive the user's voice command.
  • the earphone 10 can also perform voice authentication based on the user's voice signal obtained by the bone conduction earphone to authenticate the user's identity in business scenarios such as payment transactions.
  • the senor 106 may also include a touch sensor for detecting a user's touch operation; a fingerprint sensor for detecting a user's fingerprint and identifying the user's identity; an ambient light sensor that can adaptively adjust some parameters (such as volume) according to the perceived brightness of the ambient light; and other possible sensors.
  • a touch sensor for detecting a user's touch operation
  • a fingerprint sensor for detecting a user's fingerprint and identifying the user's identity
  • an ambient light sensor that can adaptively adjust some parameters (such as volume) according to the perceived brightness of the ambient light
  • the touch sensor can detect the user's touch operations such as single click, double click, multiple clicks, long press, and heavy pressure, and can also perform user fingerprint recognition to authenticate the user's identity in business scenarios such as payment transactions.
  • the components shown in FIG. 2 do not constitute a specific limitation on the earphone 10 , and the earphone 10 may also include more or fewer components than shown in the figure, or combine certain components, or separate certain components, or arrange the components differently.
  • the user wears headphones.
  • the user can use headphones in binaural mode or monaural mode.
  • monaural mode the user wears the left earphone or the right earphone to listen to music or make calls and other audio services.
  • binaural mode the user can wear two earphones to enjoy music or perform other audio services.
  • binaural mode the two earphones are divided into a primary earphone and a secondary earphone.
  • S102 The user clicks an earphone fit detection button on the electronic device.
  • the electronic device After the user clicks the earphone fit detection button on the electronic device, the electronic device sends a fit detection command to the earphone to instruct the earphone to perform an earphone fit detection. In binaural mode, the electronic device sends a fit detection command to the main earphone, which is forwarded by the main earphone to the secondary earphone.
  • the earphone is configured with earphone fit detection parameters.
  • the earphone fit detection parameters include noise reduction parameters, etc.
  • the main earphone and the auxiliary earphone are respectively configured with their own earphone fit detection parameters.
  • the earphone performs an earphone fit detection according to an earphone fit detection parameter (eg, a noise reduction parameter).
  • an earphone fit detection parameter eg, a noise reduction parameter
  • the main earphone and the auxiliary earphone perform earphone fit detection according to the earphone fit detection parameters respectively.
  • the basic principle of earphone fit testing is: after the speaker part of the earphone is inserted into the user's ear canal, the speaker in the earphone plays a preset audio according to the preset noise reduction parameters, and the microphone in the earphone (located outside the ear canal) The earphone collects ambient sound (including the preset audio leaked from the gap between the ear canal and the earphone). The earphone determines the leakage value of the preset audio by analyzing the played preset audio and the received leaked preset audio. The smaller the leakage value, the closer the ear canal and the earphone fit.
  • the earphone sends the detection result to the electronic device.
  • the slave earphone In binaural mode, the slave earphone sends the detection result of the slave earphone to the electronic device through forwarding by the master earphone.
  • the headset is performing one of the following services (referred to as services mutually exclusive with headset fit detection): playing music (i.e., playing media services), playing long prompt sounds (i.e., playing long prompt sound services), making calls (i.e., making calls), waking up the voice assistant (i.e., waking up the voice assistant service), etc.
  • services mutually exclusive with headset fit detection playing music (i.e., playing media services), playing long prompt sounds (i.e., playing long prompt sound services), making calls (i.e., making calls), waking up the voice assistant (i.e., waking up the voice assistant service), etc.
  • the headset fit detection function is turned on at this time, the accuracy of the headset fit detection will be reduced because the media services, long prompt sound services, etc. will play audio, and the call services and voice assistant waking up services will change the noise reduction parameters of the headset because they need to collect voice and reduce noise.
  • the headset in the second scenario, assuming that the headset is performing a headset fit test, if the headset starts one of the following services (referred to as services mutually exclusive with the headset fit test) at this time: playing music (i.e., playing media services), playing long prompt sounds (i.e., playing long prompt sound services), making calls (i.e., making calls), waking up the voice assistant (i.e., waking up the voice assistant service), etc. Since the media playing services and the long prompt sound playing services will play audio, and the call services and the voice assistant waking up services will change the noise reduction parameters of the headset because they need to collect voice and reduce noise, the accuracy of the headset fit test will be reduced.
  • services mutually exclusive with the headset fit test if the headset starts one of the following services (referred to as services mutually exclusive with the headset fit test) at this time: playing music (i.e., playing media services), playing long prompt sounds (i.e., playing long prompt sound services), making calls (i.e., making calls), waking up the voice assistant (i.
  • the long prompt tone playing involved in this application includes but is not limited to playing incoming call prompt tone, playing outgoing call prompt tone, playing text-to-speech (TTS) audio (such as TTS audio for reporting body temperature), playing custom audio, etc.
  • TTS text-to-speech
  • the headphone application (application, APP) in the electronic device (such as a mobile phone) makes the decision. For example, when the music application in the electronic device controls the headphone to play music, the user operates the headphone application to perform the headphone fit detection. The headphone application then controls the music application to pause music, lower the music volume, or adjust the music volume to silent. The headphone application transmits audio for headphone fit detection to the headphone. After the headphone completes the headphone fit detection, the headphone application controls the music application to resume playing music or restore the music volume to the original volume.
  • the headphone application application, APP
  • the electronic device such as a mobile phone
  • the permissions open to headphone applications are relatively large, and music applications can be controlled in the above-mentioned manner to handle the above-mentioned mutually exclusive scenarios; while for other operating systems, the permissions open to headphone applications are limited, and headphone applications are not supported to control music applications, and the above-mentioned mutually exclusive scenarios cannot be handled.
  • the same type of headphones are connected to electronic devices with different operating systems, the same mutually exclusive scenarios are handled differently, causing trouble for users.
  • the music volume is reduced, it still interferes with the audio required for the headphone fit test, which may lead to inaccurate test results.
  • the preset audio for the earphone fit test will be played at the same time, causing mixing problems; pausing the music or adjusting the music volume to silent until the music volume headset completes the earphone fit test, and then resuming the music to the original volume will also cause the music to be sometimes loud and sometimes soft, affecting the user experience; lowering the music volume until the music volume headset completes the earphone fit test, and then resuming the music to the original volume will also cause the music to be sometimes loud and sometimes soft, also affecting the user experience.
  • the headphone processes mutually exclusive scenarios of the headphone fit detection, lowers the priority of the headphone fit detection, and prohibits the headphone fit detection when the headphone detects that the ongoing service is mutually exclusive with the headphone fit detection, or interrupts the headphone fit detection when the headphone performs the headphone fit detection and also performs services mutually exclusive with the headphone fit detection. Since the headphone processes mutually exclusive scenarios of the headphone fit detection and does not rely on the permissions opened by the operating system to the headphone application, it is compatible with multiple operating systems, thereby improving the compatibility of the headphone fit detection function. Moreover, since it will not interrupt or affect the currently processed services that are mutually exclusive with the headphone fit detection, it will not affect the user experience.
  • the headset fit detection method includes:
  • S201 The electronic device sends a service start command to the headset.
  • the first application in the electronic device sends a service start command to the earphone, and correspondingly, the earphone receives the service start command from the first application in the electronic device.
  • the first application in the electronic device can send a service start command to the main earphone and the auxiliary earphone respectively, that is, the earphone in FIG5 can be the main earphone or the auxiliary earphone; or, as shown in S201a and S201b in FIG6, in binaural mode, the first application in the electronic device sends a service start command to the main earphone, and the main earphone forwards the received service start command to the auxiliary earphone.
  • the first application refers to an application other than the headset application, such as a music player, phone software, voice assistant, video software, etc.
  • the headset application refers to an application used in conjunction with the headset, which can configure the headset (for example, configure headset fit detection parameters (such as noise reduction parameters), perform headset fit detection, etc.), perform online upgrades on the headset, etc.
  • the service start command is used to instruct the headset to start a first service, where the first service refers to: a service for changing the noise reduction parameters of the headset, or a service for playing other audio except the audio required for the headset fit test.
  • the audio required for the headset fit test refers to the preset audio mentioned above, which is pre-stored in the headset when the headset leaves the factory.
  • the service of changing the noise reduction parameters of the headset may include at least one of the following services: waking up the voice assistant service, calling service, etc.
  • the electronic device transmits the audio data of these services to the headset through the voice transmission channel.
  • the voice transmission channel may be a SCO channel.
  • These services require voice collection and noise reduction, and thus will change the noise reduction parameters of the headset.
  • the headset fit detection when performing the headset fit detection, the headset will play the preset audio according to the preset headset fit detection parameters (such as noise reduction parameters), so these services will reduce the accuracy of the headset fit detection.
  • the service of playing other audios besides the audios required for earphone fit detection may include at least one of the following services: playing media services (such as playing music), playing long prompt tone services (such as playing incoming call prompts),
  • the electronic device transmits the audio data of these services to the headset through the audio transmission channel.
  • the audio transmission channel can be an A2DP channel.
  • These services will play audio other than the preset audio.
  • the earphone fit detection when performing the earphone fit detection, the earphone will play the preset audio according to the preset earphone fit detection parameters (such as noise reduction parameters). Therefore, the audio played by these services will be mixed with the preset audio, thereby reducing the accuracy of the earphone fit detection.
  • the service start command may be a state switching command for a voice transmission channel (e.g., a SCO channel), and the state switching command for a voice transmission channel (e.g., a SCO channel) instructs the headset to switch the voice transmission channel (e.g., a SCO channel) from an idle state to a connected state, thereby instructing the headset to start a first service (e.g., a wake-up voice assistant service, a call service).
  • a first service e.g., a wake-up voice assistant service, a call service.
  • the voice transmission channel is occupied in a connected state and is not occupied in an idle state.
  • the service start command may be a state switching command for an audio transmission channel (e.g., an A2DP channel), and the state switching command for an audio transmission channel (e.g., an A2DP channel) instructs the headset to switch the audio transmission channel (e.g., an A2DP channel) from an idle state to a play state or a pause state, thereby instructing the headset to start a first service (e.g., a play media service, a play long prompt tone service).
  • the audio transmission channel of the headset stops playing audio in an idle state, plays audio in a play state, and pauses playing audio in a pause state.
  • the audio transmission channel is occupied in a play state or a pause state, and is not occupied in an idle state.
  • the triggering conditions for the electronic device to send a service start command to the headset include but are not limited to: exemplarily, as shown in A in Figure 7, the user clicks the music play button S in the music player (i.e., the first application mentioned above), which will trigger the music player to play music through the headset (i.e., trigger the media playback service); the user triggers the headset to play the temperature measurement TTS audio through the temperature measurement application in the electronic device (i.e., trigger the long prompt tone playback service); the user clicks the dial button to make a call, which will trigger the headset to play the outgoing call prompt tone (i.e., trigger the long prompt tone playback service); the electronic device is called, which will trigger the headset to play the incoming call prompt tone (i.e., trigger the long prompt tone playback service); the user clicks the answer button to make a call, which will trigger the headset to transmit voice (i.e., trigger the call service); the user speaks a keyword to the electronic device
  • S202 The headset starts a first service.
  • the main earphone and the auxiliary earphone respectively start the first service.
  • the main earphone and the auxiliary earphone will pass the service start command received by the Bluetooth driver layer to their respective application layers, and the application layer will start the first service.
  • the Bluetooth driver layer of the earphone is used to realize Bluetooth communication between the earphone and the electronic device, such as transmitting commands, audio data, voice data, etc.; the application layer is used to start the first service, perform earphone fit detection, etc.
  • the service startup command is a state switching command of a voice transmission channel (such as a SCO channel)
  • the state switching command of the voice transmission channel instructs the headset to switch the voice transmission channel (such as a SCO channel) from an idle state to a connected state.
  • the application layer of the headset switches the voice transmission channel (such as a SCO channel) from an idle state to a connected state, and starts the first service.
  • the speaker in the headset plays audio from the electronic device and sends the ambient sound collected by the microphone to the electronic device.
  • the service start command is a state switching command for an audio transmission channel (eg, an A2DP channel)
  • the state switching command for an audio transmission channel instructs the headset to switch the audio transmission channel (eg, an A2DP channel) to the state of the audio transmission channel.
  • the audio transmission channel for example, the A2DP channel
  • the application layer of the headset switches the audio transmission channel (for example, the A2DP channel) from an idle state to a play state or a pause state, and starts a first service. For example, for starting a media playback service or a long prompt tone playback service, the speaker in the headset plays the audio from the electronic device.
  • the headset After the headset starts the first service, it can send a startup indication message to the first application in the electronic device to indicate that the first service has been started. At this time, the first application can display a prompt message to indicate to the user that the headset is currently running the first service. For example, as shown in B in FIG7 , the music player in the electronic device can display an interface "Playing XXXXX" to prompt the user that music is being played through the headset.
  • S203 The electronic device sends a fit detection command to the earphone.
  • the earphone application in the electronic device sends a fit detection command to the earphone, and accordingly, the earphone receives the fit detection command from the earphone application in the electronic device.
  • the earphone application in the electronic device can send fit detection commands to the main earphone and the auxiliary earphone respectively, that is, the earphone in Figure 5 can be the main earphone or the auxiliary earphone; or, as shown in S203a and S203b in Figure 6, in binaural mode, the earphone application in the electronic device sends a fit detection command to the main earphone, and the main earphone forwards the received fit detection command to the auxiliary earphone.
  • the fit detection command is used to instruct the earphone to perform an earphone fit detection.
  • the triggering conditions for the electronic device to send a fit detection command to the earphone may include but are not limited to: the earphone application in the electronic device displays the "earphone fit detection" interface, and the user clicks the earphone fit detection button T.
  • the earphone application in the electronic device displays "Please wait while the earphone fit detection is in progress", and if the user clicks the earphone fit detection button T at this time, the earphone fit detection can be stopped.
  • the earphone can send the detection result to the earphone application in the electronic device to indicate that the earphone fit detection and the fit of each earphone have been completed.
  • the earphone application can display a prompt message to indicate that the user has completed the earphone fit detection and the fit of each earphone.
  • the earphone application in the electronic device may display “Good fit” (for example, the right earphone R in FIG8 ); if the fit of one earphone is poor, the earphone application in the electronic device may display “Please readjust” (for example, the left earphone L in FIG8 ); if the user readjusts the earphones, he or she may click the earphone fit test button T to re-perform the earphone fit test.
  • S204 The headset determines whether the ongoing first service and the headset fit detection are mutually exclusive.
  • the headset determines whether a service that is mutually exclusive with the headset fit detection is in progress.
  • both the main headset and the auxiliary headset need to determine whether the first service they are performing is mutually exclusive with the headset fit detection.
  • the main headset and the auxiliary headset will pass the fit detection command received by the Bluetooth driver layer to their respective application layers, and the application layer will determine whether the first service being performed is mutually exclusive with the headset fit detection.
  • the application layer of the headset can determine that the first service being carried out (such as waking up the voice assistant service, calling service) and the headset fit detection are mutually exclusive by determining that the voice transmission channel of the headset (such as the SCO channel) is in a connected state.
  • the application layer of the headset can determine that the first service being carried out (such as playing media service, playing long-pitch video) is mutually exclusive by determining that the audio transmission channel of the headset (such as the A2DP channel) is in a playing state or a paused state.
  • the sound indication service is mutually exclusive with the earphone fit detection.
  • the application layer of the headset can determine that the ongoing first service and the headset fit detection are not mutually exclusive by determining that the voice transmission channel of the headset (such as the SCO channel) is in a disconnected state and the audio transmission channel of the headset (such as the A2DP channel) is in an idle state.
  • the voice transmission channel of the headset such as the SCO channel
  • the audio transmission channel of the headset such as the A2DP channel
  • both the primary earphone and the secondary earphone need to prohibit themselves from performing earphone fit detection.
  • the earphone will not play the preset audio through the speaker, will not receive the sound through the microphone, and will not perform earphone fit detection through the processor.
  • S206 The headset sends first error indication information to the electronic device.
  • the earphone sends the first error indication information to the earphone application in the electronic device, and correspondingly, the earphone application in the electronic device receives the first error indication information from the earphone.
  • the main earphone and the auxiliary earphone can respectively send their respective first error indication information to the electronic device, that is, the earphone in FIG5 can be the main earphone or the auxiliary earphone; or, as shown in S206a and S206b in FIG6, in binaural mode, the auxiliary earphone sends the first error indication information of the auxiliary earphone to the electronic device through the main earphone, that is, the auxiliary earphone sends the first error indication information of the auxiliary earphone to the main earphone, and the main earphone sends the first error indication information of the main earphone and the first error indication information of the auxiliary earphone to the earphone application in the electronic device.
  • the first error indication information of the main earphone and the first error indication information of the auxiliary earphone can
  • the first error indication information is used to instruct the earphone to prohibit the earphone fit detection.
  • the first error indication information of the main earphone is used to instruct the main earphone to prohibit the earphone fit detection
  • the first error indication information of the auxiliary earphone is used to instruct the auxiliary earphone to prohibit the earphone fit detection.
  • the first error indication information may be in the form of an error code, and the error codes used by the first error indication information of the main earphone and the first error indication information of the auxiliary earphone are different.
  • the first error indication information of the main earphone may be represented by a binary number 00
  • the first error indication information of the auxiliary earphone may be represented by a binary number 01.
  • S207 The electronic device displays a first prompt message.
  • the electronic device After the electronic device receives the first error indication information from the earphone, it can display the first prompt information on the display screen. In binaural mode, the electronic device can display the first prompt information on the display screen as long as it receives at least one of the first error indication information of the main earphone or the first error indication information of the auxiliary earphone.
  • the first prompt information is used to prompt the user that the earphone fit detection can only be started if the ongoing first service that is mutually exclusive with the earphone fit detection is stopped. Exemplarily, as shown in C in FIG.
  • the earphone application of the electronic device can display "Unable to perform earphone fit detection, the current earphone is occupied" to prompt the user that if the earphone fit detection is to be performed, it is necessary to stop the ongoing first service that is mutually exclusive with the earphone fit detection to avoid reducing the accuracy of the earphone fit detection.
  • the earphone fit detection method provided in the embodiment of the present application is that the earphone is already performing a first service, and the first service can change the noise reduction parameter of the earphone, or play audio other than the audio required for earphone fit detection. Other audio will reduce the accuracy of the headphone fit detection.
  • the headset receives a fit detection command (the fit detection command is used to instruct the headset to perform a headphone fit detection), the headset prohibits the headphone fit detection (that is, the headphone fit detection is not started). Therefore, the headset executes the control logic to avoid conflicts with the first business by lowering the priority of the headphone fit detection, and does not rely on the permissions opened to the headphone application by the operating system in the electronic device.
  • the headset handles mutually exclusive scenarios in a consistent manner, thereby improving the compatibility of the headphone fit detection.
  • the headset can also send a first error indication message to the electronic device to instruct the headset to prohibit the headphone fit detection, so that the electronic device can remind the user.
  • the headset fit detection method includes:
  • the electronic device sends a fit detection command to the earphone.
  • the earphone application in the electronic device sends a fit detection command to the earphone, and accordingly, the earphone receives the fit detection command from the earphone application in the electronic device.
  • the earphone application in the electronic device can send fit detection commands to the main earphone and the auxiliary earphone respectively, that is, the earphone in Figure 10 can be the main earphone or the auxiliary earphone; or, as shown in S301a and S301b in Figure 11, in binaural mode, the earphone application in the electronic device sends a fit detection command to the main earphone, and the main earphone forwards the received fit detection command to the auxiliary earphone.
  • the earphone application in the electronic device displays an “earphone fit detection” interface.
  • step S301 refers to step S203 and are not repeated here.
  • S302 The earphone determines whether a first service that is mutually exclusive with the earphone fit detection is being performed.
  • both the main earphone and the auxiliary earphone need to determine whether they are performing a first service that is mutually exclusive with the earphone fit detection. Specifically, the main earphone and the auxiliary earphone will pass the fit detection command received by the Bluetooth driver layer to their respective application layers, and the application layer will determine whether the first service that is mutually exclusive with the earphone fit detection is being performed.
  • step S201 Regarding the first service, refer to step S201 and will not be described in detail here.
  • the application layer of the headset can determine that the first service that is mutually exclusive with the headset fit detection (such as the wake-up voice assistant service and the call service) is being performed by determining that the headset's voice transmission channel (such as the SCO channel) is in a connected state.
  • the application layer of the headset can determine that the first service that is mutually exclusive with the headset fit detection (such as the media playback service and the long prompt tone playback service) is being performed by determining that the headset's audio transmission channel (such as the A2DP channel) is in a playing state or a paused state.
  • the voice transmission channel of the headset When the voice transmission channel of the headset is in the connected state, it indicates that the electronic device is transmitting audio data of the call service or the voice assistant wake-up service to the headset through the voice transmission channel of the headset.
  • the audio transmission channel of the headset When the audio transmission channel of the headset is in the playing state or the paused state, it indicates that the electronic device is transmitting audio data of the media playback service or the long prompt tone playback service to the headset through the audio transmission channel of the headset. Both of these will reduce the accuracy of the headset fit detection.
  • the application layer of the headset can determine that the headset is not performing a first service that is mutually exclusive with the headset fit detection by determining that the voice transmission channel of the headset (such as the SCO channel) is in a disconnected state and the audio transmission channel of the headset (such as the A2DP channel) is in an idle state.
  • the voice transmission channel of the headset such as the SCO channel
  • the audio transmission channel of the headset such as the A2DP channel
  • the voice transmission channel of the headset When the voice transmission channel of the headset is disconnected, it means that the electronic device is not transmitting the voice through the headset.
  • the audio transmission channel of the headset transmits audio data for call services or voice assistant wake-up services to the headset.
  • the audio transmission channel of the headset When the audio transmission channel of the headset is idle, it indicates that the electronic device is not transmitting audio data for media playback services or long prompt tone playback services to the headset through the audio transmission channel of the headset. Therefore, the accuracy of headset fit detection will not be reduced.
  • the primary earphone and the secondary earphone each determine that they are not performing a first service that is mutually exclusive with the earphone fit detection, and start the earphone fit detection.
  • the speaker in the headphone plays a preset audio according to preset headphone fit detection parameters (such as noise reduction parameters), and the microphone in the headphone (located outside the ear canal) collects the ambient sound (including the preset audio leaked from the gap between the ear canal and the headphone).
  • the headphone determines the leakage value of the preset audio by analyzing the played preset audio and the received leaked preset audio. The smaller the leakage value, the closer the user's ear canal and the headphone fit.
  • the headphone application in the electronic device displays “Headphone fit detection in progress, please wait...”, and if the user clicks the headphone fit detection button T at this time, the headphone fit detection can be stopped.
  • S304 The electronic device sends a service start command to the headset.
  • the first application in the electronic device sends a service start command to the earphone, and correspondingly, the earphone receives the service start command from the electronic device.
  • the first application of the electronic device can send a service start command to the main earphone and the auxiliary earphone respectively, that is, the earphone in Figure 10 can be the main earphone or the auxiliary earphone; or, as shown in S304a and S304b in Figure 11, in binaural mode, the first application of the electronic device sends a service start command to the main earphone, and the main earphone forwards the received service start command to the auxiliary earphone.
  • the service start command is used to instruct the headset to start the first service.
  • the service start command can be a state switching command of a voice transmission channel (such as a SCO channel), and the state switching command of a voice transmission channel (such as a SCO channel) instructs the headset to switch the voice transmission channel (such as a SCO channel) from an idle state to a connected state, thereby instructing the headset to start the first service (such as a wake-up voice assistant service, a call service).
  • the service start command can be a state switching command of an audio transmission channel (such as an A2DP channel), and the state switching command of an audio transmission channel (such as an A2DP channel) instructs the headset to switch the audio transmission channel (such as an A2DP channel) from an idle state to a play state or a pause state, thereby instructing the headset to start the first service (such as a play media service, a play long prompt tone service).
  • an audio transmission channel such as an A2DP channel
  • the state switching command of an audio transmission channel such as an A2DP channel
  • the headset instructs the headset to switch the audio transmission channel (such as an A2DP channel) from an idle state to a play state or a pause state, thereby instructing the headset to start the first service (such as a play media service, a play long prompt tone service).
  • the music player i.e., the first application described above
  • clicks the play button S the music player sends a service start command to the earphone to instruct the earphone to play music.
  • step S304 The rest of the contents of step S304 refer to step S201 and will not be repeated here.
  • the main earphone and the auxiliary earphone each interrupt the earphone fit detection and start the first service which is mutually exclusive with the earphone fit detection.
  • the main earphone and the auxiliary earphone will pass the service start command received by the Bluetooth driver layer to their respective application layers, and the application layer will interrupt the earphone fit detection. Detect and start the first service that is mutually exclusive with the earphone fit detection.
  • the headset Before the headset completes the headset fit detection, it may mean that: the headset is playing the preset audio through the speaker, playing the preset audio through the speaker, and performing the headset fit detection through the processor.
  • the headset interrupting the headset fit detection may mean that: the headset stops playing the preset audio through the speaker, stops receiving sound through the microphone, and stops performing the headset fit detection through the processor.
  • the headset After the headset starts the first service, it can send a startup indication message to the first application in the electronic device to indicate that the first service has been started. At this time, the first application can display a prompt message to indicate to the user that the headset is currently running the first service. For example, as shown in D in FIG12, the music player in the electronic device can display an interface "Playing XXXXX" to prompt the user that music is being played through the headset.
  • step S305 The rest of the contents of step S305 refer to step S202 and will not be repeated here.
  • the headset sends second error indication information to the electronic device.
  • the earphone sends the second error indication information to the earphone application in the electronic device, and correspondingly, the earphone application in the electronic device receives the second error indication information from the earphone.
  • the main earphone and the auxiliary earphone can respectively send their own second error indication information to the earphone application in the electronic device, that is, the earphone in Figure 10 can be the main earphone or the auxiliary earphone; or, as shown in S306a and S306b in Figure 11, in binaural mode, the auxiliary earphone sends the second error indication information of the auxiliary earphone to the electronic device through the main earphone, that is, the auxiliary earphone sends the second error indication information of the auxiliary earphone to the main earphone, and the main earphone sends the second error indication information of the main earphone and the second error indication information of the auxiliary earphone to the earphone application in the electronic device.
  • the second error indication information is used to instruct the earphone to interrupt the earphone fit detection.
  • the second error indication information of the main earphone is used to instruct the main earphone to interrupt the earphone fit detection
  • the second error indication information of the auxiliary earphone is used to instruct the auxiliary earphone to interrupt the earphone fit detection.
  • the second error indication information may be in the form of an error code, and the second error indication information of the main earphone and the second error indication information of the auxiliary earphone may use different error codes.
  • the second error indication information of the main earphone may be represented by a binary number 10
  • the second error indication information of the auxiliary earphone may be represented by a binary number 11.
  • S307 The electronic device displays a second prompt message.
  • the second prompt information can be displayed on the display screen.
  • the second prompt information is used to prompt the user that the earphone has interrupted the earphone fit detection.
  • the earphone application of the electronic device can display "The earphone fit detection has been interrupted and the current earphone is occupied" to prompt the user that the earphone has interrupted the earphone fit detection due to the ongoing first business.
  • the headphone when the headphone is already performing the headphone fit detection, if a command is received instructing the headphone to perform a first service that is mutually exclusive with the headphone fit detection, the headphone interrupts the headphone fit detection.
  • the first service that is mutually exclusive with the headphone fit detection may change the noise reduction parameters of the headphone, or play audio other than the audio required for the headphone fit detection, resulting in reduced accuracy of the headphone fit detection. Therefore, the headphone executes the control logic to avoid conflicts with the first service by lowering the priority of the headphone fit detection, and does not rely on the permissions opened to the headphone application by the operating system in the electronic device.
  • the headset handles mutually exclusive scenarios in a consistent manner, thereby improving the compatibility of the headset fit detection.
  • the headset may also send a second error indication message to the electronic device to instruct the headset to interrupt the headset fit detection, so that the electronic device can remind the user.
  • an embodiment of the present application further provides a chip system.
  • the chip system 60 includes at least one processor 601 and at least one interface circuit 602. At least one processor 601 and at least one interface circuit 602 can be interconnected via lines.
  • the processor 601 is used to support the headset to implement the various steps in the above method embodiments, such as the methods shown in FIG5 , FIG6 , FIG10 , and FIG11 , and at least one interface circuit 602 can be used to receive signals from other devices (such as a memory) or send signals to other devices (such as a communication interface).
  • the chip system may include a chip and may also include other discrete devices.
  • An embodiment of the present application also provides a computer-readable storage medium, which includes instructions.
  • the instructions When the instructions are executed on the above-mentioned earphones, the earphones execute the various steps in the above-mentioned method embodiments, such as executing the methods shown in Figures 5, 6, 10, and 11.
  • An embodiment of the present application also provides a computer program product including instructions.
  • the instructions When the instructions are executed on the above-mentioned earphones, the earphones execute the various steps in the above-mentioned method embodiments, for example, execute the methods shown in Figures 5, 6, 10, and 11.
  • the size of the serial numbers of the above-mentioned processes does not mean the order of execution.
  • the execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.
  • modules and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
  • the disclosed systems, devices and methods can be implemented in other ways.
  • the device embodiments described above are only schematic.
  • the division of the modules is only a logical function division. There may be other division methods in actual implementation, such as multiple modules or components can be combined or integrated into another device, or some features can be ignored or not executed.
  • Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or modules, which can be electrical, mechanical or other forms.
  • modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical modules, that is, they may be located in one device or distributed on multiple devices. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
  • each functional module in each embodiment of the present application may be integrated into one device, or each module may exist physically separately, or two or more modules may be integrated into one device.
  • the computer program product includes one or more computer instructions.
  • the computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device.
  • the computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium.
  • the computer instructions may be transmitted from a website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (digital subscriber line, DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server or data center.
  • wired e.g., coaxial cable, optical fiber, digital subscriber line (digital subscriber line, DSL)
  • wireless e.g., infrared, wireless, microwave, etc.
  • the computer-readable storage medium may be any available medium that a computer can access or may contain one or more servers, data centers and other data storage devices that can be integrated with the medium.
  • the available medium may be a magnetic medium (e.g., a floppy disk, a hard disk, a magnetic tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid state disk (SSD)), etc.
  • a magnetic medium e.g., a floppy disk, a hard disk, a magnetic tape
  • an optical medium e.g., a DVD
  • a semiconductor medium e.g., a solid state disk (SSD)

Landscapes

  • Headphones And Earphones (AREA)
  • Telephone Function (AREA)

Abstract

本申请公开了一种耳机贴合度检测方法和耳机,涉及电子技术领域,用于实现由耳机对耳机贴合度检测的互斥场景进行处理,以提高耳机贴合度检测功能的兼容性。应用于耳机的耳机贴合度检测方法包括:启动第一业务;第一业务指:改变耳机的降噪参数的业务,或者,播放除了耳机贴合度检测所需音频之外的其他音频的业务;从电子设备接收贴合度检测命令,贴合度检测命令用于指示耳机进行耳机贴合度检测;确定正在进行的第一业务与耳机贴合度检测互斥;禁止耳机贴合度检测。

Description

耳机贴合度检测方法和耳机
本申请要求于2022年12月9日提交国家知识产权局、申请号为202211580027.3、发明名称为“耳机贴合度检测方法和耳机”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及电子技术领域,尤其涉及一种耳机贴合度检测方法和耳机。
背景技术
入耳式真实无线立体声(true wireless stereo,TWS)耳机可以通过耳机贴合度检测功能来判断用户的耳道与耳机是否贴合。耳机贴合度检测的基本原理是:当耳机中的扬声器部分插入用户的耳道后,耳机中的扬声器按照预设的耳机贴合度检测参数(例如降噪参数)播放一段预置音频,耳机中的麦克风(位于耳道外面)对环境音(其中包括了从耳道与耳机之间缝隙泄露的预置音频)进行收音,耳机通过分析播放的预置音频和接收到的泄漏的预置音频来确定预置音频的泄露值,该泄露值越小则用户的耳道与耳机越贴合。在一些场景下,在进行耳机贴合度检测期间,如果耳机播放其他声音或者改变了降噪参数,都会影响耳机贴合度检测的准确性,简称这种场景为耳机贴合度检测的互斥场景。
现有技术中,电子设备侧的耳机应用对这种互斥场景进行处理,但是对于电子设备的某些操作系统来说,耳机应用的权限有限,造成同一种耳机连接采用不同操作系统的电子设备后,在进行耳机贴合度检测时,对同一种互斥场景的处理方式不同,给用户造成困扰。
发明内容
本申请实施例提供一种耳机贴合度检测方法和耳机,用于实现由耳机对耳机贴合度检测的互斥场景进行处理,以提高耳机贴合度检测功能的兼容性。
为达到上述目的,本申请的实施例采用如下技术方案:
第一方面,提供了一种耳机贴合度检测方法,应用于耳机,该方法包括:从电子设备接收业务启动命令,业务启动命令用于指示耳机启动第一业务,第一业务指:改变耳机的降噪参数的业务,或者,播放除了耳机贴合度检测所需音频之外的其他音频的业务;启动第一业务;从电子设备接收贴合度检测命令,贴合度检测命令用于指示耳机进行耳机贴合度检测;如果确定正在进行的第一业务与耳机贴合度检测互斥,则禁止耳机贴合度检测。
本申请实施例提供的耳机贴合度检测方法,耳机已经在进行第一业务,第一业务可以改变耳机的降噪参数的业务,或者,播放除了耳机贴合度检测所需音频之外的其他音频,会导致耳机贴合度检测的准确性降低。此时,如果耳机接收到贴合度检测命令(贴合度检测命令用于指示耳机进行耳机贴合度检测),则耳机禁止耳机贴合度检测(即不启动耳机贴合度检测)。因此,由耳机执行控制逻辑,通过降低耳机贴合度检测的优先级,来避免与第一业务冲突,不会依赖电子设备中操作系统开放给耳机应 用的权限,对于采用不同操作系统的电子设备来说,耳机对互斥场景的处理是一致的,因此可以提高耳机贴合度检测的兼容性。
在一种可能的实施方式中,第一业务包括以下业务中的至少一项:播放媒体业务、通话业务、播放长提示音业务、唤醒语音助手业务。
由于播放媒体业务、播放长提示音业务等会播放音频,通话业务、唤醒语音助手业务会因为需要采集语音并降低噪音而改变耳机的降噪参数,所以都会造成耳机贴合度检测的准确性降低。
在一种可能的实施方式中,第一业务为通话业务或唤醒语音助手业务,确定正在进行的第一业务与耳机贴合度检测互斥,包括:确定耳机的语音传输通道处于连接状态。
当耳机的语音传输通道处于连接状态时,表明电子设备正在通过耳机的语音传输通道与耳机传输通话业务或唤醒语音助手业务的音频数据。
在一种可能的实施方式中,语音传输通道为面向同步连接(synchronous connection oriented,SCO)通道。
本申请不限定语音传输通道的具体类型,随着协议演变还可以为其他类型的通道。
在一种可能的实施方式中,第一业务为播放媒体业务或播放长提示音业务,确定正在进行的第一业务与耳机贴合度检测互斥,包括:确定耳机的音频传输通道处于播放状态或暂停状态。
当耳机的音频传输通道处于播放状态或暂停状态时,表明电子设备正在通过耳机的音频传输通道与耳机传输播放媒体业务或播放长提示音业务的音频数据。
在一种可能的实施方式中,音频传输通道为高级音频分发配置文件(advanced audio distribution profile,A2DP)通道。
本申请不限定音频传输通道的具体类型,随着协议演变还可以为其他类型的通道。
在一种可能的实施方式中,在确定正在进行的第一业务与耳机贴合度检测互斥之后,该方法还包括:向电子设备发送第一错误指示信息,第一错误指示信息用于指示耳机禁止进行耳机贴合度检测。
使得电子设备可以提示用户,如果要进行耳机贴合度检测,则需要停止正在进行的与耳机贴合度检测互斥的第一业务,以避免降低耳机贴合度检测的准确性。
第二方面,提供了一种耳机贴合度检测方法,应用于耳机,该方法包括:从电子设备接收贴合度检测命令,贴合度检测命令用于指示耳机进行耳机贴合度检测;如果确定未在进行与耳机贴合度检测互斥的第一业务,则启动耳机贴合度检测,第一业务指:改变耳机的降噪参数的业务,或者,播放除了耳机贴合度检测所需音频之外的其他音频的业务;在完成耳机贴合度检测之前,如果从电子设备接收业务启动命令,则中断耳机贴合度检测并启动第一业务,业务启动命令用于指示耳机启动第一业务。
本申请实施例提供的耳机贴合度检测方法,当耳机已经在进行耳机贴合度检测时,如果接收到指示耳机进行与耳机贴合度检测互斥的第一业务的命令,则耳机中断耳机贴合度检测。与耳机贴合度检测互斥的第一业务可能改变耳机的降噪参数,或者,播放除了耳机贴合度检测所需音频之外的其他音频,导致耳机贴合度检测的准确性降低。因此,由耳机执行控制逻辑,通过降低耳机贴合度检测的优先级,来避免与第一业务 冲突,不会依赖电子设备中操作系统开放给耳机应用的权限,对于采用不同操作系统的电子设备来说,耳机对互斥场景的处理是一致的,因此可以提高耳机贴合度检测的兼容性。
在一种可能的实施方式中,第一业务包括以下业务中的至少一项:播放媒体业务、通话业务、播放长提示音业务、唤醒语音助手业务。
由于播放媒体业务、播放长提示音业务等会播放音频,通话业务、唤醒语音助手业务会因为需要采集语音并降低噪音而改变耳机的降噪参数,所以都会造成耳机贴合度检测的准确性降低。
在一种可能的实施方式中,第一业务为通话业务或唤醒语音助手业务,确定未在进行与耳机贴合度检测互斥的第一业务,包括:确定耳机的语音传输通道处于断开状态,并且,确定耳机的音频传输通道处于空闲状态。
当耳机的语音传输通道处于断开状态时,表明电子设备没有在通过耳机的语音传输通道与耳机传输通话业务或唤醒语音助手业务的音频数据。当耳机的音频传输通道处于空闲状态时,表明电子设备也没有在通过耳机的音频传输通道与耳机传输播放媒体业务或播放长提示音业务的音频数据。因此,不会造成耳机贴合度检测的准确性降低。
在一种可能的实施方式中,语音传输通道为SCO通道。本申请不限定语音传输通道的具体类型,随着协议演变还可以为其他类型的通道。
在一种可能的实施方式中,音频传输通道为A2DP通道。本申请不限定音频传输通道的具体类型,随着协议演变还可以为其他类型的通道。
在一种可能的实施方式中,第一业务为播放媒体业务或播放长提示音业务,业务启动命令为音频传输通道的状态切换命令,用于指示耳机将音频传输通道从空闲状态切换至播放状态或暂停状态。
即电子设备指示耳机将通过耳机的音频传输通道传输播放媒体业务或播放长提示音业务的音频数据,会降低耳机贴合度检测的准确性。
在一种可能的实施方式中,第一业务为通话业务或唤醒语音助手业务,业务启动命令为语音传输通道的状态切换命令,用于指示耳机将语音传输通道从空闲状态切换至连接状态。
即电子设备指示耳机将通过耳机的语音传输通道传输通话业务或唤醒语音助手业务的音频数据,会降低耳机贴合度检测的准确性。
在一种可能的实施方式中,在从电子设备接收业务启动命令之后,则该方法还包括:向电子设备发送第二错误指示信息,第二错误指示信息用于指示耳机中断耳机贴合度检测。
使得电子设备可以提示用户,耳机已经因为正在进行的第一业务而中断耳机贴合度检测。
第三方面,提供了一种耳机,包括处理器和存储器,存储器中存储指令,当处理器执行指令时,如第一方面至第二方面及其任一实施方式所述的方法被执行。
第四方面,提供了一种计算机可读存储介质,包括指令,当指令在耳机上运行时,使得耳机执行如第一方面至第二方面及其任一实施方式所述的方法。
第五方面,提供了一种包含指令的计算机程序产品,当指令在上述耳机上运行时,使得该耳机执行如第一方面至第二方面及其任一实施方式所述的方法。
第六方面,提供了一种芯片系统,该芯片系统包括处理器,用于支持耳机实现上述第一方面至第二方面中所涉及的功能。在一种可能的设计中,该装置还包括接口电路,接口电路可用于从其它装置(例如存储器)接收信号,或者,向其它装置(例如通信接口)发送信号。该芯片系统可以包括芯片,还可以包括其他分立器件。
第三方面至第六方面的技术效果参照第一方面至第二方面及其任一实施方式的技术效果,在此不再重复。
附图说明
图1为本申请实施例提供的一种通信系统的架构示意图;
图2为本申请实施例提供的一种耳机的结构示意图;
图3为本申请实施例提供的一种耳机贴合度检测方法的流程示意图;
图4为本申请实施例提供的一种与耳机贴合度检测互斥场景的示意图;
图5为本申请实施例提供的一种耳机贴合度检测方法的流程示意图之一;
图6为本申请实施例提供的一种耳机贴合度检测方法的流程示意图之二;
图7为本申请实施例提供的一种电子设备上的音乐播放器的显示界面的示意图;
图8为本申请实施例提供的一种电子设备上的耳机贴合度检测的显示界面的示意图;
图9为本申请实施例提供的一种电子设备上的音乐播放器和耳机贴合度检测的显示界面的示意图之一;
图10为本申请实施例提供的一种耳机贴合度检测方法的流程示意图之三;
图11为本申请实施例提供的一种耳机贴合度检测方法的流程示意图之四;
图12为本申请实施例提供的一种电子设备上的音乐播放器和耳机贴合度检测的显示界面的示意图之二;
图13为本申请实施例提供的一种芯片系统的结构示意图。
具体实施方式
首先对本申请涉及的一些概念进行描述。
本申请实施例涉及的术语“第一”、“第二”等仅用于区分同一类型特征的目的,不能理解为用于指示相对重要性、数量、顺序等。
本申请实施例涉及的术语“示例性的”或者“例如”等词用于表示作例子、例证或说明。本申请中被描述为“示例性的”或者“例如”的任何实施例或设计方案不应被解释为比其他实施例或设计方案更优选或更具优势。确切而言,使用“示例性的”或者“例如”等词旨在以具体方式呈现相关概念。
本申请实施例涉及的术语“耦合”、“连接”应做广义理解,例如,可以指物理上的直接连接,也可以指通过电子器件实现的间接连接,例如通过电阻、电感、电容或其他电子器件实现的连接。
首先,本申请实施例介绍一种包括电子设备和耳机的通信系统,电子设备可以向耳机传输音频数据(例如播放音乐),或者,与耳机互相传输语音数据(例如通话)。然后,介绍了现有技术中电子设备和耳机进行耳机贴合度检测的流程。在一些场景下, 在进行耳机贴合度检测期间,如果耳机还在播放其他声音或者改变了降噪参数(即进行耳机贴合度检测的互斥的业务),都会影响耳机贴合度检测的准确性,并具体介绍了影响耳机贴合度检测准确性的几种场景,本申请统称这几种场景为耳机贴合度检测的互斥场景。然后,介绍本申请实施例提供的耳机贴合度检测方法,当耳机检测到正在进行的业务与耳机贴合度检测互斥时,禁止耳机贴合度检测,或者,当耳机已经在进行耳机贴合度检测还要进行与耳机贴合度检测互斥的业务时,中断耳机贴合度检测。从而实现对耳机贴合度检测的互斥场景进行处理,以提高耳机贴合度检测功能的兼容性。
如图1所示,本申请实施例提供了一种通信系统,包括电子设备20和耳机10。电子设备20可以以有线通信方式或无线通信方式向耳机10传输音频数据,或者,与耳机10互相传输语音数据。该无线通信方式可以是蓝牙(bluetooth,BT)通信方式,例如,可以是传统蓝牙通信方式或者低功耗蓝牙(例如,蓝牙低能耗(bluetooth low energe,BLE))通信方式。
电子设备20可以是手机、多媒体播放器、平板电脑、笔记本电脑、增强现实(augmented reality,AR)设备、虚拟现实(virtual reality,VR)设备、超级移动个人计算机(ultra-mobile personal computer,UMPC)、个人数字助理(personal digital assistant,PDA)、电视或智能手表等设备。耳机10可以为蓝牙耳机,例如可以为入耳式TWS耳机。该蓝牙耳机可以有多种类型,例如可以是耳塞式、入耳式、头戴式、耳罩式或挂耳式蓝牙耳机等。本申请实施例对电子设备20和耳机10的具体形态不做特殊限制。
示例性的,如图2所示,本申请实施例提供了一种耳机10,该耳机10可以为蓝牙耳机,该耳机10可以包括至少一个处理器101、至少一个存储器102、无线通信模块103、音频模块104、电源模块105、传感器106等。处理器101可以包括一个或多个接口,用于与耳机10的其他部件相连。下面结合图2对耳机10的各个部件进行具体的介绍。
存储器102可以用于存储计算机程序指令,该指令可以用于执行本申请涉及的耳机贴合度检测方法。存储器可以是易失性存储器或非易失性存储器,或可包括易失性和非易失性存储器两者。其中,非易失性存储器可以是只读存储器(read-only memory,ROM)、可编程只读存储器(programmable ROM,PROM)、可擦除可编程只读存储器(erasable PROM,EPROM)、电可擦除可编程只读存储器(electrically EPROM,EEPROM)或闪存。易失性存储器可以是随机存取存储器(random access memory,RAM),其用作外部高速缓存。通过示例性但不是限制性说明,许多形式的RAM可用,例如静态随机存取存储器(static RAM,SRAM)、动态随机存取存储器(dynamic RAM,DRAM)、同步动态随机存取存储器(synchronous DRAM,SDRAM)、双倍数据速率同步动态随机存取存储器(double data rate SDRAM,DDR SDRAM)、增强型同步动态随机存取存储器(enhanced SDRAM,ESDRAM)、同步连接动态随机存取存储器(synchlink DRAM,SLDRAM)和直接内存总线随机存取存储器(direct rambus RAM,DR RAM)。应注意,本文描述的系统和方法的存储器旨在包括但不限于这些和任意其它适合类型的存储器。
处理器101可以包括一个或多个处理单元,不同的处理单元可以是独立的器件, 也可以集成在一个或多个处理器101中。处理器101具体可以是集成的控制芯片。处理器101可以用于执行上述指令,调用相关模块以执行本申请实施例涉及的耳机贴合度检测方法。处理器可以是一个芯片。例如,可以是现场可编程门阵列(field programmable gate array,FPGA)、专用集成芯片(application specific integrated circuit,ASIC)片上系统(system on chip,SoC)、中央处理器(central processor unit,CPU)、网络处理器(network processor,NP)、数字信号处理电路(digital signal processor,DSP)、微控制器(micro controller unit,MCU)、可编程控制器(programmable logic device,PLD)或其他集成芯片。
无线通信模块103可以用于支持通过无线通信技术(例如前文所述的蓝牙通信技术)实现耳机10与电子设备之间的数据传输。示例性的,该无线通信模块103可以包括蓝牙芯片,耳机10可以通过该蓝牙芯片与电子设备的蓝牙芯片之间进行配对并建立无线连接,以通过该无线连接实现耳机10和电子设备之间的无线通信。通常,蓝牙芯片可以支持基础速率(basicrate,BR)蓝牙、增强速率(enhanced data rate,EDR)蓝牙和BLE等。另外,无线通信模块103还可以包括天线,无线通信模块103经由天线接收电磁波,将电磁波信号调频以及滤波处理,将处理后的信号发送到处理器101。无线通信模块103还可以从处理器101接收待发送的信号,对其进行调频,放大,经天线转为电磁波辐射出去。
音频模块104可以用于管理音频数据,实现耳机10输入和输出音频流。例如,音频模块104可以从无线通信模块103获取音频流,或者向无线通信模块103传递音频流,实现通过蓝牙耳机进行通话、播放音乐、唤醒或关闭与耳机10连接的电子设备的语音助手、接收或发送用户的语音数据等功能。音频模块104可以包括用于输出音频流的扬声器(或称听筒、受话器)组件、麦克风(或称话筒,传声器),与麦克风相配合的麦克收音电路等。扬声器可以将音频电信号转换成声音信号并播放。麦克风可以将声音信号转换为音频电信号。
图2示出的各种部件可以在包括一个或多个信号处理或专用集成电路在内的硬件、软件、或硬件和软件的组合中实现。示例性的,当该蓝牙耳机为TWS耳机时,该耳机10可以包括分别佩戴于左耳的耳机本体(也称左耳机)和佩戴于右耳的耳机本体(也称右耳机)。该耳机本体可以包括外壳和内部部件。内部部件设置于外壳形成的腔体内。内部部件可以包括上述音频模块、电源模块和无线通信模块等模块中的器件。
当蓝牙耳机为TWS耳机时,用户可以在双耳模式或单耳模式下使用TWS耳机。在单耳模式下,用户佩戴左耳机,或者佩戴右耳机,进行听音乐或通话等音频业务。在双耳模式下,用户可以佩戴两个耳机欣赏音乐或进行其他音频业务。在双耳模式下,两个耳机有主耳机和副耳机之分。并且,在TWS耳机的使用过程中,两个耳机的主、副角色还可以基于不同的条件进行切换,例如电量较高的耳机可以切换为主耳机,电量较低的耳机可以切换为副耳机。
电源模块105可以用于提供耳机10的系统电源,为耳机10各模块供电;支持耳机10接收充电输入等。电源模块105可以包括电源管理单元(power management unit,PMU)和电池。其中,电源管理单元可以接收外部的充电输入;将充电路输入的电信号变压后提供给电池充电,还可以将电池提供的电信号变压后提供给音频模块104、 无线通信模块103等其他模块;以及防止电池过充、过放、短路或过流等。在一些实施例中,电源模块105还可以包括无线充电线圈,用于对耳机10进行无线充电。另外,电源管理单元还可以用于监测电池容量,电池循环次数,电池健康状态(漏电、阻抗)等参数。
传感器106可以包括距离传感器或接近光传感器,用于确定耳机10是否被用户佩戴。示例性的,耳机10可以利用距离传感器来检测耳机10附近是否有物体,从而确定耳机10是否被用户佩戴。在确定耳机10被佩戴时,耳机10可以打开扬声器。
再例如,该传感器106还可以包括骨传导传感器。利用该骨传导传感器,耳机10可以获取人体声部振动骨块的振动信号,解析出语音信号,实现语音功能,从而接收用户的语音指令。耳机10还可以根据骨传导耳机获取的用户语音信号进行语音鉴权,以在支付交易等业务场景中对用户身份进行认证等。
再例如,该传感器106还可以包括触摸传感器,用于检测用户的触摸操作;指纹传感器,用于检测用户指纹,识别用户身份等;环境光传感器,可以根据感知的环境光的亮度,自适应调节一些参数(如音量大小);以及其他可能的传感器。
在一些实施例中,触摸传感器可以检测用户的单击、双击、多次点击、长按、重压等触摸操作,还可以进行用户指纹识别,以在支付交易等业务场景中对用户身份进行鉴权。
可以理解,图2所示的部件并不构成对耳机10的具体限定,耳机10还可以包括比图示更多或更少的部件,或者组合某些部件,或者拆分某些部件,或者不同的部件布置。
如图3所示,现有技术中耳机贴合度检测的流程是:
S101、耳机连接至电子设备。
并且用户佩戴耳机。用户可以在双耳模式或单耳模式下使用耳机。在单耳模式下,用户佩戴左耳机,或者佩戴右耳机,进行听音乐或通话等音频业务。在双耳模式下,用户可以佩戴两个耳机欣赏音乐或进行其他音频业务。在双耳模式下,两个耳机有主耳机和副耳机之分。
S102、用户在电子设备上点击耳机贴合度检测按钮。
在此期间,用户不能摘下耳机。用户在电子设备上点击耳机贴合度检测按钮后,电子设备向耳机发送贴合度检测命令,以指示耳机进行耳机贴合度检测。在双耳模式下,电子设备向主耳机发送贴合度检测命令,由主耳机转发给副耳机。
S103、耳机配置耳机贴合度检测参数。
示例性的,耳机贴合度检测参数包括降噪参数等。在双耳模式下,主耳机和副耳机分别配置各自的耳机贴合度检测参数。
S104、完成配置耳机贴合度检测参数之后,主耳机和副耳机进行预置音频的同步。
S105、耳机根据耳机贴合度检测参数(例如降噪参数)进行耳机贴合度检测。
在双耳模式下,主耳机和副耳机分别根据耳机贴合度检测参数进行耳机贴合度检测。
耳机贴合度检测的基本原理是:在耳机中的扬声器部分插入用户的耳道之后,耳机中的扬声器按照预设的降噪参数播放一段预置音频,耳机中的麦克风(位于耳道外 面)对环境音(其中包括了从耳道与耳机之间缝隙泄露的预置音频)进行收音,耳机通过分析播放的预置音频和接收到的泄漏的预置音频来确定预置音频的泄露值,该泄露值越小则用户的耳道与耳机越贴合。
S106、耳机将检测结果发送给电子设备。
在双耳模式下,副耳机通过主耳机的转发,将副耳机的检测结果发送给电子设备。
因此,在进行耳机贴合度检测期间,如果耳机播放其他声音或者改变了降噪参数,都会影响耳机贴合度检测的准确性。下面结合图4对耳机贴合度检测的互斥场景进行说明。
如图4所示,在第一类场景中,假设耳机正在进行以下业务(简称为与耳机贴合度检测互斥的业务)中的一个:播放音乐(即正在进行播放媒体业务)、播放长提示音(即正在进行播放长提示音业务)、通话(即正在进行通话业务)、唤醒语音助手(即正在进行唤醒语音助手业务)等。如果此时耳机开启耳机贴合度检测功能,由于播放媒体业务、播放长提示音业务等会播放音频,通话业务、唤醒语音助手业务会因为需要采集语音并降低噪音而改变耳机的降噪参数,所以都会造成耳机贴合度检测的准确性降低。
如图4所示,在第二类场景中,假设耳机正在进行耳机贴合度检测,如果此时耳机启动以下业务(简称为与耳机贴合度检测互斥的业务)中的一个:播放音乐(即正在进行播放媒体业务)、播放长提示音(即正在进行播放长提示音业务)、通话(即正在进行通话业务)、唤醒语音助手(即正在进行唤醒语音助手业务)等。由于播放媒体业务、播放长提示音业务等会播放音频,通话业务、唤醒语音助手业务会因为需要采集语音并降低噪音而改变耳机的降噪参数,所以都会造成耳机贴合度检测的准确性降低。
需要说明的是,本申请涉及的播放长提示音包括但不限于播放来电提示音、播放去电提示音、播放文字转语音(text to speech,TTS)音频(例如播报体温的TTS音频)、播放自定义音频等等。
针对上述问题,一种处理方式是,当进行与耳机贴合度检测互斥的业务时,由电子设备(例如手机)中的耳机应用(application,APP)来进行决策,例如当电子设备中的音乐应用控制耳机播放音乐时,用户操作耳机应用以进行耳机贴合度检测,则由耳机应用控制音乐应用暂停播放音乐、降低音乐音量或将音乐音量调至无声,耳机应用向耳机传输用于耳机贴合度检测的音频,耳机完成耳机贴合度检测后,耳机应用再控制音乐应用恢复播放音乐或者将音乐音量恢复至原来音量。
采用上述处理方式存在以下缺点:
一方面,对于电子设备的某些操作系统来说,开放给耳机应用的权限较大,可以按照上述方式控制音乐应用来处理上述互斥场景;而对另一些操作系统来说,开放给耳机应用的权限有限,不支持耳机应用控制音乐应用,无法处理上述互斥场景,造成同一种耳机连接采用不同操作系统的电子设备后,对同一种互斥场景的处理方式不同,给用户造成困扰。
另一方面,对于降低音乐音量来说,虽然降低了音乐音量但仍对耳机贴合度检测所需的音频有干扰,可能存在检测结果不准确的问题;还会出现音乐音频和耳机贴合 度检测的预置音频同时播放导致混音问题;暂停播放音乐或将音乐音量调至无声,直至音乐音量耳机完成耳机贴合度检测后,再恢复播放音乐至原来音量,还会造成音乐时有时无的问题,影响用户体验;降低音乐音量,直至音乐音量耳机完成耳机贴合度检测后,再恢复播放音乐至原来音量,还会造成音乐时大时小的问题,同样影响用户体验。
在本申请实施例提供的耳机贴合度检测方法中,由耳机来对耳机贴合度检测的互斥场景进行处理,降低耳机贴合度检测的优先级,当耳机检测到正在进行的业务与耳机贴合度检测互斥时,禁止耳机贴合度检测,或者,当耳机进行耳机贴合度检测还要进行与耳机贴合度检测互斥的业务时,中断耳机贴合度检测。由于是耳机对耳机贴合度检测的互斥场景进行处理,并不依赖于操作系统向耳机应用开放的权限,所以可以兼容多种操作系统,提高了耳机贴合度检测功能的兼容性。并且,由于不会中断或影响当前正在处理的与耳机贴合度检测互斥的业务,因此不会影响用户体验。
针对图4所示的第一类场景,即耳机已经在进行第一业务(关于第一业务见步骤S201中描述),然后电子设备指示耳机进行耳机贴合度检测,耳机确定正在进行的第一业务与耳机贴合度检测互斥,则耳机禁止耳机贴合度检测(即不启动耳机贴合度检测),并向电子设备发送第一错误指示信息,以指示耳机禁止进行耳机贴合度检测。具体的,如图5所示,该耳机贴合度检测方法包括:
S201、电子设备向耳机发送业务启动命令。
电子设备中的第一应用向耳机发送业务启动命令,相应地,耳机从电子设备中的第一应用接收业务启动命令。在双耳模式下,电子设备中的第一应用可以向主耳机和副耳机分别发送业务启动命令,即图5中的耳机可以为主耳机或副耳机;或者,如图6中的S201a和S201b所示,在双耳模式下,电子设备中的第一应用向主耳机发送业务启动命令,主耳机将接收的业务启动命令转发给副耳机。
第一应用指除了耳机应用以外的应用,例如音乐播放器、电话软件、语音助手、视频软件等。耳机应用指与耳机配套使用的应用,可以实现对耳机进行配置(例如,配置耳机贴合度检测参数(例如降噪参数)、进行耳机贴合度检测等)、对耳机进行在线升级等。
业务启动命令用于指示耳机启动第一业务,其中,第一业务指:改变耳机的降噪参数的业务,或者,播放除了耳机贴合度检测所需音频之外的其他音频的业务。其中,耳机贴合度检测所需音频指前文所述的预置音频,预置音频随耳机出厂时预先存储在耳机中。
如前文所述的,改变耳机的降噪参数的业务可以包括以下业务中的至少一项:唤醒语音助手业务、通话业务等。电子设备通过语音传输通道来与耳机传输这些业务的音频数据,示例性的,语音传输通道可以为SCO通道。这些业务需要采集语音并降低噪音,因此会改变耳机的降噪参数,根据前文所述的耳机贴合度检测的原理,进行耳机贴合度检测时,耳机会根据预设的耳机贴合度检测参数(例如降噪参数)来播放预置音频,所以这些业务都会造成耳机贴合度检测的准确性降低。
播放除了耳机贴合度检测所需音频之外的其他音频的业务可以包括以下业务中的至少一项:播放媒体业务(例如播放音乐)、播放长提示音业务(例如播放来电提示 音、去电提示音、TTS音频、自定义音频等)。电子设备通过音频传输通道来与耳机传输这些业务的音频数据,示例性的,音频传输通道可以为A2DP通道。这些业务会播放除了预置音频以外的音频,根据前文所述的耳机贴合度检测的原理,进行耳机贴合度检测时,耳机会根据预设的耳机贴合度检测参数(例如降噪参数)来播放预置音频,所以这些业务播放的音频会与预置音频混音,因此会造成耳机贴合度检测的准确性降低。
具体的,业务启动命令可以为语音传输通道(例如SCO通道)的状态切换命令,语音传输通道(例如SCO通道)的状态切换命令指示耳机将语音传输通道(例如SCO通道)从空闲状态切换至连接状态,以此来指示耳机启动第一业务(例如唤醒语音助手业务、通话业务)。语音传输通道在连接状态时被占用,在空闲状态时不被占用。或者,业务启动命令可以为音频传输通道(例如A2DP通道)的状态切换命令,音频传输通道(例如A2DP通道)的状态切换命令指示耳机将音频传输通道(例如A2DP通道)从空闲状态切换至播放状态或暂停状态,以此来指示耳机启动第一业务(例如播放媒体业务、播放长提示音业务)。耳机的音频传输通道在空闲状态时停止播放音频,在播放状态时播放音频,在暂停状态时暂停播放音频。音频传输通道在播放状态或暂停状态时被占用,在空闲状态时不被占用。
以电子设备为手机为例,电子设备向耳机发送业务启动命令的触发条件包括但不限于:示例性的,如图7中A所示,用户点击音乐播放器(即前文所述的第一应用)中的音乐播放按钮S,此时会触发音乐播放器通过耳机播放音乐(即触发播放媒体业务);用户通过电子设备中的测温应用触发耳机播放测温TTS音频(即触发播放长提示音业务)用户点击拨号按钮以进行呼叫,此时会触发耳机播放去电提示音(即触发播放长提示音业务);电子设备被呼叫,此时会触发耳机播放来电提示音(即触发播放长提示音业务);用户点击接听按钮以进行通话,此时会触发耳机传输语音(即触发通话业务);用户对电子设备说出关键词以唤醒语音助手,此时会触发耳机与电子设备传输语音助手相关音频(即触发唤醒语音助手业务)等等。
S202、耳机启动第一业务。
如图6中的S202a和S202b所示,在双耳模式下,主耳机和副耳机分别启动第一业务。具体的,主耳机和副耳机会将蓝牙驱动层接收到的业务启动命令传递至各自的应用层,由应用层启动第一业务。其中,耳机的蓝牙驱动层用于实现耳机与电子设备之间的蓝牙通信,例如传输命令、音频数据、语音数据等;应用层用于启动第一业务、进行耳机贴合度检测等。
假设业务启动命令为语音传输通道(例如SCO通道)的状态切换命令,语音传输通道(例如SCO通道)的状态切换命令指示耳机将语音传输通道(例如SCO通道)从空闲状态切换至连接状态,则耳机的应用层将语音传输通道(例如SCO通道)从空闲状态切换至连接状态,并启动第一业务,例如,对于启动唤醒语音助手业务或通话业务来说,耳机中的扬声器播放来自电子设备的音频,并将通过麦克风采集的环境音发送给电子设备。
或者,假设业务启动命令为音频传输通道(例如A2DP通道)的状态切换命令,音频传输通道(例如A2DP通道)的状态切换命令指示耳机将音频传输通道(例如A2DP 通道)从空闲状态切换至播放状态或暂停状态,则耳机的应用层将音频传输通道(例如A2DP通道)从空闲状态切换至播放状态或暂停状态,并启动第一业务,例如,对于启动播放媒体业务或播放长提示音业务,耳机中的扬声器播放来自电子设备的音频。
耳机启动第一业务后可以向电子设备中的第一应用发送启动指示信息,以指示已启动第一业务。此时,第一应用可以显示提示信息,以指示用户当前耳机正在运行第一业务。示例性的,如图7中B所示,电子设备中的音乐播放器可以显示界面“正在播放XXXXX”,以提示用户正在通过耳机播放音乐。
S203、电子设备向耳机发送贴合度检测命令。
电子设备中的耳机应用向耳机发送贴合度检测命令,相应地,耳机从电子设备中的耳机应用接收贴合度检测命令。在双耳模式下,电子设备中的耳机应用可以向主耳机和副耳机分别发送贴合度检测命令,即图5中的耳机可以为主耳机或副耳机;或者,如图6中的S203a和S203b所示,在双耳模式下,电子设备中的耳机应用向主耳机发送贴合度检测命令,主耳机将接收的贴合度检测命令转发给副耳机。贴合度检测命令用于指示耳机进行耳机贴合度检测。
示例性的,如图8中A所示,以电子设备为手机为例,电子设备向耳机发送贴合度检测命令的触发条件可以包括但不限于:电子设备中的耳机应用显示“耳机贴合度检测”界面,用户点击耳机贴合度检测按钮T。如图8中B所示,在非互斥场景下,在耳机进行耳机贴合度检测过程中,电子设备中的耳机应用显示“耳机贴合度检测中请稍候...”,如果此时用户点击耳机贴合度检测按钮T则可以停止耳机贴合度检测。耳机完成耳机贴合度检测后可以向电子设备中的耳机应用发送检测结果,以指示已完成耳机贴合度检测以及各个耳机的贴合度。此时,耳机应用可以显示提示信息,以指示用户已经完成耳机贴合度检测以及各个耳机的贴合度。示例性的,如图8中C所示,经过耳机完成耳机贴合度检测之后,如果某个耳机的贴合度良好,则电子设备中的耳机应用可以显示“贴合度良好”(例如图8中右耳机R),如果某个耳机的贴合度较差,则电子设备中的耳机应用可以显示“请重新调整”(例如图8中左耳机L);如果用户重新调整耳机后,可以点击耳机贴合度检测按钮T以重新进行耳机贴合度检测。
示例性的,如图9中A所示,在互斥场景下,假设电子设备中的音乐播放器正在通过耳机播放音乐,此时,如图9中B所示,用户切换至耳机应用,用户点击耳机贴合度检测按钮T,则电子设备向耳机发送贴合度检测命令。
S204、耳机确定正在进行的第一业务与耳机贴合度检测是否互斥。
或者说,耳机确定是否正在进行与耳机贴合度检测互斥的业务。如图6中的S204a和S204b所示,在双耳模式下,主耳机和副耳机均需要确定自身正在进行的第一业务是否与耳机贴合度检测互斥。具体的,主耳机和副耳机会将蓝牙驱动层接收到的贴合度检测命令传递至各自的应用层,由应用层确定正在进行的第一业务是否与耳机贴合度检测互斥。
耳机的应用层可以通过确定耳机的语音传输通道(例如SCO通道)处于连接状态,来确定正在进行的第一业务(例如唤醒语音助手业务、通话业务)与耳机贴合度检测互斥。或者,耳机的应用层可以通过确定耳机的音频传输通道(例如A2DP通道)处于播放状态或暂停状态,来确定正在进行的第一业务(例如播放媒体业务、播放长提 示音业务)与耳机贴合度检测互斥。
当耳机的语音传输通道处于连接状态时,表明电子设备正在通过耳机的语音传输通道与耳机传输通话业务或唤醒语音助手业务的音频数据。当耳机的音频传输通道处于播放状态或暂停状态时,表明电子设备正在通过耳机的音频传输通道与耳机传输播放媒体业务或播放长提示音业务的音频数据。
耳机的应用层可以通过确定耳机的语音传输通道(例如SCO通道)处于断开状态,并且,耳机的音频传输通道(例如A2DP通道)处于空闲状态,来确定正在进行的第一业务与耳机贴合度检测不互斥。
S205、如果耳机确定正在进行的第一业务与耳机贴合度检测互斥,则禁止进行耳机贴合度检测。
如图6中的S205a和S205b所示,在双耳模式下,主耳机和副耳机均需要禁止自身进行耳机贴合度检测。此时,耳机不会通过扬声器播放预置音频,不会通过麦克风进行收音,也不会通过处理器进行耳机贴合度检测。
S206、耳机向电子设备发送第一错误指示信息。
耳机向电子设备中的耳机应用发送第一错误指示信息,相应地,电子设备中的耳机应用从耳机接收第一错误指示信息。在双耳模式下,主耳机和副耳机可以分别向电子设备发送各自的第一错误指示信息,即图5中的耳机可以为主耳机或副耳机;或者,如图6中的S206a和S206b所示,在双耳模式下,副耳机通过主耳机向电子设备发送副耳机的第一错误指示信息,即副耳机向主耳机发送副耳机的第一错误指示信息,主耳机向电子设备中的耳机应用发送主耳机的第一错误指示信息以及副耳机的第一错误指示信息。主耳机的第一错误指示信息以及副耳机的第一错误指示信息可以位于一条消息中或者位于不同消息中。
第一错误指示信息用于指示耳机禁止进行耳机贴合度检测,主耳机的第一错误指示信息用于指示主耳机禁止进行耳机贴合度检测,副耳机的第一错误指示信息用于指示副耳机禁止进行耳机贴合度检测。第一错误指示信息可以采用错误码的形式,并且主耳机的第一错误指示信息和副耳机的第一错误指示信息所采用的错误码不同,例如可以用二进制数00表示主耳机的第一错误指示信息,用二进制数01表示副耳机的第一错误指示信息。
S207、电子设备显示第一提示信息。
电子设备接收到来自耳机的第一错误指示信息之后,可以在显示屏显示第一提示信息,在双耳模式下,电子设备只要接收到主耳机的第一错误指示信息或副耳机的第一错误指示信息中的至少一个,都可以在显示屏显示第一提示信息。第一提示信息用于提示用户只有停止正在进行的与耳机贴合度检测互斥的第一业务,才可启动耳机贴合度检测。示例性的,如图9中C所示,电子设备的耳机应用可以显示“无法执行耳机贴合度检测,当前耳机被占用”,以提示用户,如果要进行耳机贴合度检测,则需要停止正在进行的与耳机贴合度检测互斥的第一业务,以避免降低耳机贴合度检测的准确性。
本申请实施例提供的上述耳机贴合度检测方法,耳机已经在进行第一业务,第一业务可以改变耳机的降噪参数的业务,或者,播放除了耳机贴合度检测所需音频之外 的其他音频,会导致耳机贴合度检测的准确性降低。此时,如果耳机接收到贴合度检测命令(贴合度检测命令用于指示耳机进行耳机贴合度检测),则耳机禁止耳机贴合度检测(即不启动耳机贴合度检测)。因此,由耳机执行控制逻辑,通过降低耳机贴合度检测的优先级,来避免与第一业务冲突,不会依赖电子设备中操作系统开放给耳机应用的权限,对于采用不同操作系统的电子设备来说,耳机对互斥场景的处理是一致的,因此可以提高耳机贴合度检测的兼容性。可选的,耳机还可以向电子设备发送第一错误指示信息,以指示耳机禁止进行耳机贴合度检测,方便电子设备提醒用户。
针对图4所示的第二类场景,即耳机已经在进行耳机贴合度检测,然后电子设备指示耳机进行与耳机贴合度检测互斥的第一业务,则耳机中断耳机贴合度检测,并向电子设备发送第二错误指示信息,以指示中断耳机贴合度检测。具体的,如图10所示,该耳机贴合度检测方法包括:
S301、电子设备向耳机发送贴合度检测命令。
电子设备中的耳机应用向耳机发送贴合度检测命令,相应地,耳机从电子设备中的耳机应用接收贴合度检测命令。在双耳模式下,电子设备中的耳机应用可以向主耳机和副耳机分别发送贴合度检测命令,即图10中的耳机可以为主耳机或副耳机;或者,如图11中的S301a和S301b所示,在双耳模式下,电子设备中的耳机应用向主耳机发送贴合度检测命令,主耳机将接收的贴合度检测命令转发给副耳机。
如图12中A所示,电子设备中的耳机应用显示“耳机贴合度检测”界面,用户点击耳机贴合度检测按钮T,电子设备中的耳机应用向耳机发送贴合度检测命令。
步骤S301的其他内容参照步骤S203,在此不再重复。
S302、耳机确定是否正在进行与耳机贴合度检测互斥的第一业务。
如图11中的S302a和S302b所示,在双耳模式下,主耳机和副耳机均需要确定自身是否正在进行与耳机贴合度检测互斥的第一业务。具体的,主耳机和副耳机会将蓝牙驱动层接收到的贴合度检测命令传递至各自的应用层,由应用层确定是否正在进行与耳机贴合度检测互斥的第一业务。
关于第一业务参照步骤S201,在此不再赘述。
耳机的应用层可以通过确定耳机的语音传输通道(例如SCO通道)处于连接状态,来确定正在进行与耳机贴合度检测互斥的第一业务(例如唤醒语音助手业务、通话业务)。或者,耳机的应用层可以通过确定耳机的音频传输通道(例如A2DP通道)处于播放状态或暂停状态,来确定正在进行与耳机贴合度检测互斥的第一业务(例如播放媒体业务、播放长提示音业务)。
当耳机的语音传输通道处于连接状态时,表明电子设备正在通过耳机的语音传输通道与耳机传输通话业务或唤醒语音助手业务的音频数据。当耳机的音频传输通道处于播放状态或暂停状态时,表明电子设备正在通过耳机的音频传输通道与耳机传输播放媒体业务或播放长提示音业务的音频数据。都会降低耳机贴合度检测的准确性。
耳机的应用层可以通过确定耳机的语音传输通道(例如SCO通道)处于断开状态,并且,耳机的音频传输通道(例如A2DP通道)处于空闲状态,来确定耳机未在进行与耳机贴合度检测互斥的第一业务。
当耳机的语音传输通道处于断开状态时,表明电子设备没有在通过耳机的语音传 输通道与耳机传输通话业务或唤醒语音助手业务的音频数据。当耳机的音频传输通道处于空闲状态时,表明电子设备也没有在通过耳机的音频传输通道与耳机传输播放媒体业务或播放长提示音业务的音频数据。因此,不会造成耳机贴合度检测的准确性降低。
S303、如果耳机确定未在进行与耳机贴合度检测互斥的第一业务,则启动耳机贴合度检测。
如图11中的S303a和S303b所示,在双耳模式下,主耳机和副耳机各自确定自身未在进行与耳机贴合度检测互斥的第一业务,并启动耳机贴合度检测。
如前文所述的,在耳机贴合度检测过程中,耳机中的扬声器按照预设的耳机贴合度检测参数(例如降噪参数)播放一段预置音频,耳机中的麦克风(位于耳道外面)对环境音(其中包括了从耳道与耳机之间缝隙泄露的预置音频)进行收音,耳机通过分析播放的预置音频和接收到的泄漏的预置音频来确定预置音频的泄露值,该泄露值越小则用户的耳道与耳机越贴合。
示例性的,如图12中B所示,在耳机进行耳机贴合度检测过程中,电子设备中的耳机应用显示“耳机贴合度检测中请稍候...”,如果此时用户点击耳机贴合度检测按钮T则可以停止耳机贴合度检测。
S304、电子设备向耳机发送业务启动命令。
电子设备中的第一应用向耳机发送业务启动命令,相应地,耳机从电子设备接收业务启动命令。在双耳模式下,电子设备的第一应用可以向主耳机和副耳机分别发送业务启动命令,即图10中的耳机可以为主耳机或副耳机;或者,如图11中的S304a和S304b所示,在双耳模式下,电子设备的第一应用向主耳机发送业务启动命令,主耳机将接收的业务启动命令转发给副耳机。
其中,业务启动命令用于指示耳机启动第一业务。业务启动命令可以为语音传输通道(例如SCO通道)的状态切换命令,语音传输通道(例如SCO通道)的状态切换命令指示耳机将语音传输通道(例如SCO通道)从空闲状态切换至连接状态,以此来指示耳机启动第一业务(例如唤醒语音助手业务、通话业务)。或者,业务启动命令可以为音频传输通道(例如A2DP通道)的状态切换命令,音频传输通道(例如A2DP通道)的状态切换命令指示耳机将音频传输通道(例如A2DP通道)从空闲状态切换至播放状态或暂停状态,以此来指示耳机启动第一业务(例如播放媒体业务、播放长提示音业务)。
示例性的,如图12中B和C所示,假设在耳机进行耳机贴合度检测过程中,用户切换至音乐播放器(即前文所述的第一应用),并点击播放按钮S,则音乐播放器向耳机发送业务启动命令,以指示耳机播放音乐。
步骤S304的其他内容参照步骤S201,在此不再重复。
S305、在完成耳机贴合度检测之前,如果耳机从电子设备接收到业务启动命令,则中断耳机贴合度检测并启动第一业务。
如图11中的S305a和S305b所示,在双耳模式下,主耳机和和副耳机各自中断耳机贴合度检测并启动与耳机贴合度检测互斥的第一业务。具体的,主耳机和副耳机会将蓝牙驱动层接收到的业务启动命令传递至各自的应用层,由应用层中断耳机贴合度 检测并启动与耳机贴合度检测互斥的第一业务。
耳机完成耳机贴合度检测之前可以指:耳机正在通过扬声器播放预置音频,并通过扬声器播放预置音频,以及,通过处理器进行耳机贴合度检测。耳机中断耳机贴合度检测可以指:耳机停止通过扬声器播放预置音频,停止通过麦克风进行收音,并且停止通过处理器进行耳机贴合度检测。
耳机启动第一业务后可以向电子设备中的第一应用发送启动指示信息,以指示已启动第一业务。此时,第一应用可以显示提示信息,以指示用户当前耳机正在运行第一业务。示例性的,如图12中D所示,电子设备中的音乐播放器可以显示界面“正在播放XXXXX”,以提示用户正在通过耳机播放音乐。
步骤S305的其他内容参照步骤S202,在此不再重复。
S306、耳机向电子设备发送第二错误指示信息。
耳机向电子设备中的耳机应用发送第二错误指示信息,相应地,电子设备中的耳机应用从耳机接收第二错误指示信息。在双耳模式下,主耳机和副耳机可以分别向电子设备中的耳机应用发送各自的第二错误指示信息,即图10中的耳机可以为主耳机或副耳机;或者,如图11中的S306a和S306b所示,在双耳模式下,副耳机通过主耳机向电子设备发送副耳机的第二错误指示信息,即副耳机向主耳机发送副耳机的第二错误指示信息,主耳机向电子设备中的耳机应用发送主耳机的第二错误指示信息以及副耳机的第二错误指示信息。主耳机的第二错误指示信息以及副耳机的第二错误指示信息可以位于一条消息中或者位于不同消息中。
第二错误指示信息用于指示耳机中断耳机贴合度检测,主耳机的第二错误指示信息用于指示主耳机中断耳机贴合度检测,副耳机的第二错误指示信息用于指示副耳机中断耳机贴合度检测。第二错误指示信息可以采用错误码的形式,并且主耳机的第二错误指示信息和副耳机的第二错误指示信息所采用的错误码不同,例如可以用二进制数10表示主耳机的第二错误指示信息,用二进制数11表示副耳机的第二错误指示信息。
S307、电子设备显示第二提示信息。
电子设备接收到来自耳机的第二错误指示信息之后,可以在显示屏显示第二提示信息,在双耳模式下,电子设备只要接收到主耳机的第二错误指示信息以及副耳机的第二错误指示信息中的至少一个,都可以在显示屏显示第二提示信息。第二提示信息用于提示用户耳机已中断耳机贴合度检测。示例性的,如图12中E所示,如果用户从音乐播放器切换回耳机应用,则电子设备的耳机应用可以显示“耳机贴合度检测已中断,当前耳机被占用”,以提示用户耳机已经因为正在进行的第一业务而中断耳机贴合度检测。
本申请实施例提供的上述耳机贴合度检测方法,当耳机已经在进行耳机贴合度检测时,如果接收到指示耳机进行与耳机贴合度检测互斥的第一业务的命令,则耳机中断耳机贴合度检测。与耳机贴合度检测互斥的第一业务可能改变耳机的降噪参数,或者,播放除了耳机贴合度检测所需音频之外的其他音频,导致耳机贴合度检测的准确性降低。因此,由耳机执行控制逻辑,通过降低耳机贴合度检测的优先级,来避免与第一业务冲突,不会依赖电子设备中操作系统开放给耳机应用的权限,对于采用不同 操作系统的电子设备来说,耳机对互斥场景的处理是一致的,因此可以提高耳机贴合度检测的兼容性。可选的,耳机还可以向电子设备发送第二错误指示信息,以指示耳机中断耳机贴合度检测,方便电子设备提醒用户。
如图13所示,本申请实施例还提供一种芯片系统。该芯片系统60包括至少一个处理器601和至少一个接口电路602。至少一个处理器601和至少一个接口电路602可通过线路互联。处理器601用于支持耳机实现上述方法实施例中的各个步骤,例如图5、图6、图10、图11所示的方法,至少一个接口电路602可用于从其它装置(例如存储器)接收信号,或者,向其它装置(例如通信接口)发送信号。该芯片系统可以包括芯片,还可以包括其他分立器件。
本申请实施例还提供一种计算机可读存储介质,该计算机可读存储介质包括指令,当指令在上述耳机上运行时,使得该耳机执行上述方法实施例中的各个步骤,例如执行图5、图6、图10、图11所示的方法。
本申请实施例还提供一种包括指令的计算机程序产品,当指令在上述耳机上运行时,使得该耳机执行上述方法实施例中的各个步骤,例如执行图5、图6、图10、图11所示的方法。
关于芯片系统、计算机可读存储介质、计算机程序产品的技术效果参照前面方法实施例的技术效果。
应理解,在本申请的各种实施例中,上述各过程的序号的大小并不意味着执行顺序的先后,各过程的执行顺序应以其功能和内在逻辑确定,而不应对本申请实施例的实施过程构成任何限定。
本领域普通技术人员可以意识到,结合本文中所公开的实施例描述的各示例的模块及算法步骤,能够以电子硬件、或者计算机软件和电子硬件的结合来实现。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的系统、装置和模块的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。
在本申请所提供的几个实施例中,应该理解到,所揭露的系统、设备和方法,可以通过其它的方式实现。例如,以上所描述的设备实施例仅仅是示意性的,例如,所述模块的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个模块或组件可以结合或者可以集成到另一个设备,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,设备或模块的间接耦合或通信连接,可以是电性,机械或其它的形式。
所述作为分离部件说明的模块可以是或者也可以不是物理上分开的,作为模块显示的部件可以是或者也可以不是物理模块,即可以位于一个设备,或者也可以分布到多个设备上。可以根据实际的需要选择其中的部分或者全部模块来实现本实施例方案的目的。
另外,在本申请各个实施例中的各功能模块可以集成在一个设备中,也可以是各个模块单独物理存在,也可以两个或两个以上模块集成在一个设备中。
在上述实施例中,可以全部或部分地通过软件、硬件、固件或者其任意组合来实现。当使用软件程序实现时,可以全部或部分地以计算机程序产品的形式来实现。该计算机程序产品包括一个或多个计算机指令。在计算机上加载和执行计算机程序指令时,全部或部分地产生按照本申请实施例所述的流程或功能。所述计算机可以是通用计算机、专用计算机、计算机网络、或者其他可编程装置。所述计算机指令可以存储在计算机可读存储介质中,或者从一个计算机可读存储介质向另一个计算机可读存储介质传输,例如,所述计算机指令可以从一个网站站点、计算机、服务器或者数据中心通过有线(例如同轴电缆、光纤、数字用户线(digital subscriber line,DSL))或无线(例如红外、无线、微波等)方式向另一个网站站点、计算机、服务器或数据中心进行传输。所述计算机可读存储介质可以是计算机能够存取的任何可用介质或者是包含一个或多个可以用介质集成的服务器、数据中心等数据存储设备。所述可用介质可以是磁性介质(例如,软盘、硬盘、磁带),光介质(例如,DVD)、或者半导体介质(例如固态硬盘(solid state disk,SSD))等。
以上所述,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以所述权利要求的保护范围为准。

Claims (17)

  1. 一种耳机贴合度检测方法,其特征在于,应用于耳机,所述方法包括:
    从电子设备接收业务启动命令,所述业务启动命令用于指示所述耳机启动第一业务,所述第一业务指:改变所述耳机的降噪参数的业务,或者,播放除了耳机贴合度检测所需音频之外的其他音频的业务;
    启动所述第一业务;
    从所述电子设备接收贴合度检测命令,所述贴合度检测命令用于指示所述耳机进行耳机贴合度检测;
    如果确定正在进行的所述第一业务与耳机贴合度检测互斥,则禁止耳机贴合度检测。
  2. 根据权利要求1所述的方法,其特征在于,所述第一业务包括以下业务中的至少一项:播放媒体业务、通话业务、播放长提示音业务、唤醒语音助手业务。
  3. 根据权利要求2所述的方法,其特征在于,所述第一业务为通话业务或唤醒语音助手业务,所述确定正在进行的所述第一业务与耳机贴合度检测互斥,包括:
    确定所述耳机的语音传输通道处于连接状态。
  4. 根据权利要求3所述的方法,其特征在于,所述语音传输通道为面向同步连接SCO通道。
  5. 根据权利要求2所述的方法,其特征在于,所述第一业务为播放媒体业务或播放长提示音业务,所述确定正在进行的所述第一业务与耳机贴合度检测互斥,包括:
    确定所述耳机的音频传输通道处于播放状态或暂停状态。
  6. 根据权利要求5所述的方法,其特征在于,所述音频传输通道为高级音频分发配置文件A2DP通道。
  7. 根据权利要求1-6任一项所述的方法,其特征在于,在确定正在进行的所述第一业务与耳机贴合度检测互斥之后,所述方法还包括:
    向所述电子设备发送第一错误指示信息,所述第一错误指示信息用于指示所述耳机禁止进行耳机贴合度检测。
  8. 一种耳机贴合度检测方法,其特征在于,应用于耳机,所述方法包括:
    从电子设备接收贴合度检测命令,所述贴合度检测命令用于指示所述耳机进行耳机贴合度检测;
    如果确定未在进行与耳机贴合度检测互斥的第一业务,则启动耳机贴合度检测,所述第一业务指:改变所述耳机的降噪参数的业务,或者,播放除了耳机贴合度检测所需音频之外的其他音频的业务;
    在完成耳机贴合度检测之前,如果从所述电子设备接收业务启动命令,则中断耳机贴合度检测并启动所述第一业务,所述业务启动命令用于指示所述耳机启动所述第一业务。
  9. 根据权利要求8所述的方法,其特征在于,所述第一业务包括以下业务中的至少一项:播放媒体业务、通话业务、播放长提示音业务、唤醒语音助手业务。
  10. 根据权利要求9所述的方法,其特征在于,所述第一业务为通话业务或唤醒语音助手业务,所述确定未在进行与耳机贴合度检测互斥的第一业务,包括:
    确定所述耳机的语音传输通道处于断开状态,并且,确定所述耳机的音频传输通道处于空闲状态。
  11. 根据权利要求10所述的方法,其特征在于,所述语音传输通道为面向同步连接SCO通道。
  12. 根据权利要求10所述的方法,其特征在于,所述音频传输通道为高级音频分发配置文件A2DP通道。
  13. 根据权利要求9-12任一项所述的方法,其特征在于,所述第一业务为播放媒体业务或播放长提示音业务,所述业务启动命令为音频传输通道的状态切换命令,用于指示所述耳机将音频传输通道从空闲状态切换至播放状态或暂停状态。
  14. 根据权利要求9-12任一项所述的方法,其特征在于,所述第一业务为通话业务或唤醒语音助手业务,所述业务启动命令为语音传输通道的状态切换命令,用于指示所述耳机将语音传输通道从空闲状态切换至连接状态。
  15. 根据权利要求8-14任一项所述的方法,其特征在于,在从所述电子设备接收业务启动命令之后,则所述方法还包括:
    向所述电子设备发送第二错误指示信息,所述第二错误指示信息用于指示所述耳机中断耳机贴合度检测。
  16. 一种耳机,其特征在于,包括处理器和存储器,所述存储器中存储指令,当所述处理器执行所述指令时,如权利要求1-15任一项所述的方法被执行。
  17. 一种计算机可读存储介质,其特征在于,包括指令,当所述指令在耳机上执行时,使得所述耳机执行如权利要求1-15任一项所述的方法。
PCT/CN2023/117305 2022-12-09 2023-09-06 耳机贴合度检测方法和耳机 WO2024119926A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202211580027.3A CN118175473A (zh) 2022-12-09 2022-12-09 耳机贴合度检测方法和耳机
CN202211580027.3 2022-12-09

Publications (1)

Publication Number Publication Date
WO2024119926A1 true WO2024119926A1 (zh) 2024-06-13

Family

ID=91349202

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2023/117305 WO2024119926A1 (zh) 2022-12-09 2023-09-06 耳机贴合度检测方法和耳机

Country Status (2)

Country Link
CN (1) CN118175473A (zh)
WO (1) WO2024119926A1 (zh)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106445448A (zh) * 2016-08-29 2017-02-22 北京元心科技有限公司 终端的音频设备控制方法、系统及移动终端
US20170295272A1 (en) * 2014-09-26 2017-10-12 Huawei Technologies Co., Ltd. Method and Apparatus for Controlling Application Program, and Electronic Device
US20210144463A1 (en) * 2018-07-27 2021-05-13 Guangdong Oppo Mobile Telecommunications Corp., Ltd. Method for Controlling Volume of Wireless Headset, and Computer-Readable Storage Medium
CN114143646A (zh) * 2020-09-03 2022-03-04 Oppo广东移动通信有限公司 检测方法、装置、耳机和可读存储介质
CN115412824A (zh) * 2021-05-27 2022-11-29 Oppo广东移动通信有限公司 检测方法、装置、耳机和计算机可读存储介质

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170295272A1 (en) * 2014-09-26 2017-10-12 Huawei Technologies Co., Ltd. Method and Apparatus for Controlling Application Program, and Electronic Device
CN106445448A (zh) * 2016-08-29 2017-02-22 北京元心科技有限公司 终端的音频设备控制方法、系统及移动终端
US20210144463A1 (en) * 2018-07-27 2021-05-13 Guangdong Oppo Mobile Telecommunications Corp., Ltd. Method for Controlling Volume of Wireless Headset, and Computer-Readable Storage Medium
CN114143646A (zh) * 2020-09-03 2022-03-04 Oppo广东移动通信有限公司 检测方法、装置、耳机和可读存储介质
CN115412824A (zh) * 2021-05-27 2022-11-29 Oppo广东移动通信有限公司 检测方法、装置、耳机和计算机可读存储介质

Also Published As

Publication number Publication date
CN118175473A (zh) 2024-06-11

Similar Documents

Publication Publication Date Title
CN111181816B (zh) 多个无线连接的设备之间的音频数据路由
US11251763B2 (en) Audio signal adjustment method, storage medium, and terminal
CN109445740B (zh) 音频播放方法、装置、电子设备及存储介质
US20100048133A1 (en) Audio data flow input/output method and system
US20120009906A1 (en) System and method for resuming media
US20230325145A1 (en) Audio Control System
US20090023417A1 (en) Multiple interactive modes for using multiple earpieces linked to a common mobile handset
KR20090007694A (ko) 오디오 헤드셋
WO2021180083A1 (zh) 蓝牙通信系统和无线通信系统
WO2020019820A1 (zh) 麦克风堵孔检测方法及相关产品
WO2018115857A1 (en) Audio transfer
CN110290441B (zh) 一种无线耳机控制方法、装置及无线耳机和存储介质
US10827455B1 (en) Method and apparatus for sending a notification to a short-range wireless communication audio output device
WO2020063069A1 (zh) 音频播放方法、装置、电子设备及计算机可读介质
US20160330541A1 (en) Audio duplication using dual-headsets to enhance auditory intelligibility
WO2020107290A1 (zh) 音频输出控制方法和装置、计算机可读存储介质、电子设备
WO2011153779A1 (zh) 使用双麦克抑制噪声的方法及终端
WO2024055494A1 (zh) 基于蓝牙耳机的通话方法、装置及存储介质
US20220286538A1 (en) Earphone device and communication method
US20190132895A1 (en) Multi-connection device and multi-connection method
CN116471355A (zh) 音频播放的方法及电子设备
WO2020097927A1 (zh) 通话控制方法和装置、计算机可读存储介质、电子设备
JP2016504841A (ja) マルチモード・オーディオ装置及び監視システム
WO2024119926A1 (zh) 耳机贴合度检测方法和耳机
WO2018035868A1 (zh) 输出音频的方法、电子设备以及存储介质