WO2022143268A1 - 位置识别方法和耳机设备 - Google Patents

位置识别方法和耳机设备 Download PDF

Info

Publication number
WO2022143268A1
WO2022143268A1 PCT/CN2021/139766 CN2021139766W WO2022143268A1 WO 2022143268 A1 WO2022143268 A1 WO 2022143268A1 CN 2021139766 W CN2021139766 W CN 2021139766W WO 2022143268 A1 WO2022143268 A1 WO 2022143268A1
Authority
WO
WIPO (PCT)
Prior art keywords
earphone
amplitude
signal
specified frequency
wearing position
Prior art date
Application number
PCT/CN2021/139766
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 WO2022143268A1 publication Critical patent/WO2022143268A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04RLOUDSPEAKERS, MICROPHONES, GRAMOPHONE PICK-UPS OR LIKE ACOUSTIC ELECTROMECHANICAL TRANSDUCERS; DEAF-AID SETS; PUBLIC ADDRESS SYSTEMS
    • H04R1/00Details of transducers, loudspeakers or microphones
    • H04R1/10Earpieces; Attachments therefor ; Earphones; Monophonic headphones
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04RLOUDSPEAKERS, MICROPHONES, GRAMOPHONE PICK-UPS OR LIKE ACOUSTIC ELECTROMECHANICAL TRANSDUCERS; DEAF-AID SETS; PUBLIC ADDRESS SYSTEMS
    • H04R3/00Circuits for transducers, loudspeakers or microphones

Definitions

  • the present application relates to the technical field of intelligent terminals, and in particular, to a location identification method and a headset device.
  • earphone devices such as stereo earphones and physical multi-channel earphones
  • many earphone devices are respectively configured with different channels in the left earphone and the right earphone.
  • the headset When wearing the headset, the user needs to distinguish between the left and right ears, wear the left headset to the left ear, and wear the right headset to the right ear.
  • the left and right earphones cannot be used interchangeably, otherwise it will directly affect the fidelity and audio-visual effects of the sound source.
  • the left and right earphones are generally distinguished from the appearance.
  • the left earphone and the right earphone are in a mirror-symmetric structure
  • the shape of the left and right earphones is designed according to the shape of the human ear
  • L and R marks are added to the left and right earphones respectively.
  • the difference in appearance can prevent the user from wearing the earphones upside down to a certain extent, it requires the user to distinguish the left and right earphones, causing inconvenience for the user; especially in a dark environment or in an urgent situation, the user still has earphones It is possible to wear it backwards. After wearing it backwards, the user needs to remove the headset and wear it again, which will affect the user experience.
  • the present application provides a position recognition method and an earphone device, which can automatically recognize whether two earphones are worn on the left ear or the right ear, without requiring the user to distinguish between the left and right earphones, thereby improving the user experience.
  • the present application provides a method for position recognition, which is applied to a headphone device, where the headphone device includes a first earphone, and a first sound-emitting unit and a first microphone are arranged on the first earphone; the method includes: sending a first instruction, first An instruction is used to make the first sounding unit send the first transmission signal; obtain the first reception signal, the first reception information is the signal received by the first microphone for the first transmission signal; determine the amplitude information, the amplitude information and the first reception signal The specified frequency information of the signal corresponds to; the wearing position of the first earphone is determined according to the magnitude relationship between the amplitude information and the preset threshold.
  • the above-mentioned wearing position may be: the user's left ear, or the user's right ear.
  • a first instruction is sent to cause the first sounding unit to send a first sent signal, and according to the amplitude information of the signal received by the first microphone, it is determined whether the wearing position of the first earphone is the left ear or the right ear of the user, so as to automatically Identifying whether the two earphones are worn on the left or right ear eliminates the need for the user to distinguish between the left and right earphones, improving the user experience.
  • the specified frequency information includes: a specified frequency point; the amplitude information includes: an amplitude value of the specified frequency point; according to the magnitude relationship between the amplitude information and a preset threshold, the wearing position of the first earphone is determined, Including: if the amplitude value is greater than the preset first threshold, determining that the wearing position of the first earphone is the left ear; if the amplitude value is less than the preset first threshold, determining that the wearing position of the first earphone is the right ear; or, if the amplitude value is greater than A second threshold is preset, and it is determined that the wearing position of the first earphone is the right ear; if the amplitude value is less than the preset second threshold, it is determined that the wearing position of the first earphone is the left ear.
  • the specified frequency information includes: a specified frequency band; the amplitude information includes: an amplitude average value of the specified frequency band; and determining the amplitude information corresponding to the specified frequency information of the first received signal includes: obtaining the first received signal at the specified frequency The amplitude value of N specified frequency points in the frequency band; N is a natural number greater than 1; the average value of the N amplitude values obtained is calculated to obtain the amplitude average value of the specified frequency band.
  • determining the wearing position of the first earphone according to the magnitude relationship between the amplitude information and the preset threshold includes: if the average amplitude value is greater than the preset third threshold, determining that the wearing position of the first earphone is left ear; if the mean amplitude is less than the preset third threshold, it is determined that the wearing position of the first earphone is the right ear; or, if the mean amplitude is greater than the preset fourth threshold, it is determined that the wearing position of the first earphone is the right ear; if the mean amplitude is the right ear If it is less than the preset fourth threshold, it is determined that the wearing position of the first earphone is the left ear.
  • the first transmission signal is a pulse signal, a maximum length sequence or a frequency sweep sequence.
  • the present application provides a method for position identification, which is applied to a headphone device.
  • the headphone device includes a first earphone, and a first sound-emitting unit and a first microphone are arranged on the first earphone; it is characterized in that the method includes: sending a first an instruction, the first instruction is used to make the first sounding unit send the first transmission signal; obtain the first reception signal, the first reception information is the signal received by the first microphone for the first transmission signal; determine the amplitude information, the amplitude information Corresponding to the specified frequency information of the first received signal; determining the wearing position of the first earphone according to the magnitude relationship between the amplitude information and the preset threshold;
  • the specified frequency information includes: the specified frequency point; the amplitude information includes: the amplitude value of the specified frequency point; according to the magnitude relationship between the amplitude information and the preset threshold, determining the wearing position of the first earphone, including: if the amplitude value is greater than the preset first earphone; a threshold, it is determined that the wearing position of the first earphone is the left ear; if the amplitude value is less than the preset first threshold, it is determined that the wearing position of the first earphone is the right ear; or, if the amplitude value is greater than the preset second threshold, it is determined that the first earphone is worn The wearing position of the earphone is the right ear; if the amplitude value is less than the preset second threshold, it is determined that the wearing position of the first earphone is the left ear; or, the specified frequency information includes: the specified frequency band; the amplitude information includes: the amplitude average value of the specified frequency band; determine The amplitude information corresponding
  • Determining the wearing position of the first earphone according to the magnitude relationship between the amplitude information and the preset threshold value includes: if the average amplitude value is greater than the preset third threshold, determining that the wearing position of the first earphone is the left ear; The third threshold is to determine that the wearing position of the first earphone is the right ear; or, if the average amplitude value is greater than the preset fourth threshold, it is determined that the wearing position of the first earphone is the right ear; if the average amplitude value is smaller than the preset fourth threshold, it is determined that the The wearing position of an earphone is the left ear;
  • the first transmission signal is a pulse signal, a maximum length sequence or a sweep frequency sequence.
  • an embodiment of the present application provides a method for position recognition, which is applied to an earphone device, where the earphone device includes a first earphone and a second earphone, the first earphone is provided with a first sound generating unit and a first microphone, and the second earphone is provided with A second sounding unit and a second microphone are provided; the method includes: sending a first command and a second command, the first command is used to cause the first sounding unit to send a first transmission signal, and the second instruction is used to cause the second sounding unit to send The second transmission signal; obtain the first reception signal and the second reception signal, the first reception signal is the signal received by the first microphone for the first transmission signal, and the second reception signal is the signal received by the second microphone for the second transmission signal The received signal; determine the first amplitude information and the second amplitude information, the first amplitude information corresponds to the specified frequency information of the first received signal, and the second amplitude information corresponds to the specified frequency information of the second received signal; according
  • sending a first command to cause the first sounding unit to send a first sending signal sending a second command to cause the second sounding unit to send a second sending signal, receiving first amplitude information of the signal according to the first microphone, and
  • the second microphone receives the second amplitude information of the signal to determine the wearing position of the first earphone and the second earphone, thereby automatically identifying whether the two earphones are worn on the left ear or the right ear.
  • the specified frequency information includes: a specified frequency point; the amplitude information includes: an amplitude value of the specified frequency point;
  • the wearing position of the second earphone includes: if the first amplitude information is greater than the second amplitude information, determining that the wearing position of the first earphone is the left ear and the wearing position of the second earphone is the right ear; Second amplitude information, determine that the wearing position of the first earphone is the right ear, and the wearing position of the second earphone is the left ear; or, if the first amplitude information is greater than the second amplitude information, determine that the wearing position of the first earphone is the right ear, and the second amplitude information is determined to be the right ear.
  • the wearing position of the second earphone is the left ear; if the first amplitude information is smaller than the preset second amplitude information, it is determined that the wearing position of the first earphone is the left ear, and the wearing position of the second earphone is the right ear.
  • the specified frequency information includes: a specified frequency band; the amplitude information includes: an amplitude average value of the specified frequency band; the first amplitude information corresponding to the specified frequency information of the first received signal is determined, and the specified frequency of the second received signal is determined.
  • the second amplitude information corresponding to the frequency information includes: acquiring the amplitude values of N specified frequency points of the first received signal in the specified frequency band; N is a natural number greater than 1; calculating the average value of the acquired N amplitude values to obtain the specified The first amplitude mean value of the frequency band; obtains the amplitude values of the N specified frequency points of the second received signal in the specified frequency band; N is a natural number greater than 1; Amplitude mean.
  • determining the wearing positions of the first earphone and the second earphone according to the magnitude relationship between the first amplitude information and the second amplitude information includes: if the first amplitude mean is greater than the second amplitude mean, It is determined that the wearing position of the first earphone is the left ear, and the wearing position of the second earphone is the right ear; if the average value of the first amplitude is less than the preset second amplitude average value, it is determined that the wearing position of the first earphone is the right ear, and the wearing position of the second earphone is the right ear.
  • the position is the left ear; or, if the mean value of the first amplitude is greater than the mean value of the second amplitude, it is determined that the wearing position of the first earphone is the right ear, and the wearing position of the second earphone is the left ear; if the mean value of the first amplitude is less than the preset second amplitude Average, it is determined that the wearing position of the first earphone is the left ear, and the wearing position of the second earphone is the right ear.
  • the first transmission signal and the second transmission signal are the same; the first transmission signal and the second transmission signal are pulse signals, maximum length sequences or sweep frequency sequences.
  • an embodiment of the present application provides a position recognition method, which is applied to a headphone device.
  • the headphone device includes a first earphone and a second earphone.
  • the first earphone is provided with a first sound generating unit and a first microphone
  • the second earphone is provided with A second sounding unit and a second microphone are provided;
  • the method includes: sending a first command and a second command, the first command is used to cause the first sounding unit to send a first transmission signal, and the second instruction is used to cause the second sounding unit to send The second transmission signal; obtain the first reception signal and the second reception signal, the first reception signal is the signal received by the first microphone for the first transmission signal, and the second reception signal is the signal received by the second microphone for the second transmission signal
  • the received signal determine the first amplitude information and the second amplitude information, the first amplitude information corresponds to the specified frequency information of the first received signal, and the second amplitude information corresponds to the specified frequency information of the second received signal; according to
  • the specified frequency information includes: the specified frequency point; the amplitude information includes: the amplitude value of the specified frequency point; according to the magnitude relationship between the first amplitude information and the second amplitude information, determining the wearing positions of the first earphone and the second earphone, including: If the first amplitude information is greater than the second amplitude information, it is determined that the wearing position of the first earphone is the left ear and the wearing position of the second earphone is the right ear; if the first amplitude information is less than the preset second amplitude information, it is determined that the wearing position of the first earphone is the right ear.
  • the wearing position is the right ear, and the wearing position of the second earphone is the left ear; or, if the first amplitude information is greater than the second amplitude information, it is determined that the wearing position of the first earphone is the right ear, and the wearing position of the second earphone is the left ear; If the first amplitude information is smaller than the preset second amplitude information, it is determined that the wearing position of the first earphone is the left ear, and the wearing position of the second earphone is the right ear; or, the specified frequency information includes: the specified frequency band; the amplitude information includes: the specified frequency band determining the first amplitude information corresponding to the specified frequency information of the first received signal, and the second amplitude information corresponding to the specified frequency information of the second received signal, including: acquiring N specified frequency information of the first received signal in the specified frequency band The amplitude value of the frequency point; N is a natural number greater than 1; calculate the average value of the N amplitude values obtained to obtain the first
  • determining the wearing position of the first earphone and the second earphone includes: if the first amplitude mean value is greater than the second amplitude mean value, determining that the wearing position of the first earphone is the left earphone.
  • the wearing position of the second earphone is the right ear; if the mean value of the first amplitude is less than the preset second amplitude mean value, it is determined that the wearing position of the first earphone is the right ear and the wearing position of the second earphone is the left ear; If the mean value of the first amplitude is greater than the mean value of the second amplitude, it is determined that the wearing position of the first earphone is the right ear, and the wearing position of the second earphone is the left ear; if the mean value of the first amplitude is smaller than the preset second amplitude mean value, the wearing position of the first earphone is determined. It is the left ear, and the wearing position of the second earphone is the right ear;
  • the first transmission signal and the second transmission signal are the same; the first transmission signal and the second transmission signal are pulse signals, maximum length sequences or sweep frequency sequences.
  • an embodiment of the present application provides a method for position recognition, which is applied to an earphone device, where the earphone device includes a first earphone, and the first earphone is provided with a first sounding unit, a second sounding unit and a first microphone; the method includes: Send a first instruction and a second instruction, the first instruction is used to make the first sounding unit send the first transmission signal, and the second instruction is used to make the second sounding unit send the second transmission signal; obtain the first received signal and the second received signal signal, the first received signal is the signal received by the first microphone for the first transmitted signal, and the second received signal is the signal received by the first microphone for the second transmitted signal; determine the first amplitude information and the second amplitude information , the first amplitude information corresponds to the specified frequency information of the first received signal, and the second amplitude information corresponds to the specified frequency information of the second received signal; according to the magnitude relationship between the first amplitude information and the second amplitude information, determine the first amplitude information
  • sending a first command to cause the first sounding unit to send a first sending signal sending a second command to cause the second sounding unit to send a second sending signal, receiving first amplitude information of the signal according to the first microphone, and
  • the second microphone receives the second amplitude information of the signal to determine the wearing position of the first earphone and the second earphone, thereby automatically identifying whether the two earphones are worn on the left ear or the right ear.
  • the specified frequency information includes: a specified frequency point; the amplitude information includes: an amplitude value of the specified frequency point;
  • the wearing position of the second earphone includes: if the difference between the first amplitude information and the second amplitude information is greater than the fifth threshold, determining that the wearing position of the first earphone is the left ear; if the difference between the first amplitude information and the second amplitude information is the left ear; If the value is less than the sixth threshold, it is determined that the wearing position of the first earphone is the right ear; the fifth threshold is greater than or equal to 0, and the sixth threshold is less than or equal to 0; or, if the difference between the first amplitude information and the second amplitude information is greater than the seventh threshold , determine that the wearing position of the first earphone is the right ear; if the difference between the first amplitude information and the second amplitude information is less than the eighth threshold, determine that the wearing position of the first earphone is the left ear; the
  • the specified frequency information includes: a specified frequency band; the amplitude information includes: an amplitude average value of the specified frequency band; the first amplitude information corresponding to the specified frequency information of the first received signal is determined, and the specified frequency of the second received signal is determined.
  • the second amplitude information corresponding to the frequency information includes: acquiring the amplitude values of N specified frequency points of the first received signal in the specified frequency band; N is a natural number greater than 1; calculating the average value of the acquired N amplitude values to obtain the specified The first amplitude mean value of the frequency band; obtains the amplitude values of the N specified frequency points of the second received signal in the specified frequency band; N is a natural number greater than 1; Amplitude mean.
  • determining the wearing positions of the first earphone and the second earphone according to the magnitude relationship between the first amplitude information and the second amplitude information including: if a difference between the first amplitude mean and the second amplitude mean If the difference is greater than the ninth threshold, it is determined that the wearing position of the first earphone is the left ear; if the difference between the first amplitude mean and the second amplitude mean is less than the tenth threshold, it is determined that the wearing position of the first earphone is the right ear; the ninth threshold Greater than or equal to 0, the tenth threshold is less than or equal to 0; or, if the difference between the first amplitude mean and the second amplitude mean is greater than the eleventh threshold, it is determined that the wearing position of the first earphone is the right ear; If the difference between the two amplitude mean values is less than the twelfth threshold, it is determined that the wearing position of the first earphone is the left ear; the eleventh threshold
  • the first transmission signal and the second transmission signal are the same; the first transmission signal and the second transmission signal are pulse signals, maximum length sequences or sweep frequency sequences.
  • an embodiment of the present application provides a method for position recognition, which is applied to an earphone device, where the earphone device includes a first earphone, and the first earphone is provided with a first sounding unit, a second sounding unit and a first microphone; the method includes: Send a first instruction and a second instruction, the first instruction is used to make the first sounding unit send the first transmission signal, and the second instruction is used to make the second sounding unit send the second transmission signal; obtain the first received signal and the second received signal signal, the first received signal is the signal received by the first microphone for the first transmitted signal, and the second received signal is the signal received by the first microphone for the second transmitted signal; determine the first amplitude information and the second amplitude information , the first amplitude information corresponds to the specified frequency information of the first received signal, and the second amplitude information corresponds to the specified frequency information of the second received signal; according to the magnitude relationship between the first amplitude information and the second amplitude information, determine the first amplitude information
  • the specified frequency information includes: the specified frequency point; the amplitude information includes: the amplitude value of the specified frequency point; according to the magnitude relationship between the first amplitude information and the second amplitude information, determining the wearing position of the first earphone and the second earphone includes: If the difference between the first amplitude information and the second amplitude information is greater than the fifth threshold, it is determined that the wearing position of the first earphone is the left ear; if the difference between the first amplitude information and the second amplitude information is less than the sixth threshold, it is determined that the first earphone is worn The wearing position of the earphone is the right ear; the fifth threshold is greater than or equal to 0, and the sixth threshold is less than or equal to 0; or, if the difference between the first amplitude information and the second amplitude information is greater than the seventh threshold, determine that the wearing position of the first earphone is Right ear; if the difference between the first amplitude information and the second amplitude information is less than the eighth threshold, it is
  • determining the wearing position of the first earphone and the second earphone includes: if the difference between the first amplitude mean value and the second amplitude mean value is greater than the ninth threshold, determining the first The wearing position of an earphone is the left ear; if the difference between the first amplitude mean value and the second amplitude mean value is less than the tenth threshold, it is determined that the wearing position of the first earphone is the right ear; the ninth threshold is greater than or equal to 0, and the tenth threshold is less than or equal to 0; or, if the difference between the first amplitude mean value and the second amplitude mean value is greater than the eleventh threshold, it is determined that the wearing position of the first earphone is the right ear; if the difference between the first amplitude mean value and the second amplitude mean value is less than the tenth threshold
  • the second threshold is to determine that the wearing position of the first earphone is the left ear
  • the first transmission signal and the second transmission signal are the same; the first transmission signal and the second transmission signal are pulse signals, maximum length sequences or sweep frequency sequences.
  • an embodiment of the present application provides an earphone device, including: a first earphone on which a first sound generating unit and a first microphone are arranged; one or more processors; a memory; and one or more computers A program, wherein one or more computer programs are stored in memory, the one or more computer programs comprising instructions which, when executed by an apparatus, cause the apparatus to perform the method of any one of the first aspects.
  • an embodiment of the present application provides an earphone device, including: a first earphone and a second earphone, the first earphone is provided with a first sound unit and a first microphone, and the second earphone is provided with a second sound unit and a second microphone; one or more processors; a memory; and one or more computer programs, wherein the one or more computer programs are stored in the memory, the one or more computer programs comprising instructions that, when executed by the device, The device is caused to perform the method of any one of the second aspects.
  • an embodiment of the present application provides an earphone device, comprising: a first earphone, on which a first sounding unit, a second sounding unit and a first microphone are arranged; one or more processors; a memory; and One or more computer programs, wherein the one or more computer programs are stored in memory, the one or more computer programs comprising instructions which, when executed by an apparatus, cause the apparatus to perform the method of any of the third aspects.
  • the above-mentioned earphone device may be a headphone, an ear-hook earphone, or an in-ear earphone.
  • the first earphone and the second earphone included in the earphone device may be the same in appearance, and no distinction is made between the left and right earphones.
  • the sound-emitting unit is generally arranged on the front of the earphone (the first earphone or the second earphone) to which it belongs, and the front of the earphone refers to the side that is close to the ear when the user wears the earphone.
  • an embodiment of the present application provides a computer-readable storage medium, where a computer program is stored in the computer-readable storage medium, and when the computer program runs on a computer, causes the computer to execute any one of the first to third aspects. method.
  • the present application provides a computer program for performing the method of the first aspect when the computer program is executed by a computer.
  • the program in the eleventh aspect may be stored in whole or in part on a storage medium packaged with the processor, or may be stored in part or in part in a memory not packaged with the processor.
  • FIG. 1 is a schematic structural diagram of a prior art earphone device
  • FIG. 2 is a schematic structural diagram of an earphone device according to an embodiment of the present application.
  • FIG. 3 is another schematic structural diagram of an earphone device according to an embodiment of the present application.
  • FIG. 4 is an exemplary front view of an earphone in a headphone device according to an embodiment of the present application
  • FIG. 5 is a schematic structural diagram of a headphone according to an embodiment of the present application.
  • FIG. 6 is a schematic diagram of a signal received by a microphone according to an embodiment of the present application.
  • FIG. 7 is a flowchart of an embodiment of the location identification method of the present application.
  • FIG. 9 is a flowchart of another embodiment of the location identification method of the present application.
  • FIG. 11 is another schematic structural diagram of the headset according to the embodiment of the present application.
  • FIG. 12 is a schematic diagram of a signal received by a microphone according to an embodiment of the present application.
  • FIG. 13 is a flowchart of yet another embodiment of the location identification method of the present application.
  • FIG. 14 is a flowchart of yet another embodiment of the location identification method of the present application.
  • FIG. 15 is a structural diagram of an embodiment of a position identification device of the present application.
  • FIG. 16 is a structural diagram of another embodiment of the position identification device of the present application.
  • FIG. 17 is a structural diagram of yet another embodiment of a position identification device of the present application.
  • FIG. 2 is a structural example diagram of an earphone device of the present application.
  • the earphone device 200 may include: a first earphone 210 , a second earphone 220 , and a processor 230 ; Both include: a sounding unit 241 and a microphone 242 .
  • the earphone device 200 may include more or less components than shown, or combine some components, or separate some components, or arrange different components.
  • the processor 230 can be divided into a first processor 310 and a second processor 320 , the first processor 310 is connected to the sound-emitting unit and the microphone in the first earphone 210 , and the second processor 320 is connected to the sound generating unit and the microphone in the second earphone 220 .
  • the number of sound generating units 241 included in the first earphone 210 is one or more, which is not limited in the embodiment of the present application.
  • the number of microphones 242 included in the first earphone 210 is one or more, which is not limited in this embodiment of the present application.
  • the number of sound generating units 241 included in the second earphone 220 is one or more, which is not limited in the embodiment of the present application.
  • the number of microphones 242 included in the second earphone 220 is one or more, which is not limited in this embodiment of the present application.
  • the processor 230 may include one or more processing units, for example, the processor 230 may include an application processor (application processor, AP), a modem processor, a graphics processor (graphics processing unit, GPU), an image signal processor (image signal processor, ISP), controller, video codec, digital signal processor (digital signal processor, DSP), baseband processor, and/or neural-network processing unit (neural-network processing unit, NPU), etc. Wherein, different processing units may be independent devices, or may be integrated in one or more processors.
  • application processor application processor, AP
  • modem processor graphics processor
  • image signal processor image signal processor
  • ISP image signal processor
  • controller video codec
  • digital signal processor digital signal processor
  • baseband processor baseband processor
  • neural-network processing unit neural-network processing unit
  • a memory may also be provided in the processor 230 for storing instructions and data.
  • the memory in processor 230 is cache memory. This memory may hold instructions or data that have just been used or recycled by the processor 230 . If the processor 230 needs to use the instruction or data again, it can be called directly from the memory. Repeated accesses are avoided, and the waiting time of the processor 230 is reduced, thereby increasing the efficiency of the system.
  • the sound generating unit 241 is used for converting audio electrical signals into sound signals.
  • the microphone 242 also referred to as “microphone” or “microphone”, is used to convert sound signals into audio electrical signals.
  • the earphone device in the embodiment of the present application may be a headphone, an ear-hook earphone, or an in-ear earphone.
  • the first earphone and the second earphone included in the earphone device of the embodiment of the present application may be the same in appearance, and the left and right earphones are not distinguished.
  • the sound generating unit in the embodiment of the present application is generally disposed on the front of the earphone (the first earphone or the second earphone) on the side to which it belongs, and the front of the earphone refers to the side close to the ear when the user wears the earphone.
  • the front faces 41 of the first and second earphones in the headset are shown.
  • the wearing position of the earphone referred to in the embodiments of the present application refers to the user's left ear or the user's right ear.
  • the position identification method of the embodiment of the present application may use a sound-emitting unit in an earphone to realize position identification.
  • the position of the sound-emitting unit and the microphone in the earphone to which it belongs is determined. Then, if the earphone is worn on one ear of the user, it is assumed that the sound-emitting unit sends signal X, and the microphone receives signal Y based on the signal X sent by the sound-emitting unit.
  • the frequency spectrum of the signal Y is similar, for example, at the same frequency point, the amplitudes of the multiple signals Y are generally similar.
  • the frequency spectrum of the signal Y received by the microphone when the earphone is worn on the user's left ear and the frequency spectrum of the signal Y received by the microphone when the earphone is worn on the user's right ear are different. The above difference can be reflected in: at certain frequency points or frequency bands, there is a detectable difference between the amplitude of the signal Y corresponding to the left ear and the amplitude of the signal Y corresponding to the right ear.
  • a headphone device taking a headphone device as an example, it includes a first earphone 210 and a second earphone 220 , which are respectively in the form of earmuffs.
  • the first earphone 210 and the second earphone 220 have the same appearance and structure, and are respectively provided with a sounding unit 511 and a sounding unit 521 at the same position, and are respectively provided with a microphone 512 and a microphone 522 at the same position. It is assumed that the user wears the first earphone 210 on the left ear and the second earphone 220 on the right ear.
  • the sounding unit 511 and the sounding unit 521 respectively send out the same signal, which may be a pulse signal, an MLS sequence (Maximum length sequence), a frequency sweep sequence, or the like.
  • the microphone 512 receives the signal sent by the sounding unit 511, and the microphone 522 receives the signal sent by the sounding unit 521. Due to the difference in the structure of the left and right ears, although the signals sent by the sounding unit 511 and the sounding unit 521 are the same, the signals received by the microphone 512 and the microphone 522 exist. difference.
  • the waveform 61 shown in the solid line is an example diagram of the signal spectrum received by the microphone 512
  • the waveform 62 shown in the dotted line is the signal received by the microphone 522.
  • An example diagram of the signal spectrum Based on this example diagram, it can be seen that in many frequency points and frequency bands, the amplitude of the signal received by the microphone 512 is smaller than the amplitude of the signal received by the microphone 522, that is, the amplitude of the signal received by the microphone worn on the left ear. The amplitude is greater than the amplitude of the signal received by the microphone worn on the right ear, especially in the frequency band of 0-10kHZ, this performance is more obvious.
  • Figure 6 is only an example of the signals received by the first microphone and the second microphone.
  • the structure of the earphone is different, the position of the sounding unit in the earmuff is different, the signal sent by the sounding unit is different, and the microphone in the earmuff is different. Factors such as different positions will affect the signal received in the microphone. However, it can be determined that due to the difference in the structure of the left and right ears, the same earmuff is worn on the left ear and the signal received by the right ear.
  • the signal amplitude of the same frequency point is different, and this difference has commonalities, that is, the amplitude of the signal received by the microphone worn on the left ear is smaller than the signal received by the microphone worn on the right ear , or the amplitude of the signal received by the microphone worn on the left ear is greater than the amplitude of the signal received by the microphone worn on the right ear.
  • technicians can experimentally obtain the specific signals received by the microphones in the two earphones when the sound-emitting unit sends the same signal, so as to determine the signal amplitude at each frequency point between the two signals. degree of difference.
  • the amplitude of the signal received by the microphone worn on the left ear is greater than the amplitude of the signal received by the microphone worn on the right ear, and the position recognition methods shown in FIGS. 7 to 10 are provided.
  • FIG. 7 is a flowchart of an embodiment of the location identification method of the present application. As shown in FIG. 7 , the method may include:
  • Step 701 Send a first command, where the first command is used to cause the first sound-emitting unit of the first earphone to send the first sending signal.
  • the first transmitted signal may be a pulse signal, a maximum length sequence (maximum length sequence, MLS), a frequency sweep sequence, or the like.
  • the first earphone may be any one of the two earphones included in the earphone device, and the first sound generating unit is arranged in the first earphone, preferably on the front of the first earphone.
  • Step 702 Acquire a first received signal, where the first received signal is a signal received by the first microphone of the first earphone.
  • the first microphone is arranged in the first earphone, preferably on the front of the first earphone.
  • Step 703 Determine the amplitude value of the first received signal at the specified frequency.
  • the specified frequency point may have different values for different earphone devices, which is not limited in this embodiment of the present application. It should be noted that it is assumed that the signal received by the first microphone when the first earphone is worn on the left ear is the first signal, and the signal received by the first microphone when the first earphone is worn on the right ear is the second signal. In an experimental manner, the above-mentioned first signal and second signal are obtained, for example, the waveforms of the two signals shown in FIG. 6 are obtained, and a frequency point in which the amplitude value difference is relatively large is selected. Taking FIG.
  • any frequency point from 20Hz to 20kHz can be selected as the above-mentioned designated frequency point, for example, the frequency point a with the largest amplitude difference can be selected to improve the detection accuracy.
  • a certain frequency point in the range of 0 to 20 Hz, or a certain frequency point above 20 kHz can also be selected as the designated frequency point, so that the user can The left and right ears can be detected without being noticed.
  • the frequency point with a relatively large amplitude difference among the frequency points of 0 to 20 Hz or above 20 kHz can be selected as the designated frequency point.
  • a plurality of first signals and second signals may be obtained by multiple experiments, and the designated frequency point may be determined in a statistical manner, which will not be repeated here.
  • Step 704 Determine whether the amplitude value is greater than the preset first threshold, if yes, determine that the wearing position of the first earphone is the user's left ear, otherwise, determine that the wearing position of the first earphone is the user's right ear.
  • the specific value of the first threshold is related to the selection of the designated frequency point in step 703, which is not limited in this embodiment of the present application.
  • two values may be taken based on the amplitude value of the first signal at the designated frequency point and the amplitude value of the second signal at the designated frequency point
  • the middle value of the two amplitude values that is, the average value of the two amplitude values, is used as the first threshold value.
  • the designated frequency point is frequency point a shown in FIG. 6, and the two amplitude values at frequency point a are b1 and b2, respectively, the middle value of b1 and b2 can be calculated as the first threshold. If multiple first signals and second signals are obtained through multiple experiments, multiple first thresholds can also be obtained statistically, and the average value thereof is taken as the final first threshold.
  • the above steps 701 to 703 may be performed M times, where M is a natural number greater than 1, to obtain M amplitude values of the first received signal at the specified frequency point, step Before step 704, the method may further include: calculating the average or median of the M amplitude values; correspondingly, in step 704, it may be determined whether the average or median of the amplitude values is greater than a preset first threshold.
  • the method shown in FIG. 7 can be performed K times, where K is a natural number greater than 1, and K position recognition results are obtained, and the headset device can be based on K position recognition results.
  • the position recognition result with a relatively large number of occurrences is selected as the final position recognition result.
  • steps 703 to 704 are replaced by steps 801 to 802:
  • Step 801 Calculate the average amplitude of the first received signal in the specified frequency band.
  • this step may include:
  • the selection of the designated frequency point is similar to the selection of the designated frequency point in step 703.
  • a frequency band with a relatively large difference in the amplitude value of each frequency point can be selected as the designated frequency band, for example, Figure 6
  • Step 802 Determine whether the mean amplitude is greater than the preset second threshold, if yes, determine that the wearing position of the first earphone is the user's left ear, otherwise, determine that the wearing position of the first earphone is the user's right ear.
  • the determination of the second threshold is similar to the determination of the first threshold in step 704, and the specific value is not limited in this embodiment of the present application.
  • the average value of the amplitude value may be calculated based on the amplitude value of the first signal at the specified frequency band, and based on the amplitude value of the second signal at the specified frequency band.
  • the mean value of the amplitude values is calculated, and the mean value of the mean values of the two amplitude values is further calculated as the second threshold value. If multiple first signals and second signals are obtained through multiple experiments, multiple second thresholds can also be obtained statistically, and the average value thereof is taken as the final second threshold.
  • the above steps 701 to 801 may be performed M times, where M is a natural number greater than 1, to obtain M mean amplitudes of the first received signal in the specified frequency band, and step 802
  • the method may further include: calculating the average or median of the above-mentioned M amplitude averages; correspondingly, in step 802, it may be determined whether the average or median of the amplitude averages is greater than a preset first threshold.
  • the method shown in FIG. 8 above can be performed K times, where K is a natural number greater than 1, and K position recognition results are obtained, and the headset device can be based on K position recognition results.
  • the position recognition result with a relatively large number of occurrences is selected as the final position recognition result.
  • the methods shown in FIG. 7 and FIG. 8 can be applied to the headphone device with the structure shown in FIG. 2 . If the methods shown in FIG. 7 and FIG. 8 are extended to the headphone device with the structure shown in FIG. 3 , the methods shown in FIG. 7 and FIG.
  • the first processor executes to obtain the wearing position of the first earphone, that is, after the position recognition result, the recognition result can be sent to the second processor, so that the first processor and the second processor can perform audio based on the position recognition result. play.
  • the position identification method in the embodiment of the present application may use a sound-emitting unit in two earphones to perform position identification respectively.
  • the amplitude of the signal received by the microphone worn on the left ear is smaller than the amplitude of the signal received by the microphone worn on the right ear. . Based on this, the position recognition methods shown in FIGS. 9 and 10 are provided.
  • the location identification method may include:
  • Step 901 Send a first instruction, where the first instruction is used to cause the first sound-emitting unit of the first earphone to send the first transmission signal.
  • Step 902 Send a second command, where the second command is used to cause the second sound-emitting unit of the second earphone to send a second sending signal.
  • the first transmission signal and the second transmission signal are the same signal.
  • the first transmission signal and the second transmission signal may be pulse signals, MLS sequences, frequency sweep sequences and other signals.
  • Step 903 Acquire a first received signal and a second received signal, where the first received signal is a signal received by a first microphone of the first earphone, and the second received signal is a signal received by a second microphone of the second earphone.
  • Step 904 Determine the first amplitude value of the first received signal at the specified frequency, and determine the second amplitude of the second received signal at the specified frequency.
  • step 703 For the selection of the designated frequency point in this step, reference may be made to the description in step 703, which will not be repeated here.
  • Step 905 Calculate the difference between the first amplitude value and the second amplitude value, if the difference is greater than 0, determine that the wearing position of the first earphone is the user's left ear, and the wearing position of the second earphone is the user's right ear; If the value is less than 0, it is determined that the wearing position of the first earphone is the user's right ear, and the wearing position of the second earphone is the user's left ear; if the difference is equal to 0, return to steps 901 and 902, and resend the first instruction and the second command to perform position recognition again.
  • the above steps 901 to 904 may be performed M times, where M is a natural number greater than 1, to obtain M first amplitude values of the first received signal at the specified frequency, and M of the second received signal at the specified frequency.
  • the second amplitude value; before step 905, the method may further include: calculating the average or median of the above-mentioned M first amplitude values, and calculating the average or median of the above-mentioned M second amplitude values; correspondingly, in step 905
  • the difference between the above averages or medians can be calculated for subsequent processing.
  • the method shown in the above-mentioned FIG. 9 can be performed K times, where K is a natural number greater than 1, and K position identification results are obtained, and the headset device can be based on K position identification.
  • K is a natural number greater than 1
  • K position identification results are obtained
  • the headset device can be based on K position identification.
  • the position recognition result with a relatively large number of occurrences is selected as the final position recognition result.
  • the wearing position of the first earphone and the second earphone is determined by the difference between the amplitude values of the two received signals at the specified frequency point.
  • the amplitude of the two received signals at the specified frequency band is determined.
  • the difference between the mean values determines the wearing positions of the first earphone and the second earphone.
  • steps 904 and 905 are replaced by the following steps 1001 to 1002:
  • Step 1001 Calculate the first amplitude mean value of the first received signal in the specified frequency band, and calculate the second amplitude mean value of the second received signal in the specified frequency band.
  • step 801 For the selection of the designated frequency band in this step, reference may be made to the description in step 801, which will not be repeated here.
  • Step 1002 Calculate the difference between the first amplitude mean and the second amplitude mean, if the difference is greater than 0, determine that the wearing position of the first earphone is the user's left ear, and the wearing position of the second earphone is the user's right ear; If the value is less than 0, the wearing position of the first earphone is the user's right ear, and the wearing position of the second earphone is the user's left ear; if the difference is equal to 0, return to step 901 and step 902, and resend the first instruction and the second instruction , and perform location recognition again.
  • the above steps 901 to 1001 can be performed M times, where M is a natural number greater than 1, to obtain M first amplitude averages of the first received signal in the specified frequency band, and M second received signals in the specified frequency band.
  • amplitude mean before step 1002, it may further include: calculating the average or median of the M first amplitude mean values, and calculating the average or median of the M second amplitude mean values; correspondingly, in step 1002, calculating The difference between the above averages or medians is used for subsequent processing.
  • the method shown in the above-mentioned FIG. 10 can be performed K times, where K is a natural number greater than 1, and K position identification results are obtained, and the headset device can be based on K position identification.
  • K is a natural number greater than 1
  • K position identification results are obtained
  • the headset device can be based on K position identification.
  • the position recognition result with a relatively large number of occurrences is selected as the final position recognition result.
  • the method shown in FIGS. 9 and 10 can be applied to the headphone device with the structure shown in FIG. 2 . If the method shown in FIG. 9 and FIG. 10 is extended to the headphone device with the structure shown in FIG. 3 , the method shown in FIG. 9 and FIG. At this time, in step 902, the first processor can send the second instruction to the second processor, and then the second processor controls the second sounding unit to send the second sending signal. Correspondingly, the second receiving signal is also It can be sent by the second microphone to the first processor through the second processor. After the first processor obtains the position identification result, the position identification result can be sent to the second processor, so that the first processor and the second processor can process the position identification result. The controller performs audio playback based on the location recognition result.
  • Figures 7 to 10 above take as an example the amplitude of the signal received by the microphone worn on the left ear is greater than the amplitude of the signal received by the microphone worn on the right ear at the same frequency.
  • the amplitude of the signal received by the microphone is smaller than the amplitude of the signal received by the microphone worn on the right ear, the implementation of the position recognition method can refer to the above Figures 7 to 10, the only difference is that the final recognition result is the same as the above Figures 7 to 10 on the contrary.
  • the position identification method of the embodiment of the present application can use two sound-emitting units in an earphone to realize position identification.
  • the first earphone 210 is an earphone of the headphone device.
  • the first earphone 210 is provided with a first sound generating unit 111 , a second sound generating unit 112 and a first microphone 113 .
  • the first sound generating unit 111 , the second sound generating unit 112 and the first microphone 113 are disposed on the front of the first earphone 210 , and the positional relationship between them is not limited in this embodiment of the present application.
  • FIG. 11 it is taken as an example that the first sound generating unit 111 and the second sound generating unit 112 are respectively located on both sides of the first microphone 113 .
  • the first sound-generating unit 111 is located on the back side of the auricle of the left ear
  • the second sound-generating unit 112 is located on the front side of the auricle of the left ear.
  • the first sounding unit 111 and the second sounding unit 112 respectively send out the signal 1 and the signal 2, optionally, the signal 1 and the signal 2 are the same;
  • the unit 112 can send out the signal 1 and the signal 2 in sequence.
  • the first microphone 113 receives the signal 3 for the signal 1 and the signal 4 for the signal 2.
  • the first sounding unit 111 and the second sounding unit 112 are relative to the left ear
  • the position is different, relative to the position of the first microphone.
  • the signal 3 and the signal 4 are in many frequency points or frequency bands, and the signal amplitude of the same frequency point is different.
  • the specific difference is related to the structure of the first earphone 210 and the first sounding unit 111, the positional relationship between the second sounding unit 112 and the first microphone 113, etc. are related, but this amplitude difference is unidirectional in many cases, that is, the amplitude of one signal in most frequency points or frequency bands is greater than that of the other.
  • the spectrum of signal 3 can be shown as signal 121 in the left figure of Figure 12, and the spectrum of signal 4 can be shown as signal 122. It can be seen that in most frequency bands, the amplitude of signal 121 is greater than that of signal 122, for example The frequency band 0 ⁇ 10kHz, this performance is more obvious;
  • the first sound-generating unit 111 is located on the front side of the auricle of the right ear
  • the second sound-generating unit 112 is located on the rear side of the auricle of the right ear.
  • the first sounding unit 111 and the second sounding unit 112 send out signal 1 and signal 2 in turn, the first microphone 113 receives signal 5 for signal 1, and receives signal 6 for signal 2, Due to the different positions of the first sound-emitting unit 111 and the second sound-emitting unit 112 relative to the right ear, at this time, the signal 5 and the signal 6 are in many frequency points or frequency bands, and the signal amplitude of the same frequency point is also different.
  • This amplitude difference is in In many cases, it is also unidirectional, and because the positional relationship between the first sound-emitting unit 111 and the second sound-emitting unit 112 relative to the right ear is exactly the same as the positional relationship between the first sound-emitting unit 111 and the second sound-emitting unit 112 relative to the left ear is the opposite, so this amplitude difference is also the opposite of the difference between Signal 3 and Signal 4 above. For example, if the amplitude of signal 3 is greater than that of signal 4 in many frequency points or frequency bands, then the amplitude of signal 5 is smaller than that of signal 6 in many frequency points or frequency bands. For example, in the figure on the right side of FIG. 12 , the frequency spectrum of signal 6 can be shown as waveform 123 , and the frequency spectrum of signal 5 can be shown as waveform 124 . In most frequency bands, the amplitude of signal 5 is smaller than that of signal 6 .
  • the amplitude of signal 3 is greater than that of signal 4, and the amplitude of signal 5 is less than that of signal 6 as an example, the occurrence of the occurrence at the positions of the first sound generating unit 111 and the second generating unit 112 After the change, the same frequency point may also occur, the amplitude of signal 3 is smaller than that of signal 4, and the amplitude of signal 5 is greater than that of signal 6.
  • the location identification method may include:
  • Step 1301 Send a first command, the first command is used to make the first sounding unit of the first earphone send a first transmission signal, and obtain a first received signal, the first received signal is that the first microphone of the first earphone is directed to the first Send signal received signal.
  • Step 1302 Send a second command, the second command is used for the second sounding unit of the first earphone to send a second transmission signal, and obtain a second received signal, the first received signal is the first microphone of the first earphone for the second transmission signal received.
  • the first transmission signal and the second transmission signal are the same signal.
  • the first transmission signal and the second transmission signal may be pulse signals, MLS sequences, frequency sweep sequences and other signals.
  • Step 1303 Determine the first amplitude value of the first received signal at the specified frequency, and determine the second amplitude of the second received signal at the specified frequency.
  • the specified frequency point may have different values for different earphone devices, which is not limited in this embodiment of the present application. It should be noted that, technicians can obtain the first received signal and the second received signal when the first earphone is worn on the left ear, and the first received signal and the second received signal when the first earphone is worn on the right ear through experiments. Receive the signal, and obtain the frequency points with opposite amplitude differences corresponding to the left and right ears as the designated frequency points. Taking Figure 12 as an example, any frequency point from 20Hz to 10kHz can be selected as the above-mentioned designated frequency point, for example, the frequency point a with the largest amplitude difference can be selected to improve the detection accuracy.
  • a certain frequency point in the range of 0 to 20 Hz, or a certain frequency point above 20 kHz can also be selected as the designated frequency point, so that the user can The left and right ears can be detected without being noticed.
  • the frequency point with a relatively large amplitude difference among the frequency points of 0 to 20 Hz or above 20 kHz can be selected as the designated frequency point.
  • Step 1304 Calculate the difference between the first amplitude value and the second amplitude value. If the difference is greater than the first difference threshold, determine that the wearing position of the first earphone is the user's left ear, and the wearing position of the second earphone is the user's right ear. ear; if the difference is less than the second difference threshold, determine that the wearing position of the first earphone is the user's right ear, and the wearing position of the second earphone is the user's left ear; otherwise, return to steps 1301 and 1302, and resend the first earphone command and the second command, and perform position recognition again.
  • the first difference threshold and the second difference threshold may both be 0; or, the first difference threshold is greater than 0, and the second difference threshold is less than 0, preferably, the first difference threshold and the second difference threshold Absolute values are equal.
  • the above steps 1301 to 1303 may be performed M times, where M is a natural number greater than 1, to obtain M first amplitude values of the first received signal at the specified frequency, and M of the second received signal at the specified frequency.
  • the second amplitude value; before step 1304, the method may further include: calculating the average or median of the M first amplitude values, and calculating the average or median of the M second amplitude values; correspondingly, in step 1305
  • the difference between the above averages or medians can be calculated for subsequent processing.
  • the method shown in FIG. 13 above can be performed K times, where K is a natural number greater than 1, and K position recognition results are obtained, and the headset device can be based on K position recognition results.
  • the position recognition result with a relatively large number of occurrences is selected as the final position recognition result.
  • the first earphone wearing position is determined by the difference between the amplitude values of the two received signals at the specified frequency point.
  • the first earphone wearing position is determined by the difference of the amplitude mean values of the two received signals at the specified frequency band.
  • the first earphone wearing position, specifically, steps 1303 and 1304 are replaced by the following steps 1401 to 1402:
  • Step 1401 Calculate the first amplitude mean value of the first received signal in the specified frequency band, and calculate the second amplitude mean value of the second received signal in the specified frequency band.
  • the difference is that in step 1401, the frequency band with the opposite amplitude difference corresponding to the left and right ears is selected as the designated frequency band.
  • the frequency band with the opposite amplitude difference corresponding to the left and right ears is selected as the designated frequency band.
  • 0.1 to 10 kHz can be selected as the above designated frequency band.
  • Step 1402 Calculate the difference between the first amplitude mean and the second amplitude mean, if the difference is greater than the third difference threshold, determine that the wearing position of the first earphone is the user's left ear, and the wearing position of the second earphone is the user's right ear. ear; if the difference is less than the fourth difference threshold, determine that the wearing position of the first earphone is the user's right ear, and the wearing position of the second earphone is the user's left ear; otherwise, return to steps 1301 and 1302, and resend the first earphone command and the second command, and perform position recognition again.
  • the third difference threshold and the fourth difference threshold may both be 0; or, the third difference threshold is greater than 0, and the fourth difference threshold is less than 0, or the third difference threshold and the fourth difference threshold are absolute value is equal.
  • the above steps 1301 to 1401 can be performed M times, where M is a natural number greater than 1, to obtain M first amplitude averages of the first received signal in the specified frequency band, and M second received signals of the second received signal in the specified frequency band.
  • Amplitude mean before step 1402, it may further include: calculating the average or median of the above-mentioned M first amplitude mean values, and calculating the average or median of the above-mentioned M second amplitude mean values; correspondingly, in step 1402, calculating The difference between the above average or median is used for subsequent processing.
  • the method shown in the above-mentioned FIG. 14 can be performed K times, where K is a natural number greater than 1, and K position identification results are obtained, and the headset device can be based on K position identification.
  • K is a natural number greater than 1
  • K position identification results are obtained
  • the headset device can be based on K position identification.
  • the position recognition result with a relatively large number of occurrences is selected as the final position recognition result.
  • the method shown in FIGS. 13 and 14 can be applied to the headphone device with the structure shown in FIG. 2 . If the method shown in FIG. 13 and FIG. 14 is extended to the headphone device with the structure shown in FIG. 3 , the method shown in FIGS. 13 and 14 can be processed by the first process After obtaining the wearing position of the first earphone, that is, the position recognition result, the position recognition result can be sent to the second processor, so that the first processor and the second processor can play audio based on the position recognition result.
  • the position recognition method may use two sound-emitting units in two earphones to realize position recognition respectively.
  • the two sound-emitting units in the first earphone may be used to pass
  • the first position recognition result is obtained by the method shown in the above Figure 13 or Figure 14
  • the second position recognition result is obtained by the method shown in the above Figure 13 or Figure 14 using the two sounding units in the second earphone, and the two position recognition results are compared. Yes, if they are consistent, it means that the first position recognition result and the second position recognition result are accurate; otherwise, the position recognition is performed again.
  • the position identification method provided by the above embodiments of the present application automatically recognizes whether the two earphones in the earphone device are worn on the left ear or the right ear after the user puts on the earphone device, and does not require the user to distinguish between the left and right earphones, thereby facilitating the use of the user and improving the user experience. experience.
  • the two earphones in the earphone device do not need to distinguish between the left and right ears in appearance, and do not need to be marked, and the user does not wear the left and right earphones in reverse, which avoids the inability of the earphones and the ears to fit when the user wears the left and right earphones in the prior art.
  • FIG. 15 is a schematic structural diagram of an embodiment of the position recognition device of the present application.
  • the device can be applied to earphone equipment.
  • the earphone equipment includes a first earphone, and the first earphone is provided with a first sound unit and a first microphone; as shown in FIG. 15 , the apparatus 1500 may include:
  • the sending unit 1510 is used to send a first instruction, and the first instruction is used to make the first sounding unit send the first sending signal;
  • an acquisition unit 1520 configured to acquire a first received signal, where the first received information is a signal received by the first microphone for the first transmitted signal;
  • the determining unit 1530 is configured to determine amplitude information, where the amplitude information corresponds to the specified frequency information of the first received signal; and determine the wearing position of the first earphone according to the magnitude relationship between the amplitude information and a preset threshold.
  • the specified frequency information includes: a specified frequency point; the amplitude information includes: an amplitude value of the specified frequency point; the determining unit 1530 may be specifically configured to: if the amplitude value is greater than a preset first threshold, determine the first The wearing position of the earphone is the left ear; if the amplitude value is less than the preset first threshold, it is determined that the wearing position of the first earphone is the right ear; or, if the amplitude value is greater than the preset second threshold, it is determined that the wearing position of the first earphone is the right ear ear; if the amplitude value is smaller than the preset second threshold, it is determined that the wearing position of the first earphone is the left ear.
  • the specified frequency information includes: a specified frequency band; the amplitude information includes: an amplitude average value of the specified frequency band; the determining unit 1530 may be specifically configured to: acquire the N specified frequency points of the first received signal in the specified frequency band. Amplitude value; N is a natural number greater than 1; calculate the average value of the N amplitude values obtained to obtain the average amplitude value of the specified frequency band.
  • the determining unit 1530 may be specifically configured to: if the mean amplitude value is greater than the preset third threshold, determine that the wearing position of the first earphone is the left ear; if the mean amplitude value is less than the preset third threshold value, determine the first earphone The wearing position of an earphone is the right ear; or, if the average amplitude value is greater than the preset fourth threshold, it is determined that the wearing position of the first earphone is the right ear; if the amplitude average value is smaller than the preset fourth threshold, it is determined that the wearing position of the first earphone is left ear.
  • the first transmission signal is a pulse signal, a maximum length sequence or a frequency sweep sequence.
  • the device 1600 is a schematic structural diagram of an embodiment of the position recognition device of the present application.
  • the device can be applied to earphone equipment.
  • the earphone equipment includes a first earphone and a second earphone.
  • the first earphone is provided with a first sounding unit and a first microphone.
  • a second sound-emitting unit and a second microphone are provided on the two earphones; as shown in FIG. 16 , the device 1600 may include:
  • the sending unit 1610 is used to send a first instruction and a second instruction, the first instruction is used to make the first sounding unit send the first sending signal, and the second instruction is used to make the second sounding unit send the second sending signal;
  • the acquiring unit 1620 is configured to acquire a first received signal and a second received signal, where the first received signal is the signal received by the first microphone for the first transmitted signal, and the second received signal is the second received signal by the second microphone for the second transmitted signal received signal;
  • the determining unit 1630 is configured to determine first amplitude information and second amplitude information, the first amplitude information corresponds to the specified frequency information of the first received signal, and the second amplitude information corresponds to the specified frequency information of the second received signal; The magnitude relationship between the amplitude information and the second amplitude information determines the wearing positions of the first earphone and the second earphone.
  • the specified frequency information includes: a specified frequency point; the amplitude information includes: an amplitude value of the specified frequency point; the determining unit 1630 may be specifically configured to: if the first amplitude information is greater than the second amplitude information, determine the first amplitude value.
  • the wearing position of the first earphone is the left ear, and the wearing position of the second earphone is the right ear; if the first amplitude information is smaller than the preset second amplitude information, it is determined that the wearing position of the first earphone is the right ear, and the wearing position of the second earphone is left ear; or, if the first amplitude information is greater than the second amplitude information, determine that the wearing position of the first earphone is the right ear, and the wearing position of the second earphone is the left ear; if the first amplitude information is less than the preset second amplitude information, It is determined that the wearing position of the first earphone is the left ear, and the wearing position of the second earphone is the right ear.
  • the specified frequency information includes: a specified frequency band; the amplitude information includes: an amplitude average value of the specified frequency band; the determining unit 1630 may be specifically configured to: acquire the N specified frequency points of the first received signal in the specified frequency band Amplitude value; N is a natural number greater than 1; calculate the average value of the N amplitude values obtained to obtain the first amplitude average value of the specified frequency band; obtain the amplitude values of the N specified frequency points of the second received signal in the specified frequency band; N is a natural number greater than 1; the average value of the N amplitude values obtained is calculated to obtain the second amplitude average value of the specified frequency band.
  • the determining unit 1630 may be specifically configured to: if the first amplitude mean is greater than the second amplitude mean, determine that the wearing position of the first earphone is the left ear, and the wearing position of the second earphone is the right ear; if If the first amplitude mean is smaller than the preset second amplitude mean, it is determined that the wearing position of the first earphone is the right ear, and the wearing position of the second earphone is the left ear; or, if the first amplitude mean is greater than the second amplitude mean, it is determined that the first earphone is worn The wearing position of the first earphone is the right ear, and the wearing position of the second earphone is the left ear; if the average value of the first amplitude is less than the preset second amplitude average value, it is determined that the wearing position of the first earphone is the left ear, and the wearing position of the second earphone is the right ear.
  • the first transmission signal and the second transmission signal are the same; the first transmission signal and the second transmission signal are pulse signals, maximum length sequences or sweep frequency sequences.
  • FIG. 17 is a schematic structural diagram of an embodiment of the position identification device of the application, the device can be applied to earphone equipment, the earphone equipment includes a first earphone, and the first earphone is provided with a first sounding unit, a second sounding unit and a first microphone;
  • the apparatus 1700 may include:
  • the sending unit 1710 is used to send a first instruction and a second instruction, the first instruction is used to make the first sounding unit send the first sending signal, and the second instruction is used to make the second sounding unit send the second sending signal;
  • the acquiring unit 1720 is configured to acquire a first received signal and a second received signal, where the first received signal is the signal received by the first microphone for the first transmit signal, and the second received signal is the first microphone for the second transmit signal received signal;
  • the determining unit 1730 is configured to determine first amplitude information and second amplitude information, the first amplitude information corresponds to the specified frequency information of the first received signal, and the second amplitude information corresponds to the specified frequency information of the second received signal; The magnitude relationship between the amplitude information and the second amplitude information determines the wearing positions of the first earphone and the second earphone.
  • the specified frequency information includes: a specified frequency point; the amplitude information includes: an amplitude value of the specified frequency point; the determining unit 1730 may be specifically configured to: if the difference between the first amplitude information and the second amplitude information greater than the fifth threshold, it is determined that the wearing position of the first earphone is the left ear; if the difference between the first amplitude information and the second amplitude information is less than the sixth threshold, it is determined that the wearing position of the first earphone is the right ear; the fifth threshold is greater than or equal to 0, the sixth threshold is less than or equal to 0; or, if the difference between the first amplitude information and the second amplitude information is greater than the seventh threshold, it is determined that the wearing position of the first earphone is the right ear; if the first amplitude information and the second amplitude information If the difference is less than the eighth threshold, it is determined that the wearing position of the first earphone is the left ear; the seventh threshold is greater than or
  • the specified frequency information includes: a specified frequency band; the amplitude information includes: an amplitude average value of the specified frequency band; the determining unit 1730 may be specifically configured to: obtain the N specified frequency points of the first received signal in the specified frequency band Amplitude value; N is a natural number greater than 1; calculate the average value of the N amplitude values obtained to obtain the first amplitude average value of the specified frequency band; obtain the amplitude values of the N specified frequency points of the second received signal in the specified frequency band; N is a natural number greater than 1; the average value of the N amplitude values obtained is calculated to obtain the second amplitude average value of the specified frequency band.
  • the determining unit 1730 may be specifically configured to: if the difference between the first amplitude mean and the second amplitude mean is greater than the ninth threshold, determine that the wearing position of the first earphone is the left ear; if the first amplitude If the difference between the mean value and the second amplitude mean value is less than the tenth threshold, it is determined that the wearing position of the first earphone is the right ear; the ninth threshold value is greater than or equal to 0, and the tenth threshold value is less than or equal to 0; or, if the first amplitude mean value and the second amplitude value are equal to or less than 0 If the difference between the mean values is greater than the eleventh threshold, it is determined that the wearing position of the first earphone is the right ear; if the difference between the first amplitude mean value and the second amplitude mean value is less than the twelfth threshold value, it is determined that the wearing position of the first earphone is the left ear. ; The eleventh threshold
  • the first transmission signal and the second transmission signal are the same; the first transmission signal and the second transmission signal are pulse signals, maximum length sequences or sweep frequency sequences.
  • each unit of the apparatus shown in FIG. 15 to FIG. 17 is only a division of logical functions, and may be fully or partially integrated into a physical entity in actual implementation, or may be physically separated.
  • these units can all be implemented in the form of software calling through processing elements; they can also all be implemented in hardware; some units can also be implemented in the form of software calling through processing elements, and some units can be implemented in hardware.
  • the acquisition unit may be a separately established processing element, or may be integrated in a certain chip of the electronic device.
  • the implementation of other units is similar.
  • all or part of these units can be integrated together, and can also be implemented independently.
  • each step of the above-mentioned method or each of the above-mentioned units may be completed by an integrated logic circuit of hardware in the processor element or an instruction in the form of software.
  • An embodiment of the present application further provides an earphone device, including: a first earphone on which a first sound-emitting unit and a first microphone are arranged; one or more processors; a memory; and one or more computer programs , wherein the one or more computer programs are stored in the memory, and the one or more computer programs include instructions that, when executed by the device, cause the device to execute Figures 7 to 7 of the present application The method provided by the embodiment shown in FIG. 8 .
  • An embodiment of the present application further provides an earphone device, including: a first earphone and a second earphone, the first earphone is provided with a first sound generating unit and a first microphone, and the second earphone is provided with a second sound generating unit and a second microphone; one or more processors; a memory; and one or more computer programs, wherein the one or more computer programs are stored in the memory, the one or more computer programs comprising instructions, When the instruction is executed by the device, the device is caused to execute the method provided by the embodiments shown in FIG. 9 to FIG. 10 of the present application.
  • An embodiment of the present application further provides an earphone device, including: a first earphone, on which a first sound-emitting unit, a second sound-emitting unit and a first microphone are arranged; one or more processors; a memory; and a or more computer programs, wherein the one or more computer programs are stored in the memory, the one or more computer programs comprising instructions that, when executed by the apparatus, cause the apparatus to execute The methods provided by the embodiments shown in FIGS. 13 to 14 of the present application.
  • Embodiments of the present application further provide a computer-readable storage medium, where a computer program is stored in the computer-readable storage medium, and when it runs on a computer, causes the computer to execute the program provided by the embodiments shown in FIG. 7 to FIG. 14 of the present application. method.
  • An embodiment of the present application further provides a computer program product, the computer program product includes a computer program, which, when running on a computer, enables the computer to execute the methods provided by the embodiments shown in FIGS. 7 to 14 of the present application.
  • “at least one” refers to one or more, and “multiple” refers to two or more.
  • “And/or”, which describes the association relationship of the associated objects means that there can be three kinds of relationships, for example, A and/or B, which can indicate the existence of A alone, the existence of A and B at the same time, and the existence of B alone. where A and B can be singular or plural.
  • the character “/” generally indicates that the associated objects are an “or” relationship.
  • “At least one of the following” and similar expressions refer to any combination of these items, including any combination of single or plural items.
  • At least one of a, b, and c may represent: a, b, c, a and b, a and c, b and c or a and b and c, where a, b, c may be single, or Can be multiple.
  • any function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium.
  • the technical solution of the present application can be embodied in the form of a software product in essence, or the part that contributes to the prior art or the part of the technical solution.
  • the computer software product is stored in a storage medium, including Several instructions are used to cause a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present application.
  • the aforementioned storage medium includes: U disk, mobile hard disk, Read-Only Memory (Read-Only Memory; hereinafter referred to as: ROM), Random Access Memory (Random Access Memory; hereinafter referred to as: RAM), magnetic disk or optical disk and other various A medium on which program code can be stored.
  • ROM Read-Only Memory
  • RAM Random Access Memory
  • magnetic disk or optical disk and other various A medium on which program code can be stored.

Abstract

一种位置识别方法和耳机设备,该方法中,发送第一指令,第一指令用于使得第一发声单元发送第一发送信号,获取第一接收信号,第一接收信息是第一麦克风针对于第一发送信号接收到的信号,确定幅度信息,幅度信息与第一接收信号的指定频率信息对应,根据幅度信息与预设阈值之间的大小关系,确定第一耳机的佩戴位置,从而自动识别两个耳机佩戴在左耳还是右耳,无需用户进行左右耳机的辨别,提升用户体验。

Description

位置识别方法和耳机设备 技术领域
本申请涉及智能终端技术领域,特别涉及位置识别方法和耳机设备。
背景技术
为了使得用户获得更好的收听体验,很多耳机设备,例如立体声耳机和物理多通道耳机,其左耳机和右耳机中分别配置有不同的声道。用户在佩戴耳机时需要区分左右耳,将左耳机佩戴至左耳,右耳机佩戴至右耳。左右耳机不能相互调换交叉使用,否则将直接影响声源的逼真度和视听效果。
为了避免用户在使用时将左耳机和右耳机带反,一般从外观上对左右耳机进行区分。例如图1所示的头戴式耳机设备,左耳机与右耳机呈镜像对称结构,左右耳机的外形形态根据人体耳朵的形状进行仿形设计,并且,在左右耳机上分别增加L、R标识。基于图1所示结构,当用户把左右耳机戴反时,因耳机外形结构与人耳不完全匹配,会使得用户产生佩戴不适感,从而使得用户意识到耳机佩戴错误。
然而,外观上的不同虽然能够在一定程度上防止用户将耳机戴反,但是需要用户对左右耳机进行辨别,造成用户的使用不便;尤其在黑暗环境下或者情况急迫的场景下,用户仍然存在耳机戴反的可能,用户戴反后需要重新取下耳机,重新佩戴,影响用户体验。
发明内容
本申请提供了一种位置识别方法和耳机设备,自动识别两个耳机佩戴在左耳还是右耳,无需用户进行左右耳机的辨别,从而提升用户体验。
第一方面,本申请提供了一种位置识别方法,应用于耳机设备,耳机设备包括第一耳机,第一耳机上设置有第一发声单元和第一麦克风;方法包括:发送第一指令,第一指令用于使得第一发声单元发送第一发送信号;获取第一接收信号,第一接收信息是第一麦克风针对于第一发送信号接收到的信号;确定幅度信息,幅度信息与第一接收信号的指定频率信息对应;根据幅度信息与预设阈值之间的大小关系,确定第一耳机的佩戴位置。上述佩戴位置可以是:用户的左耳,或者,用户的右耳。该方法中,发送第一指令以使得第一发声单元发送第一发送信号,根据第一麦克风接收到信号的幅度信息来确定第一耳机的的佩戴位置是用户的左耳或者右耳,从而自动识别两个耳机佩戴在左耳还是右耳,无需用户进行左右耳机的辨别,提升用户体验。
在一种可能的实现方式中,指定频率信息包括:指定频点;幅度信息包括:指定频点的幅度值;根据幅度信息与预设阈值之间的大小关系,确定第一耳机的佩戴 位置,包括:如果幅度值大于预设第一阈值,确定第一耳机的佩戴位置是左耳;如果幅度值小于预设第一阈值,确定第一耳机的佩戴位置是右耳;或者,如果幅度值大于预设第二阈值,确定第一耳机的佩戴位置是右耳;如果幅度值小于预设第二阈值,确定第一耳机的佩戴位置是左耳。
在一种可能的实现方式中,指定频率信息包括:指定频段;幅度信息包括:指定频段的幅度均值;确定第一接收信号的指定频率信息对应的幅度信息,包括:获取第一接收信号在指定频段中N个指定频点的幅度值;N是大于1的自然数;计算获取到的N个幅度值的平均值,得到指定频段的幅度均值。
在一种可能的实现方式中,根据幅度信息与预设阈值之间的大小关系,确定第一耳机的佩戴位置,包括:如果幅度均值大于预设第三阈值,确定第一耳机的佩戴位置是左耳;如果幅度均值小于预设第三阈值,确定第一耳机的佩戴位置是右耳;或者,如果幅度均值大于预设第四阈值,确定第一耳机的佩戴位置是右耳;如果幅度均值小于预设第四阈值,确定第一耳机的佩戴位置是左耳。
在一种可能的实现方式中,第一发送信号是脉冲信号、最大长度序列或者扫频序列。
第二方面,本申请提供了一种位置识别方法,应用于耳机设备,耳机设备包括第一耳机,第一耳机上设置有第一发声单元和第一麦克风;其特征在于,方法包括:发送第一指令,第一指令用于使得第一发声单元发送第一发送信号;获取第一接收信号,第一接收信息是第一麦克风针对于第一发送信号接收到的信号;确定幅度信息,幅度信息与第一接收信号的指定频率信息对应;根据幅度信息与预设阈值之间的大小关系,确定第一耳机的佩戴位置;
指定频率信息包括:指定频点;幅度信息包括:指定频点的幅度值;根据幅度信息与预设阈值之间的大小关系,确定第一耳机的佩戴位置,包括:如果幅度值大于预设第一阈值,确定第一耳机的佩戴位置是左耳;如果幅度值小于预设第一阈值,确定第一耳机的佩戴位置是右耳;或者,如果幅度值大于预设第二阈值,确定第一耳机的佩戴位置是右耳;如果幅度值小于预设第二阈值,确定第一耳机的佩戴位置是左耳;或者,指定频率信息包括:指定频段;幅度信息包括:指定频段的幅度均值;确定第一接收信号的指定频率信息对应的幅度信息,包括:获取第一接收信号在指定频段中N个指定频点的幅度值;N是大于1的自然数;计算获取到的N个幅度值的平均值,得到指定频段的幅度均值;
根据幅度信息与预设阈值之间的大小关系,确定第一耳机的佩戴位置,包括:如果幅度均值大于预设第三阈值,确定第一耳机的佩戴位置是左耳;如果幅度均值小于预设第三阈值,确定第一耳机的佩戴位置是右耳;或者,如果幅度均值大于预设第四阈值,确定第一耳机的佩戴位置是右耳;如果幅度均值小于预设第四阈值,确定第一耳机的佩戴位置是左耳;
第一发送信号是脉冲信号、最大长度序列或者扫频序列。
第三方面,本申请实施例提供一种位置识别方法,应用于耳机设备,耳机设备包括第一耳机和第二耳机,第一耳机上设置有第一发声单元和第一麦克风,第二耳 机上设置有第二发声单元和第二麦克风;方法包括:发送第一指令和第二指令,第一指令用于使得第一发声单元发送第一发送信号,第二指令用于使得第二发声单元发送第二发送信号;获取第一接收信号和第二接收信号,第一接收信号是第一麦克风针对于第一发送信号接收到的信号,第二接收信号是第二麦克风针对于第二发送信号接收到的信号;确定第一幅度信息以及第二幅度信息,第一幅度信息与第一接收信号的指定频率信息对应,第二幅度信息与第二接收信号的指定频率信息对应;根据第一幅度信息和第二幅度信息之间的大小关系,确定第一耳机和第二耳机的佩戴位置。该方法中,发送第一指令以使得第一发声单元发送第一发送信号,发送第二指令以使得第二发声单元发送第二发送信号,根据第一麦克风接收到信号的第一幅度信息、以及第二麦克风接收到信号的第二幅度信息来确定第一耳机和第二耳机的佩戴位置,从而自动识别两个耳机佩戴在左耳还是右耳,无需用户进行左右耳机的辨别,提升用户体验。
在一种可能的实现方式中,指定频率信息包括:指定频点;幅度信息包括:指定频点的幅度值;根据第一幅度信息和第二幅度信息之间的大小关系,确定第一耳机和第二耳机的佩戴位置,包括:如果第一幅度信息大于第二幅度信息,确定第一耳机的佩戴位置是左耳,第二耳机的佩戴位置是右耳;如果第一幅度信息小于预设第二幅度信息,确定第一耳机的佩戴位置是右耳,第二耳机的佩戴位置是左耳;或者,如果第一幅度信息大于第二幅度信息,确定第一耳机的佩戴位置是右耳,第二耳机的佩戴位置是左耳;如果第一幅度信息小于预设第二幅度信息,确定第一耳机的佩戴位置是左耳,第二耳机的佩戴位置是右耳。
在一种可能的实现方式中,指定频率信息包括:指定频段;幅度信息包括:指定频段的幅度均值;确定第一接收信号的指定频率信息对应的第一幅度信息,以及第二接收信号的指定频率信息对应的第二幅度信息,包括:获取第一接收信号在指定频段中N个指定频点的幅度值;N是大于1的自然数;计算获取到的N个幅度值的平均值,得到指定频段的第一幅度均值;获取第二接收信号在指定频段中N个指定频点的幅度值;N是大于1的自然数;计算获取到的N个幅度值的平均值,得到指定频段的第二幅度均值。
在一种可能的实现方式中,根据第一幅度信息和第二幅度信息之间的大小关系,确定第一耳机和第二耳机的佩戴位置,包括:如果第一幅度均值大于第二幅度均值,确定第一耳机的佩戴位置是左耳,第二耳机的佩戴位置是右耳;如果第一幅度均值小于预设第二幅度均值,确定第一耳机的佩戴位置是右耳,第二耳机的佩戴位置是左耳;或者,如果第一幅度均值大于第二幅度均值,确定第一耳机的佩戴位置是右耳,第二耳机的佩戴位置是左耳;如果第一幅度均值小于预设第二幅度均值,确定第一耳机的佩戴位置是左耳,第二耳机的佩戴位置是右耳。
在一种可能的实现方式中,第一发送信号和第二发送信号相同;第一发送信号和第二发送信号是脉冲信号、最大长度序列或者扫频序列。
第四方面,本申请实施例提供一种位置识别方法,应用于耳机设备,耳机设备包括第一耳机和第二耳机,第一耳机上设置有第一发声单元和第一麦克风,第二耳 机上设置有第二发声单元和第二麦克风;方法包括:发送第一指令和第二指令,第一指令用于使得第一发声单元发送第一发送信号,第二指令用于使得第二发声单元发送第二发送信号;获取第一接收信号和第二接收信号,第一接收信号是第一麦克风针对于第一发送信号接收到的信号,第二接收信号是第二麦克风针对于第二发送信号接收到的信号;确定第一幅度信息以及第二幅度信息,第一幅度信息与第一接收信号的指定频率信息对应,第二幅度信息与第二接收信号的指定频率信息对应;根据第一幅度信息和第二幅度信息之间的大小关系,确定第一耳机和第二耳机的佩戴位置;
指定频率信息包括:指定频点;幅度信息包括:指定频点的幅度值;根据第一幅度信息和第二幅度信息之间的大小关系,确定第一耳机和第二耳机的佩戴位置,包括:如果第一幅度信息大于第二幅度信息,确定第一耳机的佩戴位置是左耳,第二耳机的佩戴位置是右耳;如果第一幅度信息小于预设第二幅度信息,确定第一耳机的佩戴位置是右耳,第二耳机的佩戴位置是左耳;或者,如果第一幅度信息大于第二幅度信息,确定第一耳机的佩戴位置是右耳,第二耳机的佩戴位置是左耳;如果第一幅度信息小于预设第二幅度信息,确定第一耳机的佩戴位置是左耳,第二耳机的佩戴位置是右耳;或者,指定频率信息包括:指定频段;幅度信息包括:指定频段的幅度均值;确定第一接收信号的指定频率信息对应的第一幅度信息,以及第二接收信号的指定频率信息对应的第二幅度信息,包括:获取第一接收信号在指定频段中N个指定频点的幅度值;N是大于1的自然数;计算获取到的N个幅度值的平均值,得到指定频段的第一幅度均值;获取第二接收信号在指定频段中N个指定频点的幅度值;N是大于1的自然数;计算获取到的N个幅度值的平均值,得到指定频段的第二幅度均值;
根据第一幅度信息和第二幅度信息之间的大小关系,确定第一耳机和第二耳机的佩戴位置,包括:如果第一幅度均值大于第二幅度均值,确定第一耳机的佩戴位置是左耳,第二耳机的佩戴位置是右耳;如果第一幅度均值小于预设第二幅度均值,确定第一耳机的佩戴位置是右耳,第二耳机的佩戴位置是左耳;或者,如果第一幅度均值大于第二幅度均值,确定第一耳机的佩戴位置是右耳,第二耳机的佩戴位置是左耳;如果第一幅度均值小于预设第二幅度均值,确定第一耳机的佩戴位置是左耳,第二耳机的佩戴位置是右耳;
第一发送信号和第二发送信号相同;第一发送信号和第二发送信号是脉冲信号、最大长度序列或者扫频序列。
第五方面,本申请实施例提供一种位置识别方法,应用于耳机设备,耳机设备包括第一耳机,第一耳机上设置有第一发声单元、第二发声单元和第一麦克风;方法包括:发送第一指令和第二指令,第一指令用于使得第一发声单元发送第一发送信号,第二指令用于使得第二发声单元发送第二发送信号;获取第一接收信号和第二接收信号,第一接收信号是第一麦克风针对于第一发送信号接收到的信号,第二接收信号是第一麦克风针对于第二发送信号接收到的信号;确定第一幅度信息以及第二幅度信息,第一幅度信息与第一接收信号的指定频率信息对应,第二幅度信息 与第二接收信号的指定频率信息对应;根据第一幅度信息和第二幅度信息之间的大小关系,确定第一耳机和第二耳机的佩戴位置。该方法中,发送第一指令以使得第一发声单元发送第一发送信号,发送第二指令以使得第二发声单元发送第二发送信号,根据第一麦克风接收到信号的第一幅度信息、以及第二麦克风接收到信号的第二幅度信息来确定第一耳机和第二耳机的佩戴位置,从而自动识别两个耳机佩戴在左耳还是右耳,无需用户进行左右耳机的辨别,提升用户体验。
在一种可能的实现方式中,指定频率信息包括:指定频点;幅度信息包括:指定频点的幅度值;根据第一幅度信息和第二幅度信息之间的大小关系,确定第一耳机和第二耳机的佩戴位置,包括:如果第一幅度信息与第二幅度信息的差值大于第五阈值,确定第一耳机的佩戴位置是左耳;如果第一幅度信息与第二幅度信息的差值小于第六阈值,确定第一耳机的佩戴位置是右耳;第五阈值大于等于0,第六阈值小于等于0;或者,如果第一幅度信息与第二幅度信息的差值大于第七阈值,确定第一耳机的佩戴位置是右耳;如果第一幅度信息与第二幅度信息的差值小于第八阈值,确定第一耳机的佩戴位置是左耳;第七阈值大于等于0,第八阈值小于等于0。
在一种可能的实现方式中,指定频率信息包括:指定频段;幅度信息包括:指定频段的幅度均值;确定第一接收信号的指定频率信息对应的第一幅度信息,以及第二接收信号的指定频率信息对应的第二幅度信息,包括:获取第一接收信号在指定频段中N个指定频点的幅度值;N是大于1的自然数;计算获取到的N个幅度值的平均值,得到指定频段的第一幅度均值;获取第二接收信号在指定频段中N个指定频点的幅度值;N是大于1的自然数;计算获取到的N个幅度值的平均值,得到指定频段的第二幅度均值。
在一种可能的实现方式中,根据第一幅度信息和第二幅度信息之间的大小关系,确定第一耳机和第二耳机的佩戴位置,包括:如果第一幅度均值与第二幅度均值的差值大于第九阈值,确定第一耳机的佩戴位置是左耳;如果第一幅度均值与第二幅度均值的差值小于第十阈值,确定第一耳机的佩戴位置是右耳;第九阈值大于等于0,第十阈值小于等于0;或者,如果第一幅度均值与第二幅度均值的差值大于第十一阈值,确定第一耳机的佩戴位置是右耳;如果第一幅度均值与第二幅度均值的差值小于第十二阈值,确定第一耳机的佩戴位置是左耳;第十一阈值大于等于0,第十二阈值小于等于0。
在一种可能的实现方式中,第一发送信号和第二发送信号相同;第一发送信号和第二发送信号是脉冲信号、最大长度序列或者扫频序列。
第六方面,本申请实施例提供一种位置识别方法,应用于耳机设备,耳机设备包括第一耳机,第一耳机上设置有第一发声单元、第二发声单元和第一麦克风;方法包括:发送第一指令和第二指令,第一指令用于使得第一发声单元发送第一发送信号,第二指令用于使得第二发声单元发送第二发送信号;获取第一接收信号和第二接收信号,第一接收信号是第一麦克风针对于第一发送信号接收到的信号,第二接收信号是第一麦克风针对于第二发送信号接收到的信号;确定第一幅度信息以及第二幅度信息,第一幅度信息与第一接收信号的指定频率信息对应,第二幅度信息 与第二接收信号的指定频率信息对应;根据第一幅度信息和第二幅度信息之间的大小关系,确定第一耳机和第二耳机的佩戴位置;
指定频率信息包括:指定频点;幅度信息包括:指定频点的幅度值;根据第一幅度信息和第二幅度信息之间的大小关系,确定第一耳机和第二耳机的佩戴位置,包括:如果第一幅度信息与第二幅度信息的差值大于第五阈值,确定第一耳机的佩戴位置是左耳;如果第一幅度信息与第二幅度信息的差值小于第六阈值,确定第一耳机的佩戴位置是右耳;第五阈值大于等于0,第六阈值小于等于0;或者,如果第一幅度信息与第二幅度信息的差值大于第七阈值,确定第一耳机的佩戴位置是右耳;如果第一幅度信息与第二幅度信息的差值小于第八阈值,确定第一耳机的佩戴位置是左耳;第七阈值大于等于0,第八阈值小于等于0;或者,指定频率信息包括:指定频段;幅度信息包括:指定频段的幅度均值;确定第一接收信号的指定频率信息对应的第一幅度信息,以及第二接收信号的指定频率信息对应的第二幅度信息,包括:获取第一接收信号在指定频段中N个指定频点的幅度值;N是大于1的自然数;计算获取到的N个幅度值的平均值,得到指定频段的第一幅度均值;获取第二接收信号在指定频段中N个指定频点的幅度值;N是大于1的自然数;计算获取到的N个幅度值的平均值,得到指定频段的第二幅度均值;
根据第一幅度信息和第二幅度信息之间的大小关系,确定第一耳机和第二耳机的佩戴位置,包括:如果第一幅度均值与第二幅度均值的差值大于第九阈值,确定第一耳机的佩戴位置是左耳;如果第一幅度均值与第二幅度均值的差值小于第十阈值,确定第一耳机的佩戴位置是右耳;第九阈值大于等于0,第十阈值小于等于0;或者,如果第一幅度均值与第二幅度均值的差值大于第十一阈值,确定第一耳机的佩戴位置是右耳;如果第一幅度均值与第二幅度均值的差值小于第十二阈值,确定第一耳机的佩戴位置是左耳;第十一阈值大于等于0,第十二阈值小于等于0;
第一发送信号和第二发送信号相同;第一发送信号和第二发送信号是脉冲信号、最大长度序列或者扫频序列。
第七方面,本申请实施例提供一种耳机设备,包括:第一耳机,第一耳机上设置有第一发声单元和第一麦克风;一个或多个处理器;存储器;以及一个或多个计算机程序,其中一个或多个计算机程序被存储在存储器中,一个或多个计算机程序包括指令,当指令被设备执行时,使得设备执行第一方面任一项的方法。
第八方面,本申请实施例提供一种耳机设备,包括:第一耳机和第二耳机,第一耳机上设置有第一发声单元和第一麦克风,第二耳机上设置有第二发声单元和第二麦克风;一个或多个处理器;存储器;以及一个或多个计算机程序,其中一个或多个计算机程序被存储在存储器中,一个或多个计算机程序包括指令,当指令被设备执行时,使得设备执行第二方面任一项的方法。
第九方面,本申请实施例提供一种耳机设备,包括:第一耳机,第一耳机上设置有第一发声单元、第二发声单元和第一麦克风;一个或多个处理器;存储器;以及一个或多个计算机程序,其中一个或多个计算机程序被存储在存储器中,一个或多个计算机程序包括指令,当指令被设备执行时,使得设备执行第三方面任一项的 方法。
上述耳机设备可以是头戴式耳机、耳挂式耳机或者入耳式耳机。耳机设备所包括的第一耳机和第二耳机在外观上可以相同,不进行左右耳机的区分。发声单元一般设置于所属侧耳机(第一耳机或第二耳机)的正面,耳机的正面是指用户佩戴耳机时贴近耳朵的一面。
第十方面,本申请实施例提供一种计算机可读存储介质,计算机可读存储介质中存储有计算机程序,当其在计算机上运行时,使得计算机执行第一方面至第三方面任一项的方法。
第十一方面,本申请提供一种计算机程序,当计算机程序被计算机执行时,用于执行第一方面的方法。
在一种可能的设计中,第十一方面中的程序可以全部或者部分存储在与处理器封装在一起的存储介质上,也可以部分或者全部存储在不与处理器封装在一起的存储器上。
附图说明
为了更清楚地说明本发明实施例的技术方案,下面将对实施例中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其它的附图。
图1为现有技术耳机设备结构示意图;
图2为本申请实施例耳机设备的一种结构示意图;
图3为本申请实施例耳机设备的另一种结构示意图;
图4为本申请实施例头戴式耳机设备中耳机正面示例图;
图5为本申请实施例头戴式耳机一种结构示意图;
图6为本申请实施例麦克风接收到的信号示意图;
图7为本申请位置识别方法一个实施例的流程图;
图8为本申请位置识别方法另一个实施例的流程图;
图9为本申请位置识别方法又一个实施例的流程图;
图10为本申请位置识别方法又一个实施例的流程图;
图11为本申请实施例头戴式耳机另一种结构示意图;
图12为本申请实施例麦克风接收到的信号示意图;
图13为本申请位置识别方法又一个实施例的流程图;
图14为本申请位置识别方法又一个实施例的流程图;
图15为本申请位置识别装置一种实施例的结构图;
图16为本申请位置识别装置另一种实施例的结构图;
图17为本申请位置识别装置又一种实施例的结构图。
具体实施方式
本申请的实施方式部分使用的术语仅用于对本申请的具体实施例进行解释,而非旨在限定本申请。
图2是本申请耳机设备的一种结构示例图,如图2所示,耳机设备200可以包括:第一耳机210,第二耳机220,处理器230;第一耳机210和第二耳机220中均包括:发声单元241,麦克风242。
可以理解的是,本发明实施例示意的结构并不构成对耳机设备200的具体限定。在本申请另一些实施例中,耳机设备200可以包括比图示更多或更少的部件,或者组合某些部件,或者拆分某些部件,或者不同的部件布置。举例来说,参见图3所示,处理器230可以拆分为第一处理器310和第二处理器320,第一处理器310连接第一耳机210中的发声单元和麦克风,第二处理器320连接第二耳机220中的发声单元和麦克风。
第一耳机210中包括的发声单元241的数量为1个或者多个,本申请实施例不作限定。第一耳机210中包括的麦克风242的数量为1个或者多个,本申请实施例不作限定。
第二耳机220中包括的发声单元241的数量为1个或者多个,本申请实施例不作限定。第二耳机220中包括的麦克风242的数量为1个或者多个,本申请实施例不作限定。
处理器230可以包括一个或多个处理单元,例如:处理器230可以包括应用处理器(application processor,AP),调制解调处理器,图形处理器(graphics processing unit,GPU),图像信号处理器(image signal processor,ISP),控制器,视频编解码器,数字信号处理器(digital signal processor,DSP),基带处理器,和/或神经网络处理器(neural-network processing unit,NPU)等。其中,不同的处理单元可以是独立的器件,也可以集成在一个或多个处理器中。
处理器230中还可以设置存储器,用于存储指令和数据。在一些实施例中,处理器230中的存储器为高速缓冲存储器。该存储器可以保存处理器230刚用过或循环使用的指令或数据。如果处理器230需要再次使用该指令或数据,可从所述存储器中直接调用。避免了重复存取,减少了处理器230的等待时间,因而提高了系统的效率。
发声单元241,用于将音频电信号转换为声音信号。
麦克风242,也称“话筒”,“传声器”,用于将声音信号转换为音频电信号。
为了便于理解,本申请以下实施例将以具有图2所示结构的耳机设备为例,结合附图和应用场景,对本申请实施例提供的方法进行具体说明。
本申请实施例的耳机设备可以是头戴式耳机、耳挂式耳机或者入耳式耳机。
本申请实施例的耳机设备所包括的第一耳机和第二耳机在外观上可以相同,不进行左右耳机的区分。
本申请实施例的发声单元一般设置于所属侧耳机(第一耳机或第二耳机)的正面,耳机的正面是指用户佩戴耳机时贴近耳朵的一面。参见图4,示出了头戴式耳机中第一耳机和第二耳机的正面41。
本申请实施例所称的耳机的佩戴位置是指用户的左耳或者用户的右耳。
本申请实施例位置识别方法可以使用一个耳机中的一个发声单元实现位置识别。
首先说明实现原理。
对于一个耳机设备而言,发声单元以及麦克风在所属耳机中的位置是确定的。那么,如果该耳机佩戴于用户的某一侧耳朵时,假设发声单元发送信号X,麦克风基于发声单元发送的信号X接收到信号Y,如果发声单元多次发送信号X,那么麦克风多次接收到的信号Y的频谱相似,比如在同一频点,多个信号Y的幅值一般相近。而且,该耳机佩戴于用户的左耳时麦克风接收到的信号Y的频谱,该耳机佩戴于用户的右耳时麦克风接收到的信号Y的频谱,两个频谱具有差异。上述差异可以体现在:在某些频点或频段,左耳对应的信号Y的幅值,右耳对应的信号Y的幅值,两者之间存在可检测的差值。
参见图5,以头戴式耳机设备为例,其包括第一耳机210和第二耳机220,分别以耳罩的形式存在。第一耳机210和第二耳机220外观结构相同,在相同位置分别设置有发声单元511和发声单元521,且在相同位置分别设置有麦克风512和麦克风522。假设用户将第一耳机210佩戴于左耳,第二耳机220佩戴于右耳。发声单元511和发声单元521分别发出同一信号,该信号可以是脉冲信号、MLS序列(Maximum length sequence)、扫频序列等信号。
麦克风512接收发声单元511发出的信号,麦克风522接收发声单元521发出的信号,由于左右耳结构的不同,虽然发声单元511和发声单元521发送的信号相同,麦克风512和麦克风522接收到的信号存在差异。
例如图6所示,给出了麦克风512和麦克风522接收到的信号频谱示例图,实线所示波形61为麦克风512接收到的信号频谱示例图,虚线所示波形62为麦克风522接收到的信号频谱示例图,基于该示例图可知,在很多频点和频段,麦克风512接收到的信号的幅度小于麦克风522接收到的信号的幅度,也即是佩戴于左耳的麦克风接收到的信号的幅度大于佩戴于右耳的麦克风接收到的信号的幅度,尤其是0~10kHZ这一频段,这种表现更为明显。
需要说明的是,图6仅为第一麦克风和第二麦克风接收到的信号示例,耳机结构不同、发声单元在耳罩中所处的位置不同、发声单元发出的信号不同、耳罩中麦克风所处的位置不同等因素均会对麦克风中接收到的信号产生影响,但是,可以确定的是,由于左右耳结构的差异,相同的耳罩佩戴于左耳和佩戴于右耳所接收到的信号,在某些频点或者频段,同一频点的信号幅度存在差异,且这种差异存在共性,也即佩戴于左耳的麦克风接收到的信号的幅度小于佩戴于右耳的麦克风接收到的信号的幅度,或者,佩戴于左耳的麦克风接收到的信号的幅度大于佩戴于右耳的麦克风接收到的信号的幅度。技术人员可以基于所设计的耳机,通过实验的方式获得在发声单元发送相同信号的情况下,两个耳机中的麦克风接收到的具体信号,从而确定两个信号之间在各频点的信号幅度的差异程度。
基于此,以在同一频点,佩戴于左耳的麦克风接收到的信号的幅度大于佩戴于右耳的麦克风接收到的信号的幅度为例,提供图7~图10所示的位置识别方法。
图7是本申请位置识别方法一个实施例的流程图,如图7所示,该方法可以包括:
步骤701:发送第一指令,第一指令用于使得第一耳机的第一发声单元发送第一发送信号。
第一发送信号可以是脉冲信号、最大长度序列(maximum length sequence,MLS)、扫频序列等信号。
第一耳机可以是耳机设备所包括的2个耳机中的任一耳机,第一发声单元设置于第一耳机中,优选设置于第一耳机的正面。
步骤702:获取第一接收信号,第一接收信号是第一耳机的第一麦克风接收到的信号。
第一麦克风设置于第一耳机中,优选设置于第一耳机的正面。
步骤703:确定第一接收信号在指定频点的幅度值。
其中,指定频点对于不同耳机设备可能具有不同的取值,本申请实施例并不限定。需要说明的是,假设第一耳机佩戴于左耳时第一麦克风接收到的信号为第一信号,第一耳机佩戴于右耳时第一麦克风接收到的信号为第二信号,技术人员可以通过实验的方式,获得上述第一信号和第二信号,得到例如图6所示的两个信号的波形,并选择其中幅度值差异相对较大的频点。以图6为例,可以选择20Hz~20kHz中的任一频点作为上述指定频点,例如,可以选择幅值差异最大的频点a,以便提高检测精确度。或者,为了防止发声单元发出的信号被人耳认定为噪声,提高用户体验,也可以选择0~20Hz中的某一频点,或者20kHz以上的某一频点,作为指定频点,从而在用户没有察觉的情况下即可实现左右耳的检测,例如在图6所示的波形下,可以选择0~20Hz或者20kHz以上的频点中幅值差异相对较大的频点作为指定频点。
需要说明的是,为了使得指定频点的选择更为准确,可以多次实验得到多个第一信号和第二信号,通过统计的方式确定指定频点,这里不再赘述。
步骤704:判断幅度值是否大于预设第一阈值,如果是,确定第一耳机的佩戴位置是用户的左耳,否则,确定第一耳机的佩戴位置是用户的右耳。
第一阈值的具体取值与步骤703中指定频点的选择相关,本申请实施例不作限定。在一种可能的实现方式中,延续步骤703中的说明,一旦指定频点确定,可以基于第一信号在指定频点处的幅度值、以及第二信号在指定频点处的幅度值取两个幅度值的中间值也即两者的幅度值的均值,作为第一阈值。延续步骤703中的举例,如果指定频点为图6中所示的频点a,频点a处的两个幅度值分别为b1和b2,可以计算b1和b2的中间值作为第一阈值。如果通过多次实验得到了多个第一信号和第二信号,也可以统计得到多个第一阈值,取其均值作为最终的第一阈值。
可选地,为了提高本申请位置识别方法的识别精确度,上述步骤701~步骤703可以执行M次,M是大于1的自然数,得到第一接收信号在指定频点的M个幅度值,步骤704之前还可以包括:计算上述M个幅度值的平均值或者中位数;相应的,步骤704中可以判断幅度值的平均值或者中位数是否大于预设第一阈值。
可选地,为了提高本申请位置识别方法的识别精确度,上述图7所示的方法可以执行K次,K是大于1的自然数,得到K个位置识别结果,耳机设备可以基于K个 位置识别结果,选择出现次数相对较多的位置识别结果作为最终位置识别结果。
区别于图7所示实施例基于第一接收信号在指定频点的幅度值确定第一耳机佩戴于左耳或者右耳,在图8所示实施例中,基于第一接收信号在指定频段的幅度均值确定第一耳机佩戴于左耳或者右耳,此时,步骤703~步骤704被替换为步骤801~步骤802:
步骤801:计算第一接收信号在指定频段的幅度均值。
在一种可能的实现方式中,本步骤可以包括:
获取第一接收信号在N个指定频点的幅度值,N个指定频点均位于指定频段;
计算获取到的N个幅度值的平均值,得到指定频段的幅度均值。
指定频点的选择与步骤703中指定频点的选择相似,在通过实验获得第一信号和第二信号后,可以选择各频点的幅度值差异相对较大的频段作为指定频段,例如图6中所示的频段0.1~10kHz。
步骤802:判断幅度均值是否大于预设第二阈值,如果是,确定第一耳机的佩戴位置是用户的左耳,否则,确定第一耳机的佩戴位置是用户的右耳。
第二阈值的确定与步骤704中第一阈值的确定类似,具体取值本申请实施例不作限定。在一种可能的实现方式中,延续步骤703中的说明,一旦指定频点确定,可以基于第一信号在指定频段处的幅度值计算幅度值均值,基于第二信号在指定频段处的幅度值计算幅度值均值,再进一步计算两个幅度值均值的均值,作为第二阈值。如果通过多次实验得到了多个第一信号和第二信号,也可以统计得到多个第二阈值,取其均值作为最终的第二阈值。
可选地,为了提高本申请位置识别方法的识别精确度,上述步骤701~步骤801可以执行M次,M是大于1的自然数,得到第一接收信号在指定频段的M个幅度均值,步骤802之前还可以包括:计算上述M个幅度均值的平均值或者中位数;相应的,步骤802中可以判断幅度均值的平均值或者中位数是否大于预设第一阈值。
可选地,为了提高本申请位置识别方法的识别精确度,上述图8所示的方法可以执行K次,K是大于1的自然数,得到K个位置识别结果,耳机设备可以基于K个位置识别结果,选择出现次数相对较多的位置识别结果作为最终位置识别结果。
图7和图8所示方法可以适用于图2所示结构的耳机设备,如果图7和图8所示方法扩展至图3所示结构的耳机设备,图7和图8所示方法可以由第一处理器执行,得到第一耳机的佩戴位置,也即位置识别结果后,可以将该识别结果发送至第二处理器,以便于第一处理器和第二处理器基于位置识别结果进行音频播放。
本申请实施例位置识别方法可以分别使用两个耳机中的一个发声单元进行位置识别的方法。
其实现原理可以参考前述关于图5和图6的说明,具体的:在很多频点和频段,佩戴于左耳的麦克风接收到的信号的幅度小于佩戴于右耳的麦克风接收到的信号的幅度。基于此,提供图9和图10所示的位置识别方法。
参见图9,本申请实施例位置识别方法可以包括:
步骤901:发送第一指令,第一指令用于使得第一耳机的第一发声单元发送第一发送信号。
步骤902:发送第二指令,第二指令用于使得第二耳机的第二发声单元发送第二发送信号。
可选地,第一发送信号和第二发送信号是相同信号。第一发送信号和第二发送信号可以是脉冲信号、MLS序列、扫频序列等信号。
步骤903:获取第一接收信号和第二接收信号,第一接收信号是第一耳机的第一麦克风接收到的信号,第二接收信号是第二耳机的第二麦克风接收到的信号。
步骤904:确定第一接收信号在指定频点的第一幅度值,确定第二接收信号在指定频点的第二幅度值。
本步骤中指定频点的选择可以参考步骤703中的说明,这里不赘述。
步骤905:计算第一幅度值和第二幅度值的差值,如果差值大于0,确定第一耳机的佩戴位置是用户的左耳,第二耳机的佩戴位置是用户的右耳;如果差值小于0,确定第一耳机的佩戴位置是用户的右耳,第二耳机的佩戴位置是用户的左耳;如果差值等于0,返回步骤901和步骤902,重新发送第一指令和第二指令,再次进行位置识别。
可选地,上述步骤901~步骤904可以执行M次,M是大于1的自然数,得到第一接收信号在指定频点的M个第一幅度值,第二接收信号在指定频点的M个第二幅度值;步骤905之前还可以包括:计算上述M个第一幅度值的平均值或者中位数,计算上述M个第二幅度值的平均值或者中位数;相应的,步骤905中可以计算上述平均值或者中位数的差值,进行后续处理。
可选地,为了提高本申请位置识别方法的识别精确度,上述图9所示的方法可以执行K次,K是大于1的自然数,得到K个位置识别结果,耳机设备可以基于K个位置识别结果,选择出现次数相对较多的位置识别结果作为最终位置识别结果。
区别于图9中通过两个接收信号在指定频点的幅度值差值确定第一耳机和第二耳机的佩戴位置,在图10所示的方法中,通过两个接收信号在指定频段的幅度均值的差值确定第一耳机和第二耳机的佩戴位置,具体的,步骤904和步骤905被替换为以下的步骤1001~步骤1002:
步骤1001:计算第一接收信号在指定频段的第一幅度均值,计算第二接收信号在指定频段的第二幅度均值。
本步骤中指定频段的选择可以参考步骤801中的说明,这里不赘述。
步骤1002:计算第一幅度均值和第二幅度均值的差值,如果差值大于0,确定第一耳机的佩戴位置是用户的左耳,第二耳机的佩戴位置是用户的右耳;如果差值小于0,第一耳机的佩戴位置是用户的右耳,第二耳机的佩戴位置是用户的左耳;如果差值等于0,返回步骤901和步骤902,重新发送第一指令和第二指令,再次进行位置识别。
可选地,上述步骤901~步骤1001可以执行M次,M是大于1的自然数,得到第一接收信号在指定频段的M个第一幅度均值,第二接收信号在指定频段的M个第二幅度均值;步骤1002之前还可以包括:计算上述M个第一幅度均值的平均值或者中位数,计算上述M个第二幅度均值的平均值或者中位数;相应的,步骤1002中可以计算上述平均值或者中位数的差值,进行后续处理。
可选地,为了提高本申请位置识别方法的识别精确度,上述图10所示的方法可以执行K次,K是大于1的自然数,得到K个位置识别结果,耳机设备可以基于K个位置识别结果,选择出现次数相对较多的位置识别结果作为最终位置识别结果。
图9和图10所示方法可以适用于图2所示结构的耳机设备,如果图9和图10所示方法扩展至图3所示结构的耳机设备,图9和图10可以由第一处理器执行,此时,步骤902中第一处理器可以将第二指令发送至第二处理器,进而由第二处理器控制第二发声单元发送第二发送信号,相应的,第二接收信号也可以由第二麦克风通过第二处理器发送至第一处理器,第一处理器得到位置识别结果后,可以将该位置识别结果发送至第二处理器,以便于第一处理器和第二处理器基于位置识别结果进行音频播放。
以上图7~图10以在同一频点,佩戴于左耳的麦克风接收到的信号的幅度大于佩戴于右耳的麦克风接收到的信号的幅度为例,如果在同一频点,佩戴于左耳的麦克风接收到的信号的幅度小于佩戴于右耳的麦克风接收到的信号的幅度,则位置识别方法的实现可以参考上述图7~图10,区别仅在于最终识别结果与上述图7~图10相反。
本申请实施例位置识别方法可以使用一个耳机中的2个发声单元实现位置识别。
首先说明实现原理。
参见图11,以头戴式耳机设备为例,两个耳机以耳罩的形式存在,两个耳机的外观结构相同。第一耳机210是头戴式耳机设备的一个耳机,第一耳机210上设置有第一发声单元111、第二发声单元112以及第一麦克风113。可选地,第一发声单元111、第二发声单元112以及第一麦克风113设置于第一耳机210的正面,相互之间的位置关系本申请实施例不作限定。在图11中,以第一发声单元111、第二发声单元112分别位于第一麦克风113的两侧为例。
如图11中左侧图所示,第一耳机210佩戴于左耳时,第一发声单元111位于左耳耳廓的后侧,第二发声单元112位于左耳耳廓的前侧,此时,第一发声单元111和第二发声单元112分别发出信号1和信号2,可选地,信号1和信号2相同;以信号1和信号2相同为例,第一发声单元111和第二发声单元112可以依次发出信号1和信号2,第一麦克风113针对于信号1接收到信号3,针对于信号2接收到信号4,由于第一发声单元111、第二发声单元112相对于左耳的位置不同,相对于第一麦克风的位置不同,此时,信号3和信号4在很多频点或者频段,同一频点的信号幅度存在差异,具体差异与第一耳机210的结构、第一发声单元111、第二发声单元112以及第一麦克风113之间的位置关系等相关,但是这种幅度差异在很多情况下是单向的, 也即一个信号在大多数频点或频段的幅度均大于另一个信号,例如图12左侧图中,信号3的频谱可以如信号121所示,信号4的频谱可以如信号122所示,可见在大多数频段,信号121的幅度大于信号122的幅度,例如频段0~10kHz,这种表现更为明显;
如图11中右侧图所示,第一耳机210佩戴于右耳时,第一发声单元111位于右耳耳廓的前侧,第二发声单元112位于右耳耳廓的后侧,此时,如果信号1和信号2相同,第一发声单元111和第二发声单元112依次发出信号1和信号2,第一麦克风113针对于信号1接收到信号5,针对于信号2接收到信号6,由于第一发声单元111、第二发声单元112相对于右耳的位置不同,此时,信号5和信号6在很多频点或者频段,同一频点的信号幅度也存在差异,这种幅度差异在很多情况下也是单向的,而且,由于第一发声单元111、第二发声单元112相对于右耳的位置关系、与第一发声单元111、第二发声单元112相对于左耳的位置关系正好是相反的,所以这种幅度差异与上述信号3和信号4的差异也是相反的。举例来说,如果信号3在很多频点或者频段的幅度均大于信号4,那么信号5在很多频点或者频段的幅度均小于信号6。例如图12右侧图中,信号6的频谱可以如波形123所示,信号5的频谱可以如波形124所示,大多数频段,信号5的幅度小于信号6的幅度。
需要说明的是,以上说明中以同一频点,信号3的幅度大于信号4的幅度,信号5的幅度小于信号6的幅度为例,在第一发声单元111和第二发生单元112的位置发生变化后,也可能出现同一频点,信号3的幅度小于信号4的幅度,信号5的幅度大于信号6的幅度的情况。
以下以信号3的幅度大于信号4的幅度,信号5的幅度小于信号6的幅度为例,提供图13和图14所示的位置识别方法。
参见图13,本申请实施例位置识别方法可以包括:
步骤1301:发送第一指令,第一指令用于使得第一耳机的第一发声单元发送第一发送信号,获取第一接收信号,第一接收信号是第一耳机的第一麦克风针对于第一发送信号所接收到的信号。
步骤1302:发送第二指令,第二指令用于第一耳机的第二发声单元发送第二发送信号,获取第二接收信号,第一接收信号是第一耳机的第一麦克风针对于第二发送信号所接收到的信号。
可选地,第一发送信号和第二发送信号是相同信号。第一发送信号和第二发送信号可以是脉冲信号、MLS序列、扫频序列等信号。
步骤1303:确定第一接收信号在指定频点的第一幅度值,确定第二接收信号在指定频点的第二幅度值。
其中,指定频点对于不同耳机设备可能具有不同的取值,本申请实施例并不限定。需要说明的是,技术人员可以通过实验的方式,获得第一耳机佩戴于左耳时的第一接收信号和第二接收信号,以及第一耳机佩戴于右耳时的第一接收信号和第二接收信号,得到左右耳对应的幅度值差异相反的频点作为指定频点。以图12为例,可以选择20Hz~10kHz中的任一频点作为上述指定频点,例如,可以选择幅值差异最大的频点 a,以便提高检测精确度。或者,为了防止发声单元发出的信号被人耳认定为噪声,提高用户体验,也可以选择0~20Hz中的某一频点,或者20kHz以上的某一频点,作为指定频点,从而在用户没有察觉的情况下即可实现左右耳的检测,例如在图6所示的波形下,可以选择0~20Hz或者20kHz以上的频点中幅值差异相对较大的频点作为指定频点。
步骤1304:计算第一幅度值和第二幅度值的差值,如果差值大于第一差值阈值,确定第一耳机的佩戴位置是用户的左耳,第二耳机的佩戴位置是用户的右耳;如果差值小于第二差值阈值,确定第一耳机的佩戴位置是用户的右耳,第二耳机的佩戴位置是用户的左耳;否则,返回步骤1301和步骤1302,重新发送第一指令和第二指令,再次进行位置识别。
其中,第一差值阈值和第二差值阈值可以均为0;或者,第一差值阈值大于0,第二差值阈值小于0,优选的,第一差值阈值和第二差值阈值绝对值相等。
可选地,上述步骤1301~步骤1303可以执行M次,M是大于1的自然数,得到第一接收信号在指定频点的M个第一幅度值,第二接收信号在指定频点的M个第二幅度值;步骤1304之前还可以包括:计算上述M个第一幅度值的平均值或者中位数,计算上述M个第二幅度值的平均值或者中位数;相应的,步骤1305中可以计算上述平均值或者中位数的差值,进行后续处理。
可选地,为了提高本申请位置识别方法的识别精确度,上述图13所示的方法可以执行K次,K是大于1的自然数,得到K个位置识别结果,耳机设备可以基于K个位置识别结果,选择出现次数相对较多的位置识别结果作为最终位置识别结果。
区别于图13中通过两个接收信号在指定频点的幅度值差值确定第一耳机佩戴位置,在图14所示的方法中,通过两个接收信号在指定频段的幅度均值的差值确定第一耳机佩戴位置,具体的,步骤1303和步骤1304被替换为以下的步骤1401~步骤1402:
步骤1401:计算第一接收信号在指定频段的第一幅度均值,计算第二接收信号在指定频段的第二幅度均值。
其中,指定频段的选择可以参考步骤1303中关于指定频点的说明,区别在于,步骤1401中选择的是左右耳对应的幅度值差异相反的频段作为指定频段。以图12为例,可以选择0.1~10kHz作为上述指定频段。
步骤1402:计算第一幅度均值和第二幅度均值的差值,如果差值大于第三差值阈值,确定第一耳机的佩戴位置是用户的左耳,第二耳机的佩戴位置是用户的右耳;如果差值小于第四差值阈值,确定第一耳机的佩戴位置是用户的右耳,第二耳机的佩戴位置是用户的左耳;否则,返回步骤1301和步骤1302,重新发送第一指令和第二指令,再次进行位置识别。
其中,第三差值阈值和第四差值阈值可以均为0;或者,第三差值阈值大于0,第四差值阈值小于0,或者,第三差值阈值和第四差值阈值绝对值相等。
可选地,上述步骤1301~步骤1401可以执行M次,M是大于1的自然数,得到第一接收信号在指定频段的M个第一幅度均值,第二接收信号在指定频段的M个第 二幅度均值;步骤1402之前还可以包括:计算上述M个第一幅度均值的平均值或者中位数,计算上述M个第二幅度均值的平均值或者中位数;相应的,步骤1402中可以计算上述平均值或者中位数的差值,进行后续处理。
可选地,为了提高本申请位置识别方法的识别精确度,上述图14所示的方法可以执行K次,K是大于1的自然数,得到K个位置识别结果,耳机设备可以基于K个位置识别结果,选择出现次数相对较多的位置识别结果作为最终位置识别结果。
图13和图14所示方法可以适用于图2所示结构的耳机设备,如果图13和图14所示方法扩展至图3所示结构的耳机设备,图13和图14可以由第一处理器执行,得到第一耳机的佩戴位置,也即位置识别结果后,可以将该位置识别结果发送至第二处理器,以便于第一处理器和第二处理器基于位置识别结果进行音频播放。
以上图11~图12以同一频点,信号3的幅度大于信号4的幅度,信号5的幅度小于信号6的幅度为例,如果在同一频点,信号3的幅度小于信号4的幅度,信号5的幅度大于信号6的幅度,则位置识别方法的实现可以参考上述图11~图12,区别仅在于最终识别结果与上述图11~图12相反。
基于图11和图12所示的实现原理,本申请实施例位置识别方法可以使用两个耳机中的2个发声单元分别实现位置识别,此时,可以使用第一耳机中的2个发声单元通过上述图13或图14所示方法得到第一位置识别结果,使用第二耳机中的2个发声单元通过上述图13或图14所示方法得到第二位置识别结果,两个位置识别结果进行比对,一致时说明第一位置识别结果和第二位置识别结果准确,否则,重新进行位置识别。
以上本申请实施例提供的位置识别方法,在用户戴上耳机设备后自动识别耳机设备中2个耳机佩戴于左耳还是右耳,无需用户进行左右耳机的辨别,从而方便用户的使用,提升用户体验。
而且,耳机设备中的2个耳机在外观上无需区分左右耳,也无需进行标识,用户不存在戴反左右耳机的情况,避免了现有技术中用户戴反左右耳机时耳机与耳朵无法适配所产生的不适感;而且,左右耳机在外观上可以完全一致,可以使得左右耳机共用结构件和模具,减少零件数量,在一定程度上降低制造成本,且在产线装配时不需要严格区分左、右耳。
可以理解的是,上述实施例中的部分或全部步骤或操作仅是示例,本申请实施例还可以执行其它操作或者各种操作的变形。此外,各个步骤可以按照上述实施例呈现的不同的顺序来执行,并且有可能并非要执行上述实施例中的全部操作。
图15为本申请位置识别装置一个实施例的结构示意图,该装置可以应用于耳机设备,耳机设备包括第一耳机,第一耳机上设置有第一发声单元和第一麦克风;如图15所示,该装置1500可以包括:
发送单元1510,用于发送第一指令,第一指令用于使得第一发声单元发送第一发送信号;
获取单元1520,用于获取第一接收信号,第一接收信息是第一麦克风针对于第一发送信号接收到的信号;
确定单元1530,用于确定幅度信息,幅度信息与第一接收信号的指定频率信息对应;根据幅度信息与预设阈值之间的大小关系,确定第一耳机的佩戴位置。
在一种可能的实现方式中,指定频率信息包括:指定频点;幅度信息包括:指定频点的幅度值;确定单元1530具体可以用于:如果幅度值大于预设第一阈值,确定第一耳机的佩戴位置是左耳;如果幅度值小于预设第一阈值,确定第一耳机的佩戴位置是右耳;或者,如果幅度值大于预设第二阈值,确定第一耳机的佩戴位置是右耳;如果幅度值小于预设第二阈值,确定第一耳机的佩戴位置是左耳。
在一种可能的实现方式中,指定频率信息包括:指定频段;幅度信息包括:指定频段的幅度均值;确定单元1530具体可以用于:获取第一接收信号在指定频段中N个指定频点的幅度值;N是大于1的自然数;计算获取到的N个幅度值的平均值,得到指定频段的幅度均值。
在一种可能的实现方式中,确定单元1530具体可以用于:如果幅度均值大于预设第三阈值,确定第一耳机的佩戴位置是左耳;如果幅度均值小于预设第三阈值,确定第一耳机的佩戴位置是右耳;或者,如果幅度均值大于预设第四阈值,确定第一耳机的佩戴位置是右耳;如果幅度均值小于预设第四阈值,确定第一耳机的佩戴位置是左耳。
在一种可能的实现方式中,第一发送信号是脉冲信号、最大长度序列或者扫频序列。
图16为本申请位置识别装置一个实施例的结构示意图,该装置可以应用于耳机设备,耳机设备包括第一耳机和第二耳机,第一耳机上设置有第一发声单元和第一麦克风,第二耳机上设置有第二发声单元和第二麦克风;如图16所示,该装置1600可以包括:
发送单元1610,用于发送第一指令和第二指令,第一指令用于使得第一发声单元发送第一发送信号,第二指令用于使得第二发声单元发送第二发送信号;
获取单元1620,用于获取第一接收信号和第二接收信号,第一接收信号是第一麦克风针对于第一发送信号接收到的信号,第二接收信号是第二麦克风针对于第二发送信号接收到的信号;
确定单元1630,用于确定第一幅度信息以及第二幅度信息,第一幅度信息与第一接收信号的指定频率信息对应,第二幅度信息与第二接收信号的指定频率信息对应;根据第一幅度信息和第二幅度信息之间的大小关系,确定第一耳机和第二耳机的佩戴位置。
在一种可能的实现方式中,指定频率信息包括:指定频点;幅度信息包括:指定频点的幅度值;确定单元1630具体可以用于:如果第一幅度信息大于第二幅度信息,确定第一耳机的佩戴位置是左耳,第二耳机的佩戴位置是右耳;如果第一幅度信息小于预设第二幅度信息,确定第一耳机的佩戴位置是右耳,第二耳机的佩戴位置是左耳;或者,如果第一幅度信息大于第二幅度信息,确定第一耳机的佩戴位置 是右耳,第二耳机的佩戴位置是左耳;如果第一幅度信息小于预设第二幅度信息,确定第一耳机的佩戴位置是左耳,第二耳机的佩戴位置是右耳。
在一种可能的实现方式中,指定频率信息包括:指定频段;幅度信息包括:指定频段的幅度均值;确定单元1630具体可以用于:获取第一接收信号在指定频段中N个指定频点的幅度值;N是大于1的自然数;计算获取到的N个幅度值的平均值,得到指定频段的第一幅度均值;获取第二接收信号在指定频段中N个指定频点的幅度值;N是大于1的自然数;计算获取到的N个幅度值的平均值,得到指定频段的第二幅度均值。
在一种可能的实现方式中,确定单元1630具体可以用于:如果第一幅度均值大于第二幅度均值,确定第一耳机的佩戴位置是左耳,第二耳机的佩戴位置是右耳;如果第一幅度均值小于预设第二幅度均值,确定第一耳机的佩戴位置是右耳,第二耳机的佩戴位置是左耳;或者,如果第一幅度均值大于第二幅度均值,确定第一耳机的佩戴位置是右耳,第二耳机的佩戴位置是左耳;如果第一幅度均值小于预设第二幅度均值,确定第一耳机的佩戴位置是左耳,第二耳机的佩戴位置是右耳。
在一种可能的实现方式中,第一发送信号和第二发送信号相同;第一发送信号和第二发送信号是脉冲信号、最大长度序列或者扫频序列。
图17为本申请位置识别装置一个实施例的结构示意图,该装置可以应用于耳机设备,耳机设备包括第一耳机,第一耳机上设置有第一发声单元、第二发声单元和第一麦克风;如图17所示,该装置1700可以包括:
发送单元1710,用于发送第一指令和第二指令,第一指令用于使得第一发声单元发送第一发送信号,第二指令用于使得第二发声单元发送第二发送信号;
获取单元1720,用于获取第一接收信号和第二接收信号,第一接收信号是第一麦克风针对于第一发送信号接收到的信号,第二接收信号是第一麦克风针对于第二发送信号接收到的信号;
确定单元1730,用于确定第一幅度信息以及第二幅度信息,第一幅度信息与第一接收信号的指定频率信息对应,第二幅度信息与第二接收信号的指定频率信息对应;根据第一幅度信息和第二幅度信息之间的大小关系,确定第一耳机和第二耳机的佩戴位置。
在一种可能的实现方式中,指定频率信息包括:指定频点;幅度信息包括:指定频点的幅度值;确定单元1730具体可以用于:如果第一幅度信息与第二幅度信息的差值大于第五阈值,确定第一耳机的佩戴位置是左耳;如果第一幅度信息与第二幅度信息的差值小于第六阈值,确定第一耳机的佩戴位置是右耳;第五阈值大于等于0,第六阈值小于等于0;或者,如果第一幅度信息与第二幅度信息的差值大于第七阈值,确定第一耳机的佩戴位置是右耳;如果第一幅度信息与第二幅度信息的差值小于第八阈值,确定第一耳机的佩戴位置是左耳;第七阈值大于等于0,第八阈值小于等于0。
在一种可能的实现方式中,指定频率信息包括:指定频段;幅度信息包括:指定频段的幅度均值;确定单元1730具体可以用于:获取第一接收信号在指定频段中 N个指定频点的幅度值;N是大于1的自然数;计算获取到的N个幅度值的平均值,得到指定频段的第一幅度均值;获取第二接收信号在指定频段中N个指定频点的幅度值;N是大于1的自然数;计算获取到的N个幅度值的平均值,得到指定频段的第二幅度均值。
在一种可能的实现方式中,确定单元1730具体可以用于:如果第一幅度均值与第二幅度均值的差值大于第九阈值,确定第一耳机的佩戴位置是左耳;如果第一幅度均值与第二幅度均值的差值小于第十阈值,确定第一耳机的佩戴位置是右耳;第九阈值大于等于0,第十阈值小于等于0;或者,如果第一幅度均值与第二幅度均值的差值大于第十一阈值,确定第一耳机的佩戴位置是右耳;如果第一幅度均值与第二幅度均值的差值小于第十二阈值,确定第一耳机的佩戴位置是左耳;第十一阈值大于等于0,第十二阈值小于等于0。
在一种可能的实现方式中,第一发送信号和第二发送信号相同;第一发送信号和第二发送信号是脉冲信号、最大长度序列或者扫频序列。
图15~图17所示实施例提供的装置可用于执行本申请图7~图14所示方法实施例的技术方案,其实现原理和技术效果可以进一步参考方法实施例中的相关描述。
应理解以上图15~图17所示装置的各个单元的划分仅仅是一种逻辑功能的划分,实际实现时可以全部或部分集成到一个物理实体上,也可以物理上分开。且这些单元可以全部以软件通过处理元件调用的形式实现;也可以全部以硬件的形式实现;还可以部分单元以软件通过处理元件调用的形式实现,部分单元通过硬件的形式实现。例如,获取单元可以为单独设立的处理元件,也可以集成在电子设备的某一个芯片中实现。其它单元的实现与之类似。此外这些单元全部或部分可以集成在一起,也可以独立实现。在实现过程中,上述方法的各步骤或以上各个单元可以通过处理器元件中的硬件的集成逻辑电路或者软件形式的指令完成。
本申请实施例还提供一种耳机设备,包括:第一耳机,所述第一耳机上设置有第一发声单元和第一麦克风;一个或多个处理器;存储器;以及一个或多个计算机程序,其中所述一个或多个计算机程序被存储在所述存储器中,所述一个或多个计算机程序包括指令,当所述指令被所述设备执行时,使得所述设备执行本申请图7~图8所示实施例提供的方法。
本申请实施例还提供一种耳机设备,包括:第一耳机和第二耳机,所述第一耳机上设置有第一发声单元和第一麦克风,所述第二耳机上设置有第二发声单元和第二麦克风;一个或多个处理器;存储器;以及一个或多个计算机程序,其中所述一个或多个计算机程序被存储在所述存储器中,所述一个或多个计算机程序包括指令,当所述指令被所述设备执行时,使得所述设备执行本申请图9~图10所示实施例提供的方法。
本申请实施例还提供一种耳机设备,包括:第一耳机,所述第一耳机上设置有第一发声单元、第二发声单元和第一麦克风;一个或多个处理器;存储器;以及一个或多个计算机程序,其中所述一个或多个计算机程序被存储在所述存储器中,所述一个或多个计算机程序包括指令,当所述指令被所述设备执行时,使得所述设备 执行本申请图13~图14所示实施例提供的方法。
本申请实施例还提供一种计算机可读存储介质,该计算机可读存储介质中存储有计算机程序,当其在计算机上运行时,使得计算机执行本申请图7~图14所示实施例提供的方法。
本申请实施例还提供一种计算机程序产品,该计算机程序产品包括计算机程序,当其在计算机上运行时,使得计算机执行本申请图7~图14所示实施例提供的方法。
本申请实施例中,“至少一个”是指一个或者多个,“多个”是指两个或两个以上。“和/或”,描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示单独存在A、同时存在A和B、单独存在B的情况。其中A,B可以是单数或者复数。字符“/”一般表示前后关联对象是一种“或”的关系。“以下至少一项”及其类似表达,是指的这些项中的任意组合,包括单项或复数项的任意组合。例如,a,b和c中的至少一项可以表示:a,b,c,a和b,a和c,b和c或a和b和c,其中a,b,c可以是单个,也可以是多个。
本领域普通技术人员可以意识到,本文中公开的实施例中描述的各单元及算法步骤,能够以电子硬件、计算机软件和电子硬件的结合来实现。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的系统、装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。
在本申请所提供的几个实施例中,任一功能如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(Read-Only Memory;以下简称:ROM)、随机存取存储器(Random Access Memory;以下简称:RAM)、磁碟或者光盘等各种可以存储程序代码的介质。
以上所述,仅为本申请的具体实施方式,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本申请的保护范围之内。本申请的保护范围应以所述权利要求的保护范围为准

Claims (19)

  1. 一种位置识别方法,应用于耳机设备,所述耳机设备包括第一耳机,所述第一耳机上设置有第一发声单元和第一麦克风;其特征在于,所述方法包括:
    发送第一指令,所述第一指令用于使得所述第一发声单元发送第一发送信号;
    获取第一接收信号,所述第一接收信息是所述第一麦克风针对于所述第一发送信号接收到的信号;
    确定幅度信息,所述幅度信息与所述第一接收信号的指定频率信息对应;
    根据所述幅度信息与预设阈值之间的大小关系,确定所述第一耳机的佩戴位置。
  2. 根据权利要求1所述的方法,其特征在于,所述指定频率信息包括:指定频点;所述幅度信息包括:所述指定频点的幅度值;所述根据所述幅度信息与预设阈值之间的大小关系,确定所述第一耳机的佩戴位置,包括:
    如果所述幅度值大于预设第一阈值,确定所述第一耳机的佩戴位置是左耳;如果所述幅度值小于预设第一阈值,确定所述第一耳机的佩戴位置是右耳;或者,
    如果所述幅度值大于预设第二阈值,确定所述第一耳机的佩戴位置是右耳;如果所述幅度值小于预设第二阈值,确定所述第一耳机的佩戴位置是左耳。
  3. 根据权利要求1所述的方法,其特征在于,所述指定频率信息包括:指定频段;所述幅度信息包括:所述指定频段的幅度均值;所述确定幅度信息,包括:
    获取所述第一接收信号在所述指定频段中N个指定频点的幅度值;N是大于1的自然数;
    计算获取到的N个幅度值的平均值,得到所述指定频段的幅度均值。
  4. 根据权利要求3所述的方法,其特征在于,所述根据所述幅度信息与预设阈值之间的大小关系,确定所述第一耳机的佩戴位置,包括:
    如果所述幅度均值大于预设第三阈值,确定所述第一耳机的佩戴位置是左耳;如果所述幅度均值小于预设第三阈值,确定所述第一耳机的佩戴位置是右耳;或者,
    如果所述幅度均值大于预设第四阈值,确定所述第一耳机的佩戴位置是右耳;如果所述幅度均值小于预设第四阈值,确定所述第一耳机的佩戴位置是左耳。
  5. 根据权利要求1至4任一项所述的方法,其特征在于,所述第一发送信号是脉冲信号、最大长度序列或者扫频序列。
  6. 一种位置识别方法,应用于耳机设备,所述耳机设备包括第一耳机和第二耳机,所述第一耳机上设置有第一发声单元和第一麦克风,所述第二耳机上设置有第二发声单元和第二麦克风;其特征在于,所述方法包括:
    发送第一指令和第二指令,所述第一指令用于使得所述第一发声单元发送第一发送信号,所述第二指令用于使得所述第二发声单元发送第二发送信号;
    获取第一接收信号和第二接收信号,所述第一接收信号是所述第一麦克风针对于所述第一发送信号接收到的信号,所述第二接收信号是所述第二麦克风针对于所述第二发送信号接收到的信号;
    确定第一幅度信息以及第二幅度信息,所述第一幅度信息与所述第一接收信号的指定频率信息对应,所述第二幅度信息与所述第二接收信号的指定频率信息对应;
    根据所述第一幅度信息和所述第二幅度信息之间的大小关系,确定所述第一耳机和所述第二耳机的佩戴位置。
  7. 根据权利要求6所述的方法,其特征在于,所述指定频率信息包括:指定频点;所述幅度信息包括:所述指定频点的幅度值;所述根据所述第一幅度信息和所述第二幅度信息之间的大小关系,确定所述第一耳机和所述第二耳机的佩戴位置,包括:
    如果所述第一幅度信息大于所述第二幅度信息,确定所述第一耳机的佩戴位置是左耳,所述第二耳机的佩戴位置是右耳;如果所述第一幅度信息小于预设第二幅度信息,确定所述第一耳机的佩戴位置是右耳,所述第二耳机的佩戴位置是左耳;或者,
    如果所述第一幅度信息大于所述第二幅度信息,确定所述第一耳机的佩戴位置是右耳,所述第二耳机的佩戴位置是左耳;如果所述第一幅度信息小于预设第二幅度信息,确定所述第一耳机的佩戴位置是左耳,所述第二耳机的佩戴位置是右耳。
  8. 根据权利要求6所述的方法,其特征在于,所述指定频率信息包括:指定频段;所述幅度信息包括:所述指定频段的幅度均值;所述确定第一幅度信息以及第二幅度信息,包括:
    获取所述第一接收信号在所述指定频段中N个指定频点的幅度值;N是大于1的自然数;计算获取到的N个幅度值的平均值,得到所述指定频段的第一幅度均值;
    获取所述第二接收信号在所述指定频段中N个指定频点的幅度值;N是大于1的自然数;计算获取到的N个幅度值的平均值,得到所述指定频段的第二幅度均值。
  9. 根据权利要求8所述的方法,其特征在于,所述根据所述第一幅度信息和所述第二幅度信息之间的大小关系,确定所述第一耳机和所述第二耳机的佩戴位置,包括:
    如果所述第一幅度均值大于所述第二幅度均值,确定所述第一耳机的佩戴位置是左耳,所述第二耳机的佩戴位置是右耳;如果所述第一幅度均值小于预设第二幅度均值,确定所述第一耳机的佩戴位置是右耳,所述第二耳机的佩戴位置是左耳;或者,
    如果所述第一幅度均值大于所述第二幅度均值,确定所述第一耳机的佩戴位置是右耳,所述第二耳机的佩戴位置是左耳;如果所述第一幅度均值小于预设第二幅度均值,确定所述第一耳机的佩戴位置是左耳,所述第二耳机的佩戴位置是右耳。
  10. 根据权利要求6至9任一项所述的方法,其特征在于,所述第一发送信号和所述第二发送信号相同;第一发送信号和第二发送信号是脉冲信号、最大长度序列或者扫频序列。
  11. 一种位置识别方法,应用于耳机设备,所述耳机设备包括第一耳机,所述第一耳机上设置有第一发声单元、第二发声单元和第一麦克风;其特征在于,所述 方法包括:
    发送第一指令和第二指令,所述第一指令用于使得所述第一发声单元发送第一发送信号,所述第二指令用于使得所述第二发声单元发送第二发送信号;
    获取第一接收信号和第二接收信号,所述第一接收信号是所述第一麦克风针对于所述第一发送信号接收到的信号,所述第二接收信号是所述第一麦克风针对于所述第二发送信号接收到的信号;
    确定第一幅度信息以及第二幅度信息,所述第一幅度信息与所述第一接收信号的指定频率信息对应,所述第二幅度信息与所述第二接收信号的指定频率信息对应;
    根据所述第一幅度信息和所述第二幅度信息之间的大小关系,确定所述第一耳机和第二耳机的佩戴位置。
  12. 根据权利要求11所述的方法,其特征在于,所述指定频率信息包括:指定频点;所述幅度信息包括:所述指定频点的幅度值;所述根据所述第一幅度信息和所述第二幅度信息之间的大小关系,确定所述第一耳机和第二耳机的佩戴位置,包括:
    如果所述第一幅度信息与所述第二幅度信息的差值大于第五阈值,确定所述第一耳机的佩戴位置是左耳;如果所述第一幅度信息与所述第二幅度信息的差值小于第六阈值,确定所述第一耳机的佩戴位置是右耳;所述第五阈值大于等于0,所述第六阈值小于等于0;或者,
    如果所述第一幅度信息与所述第二幅度信息的差值大于第七阈值,确定所述第一耳机的佩戴位置是右耳;如果所述第一幅度信息与所述第二幅度信息的差值小于第八阈值,确定所述第一耳机的佩戴位置是左耳;所述第七阈值大于等于0,所述第八阈值小于等于0。
  13. 根据权利要求11所述的方法,其特征在于,所述指定频率信息包括:指定频段;所述幅度信息包括:所述指定频段的幅度均值;所述确定第一幅度信息以及第二幅度信息,包括:
    获取所述第一接收信号在所述指定频段中N个指定频点的幅度值;N是大于1的自然数;计算获取到的N个幅度值的平均值,得到所述指定频段的第一幅度均值;
    获取所述第二接收信号在所述指定频段中N个指定频点的幅度值;N是大于1的自然数;计算获取到的N个幅度值的平均值,得到所述指定频段的第二幅度均值。
  14. 根据权利要求13所述的方法,其特征在于,所述根据所述第一幅度信息和所述第二幅度信息之间的大小关系,确定所述第一耳机和第二耳机的佩戴位置,包括:
    如果所述第一幅度均值与所述第二幅度均值的差值大于第九阈值,确定所述第一耳机的佩戴位置是左耳;如果所述第一幅度均值与所述第二幅度均值的差值小于第十阈值,确定所述第一耳机的佩戴位置是右耳;所述第九阈值大于等于0,所述第十阈值小于等于0;或者,
    如果所述第一幅度均值与所述第二幅度均值的差值大于第十一阈值,确定所述第一耳机的佩戴位置是右耳;如果所述第一幅度均值与所述第二幅度均值的差值小 于第十二阈值,确定所述第一耳机的佩戴位置是左耳;所述第十一阈值大于等于0,所述第十二阈值小于等于0。
  15. 根据权利要求11至14任一项所述的方法,其特征在于,所述第一发送信号和所述第二发送信号相同;所述第一发送信号和所述第二发送信号是脉冲信号、最大长度序列或者扫频序列。
  16. 一种耳机设备,其特征在于,包括:
    第一耳机,所述第一耳机上设置有第一发声单元和第一麦克风;一个或多个处理器;存储器;以及一个或多个计算机程序,其中所述一个或多个计算机程序被存储在所述存储器中,所述一个或多个计算机程序包括指令,当所述指令被所述设备执行时,使得所述设备执行权利要求1至5任一项所述的方法。
  17. 一种耳机设备,其特征在于,包括:
    第一耳机和第二耳机,所述第一耳机上设置有第一发声单元和第一麦克风,所述第二耳机上设置有第二发声单元和第二麦克风;一个或多个处理器;存储器;以及一个或多个计算机程序,其中所述一个或多个计算机程序被存储在所述存储器中,所述一个或多个计算机程序包括指令,当所述指令被所述设备执行时,使得所述设备执行权利要求6至10任一项所述的方法。
  18. 一种耳机设备,其特征在于,包括:
    第一耳机,所述第一耳机上设置有第一发声单元、第二发声单元和第一麦克风;一个或多个处理器;存储器;以及一个或多个计算机程序,其中所述一个或多个计算机程序被存储在所述存储器中,所述一个或多个计算机程序包括指令,当所述指令被所述设备执行时,使得所述设备执行权利要求11至15任一项所述的方法。
  19. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质中存储有计算机程序,当其在计算机上运行时,使得计算机执行权利要求1至15任一项所述的方法。
PCT/CN2021/139766 2020-12-30 2021-12-20 位置识别方法和耳机设备 WO2022143268A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202011606044.0A CN114697790B (zh) 2020-12-30 2020-12-30 位置识别方法和耳机设备
CN202011606044.0 2020-12-30

Publications (1)

Publication Number Publication Date
WO2022143268A1 true WO2022143268A1 (zh) 2022-07-07

Family

ID=82132413

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/139766 WO2022143268A1 (zh) 2020-12-30 2021-12-20 位置识别方法和耳机设备

Country Status (2)

Country Link
CN (1) CN114697790B (zh)
WO (1) WO2022143268A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117041886A (zh) * 2023-08-31 2023-11-10 青岛柯锐思德电子科技有限公司 一种基于集成uwb无线耳机的标签定位追踪方法

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108093327A (zh) * 2017-09-15 2018-05-29 歌尔科技有限公司 一种检验耳机佩戴一致性的方法、装置和电子设备
CN108391205A (zh) * 2018-03-30 2018-08-10 广东欧珀移动通信有限公司 左右声道切换方法和装置、可读存储介质、终端
CN108551631A (zh) * 2018-04-28 2018-09-18 维沃移动通信有限公司 一种音质补偿方法及移动终端
CN110505547A (zh) * 2018-05-17 2019-11-26 深圳瑞利声学技术股份有限公司 一种耳机佩戴状态检测方法及耳机
CN110740396A (zh) * 2018-07-18 2020-01-31 安克创新科技股份有限公司 一种降噪耳机
CN110896509A (zh) * 2018-09-13 2020-03-20 北京三星通信技术研究有限公司 耳机佩戴状态确定方法、电子设备控制方法及电子设备

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111988690B (zh) * 2019-05-23 2023-06-27 小鸟创新(北京)科技有限公司 一种耳机佩戴状态检测方法、装置和耳机
CN111988692B (zh) * 2020-08-07 2022-11-15 歌尔科技有限公司 耳机佩戴状态检测方法、装置、耳机及存储介质

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108093327A (zh) * 2017-09-15 2018-05-29 歌尔科技有限公司 一种检验耳机佩戴一致性的方法、装置和电子设备
CN108391205A (zh) * 2018-03-30 2018-08-10 广东欧珀移动通信有限公司 左右声道切换方法和装置、可读存储介质、终端
CN108551631A (zh) * 2018-04-28 2018-09-18 维沃移动通信有限公司 一种音质补偿方法及移动终端
CN110505547A (zh) * 2018-05-17 2019-11-26 深圳瑞利声学技术股份有限公司 一种耳机佩戴状态检测方法及耳机
CN110740396A (zh) * 2018-07-18 2020-01-31 安克创新科技股份有限公司 一种降噪耳机
CN110896509A (zh) * 2018-09-13 2020-03-20 北京三星通信技术研究有限公司 耳机佩戴状态确定方法、电子设备控制方法及电子设备

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117041886A (zh) * 2023-08-31 2023-11-10 青岛柯锐思德电子科技有限公司 一种基于集成uwb无线耳机的标签定位追踪方法
CN117041886B (zh) * 2023-08-31 2024-02-09 青岛柯锐思德电子科技有限公司 一种基于集成uwb无线耳机的标签定位追踪方法

Also Published As

Publication number Publication date
CN114697790B (zh) 2023-07-28
CN114697790A (zh) 2022-07-01

Similar Documents

Publication Publication Date Title
US11470416B2 (en) Method and device for detecting earphone wearing status, and earphone
CN109379653B (zh) 音频传输方法、装置、电子设备及存储介质
CN105530580B (zh) 听力系统
JP6419222B2 (ja) 音質改善のための方法及びヘッドセット
CN104429096A (zh) 音频信号输出装置和处理音频信号的方法
WO2020107604A1 (zh) 一种无线播放设备及其播放控制方法和装置
CN112954530B (zh) 一种耳机降噪方法、装置、系统及无线耳机
CN113542479B (zh) 录音方法、装置、无线耳机及存储介质
CN108235164B (zh) 一种麦克风颈环耳机
US11664042B2 (en) Voice signal enhancement for head-worn audio devices
WO2018000764A1 (zh) 一种声道自动匹配的方法、装置以及耳机
WO2022143268A1 (zh) 位置识别方法和耳机设备
WO2019109420A1 (zh) 左右声道确定方法及耳机设备
CN113473286A (zh) 一种状态检测方法、耳机及计算机可读存储介质
CN113207056B (zh) 一种无线耳机及其透传方法、装置及系统
WO2021129197A1 (zh) 一种语音信号处理方法及装置
WO2023197474A1 (zh) 一种耳机模式对应的参数确定方法、耳机、终端和系统
WO2020019822A1 (zh) 麦克风堵孔检测方法及相关产品
CN111781555A (zh) 具有校正功能的有源降噪耳机声源定位方法和装置
US20240056734A1 (en) Selective modification of stereo or spatial audio
WO2022178852A1 (zh) 一种辅助聆听方法及装置
CN112804608B (zh) 带助听功能tws耳机的使用方法、系统、主机及存储介质
CN117768826A (zh) 助听器和声音信号处理方法
WO2021129196A1 (zh) 一种语音信号处理方法及装置
WO2022116876A1 (zh) 切换耳机声道的方法、系统及耳机终端

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21914007

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 21914007

Country of ref document: EP

Kind code of ref document: A1