CN105451111B - Earphone control method for playing back, device and terminal - Google Patents

Earphone control method for playing back, device and terminal Download PDF

Info

Publication number
CN105451111B
CN105451111B CN201510917231.3A CN201510917231A CN105451111B CN 105451111 B CN105451111 B CN 105451111B CN 201510917231 A CN201510917231 A CN 201510917231A CN 105451111 B CN105451111 B CN 105451111B
Authority
CN
China
Prior art keywords
earphone
frequency
parameter information
use state
state parameter
Prior art date
Legal status (The legal status 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 status listed.)
Active
Application number
CN201510917231.3A
Other languages
Chinese (zh)
Other versions
CN105451111A (en
Inventor
李棽
孙大禹
陈超
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Xiaomi Inc
Original Assignee
Xiaomi Inc
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 Xiaomi Inc filed Critical Xiaomi Inc
Priority to CN201510917231.3A priority Critical patent/CN105451111B/en
Publication of CN105451111A publication Critical patent/CN105451111A/en
Application granted granted Critical
Publication of CN105451111B publication Critical patent/CN105451111B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

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

Abstract

The embodiment of the present disclosure discloses a kind of earphone control method for playing back, device and terminal, wherein the earphone control method for playing back includes: the state parameter information for obtaining the earphone being connected with the terminal in broadcasting;Judge whether the earphone is not in wearing use state according to the state parameter information;When the earphone, which is not in, wears use state, controls the terminal and stop to the earphone output audio signal.The technical solution of the disclosure can judge automatically earphone and be not in wearing use state when user takes earphone, and then controlling terminal stops to earphone output audio signal, when realizing that user takes earphone, the automatic pause that earphone plays is manually operated without user.

Description

Earphone control method for playing back, device and terminal
Technical field
This disclosure relates to electronic technology field more particularly to a kind of earphone control method for playing back, device and terminal.
Background technique
Earphone is a kind of converting unit, it receives the electric signal that media player is issued, and passes through the loudspeaking close to ear Electric signal is converted to the sound wave that can be heard by device.Sound can be not only listened to alone in the case where not influencing other people using earphone It rings, and the influence of ambient enviroment can be separated, it is helpful to the people used under the noisy environments such as journey or movement.
Under normal conditions, earphone is detachably connectable with media player by plug, and user passes through on media player The pause or broadcasting of button control media player.In the related technology, it after user takes earphone due to the intervention of other scenes, needs To realize that media player pause plays by the button on triggering media player;After user puts on earphone again, again Button on triggering media player realizes that media player continues to play, cumbersome, especially when media player and ear Machine distance farther out when, user trigger media player on button it is more difficult, cause user experience poor.
Summary of the invention
To overcome the problems in correlation technique, the disclosure provides a kind of earphone control method for playing back, device and terminal.
According to the first aspect of the embodiments of the present disclosure, a kind of earphone control method for playing back is provided, the earphone plays control Method includes:
Obtain state parameter information of the earphone being connected with the terminal when playing;
Judge whether the earphone is not in wearing use state according to the state parameter information;
When the earphone, which is not in, wears use state, controls the terminal and stop exporting audio letter to the earphone Number.
In the embodiments of the present disclosure, judge whether earphone is in wearing use state by state parameter information, work as judgement When earphone is not in wearing use state, controlling terminal stops to earphone output audio signal, and user need not execute other behaviour again Make, it is easy to use.
Optionally, the state parameter information for obtaining the earphone being connected with the terminal when playing, comprising:
Receive the collected voice signal when the earphone plays of the microphone in the terminal or on earphone;
Extract state parameter information of the frequency of the voice signal as the earphone.
It is described to judge whether the earphone is not in wearing use state according to the state parameter information, comprising:
Obtain the frequency of the audio signal of the terminal plays;
Whether the frequency for judging the audio signal and the frequency of the voice signal match;
When the frequency of the frequency of the audio signal and the voice signal matches, determine that the earphone is not in pendant Wear use state.
In the embodiments of the present disclosure, the frequency of the voice signal is extracted as state parameter information, when audio signal When frequency and the frequency of voice signal match, determine that earphone is not in wearing use state, avoid ambient noise interference and Caused erroneous judgement improves the accuracy of judgement.
Optionally, the state parameter information for obtaining the earphone being connected with the terminal when playing, further includes:
Extract state parameter information of the amplitude of the voice signal as the earphone.
It is described to judge whether the earphone is not in wearing use state according to the state parameter information, comprising:
Obtain the frequency of the audio signal of the terminal plays;
Whether the frequency for judging the audio signal and the frequency of the voice signal match;
When the frequency of the frequency of the audio signal and the voice signal matches, judgement is current extracted described Whether the difference of the amplitude of the amplitude of voice signal and the last extracted voice signal is greater than or equal to default amplitude threshold Value;
When the difference of the amplitude is greater than or equal to default amplitude threshold, determine that the earphone is not in wearing and uses shape State.
In the embodiments of the present disclosure, determine whether earphone is in wearing use state in terms of audio and amplitude two, when When the frequency of audio signal and the frequency of voice signal match, and the amplitude and upper one of the current extracted voice signal When whether the difference of the amplitude of the secondary extracted voice signal is greater than or equal to default amplitude threshold, determine that earphone is not in pendant Use state is worn, the erroneous judgement due to caused by the sound of earphone broadcasting is larger or the soundproof effect of earplug is bad is avoided, improves The accuracy of judgement.
Optionally, the state parameter information for obtaining the earphone being connected with the terminal when playing, comprising:
Obtain the collected spatial position data of gyroscope being arranged in two earplugs on the earphone;
The included angle on the earphone between the axis of two earplugs is calculated as institute according to the spatial position data State state parameter information.
It is described to judge whether the earphone is not in wearing use state according to the state parameter information, comprising:
Judge whether the included angle on the earphone between the axis of two earplugs is less than or equal to predetermined angle threshold value;
When the included angle is less than or equal to predetermined angle threshold value, determine that the earphone is not in wearing and uses shape State.
In the embodiments of the present disclosure, judge whether earphone is located by the included angle on earphone between the axis of two earplugs In wearing use state, when included angle is less than or equal to predetermined angle threshold value, determine that earphone is not in wearing use state, And then controlling terminal stops realizing the automatic control that earphone plays to earphone output audio signal.
Optionally, the state parameter information for obtaining the earphone being connected with the terminal when playing, comprising:
Obtain the distance between collected two earplugs of the range sensor being arranged on earphone data;
Using the range data as the state parameter information.
It is described to judge whether the earphone is not in wearing use state according to the state parameter information, comprising:
Judge whether the range data is less than or equal to pre-determined distance threshold value;
When the range data is less than or equal to pre-determined distance threshold value, determine that the earphone is not in wearing and uses shape State.
In the embodiments of the present disclosure, judge whether earphone is in wearing and uses by the distance between two earplugs on earphone State determines that earphone is not in wearing use state, and then control eventually when range data is less than or equal to pre-determined distance threshold value End stops realizing the automatic control that earphone plays to earphone output audio signal.
Optionally, the state parameter information for obtaining the earphone being connected with the terminal when playing, comprising:
Obtain the collected pressure data of the pressure sensor being arranged at least one predeterminated position on the earphone outer covering;
Using the pressure data as the state parameter information.
It is described to judge whether the earphone is not in wearing use state according to the state parameter information, comprising:
Judge whether the pressure data is greater than or equal to preset pressure threshold;
When the pressure data is greater than or equal to preset pressure threshold, determine that the earphone is not in wearing and uses shape State.
In the embodiments of the present disclosure, judge whether earphone is in wearing and makes by the collected pressure data of pressure sensor Determine that earphone is not in wearing use state, and then control when pressure data is greater than or equal to preset pressure threshold value with state Terminal stops realizing the automatic control that earphone plays to earphone output audio signal.
It also proposed a kind of earphone broadcast control device, the earphone broadcast control device according to the second aspect of the disclosure Include:
State parameter information obtains module, for obtaining state parameter of the earphone being connected with the terminal when playing Information;
Use state judgment module is believed for obtaining the state parameter that module obtains according to the state parameter information Breath judges whether the earphone is not in wearing use state;
Signal output control module, for judging that the earphone is not in wearing and uses when the use state judgment module When state, controls the terminal and stop to the earphone output audio signal.
Optionally, the state parameter information obtains module, comprising:
Audible signal reception submodule, for receiving the microphone in the terminal or on earphone when the earphone plays Collected voice signal;
First state parameter information extracting sub-module, for extracting described in the audible signal reception submodule receives State parameter information of the frequency of voice signal as the earphone.
Optionally, the use state judgment module, comprising:
First frequency acquisition submodule, the frequency of the audio signal for obtaining the terminal plays;
First matching judgment submodule, for judging the audio signal that the first frequency acquisition submodule obtains Whether the frequency for the voice signal that frequency is extracted with the first state parameter information extracting sub-module matches;
First use state determines submodule, for judging the audio signal when the first matching judgment submodule When frequency and the frequency of the voice signal match, determine that the earphone is not in wearing use state.
Optionally, the state parameter information obtains module, further includes:
Second state parameter information extracting sub-module, for extracting described in the audible signal reception submodule receives State parameter information of the amplitude of voice signal as the earphone.
Optionally, the use state judgment module, comprising:
Second frequency acquisition submodule, the frequency of the audio signal for obtaining the terminal plays;
Second matching judgment submodule, for judging the audio signal that the second frequency acquisition submodule obtains Whether the frequency for the voice signal that frequency is extracted with the first state parameter information extracting sub-module matches;
Amplitude judging submodule, for judging frequency and the institute of the audio signal when the second matching judgment submodule When stating the frequency of voice signal and matching, judge the current extracted voice signal amplitude and last extracted institute Whether the difference for stating the amplitude of voice signal is greater than or equal to default amplitude threshold;
Second use state determines submodule, for when the amplitude judging submodule judge the amplitude difference be greater than or When equal to default amplitude threshold, determine that the earphone is not in wearing use state.
Optionally, the state parameter information obtains module, comprising:
Spatial position data acquisition submodule is collected for obtaining the gyroscope being arranged in two earplugs on the earphone Spatial position data;
Third state parameter information extracting sub-module, the institute for being obtained according to the spatial position data acquisition submodule It states spatial position data and calculates included angle on the earphone between the axis of two earplugs as the state parameter information.
Optionally, the use state judgment module, comprising:
Angle judging submodule, the earphone extracted for judging the third state parameter information extracting sub-module Whether the included angle between the axis of two earplugs is less than or equal to predetermined angle threshold value;
Third use state determines submodule, for when the angle judging submodule judge the included angle be less than or When equal to predetermined angle threshold value, determine that the earphone is not in wearing use state.
Optionally, the state parameter information obtains module, comprising:
Range data acquisition submodule, for obtaining collected two earplugs of range sensor being arranged on the earphone The distance between data;
4th state parameter information extracting sub-module, the distance for obtaining the range data acquisition submodule Data are as the state parameter information.
Optionally, the use state judgment module, comprising:
Whether Distance Judgment submodule, the range data for judging that the range data acquisition submodule obtains are small In or equal to pre-determined distance threshold value;
4th use state determines submodule, for when the Distance Judgment submodule judge the range data be less than or When equal to pre-determined distance threshold value, determine that the earphone is not in wearing use state.
Optionally, the state parameter information obtains module, comprising:
Pressure data acquisition submodule, for obtaining the pressure being arranged at least one predeterminated position on the earphone outer covering The collected pressure data of sensor;
5th state parameter information extracting sub-module, the pressure for obtaining the pressure data acquisition submodule Data are as the state parameter information.
Optionally, the use state judgment module, comprising:
Whether pressure judging submodule, the pressure data for judging that the pressure data acquisition submodule obtains are big In or equal to preset pressure threshold;
5th use state determines submodule, for when the pressure judging submodule judge the pressure data be greater than or When equal to preset pressure threshold, determine that the earphone is not in wearing use state.
It also proposed a kind of terminal according to the third aspect of the disclosure, comprising:
Processor;
For the memory of storage processor executable instruction,
Wherein, the processor is configured to:
Obtain state parameter information of the earphone being connected with the terminal when playing;
Judge whether the earphone is not in wearing use state according to the state parameter information;
When the earphone, which is not in, wears use state, controls the terminal and stop exporting audio letter to the earphone Number.
By above technical scheme as it can be seen that the earphone that the disclosure provides plays control program, by obtaining earphone when playing State parameter information, judge whether earphone is in wearing use state according to the state parameter information, and when earphone is not in When wearing use state, controlling terminal stops to earphone output audio signal.
Therefore, this method can judge automatically earphone and be not in wearing use state, in turn when user takes earphone Controlling terminal stops to earphone output audio signal, and when realizing that user takes earphone, the automatic pause that earphone plays is not necessarily to user Manual operation.
It should be understood that above general description and following detailed description be only it is exemplary and explanatory, not The disclosure can be limited.
Detailed description of the invention
The drawings herein are incorporated into the specification and forms part of this specification, and shows the implementation for meeting the disclosure Example, and together with specification for explaining the principles of this disclosure.
In order to illustrate more clearly of the embodiment of the present disclosure or technical solution in the prior art, to embodiment or will show below There is attached drawing needed in technical description to be briefly described, it should be apparent that, for those of ordinary skill in the art Speech, without any creative labor, is also possible to obtain other drawings based on these drawings.
Fig. 1 is a kind of schematic diagram of a scenario that the embodiment of the present disclosure provides;
Fig. 2 is a kind of earphone control method for playing back flow diagram that the embodiment of the present disclosure provides;
Fig. 3 is a kind of earphone control method for playing back flow diagram that the embodiment of the present disclosure provides;
Fig. 4 is a kind of earphone control method for playing back flow diagram that the embodiment of the present disclosure provides;
Fig. 5 is a kind of earphone control method for playing back flow diagram that the embodiment of the present disclosure provides;
Fig. 6 is that a kind of earphone that the embodiment of the present disclosure provides is not in a kind of schematic diagram of a scenario worn when using;
Fig. 7 is a kind of earphone control method for playing back flow diagram that the embodiment of the present disclosure provides;
Fig. 8 is a kind of earphone control method for playing back flow diagram that the embodiment of the present disclosure provides;
Fig. 9 is a kind of earphone broadcast control device structural schematic diagram that the embodiment of the present disclosure provides;
Figure 10 is that a kind of state parameter information that the embodiment of the present disclosure provides obtains modular structure schematic diagram;
Figure 11 is a kind of use state judgment module structural schematic diagram that the embodiment of the present disclosure provides;
Figure 12 is that a kind of state parameter information that the embodiment of the present disclosure provides obtains modular structure schematic diagram;
Figure 13 is a kind of use state judgment module structural schematic diagram that the embodiment of the present disclosure provides;
Figure 14 is that a kind of state parameter information that the embodiment of the present disclosure provides obtains modular structure schematic diagram;
Figure 15 is a kind of use state judgment module structural schematic diagram that the embodiment of the present disclosure provides;
Figure 16 is that a kind of state parameter information that the embodiment of the present disclosure provides obtains modular structure schematic diagram;
Figure 17 is a kind of use state judgment module structural schematic diagram that the embodiment of the present disclosure provides;
Figure 18 is that a kind of state parameter information that the embodiment of the present disclosure provides obtains modular structure schematic diagram;
Figure 19 is a kind of use state judgment module structural schematic diagram that the embodiment of the present disclosure provides;
Figure 20 is a kind of structural schematic diagram for terminal that the embodiment of the present disclosure provides.
Specific embodiment
Example embodiments are described in detail here, and the example is illustrated in the accompanying drawings.Following description is related to When attached drawing, unless otherwise indicated, the same numbers in different drawings indicate the same or similar elements.Following exemplary embodiment Described in embodiment do not represent all implementations consistent with this disclosure.On the contrary, they be only with it is such as appended The example of the consistent device and method of some aspects be described in detail in claims, the disclosure.
Fig. 1 is a kind of schematic diagram of a scenario that the embodiment of the present disclosure provides, and includes terminal 1 and earphone 2 in figure.Terminal 1 can be with Audio signal transmission is played out into earphone 2 by wired or wireless mode.Wherein, if terminal 1 passes through wired side Formula is by audio signal transmission into earphone 2, then terminal 1 is directly connected by signal wire with earphone 2;If terminal 1 passes through wireless Mode is by audio signal transmission into earphone 2, then terminal 1 and earphone 2 are internally provided with corresponding communication module, the communication mould Block can be bluetooth module, near-field communication module, wireless transport module etc..
In addition, being only a kind of schematic diagram of a scenario of the disclosure, the concrete type of terminal 1 and earphone 2, number in figure shown in Fig. 1 Amount and position between the two, relativeness are not limited to concrete form disclosed in Fig. 1, for example, terminal 1 can be user Mobile phone, PDA, tablet computer, MP3, MP4, intelligent wristwatch etc.;Earphone 2 can be headphone, supra-aural earphone, earplug Formula earphone etc., those skilled in the art can be selected accordingly according to actual needs, and the disclosure does not limit this.
Fig. 2 is a kind of earphone control method for playing back flow diagram that the embodiment of the present disclosure provides, which plays control Method can be applied to the terminal 1 in Fig. 1, as shown in Fig. 2, the earphone control method for playing back includes the following steps:
Step S100: state parameter information of the earphone being connected with the terminal when playing is obtained.
In the embodiments of the present disclosure, state parameter information can be that the sensor that is arranged in earphone or terminal is collected Information, or the information extracted in sensor information collected.Wherein, when sensor is arranged on earphone, state ginseng The acquisition modes of number information are determined by the connection type of earphone and terminal, are specifically included: if earphone and terminal wired connection, eventually End obtains state parameter information by connection earphone and the signal wire of terminal;If earphone is connect with terminal wireless, terminal passes through The communication module being set in terminal and earphone obtains state parameter information.
The purpose for obtaining state parameter information of the earphone when playing is to judge making for earphone by state parameter information With state, that is to say, that the state parameter information in the embodiment of the present disclosure is the state parameter that can reflect earphone use state Information.For example, can choose audio-frequency information, acceleration information, gyroscope information, light sensing information, magnetic field induction information, pressure Power induction information, apart from induction information, overturning induction information, temperature sense information etc..
Step S200: judge whether the earphone is not in wearing use state according to the state parameter information.
Since state parameter information in the embodiments of the present disclosure is the state parameter letter that can reflect earphone use state Breath, therefore, can judge the use state of earphone according to the state parameter information obtained in step S100.For example, will acquire State parameter information is compared (preset condition is condition when earphone is not in wearing use state) with preset condition, if obtaining The state parameter information taken meets preset condition, then judges that earphone is not in wearing use state;If the state parameter letter obtained Breath does not meet preset condition, then judges that earphone is in and wear use state.
When the earphone, which is not in, wears use state, step S300 is executed;Otherwise terminate process.
Step S300: it controls the terminal and stops to the earphone output audio signal.
In the embodiments of the present disclosure, the terminal is controlled to stop to the earphone output audio signal being controlling terminal On media player pause play, the media player in controlling terminal is mute or the audio letter between disconnected end and earphone Number transmission line, the disclosure is without limitation, but its effect achieved is that earphone no longer receives audio signal, and earphone is temporary Break and puts.That is, in the embodiments of the present disclosure, when judging that earphone is not in wearing use state, can automatically control Earphone pause plays, and user need not execute other operations again, easy to use.
Another embodiment of the present disclosure is as shown in figure 3, the step S100 of its embodiment shown in Fig. 2 may include following step It is rapid:
Step S101: the collected sound letter when the earphone plays of the microphone in the terminal or on earphone is received Number;
In the embodiments of the present disclosure, in terminal or earphone be equipped with microphone.Under normal conditions, being in wear in earphone makes When with state, due to earphone and terminal distance farther out, the microphone in terminal or on earphone will not collect earphone broadcasting sound Sound signal;But after user takes earphone, earphone is usually placed on to the position not far from terminal, for example, terminal is hand Earphone is usually placed on the side of mobile phone by machine after user takes earphone, and the microphone in terminal or on earphone can be at this time Collect the voice signal of earphone broadcasting.Based on the principle, in the embodiments of the present disclosure with the microphone in terminal or on earphone Judgment basis of the collected voice signal as earphone use state.
Step S102: state parameter information of the frequency of the voice signal as the earphone is extracted.
Under normal conditions, user's environment locating when using earphone is not absolute squelch, ambient noise (such as automobile Whistle sound, television acoustics sound, musical sound in bar etc.) voice signal that microphone acquires can be caused centainly to interfere.If Judge that user takes earphone when microphone collects outside noise, it is clear that will cause erroneous judgement, influence user experience.Therefore, when Microphone also needs to distinguish that the voice signal is the voice signal or outside noise that earphone plays after collecting voice signal.
Frequency is one of attribute important in voice signal, can reflect bulk information included in voice signal, For example, can know the song of music by the frequency of one section of music of analysis;It can be known by the frequency of one section of dialogue of analysis The content of talk.Therefore, in the embodiments of the present disclosure, state parameter information of the frequency as earphone for extracting voice signal, into And distinguishing microphone to collect voice signal is the voice signal or outside noise that earphone plays, and excludes the dry of outside noise It disturbs.
On the basis of abovementioned steps S101 and S102, in the embodiment of the present disclosure, the step S200 of embodiment illustrated in fig. 2 can With the following steps are included:
Step S201: the frequency of the audio signal of the terminal plays is obtained;
In above-mentioned steps S102, the purpose for extracting the frequency of voice signal is to judge the collected sound letter of microphone Number whether be earphone play voice signal.In order to realize the purpose, it needs the frequency of the collected voice signal of microphone It is compared with the frequency of the audio signal of terminal plays, therefore, in the embodiments of the present disclosure, obtains the audio letter of terminal plays Number frequency.
Step S202: whether the frequency for judging the audio signal and the frequency of the voice signal match;
Ideally, if the voice signal of microphone acquisition is entirely the voice signal that earphone plays, audio signal Frequency and the frequency of voice signal should exactly match, but under actual conditions, the collected voice signal of microphone inevitably can Some noises are adulterated, the frequency of the frequency and voice signal that lead to audio signal can not exactly match.In response to this, exist One matching degree threshold value is set in the embodiment of the present disclosure, when the frequency of audio signal and the frequency of voice signal are in matching degree threshold value Within when determine that the frequency of audio signal and the frequency of voice signal match.
When the frequency of the frequency of the audio signal and the voice signal matches, step S203 is executed, otherwise, knot Line journey.
Step S203: determine that the earphone is not in wearing use state.
In the embodiments of the present disclosure, when the frequency of the frequency of audio signal and voice signal matches, show in terminal Or the microphone on earphone collects the voice signal of earphone broadcasting, and then determines that be placed on terminal attached after earphone is taken by user Closely, earphone is not in wearing use state.
After step S203, above-mentioned steps S300 is executed, and then realize the automatic control terminal when user takes earphone Stop to earphone output audio signal.
In the embodiments of the present disclosure, the frequency of the voice signal is extracted as state parameter information, when audio signal When frequency and the frequency of voice signal match, determine that earphone is not in wearing use state, avoid ambient noise interference and Caused erroneous judgement improves the accuracy of judgement.
Another embodiment of the present disclosure is as shown in figure 4, on the basis of its embodiment shown in Fig. 3, and above-mentioned steps S100 is also It may comprise steps of:
Step S103: state parameter information of the amplitude of the voice signal as the earphone is extracted.
Amplitude can reflect out microphone collected voice signal size, voice signal more large amplitude is bigger;Sound The smaller amplitude of sound signal is smaller.Under normal conditions, after user takes earphone, the collected voice signal of microphone becomes larger, Reason is: after one side user takes earphone, earphone being placed near terminal, the distance between earphone and microphone become smaller So that the collected voice signal of microphone becomes larger;After another aspect user takes earphone, the earplug on earphone is without sound The obstacle (when user wears earphone, ear can play certain barrier effect to voice signal) of signal acquires microphone To voice signal become larger.Based on the principle, in the embodiments of the present disclosure using the amplitude of voice signal as earphone use state One of Rule of judgment, therefore, extract state parameter information of the amplitude of the voice signal as the earphone.
Using the amplitude of voice signal as state parameter information after, when the audio signal frequency and the sound believe Number frequency when matching, the step S200 that the embodiment of the present disclosure provides can also include:
Step S204: judge that the amplitude of the current extracted voice signal and the last extracted sound are believed Number the difference of amplitude whether be greater than or equal to default amplitude threshold.
In the embodiments of the present disclosure, the frequency of audio signal and the frequency of voice signal match, and there may be two kinds of feelings Condition: one is users to take earphone, and microphone collects the voice signal of earphone broadcasting;Another kind is that user does not take ear Machine, but cause microphone to remain to collect faint earphone since the sound that earphone plays is larger or the soundproof effect of earplug is bad The voice signal of broadcasting.
If determining that user takes earphone when the frequency of the frequency of audio signal and voice signal matches, it is clear that A degree of erroneous judgement can be brought.For this problem, the judgement of amplitude size is introduced in the embodiments of the present disclosure, i.e. judgement is worked as The difference of the amplitude of the amplitude of the preceding extracted voice signal and the last extracted voice signal whether be greater than or Equal to default amplitude threshold.
When the difference of the amplitude is greater than or equal to default amplitude threshold, above-mentioned steps S203 is executed, determines the earphone It is not in wearing use state;Otherwise, terminate process.
That is, in the embodiments of the present disclosure, only meeting " frequency of audio signal and the frequency of voice signal simultaneously Match " and " difference of the amplitude of current extracted voice signal and the amplitude of last time extracted voice signal be greater than or Equal to default amplitude threshold " condition, it just determines that earphone is not in wearing use state, improves to the judgement of earphone use state Accuracy.
In the embodiments of the present disclosure, determine whether earphone is in wearing use state in terms of audio and amplitude two, when The frequency of audio signal and the frequency of voice signal match, and the amplitude of the current extracted voice signal and last time When the difference of the amplitude of the extracted voice signal is greater than or equal to default amplitude threshold, determine that earphone is not in wearing and uses State avoids the erroneous judgement due to caused by the sound of earphone broadcasting is larger or the soundproof effect of earplug is bad, improves judgement Accuracy.
It should be pointed out that above-described embodiment is only an illustrative description, those skilled in the art can be according to reality Border situation adjusts accordingly the sequence of above-mentioned judgment step, for example, can first judge the current extracted sound letter Number amplitude and the difference of amplitude of the last extracted voice signal whether be greater than or equal to default amplitude threshold, then sentence Whether the frequency for the audio signal of breaking matches with the frequency of the voice signal, should all be in the protection model of the disclosure Within enclosing.
Another embodiment of the present disclosure is as shown in figure 5, the step S100 of its embodiment shown in Fig. 2 may include following step It is rapid:
Step S111: the collected spatial position data of gyroscope being arranged in two earplugs on the earphone is obtained.
In the embodiments of the present disclosure, a gyroscope is respectively set on earphone in two earplugs, obtains the collected space of gyroscope Position data is as the initial data for calculating state parameter information.
Step S112: the angle angle on the earphone between the axis of two earplugs is calculated according to the spatial position data Degree is used as the state parameter information.
Fig. 6 is that a kind of earphone that the embodiment of the present disclosure provides is not in a kind of schematic diagram of a scenario worn when using, such as Fig. 6 It is shown, earphone be not in wear in use, due to earphone itself characteristic so that being between the axis of two earplugs on earphone Certain angle α, but when earphone is worn on the head of user, two earplugs tend in parallel on earphone, i.e. two earplugs Axis between angle become larger.Based on the principle, can be made by the included angle on earphone between the axis of two earplugs For the judgment basis of earphone use state.
As shown in figure 5, the step S200 of embodiment of the present disclosure embodiment shown in Fig. 2 may comprise steps of:
Step S211: it is default to judge whether the included angle on the earphone between the axis of two earplugs is less than or equal to Angle threshold;
According to the above-mentioned description to Fig. 6 it is found that folder when user wears earphone, on earphone between the axis of two earplugs Angle becomes larger, and therefore, in the embodiments of the present disclosure, sets an angle threshold according to state of the earphone when not wearing use.For example, When earphone, which is in, does not wear use state, angle α=135 ° on earphone between the axis of two earplugs are worn when earphone is in When wearing use state, angle α=170 ° on earphone between the axis of two earplugs can then be chosen between above-mentioned two angle Numerical value is as angle threshold, such as 140 °, 145 ° or 150 °.By calculated in step S112 obtained two earplugs axis it Between included angle be compared with the angle threshold, and then determine earphone use state.
When the included angle is less than or equal to predetermined angle threshold value, step S212 is executed;Otherwise, terminate process.
Step S212: determine that the earphone is not in wearing use state.
In the embodiments of the present disclosure, due to the characteristic of earphone itself, when user wears earphone, two earplugs on earphone Angle between axis becomes larger;When user takes earphone, the angle on earphone between the axis of two earplugs becomes smaller.Therefore, When the included angle is less than or equal to predetermined angle threshold value, determine that the earphone is not in wearing use state.
After step s 212, above-mentioned steps S300 is executed, and then is realized when user takes earphone, described in automatic control Terminal stops to the earphone output audio signal.
In the embodiments of the present disclosure, judge whether earphone is located by the included angle on earphone between the axis of two earplugs In wearing use state, when included angle is less than or equal to predetermined angle threshold value, determine that earphone is not in wearing use state, And then controlling terminal stops realizing the automatic control that earphone plays to earphone output audio signal.
Another embodiment of the present disclosure is as shown in fig. 7, the step S100 of its embodiment shown in Fig. 2 may include following step It is rapid:
Step S121: the distance between collected two earplugs of the range sensor being arranged on earphone number is obtained According to;
As shown in fig. 6, due to the characteristic of earphone itself, when user wears earphone, on earphone between two earplugs away from Defection becomes larger;After user takes earphone, the distance between two earplugs can become smaller on earphone.It therefore, can be by earphone Judgment basis of the distance between two earplugs as earphone use state.In the embodiments of the present disclosure, earphone is equipped with distance Sensor obtains the distance between collected two earplugs of range sensor data.
Step S122: using the range data as the state parameter information.
In the embodiments of the present disclosure, join the distance between collected two earplugs of range sensor data as state Number information.
As shown in fig. 7, the step S200 of embodiment of the present disclosure embodiment shown in Fig. 2 may comprise steps of:
Step S221: judge whether the range data is less than or equal to pre-determined distance threshold value;
According to the above-mentioned description to Fig. 6 it is found that when user wears earphone, the distance between two earplugs become on earphone Greatly, therefore, in the embodiments of the present disclosure, the state according to earphone when not wearing use sets a distance threshold.For example, working as ear Machine is not in when wearing use state, and the distance between two earplugs are 10cm on earphone;Use state is worn when earphone is in When, the distance between two earplugs are 20cm on earphone, then the numerical value that can be chosen between above-mentioned two distance is used as apart from threshold Value, such as 14cm, 15cm or 16cm.By the distance between collected two earplugs of range sensor in step S121 data with The distance threshold is compared, and then determines the use state of earphone.
When the range data is less than or equal to pre-determined distance threshold value, step S222 is executed;Otherwise, terminate process.
Step S222: determine that the earphone is not in wearing use state.
In the embodiments of the present disclosure, due to the self-characteristic of earphone, when user wears earphone, on earphone two earplugs it Between distance become larger;When user takes earphone, the distance between two earplugs become smaller on earphone.Therefore, work as range sensor When the distance between collected two earplugs data are less than or equal to distance threshold, determine that the earphone is not in wearing and uses State.
After step S222, above-mentioned steps S300 is executed, and then realize the automatic control terminal when user takes earphone Stop to earphone output audio signal.
In the embodiments of the present disclosure, judge whether earphone is in wearing and uses by the distance between two earplugs on earphone State determines that earphone is not in wearing use state, and then control eventually when range data is less than or equal to pre-determined distance threshold value End stops realizing the automatic control that earphone plays to earphone output audio signal.
Another embodiment of the present disclosure is as shown in figure 8, the step S100 of its embodiment shown in Fig. 2 may include following step It is rapid:
Step S131: it is collected to obtain the pressure sensor being arranged at least one predeterminated position on the earphone outer covering Pressure data;
In the embodiments of the present disclosure, pressure sensor is set at least one predeterminated position on earphone outer covering, when user plucks After lower earphone, usually earphone is placed on loading end according to habit, the pressure sensor on earphone and carrying face contact are in turn Generate pressure signal.It should be pointed out that the disclosure is not especially limited the quantity of pressure sensor and setting position, this The technical staff in field can according to actual needs select the quantity of pressure sensor, such as 2,3 or 5.
Step S132: using the pressure data as the state parameter information.
After user takes earphone, earphone is placed on loading end, the pressure sensor on earphone and carrying face contact And then generate pressure signal;When user wears earphone, earphone is detached from loading end, pressure sensor and loading end point on earphone From pressure signal disappears.Based on the principle, in the embodiments of the present disclosure, using the collected pressure data of pressure sensor as State parameter information.
As shown in figure 8, the step S200 of embodiment of the present disclosure embodiment described in Fig. 2 may comprise steps of:
Step S231: judge whether the pressure data is greater than or equal to preset pressure threshold;
After user takes earphone, pressure sensor and carrying face contact, the collected pressure data of pressure sensor institute Become larger, therefore, in the embodiments of the present disclosure, is set according to earphone and pressure sensor collected pressure data when carrying face contact A fixed pressure threshold.For example, when earphone is placed on loading end, ideally, the collected pressure data of pressure sensor For 20N, then it can choose one and be less than the numerical value of the desired pressure data as pressure threshold, for example, can choose 10N or 15N Deng.The collected pressure data of pressure sensor in step S131 is compared with the pressure threshold, and then determines earphone Use state.
When the pressure data is greater than or equal to preset pressure threshold, step S232 is executed;Otherwise, terminate process.
Step S232: determine that the earphone is not in wearing use state.
In the embodiments of the present disclosure, when user takes earphone, and earphone is placed on loading end, pressure sensor is adopted The pressure data of collection becomes larger.Therefore, when judge the collected pressure data of pressure sensor be greater than or equal to preset pressure threshold When value, determine that the earphone is not in wearing use state.
After step S232, above-mentioned steps S300 is executed, and then realize the automatic control terminal when user takes earphone Stop to earphone output audio signal.
In the embodiments of the present disclosure, judge whether earphone is in wearing and makes by the collected pressure data of pressure sensor Determine that earphone is not in wearing use state, and then control when pressure data is greater than or equal to preset pressure threshold value with state Terminal stops realizing the automatic control that earphone plays to earphone output audio signal.
Based on same open design, the embodiment of the present disclosure additionally provides a kind of earphone broadcast control device.Fig. 9 is the disclosure A kind of earphone broadcast control device structural schematic diagram that embodiment provides, as shown in figure 9, the earphone broadcast control device is applied to Terminal 1, the earphone broadcast control device include:
State parameter information obtains module 9100, is configured as obtaining the earphone that is connected with the terminal in broadcasting State parameter information;
In the embodiments of the present disclosure, state parameter information can be that the sensor that is arranged in earphone or terminal is collected Information, or the information extracted in sensor information collected.Wherein, when sensor is arranged on earphone, state ginseng The acquisition modes of number information are determined by the connection type of earphone and terminal, are specifically included: if earphone and terminal wired connection, eventually End obtains state parameter information by connection earphone and the signal wire of terminal;If earphone is connect with terminal wireless, terminal passes through The communication module being set in terminal and earphone obtains state parameter information.
Earphone purpose of state parameter information when playing is obtained to be to judge the use of earphone by state parameter information State, that is to say, that the state parameter information in the embodiment of the present disclosure is the state parameter letter that can reflect earphone use state Breath.For example, can choose audio-frequency information, acceleration information, gyroscope information, light sensing information, magnetic field induction information, pressure Induction information, apart from induction information, overturning induction information, temperature sense information etc..
Use state judgment module 9200 is configured as obtaining the institute that module 9100 obtains according to the state parameter information It states state parameter information and judges whether the earphone is not in wearing use state;
Since state parameter information in the embodiments of the present disclosure is the state parameter letter that can reflect earphone use state Breath, therefore, can judge the use state of earphone according to the state parameter information obtained in step S100.For example, will acquire State parameter information is compared (preset condition is condition when earphone is not in wearing use state) with preset condition, if obtaining The state parameter information taken meets preset condition, then judges that earphone is not in wearing use state;If the state parameter letter obtained Breath does not meet preset condition, then judges that earphone is in and wear use state.
Signal output control module 9300 is configured as judging the earphone not when the use state judgment module 9200 In when wearing use state, controls the terminal and stop to the earphone output audio signal.
In the embodiments of the present disclosure, the terminal is controlled to stop to the earphone output audio signal being controlling terminal On media player pause play, the media player in controlling terminal is mute or the audio letter between disconnected end and earphone Number transmission line, the disclosure is without limitation, but its effect achieved is that earphone no longer receives audio signal, and earphone is temporary Break and puts.That is, in the embodiments of the present disclosure, when judging that earphone is not in wearing use state, can automatically control Earphone pause plays, and user need not execute other operations again, easy to use.
In one embodiment of the disclosure, as shown in Figure 10, the state parameter information in Fig. 9 obtains module 9100, comprising:
Audible signal reception submodule 9101 is configured as receiving the microphone in the terminal or on earphone in the ear Collected voice signal when machine sowing is put;
First state parameter information extracting sub-module 9102 is configured as extracting the audible signal reception submodule 9101 State parameter information of the frequency of the voice signal received as the earphone.
Under normal conditions, user's environment locating when using earphone is not absolute squelch, ambient noise (such as automobile Whistle sound, television acoustics sound, musical sound in bar etc.) voice signal that microphone acquires can be caused centainly to interfere.If Judge that user takes earphone when microphone collects outside noise, it is clear that will cause erroneous judgement, influence user experience.Therefore, when Microphone also needs to distinguish that the voice signal is the voice signal or outside noise that earphone plays after collecting voice signal.
In the embodiments of the present disclosure, first state parameter information extracting sub-module 9102 is configured as extracting voice signal State parameter information of the frequency as earphone, so distinguish microphone collect voice signal be earphone play voice signal also It is outside noise, excludes the interference of outside noise.
In one embodiment of the disclosure, as shown in figure 11, on the basis of embodiment illustrated in fig. 10, shape is used in Fig. 9 State judgment module 9200 further include:
First frequency acquisition submodule 9201 is configured as obtaining the frequency of the audio signal of the terminal plays;
First matching judgment submodule 9202 is configured as judging the institute that the first frequency acquisition submodule 9201 obtains The frequency for the voice signal that the frequency and the first state parameter information extracting sub-module 9102 for stating audio signal are extracted Whether match;
First use state determines submodule 9203, is configured as judging institute when the first matching judgment submodule 9202 When the frequency of the frequency and the voice signal of stating audio signal matches, determine that the earphone is not in wearing use state.
In the embodiments of the present disclosure, first state parameter information extracting sub-module 9102 is configured as extracting the sound letter Number frequency as state parameter information, the first use state determines that submodule 9203 is configured as when the first matching judgment submodule When block 9202 judges that the frequency of audio signal and the frequency of voice signal match, determine that earphone is not in wearing use state, Erroneous judgement caused by ambient noise interference is avoided, the accuracy of judgement is improved.
In one embodiment of the disclosure, as shown in figure 12, the state parameter information in Fig. 9 obtains module 9100, comprising:
Audible signal reception submodule 9101 is configured as receiving the microphone in the terminal or on earphone in the ear Collected voice signal when machine sowing is put;
First state parameter information extracting sub-module 9102 is configured as extracting the audible signal reception submodule 9101 State parameter information of the frequency of the voice signal received as the earphone;
Second state parameter information extracting sub-module 9111 is configured as extracting the audible signal reception submodule 9101 State parameter information of the amplitude of the voice signal received as the earphone.
In one embodiment of the disclosure, on the basis of embodiment illustrated in fig. 12, as shown in figure 13, shape is used in Fig. 9 State judgment module 9200 includes:
Second frequency acquisition submodule 9211 is configured as obtaining the frequency of the audio signal of the terminal plays;
Second matching judgment submodule 9212 is configured as judging the institute that the second frequency acquisition submodule 9211 obtains The frequency for the voice signal that the frequency and the first state parameter information extracting sub-module 9102 for stating audio signal are extracted Whether match;
Amplitude judging submodule 9213 is configured as judging the audio letter when the second matching judgment submodule 9212 Number frequency and the frequency of the voice signal when matching, judge the amplitude and upper one of the current extracted voice signal Whether the difference of the amplitude of the secondary extracted voice signal is greater than or equal to default amplitude threshold;
Second use state determines submodule 9214, is configured as judging the vibration when the amplitude judging submodule 9213 When the difference of width is greater than or equal to default amplitude threshold, determine that the earphone is not in wearing use state.
That is, in the embodiments of the present disclosure, only meeting " frequency of audio signal and the frequency of voice signal simultaneously Match " and " difference of the amplitude of current extracted voice signal and the amplitude of last time extracted voice signal be greater than or Equal to default amplitude threshold " condition, it just determines that earphone is not in wearing use state, improves to the judgement of earphone use state Accuracy.
In the embodiments of the present disclosure, determine whether earphone is in wearing use state in terms of audio and amplitude two, the Two use states determine that submodule 9214 is configured as matching when the frequency of audio signal and the frequency of voice signal, and current The difference of the amplitude of the amplitude of the extracted voice signal and the last extracted voice signal is greater than or equal to pre- If when amplitude threshold, determining that earphone is not in wearing use state, avoid playing due to earphone sound is larger or earplug every It is judged by accident caused by audio fruit is bad, improves the accuracy of judgement.
In one embodiment of the disclosure, as shown in figure 14, the state parameter information in Fig. 9 obtains module 9100, comprising:
Spatial position data acquisition submodule 9121 is configured as obtaining the gyro being arranged in two earplugs on the earphone The collected spatial position data of instrument;
Third state parameter information extracting sub-module 9122 is configured as according to the spatial position data acquisition submodule 9121 spatial position datas obtained calculate described in the conduct of the included angle on the earphone between the axis of two earplugs State parameter information.
In one embodiment of the disclosure, on the basis of embodiment illustrated in fig. 14, as shown in figure 15, shape is used in Fig. 9 State judgment module 9200, comprising:
Angle judging submodule 9221 is configured as judging that the third state parameter information extracting sub-module 9122 is extracted The earphone on two earplugs axis between included angle whether be greater than or equal to predetermined angle threshold value;
Third use state determines submodule 9222, is configured as judging the folder when the angle judging submodule 9221 When angle angle is greater than or equal to predetermined angle threshold value, determine that the earphone is not in wearing use state.
In the embodiments of the present disclosure, judge whether earphone is located by the included angle on earphone between the axis of two earplugs In wearing use state, third use state determines that submodule 9222 is configured as being less than or equal to predetermined angle when included angle When threshold value, determine that earphone is not in wearing use state, and then controlling terminal stops realizing earphone to earphone output audio signal The automatic control of broadcasting.
In one embodiment of the disclosure, as shown in figure 16, the state parameter information in Fig. 9 obtains module 9100 and includes:
Range data acquisition submodule 9131 is configured as obtaining the range sensor being arranged on the earphone collected The distance between two earplugs data;
4th state parameter information extracting sub-module 9132 is configured as obtaining the range data acquisition submodule 9131 The range data taken is as the state parameter information.
In one embodiment of the disclosure, on the basis of embodiment illustrated in fig. 16, as shown in figure 17, shape is used in Fig. 9 State judgment module 9200, comprising:
Distance Judgment submodule 9231, be configured as judging the range data acquisition submodule 9131 obtains it is described away from Whether it is greater than or equal to pre-determined distance threshold value from data;
4th use state determines submodule 9232, be configured as when the Distance Judgment submodule 9231 judge it is described away from When being greater than or equal to pre-determined distance threshold value from data, determine that the earphone is not in wearing use state.
In the embodiments of the present disclosure, judge whether earphone is in wearing and uses by the distance between two earplugs on earphone State, the 4th use state determine that submodule 9232 is configured as when range data is less than or equal to pre-determined distance threshold value, really Determine earphone and be not in wearing use state, and then controlling terminal stops realizing oneself of earphone broadcasting to earphone output audio signal Dynamic control.
In one embodiment of the disclosure, as shown in figure 18, the state parameter information in Fig. 9 obtains module 9100 and includes:
Pressure data acquisition submodule 9141, is configured as obtaining on the earphone outer covering and sets at least one predeterminated position The collected pressure data of the pressure sensor set;
5th state parameter information extracting sub-module 9142 is configured as obtaining the pressure data acquisition submodule 9141 The pressure data taken is as the state parameter information.
In one embodiment of the disclosure, on the basis of embodiment illustrated in fig. 18, as shown in figure 19, shape is used in Fig. 9 State judgment module 9200, comprising:
Pressure judging submodule 9241 is configured as judging the pressure that the pressure data acquisition submodule 9141 obtains Whether force data is greater than or equal to preset pressure threshold;
5th use state determines submodule 9242, is configured as judging the pressure when the pressure judging submodule 9241 When force data is greater than or equal to preset pressure threshold, determine that the earphone is not in wearing use state.
In the embodiments of the present disclosure, judge whether earphone is in wearing and makes by the collected pressure data of pressure sensor With state, the 5th use state determines that submodule 9242 is configured as when pressure data is greater than or equal to preset pressure threshold value, Determine that earphone is not in wearing use state, and then controlling terminal stops realizing what earphone played to earphone output audio signal It automatically controls.
Figure 20 is a kind of block diagram of terminal shown according to an exemplary embodiment.For example, terminal 2000 can be movement Phone, computer, digital broadcasting terminal, messaging device, game console, tablet device, Medical Devices, body-building equipment, Personal digital assistant etc..
Referring to Figure 20, terminal 2000 may include following one or more components: processing component 2002, memory 2004, Power supply module 2006, multimedia component 2008, audio component 2010, the interface 2012 of input/output (I/O), sensor module 2014 and communication component 2016.
The integrated operation of the usual controlling terminal 2000 of processing component 2002, such as with display, telephone call, data communication, Camera operation and record operate associated operation.Processing component 2002 may include one or more processors 2020 to execute Instruction, to perform all or part of the steps of the methods described above.In addition, processing component 2002 may include one or more moulds Block, convenient for the interaction between processing component 2002 and other assemblies.For example, processing component 2002 may include multi-media module, To facilitate the interaction between multimedia component 2008 and processing component 2002.
Memory 2004 is configured as storing various types of data to support the operation in terminal 2000.These data Example includes the instruction of any application or method for operating in terminal 2000, contact data, telephone book data, Message, picture, video etc..Memory 2004 can by any kind of volatibility or non-volatile memory device or they Combination is realized, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), it is erasable can Program read-only memory (EPROM), programmable read only memory (PROM), read-only memory (ROM), magnetic memory, flash memory Reservoir, disk or CD.
Power supply module 2006 provides electric power for the various assemblies of terminal 2000.Power supply module 2006 may include power management System, one or more power supplys and other with for terminal 2000 generate, manage, and distribute the associated component of electric power.
Multimedia component 2008 includes the screen of one output interface of offer between the terminal 2000 and user.? In some embodiments, screen may include liquid crystal display (LCD) and touch panel (TP).If screen includes touch panel, Screen may be implemented as touch screen, to receive input signal from the user.Touch panel includes that one or more touch passes Sensor is to sense the gesture on touch, slide, and touch panel.The touch sensor can not only sense touch or sliding is dynamic The boundary of work, but also detect duration and pressure associated with the touch or slide operation.In some embodiments, more Media component 2008 includes a front camera and/or rear camera.When terminal 2000 is in operation mode, as shot mould When formula or video mode, front camera and/or rear camera can receive external multi-medium data.Each preposition camera shooting Head and rear camera can be a fixed optical lens system or have focusing and optical zoom capabilities.
Audio component 2010 is configured as output and/or input audio signal.For example, audio component 2010 includes a wheat Gram wind (MIC), when terminal 2000 is in operation mode, when such as call mode, recording mode, and voice recognition mode, microphone quilt It is configured to receive external audio signal.The received audio signal can be further stored in memory 2004 or via communication Component 2016 is sent.In some embodiments, audio component 2010 further includes a loudspeaker, is used for output audio signal.
I/O interface 2012 provides interface, above-mentioned peripheral interface module between processing component 2002 and peripheral interface module It can be keyboard, click wheel, button etc..These buttons may include, but are not limited to: home button, volume button, start button and Locking press button.
Sensor module 2014 includes one or more sensors, and the state for providing various aspects for terminal 2000 is commented Estimate.For example, sensor module 2014 can detecte the state that opens/closes of terminal 2000, the relative positioning of component, such as institute The display and keypad that component is terminal 2000 are stated, sensor module 2014 can also detect terminal 2000 or terminal 2,000 1 The position change of a component, the existence or non-existence that user contacts with terminal 2000,2000 orientation of terminal or acceleration/deceleration and end The temperature change at end 2000.Sensor module 2014 may include proximity sensor, be configured in not any physics It is detected the presence of nearby objects when contact.Sensor module 2014 can also include optical sensor, as CMOS or ccd image are sensed Device, for being used in imaging applications.In some embodiments, which can also include acceleration sensing Device, gyro sensor, Magnetic Sensor, pressure sensor or temperature sensor.
Communication component 2016 is configured to facilitate the communication of wired or wireless way between terminal 2000 and other equipment.Eventually End 2000 can access the wireless network based on communication standard, such as WiFi, 2G or 3G or their combination.It is exemplary at one In embodiment, communication component 2016 receives broadcast singal or broadcast correlation from external broadcasting management system via broadcast channel Information.In one exemplary embodiment, the communication component 2016 further includes near-field communication (NFC) module, to promote short distance Communication.For example, radio frequency identification (RFID) technology, Infrared Data Association (IrDA) technology, ultra wide band can be based in NFC module (UWB) technology, bluetooth (BT) technology and other technologies are realized.
In the exemplary embodiment, terminal 2000 can be by one or more application specific integrated circuit (ASIC), number Signal processor (DSP), digital signal processing appts (DSPD), programmable logic device (PLD), field programmable gate array (FPGA), controller, microcontroller, microprocessor or other electronic components are realized, for executing the above method.
In the exemplary embodiment, a kind of non-transitorycomputer readable storage medium including instruction, example are additionally provided It such as include the memory 2004 of instruction, above-metioned instruction can be executed by the processor 2020 of terminal 2000 to complete the above method.Example Such as, the non-transitorycomputer readable storage medium can be ROM, random access memory (RAM), CD-ROM, tape, soft Disk and optical data storage devices etc..
A kind of non-transitorycomputer readable storage medium, when the instruction in the storage medium is held by the processor of terminal When row, enable the terminal to execute a kind of earphone control method for playing back, which comprises
Obtain state parameter information of the earphone being connected with the terminal when playing;
Judge whether the earphone is not in wearing use state according to the state parameter information;
When the earphone, which is not in, wears use state, controls the terminal and stop exporting audio letter to the earphone Number.
The above is only the specific embodiment of the disclosure, is made skilled artisans appreciate that or realizing this public affairs It opens.Various modifications to these embodiments will be apparent to one skilled in the art, as defined herein General Principle can be realized in other embodiments without departing from the spirit or the scope of the present disclosure.Therefore, the disclosure It is not intended to be limited to the embodiments shown herein, and is to fit to and the principles and novel features disclosed herein phase one The widest scope of cause.
The above is only the specific embodiment of the disclosure, it is noted that for the ordinary skill people of the art For member, under the premise of not departing from disclosure principle, several improvements and modifications can also be made, these improvements and modifications are also answered It is considered as the protection scope of the disclosure.

Claims (9)

1. a kind of earphone control method for playing back, which is characterized in that be applied to terminal, comprising:
Obtain state parameter information of the earphone being connected with the terminal when playing;
Judge whether the earphone is not in wearing use state according to the state parameter information;
When the earphone, which is not in, wears use state, controls the terminal and stop to the earphone output audio signal;
Wherein, the state parameter information for obtaining the earphone being connected with the terminal when playing, comprising: receive the end Microphone on end or on the earphone collected voice signal when the earphone plays;
Extract the state parameter information of the frequency or amplitude of the voice signal as the earphone;
Judge whether the earphone is not in wearing use state according to the frequency of the voice signal or amplitude;
Wherein, judge whether the earphone is not in wearing use state according to the frequency of the voice signal, comprising:
Obtain the frequency of the audio signal of the terminal plays;
Whether the frequency for judging the audio signal and the frequency of the voice signal match;
When the frequency of the frequency of the audio signal and the voice signal matches, determine that the earphone is not in wearing and makes Use state;
Or, wherein judge whether the earphone is not in wearing use state according to the amplitude of the voice signal, comprising:
Obtain the frequency of the audio signal of the terminal plays;
Whether the frequency for judging the audio signal and the frequency of the voice signal match;
When the frequency of the frequency of the audio signal and the voice signal matches, the current extracted sound is judged Whether the difference of the amplitude of the amplitude of signal and the last extracted voice signal is greater than or equal to default amplitude threshold;
When the difference of the amplitude is greater than or equal to default amplitude threshold, determine that the earphone is not in wearing use state.
2. a kind of earphone broadcast control device, which is characterized in that be applied to terminal, comprising:
State parameter information obtains module, for obtaining state parameter letter of the earphone being connected with the terminal when playing Breath;
Use state judgment module is sentenced for obtaining the state parameter information that module obtains according to the state parameter information Whether the earphone that breaks is not in wearing use state;
Signal output control module, for judging that the earphone is not in wearing use state when the use state judgment module When, it controls the terminal and stops to the earphone output audio signal
The state parameter information obtains module, comprising:
Audible signal reception submodule, for receiving the acquisition when the earphone plays of the microphone in the terminal or on earphone The voice signal arrived;
First state parameter information extracting sub-module, the sound received for extracting the audible signal reception submodule State parameter information of the frequency of signal as the earphone;
Or, the second state parameter information extracting sub-module, for extracting described in the audible signal reception submodule receives State parameter information of the amplitude of voice signal as the earphone;
The use state judgment module, comprising:
First frequency acquisition submodule, the frequency of the audio signal for obtaining the terminal plays;
First matching judgment submodule, the frequency of the audio signal for judging the first frequency acquisition submodule acquisition Whether the frequency of the voice signal extracted with the first state parameter information extracting sub-module matches;
First use state determines submodule, for judging the frequency of the audio signal when the first matching judgment submodule When matching with the frequency of the voice signal, determine that the earphone is not in wearing use state;
Or, the use state judgment module, comprising:
Second frequency acquisition submodule, the frequency of the audio signal for obtaining the terminal plays;
Second matching judgment submodule, the frequency of the audio signal for judging the second frequency acquisition submodule acquisition Whether the frequency of the voice signal extracted with the first state parameter information extracting sub-module matches;
Amplitude judging submodule, for when the second matching judgment submodule judge the audio signal frequency and the sound When the frequency of sound signal matches, the amplitude and the last extracted sound of the current extracted voice signal are judged Whether the difference of the amplitude of sound signal is greater than or equal to default amplitude threshold;
Second use state determines submodule, for judging that the difference of the amplitude is greater than or equal to when the amplitude judging submodule When default amplitude threshold, determine that the earphone is not in wearing use state.
3. earphone broadcast control device according to claim 2, which is characterized in that the state parameter information obtains mould Block, comprising:
Spatial position data acquisition submodule, for obtaining the collected sky of gyroscope being arranged in two earplugs on the earphone Between position data;
Third state parameter information extracting sub-module, the sky for being obtained according to the spatial position data acquisition submodule Between position data calculate the included angle on the earphone between the axis of two earplugs as the state parameter information.
4. earphone broadcast control device according to claim 3, which is characterized in that the use state judgment module, packet It includes:
Angle judging submodule, for judging on the earphone that the third state parameter information extracting sub-module is extracted two Whether the included angle between the axis of earplug is less than or equal to predetermined angle threshold value;
Third use state determines submodule, for judging that the included angle is less than or equal to when the angle judging submodule When predetermined angle threshold value, determine that the earphone is not in wearing use state.
5. earphone broadcast control device according to claim 2, which is characterized in that the state parameter information obtains mould Block, comprising:
Range data acquisition submodule, for obtaining between collected two earplugs of range sensor being arranged on the earphone Range data;
4th state parameter information extracting sub-module, the range data for obtaining the range data acquisition submodule As the state parameter information.
6. earphone broadcast control device according to claim 5, which is characterized in that the use state judgment module, packet It includes:
Distance Judgment submodule, for judge the range data that the range data acquisition submodule obtains whether be less than or Equal to pre-determined distance threshold value;
4th use state determines submodule, for judging that the range data is less than or equal to when the Distance Judgment submodule When pre-determined distance threshold value, determine that the earphone is not in wearing use state.
7. earphone broadcast control device according to claim 2, which is characterized in that the state parameter information obtains mould Block, comprising:
Pressure data acquisition submodule, for obtaining the pressure sensing being arranged at least one predeterminated position on the earphone outer covering The collected pressure data of device;
5th state parameter information extracting sub-module, the pressure data for obtaining the pressure data acquisition submodule As the state parameter information.
8. earphone broadcast control device according to claim 7, which is characterized in that the use state judgment module, packet It includes:
Pressure judging submodule, for judge the pressure data that the pressure data acquisition submodule obtains whether be greater than or Equal to preset pressure threshold;
5th use state determines submodule, for judging that the pressure data is greater than or equal to when the pressure judging submodule When preset pressure threshold, determine that the earphone is not in wearing use state.
9. a kind of terminal characterized by comprising
Processor;
For the memory of storage processor executable instruction,
Wherein, the processor is configured to:
Obtain state parameter information of the earphone being connected with the terminal when playing;
Judge whether the earphone is not in wearing use state according to the state parameter information;
When the earphone, which is not in, wears use state, controls the terminal and stop to the earphone output audio signal;
Wherein, the state parameter information for obtaining the earphone being connected with the terminal when playing, comprising: receive the end Microphone on end or on the earphone collected voice signal when the earphone plays;
Extract the state parameter information of the frequency or amplitude of the voice signal as the earphone;
Judge whether the earphone is not in wearing use state according to the frequency of the voice signal or amplitude;
Wherein, judge whether the earphone is not in wearing use state according to the frequency of the voice signal, comprising:
Obtain the frequency of the audio signal of the terminal plays;
Whether the frequency for judging the audio signal and the frequency of the voice signal match;
When the frequency of the frequency of the audio signal and the voice signal matches, determine that the earphone is not in wearing and makes Use state;
Or, wherein judge whether the earphone is not in wearing use state according to the amplitude of the voice signal, comprising:
Obtain the frequency of the audio signal of the terminal plays;
Whether the frequency for judging the audio signal and the frequency of the voice signal match;
When the frequency of the frequency of the audio signal and the voice signal matches, the current extracted sound is judged Whether the difference of the amplitude of the amplitude of signal and the last extracted voice signal is greater than or equal to default amplitude threshold;
When the difference of the amplitude is greater than or equal to default amplitude threshold, determine that the earphone is not in wearing use state.
CN201510917231.3A 2015-12-10 2015-12-10 Earphone control method for playing back, device and terminal Active CN105451111B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510917231.3A CN105451111B (en) 2015-12-10 2015-12-10 Earphone control method for playing back, device and terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510917231.3A CN105451111B (en) 2015-12-10 2015-12-10 Earphone control method for playing back, device and terminal

Publications (2)

Publication Number Publication Date
CN105451111A CN105451111A (en) 2016-03-30
CN105451111B true CN105451111B (en) 2019-03-19

Family

ID=55560824

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510917231.3A Active CN105451111B (en) 2015-12-10 2015-12-10 Earphone control method for playing back, device and terminal

Country Status (1)

Country Link
CN (1) CN105451111B (en)

Families Citing this family (25)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11178478B2 (en) 2014-05-20 2021-11-16 Mobile Physics Ltd. Determining a temperature value by analyzing audio
WO2017203484A1 (en) * 2016-05-27 2017-11-30 Bugatone Ltd. Determining earpiece presence at a user ear
CN106293601A (en) * 2016-08-09 2017-01-04 乐视控股(北京)有限公司 A kind of audio frequency playing method and device
CN108076209A (en) * 2016-11-14 2018-05-25 中兴通讯股份有限公司 Control the method and device of media file
CN108304332A (en) * 2017-01-13 2018-07-20 飞捷科技股份有限公司 The method of electronic device and its signal switching apparatus and active switching signal
CN107122161B (en) * 2017-04-27 2019-12-27 维沃移动通信有限公司 Audio data playing control method and terminal
CN106982402A (en) * 2017-05-19 2017-07-25 北京小米移动软件有限公司 Control method, device and earphone that earphone is played
CN108174319A (en) * 2018-01-11 2018-06-15 中国地质大学(武汉) A kind of earphone intelligent controlling device based on MEMS pressure sensor
CN108668011B (en) * 2018-03-30 2020-12-18 联想(北京)有限公司 Output method, output device and electronic device
CN110740396A (en) * 2018-07-18 2020-01-31 安克创新科技股份有限公司 noise reduction earphones
CN109040448A (en) * 2018-08-03 2018-12-18 联想(北京)有限公司 A kind of control method and electronic equipment
CN109168098B (en) * 2018-08-17 2020-05-22 深圳市华冠拓展电子有限公司 System for automatically controlling to suspend and open Bluetooth headset when mobile phone is away from ear and control method thereof
CN109254751A (en) * 2018-08-29 2019-01-22 北京轩辕联科技有限公司 Audio for vehicle divides broadcasting method and device
CN109068226B (en) * 2018-09-29 2020-10-16 安克创新科技股份有限公司 Earphone and control method thereof
CN109379653B (en) * 2018-09-30 2020-12-04 Oppo广东移动通信有限公司 Audio transmission method and device, electronic equipment and storage medium
CN109413556B (en) * 2018-09-30 2021-03-02 Oppo广东移动通信有限公司 Equipment positioning method and device, earphone device and electronic equipment
US11558687B2 (en) 2018-10-29 2023-01-17 Goertek Inc. Interactive control method and device of earphones, earphone and storage medium
CN110161575A (en) * 2019-05-22 2019-08-23 广州杰赛科技股份有限公司 A kind of intelligent wearable device disassembly status detection method, device and storage medium
CN110099322B (en) * 2019-05-23 2021-04-20 歌尔科技有限公司 Method and device for detecting wearing state of earphone
CN111866691A (en) * 2020-06-10 2020-10-30 歌尔科技有限公司 State detection method and device of wireless earphone and earphone
CN112013949A (en) * 2020-08-06 2020-12-01 歌尔科技有限公司 Earphone wearing state determining method and device and earphone
CN114567840B (en) * 2020-11-27 2024-02-06 北京小米移动软件有限公司 Audio output method and device, mobile terminal and storage medium
CN114143652A (en) * 2021-11-26 2022-03-04 歌尔科技有限公司 TWS earphone wearing state detection method, device, equipment and medium
CN116416769A (en) * 2021-12-31 2023-07-11 北京荣耀终端有限公司 Exercise reminding method and electronic equipment
CN115119098B (en) * 2022-08-30 2022-12-27 荣耀终端有限公司 Audio playing control method, TWS earphone and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102293012A (en) * 2009-01-23 2011-12-21 索尼爱立信移动通讯有限公司 Acoustic in-ear detection for earpiece
CN102638742A (en) * 2011-02-14 2012-08-15 索尼公司 Sound signal output apparatus and sound signal output method
CN103051997A (en) * 2012-12-26 2013-04-17 广东欧珀移动通信有限公司 Earphone, and terminal equipment and method for controlling audio presentation through earphone
CN103581796A (en) * 2012-08-02 2014-02-12 索尼公司 Headphone device, wearing state detection device, and wearing state detection method
CN103974158A (en) * 2013-02-04 2014-08-06 联想(北京)有限公司 Audio output device

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102300140B (en) * 2011-08-10 2013-12-18 歌尔声学股份有限公司 Speech enhancing method and device of communication earphone and noise reduction communication earphone

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102293012A (en) * 2009-01-23 2011-12-21 索尼爱立信移动通讯有限公司 Acoustic in-ear detection for earpiece
CN102638742A (en) * 2011-02-14 2012-08-15 索尼公司 Sound signal output apparatus and sound signal output method
CN103581796A (en) * 2012-08-02 2014-02-12 索尼公司 Headphone device, wearing state detection device, and wearing state detection method
CN103051997A (en) * 2012-12-26 2013-04-17 广东欧珀移动通信有限公司 Earphone, and terminal equipment and method for controlling audio presentation through earphone
CN103974158A (en) * 2013-02-04 2014-08-06 联想(北京)有限公司 Audio output device

Also Published As

Publication number Publication date
CN105451111A (en) 2016-03-30

Similar Documents

Publication Publication Date Title
CN105451111B (en) Earphone control method for playing back, device and terminal
CN105744293B (en) The method and device of net cast
US20170126192A1 (en) Method, device, and computer-readable medium for adjusting volume
CN104867506B (en) The method and apparatus for automatically controlling music
CN103973544B (en) Audio communication method, speech playing method and device
CN104991754B (en) The way of recording and device
CN107978316A (en) The method and device of control terminal
CN107515925A (en) Method for playing music and device
CN106331338A (en) Volume adjusting method and device
CN107493500A (en) Multimedia resource player method and device
CN110167194A (en) Equipment connection method, device, bluetooth headset and system
CN105138319B (en) Event-prompting method and device
CN105282345A (en) Method and device for regulation of conversation volume
CN104394137B (en) A kind of method and device of prompting voice call
CN103841264A (en) Method and device for protecting terminal equipment and terminal equipment
CN104967932B (en) Earphone uses based reminding method and device, intelligent terminal
CN108549529A (en) Control the method and device of audio output
CN106445453A (en) Method and device for switching audio output paths
CN105406882A (en) Terminal equipment control method and device
CN105263044A (en) Method and device for adjusting smart home equipment
CN104835516A (en) Music playing method and apparatus, and intelligent terminal
CN105607738B (en) Determine the method and device of one hand pattern
CN106941635A (en) Audio amplifier connection method and device
CN106357913A (en) Method and device for prompting information
CN106375846B (en) The processing method and processing device of live audio

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant