CN110248264B - Sound transmission control method and terminal equipment - Google Patents

Sound transmission control method and terminal equipment Download PDF

Info

Publication number
CN110248264B
CN110248264B CN201910339725.6A CN201910339725A CN110248264B CN 110248264 B CN110248264 B CN 110248264B CN 201910339725 A CN201910339725 A CN 201910339725A CN 110248264 B CN110248264 B CN 110248264B
Authority
CN
China
Prior art keywords
sound
preset
earphone
signal
microphone
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
CN201910339725.6A
Other languages
Chinese (zh)
Other versions
CN110248264A (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.)
Vivo Mobile Communication Co Ltd
Original Assignee
Vivo Mobile Communication Co Ltd
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 Vivo Mobile Communication Co Ltd filed Critical Vivo Mobile Communication Co Ltd
Priority to CN201910339725.6A priority Critical patent/CN110248264B/en
Publication of CN110248264A publication Critical patent/CN110248264A/en
Application granted granted Critical
Publication of CN110248264B publication Critical patent/CN110248264B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04RLOUDSPEAKERS, MICROPHONES, GRAMOPHONE PICK-UPS OR LIKE ACOUSTIC ELECTROMECHANICAL TRANSDUCERS; DEAF-AID SETS; PUBLIC ADDRESS SYSTEMS
    • H04R1/00Details of transducers, loudspeakers or microphones
    • H04R1/10Earpieces; Attachments therefor ; Earphones; Monophonic headphones
    • H04R1/1025Accumulators or arrangements for charging
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04RLOUDSPEAKERS, MICROPHONES, GRAMOPHONE PICK-UPS OR LIKE ACOUSTIC ELECTROMECHANICAL TRANSDUCERS; DEAF-AID SETS; PUBLIC ADDRESS SYSTEMS
    • H04R2201/00Details of transducers, loudspeakers or microphones covered by H04R1/00 but not provided for in any of its subgroups
    • H04R2201/10Details of earpieces, attachments therefor, earphones or monophonic headphones covered by H04R1/10 but not provided for in any of its subgroups

Abstract

The invention provides a sound transmission control method and terminal equipment, wherein the sound transmission control method comprises the following steps: monitoring the connection state of the earphone; if the earphone is detected to be in a connected state, detecting whether an earphone microphone of the earphone meets a preset closing condition; and if the earphone microphone meets the preset closing condition, controlling the terminal equipment to start the terminal microphone configured on the terminal equipment and closing the earphone microphone. The method and the device can ensure the normal realization of the voice input operation of the user, solve the problem that the control mode of the earphone microphone is more rigid in the prior art, and improve the convenience of the user.

Description

Sound transmission control method and terminal equipment
Technical Field
The present invention relates to the field of communications technologies, and in particular, to a sound transmission control method and a terminal device.
Background
Currently, a terminal device detects that an earphone is connected (e.g., bluetooth connection or socket connection), automatically uses a microphone on the earphone device, and automatically switches back to the microphone on the terminal device when the earphone is disconnected.
In the above manner, when the quality of the earphone microphone in the connected state is damaged and the sound cannot be recorded, the user can only know that the earphone microphone is damaged and then switch the microphone using the terminal device to record the voice by actively disconnecting the earphone connection, which brings great inconvenience to the user, and especially greatly affects the user experience when the user plays games through the terminal device. That is to say, the control mode for the earphone microphone in the prior art is quite rigid, and the requirement for convenient use of users is difficult to satisfy.
Disclosure of Invention
The invention provides a sound transmission control method and terminal equipment, and aims to solve the problem that in the prior art, the control mode of an earphone microphone is relatively rigid and cannot meet the requirement of convenience of a user.
In order to solve the technical problem, the invention is realized as follows:
in a first aspect, an embodiment of the present invention provides a sound transmission control method, applied to a terminal device, including:
monitoring the connection state of the earphone;
if the earphone is detected to be in a connected state, detecting whether an earphone microphone of the earphone meets a preset closing condition;
and if the earphone microphone meets the preset closing condition, controlling the terminal equipment to start the terminal microphone configured on the terminal equipment and closing the earphone microphone.
In a second aspect, an embodiment of the present invention provides a terminal device, including:
the monitoring module is used for monitoring the connection state of the earphone;
the detection module is used for detecting whether an earphone microphone of the earphone meets a preset closing condition or not if the earphone is detected to be in a connected state;
and the first control module is used for controlling the terminal equipment to start the terminal microphone configured on the terminal equipment and close the earphone microphone if the earphone microphone meets the preset closing condition.
In a third aspect, an embodiment of the present invention provides a terminal device, including a processor, a memory, and a computer program stored on the memory and executable on the processor, where the computer program, when executed by the processor, implements the steps of the sound transmission control method.
In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the steps of the sound transmission control method.
In the embodiment of the invention, the terminal equipment is controlled to start the terminal microphone configured on the terminal equipment and close the earphone microphone by monitoring that the earphone is in the connected state and detecting that the earphone microphone of the earphone meets the preset closing condition, so that the normal realization of the voice input operation of a user can be ensured, the problem that the control mode of the earphone microphone in the prior art is relatively rigid is solved, and the convenience in use of the user is improved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the description of the embodiments of the present invention will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art that other drawings can be obtained according to these drawings without inventive exercise.
Fig. 1 is a flow chart illustrating a sound transmission control method according to an embodiment of the present invention;
fig. 2 is an exemplary diagram of a switch for turning on or off a "microphone smart detection function" according to an embodiment of the present invention;
fig. 3 is an exemplary diagram of a sub-switch for turning on or off a "microphone smart detection function" according to an embodiment of the present invention;
FIG. 4 illustrates an exemplary diagram of a status icon provided by an embodiment of the present invention;
fig. 5 is a schematic structural diagram of a terminal device according to an embodiment of the present invention;
fig. 6 is a schematic diagram of a hardware structure of a terminal device according to an embodiment of the present invention.
Detailed Description
In order to make the technical problems, technical solutions and advantages of the present invention more apparent, the following detailed description is given with reference to the accompanying drawings and specific embodiments.
Referring to fig. 1, which is a flowchart illustrating a voice transmission control method according to an embodiment of the present invention, the voice transmission control method according to an embodiment of the present invention is applied to a terminal device, and the voice transmission control method may include the following steps:
step 101, monitoring the connection state of the earphone.
In this step, the terminal device monitors the connection state of the earphone, where the connection state includes a connected state and an unconnected state. Here, the connection manner of the headset and the terminal device may include a wired connection manner (e.g., a socket connection) and a wireless connection manner (e.g., a bluetooth connection).
For monitoring the connection state of the earphone, different monitoring modes can be adopted by distinguishing the connection mode of the earphone and the terminal device, for example, if the connection mode of the earphone and the terminal device is a wired connection mode, the connection state of the earphone can be determined by monitoring the plugging state between a connection socket (or a connection interface) of the earphone and the terminal device; if the connection mode of the earphone and the terminal equipment is a wireless connection mode, the connection state of the earphone can be determined by monitoring the pairing interaction state between the earphone and the terminal equipment.
In the embodiment of the invention, a switch (both a physical key and a virtual key) can be provided, the 'microphone intelligent detection function' can be turned on or turned off through the switch, if the function is turned off, default use settings of an earphone microphone and a terminal microphone are executed, namely the earphone microphone is used by default when the earphone is in a connected state, and the terminal microphone is used by default when the earphone is in an unconnected state; if the function is started, the earphone microphone and the terminal microphone can be switched to use, and the sound transmission control method provided by the embodiment of the invention is executed. For example, the switch setting for turning on or off the "microphone smart detection function" may adopt the virtual key 20 as illustrated in fig. 2, where the "smart detection microphone" illustrated in fig. 2 means the "microphone smart detection function".
And 102, if the connected state of the earphone is monitored, detecting whether an earphone microphone of the earphone meets a preset closing condition.
In this step, if it is monitored in step 101 that the connection state of the earphone is the connected state, it may be determined whether the earphone microphone meets a preset closing condition by detecting a sound recording state of the earphone microphone of the earphone, so as to subsequently determine the closing or use of the earphone microphone. In the embodiment of the present invention, when the earphone is in the connected state, the terminal device may default to set the earphone microphone as the voice input device.
And 103, if the earphone microphone meets the preset closing condition, controlling the terminal equipment to start the terminal microphone configured on the terminal equipment and close the earphone microphone.
In this step, based on the fact that it is detected in step 102 that the earphone microphone meets the preset closing condition, it is determined to switch the earphone microphone to the terminal microphone, that is, the terminal device is controlled to start the terminal microphone, so as to ensure normal implementation of the user voice input operation, and the earphone microphone is closed, so that the earphone microphone is prevented from affecting the use effect of the terminal microphone and affecting the voice input effect.
In the embodiment of the invention, the terminal equipment is controlled to start the terminal microphone configured on the terminal equipment and close the earphone microphone by monitoring that the earphone is in the connected state and detecting that the earphone microphone of the earphone meets the preset closing condition, so that the normal realization of the voice input operation of a user can be ensured, the problem that the control mode of the earphone microphone in the prior art is relatively rigid is solved, and the convenience in use of the user is improved.
In some optional embodiments of the present invention, a manner of emitting a sound signal — detecting a sound signal may be adopted to determine whether the earphone microphone meets a preset turn-off condition, that is, a manner of emitting a preset sound signal by the terminal device, then detecting a sound input signal input by the earphone microphone, and comparing the sound input signal with the preset sound signal to determine whether the earphone microphone meets the preset turn-off condition. That is to say, in the embodiment of the present invention, in step 102, detecting whether the earphone microphone meets the preset turn-off condition may include: controlling the terminal equipment to send out a preset sound signal; if the sound input signal of the earphone microphone is not detected, determining that the earphone microphone meets a preset closing condition; and if the sound input signal of the earphone microphone is detected, determining that the earphone microphone meets the preset closing condition according to the second signal waveform of the sound input signal and the first signal waveform of the preset sound signal. In the embodiment of the invention, after monitoring that the connection state of the earphone is the connected state, the terminal equipment can be controlled to send out a preset sound signal and monitor the sound input signal input by the earphone microphone, if the sound input signal of the earphone microphone is not detected, the earphone microphone cannot realize sound input, which indicates that the earphone microphone is completely damaged; if the sound input signal of the earphone microphone is detected, the sound input of the earphone microphone can be realized, at the moment, the sound input signal is compared with the signal waveform of the preset sound signal, and whether the earphone microphone meets the preset closing condition or not is determined according to the signal waveform matching condition of the sound input signal and the preset sound signal.
Optionally, in some embodiments of the present invention, determining that the earphone microphone meets the preset turn-off condition according to the second signal waveform of the sound input signal and the first signal waveform of the preset sound signal may include: comparing the second signal waveform of the sound input signal with the first signal waveform of a preset sound signal; and if the second signal waveform is not matched with the first signal waveform, determining that the earphone microphone meets a preset closing condition. In the embodiment of the invention, if the sound input signal of the earphone microphone is detected, the second signal waveform of the sound input signal is compared with the first signal waveform of the preset sound signal, and if the second signal waveform is matched with the first signal waveform, the earphone microphone is not damaged and the current sound recording quality is better, namely the earphone microphone is determined not to conform to the preset closing condition; if the second signal waveform is not matched with the first signal waveform, the earphone microphone is not completely damaged and the current sound recording quality is poor, namely the earphone microphone is determined to meet the preset closing condition.
For example, in an alternative embodiment of the present invention, in order to avoid that the terminal device makes a sound to affect the user's use, the preset sound signal may be a sound signal with a preset frequency outside the auditory frequency range of the human ear (the auditory frequency range of the human ear is 20Hz to 20kHz), for example, the preset sound signal may be a sound signal lower than 20Hz, or the preset sound signal may be a sound signal higher than 20 kHz; alternatively, to improve user operability, the preset sound signal may be a sound signal specified by the user in advance. In addition, in the embodiment of the present invention, the output preset sound signal may be of a continuous type, or may be of an intermittent type.
In an embodiment of the present invention, to accurately detect whether the signal waveforms of the sound input signal of the earphone microphone and the preset sound signal match, whether the signal waveforms of the sound input signal and the preset sound signal match may be determined based on the detection of the sound frequency and/or the sound intensity, and in general, comparing the second signal waveform of the sound input signal with the first signal waveform of the preset sound signal may include: comparing the sound frequency of the sound input signal with the sound frequency of the preset sound signal, and/or comparing the sound intensity of the sound input signal with the sound intensity of the preset sound signal.
For example, determining whether the signal waveforms of the sound input signal and the preset sound signal match based on the detection of the sound frequency, that is, comparing the second signal waveform of the sound input signal with the first signal waveform of the preset sound signal, may include: dividing a voice input signal and a preset voice signal into a plurality of first intervals respectively; comparing the frequency difference value between the sound frequency of the sound input signal and the sound frequency of the preset sound signal in each first interval with a first preset value, and determining a first target interval with the frequency difference value smaller than the first preset value; determining a first number of first target intervals in the plurality of first intervals; and if the first ratio of the first number to the total number of the plurality of first intervals is smaller than a first preset ratio, determining that the second signal waveform is not matched with the first signal waveform. Therefore, whether the sound frequency of the sound input signal is matched with the sound frequency of the preset sound signal or not can be accurately detected, whether the second signal waveform is matched with the first signal waveform or not is determined, and whether the earphone microphone meets the preset closing condition or not is further determined. In the embodiment of the present invention, the division number, the first preset value, and the first preset ratio of the first interval may be obtained in advance through multiple sets of experimental data, or may be preset according to historical experience.
For example, it may be determined whether the sound input signal matches the signal waveform of the preset sound signal based on the detection of the sound intensity, that is, the second signal waveform of the sound input signal is compared with the first signal waveform of the preset sound signal, and the following steps may be included: dividing the voice input signal and the preset voice signal into a plurality of second intervals respectively; comparing a second ratio of the sound intensity of the sound input signal to the sound intensity of the preset sound signal in each second interval with a second preset ratio to obtain a ratio difference value of the second ratio and the second preset ratio; determining a second target interval of which the proportion difference value is smaller than a second preset value in the plurality of second intervals; and if the third ratio of the second number of the second target intervals to the total number of the plurality of second intervals is smaller than the third preset ratio, determining that the second signal waveform is not matched with the first signal waveform. Thus, whether the sound intensity of the sound input signal is matched with the sound intensity of the preset sound signal or not can be accurately detected, so that whether the second signal waveform is matched with the first signal waveform or not is determined, and whether the earphone microphone meets the preset closing condition or not is further determined. In the embodiment of the present invention, the division number, the second preset ratio, the second preset value, and the third preset ratio of the second interval may be obtained in advance through multiple sets of experimental data, or may be preset according to historical experience.
It is understood that, in the step of comparing the second signal waveform of the sound input signal with the first signal waveform of the preset sound signal, the comparison manner of the sound input signal with the sound frequency of the preset sound signal and the comparison manner of the sound input signal with the sound intensity of the preset sound signal in the above example can be combined to more accurately detect whether the second signal waveform matches with the first signal waveform.
In some optional embodiments of the present invention, when it is detected that the earphone microphone meets the preset turn-off condition, the earphone microphone may be directly switched to the terminal microphone, that is, the terminal device is directly controlled to start the terminal microphone and turn off the earphone microphone, thereby facilitating reduction of user operations. Or, under the condition that it is detected that the earphone microphone meets the preset closing condition, a switching prompt may also be sent to the user, so that the user autonomously selects whether to switch the earphone microphone to the terminal microphone based on the switching prompt, thereby facilitating the improvement of user operability, that is, in step 103, if the earphone microphone meets the preset closing condition, the terminal device is controlled to start the terminal microphone configured on the terminal device, and the earphone microphone is closed, which may include the following steps: if the earphone microphone meets the preset closing condition, sending a switching prompt; and receiving a switching input based on the switching prompt, controlling the terminal equipment to start a terminal microphone configured on the terminal equipment, and closing an earphone microphone. Here, the switching prompt may include a voice prompt, a text prompt, a warning light prompt, and/or a vibration prompt.
In the embodiment of the present invention, a switch may be provided, and the "microphone intelligent detection function" may be turned on or off by the switch, and a sub-switch may be further provided, as shown in fig. 3, the sub-switch may include: a first sub-switch 31 for turning on the "switching prompt function", a second sub-switch 32 for turning on the "microphone smart switching function", and a third sub-switch 33 for turning off the "microphone smart detection function". For example, the "intelligent alert after detection" shown in fig. 3 represents a "switching prompt function", and the first sub-switch 31 in fig. 3 is in an on state, where after the first sub-switch 31 is turned on, a switching prompt is issued to the user in a case that it is detected that the earphone microphone meets a preset off condition, so that the user autonomously selects whether to switch the earphone microphone to the terminal microphone based on the switching prompt; the "detected intelligent switching" shown in fig. 3 represents "microphone intelligent switching function", in fig. 3, the second sub-switch 32 is in a closed state, and after the second sub-switch 32 is turned on, the earphone microphone is directly switched to the terminal microphone under the condition that the earphone microphone is detected to meet the preset closing condition; the "off detection function" shown in fig. 3 means to turn off the "microphone smart detection function", the third sub-switch 33 is in an off state in fig. 3, and after the third sub-switch 33 is turned on, the "microphone smart detection function" is turned off, and default use settings of the earphone microphone and the terminal microphone are performed. It is understood that in the exemplary embodiment of the present invention, only one of the first sub-switch 31, the second sub-switch 32 and the third sub-switch 33 can be in the on state at the same time.
In some optional embodiments of the present invention, after controlling the terminal device to start a terminal microphone configured on the terminal device and turn off an earphone microphone, the method may further include: and controlling the terminal equipment to send a switching completion prompt, wherein the switching completion prompt can comprise a voice prompt, a text prompt, a warning light prompt and/or a vibration prompt so as to prompt a user that the earphone microphone is switched to the terminal microphone currently.
In some optional embodiments of the present invention, after controlling the terminal device to start a terminal microphone configured on the terminal device and turn off an earphone microphone, the method may further include: and when the preset detection time of the preset detection period is up, if the earphone is in the connected state, re-detecting whether the earphone microphone of the earphone meets the preset closing condition.
Advantageously, in some optional embodiments of the present invention, in step 101, after monitoring the connection state of the earphone, the sound transmission control method may further include: if the connected state of the earphone is monitored, displaying a state icon in a preset area of a display interface of the terminal equipment, wherein the state icon is used for representing the use state information of the earphone and a sound device on the terminal equipment, and optionally, the use state information can comprise at least one of first state information whether the earphone is used and second state information whether the earphone is damaged or not; therefore, the user can know the current state of the sound device when the terminal equipment monitors that the earphone is in the connected state. In the embodiment of the present invention, a preset specific mark may be adopted to represent the use state information of the sound device, and for example, the corresponding use state information may be represented by displaying a predetermined color mark on the state icon, for example, the state icon marked with gray color may represent that the sound device is in an unused state, the state icon marked with red color may represent that the sound device is abnormal, and the state icon marked with green color may represent that the sound device is in a used state; for example, the usage status information may be represented by a predetermined frame mark, for example, a status icon displaying the predetermined frame mark represents that the sound device is in a usage status, and a status icon not displaying the predetermined frame mark represents that the sound device is in an unused status; for example, to better display the first state information and the second state information, a predetermined color mark may be combined with a predetermined frame mark, for example, the first state information is represented by the predetermined frame mark, and the second state information is represented by the predetermined color mark, that is, a state icon displaying the predetermined frame mark indicates that the sound device is in a used state, a state icon not displaying the predetermined frame mark indicates that the sound device is in an unused state, and a state icon red marked indicates that the sound device is abnormal (i.e., the second state information).
Here, the sound device may include an earphone microphone, an earphone receiver, a terminal microphone, and a terminal speaker, and optionally, as shown in fig. 4, the status icon may include: a first icon 41 representing headset microphone usage status information, a second icon 42 representing headset earpiece usage status information, a third icon 43 representing terminal microphone usage status information and a fourth icon 44 representing terminal speaker usage status information. Exemplarily, as shown in fig. 4, the predetermined area 51 may be a top area of the display interface 50, and the first icon 41, the second icon 42, the third icon 43 and the fourth icon 44 are displayed in the predetermined area 51, wherein in this example, the predetermined frame mark represents the first state information of the sound device, in fig. 4, the earphone microphone is in an unused state, the earphone receiver is in an unused state, the terminal microphone is in a used state, and the terminal speaker is in a used state.
Further, in some optional embodiments of the present invention, in order to facilitate a user to perform a switching operation on the sound device, after the status icon is displayed in a predetermined area of a display interface of the terminal device, the method may further include the following steps: receiving a touch input on a target one of the status icons; and responding to the touch input, and starting the sound device corresponding to the control target state icon. Therefore, a user can switch the sound devices through simple touch operation, optionally, in order to avoid conflict between the use of the sound devices, the sound devices with the same functions on the earphone and the terminal equipment are alternatively used, for example, when the terminal equipment receives touch input to the terminal microphone, the terminal equipment controls the terminal microphone to be started, and controls the earphone microphone to be closed.
According to the sound transmission control method provided by the embodiment of the invention, the terminal equipment is controlled to start the terminal microphone configured on the terminal equipment and close the earphone microphone by monitoring the connected state of the earphone and detecting that the earphone microphone of the earphone meets the preset closing condition, so that the normal implementation of the sound input operation of a user can be ensured, the problem that the control mode of the earphone microphone in the prior art is relatively complicated is solved, and the convenience in use of the user is improved.
Based on the method, the embodiment of the invention provides the terminal equipment for realizing the method.
Please refer to fig. 5, which shows a schematic structural diagram of a terminal device according to an embodiment of the present invention. An embodiment of the present invention provides a terminal device 500, including: a monitoring module 510, a detection module 520, and a first control module 530.
A monitoring module 510, configured to monitor a connection state of the headset;
the detection module 520 is configured to detect whether an earphone microphone of the earphone meets a preset turn-off condition if the earphone is detected to be in a connected state;
the first control module 530 is configured to control the terminal device to start a terminal microphone configured on the terminal device and to turn off the earphone microphone if the earphone microphone meets a preset turn-off condition.
In some optional embodiments of the present invention, a manner of emitting a sound signal — detecting a sound signal may be adopted to determine whether the earphone microphone meets a preset turn-off condition, that is, a manner of emitting a preset sound signal by the terminal device, then detecting a sound input signal input by the earphone microphone, and comparing the sound input signal with the preset sound signal to determine whether the earphone microphone meets the preset turn-off condition. That is, in the embodiment of the present invention, the detecting module 520 may include: a first control submodule, a first determination submodule, and a second determination submodule.
The first control submodule is used for controlling the terminal equipment to send out a preset sound signal;
the first determining submodule is used for determining that the earphone microphone meets a preset closing condition if the sound input signal of the earphone microphone is not detected;
and the second determining submodule is used for determining that the earphone microphone meets the preset closing condition according to the second signal waveform of the sound input signal and the first signal waveform of the preset sound signal if the sound input signal of the earphone microphone is detected.
Optionally, in some embodiments of the present invention, the second determining sub-module may include: the device comprises a comparison unit and a determination unit.
The comparison unit is used for comparing a second signal waveform of the sound input signal with a first signal waveform of a preset sound signal;
and the determining unit is used for determining that the earphone microphone meets the preset closing condition if the second signal waveform is not matched with the first signal waveform.
For example, it may be determined whether the signal waveforms of the sound input signal and the preset sound signal match based on the detection of the sound frequency, that is, the comparison unit may include: the device comprises a first dividing subunit, a first determining subunit, a second determining subunit and a third determining subunit.
The first dividing unit is used for dividing the sound input signal and the preset sound signal into a plurality of first intervals respectively;
the first determining subunit is configured to compare a frequency difference between the sound frequency of the sound input signal and the sound frequency of the preset sound signal in each first interval with a first preset value, and determine a first target interval with the frequency difference smaller than the first preset value;
a second determining subunit, configured to determine a first number of first target intervals in the plurality of first intervals;
and the third determining subunit is used for determining that the second signal waveform is not matched with the first signal waveform if the first ratio of the first number to the total number of the plurality of first intervals is smaller than the first preset ratio.
For example, it may be determined whether the signal waveform of the sound input signal and the preset sound signal matches based on the detection of the sound intensity, that is, the comparison unit may include: the second division subunit, the comparison subunit, the fourth determination subunit, and the fifth determination subunit.
The second dividing subunit is used for dividing the sound input signal and the preset sound signal into a plurality of second intervals respectively;
the comparison subunit is configured to compare a second ratio between the sound intensity of the sound input signal and the sound intensity of the preset sound signal in each second interval with a second preset ratio, so as to obtain a ratio difference between the second ratio and the second preset ratio;
the fourth determining subunit is configured to determine a second target interval, of the plurality of second intervals, where the ratio difference is smaller than a second preset value;
and the fifth determining subunit is configured to determine that the second signal waveform does not match the first signal waveform if a third ratio of the second number of the second target intervals to the total number of the plurality of second intervals is smaller than a third preset ratio.
In some optional embodiments of the present invention, when it is detected that the earphone microphone meets the preset turn-off condition, the earphone microphone may be directly switched to the terminal microphone, that is, the terminal device is directly controlled to start the terminal microphone and turn off the earphone microphone, thereby facilitating reduction of user operations. Or, in a case that it is detected that the earphone microphone meets the preset closing condition, a switching prompt may also be issued to the user, so that the user autonomously selects whether to switch the earphone microphone to the terminal microphone based on the switching prompt, thereby facilitating to improve user operability, that is, the first control module 530 may include: a prompt submodule and a second control submodule.
The prompting submodule is used for sending a switching prompt if the earphone microphone meets a preset closing condition;
and the second control submodule is used for receiving switching input based on the switching prompt, controlling the terminal equipment to start a terminal microphone configured on the terminal equipment and closing the earphone microphone.
Advantageously, in some optional embodiments of the present invention, the terminal device 500 may further include: and a display module.
And the display module is used for displaying a state icon in a preset area of a display interface of the terminal equipment if the connected state of the earphone is monitored, wherein the state icon is used for representing the use state information of the earphone and the sound device on the terminal equipment.
Optionally, the status icon may include: the earphone microphone usage state information display device comprises a first icon representing earphone microphone usage state information, a second icon representing earphone receiver usage state information, a third icon representing terminal microphone usage state information and a fourth icon representing terminal loudspeaker usage state information.
Further, in some optional embodiments of the present invention, to facilitate the user to perform the switching operation on the sound device, the terminal device 500 may further include: the device comprises a receiving module and a second control module.
A receiving module for receiving a touch input on a target one of the status icons;
and the second control module is used for responding to the touch input and controlling the starting of the sound device corresponding to the target state icon.
The terminal device provided in the embodiment of the present invention can implement each process implemented by the terminal device in the method embodiments of fig. 1 to fig. 4, and is not described herein again to avoid repetition.
According to the terminal device provided by the embodiment of the invention, the terminal device is controlled to start the terminal microphone configured on the terminal device and close the earphone microphone by monitoring that the earphone is in the connected state and detecting that the earphone microphone of the earphone meets the preset closing condition, so that the normal implementation of the voice input operation of a user can be ensured, the problem that the control mode of the earphone microphone in the prior art is relatively complicated is solved, and the convenience in use of the user is improved.
Fig. 6 is a schematic diagram of a hardware structure of a terminal device for implementing various embodiments of the present invention.
The terminal device 600 includes but is not limited to: a radio frequency unit 601, a network module 602, an audio output unit 603, an input unit 604, a sensor 605, a display unit 606, a user input unit 607, an interface unit 608, a memory 609, a processor 610, and a power supply 611. Those skilled in the art will appreciate that the terminal device configuration shown in fig. 6 does not constitute a limitation of the terminal device, and that the terminal device may include more or fewer components than shown, or combine certain components, or a different arrangement of components. In the embodiment of the present invention, the terminal device includes, but is not limited to, a mobile phone, a tablet computer, a notebook computer, a palm computer, a vehicle-mounted terminal, a wearable device, a pedometer, and the like.
The processor 610 is configured to monitor a connection state of the earphone; if the earphone is detected to be in a connected state, detecting whether an earphone microphone of the earphone meets a preset closing condition; and if the earphone microphone meets the preset closing condition, controlling the terminal equipment to start the terminal microphone configured on the terminal equipment and closing the earphone microphone.
In the embodiment of the invention, the terminal equipment is controlled to start the terminal microphone configured on the terminal equipment and close the earphone microphone by monitoring that the earphone is in a connected state and detecting that the earphone microphone of the earphone meets the preset closing condition, so that the normal implementation of the voice input operation of a user can be ensured, the problem that the control mode of the earphone microphone in the prior art is relatively rigid is solved, and the convenience in use of the user is improved.
It should be understood that, in the embodiment of the present invention, the radio frequency unit 601 may be used for receiving and sending signals during a message sending and receiving process or a call process, and specifically, receives downlink data from a base station and then processes the received downlink data to the processor 610; in addition, the uplink data is transmitted to the base station. In general, radio frequency unit 601 includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier, a duplexer, and the like. Further, the radio frequency unit 601 may also communicate with a network and other devices through a wireless communication system.
The terminal device provides the user with wireless broadband internet access through the network module 602, such as helping the user send and receive e-mails, browse webpages, access streaming media, and the like.
The audio output unit 603 may convert audio data received by the radio frequency unit 601 or the network module 602 or stored in the memory 609 into an audio signal and output as sound. Also, the audio output unit 603 can also provide audio output related to a specific function performed by the terminal apparatus 600 (e.g., a call signal reception sound, a message reception sound, etc.). The audio output unit 603 includes a speaker, a buzzer, a receiver, and the like.
The input unit 604 is used to receive audio or video signals. The input Unit 604 may include a Graphics Processing Unit (GPU) 6041 and a microphone 6042, and the Graphics processor 6041 processes image data of a still picture or video obtained by an image capturing apparatus (such as a camera) in a video capture mode or an image capture mode. The processed image frames may be displayed on the display unit 606. The image frames processed by the graphic processor 6041 may be stored in the memory 609 (or other storage medium) or transmitted via the radio frequency unit 601 or the network module 602. The microphone 6042 can receive sound, and can process such sound into audio data. The processed audio data may be converted into a format output transmittable to a mobile communication base station via the radio frequency unit 601 in case of the phone call mode.
The terminal device 600 further comprises at least one sensor 605, such as a light sensor, a motion sensor, and other sensors. Specifically, the light sensor includes an ambient light sensor that can adjust the luminance of the display panel 6061 according to the brightness of ambient light, and a proximity sensor that can turn off the display panel 6061 and/or the backlight when the terminal apparatus 600 is moved to the ear. As one of the motion sensors, the accelerometer sensor can detect the magnitude of acceleration in each direction (generally three axes), detect the magnitude and direction of gravity when stationary, and can be used to identify the terminal device posture (such as horizontal and vertical screen switching, related games, magnetometer posture calibration), vibration identification related functions (such as pedometer, tapping), and the like; the sensors 605 may also include fingerprint sensors, pressure sensors, iris sensors, molecular sensors, gyroscopes, barometers, hygrometers, thermometers, infrared sensors, etc., which are not described in detail herein.
The display unit 606 is used to display information input by the user or information provided to the user. The Display unit 606 may include a Display panel 6061, and the Display panel 6061 may be configured by a Liquid Crystal Display (LCD), an Organic Light-Emitting Diode (OLED), or the like.
The user input unit 607 may be used to receive input numeric or character information and generate key signal inputs related to user settings and function control of the terminal device. Specifically, the user input unit 607 includes a touch panel 6071 and other input devices 6072. Touch panel 6071, also referred to as a touch screen, may collect touch operations by a user on or near it (e.g., operations by a user on or near touch panel 6071 using a finger, stylus, or any suitable object or accessory). The touch panel 6071 may include two parts of a touch detection device and a touch controller. The touch detection device detects the touch direction of a user, detects a signal brought by touch operation and transmits the signal to the touch controller; the touch controller receives touch information from the touch sensing device, converts the touch information into touch point coordinates, sends the touch point coordinates to the processor 610, receives a command from the processor 610, and executes the command. In addition, the touch panel 6071 can be implemented by various types such as a resistive type, a capacitive type, an infrared ray, and a surface acoustic wave. The user input unit 607 may include other input devices 6072 in addition to the touch panel 6071. Specifically, the other input devices 6072 may include, but are not limited to, a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a track ball, a mouse, and a joystick, which are not described herein again.
Further, the touch panel 6071 can be overlaid on the display panel 6061, and when the touch panel 6071 detects a touch operation on or near the touch panel 6071, the touch operation is transmitted to the processor 610 to determine the type of the touch event, and then the processor 610 provides a corresponding visual output on the display panel 6061 according to the type of the touch event. Although in fig. 6, the touch panel 6071 and the display panel 6061 are two independent components to implement the input and output functions of the terminal device, in some embodiments, the touch panel 6071 and the display panel 6061 may be integrated to implement the input and output functions of the terminal device, and this is not limited here.
The interface unit 608 is an interface for connecting an external device to the terminal apparatus 600. For example, the external device may include a wired or wireless headset port, an external power supply (or battery charger) port, a wired or wireless data port, a memory card port, a port for connecting a device having an identification module, an audio input/output (I/O) port, a video I/O port, an earphone port, and the like. The interface unit 608 may be used to receive input (e.g., data information, power, etc.) from an external device and transmit the received input to one or more elements within the terminal apparatus 600 or may be used to transmit data between the terminal apparatus 600 and an external device.
The memory 609 may be used to store software programs as well as various data. The memory 609 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application program required by at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may store data (such as audio data, a phonebook, etc.) created according to the use of the cellular phone, and the like. Further, the memory 609 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device.
The processor 610 is a control center of the terminal device, connects various parts of the entire terminal device by using various interfaces and lines, and performs various functions of the terminal device and processes data by running or executing software programs and/or modules stored in the memory 609 and calling data stored in the memory 609, thereby performing overall monitoring of the terminal device. Processor 610 may include one or more processing units; preferably, the processor 610 may integrate an application processor, which mainly handles operating systems, user interfaces, application programs, etc., and a modem processor, which mainly handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into the processor 610.
The terminal device 600 may further include a power supply 611 (such as a battery) for supplying power to various components, and preferably, the power supply 611 may be logically connected to the processor 610 through a power management system, so as to implement functions of managing charging, discharging, and power consumption through the power management system.
In addition, the terminal device 600 includes some functional modules that are not shown, and are not described in detail herein.
Preferably, an embodiment of the present invention further provides a terminal device, which includes a processor 610, a memory 609, and a computer program stored in the memory 609 and capable of running on the processor 610, where the computer program is executed by the processor 610 to implement each process of the foregoing sound transmission control method embodiment, and can achieve the same technical effect, and in order to avoid repetition, details are not described here again.
An embodiment of the present invention further provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the computer program implements each process of the foregoing sound transmission control method embodiment, and can achieve the same technical effect, and in order to avoid repetition, details are not repeated here. The computer-readable storage medium may be a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal (such as a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method according to the embodiments of the present invention.
While the present invention has been described with reference to the embodiments shown in the drawings, the present invention is not limited to the embodiments, which are illustrative and not restrictive, and it will be apparent to those skilled in the art that various changes and modifications can be made therein without departing from the spirit and scope of the invention as defined in the appended claims.

Claims (10)

1. A sound transmission control method is applied to terminal equipment and is characterized by comprising the following steps:
monitoring the connection state of the earphone;
if the earphone is monitored to be in a connected state, detecting whether an earphone microphone of the earphone meets a preset closing condition;
if the earphone microphone meets the preset closing condition, controlling the terminal equipment to start a terminal microphone configured on the terminal equipment and close the earphone microphone;
detecting whether the earphone microphone meets a preset closing condition or not, including:
controlling the terminal equipment to send out a preset sound signal;
if the sound input signal of the earphone microphone is not detected, determining that the earphone microphone meets the preset closing condition;
if the sound input signal of the earphone microphone is detected, determining that the earphone microphone meets the preset closing condition according to a second signal waveform of the sound input signal and a first signal waveform of the preset sound signal;
the determining that the earphone microphone meets the preset closing condition according to the second signal waveform of the sound input signal and the first signal waveform of the preset sound signal includes:
comparing the second signal waveform of the sound input signal with the first signal waveform of the preset sound signal;
if the second signal waveform is not matched with the first signal waveform, determining that the earphone microphone meets the preset closing condition;
comparing the second signal waveform of the sound input signal with the first signal waveform of the preset sound signal, including:
dividing the sound input signal and the preset sound signal into a plurality of first intervals respectively;
comparing a frequency difference value between the sound frequency of the sound input signal and the sound frequency of the preset sound signal in each first interval with a first preset value, and determining a first target interval of which the frequency difference value is smaller than the first preset value;
determining a first number of the first target intervals in the plurality of first intervals;
determining that the second signal waveform does not match the first signal waveform if a first ratio of the first number to the total number of the plurality of first intervals is smaller than a first preset ratio;
alternatively, the first and second electrodes may be,
comparing the second signal waveform of the sound input signal with the first signal waveform of the preset sound signal, including:
dividing the sound input signal and the preset sound signal into a plurality of second intervals respectively;
comparing a second ratio of the sound intensity of the sound input signal to the sound intensity of the preset sound signal in each second interval with a second preset ratio to obtain a ratio difference value of the second ratio and the second preset ratio;
determining a second target interval of the plurality of second intervals, wherein the proportional difference is smaller than a second preset value;
and if the third ratio of the second number of the second target intervals to the total number of the plurality of second intervals is smaller than a third preset ratio, determining that the second signal waveform is not matched with the first signal waveform.
2. The sound transmission control method according to claim 1, further comprising, after monitoring the connection state of the headphone:
and if the connected state of the earphone is monitored, displaying a state icon in a preset area of a display interface of the terminal equipment, wherein the state icon is used for representing the use state information of the earphone and a sound device on the terminal equipment.
3. The sound transmission control method according to claim 2, wherein the status icon includes: the earphone microphone usage state information display device comprises a first icon representing earphone microphone usage state information, a second icon representing earphone receiver usage state information, a third icon representing terminal microphone usage state information and a fourth icon representing terminal loudspeaker usage state information.
4. The sound transmission control method according to claim 2, further comprising, after displaying the status icon in a predetermined area of a display interface of the terminal device:
receiving a touch input on a target one of the status icons;
and responding to the touch input, and controlling the sound device corresponding to the target state icon to start.
5. A terminal device, comprising:
the monitoring module is used for monitoring the connection state of the earphone;
the detection module is used for detecting whether an earphone microphone of the earphone meets a preset closing condition or not if the earphone is monitored to be in a connected state;
the first control module is used for controlling the terminal equipment to start a terminal microphone configured on the terminal equipment and close the earphone microphone if the earphone microphone meets the preset closing condition;
the detection module comprises:
the first control submodule is used for controlling the terminal equipment to send out a preset sound signal;
the first determining submodule is used for determining that the earphone microphone meets the preset closing condition if the sound input signal of the earphone microphone is not detected;
the second determining submodule is used for determining that the earphone microphone meets the preset closing condition according to a second signal waveform of the sound input signal and a first signal waveform of the preset sound signal if the sound input signal of the earphone microphone is detected;
the second determination submodule includes:
the comparison unit is used for comparing a second signal waveform of the sound input signal with a first signal waveform of the preset sound signal;
a determining unit, configured to determine that the earphone microphone meets the preset turn-off condition if the second signal waveform does not match the first signal waveform;
the alignment unit comprises:
the first dividing unit is used for dividing the sound input signal and the preset sound signal into a plurality of first intervals respectively;
a first determining subunit, configured to compare a frequency difference between a sound frequency of the sound input signal and a sound frequency of the preset sound signal in each first interval with a first preset value, and determine a first target interval in which the frequency difference is smaller than the first preset value;
a second determining subunit, configured to determine a first number of the first target intervals in the plurality of first intervals;
a third determining subunit, configured to determine that the second signal waveform does not match the first signal waveform if a first ratio of the first number to a total number of the plurality of first intervals is smaller than a first preset ratio;
alternatively, the first and second electrodes may be,
the alignment unit comprises:
the second dividing subunit is used for dividing the sound input signal and the preset sound signal into a plurality of second intervals respectively;
the comparison subunit is configured to compare a second ratio between the sound intensity of the sound input signal and the sound intensity of the preset sound signal in each second interval with a second preset ratio, so as to obtain a ratio difference between the second ratio and the second preset ratio;
a fourth determining subunit, configured to determine a second target interval, in the plurality of second intervals, where the proportional difference is smaller than a second preset value;
a fifth determining subunit, configured to determine that the second signal waveform does not match the first signal waveform if a third ratio of the second number of the second target intervals to the total number of the plurality of second intervals is smaller than a third preset ratio.
6. The terminal device according to claim 5, further comprising:
and the display module is used for displaying a state icon in a preset area of a display interface of the terminal equipment if the connected state of the earphone is monitored, wherein the state icon is used for representing the use state information of the earphone and the sound device on the terminal equipment.
7. The terminal device of claim 6, wherein the status icon comprises: the earphone microphone usage state information display device comprises a first icon representing earphone microphone usage state information, a second icon representing earphone receiver usage state information, a third icon representing terminal microphone usage state information and a fourth icon representing terminal loudspeaker usage state information.
8. The terminal device of claim 6, further comprising:
a receiving module for receiving a touch input on a target one of the status icons;
and the second control module is used for responding to the touch input and controlling the starting of the sound device corresponding to the target state icon.
9. A terminal device comprising a processor, a memory and a computer program stored on the memory and executable on the processor, the computer program, when executed by the processor, implementing the steps of the sound transmission control method according to any one of claims 1 to 4.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the sound transmission control method according to any one of claims 1 to 4.
CN201910339725.6A 2019-04-25 2019-04-25 Sound transmission control method and terminal equipment Active CN110248264B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910339725.6A CN110248264B (en) 2019-04-25 2019-04-25 Sound transmission control method and terminal equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910339725.6A CN110248264B (en) 2019-04-25 2019-04-25 Sound transmission control method and terminal equipment

Publications (2)

Publication Number Publication Date
CN110248264A CN110248264A (en) 2019-09-17
CN110248264B true CN110248264B (en) 2021-01-15

Family

ID=67883374

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910339725.6A Active CN110248264B (en) 2019-04-25 2019-04-25 Sound transmission control method and terminal equipment

Country Status (1)

Country Link
CN (1) CN110248264B (en)

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103581819A (en) * 2012-08-03 2014-02-12 致伸科技股份有限公司 Microphone detection method

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1199867B1 (en) * 2000-10-20 2012-09-19 Sony Deutschland GmbH Mobile terminal
US8311831B2 (en) * 2007-10-01 2012-11-13 Panasonic Corporation Voice emphasizing device and voice emphasizing method
KR101946486B1 (en) * 2012-08-23 2019-04-26 삼성전자 주식회사 Ear-phone Operation System and Ear-phone Operating Method, and Portable Device supporting the same
CN105959845B (en) * 2014-01-09 2019-03-01 北京奇虎科技有限公司 External equipment identification circuit, methods, devices and systems based on earphone socket
CN105677290B (en) * 2015-12-31 2019-09-13 广州华多网络科技有限公司 The control method and client of speech application
CN107707728A (en) * 2017-07-25 2018-02-16 努比亚技术有限公司 A kind of audio transmission switching method, terminal and computer-readable recording medium
CN107911777B (en) * 2017-11-15 2019-12-10 维沃移动通信有限公司 Processing method and device for return-to-ear function and mobile terminal
CN107995372B (en) * 2017-12-25 2020-04-07 维沃移动通信有限公司 False touch grounding identification processing method and circuit and mobile terminal

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103581819A (en) * 2012-08-03 2014-02-12 致伸科技股份有限公司 Microphone detection method

Also Published As

Publication number Publication date
CN110248264A (en) 2019-09-17

Similar Documents

Publication Publication Date Title
WO2019196707A1 (en) Mobile terminal control method and mobile terminal
US11635939B2 (en) Prompting method and mobile terminal
CN111459456B (en) Audio control method and electronic equipment
CN108279948B (en) Application program starting method and mobile terminal
CN111083755B (en) Equipment switching method and related equipment
CN108319442B (en) Audio playing control method and mobile terminal
CN110266323B (en) Signal control circuit, terminal equipment and signal control method
CN110753389A (en) Network control method and electronic equipment
CN110399000B (en) Mobile terminal and temperature control method thereof
CN110891217B (en) Earphone, earphone control method and electronic equipment
CN109889757B (en) Video call method and terminal equipment
US20230037238A1 (en) Audio output mode switching method and electronic device
CN108494443B (en) Signal transmission method and device
CN111093137B (en) Volume control method, volume control equipment and computer readable storage medium
US20220174146A1 (en) Incoming call processing method and electronic device
CN109788114B (en) Call processing method and terminal
CN109005297B (en) Display method of navigation application and mobile terminal
CN109782970B (en) Display method and terminal
WO2021197311A1 (en) Volume adjustment display method and electronic apparatus
CN108307075B (en) Incoming call processing method and mobile terminal
CN111352566B (en) Parameter adjusting method and electronic equipment
CN109309741B (en) Terminal and control method thereof
CN108900942B (en) Play control method and electronic equipment
CN108804071B (en) Receiver driving method and mobile terminal
CN107769324B (en) Charging method, charger, mobile terminal and server

Legal Events

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