Microphone position detection method, earphone and storage medium

By obtaining the characteristic vector of the breathing signal in the earphones and combining it with the characteristic vector in the calibration stage to calculate the expansion and contraction ratio of the microphone, the problem of active frequency sweep affecting the user experience is solved, and reliable microphone position detection is achieved.

CN120769210AActive Publication Date: 2025-10-10GOERTEK INC
View PDF 10 Cites 0 Cited by

Patent Information

Application Number
CN202511294073.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-09-11
Publication Date
2025-10-10
Estimated Expiration
2045-09-11

AI Technical Summary

Technical Problem

The sound during active frequency sweeping can be perceived by the user, affecting the normal usage experience of the headphones.

Method used

By acquiring the breathing signal when the headphones are connected, the target feature vector after noise reduction is extracted. Combined with the feature vectors of the telescopic rod when it is fully retracted and extended during the calibration phase, the telescopic ratio is calculated to determine the position of the microphone, avoiding active frequency sweep detection.

Benefits of technology

Microphone position detection is achieved without frequency sweep detection, improving detection reliability and user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120769210A_ABST
    Figure CN120769210A_ABST
Patent Text Reader

Abstract

The invention discloses a microphone position detection method, an earphone and a storage medium, relates to the technical field of earphones, and is applied to the earphone, the earphone is provided with a telescopic rod and a microphone connected to the telescopic rod, and the microphone position detection method comprises the following steps: when the earphone is in a connection state, acquiring a breathing signal of a preset duration acquired by the microphone; extracting a target feature vector of the denoised breathing signal; obtaining a first feature vector when the telescopic rod is completely folded and a second feature vector when the telescopic rod is completely extended, wherein the first feature vector and the second feature vector are determined in the calibration stage; and according to the target feature vector, the first feature vector and the second feature vector, calculating the telescoping proportion of the telescoping rod, and determining the target position of the microphone according to the telescoping proportion. Based on the feature vector of real-time breathing and the calibrated feature vector, the telescopic proportion of the telescopic rod is fitted, the position of the microphone is calculated in real time through the telescopic proportion, frequency sweeping detection is not needed, the use experience of the earphone is guaranteed, and the detection reliability is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of earphone technology, and in particular to a microphone position detection method, earphones, and a storage medium. Background Art

[0002] On gaming headsets, users can adjust the microphone's telescopic stem to suit their needs, adjusting the microphone's position and improving voice quality. The microphone's telescopic position often correlates with optimal noise reduction parameters and audio processing algorithms, making detection of the microphone's telescopic stem's telescopic position crucial.

[0003] In related microphone position detection methods, the position is usually detected by using the speaker's sweep frequency signal collected by the microphone. However, the sound during active sweep frequency detection can be perceived by the user, affecting the normal use of the headset.

[0004] The above content is only used to assist in understanding the technical solution of this application and does not constitute an admission that the above content is prior art. Summary of the Invention

[0005] The main purpose of this application is to provide a microphone position detection method, headphones and storage medium, aiming to solve the technical problem that the sound is perceived by the user during active frequency scanning, which reduces the user experience of the headphones.

[0006] To achieve the above-mentioned object, the present application proposes a method for detecting the position of a microphone, which is applied to a headset. The headset is provided with a telescopic rod and a microphone disposed on the telescopic rod. The method for detecting the position of the microphone includes: Acquire a breathing signal of a preset duration collected by the microphone when the headset is in a connected state; Extracting a target feature vector of the respiratory signal after noise reduction; Obtaining a first eigenvector when the telescopic rod is fully retracted and a second eigenvector when the telescopic rod is fully extended, determined during a calibration phase; The telescopic ratio of the telescopic rod is calculated according to the target eigenvector, the first eigenvector, and the second eigenvector, and the target position of the microphone is determined according to the telescopic ratio.

[0007] In one embodiment, the step of extracting the target feature vector of the denoised respiratory signal includes: Extracting an effective frequency band of the respiratory signal after noise reduction, and dividing the effective frequency band into multiple frequency bands; Calculating multiple frequency band energies corresponding to the multiple frequency bands; Calculating the spectrum centroid corresponding to the effective frequency band; constructing the target feature vector according to the multiple frequency band energies and the spectral centroid, wherein the multiple frequency band energies and the spectral centroid are sub-elements of the target feature vector.

[0008] In an embodiment, the step of calculating the multiple frequency band energies corresponding to the multiple frequency bands comprises: accumulating squares of the modulus of each frequency in the current frequency band to obtain a current frequency band accumulation value; calculating a logarithm of the current frequency band accumulation value to obtain a frequency band energy of the current frequency band based on a logarithm formula of a preset value; obtaining the multiple frequency band energies calculated.

[0009] In an embodiment, the step of calculating the spectral centroid corresponding to the effective frequency band comprises: calculating a sum of energies of all frequency points in the effective frequency band, and a product of an energy corresponding to each frequency point and the frequency point and the energy; accumulating the product to obtain a weighted energy, and calculating a quotient between the weighted energy and the sum of energies to obtain the spectral centroid corresponding to the effective frequency band.

[0010] In an embodiment, the step of calculating the stretching ratio of the stretching rod according to the target feature vector, the first feature vector and the second feature vector, and determining the target position of the microphone according to the stretching ratio comprises: determining a first Euclidean distance between the target feature vector and the first feature vector; determining a second Euclidean distance between the second feature vector and the first feature vector; determining the stretching ratio according to a quotient of the first Euclidean distance and the second Euclidean distance, and determining the target position based on the stretching ratio.

[0011] In an embodiment, the step of calculating the stretching ratio of the stretching rod according to the target feature vector, the first feature vector and the second feature vector, and determining the target position of the microphone according to the stretching ratio further comprises: determining a third Euclidean distance between the target feature vector and the second feature vector; determining the stretching ratio according to a quotient of the third Euclidean distance and the second Euclidean distance, and determining the target position based on the stretching ratio.

[0012] In an embodiment, before the step of obtaining the breathing signal collected by the microphone for a preset time length when the earphone is in a connected state, the position detection method of the microphone further comprises: acquiring the first calibration signal of the preset time length collected by the microphone when the earphone is in a first calibration stage, the telescopic rod being in a fully retracted state in the first calibration stage; extracting a first calibration frequency band of the first calibration signal after noise reduction, and extracting a frequency band energy and a spectral centroid based on the first calibration frequency band to obtain the first feature vector; acquiring the second calibration signal of the preset time length collected by the microphone when the earphone is in a second calibration stage, the telescopic rod being in a fully extended state in the second calibration stage; extracting a second calibration frequency band of the second calibration signal after noise reduction, and extracting a frequency band energy and a spectral centroid based on the second calibration frequency band to obtain the second feature vector.

[0013] In an embodiment, the earphone is provided with a rigid rotating rod, and the microphone is arranged on the rigid rotating rod. After the step of extracting the target feature vector of the breathing signal after noise reduction, the position detection method of the microphone further comprises: acquiring a rotating feature vector corresponding to a maximum rotating angle and a minimum rotating angle of the rigid rotating rod in the calibration stage; calculating a target rotating position of the rigid rotating rod according to the target feature vector and the rotating feature vector, and determining the target position based on the target rotating position.

[0014] In addition, to achieve the above-mentioned purposes, the present application further provides an earphone, which comprises a memory, a processor, and a computer program stored in the memory and executable on the processor, and the computer program is configured to implement the steps of the position detection method of the microphone as described above.

[0015] In addition, to achieve the above-mentioned purposes, the present application further provides a storage medium, which is a computer readable storage medium, and the storage medium stores a computer program, and the computer program is executed by a processor to implement the steps of the position detection method of the microphone as described above.

[0016] The one or more technical solutions provided by the present application have at least the following technical effects: After the headphones are connected to the device, the breathing signal currently being collected by the microphone is acquired. The target eigenvector of the noise-reduced breathing signal is then extracted. Combined with the first eigenvector of the fully retracted telescopic rod and the second eigenvector of the fully extended telescopic rod, determined during the calibration phase, the telescopic rod's telescopic ratio at the time the breathing signal is currently being collected is calculated. Finally, the microphone's target position is calculated based on this telescopic ratio. By fitting the eigenvectors of real-time breathing with the eigenvectors of the fully extended and fully retracted telescopic rods during the calibration phase, the current telescopic ratio is determined. The microphone position is then calculated in real time using this ratio. This allows for microphone position detection without the need for frequency sweep detection, improving detection reliability while ensuring a comfortable headphone experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.

[0018] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following is a brief introduction to the drawings required for use in the embodiments or the description of the prior art. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0019] Figure 1 A schematic diagram of the headset of the present application when a rigid telescopic rod or a rigid rotating rod is provided; Figure 2 A schematic diagram of a flow chart of a first embodiment of a method for detecting a microphone position according to the present application; Figure 3 A schematic flow chart of a second embodiment of a method for detecting a microphone position according to the present application; Figure 4 A brief flowchart of a microphone position detection method provided in the third embodiment of the present application is shown; Figure 5 Schematic diagram of the device structure of the hardware operating environment involved in the microphone position detection method in the embodiment of the present application.

[0020] Description of Figure Numbers: 1. Rigid telescopic rod; 2. Rigid rotating rod; 3. Knob.

[0021] The purpose, features and advantages of this application will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0022] It should be understood that the specific embodiments described herein are merely used to explain the technical solutions of the present application and are not intended to limit the present application.

[0023] The main solution of the embodiment of the present application is: obtaining a breathing signal of a preset duration collected by the microphone when the headset is in a connected state; Extracting a target feature vector of the respiratory signal after noise reduction; Obtaining a first eigenvector when the telescopic rod is fully retracted and a second eigenvector when the telescopic rod is fully extended, determined during a calibration phase; The telescopic ratio of the telescopic rod is calculated according to the target eigenvector, the first eigenvector, and the second eigenvector, and the target position of the microphone is determined according to the telescopic ratio.

[0024] In this embodiment, for ease of description, the following description is made with headphones as the execution subject.

[0025] On gaming headsets, users can adjust the microphone's telescopic stem to suit their needs, adjusting the microphone's position and improving voice quality. The microphone's telescopic position often correlates with optimal noise reduction parameters and audio processing algorithms, making detection of the microphone's telescopic stem's telescopic position crucial.

[0026] In related microphone position detection methods, the position is usually detected by using the speaker's sweep frequency signal collected by the microphone. However, the sound during active sweep frequency detection can be perceived by the user, affecting the normal use of the headset.

[0027] The present application provides a solution. By fitting the eigenvectors of real-time breathing and the eigenvectors of the telescopic rod in the fully extended and fully retracted positions during the calibration phase, the current telescopic ratio of the telescopic rod is obtained. The microphone position is calculated in real time based on the telescopic ratio. In this way, the microphone position detection can be achieved without frequency sweep detection, thereby improving the detection reliability while ensuring the user experience of the headphones.

[0028] In order to better understand the technical solution of the present application, a detailed description will be given below in conjunction with the accompanying drawings and specific implementation methods.

[0029] The embodiment of the present application provides a method for detecting the position of a microphone, which is applied to headphones. The headphones are provided with a telescopic rod and a microphone arranged on the telescopic rod. When the telescopic rod is extended or retracted, the position of the microphone relative to the headphones changes accordingly. The telescopic rod is a rigid telescopic rod, such as Figure 1 As shown in the telescopic rod 1 of A, the microphone can be moved in the linear telescopic area of ​​the telescopic rod 1 to adjust the position of the microphone. The telescopic area of ​​the telescopic rod 1 is fixed, and the microphone moves in a specific area.

[0030] Based on this, refer toFigure 2 , Figure 2 Figure 1 is a flowchart of a first embodiment of a microphone position detection method of the present application.

[0031] In this embodiment, the microphone position detection method comprises steps S10-S30: Step S10, obtaining a breathing signal collected by the microphone for a preset time length when the earphone is in a connected state.

[0032] The connected state refers to that the earphone is connected to the client through wired connection or wireless connection, and is not connected for the first time, or it is detected that the user wears the earphone, such as identifying the distance between the earphone and the user's ear through a simple sensor to determine whether the earphone is in a wearing state. In a game headset, the position is usually detected by a sensor, but the sensor detection method not only increases the hardware cost, but also increases the complexity of the earphone structure, resulting in low detection reliability and accuracy. Even if the microphone position can be calculated by collecting the sweep frequency signal of the loudspeaker, the active sweep frequency sound will be perceived by the user, affecting the normal use of the user.

[0033] Therefore, in this embodiment, when it is detected that the user wears the earphone, i.e. the earphone is connected to the client, the microphone on the telescopic rod is turned on to collect the user's breathing sound in real time. The collection time is a preset time length, such as 10 seconds, 20 seconds, etc. The preset time length can be set according to the actual situation, and the preset time length is usually the same as the time length of the calibration breathing signal collected in the calibration stage.

[0034] Step S20, extracting a target feature vector of the breathing signal after noise reduction.

[0035] When the telescopic rod is in different telescopic proportions, the microphone is at different distances from the sound source such as the user's mouth, and there is a difference between the breathing signals collected at different sound source collection positions. Therefore, in this embodiment, after the breathing signal is processed by noise reduction, the feature vector of the signal after noise reduction is calculated, so as to analyze the distance or position relationship between the microphone and the sound source through the feature vectors of the telescopic rod in different telescopic states, so as to determine the target position of the microphone.

[0036] Specifically, the target feature vector includes the frequency band energy of the signal after noise reduction and the spectral centroid of the frequency band. The current frequency band energy and the spectral centroid of the frequency band can be calculated by a preset frequency band energy calculation formula. In addition, when the position of the telescopic rod changes, the signal attenuation / enhancement rules of different frequency bands in a signal are different, so in order to reflect the features corresponding to different frequency bands, the current frequency band can be divided into multiple frequency bands, and then the frequency band energy corresponding to each of the multiple frequency bands is calculated, so as to capture this frequency-dependent change pattern and improve the accuracy of subsequent position calculation.

[0037] Further, when the breathing signal is denoised, the environmental noise spectrum one second before signal collection can be taken as a noise template: wherein N(f) is the frequency domain representation of the environmental noise, FFT is the fast Fourier transform, and noise_signal is the time domain noise signal.

[0038] The collected breathing signal is then subjected to spectral subtraction calculation: wherein is the frequency domain representation of the calibration signal, containing the target signal and the environmental noise, is the modulus of , representing the amplitude of the calibration signal at frequency f, is the modulus of the noise amplitude spectrum, is the amplitude spectrum of the calibration signal after spectral subtraction processing.

[0039] Optionally, after the breathing signal is denoised, a band-pass filter can be used to retain a specific frequency band, such as the 100-1000 Hz breathing sound effective frequency band: The signal in this frequency band contains the core characteristics of breathing, thereby effectively filtering out noise interference.

[0040] In step S30, the first feature vector when the telescopic rod is fully retracted and the second feature vector when the telescopic rod is fully extended determined in the calibration stage are obtained.

[0041] In this embodiment, when the user uses the earphone for the first time, the breathing sound of the user needs to be calibrated. In the calibration stage, the user can be guided to keep normal breathing in a stationary state through a mobile phone application or earphone playback voice. The calibration stage includes two stages. In the first stage, the user is prompted to fully extend the telescopic rod, and the breathing sound of a preset time length, such as 10 s, is collected based on the microphone. In the second stage, the user is prompted to fully retract the telescopic rod, and the breathing sound of a preset time length, such as 10 s, is collected based on the microphone. Then the frequency band energy and the spectral centroid corresponding to the breathing signals collected in the two different stages are calculated, thereby obtaining the feature vectors corresponding to the stages. The signals collected in the calibration stage also need to be denoised.

[0042] By obtaining the first feature vector and the second feature vector determined in the calibration stage, the actual spatial distance can be determined based on the spatial distance between the feature vectors, thereby quantifying the difference between the target feature vector and the calibration feature vector, and calculating the actual telescopic ratio of the telescopic rod.

[0043] ​​​Step S40, according to the target feature vector, the first feature vector and the second feature vector, the telescopic ratio of the telescopic rod is calculated, and the target position of the microphone is determined according to the telescopic ratio.

[0044] It should be noted that the telescopic ratio refers to the extended ratio of the current position of the telescopic rod relative to the entire telescopic process, or the remaining unextended ratio.

[0045] In feature vector analysis, each feature such as frequency band energy and spectral centroid is regarded as a dimension of feature space. When the position of the telescopic rod changes, the frequency domain attenuation law of the signal changes, resulting in the coordinated change of each feature. By mapping these features to the coordinates of the feature space, the difference of the feature vectors is quantified by using the Euclidean distance, and then the physical position ratio of the telescopic rod can be derived by combining the two end points in the calibration stage.

[0046] The telescopic ratio of the telescopic rod has a linear relationship with the change of the feature vector F. The first feature vector F1 and the second feature vector F2 can be regarded as two end points of a straight line, i.e. the corresponding telescopic ratio is 0 to 1 when the telescopic rod is fully retracted to fully extended, and the target feature vector F' falls on this straight line or approximately falls on the straight line due to noise, and its position can be calculated by the distance ratio.

[0047] Therefore, as an optional implementation, the first Euclidean distance D1 between the target feature vector F' and the first feature vector F1 can be calculated At the same time, the second Euclidean distance D2 between the second feature vector F2 and the first feature vector F1 is calculated Then, the telescopic ratio P is determined according to the quotient of the first Euclidean distance D1 and the second Euclidean distance D2 Finally, the target position is determined based on the telescopic ratio. That is, the telescopic ratio calculation formula is as follows:

[0048] Wherein, n represents the dimension of the vector, and the calculation method of the second Euclidean distance is the same. Therefore, when the feature vector contains the frequency band energy E and the spectral centroid C, the square root of the sum can be taken to obtain the Euclidean distance. For example, when the feature vector contains the energy of low, medium and high frequency bands, and the spectral centroid, the first Euclidean distance calculation formula is as follows: Wherein, E1 is the low frequency band energy, E2 is the medium frequency band energy, and E3 is the high frequency band.

[0049] It can be understood that the extension ratio of the telescopic rod is linearly related to the change of the feature vector F, the first feature vector F1 and the second feature vector F2 can be regarded as two end points of a straight line, the corresponding extension ratio of the telescopic rod is 0 to 1 when the telescopic rod is fully retracted to fully extended, and the target feature vector F' falls on the straight line or approximately falls on the straight line due to noise, and the position can be calculated by the distance ratio. The first Euclidean distance represents the proportion of the distance between the current extension position of the telescopic rod and the position when the telescopic rod is fully retracted to the total extension distance. Therefore, the extension ratio P calculated based on the quotient of the first Euclidean distance and the second Euclidean distance can be understood as the proportion of the telescopic rod that has been extended.

[0050] In another optional embodiment, a third Euclidean distance between the target feature vector and the second feature vector can also be determined, and then the extension ratio is determined according to the quotient of the third Euclidean distance and the second Euclidean distance, and the target position is determined based on the extension ratio. Wherein, the third Euclidean distance represents the proportion of the distance between the current extension position of the telescopic rod and the position when the telescopic rod is fully extended to the total extension distance. Therefore, the extension ratio P calculated based on the quotient of the third Euclidean distance and the second Euclidean distance can be understood as the proportion of the telescopic rod that has not been extended. Wherein, the proportion of the telescopic rod that has been extended and the proportion of the telescopic rod that has not been extended are complementary. It should be noted that whether it is the proportion of the telescopic rod that has been extended or the proportion of the telescopic rod that has not been extended, it is a description of different directions of the extension length of the telescopic rod.

[0051] After the extension ratio is determined, since the extension position of the telescopic rod of the earphone is fixed, the target position can be directly determined through the mapping relationship between the extension ratio and the target position, for example, when the extension ratio is 50%, the corresponding microphone position is (x1, y1, z1).

[0052] The embodiment provides a position detection method of a microphone. The position detection method comprises the following steps: obtaining a breathing signal when the earphone is in a connected state; calculating a target feature vector based on the breathing signal after noise reduction; obtaining a calibration feature vector in a calibration stage; calculating a first Euclidean distance between the target feature vector and the calibration feature vector and a second Euclidean distance between the calibration feature vectors; obtaining an extension ratio in an extension direction or a retraction direction according to the quotient of the first Euclidean distance and the second Euclidean distance; and determining the position of the microphone based on the extension ratio. In this way, the position detection of the microphone can be realized through the normal breathing signal of the user, without active frequency sweeping and without setting an additional sensor module, so that the reliability of the microphone position calculation is improved, and the hearing experience of the user is avoided from being reduced due to the microphone position detection.

[0053] Based on the first embodiment of the present application, in the second embodiment of the present application, the same or similar contents as the above first embodiment can be referred to the above description, and will not be described in detail. On this basis, please refer to Figure 3 , step S20 comprises steps S21-S24: Step S21 : extracting the effective frequency band of the respiratory signal after noise reduction, and dividing the effective frequency band into multiple frequency bands.

[0054] In this embodiment, in order to reflect the characteristics corresponding to different frequency bands, the current frequency band can be divided into multiple frequency bands. The effective frequency band here generally refers to the frequency band of 100Hz to 1000Hz, and the multiple frequency bands are generally three frequency bands, including a low frequency band of 100-300Hz, a mid-frequency band of 300-600Hz, and a high frequency band of 600-1000Hz. By dividing the effective frequency band into multiple frequency bands, based on the frequency band energy corresponding to each frequency band, a more fine-grained and physically meaningful feature dimension is provided for the subsequent Euclidean distance, accurately capturing the distribution of energy in the frequency domain, thereby improving the accuracy of the Euclidean distance calculation.

[0055] In addition, the range of the effective frequency band can be selected based on actual needs, and further divided into multiple different frequency bands.

[0056] Step S22: Calculate multiple frequency band energies corresponding to the multiple frequency bands.

[0057] In this embodiment, the calculation formula of the frequency band energy is as follows: , in, is the energy in a certain frequency band, is the range of the frequency band, for example, for the energy of the low frequency band, Corresponding to 100Hz, 300Hz. is the effective frequency band after noise reduction. Based on the above formula, the frequency of each frequency band is calculated to obtain the energy values ​​of the three frequency bands: , , Therefore, for any of the multiple frequency bands, the squares of the moduli of the frequencies within each current frequency band can be accumulated to obtain the current frequency band cumulative value. Then, based on a logarithmic formula of a preset value, the logarithm of the current frequency band cumulative value is calculated to obtain the frequency band energy of the current frequency band. Finally, the fully calculated energies of the multiple frequency bands are obtained.

[0058] It should be noted that in the above calculation formula, decibel (dB) is one-tenth of a Bel, and the definition of a Bel is based on the logarithm of the power ratio to the base 10. Since the calculation result of the frequency band energy is decibel, the logarithm value of the parameter 10 is used for calculation.

[0059] Step S23: Calculate the spectrum centroid corresponding to the effective frequency band.

[0060] In this embodiment, the calculation formula of the spectrum centroid C is as follows: , That is, first calculate the energy and , the energy corresponding to each frequency point and the product between frequency points and energy , and then the product is accumulated to obtain the weighted energy , and finally the quotient between the weighted energy and the energy sum is calculated to obtain the spectrum centroid.

[0061] Step S24: constructing the target feature vector according to the multiple frequency band energies and the spectrum centroid.

[0062] In this embodiment, multiple frequency band energies and spectrum centroids are sub-elements of the target feature vector, that is, the obtained feature vector is .

[0063] This embodiment divides the current frequency band into multiple frequency bands and calculates the frequency band energies corresponding to the multiple frequency bands, thereby reflecting the corresponding characteristics of the respiratory signal in different frequency bands, improving the accuracy of the Euclidean distance calculated based on the target feature vector, and thus improving the accuracy of the microphone position calculation.

[0064] Based on the first or second embodiment of the present application, in the third embodiment of the present application, in the process of obtaining the first eigenvector and the second eigenvector in the calibration stage, the eigenvector acquisition process and the target eigenvector acquisition process are the same, both of which require collecting a breathing signal of a preset time length, denoising the breathing signal, and then calculating the frequency band energy and spectral centroid of the signal.

[0065] Specifically, in this embodiment, it is necessary to obtain a first calibration signal of a preset duration, collected by the microphone during the first calibration phase of the headset. During this phase, the telescopic rod is fully retracted. Next, a first calibration frequency band of the noise-reduced first calibration signal is extracted. Based on the first calibration frequency band, the frequency band energy and spectral centroid are extracted, and a first feature vector is constructed based on the frequency band energy and spectral centroid. The calibration phase may also be divided into multiple frequency bands, and the frequency band energy of each band is extracted.

[0066] At the same time, a second calibration signal of a preset length collected by the microphone when the headset is in the second calibration stage can also be obtained. In the second calibration stage, the telescopic rod is in a fully extended state, and then the second calibration frequency band of the second calibration signal after noise reduction is extracted. Based on the second calibration frequency band, the spectral energy and spectral centroid are extracted to obtain the second eigenvector.

[0067] For example, in order to help understand the implementation process of the microphone position detection method obtained by combining the present embodiment with the above embodiments, please refer to Figure 4 , Figure 4A brief flowchart of a position detection method of a microphone is provided, specifically: calibration is performed at initial use, respiratory sounds in two states of a telescopic rod being fully retracted and fully extended are collected, then the respiratory signals are processed, that is, noise reduction processing, then feature extraction is performed, and a first feature vector and a second feature vector of calibration are obtained and stored.

[0068] During the wearing detection, the earphone detects whether it is in a wearing state, when detecting that the user wears the earphone, the current respiratory sound is collected and noise reduction processing is performed on the respiratory sound, then feature extraction is performed to obtain a target feature vector, finally, the telescopic ratio of the telescopic rod is obtained by linear fitting of the frequency band energy and the spectral centroid in the feature vector, and the actual position of the microphone is determined based on the telescopic ratio.

[0069] Based on the first embodiment of the present application, in the fourth embodiment of the present application, as shown in Figure 1 B, the earphone is provided with a rigid rotating rod 2, and the user can adjust the position of the rigid rotating rod 2 through the knob 3 to adjust the position of the microphone. Wherein, the rigid rotating rod is provided with a maximum rotation angle, such as taking the gravity direction as the reference, the rotation direction is 0-180°, that is, the rigid rotating rod can only rotate on one side of the face and cannot rotate to the back side of the brain.

[0070] Based on this, after obtaining the target feature vector of the respiratory signal, step S20 further includes steps S40-S50: Step S40, obtaining the rotating feature vector of the rigid rotating rod corresponding to the maximum rotation angle and the minimum rotation angle in the calibration stage.

[0071] In this embodiment, corresponding to the two feature vectors in the fully retracted and fully extended states of the telescopic rod when stretched, when the earphone is provided with a rigid rotating rod, the rotating feature vector of the rigid rotating rod in the two limit states in the calibration stage needs to be obtained, so as to determine the features of the respiratory signals collected in the two positions. Wherein, the way of obtaining the rotating feature vector is the same as the way of obtaining the first feature vector and the second feature vector, which will not be repeated here.

[0072] Step S50, calculating the target rotating position of the rigid rotating rod according to the target feature vector and the rotating feature vector, and determining the target position based on the target rotating position.

[0073] After obtaining the rotating feature vector, based on the same calculation method, the ratio of the current position of the rigid rotating rod to the rotating distance is calculated, so as to determine the target position based on the ratio. Based on this, the position detection of the rotating rod and the position detection of the microphone can be realized through normal respiratory audio signals, which reduces the system complexity while not affecting the actual earphone use experience of the user.

[0074] The application provides an earphone, which comprises at least one processor and a memory connected with the at least one processor; the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the position detection method of the microphone in the first embodiment.

[0075] Reference will be made to the following description Figure 5 which shows a structural schematic diagram of an earphone suitable for implementing the embodiments of the application. Figure 5 The earphone shown is merely an example and should not bring any limitation to the functions and use range of the embodiments of the application.

[0076] As shown in Figure 5 , the earphone can comprise a processing device 1001 (for example, a central processor, a graphics processor, etc.), which can perform various appropriate actions and processes according to programs stored in a read-only memory (ROM) 1002 or programs loaded from a storage device 1003 into a random access memory (RAM) 1004. Various programs and data required for operation of the earphone are also stored in the random access memory 1004. The processing device 1001, the read-only memory 1002 and the random access memory 1004 are connected with each other through a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Generally, the following systems can be connected to the input / output interface 1006: input devices 1007 including, for example, a touch screen, a touchpad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; output devices 1008 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; the storage device 1003 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 1009. The communication device 1009 can allow the earphone to communicate with other devices wirelessly or by wire to exchange data. Although the earphone with various systems is shown in the figure, it should be understood that all the systems shown are not required to be implemented or possessed. More or fewer systems can be alternatively implemented or possessed.

[0077] In particular, according to the embodiments disclosed in the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present application include a computer program product comprising a computer program carried on a computer readable medium, the computer program containing program code for executing the method shown in the flowchart. In such embodiments, the computer program can be downloaded and installed from a network through a communication device, or installed from the storage device 1003, or installed from the read-only memory 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the method of the embodiments disclosed in the present application are executed.

[0078] The earphone provided by the present application adopts the microphone position detection method in the above-mentioned embodiments, and can solve the technical problem that the sound is perceived by the user during active frequency sweeping, and the use experience of the earphone is reduced. Compared with the prior art, the earphone provided by the present application has the same beneficial effects as the microphone position detection method provided by the above-mentioned embodiments, and other technical features in the earphone are the same as the features disclosed in the previous embodiment method, which will not be repeated here.

[0079] It should be understood that parts of the present application can be realized by hardware, software, firmware or a combination thereof. In the description of the above-mentioned embodiments, specific features, structures, materials or characteristics can be combined in any one or more embodiments or examples in a suitable manner.

[0080] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto, and any person skilled in the art can easily think of changes or replacements within the technical scope disclosed in the present application, which should be covered within the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.

[0081] The present application provides a computer readable storage medium having stored thereon computer readable program instructions (i.e. computer program) for executing the microphone position detection method in the above-mentioned embodiments.

[0082] The computer readable storage medium provided in the application may, for example, be a U disk, but is not limited to an electric, magnetic, optical, electromagnetic, infrared or semiconductor system, system or device, or any combination of the above. More specific examples of the computer readable storage medium may include, but are not limited to, an electric connection with one or more conductive wires, a portable computer disk, a hard disk, a random access memory, a read-only memory, an erasable programmable read-only memory (EPROM) or a flash memory, an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the embodiment, the computer readable storage medium may be any tangible medium containing or storing a program, which can be used by or in combination with an instruction execution system, system or device. The program code contained on the computer readable storage medium can be transmitted by any suitable medium, including but not limited to an electric wire, an optical cable, a radio frequency (RF), etc., or any suitable combination of the above.

[0083] The above computer readable storage medium may be contained in the earphone or exist separately without being assembled into the earphone.

[0084] The above computer readable storage medium carries one or more programs, which, when executed by the earphone, cause the earphone to: acquire a preset time length of breathing signals collected by the microphone when the earphone is in a connected state; extract a target feature vector of the breathing signals after noise reduction; acquire a first feature vector when the telescopic rod is completely retracted and a second feature vector when the telescopic rod is completely extended, which are determined in a calibration stage; calculate a telescopic ratio of the telescopic rod according to the target feature vector, the first feature vector and the second feature vector, and determine a target position of the microphone according to the telescopic ratio.

[0085] Computer program code for carrying out operations of the present application can be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C++ or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code can execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the latter scenario, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or the connection can be made to an external computer (for example, through the Internet using an Internet Service Provider).

[0086] The flow diagrams and the block diagrams in the drawings are meant as methodological and functional description of implementations of systems, methods, and computer program products according to various embodiments of the present application. In this regard, each block in the flow diagrams or block diagrams can represent a module, a segment, or a portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that in some alternative implementations, the functions noted in the blocks can occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently or the blocks may

[0087] The modules involved in the embodiments of the present application can be implemented in software or hardware. In some cases, the names of the modules do not constitute a limitation on the modules themselves.

[0088] The readable storage medium provided by the present application is a computer readable storage medium, which stores computer readable program instructions (i.e. computer programs) for executing the above-mentioned microphone position detection method, and can solve the technical problem that the sound is perceived by the user during active frequency sweeping and the use experience of the earphone is reduced. Compared with the prior art, the computer readable storage medium provided by the present application has the same beneficial effects as the microphone position detection method provided by the above-mentioned embodiments, and will not be described here.

[0089] The above merely describes some embodiments of the present application, and does not limit the patent scope of the present application. Any equivalent structural transformation, direct / indirect application in other related technical fields, or the like, which is made based on the technical concept of the present application and the content of the specification and drawings, is included in the patent protection scope of the present application.

Claims

1. A method for detecting the position of a microphone, characterized in that: Applied to headphones, the headphones are provided with a telescopic rod and a microphone arranged on the telescopic rod, and the position detection method of the microphone includes: Acquire a breathing signal of a preset duration collected by the microphone when the headset is in a connected state; Extracting a target feature vector of the respiratory signal after noise reduction; Obtaining a first eigenvector when the telescopic rod is fully retracted and a second eigenvector when the telescopic rod is fully extended, determined during a calibration phase; The telescopic ratio of the telescopic rod is calculated according to the target eigenvector, the first eigenvector, and the second eigenvector, and the target position of the microphone is determined according to the telescopic ratio.

2. The method for detecting the position of a microphone according to claim 1, wherein: The step of extracting the target feature vector of the respiratory signal after noise reduction comprises: Extracting an effective frequency band of the respiratory signal after noise reduction, and dividing the effective frequency band into multiple frequency bands; Calculating multiple frequency band energies corresponding to the multiple frequency bands; Calculating the spectrum centroid corresponding to the effective frequency band; The target feature vector is constructed according to the multiple frequency band energies and the spectrum centroid, wherein the multiple frequency band energies and the spectrum centroid are sub-elements of the target feature vector.

3. The method for detecting the position of a microphone according to claim 2, wherein: The step of calculating multiple frequency band energies corresponding to the multiple frequency bands includes: Accumulate the square of the modulus of each frequency in the current frequency band to obtain the accumulated value of the current frequency band; Calculating the logarithm of the accumulated value of the current frequency band based on a logarithmic formula of a preset value to obtain the frequency band energy of the current frequency band; The calculated energies of the plurality of frequency bands are obtained.

4. The method for detecting the position of a microphone according to claim 2, wherein: The step of calculating the spectrum centroid corresponding to the effective frequency band includes: Calculating the sum of the energies of all frequency points within the effective frequency band, the energy corresponding to each frequency point, and the product between the frequency point and the energy; The products are accumulated to obtain weighted energy, and a quotient between the weighted energy and the energy sum is calculated to obtain a spectrum centroid corresponding to the effective frequency band.

5. The method for detecting the position of a microphone according to claim 1, wherein: The step of calculating the telescopic ratio of the telescopic rod according to the target eigenvector, the first eigenvector, and the second eigenvector, and determining the target position of the microphone according to the telescopic ratio includes: determining a first Euclidean distance between the target feature vector and the first feature vector; determining a second Euclidean distance between the second eigenvector and the first eigenvector; The scaling ratio is determined according to a quotient of the first Euclidean distance and the second Euclidean distance, and the target position is determined based on the scaling ratio.

6. The method for detecting the position of a microphone according to claim 5, wherein: The step of calculating the telescopic ratio of the telescopic rod according to the target eigenvector, the first eigenvector, and the second eigenvector, and determining the target position of the microphone according to the telescopic ratio further includes: determining a third Euclidean distance between the target feature vector and the second feature vector; The scaling ratio is determined according to a quotient of the third Euclidean distance and the second Euclidean distance, and the target position is determined based on the scaling ratio.

7. The method for detecting the position of a microphone according to claim 1, wherein: Before the step of obtaining a breathing signal of a preset duration collected by the microphone when the earphone is in a connected state, the microphone position detection method further includes: Acquiring a first calibration signal of the preset duration collected by the microphone when the headset is in a first calibration phase, wherein the telescopic rod is in a fully retracted state; Extracting a first calibration frequency band of the first calibration signal after noise reduction, and extracting frequency band energy and spectrum centroid based on the first calibration frequency band to obtain the first eigenvector; Acquiring a second calibration signal of the preset duration collected by the microphone when the headset is in a second calibration phase, wherein the telescopic rod is in a fully extended state; A second calibration frequency band of the second calibration signal after noise reduction is extracted, and frequency band energy and spectrum centroid are extracted based on the second calibration frequency band to obtain the second eigenvector.

8. The method for detecting the position of a microphone according to claim 1, wherein: The headset is provided with a rigid rotating rod, and the microphone is provided on the rigid rotating rod. After the step of extracting the target feature vector of the noise-reduced breathing signal, the method for detecting the position of the microphone further includes: Obtaining the rotational feature vectors corresponding to the maximum rotation angle and the minimum rotation angle of the rigid rotating rod during the calibration phase; A target rotational position of the rigid rotating rod is calculated according to the target eigenvector and the rotational eigenvector, and the target position is determined based on the target rotational position.

9. A headset, characterized in that: The headset comprises: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the microphone position detection method according to any one of claims 1 to 8.

10. A storage medium, characterized in that: The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, the steps of the microphone position detection method according to any one of claims 1 to 8 are implemented.

Citation Information

Patent Citations

  • Personal acoustic device position determination

    CN102365875A

  • Headset

    CN103475971A

  • Headset having microphone

    CN104254029A

  • Headset

    CN109361975A

  • Self-driven multifunctional respiration detection device

    CN114504314A