Detailed Description
Reference will now be made in detail to embodiments of the present application, examples of which are illustrated in the accompanying drawings, wherein like or similar reference numerals refer to the same or similar elements or elements having the same or similar function throughout. The embodiments described below with reference to the drawings are exemplary and intended to be used for explaining the present application and should not be construed as limiting the present application.
The following describes a control method and device for an earphone and an earphone according to an embodiment of the present application with reference to the drawings.
Fig. 1 is a flow chart illustrating a method for controlling a headset according to an embodiment of the present application.
As shown in fig. 1, the control method of the headset includes:
step 101, determining a current working mode of the earphone.
It should be noted that the control method of the headset according to the embodiment of the present application is applied to the headset, for example, the execution main body of the control method of the headset may be a controller of the headset.
The earphone of the present embodiment may be a wireless earphone or a wired earphone. The embodiment is described by taking the earphone as a wireless bluetooth earphone as an example.
The communication terminal may be a hardware device such as a mobile phone, a tablet computer, a personal computer, and the like, and the embodiment does not limit the communication terminal.
In this embodiment, in different application scenarios, the manner of determining the current operating mode of the headset is different, for example, as follows:
as a possible implementation manner, the current working mode of the headset may be determined according to an instruction input to the headset by a user.
Specifically, a physical key or a touch key may be provided in the headset, and a user may trigger the physical key to output an instruction according to actual requirements, so as to start a corresponding current working mode of the headset.
As a possible implementation manner, the current working mode of the headset may be determined according to a control instruction sent by the communication terminal.
Wherein, the control instruction sent by the communication terminal to the earphone is determined according to the current scene information of the communication terminal.
As an example, when the communication terminal receives an incoming call request, the communication terminal may send a control instruction for starting a call mode to the headset, and correspondingly, the headset may start the call mode of the headset according to the control instruction, and at this time, it may be determined that the current working mode of the headset is the call mode.
As another example, when it is determined that the communication terminal opens the game application and the real-time call function in the game application is not opened, at this time, the communication terminal sends a control instruction to open the game mode of the non-real-time call to the headset. Correspondingly, when the earphone receives a control instruction of the communication terminal, the communication mode corresponding to the earphone can be started, and at the moment, the current working mode of the earphone can be determined to be a game mode of non-real-time communication.
As another example, when it is determined that the communication terminal opens the song listening application, at this time, the communication terminal may correspondingly send a control instruction to turn on the song listening mode to the headset. Correspondingly, the earphone can start the song mode according to the control instruction in communication, and at the moment, the current working mode of the earphone can be determined to be the song mode.
It can be understood that, in this embodiment, the headset and the communication terminal establish a bluetooth communication connection, and perform interactive communication in a bluetooth manner.
The current operating mode of the headset may include, but is not limited to, a song mode, a video mode, a game mode of a non-real-time call, a call mode, and the like, which is not limited by this embodiment.
Step 102, receiving first audio data of the communication terminal in the current working mode.
Specifically, the communication terminal sends first audio data to the headset in a bluetooth mode, and correspondingly, the headset receives the first audio data sent by the terminal in the bluetooth mode in a corresponding current working mode.
Step 103, collecting the sound of the external environment, and generating second audio data.
In this embodiment, the external environment state may be collected by a microphone in the headset to generate the second audio data.
The second audio data of this embodiment may be audio data of the user of the headset, or audio data of other users around the user of the headset.
And 104, judging whether the current working mode is a call mode.
And 105, if the current working mode is the non-call mode, further judging whether the second audio data is the audio data of the earphone user.
The current working mode is a non-call mode, which indicates that the current working mode of the earphone is a call mode other than the call mode, for example, the current working mode is a song mode or a video mode.
And 106, if the second audio data is the audio data of the earphone user, controlling the earphone to pause outputting the first audio data.
According to the control method of the earphone, when the earphone is used for listening to the audio data of the communication terminal, the earphone is used for collecting the sound of the external environment, whether the current working mode of the earphone is the call mode or not is determined, and when the current working mode of the earphone is determined not to be the call mode and the audio data collected from the external environment is determined to be the audio data of the earphone user, the earphone is controlled to pause outputting the audio data obtained from the communication terminal. Therefore, when it is determined that the earphone user needs to perform conversation interaction with other users around the earphone user, the earphone is combined with the audio data collected by the external environment and the current working mode of the earphone, the earphone is intelligently controlled to suspend outputting of the audio data acquired from the communication terminal, interaction control of the earphone which is more convenient and fast is achieved, the earphone user can conveniently perform conversation interaction with other users, and the earphone experience of the user is improved.
Based on the above embodiments, in order to further improve the experience of the headset of the user, as an exemplary implementation manner, when it is detected that the headset user completes dialog interaction with other users around the headset user, the headset may be controlled to continue outputting the audio data acquired from the communication terminal.
As a possible implementation manner, when the user of the headset receives a conversation ending instruction input by the user of the headset, the headset can be controlled to continuously output the audio data acquired from the communication terminal.
As another possible implementation manner, if the sound information of the headset user and the other user is not present in the audio data of the external environment collected by the microphone of the headset within the preset time, it may be determined that the interactive session between the headset user and the other user is ended, and at this time, the headset may be controlled to continue outputting the audio data acquired from the communication terminal.
In this embodiment, after the session is ended, the headset may be controlled to continue outputting the audio data acquired from the communication terminal. Therefore, the user does not need to manually trigger the corresponding key again, the more convenient interactive control of the earphone is realized, and the earphone experience of the user is improved.
It can be understood that, in the practical application process, not only the earphone user may actively initiate a dialogue communication with other users around the earphone user, that is, the earphone user attempts to actively communicate with others, but also other users around the earphone user may initiate a dialogue communication with the earphone user, and therefore, in this embodiment, the earphone control method may further include: and if the current working mode is a song mode or a video mode and the second audio data is the audio data of other users, further judging whether the audio data of other users contain preset keywords, wherein the preset keywords are preset according to the attribute information of the earphone user. And if the preset keywords are contained, controlling the earphone to suspend outputting the first audio data.
The attribute information of the earphone user is name attribute information of the earphone user, for example, the preset keyword may be name "zhang san si" of the earphone user, or the preset keyword may be other information related to the name of the earphone user, for example, the name of the earphone user is zhang san si, and the colleague or the family often refers to him as "yehang", and at this time, the preset keyword may be "yehang".
It can be understood that, in this embodiment, the preset keywords are preset by the user of the headset, the number of the preset keywords may be one or more, and the preset keywords are not limited in this embodiment.
The headset user in this implementation refers to the headset owner.
It can be understood that the current working mode of the earphone in this embodiment may be not only a song mode or a video mode, but also a game mode of non-real-time communication, and the control situation of the earphone is described below with reference to that the current working mode of the earphone is the game mode of non-real-time communication, and the second audio data is audio data of other users.
As a possible implementation manner, in this embodiment, if the current working mode is a game mode of non-real-time communication and the second audio data is audio data of other users, it is further determined whether the audio data of other users includes a preset keyword.
The preset keywords are preset according to the attribute information of the earphone user.
And if the preset keywords are contained, reducing the volume of the earphone, and controlling the earphone to output the first audio data according to the volume. That is to say, the sound of the earphone is controlled to be reduced, and the adjusted sound controls the earphone to output the first audio data, so that the user can carry out dialogue interaction with other users around the user while listening to the game audio data.
In this embodiment, when the current working mode of the earphone is the call mode and the second audio data is the audio data of other users, in order to prompt the user of the earphone to have other users to perform conversation and exchange with the user of the earphone, in this embodiment, if the current working mode is the call mode and the second audio data is the audio data of other users, the earphone is controlled to output the first audio data, and the earphone is controlled to vibrate. Therefore, in the process of conversation of the earphone user, the earphone vibrates to remind other users of conversation communication with the earphone user, and the earphone user is reminded in a convenient mode.
In order to make the control method of the earphone of the present disclosure clearly understood by those skilled in the art, the following describes the control method of the earphone of the present embodiment with reference to fig. 2. Wherein fig. 2 is a further refinement and extension of the control method of the headset shown in fig. 1.
Fig. 2 is a flowchart illustrating a method for controlling a headset according to another embodiment of the present application.
As shown in fig. 2, the control part of the headset includes:
step 201, determining the current working mode of the earphone.
Step 202, receiving first audio data of the communication terminal in the current working mode.
Step 203, collecting the sound of the external environment, and generating second audio data.
Step 204, if the current working mode is a call mode, further determining whether the second audio data is the audio data of the earphone user, if not, executingstep 205.
It can be understood that, if the current working mode is the call mode and the second audio data is determined to be the audio data of the earphone user, correspondingly, the earphone sends the collected audio data of the earphone user to the communication terminal, and correspondingly, the communication terminal sends the received corresponding audio data to the communication terminal of the opposite call end, so as to implement call communication between the two call parties.
In this embodiment, a specific implementation manner of determining whether the second audio data is the audio data of the earphone user may be: the sound characteristic information of the second audio data can be extracted, the sound characteristic information corresponding to the earphone user is matched, and if the sound characteristic information of the second audio data is matched with the sound characteristic information corresponding to the earphone user, the second audio data is determined to be the audio data of the earphone user.
Specifically, the matching degree between the two sound characteristic information can be calculated, and if the calculated matching degree exceeds a preset threshold value, the second audio data is determined to be the audio data of the earphone user.
It is understood that if the matching degree between the two sound feature information is less than the preset threshold, it may be determined that the second audio data is not the audio data of the headphone user. That is, the second audio data may be determined to be audio data of other users.
The sound characteristic information corresponding to the earphone user is predetermined by the earphone through analyzing the sound recognition words input by the earphone user.
Step 205, controlling the earphone to output the first audio data, and controlling the earphone to vibrate.
That is to say, in this embodiment, when the current operating mode of the headset is a call mode, since call sound is generally important and urgent, after the headset detects the interruption information, the headset is vibrated to prompt the user, and the output of the headset is not adjusted, that is, the headset continues to normally output the first audio data. It is understood that, at this time, the first audio data is call audio data.
Step 206, if the current working mode is the song mode or the video mode, further determining whether the second audio data is the audio data of the earphone user, if so, executingstep 208, otherwise, executingstep 207.
The preset keywords are preset according to the attribute information of the earphone user.
Step 207, determining whether the audio data of other users contains preset keywords, if yes, executingstep 208.
And step 208, controlling the earphone to suspend outputting the first audio data.
It should be understood that, in this embodiment, if the audio data of the other users does not include the preset keyword, the earphone is controlled to continue to normally output the first audio data.
That is to say, in this embodiment, in the process that the headphones are in the song mode or the video mode, if the headphones detect the interruption information, there is generally no urgency requirement due to the song/video sound, at this time, if it is determined that the audio data of other users includes the preset keyword headphones, the output of the first audio data may be suspended, that is, the sound output of the headphones may be directly turned off.
Step 209, if the current working mode is the game mode of the non-real-time communication, further determining whether the second audio data is the audio data of the earphone user, if so, executingstep 212, otherwise, executingstep 210.
Step 210, determining whether the audio data of other users contains a preset keyword, if yes, executingstep 211.
It should be understood that, in this embodiment, if it is determined that the audio data of the other users does not include the preset keyword, the earphone is controlled to continue to normally output the first audio data.
And step 211, reducing the volume of the earphone, and controlling the earphone to output the first audio data according to the volume.
Step 212, controlling the earphone to suspend outputting the first audio data.
That is, in this embodiment, after the earphone detects the interruption information, the sound of the earphone can be controlled to be reduced, so that the user can conveniently communicate with outsiders while playing games.
The control method of the earphone of the embodiment of the application combines the audio data collected by the earphone from the external environment and the current working mode condition of the earphone, and intelligently controls whether the earphone suspends outputting the audio data or not, therefore, when it is determined that the earphone user needs to carry out conversation interaction with other users around the earphone user, the earphone is combined with the audio data collected by the external environment and the current working mode of the earphone, the earphone suspends outputting the audio data obtained from the communication terminal, the more convenient interaction control of the earphone is realized, the earphone user can conveniently carry out conversation communication with other users, and the earphone experience of the user is improved.
In this implementation, it is understood that the headset will typically have a MiCrophone (MIC) MIC module built therein for call or recording functions.
In this embodiment, in order to achieve the effect of reducing noise step by step and the effect of positioning sound, the left earphone and the right earphone are both provided with a dual-microphone MIC array.
An exemplary diagram of a dual-microphone MIC array disposed in a left earphone and a headphone is shown in fig. 3, where MIC _1 and MIC _2 represent two microphones disposed in the left earphone, MIC _3 and MIC _4 represent two microphones disposed in the right earphone.
The control method of the headphone of the present embodiment is described below with reference to fig. 4.
Fig. 4 is a flowchart illustrating a method for controlling a headset according to another embodiment of the present application.
As shown in fig. 4, the method may include:
step 401, determining a current working mode of the headset.
Step 402, receiving first audio data of the communication terminal in the current working mode.
Step 403, collecting sound of the external environment, and generating second audio data.
And step 404, when the left earphone and the right earphone are both worn, determining the position information of the sound source in the external environment according to the double-microphone MIC array and the second audio data.
It can be understood that the dual-microphone MIC array in this embodiment not only can play a role in positioning, but also can play a role in noise reduction step by step.
The collected audio data is subjected to step-by-step noise reduction through the dual-microphone MIC array and the four MIC arrays, which can be realized through the prior art, and this embodiment does not describe this specifically.
Specifically, the sound of the external environment can be collected according to the MIC array of the dual microphones in the left earphone and the MIC array of the dual microphones in the right earphone, and the position information of the sound source in the external environment can be determined according to the audio data collected by each microphone in the earphone and the position relationship between the microphones.
Step 405, determine whether the current working mode is a call mode.
Step 406, if the current working mode is the non-call mode, further determining whether the second audio data is the audio data of the earphone user, and if so, executingstep 407 orstep 408.
Instep 407, if it is determined that the position information is close to the left earphone, the left earphone is controlled to suspend outputting the first audio data.
Specifically, after acquiring the position information of the sound source in the external environment, the distances between the sound source and the left headphone and between the sound source and the right headphone can be respectively calculated according to the position information, and if the distance between the sound source and the left headphone is greater than the distance between the sound source and the right headphone, it is determined that the left headphone side detects the interruption sound, and at this time, the left headphone can be controlled to suspend outputting the first audio data.
For the right earphone, in this embodiment, the right earphone may be controlled to normally output the first audio data, or the right earphone may be controlled to suspend outputting the first audio data, and the implementation does not specifically limit the control manner of the right earphone.
As an example, when wearing dual headphones, the user may also choose to turn on the pointing function, e.g., when the user is listening to a song, the headphones detect that there is an interruption sound on the user's left side, then the user's left headphone may turn off the sound output, while the right headphone remains outputting normally, and the user may know that someone on the left side is trying to communicate with himself.
And step 408, if the position information is determined to be close to the right earphone, controlling the right earphone to pause outputting the first audio data.
Specifically, after acquiring the position information of the sound source in the external environment, the distances between the sound source and the left headphone and between the sound source and the right headphone may be calculated according to the position information, and if the distance between the sound source and the left headphone is smaller than the distance between the sound source and the right headphone, it is determined that the right headphone detects the interrupting sound, and at this time, the right headphone may be controlled to suspend outputting the first audio data.
In this embodiment, for the left earphone, the left earphone may be controlled to normally output the first audio data, or the left earphone may be controlled to suspend outputting the first audio data.
It should be noted that the explanation of the method for controlling an earphone is also applicable to the method for controlling an earphone of this embodiment, and for the related description, reference may be made to the above embodiment, and details are not described here.
According to the control method of the earphone, when the earphone is used for listening to the audio data of the communication terminal, the earphone is used for collecting the sound of the external environment, the position information of the sound source in the external environment is determined through the double MIC arrays in the left earphone and the right earphone, whether the current working mode of the earphone is a call mode is determined, the earphone close to the sound source is determined by combining the position information of the sound source when the current working mode of the earphone is determined not to be the call mode and the audio data collected from the external environment is determined to be the audio data of an earphone user, and the earphone close to the sound source is controlled to pause outputting the audio data obtained from the communication terminal. Therefore, when it is determined that the earphone user needs to perform conversation interaction with other users around the earphone user, the earphone is combined with the audio data collected by the external environment and the current working mode of the earphone, the earphone is intelligently controlled to suspend outputting of the audio data acquired from the communication terminal, interaction control of the earphone which is more convenient and fast is achieved, the earphone user can conveniently perform conversation interaction with other users, and the earphone experience of the user is improved.
In order to implement the above embodiments, the present application further provides a control device of an earphone.
Fig. 5 is a schematic structural diagram of a control device of a headset according to an embodiment of the present application. The earphone is applied in an earphone, namely, the control device of the earphone is positioned in the earphone.
As shown in fig. 5, the control apparatus of the headset includes a first determiningmodule 110, a receivingmodule 120, asound collecting module 130, afirst judging module 140, asecond judging module 150, and afirst control module 160, wherein:
a first determiningmodule 110, configured to determine a current operating mode of the headset.
The receivingmodule 120 is configured to receive first audio data of the communication terminal in the current operating mode.
Thesound collection module 130 is configured to collect sounds of an external environment and generate second audio data.
The first determiningmodule 140 is configured to determine whether the current operating mode is a call mode.
The second determiningmodule 150 is configured to further determine whether the second audio data is audio data of the earphone user if the current operating mode is the non-call mode.
Thefirst control module 160 is configured to control the earphone to suspend outputting the first audio data if the second audio data is audio data of an earphone user.
In an embodiment of the present application, on the basis of the embodiment of the apparatus shown in fig. 5, as shown in fig. 6, the apparatus may further include:
the third determiningmodule 170 is configured to further determine whether the audio data of the other user includes a preset keyword if the current working mode is the song mode or the video mode and the second audio data is the audio data of the other user, where the preset keyword is preset according to the attribute information of the headset user.
Thefirst control module 160 is further configured to control the earphone to suspend outputting the first audio data when it is determined that the audio data of the other user includes the preset keyword.
In one embodiment of the present application, as shown in fig. 6, the apparatus may further include:
the fourth determiningmodule 180 is configured to further determine whether the audio data of the other user includes a preset keyword if the current working mode is a game mode of non-real-time communication and the second audio data is audio data of the other user, where the preset keyword is preset according to the attribute information of the headset user.
Thefirst control module 160 is further configured to, when it is determined that the audio data of the other user includes the preset keyword, reduce the volume of the earphone, and control the earphone to output the first audio data according to the volume.
In one embodiment of the present application, as shown in fig. 6, the apparatus may further include:
thesecond control module 190 is further configured to control the earphone to output the first audio data and control the earphone to vibrate if the current working mode is a call mode and the second audio data is audio data of other users.
In an embodiment of the present application, the headset comprises a left headset and a right headset, each of which is provided with a dual microphone MIC array, and in the embodiment of the apparatus shown in fig. 5, as shown in fig. 7, the apparatus may further comprise:
and a second determiningmodule 200, configured to determine, when it is determined that both the left earphone and the right earphone are worn, position information of a sound source in the external environment according to the dual-microphone MIC array and the second audio data.
Thefirst control module 160 is specifically configured to: and controlling the left earphone to pause outputting the first audio data if the position information is determined to be close to the left earphone. And controlling the right earphone to pause outputting the first audio data if the position information is determined to be close to the right earphone.
It should be noted that, the structure of the second determiningmodule 200 in the embodiment of the apparatus shown in fig. 7 may also be included in the embodiment of the apparatus shown in fig. 6, and the embodiment does not limit this.
It should be noted that the foregoing explanation on the embodiment of the control method of the earphone is also applicable to the control device of the earphone of this embodiment, and details are not described here again.
The control device of the earphone of the embodiment of the application collects the sound of the external environment through the earphone when the earphone listens to the audio data of the communication terminal, determines whether the current working mode of the earphone is a call mode, and controls the earphone to suspend outputting the audio data acquired from the communication terminal when the current working mode of the earphone is determined not to be the call mode and the audio data collected from the external environment is determined to be the audio data of an earphone user. Therefore, when it is determined that the earphone user needs to perform conversation interaction with other users around the earphone user, the earphone is combined with the audio data collected by the external environment and the current working mode of the earphone, the earphone is intelligently controlled to suspend outputting of the audio data acquired from the communication terminal, interaction control of the earphone which is more convenient and fast is achieved, the earphone user can conveniently perform conversation interaction with other users, and the earphone experience of the user is improved.
In order to implement the above embodiments, the present application also proposes anearphone 200.
Fig. 8 is a schematic diagram of a structure of a headset according to an embodiment of the present application.
Referring to fig. 8, the headset includes:memory 1001,processor 1002, and computer programs stored onmemory 1001 and executable onprocessor 1002.
Theprocessor 1002, when executing the program, implements the control method of the headphones provided in the above-described embodiments.
Further, the earphone further comprises:
acommunication interface 1003 for communicating between thememory 1001 and theprocessor 1002.
Amemory 1001 for storing computer programs that may be run on theprocessor 1002.
Memory 1001 may include high-speed RAM memory and may also include non-volatile memory (e.g., at least one disk memory).
Theprocessor 1002 is configured to implement the control method of the headset according to the above embodiments when executing the program.
If thememory 1001, theprocessor 1002, and thecommunication interface 1003 are implemented independently, thecommunication interface 1003, thememory 1001, and theprocessor 1002 may be connected to each other through a bus and perform communication with each other. The bus may be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, an Extended ISA (EISA) bus, or the like. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown in FIG. 8, but this is not intended to represent only one bus or type of bus.
Optionally, in a specific implementation, if thememory 1001, theprocessor 1002, and thecommunication interface 1003 are integrated on one chip, thememory 1001, theprocessor 1002, and thecommunication interface 1003 may complete communication with each other through an internal interface.
Theprocessor 1002 may be a Central Processing Unit (CPU), an Application Specific Integrated Circuit (ASIC), or one or more Integrated circuits configured to implement embodiments of the present Application.
The present embodiment also provides a computer-readable storage medium having stored thereon a computer program, characterized in that the program, when executed by a processor, implements the control method of the headset as above.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware related to instructions of a computer program, and the program can be stored in a non-volatile computer readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. The storage medium may be a magnetic disk, an optical disk, a Read-Only Memory (ROM), or the like.
The above examples only show some embodiments of the present invention, and the description thereof is more specific and detailed, but not construed as limiting the scope of the present invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the inventive concept, which falls within the scope of the present invention. Therefore, the protection scope of the present patent shall be subject to the appended claims.