WO2018120487A1 - Call mode switching method and terminal - Google Patents

Call mode switching method and terminal Download PDF

Info

Publication number
WO2018120487A1
WO2018120487A1 PCT/CN2017/079341 CN2017079341W WO2018120487A1 WO 2018120487 A1 WO2018120487 A1 WO 2018120487A1 CN 2017079341 W CN2017079341 W CN 2017079341W WO 2018120487 A1 WO2018120487 A1 WO 2018120487A1
Authority
WO
WIPO (PCT)
Prior art keywords
terminal
audio data
data
microphone
valid
Prior art date
Application number
PCT/CN2017/079341
Other languages
French (fr)
Chinese (zh)
Inventor
杨芬
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Priority to CN201780004769.2A priority Critical patent/CN108432220B/en
Publication of WO2018120487A1 publication Critical patent/WO2018120487A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/72Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
    • H04M1/725Cordless telephones

Definitions

  • the embodiments of the present invention relate to communication technologies, and in particular, to a method and a terminal for switching a call mode.
  • the handset's own handset/microphone mode that is, the user directly uses the handset's own handset and microphone to make a call
  • the headset mode that is, the user uses peripheral headphones (wireless or wired headset) ) Make a call.
  • the mobile phone When the mobile phone is connected to the peripheral headset, if the user wants to use the handset's own handset and microphone to make a call, the user needs to manually disconnect the mobile phone from the peripheral headset, such as unplugging the wired headset from the mobile phone or disconnecting the mobile phone. The connection with the wireless headset; thus causing inconvenience to the user.
  • the mobile phone when the mobile phone is connected to the peripheral earphone, if the mobile phone receives an incoming call, the user may not know or forget that the current mobile phone is connected to the earphone, and the user directly picks up the mobile phone to answer the call without disconnecting the earphone from the mobile phone. , which makes it impossible to hear the other party's voice.
  • the embodiment of the invention provides a method and a terminal for switching a call mode, so as to implement an automatic switching call mode and improve the convenience of using the terminal.
  • an embodiment of the present invention provides a method for switching a call mode, including: a first terminal connected to a peripheral earphone establishes a call connection with a remote device; and the first terminal passes a microphone of the peripheral earphone Acquiring a first sound signal, and converting the collected first sound signal into first audio data; then the first terminal determines whether the first audio data is valid data; if it is non-effective data, The first terminal switches to acquire the second sound signal through the microphone of the first terminal, that is, switches to the earpiece/microphone mode of the first terminal itself; if it is valid data, the first terminal maintains the earphone mode. Thereby, the first terminal can automatically switch the call mode according to the sound signal collected by the earphone.
  • the first The terminal converts the collected second sound signal into second audio data, and then determines whether the second audio data is valid data; if it is valid data, maintains the earpiece/microphone mode of the first terminal itself; If the data is non-valid, the first terminal compares the first audio data with the second audio data; if the voice quality of the first audio data is higher than the voice quality of the second audio data, The first terminal switches to collect a sound signal through a microphone of the peripheral earphone. Otherwise, the handset/microphone mode of the first terminal itself is continuously maintained, that is, the external sound of the first terminal itself is continuously collected. In order to avoid misjudgment, the first terminal may further determine whether the second sound signal is valid.
  • the first terminal may determine whether the first audio data or the second audio data is valid data by any of the following methods:
  • the first terminal compares the audio data with the experience data. If it is determined that the audio data is a voice sent by a person, the first terminal determines that the audio data is valid data, and if the audio data is determined a background sound or an ambient sound, the first terminal determining that the audio data is non-valid data;
  • the first terminal identifies the specific content of the audio data, and if the content of the audio data is the statement that the user frequently says during the call, the first terminal determines that the audio data is valid data. If the content of the audio data cannot be recognized, the first terminal determines that the audio data is non-valid data;
  • Manner 3 The first terminal acquires a voice similarity between the audio data and the experience data. If the voice similarity is greater than a preset threshold, the first terminal determines that the audio data is valid data, if If the speech similarity is less than or equal to the preset threshold, the first terminal determines that the audio data is non-valid data.
  • the method further includes: the first terminal performs a text or graphic prompt through a display screen of the first terminal, or the first terminal passes the speaker of the first terminal or the peripheral earphone A voice prompt is made to indicate whether the current call uses the peripheral headset or the call mode has been switched. Thereby, the user can know the current call mode in time.
  • the method further includes: when the first terminal collects a sound signal through a microphone of the peripheral earphone, the first terminal plays a sound received from the remote device through an earpiece of the peripheral earphone When the first terminal collects a sound signal through the microphone of the first terminal, the first terminal plays the sound received from the remote device through the earpiece of the first terminal.
  • the first terminal is a calling terminal or a called terminal.
  • the peripheral earphone is a wireless earphone or a wired earphone.
  • an embodiment of the present invention provides a device for switching a call mode, where the device has the first The function of each method of the aspect.
  • the functions may be implemented by hardware or by corresponding software implemented by hardware.
  • the hardware or software includes one or more modules corresponding to the functions described above.
  • an embodiment of the present invention provides a terminal, including: a processor, a memory, an audio circuit, an earpiece, a microphone, and the like; a memory for storing data; an audio circuit for collecting and processing a sound signal; and a display screen for displaying each Information; a processor for performing the method described in each of the methods of the first aspect above.
  • the embodiment of the present invention further provides a computer storage medium for storing computer software instructions for use in a terminal in any of the above aspects, comprising a method or a program for performing the above aspects.
  • the embodiment of the invention further provides a data processing system, comprising a module for executing the methods provided by the above first aspect.
  • the embodiment of the invention further provides a computer program for performing the methods provided by the first aspect above.
  • the embodiment of the invention can solve the problem that the user's mobile phone and the peripheral earphone are connected, but when the user does not know the current connection state during the call and uses the handset and the microphone of the mobile phone to make a call, the user cannot hear the other party's voice and thinks that it is a single pass and hangs up.
  • the problem when the user does not know the current connection state during the call and uses the handset and the microphone of the mobile phone to make a call, the user cannot hear the other party's voice and thinks that it is a single pass and hangs up.
  • FIG. 1 is a block diagram showing a part of a structure of a terminal according to an embodiment of the present invention
  • FIG. 2 is a schematic diagram of a method for switching a call mode according to an embodiment of the present invention
  • FIG. 3 is still another method for switching a call mode according to an embodiment of the present invention.
  • FIG. 4 is still another method for switching a call mode according to an embodiment of the present invention.
  • the method provided by the embodiments of the present invention is applied to a mobile terminal.
  • the mobile terminal can be, for example, a mobile phone, a tablet personal computer, a laptop computer, a digital camera, a personal digital assistant (PDA), a navigation device, and a mobile internet device (Mobile). Internet Device, MID) or Wearable Device.
  • PDA personal digital assistant
  • Mobile mobile internet device
  • MID mobile internet device
  • FIG. 1 is a block diagram showing a partial structure of a terminal according to an embodiment of the present invention.
  • the mobile phone 100 includes: a radio frequency (RF) circuit 110 , a power source 120 , a processor 130 , a memory 140 , an input unit 150 , a display unit 160 , a sensor 170 , and an audio circuit 180 .
  • RF radio frequency
  • a component such as a wireless fidelity (WiFi) module 190.
  • WiFi wireless fidelity
  • the components of the mobile phone 100 will be specifically described below with reference to FIG. 1 :
  • the RF circuit 110 can be used for transmitting and receiving information or during a call, and receiving and transmitting the signal. Specifically, after receiving the downlink information of the base station, the processor 130 processes the data. In addition, the uplink data is designed to be sent to the base station.
  • RF circuits include, but are not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a Low Noise Amplifier (LNA), a duplexer, and the like.
  • LNA Low Noise Amplifier
  • RF circuitry 110 can also communicate with the network and other devices via wireless communication.
  • the wireless communication may use any communication standard or protocol, including but not limited to Global System of Mobile communication (GSM), General Packet Radio Service (GPRS), Code Division Multiple Access (Code). Division Multiple Access (CDMA), Wideband Code Division Multiple Access (WCDMA), Long Term Evolution (LTE), E-mail, Short Messaging Service (SMS), etc.
  • GSM Global System of Mobile communication
  • GPRS General Packet
  • the memory 140 can be used to store software programs and modules, and the processor 130 executes various functional applications and data processing of the mobile phone 100 by running software programs and modules stored in the memory 140.
  • the memory 140 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application required for at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may be stored. Data created according to the use of the mobile phone 100 (such as audio data, phone book, etc.).
  • memory 140 can include high speed random access memory, and can 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 memory 140 is configured to store the audio data sent by the audio circuit 180; and after receiving the instruction that the processor 130 retrieves the data, send the corresponding data to the processor 130.
  • the input unit 150 can be configured to receive input numeric or character information and to generate key signal inputs related to user settings and function control of the handset 100.
  • the input unit 150 may include a touch panel 151 and other input devices 152.
  • the touch panel 151 also referred to as a touch screen, can collect touch operations on or near the user (such as the user using a finger, a stylus, or the like, any suitable object or accessory on the touch panel 151 or attached to the touch panel 151. Near operation), and drive the corresponding connecting device according to a preset program.
  • the touch panel 151 may include two parts: a touch detection device and a touch controller.
  • the touch detection device detects the touch orientation of the user, and detects a signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts the touch information into contact coordinates, and sends the touch information.
  • the processor 130 is provided and can receive commands from the processor 130 and execute them.
  • the touch panel 151 can be implemented in various types such as resistive, capacitive, infrared, and surface acoustic waves.
  • the input unit 150 may also include other input devices 152.
  • other input devices 152 may include, but are not limited to, one or more of a physical keyboard, function keys (such as volume control buttons, switch buttons, etc.), trackballs, mice, joysticks, and the like.
  • the other input device 152 when the mobile phone is connected to the peripheral earphone, the other input device 152 may be a peripheral earphone.
  • a peripheral headset can include some physical or virtual keys for controlling volume or controlling calls. These keys can be used to input information or commands to the phone through the peripheral headphones.
  • the user can make or receive a call through the input unit 150.
  • the display unit 160 can be used to display information input by the user or information provided to the user and various menus of the mobile phone 100.
  • the display unit 160 may include a display panel 161.
  • the display panel 161 may be configured in the form of an LCD, an OLED, or the like.
  • the touch panel 151 can cover the display panel 161. When the touch panel 151 detects a touch operation on or near the touch panel 151, the touch panel 151 transmits to the processor 130 to determine the type of the touch event, and then the processor 130 according to the touch event. The type provides a corresponding visual output on display panel 161.
  • the touch panel 151 and the display panel 161 are two independent components to implement the input and output functions of the mobile phone 100 in FIG.
  • the touch panel 151 may be integrated with the display panel 161.
  • the input and output functions of the mobile phone 100 are implemented.
  • the display unit 160 is configured to perform display after receiving the prompt information related to the current call mode sent by the processor 130 and/or the prompt information related to the call mode after the handover.
  • the handset 100 can also include at least one type of sensor 170, such as a light sensor, motion sensor, and other sensors.
  • the light sensor may include an ambient light sensor and a proximity sensor, wherein the ambient light sensor may adjust the brightness of the display panel 161 according to the brightness of the ambient light, and the proximity sensor may close the display panel 161 when the mobile phone 100 moves to the ear. / or backlight.
  • the accelerometer sensor can detect the magnitude of acceleration in all directions (usually three axes). When it is stationary, it can detect the magnitude and direction of gravity. It can be used to identify the gesture of the mobile phone (such as horizontal and vertical screen switching, related Game, magnetometer attitude calibration), vibration recognition related functions (such as pedometer, tapping).
  • the mobile phone 100 can also be configured with other sensors such as a gyroscope, a barometer, a hygrometer, a thermometer, an infrared sensor, and the like, and will not be described herein.
  • the audio circuit 180, the earpiece 181, and the microphone 182 can provide an audio interface between the user and the handset 100. Tone The frequency circuit 180 can transmit the converted electrical data of the received audio data to the earpiece 181 for conversion to the sound signal output by the earpiece 181; on the other hand, the microphone 182 converts the collected sound signal into an electrical signal, by the audio circuit 180. After receiving, it is converted into audio data, and then the audio data is output to the RF circuit 110 for transmission to, for example, another mobile phone, or the audio data is output to the memory 140 for further processing, or the audio data is directly processed by the processor 130.
  • the audio circuit 180 is configured to receive and process (data convert) the sound signal after receiving the instruction sent by the processor 130 to start receiving and processing the sound signal; for using the peripheral earphone and/or the mobile phone
  • the own microphone 182 receives the sound signal in real time and converts the received sound signal into audio data; it is also used to transmit the audio data to the processor 130 and/or to the memory for further processing.
  • the microphone of the peripheral earphone can work instead of the microphone 182, and the earpiece of the peripheral earphone can work instead of the earpiece 181.
  • WiFi is a short-range wireless transmission technology
  • the mobile phone 100 can help users to send and receive emails, browse web pages, and access streaming media through the WiFi module 190, which provides wireless broadband Internet access for users.
  • FIG. 1 shows the WiFi module 190, it can be understood that it does not belong to the essential configuration of the mobile phone 100, and may be omitted as needed within the scope of not changing the essence of the invention.
  • the processor 130 is the control center of the handset 100, which connects various portions of the entire handset using various interfaces and lines, by running or executing software programs and/or modules stored in the memory 140, and recalling data stored in the memory 140, The various functions and processing data of the mobile phone 100 are executed, thereby realizing various services based on the mobile phone.
  • the processor 130 may include one or more processing units; preferably, the processor 130 may integrate an application processor and a modem processor, where the application processor mainly processes an operating system, a user interface, an application, and the like.
  • the modem processor primarily handles wireless communications. It can be understood that the above modem processor may not be integrated into the processor 130.
  • the processor 130 is configured to: when the mobile phone is connected to the peripheral earphone, after the mobile phone establishes a call connection with the remote device, the first sound signal is collected by the microphone of the peripheral earphone; the audio circuit 180 The processor 130 is further configured to determine whether the first audio data is valid data; if the first audio data is non-effective data, Switching to start collecting the second sound signal through the microphone 182 of the mobile phone, that is, switching the call mode to the handset's own handset/microphone mode.
  • the audio circuit 180 is further configured to convert the collected second sound signal into second audio data.
  • the processor 130 is further configured to determine whether the second audio data is valid data; if the second audio data is non-valid data, compare The first audio data and the second audio data; if the voice quality of the first audio data is higher than the voice quality of the second audio data, switching to collecting a sound signal through a microphone of the peripheral earphone , that is, switch the call mode to the headset mode.
  • the processor 130 is further configured to: after determining the current call mode, send the prompt information related to the current call mode to the display unit 160, the handset 181 of the mobile phone itself, or the handset of the peripheral headset); And after the call mode is switched, the prompt information related to the switched call mode is sent to the display unit 160, the handset 181 of the mobile phone itself, or the handset of the peripheral headset.
  • the mobile phone 100 also includes a power source 120 (such as a battery) that supplies power to various components.
  • a power source 120 such as a battery
  • the power source can be logically coupled to the processor 130 through a power management system to manage functions such as charging, discharging, and power consumption through the power management system.
  • the mobile phone 100 may further include a camera, a Bluetooth module, and the like, and details are not described herein.
  • FIG. 2 is a schematic diagram of a method for switching a call mode according to an embodiment of the present invention. As shown in Figure 2, the method includes:
  • Step 201 The first terminal connected to the peripheral earphone establishes a call connection with the remote device.
  • the first terminal in this embodiment is connected with a peripheral earphone, and the peripheral earphone may be a wired earphone or a wireless earphone.
  • the peripheral earphone is a wired earphone
  • the earphone can be wiredly connected to the first terminal through a headphone jack on the first terminal.
  • the peripheral earphone is a wireless earphone
  • the earphone can be wirelessly connected to the first terminal through a wireless technology such as Bluetooth or Wi-Fi.
  • the remote device in the embodiments of the present invention refers to a terminal that can establish a call connection with the first terminal.
  • the first terminal establishes a call connection with the remote device, where the first terminal may be the calling terminal or the called terminal.
  • Step 202 After the first terminal establishes a call connection with the remote device, the first terminal collects the first sound signal through the microphone of the peripheral earphone.
  • the peripheral headset includes a microphone and an earpiece.
  • the microphone can be used to collect sounds emitted by the user or ambient sounds, and transmit the collected sounds to the first terminal.
  • the handset can play the sound signal generated by the first terminal or the sound signal received by the first terminal from the remote device to the user.
  • the first terminal collects the user's voice, that is, the first sound signal, through the microphone of the peripheral earphone. It should be noted that, before the first terminal establishes a call connection with the remote device, the first terminal may also collect sound through the microphone of the peripheral headset. For example: at the first When the terminal calls the remote device as the calling terminal, and the call connection is not established, the microphone of the peripheral earphone can be used for collecting sound. At this time, if the voice of the user terminates the call, the first terminal can terminate the call. When the first terminal receives the call of the remote device as the called terminal, and the call connection is not established, the microphone of the peripheral earphone can also be used for collecting sound.
  • the first terminal can hang up the incoming call. If the user receives the voice of the incoming call, the first terminal can answer the incoming call.
  • the microphone of the peripheral earphone can also be used to collect the voice of the user. For example, the user can perform voice control on the first terminal through the microphone of the peripheral earphone.
  • the first terminal is controlled by voice to open an application or perform a certain function. That is to say, after detecting that the first terminal has established a connection with the peripheral earphone, the sound can be collected through the microphone of the peripheral earphone.
  • the first terminal can also collect sound through the microphone of the peripheral earphone only after establishing a call connection with the remote device.
  • the first terminal when the first terminal collects a sound signal through the microphone of the peripheral earphone, the first terminal can play the sound received from the remote device through the earpiece of the peripheral earphone.
  • Step 203 The first terminal converts the collected first sound signal into first audio data.
  • the first terminal collects the first sound signal through the microphone of the peripheral earphone to obtain the first audio data, and the first audio data may be an analog signal or a digital signal after the analog-to-digital conversion.
  • Step 204 The first terminal determines whether the first audio data is valid data. If it is determined that the first audio data is invalid data, that is, invalid data, step 205 is performed, if it is determined that the first audio data is valid. Data, the first terminal continues to use the peripheral earphone to make a call, that is, the first terminal uses the headset mode to make a call, uses the microphone of the peripheral earphone to collect the external sound, and uses the earphone of the peripheral earphone to play the sound.
  • the first terminal may determine whether the audio data is valid data by any of the following manners.
  • Manner 1 The first terminal compares the audio data with the empirical data. If the audio data is determined to be valid by the comparison, if the audio data is determined to be valid data, the audio data is determined to be the background sound. Or ambient sound, then the audio data is determined to be non-valid data.
  • the first terminal identifies the specific content of the audio data, and if the content of the audio data is the statement that the user frequently says during the call, determining that the first audio data is valid data, and if the audio data cannot be recognized The content determines that the audio data is not valid data.
  • Manner 3 The first terminal acquires a voice similarity between the audio data and the experience data. If the voice similarity is greater than a preset threshold, determining that the audio data is valid data, if the voice similarity is less than or equal to the The preset threshold determines that the audio data is inactive data.
  • Step 205 The first terminal switches to collect a second sound signal by using a microphone of the first terminal.
  • the sound collected by the microphone of the peripheral earphone is an invalid sound, it means that the user may not currently use the earphone to make a call, but the first terminal is held and the first terminal's own microphone and earpiece are used. Therefore, the first terminal switches the headset mode to the normal mode, that is, switches to a mode in which the microphone of the first terminal itself and the handset are used for talking, and the external sound signal, that is, the second sound signal, is collected by the microphone of the first terminal itself. .
  • the first terminal when the first terminal collects a sound signal through its own microphone, the first terminal can play the sound received from the remote device through its own earpiece.
  • step 205 the method may further include step 206.
  • Step 206 The first terminal converts the collected second sound signal into second audio data.
  • the process of converting a sound signal into audio data can be seen in step 203.
  • Step 207 The first terminal determines whether the second audio data is valid data; if it is determined that the second audio data is non-valid data, step 208 is performed; if it is determined that the second audio data is valid data, executing Step 210.
  • a method of determining whether the audio data is valid data refer to the description in step 204.
  • Step 208 The first terminal compares the first audio data with the second audio data. If the voice quality of the first audio data is higher than the voice quality of the second audio data, step 209 is performed, if the first audio is used. The voice quality of the data is lower than the voice quality of the second audio data, and step 210 is performed.
  • Step 209 The first terminal switches to collect a sound signal through a microphone of the peripheral earphone.
  • the first terminal needs to be switched again.
  • the external sound is collected through the microphone of the peripheral headset. It may be because the quality of the current call is not high, which leads to the misjudgment in step 204.
  • Step 210 The first terminal continues to use its own microphone and the handset to make a call, that is, the first terminal continues to use its own microphone to collect external sound, and uses its own earpiece to play the sound.
  • the quality of the sound signal collected by the microphone of the first terminal itself is higher than the quality of the sound signal collected by the microphone of the peripheral earphone, it indicates that the current user is not using the peripheral earphone. It may be because the quality of the current call is not high, which leads to the misjudgment in step 207.
  • the method embodiment may further include: the first terminal may prompt the user which call mode is currently in use. For example, when the first terminal detects that it is connected to the peripheral headset, the user may be prompted to be in the headset mode; when the first terminal switches from the headset mode to the normal mode, the user may be prompted to be in the normal mode or prompt the user. The mode has been switched; when the first terminal switches from the normal mode back to the headset mode, the user may be prompted again to the current mode or the user mode is prompted to be switched.
  • the first terminal can make a text or graphic prompt through its own display screen, or make a voice prompt through the speaker or peripheral earphone of the first terminal.
  • the terminal connected to the peripheral device after establishing a call connection with the remote device, the terminal connected to the peripheral device first uses the peripheral earphone to make a call, and determines whether the sound collected by the microphone of the peripheral earphone is valid. If it is invalid, it will automatically switch to using the terminal's own microphone and handset to make a call, that is, automatically switch the call mode. After the handover, if it is judged that the sound quality collected by the terminal's own microphone is lower than the sound quality collected by the microphone of the peripheral earphone, the terminal automatically switches back to the headset call mode, that is, switches back to use the peripheral earphone for the call. Therefore, the embodiment of the present invention can automatically switch the call mode and improve the convenience of the terminal. Moreover, the embodiment of the present invention can prompt the current call mode and the mode switching information to the user, so that the user can know the behavior of the terminal automatically switching the call mode.
  • the method may include the following steps:
  • step 301 the mobile phone starts to make a call.
  • the user triggers the operation of answering the call; or the mobile phone acts as the calling party, and the user makes a call through the mobile phone.
  • the processor of the mobile phone can receive an answering instruction or a dialing instruction input by the user through the input unit of the mobile phone.
  • Step 302 The mobile phone determines whether it is connected to the peripheral earphone, including determining whether the earphone jack is occupied by the wired earphone (ie, determining whether the mobile phone and the wired earphone are connected) and/or determining whether the wireless earphone such as the mobile phone and the Bluetooth earphone is in If the mobile phone and the peripheral earphone are in a connected state, the process proceeds to step 303.
  • the embodiment of the present invention does not limit the execution order of step 302, or may not include step 302.
  • the mobile phone can know that the connection with the peripheral earphone is established.
  • the mobile phone can select the headset mode, that is, after step 301, the mobile phone can enter the step. 303.
  • Step 303 The mobile phone collects an external sound through a microphone of the peripheral earphone.
  • Step 304 The mobile phone converts the collected sound signal into first audio data, and may store the first audio data.
  • the audio circuit of the mobile phone receives and processes the sound signal collected by the peripheral earphone, and sends the processed first audio data to the processor and/or the memory of the mobile phone, which may be sent in real time or preset by system. A certain period of transmission (for example, every 10ms).
  • Step 305 The mobile phone determines whether the first audio data in the preset time period is valid data; if it is valid data, step 306 is performed, and if it is invalid data, step 307 is performed.
  • the first audio data in the preset time period may be: the first audio data converted by the sound collected by the peripheral earphones in the preset time period.
  • the processor or audio circuitry of the handset determines whether the first audio data is valid data.
  • the audio circuit can transmit the determination result to the processor.
  • the preset time period may be the first time period of the call establishment, for example, the first one second, two seconds, three seconds, or five seconds after the call is established, and the length of the specific time is not limited.
  • the mobile phone determines whether the audio data is valid data by any one or several of the following methods:
  • Method 1 Compare the recognition result with the empirical data (which can be a database of experts, a smart library, an experience database, etc., which stores a large number of vocals), and determine whether the audio data is vocal (effective data) or background sound or Ambient sound (invalid data); the identification may be speech recognition or semantic recognition, or other algorithms for audio data, as long as the audio data can be compared with empirical data.
  • empirical data which can be a database of experts, a smart library, an experience database, etc., which stores a large number of vocals
  • the identification may be speech recognition or semantic recognition, or other algorithms for audio data, as long as the audio data can be compared with empirical data.
  • Method 2 Identify the specific content of the audio data, and judge whether it is valid data according to the specific content. For example, if the content of the recognized audio data is “Hello”, “Who are you”, “Hey”, “Speak”, “No Sound”, “I am Tom”, etc.
  • the language is not limited, it can be Chinese, English, Russian, Japanese and other voice input, it is judged as valid data; or as long as the specific content can be identified, it can be judged as valid data; if it is not recognized, it is judged as invalid data.
  • Manner 3 By comparing the recognition result with the empirical data to obtain the similarity degree of the speech, determining whether the speech similarity exceeds a preset speech similarity threshold, and if the threshold is exceeded, determining that the data is valid, and if the threshold is not exceeded, the determination is invalid. data.
  • Step 306 The mobile phone keeps the current call mode as the headset mode.
  • Step 307 The mobile phone switches the call mode to the handset/microphone mode of the mobile phone itself, that is, the mobile phone uses its own handset and microphone to make a call. At the time of switching or after switching, the mobile phone can prompt the user that the call mode has been switched.
  • Step 308 The mobile phone adopts the handset/microphone mode of the mobile phone itself, that is, the mobile phone uses its own earpiece and microphone to make a call.
  • the mobile phone When the user's mobile phone is connected to the peripheral headset, but the user does not know the current connection status while using the mobile phone to make a call without using the headset, the mobile phone will automatically determine which call mode to use according to the actual situation to prevent misconnection. Turn off the phone. And, the phone can automatically switch the call through the phone's own audio circuit and processor. The mode eliminates the user's manual steps and solves the problem of accidentally hanging up the phone without adding additional hardware.
  • the embodiment may further determine the final call mode and perform automatic switching by comparing the sounds collected by the handset's own handset/microphone mode and the headset mode on the basis of the foregoing method embodiments. Specifically, as shown in FIG. 4, on the basis of the embodiment shown in FIG. 3, it is assumed that the mobile phone has performed step 307, that is, the mobile phone has switched to the handset's own handset/microphone mode, and thereafter, as shown in FIG. 4, may also include The following steps:
  • Step 401 The mobile phone starts to collect the sound signal by using its own microphone.
  • the processor of the mobile phone notifies the handset's own microphone to start collecting external sound, and notifies the audio circuit to start receiving and processing the sound signal collected by the microphone.
  • Step 402 The mobile phone converts the sound signal collected in step 401 into second audio data.
  • Step 403 The mobile phone determines whether the second audio data in the preset time period is valid data; if it is valid data, step 404 is performed, and if it is invalid data, step 405 is performed.
  • the preset time period may be a period of time after the call mode is switched, for example, to switch to the first one second, two seconds, three seconds, or five seconds after the voice is collected by the mobile phone's own microphone, and the length of the specific time is not limited.
  • the length of the preset time period may be the same as or different from that in step 305.
  • For the method for determining whether the second audio data is valid data by the mobile phone refer to the foregoing method for determining whether the first audio data is valid data.
  • Step 404 The mobile phone keeps the current call mode as its own handset/microphone mode.
  • Step 405 The mobile phone acquires the first audio data in the headset mode and the second audio data in the handset's own handset/microphone mode; specifically, the following two methods are available:
  • Manner 1 The mobile phone acquires the second audio data currently processed, and acquires the first audio data in the previously stored headset mode from the memory of the mobile phone;
  • Manner 2 The mobile phone acquires the first audio data and the second audio data from a memory, wherein the second audio data is stored in the memory of the mobile phone by the mobile phone in step 402.
  • Step 406 The mobile phone compares the voice quality of the first audio data and the second audio data. For example, whether the voice quality of the first audio data is higher than the first is determined by comparing key factors such as volume, resolution, and the like of the voice.
  • the voice quality of the second audio data if not, proceed to step 404, and if so, when the handset itself receives the microphone
  • the process proceeds to step 407.
  • Step 407 The mobile phone switches the call mode to the headset mode.
  • the embodiment can determine the final call mode and automatically switch by comparing the audio data collected and processed by the handset's own handset/microphone mode and the headset mode, to avoid false switching caused by the background sound being too noisy or the signal being too poor.
  • the mobile phone After the call mode is switched by the method provided by the embodiment of the present invention, the mobile phone provides a text or voice prompt to prompt the user that the mobile phone call mode has been switched, so that the user can find that the system automatically switches the call mode, so that the user can understand whether the use is improper or not. sound.
  • the storage medium may be a magnetic disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM).

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Telephone Function (AREA)

Abstract

Provided in an embodiment of the present invention are a method and a terminal for switching call modes. The method comprises: establishing a call connection between a first terminal connected having a peripheral headset and a remote device; the first terminal collecting a first sound signal by means of a microphone of the peripheral headset; the first terminal converting the collected first sound signal to first audio data; the first terminal determining whether the first audio data is valid data; if the first audio data is invalid data, the first terminal switching to collecting a second sound signal by means of a microphone of the first terminal. Thus, the terminal may automatically determine which call mode is to be used according to actual situations, preventing the call from being cut off by mistake while also eliminating manual operation steps for a user.

Description

一种切换通话模式的方法和终端Method and terminal for switching call mode
本申请要求于2016年12月29日提交中国专利局、国际申请号为PCT/CN2016/113177、发明名称为“一种网络通信方法和终端”的国际专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims priority to the International Patent Application No. PCT/CN2016/113177, entitled "A Network Communication Method and Terminal" on December 29, 2016, the entire contents of which are hereby incorporated by reference. Combined in this application.
技术领域Technical field
本发明实施例涉及通信技术,尤其涉及一种切换通话模式的方法和终端。The embodiments of the present invention relate to communication technologies, and in particular, to a method and a terminal for switching a call mode.
背景技术Background technique
用户使用手机接听电话,一般有两种模式:1、手机自身听筒/麦克风模式,即用户直接使用手机自身的听筒和麦克风进行通话;2、耳机模式,即用户使用外设耳机(无线或有线耳机)进行通话。When a user answers a call using a mobile phone, there are generally two modes: 1. The handset's own handset/microphone mode, that is, the user directly uses the handset's own handset and microphone to make a call; 2. The headset mode, that is, the user uses peripheral headphones (wireless or wired headset) ) Make a call.
当手机与外设耳机处于连接状态时,如果用户想使用手机自身的听筒和麦克风进行通话,则用户需要手动断开手机与外设耳机的连接,例如从手机上拔掉有线耳机或者断开手机与无线耳机之间的连接;由此为用户带来不便。并且,当手机与外设耳机处于连接状态时,如果手机收到来电,用户可能不知道或者忘记当前手机与耳机处于连接状态,由此用户会直接拿起手机接听而不断开耳机与手机的连接,从而导致无法听到对方的声音。When the mobile phone is connected to the peripheral headset, if the user wants to use the handset's own handset and microphone to make a call, the user needs to manually disconnect the mobile phone from the peripheral headset, such as unplugging the wired headset from the mobile phone or disconnecting the mobile phone. The connection with the wireless headset; thus causing inconvenience to the user. Moreover, when the mobile phone is connected to the peripheral earphone, if the mobile phone receives an incoming call, the user may not know or forget that the current mobile phone is connected to the earphone, and the user directly picks up the mobile phone to answer the call without disconnecting the earphone from the mobile phone. , which makes it impossible to hear the other party's voice.
发明内容Summary of the invention
本发明实施例提供了一种切换通话模式的方法和终端,以实现自动切换通话模式,提高终端使用的便利性。The embodiment of the invention provides a method and a terminal for switching a call mode, so as to implement an automatic switching call mode and improve the convenience of using the terminal.
第一方面,本发明实施例提供了一种切换通话模式的方法,包括:连接有外设耳机的第一终端与远端设备建立通话连接;所述第一终端通过所述外设耳机的麦克风采集第一声音信号,并将采集到的所述第一声音信号转换为第一音频数据;然后所述第一终端判断所述第一音频数据是否为有效数据;若为非有效数据,则所述第一终端切换为通过所述第一终端的麦克风采集第二声音信号,即切换为第一终端自身的听筒/麦克风模式;若为有效数据,则所述第一终端保持耳机模式。由此,第一终端可以根据耳机采集到的声音信号,自动切换通话模式。In a first aspect, an embodiment of the present invention provides a method for switching a call mode, including: a first terminal connected to a peripheral earphone establishes a call connection with a remote device; and the first terminal passes a microphone of the peripheral earphone Acquiring a first sound signal, and converting the collected first sound signal into first audio data; then the first terminal determines whether the first audio data is valid data; if it is non-effective data, The first terminal switches to acquire the second sound signal through the microphone of the first terminal, that is, switches to the earpiece/microphone mode of the first terminal itself; if it is valid data, the first terminal maintains the earphone mode. Thereby, the first terminal can automatically switch the call mode according to the sound signal collected by the earphone.
进一步的,在切换为通过所述第一终端的麦克风采集第二声音信号之后,所述第一 终端将采集到的所述第二声音信号转换为第二音频数据,然后判断所述第二音频数据是否为有效数据;若为有效数据,则保持所述第一终端自身的听筒/麦克风模式;若为非有效数据,则所述第一终端比较所述第一音频数据和所述第二音频数据;若所述第一音频数据的语音质量高于所述第二音频数据的语音质量,则所述第一终端切换为通过所述外设耳机的麦克风采集声音信号,否则,继续保持所述第一终端自身的听筒/麦克风模式,即继续使用第一终端自身的麦克风采集外部声音。为了避免误判,第一终端可以进一步判断第二声音信号是否有效。Further, after switching to acquiring the second sound signal by using the microphone of the first terminal, the first The terminal converts the collected second sound signal into second audio data, and then determines whether the second audio data is valid data; if it is valid data, maintains the earpiece/microphone mode of the first terminal itself; If the data is non-valid, the first terminal compares the first audio data with the second audio data; if the voice quality of the first audio data is higher than the voice quality of the second audio data, The first terminal switches to collect a sound signal through a microphone of the peripheral earphone. Otherwise, the handset/microphone mode of the first terminal itself is continuously maintained, that is, the external sound of the first terminal itself is continuously collected. In order to avoid misjudgment, the first terminal may further determine whether the second sound signal is valid.
具体的,所述第一终端可以通过以下任一方式判断第一音频数据或第二音频数据是否为有效数据:Specifically, the first terminal may determine whether the first audio data or the second audio data is valid data by any of the following methods:
方式一:所述第一终端将音频数据与经验数据进行比对,若确定所述音频数据为人发出的声音,则所述第一终端确定所述音频数据为有效数据,若确定所述音频数据为背景音或环境音,则所述第一终端确定所述音频数据为非有效数据;Manner 1: The first terminal compares the audio data with the experience data. If it is determined that the audio data is a voice sent by a person, the first terminal determines that the audio data is valid data, and if the audio data is determined a background sound or an ambient sound, the first terminal determining that the audio data is non-valid data;
方式二:所述第一终端识别所述音频数据的具体内容,若识别出所述音频数据的内容为通话时用户经常说的语句,则所述第一终端确定所述音频数据为有效数据,若无法识别出所述音频数据的内容,则所述第一终端确定所述音频数据为非有效数据;Manner 2: the first terminal identifies the specific content of the audio data, and if the content of the audio data is the statement that the user frequently says during the call, the first terminal determines that the audio data is valid data. If the content of the audio data cannot be recognized, the first terminal determines that the audio data is non-valid data;
方式三:所述第一终端获取所述音频数据与经验数据的语音类似度,若所述语音类似度大于预设阈值,则所述第一终端确定所述音频数据为有效数据,若所述语音类似度小于或等于所述预设阈值,则所述第一终端确定所述音频数据为非有效数据。Manner 3: The first terminal acquires a voice similarity between the audio data and the experience data. If the voice similarity is greater than a preset threshold, the first terminal determines that the audio data is valid data, if If the speech similarity is less than or equal to the preset threshold, the first terminal determines that the audio data is non-valid data.
可选的,该方法还包括:所述第一终端通过所述第一终端的显示屏进行文字或图形提示,或者,所述第一终端通过所述第一终端的扬声器或所述外设耳机进行语音提示,以提示当前的通话是否使用所述外设耳机或者提示通话模式已切换。从而使得用户可以及时获知当前的通话模式。Optionally, the method further includes: the first terminal performs a text or graphic prompt through a display screen of the first terminal, or the first terminal passes the speaker of the first terminal or the peripheral earphone A voice prompt is made to indicate whether the current call uses the peripheral headset or the call mode has been switched. Thereby, the user can know the current call mode in time.
进一步的,该方法还包括:当所述第一终端通过所述外设耳机的麦克风采集声音信号时,所述第一终端通过所述外设耳机的听筒播放从所述远端设备接收的声音;当所述第一终端通过所述第一终端的麦克风采集声音信号时,所述第一终端通过所述第一终端的听筒播放从所述远端设备接收的声音。Further, the method further includes: when the first terminal collects a sound signal through a microphone of the peripheral earphone, the first terminal plays a sound received from the remote device through an earpiece of the peripheral earphone When the first terminal collects a sound signal through the microphone of the first terminal, the first terminal plays the sound received from the remote device through the earpiece of the first terminal.
其中,所述第一终端为主叫终端或者被叫终端。所述外设耳机为无线耳机或有线耳机。The first terminal is a calling terminal or a called terminal. The peripheral earphone is a wireless earphone or a wired earphone.
第二方面,本发明实施例提供一种切换通话模式的装置,该装置具有实现上述第一 方面的各方法的功能。所述功能可以通过硬件实现,也可以通过硬件执行相应的软件实现。所述硬件或软件包括一个或多个与上述功能相对应的模块。In a second aspect, an embodiment of the present invention provides a device for switching a call mode, where the device has the first The function of each method of the aspect. The functions may be implemented by hardware or by corresponding software implemented by hardware. The hardware or software includes one or more modules corresponding to the functions described above.
第三方面,本发明实施例提供一种终端,包括:处理器、存储器、音频电路、听筒、麦克风等;存储器用于存储数据;音频电路用于采集和处理声音信号;显示屏用于显示各种信息;处理器用于执行上述第一方面各方法中所述的方法。In a third aspect, an embodiment of the present invention provides a terminal, including: a processor, a memory, an audio circuit, an earpiece, a microphone, and the like; a memory for storing data; an audio circuit for collecting and processing a sound signal; and a display screen for displaying each Information; a processor for performing the method described in each of the methods of the first aspect above.
本发明实施例还提供了一种计算机存储介质,用于储存为上述任一方面中终端所用的计算机软件指令,其包含用于执行上述各方面所设计的方法或程序。The embodiment of the present invention further provides a computer storage medium for storing computer software instructions for use in a terminal in any of the above aspects, comprising a method or a program for performing the above aspects.
本发明实施例还提供了一种数据处理系统,包括用于执行上述第一方面提供的各方法的模块。The embodiment of the invention further provides a data processing system, comprising a module for executing the methods provided by the above first aspect.
本发明实施例还提供了一种计算机程序,用于执行上述第一方面提供的各方法。The embodiment of the invention further provides a computer program for performing the methods provided by the first aspect above.
本发明实施例可以解决用户手机与外设耳机处于连接状态,但通话时用户不清楚当前连接状态而使用手机的听筒和麦克风进行通话时,导致的无法听到对方声音误以为是单通而挂机的问题。The embodiment of the invention can solve the problem that the user's mobile phone and the peripheral earphone are connected, but when the user does not know the current connection state during the call and uses the handset and the microphone of the mobile phone to make a call, the user cannot hear the other party's voice and thinks that it is a single pass and hangs up. The problem.
附图说明DRAWINGS
图1为本发明实施例提供的终端的部分结构框图;1 is a block diagram showing a part of a structure of a terminal according to an embodiment of the present invention;
图2为本发明实施例提供的一种切换通话模式的方法;FIG. 2 is a schematic diagram of a method for switching a call mode according to an embodiment of the present invention;
图3为本发明实施例提供的又一种切换通话模式的方法;FIG. 3 is still another method for switching a call mode according to an embodiment of the present invention;
图4为本发明实施例提供的又一种切换通话模式的方法。FIG. 4 is still another method for switching a call mode according to an embodiment of the present invention.
具体实施方式detailed description
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。The technical solutions in the embodiments of the present invention are clearly and completely described in the following with reference to the accompanying drawings in the embodiments of the present invention. It is obvious that the described embodiments are only a part of the embodiments of the present invention, but not all embodiments. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative efforts are within the scope of the present invention.
本发明各实施例提供的方法应用于移动终端。该移动终端例如可以为:移动电话、平板电脑(Tablet Personal Computer)、膝上型电脑(Laptop Computer)、数码相机、个人数字助理(personal digital assistant,简称PDA)、导航装置、移动上网装置(Mobile Internet Device,MID)或可穿戴式设备(Wearable Device)等。 The method provided by the embodiments of the present invention is applied to a mobile terminal. The mobile terminal can be, for example, a mobile phone, a tablet personal computer, a laptop computer, a digital camera, a personal digital assistant (PDA), a navigation device, and a mobile internet device (Mobile). Internet Device, MID) or Wearable Device.
图1为本发明实施例提供的终端的部分结构框图。以终端100为手机为例,参考图1,手机100包括:射频(Radio Frequency,RF)电路110、电源120、处理器130、存储器140、输入单元150、显示单元160、传感器170、音频电路180、以及无线保真(wireless fidelity,WiFi)模块190等部件。本领域技术人员可以理解,图1中示出的手机结构并不构成对手机的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。FIG. 1 is a block diagram showing a partial structure of a terminal according to an embodiment of the present invention. Taking the terminal 100 as a mobile phone as an example, referring to FIG. 1 , the mobile phone 100 includes: a radio frequency (RF) circuit 110 , a power source 120 , a processor 130 , a memory 140 , an input unit 150 , a display unit 160 , a sensor 170 , and an audio circuit 180 . And a component such as a wireless fidelity (WiFi) module 190. It will be understood by those skilled in the art that the structure of the handset shown in FIG. 1 does not constitute a limitation to the handset, and may include more or less components than those illustrated, or some components may be combined, or different components may be arranged.
下面结合图1对手机100的各个构成部件进行具体的介绍:The components of the mobile phone 100 will be specifically described below with reference to FIG. 1 :
RF电路110可用于收发信息或通话过程中,信号的接收和发送,特别地,将基站的下行信息接收后,给处理器130处理;另外,将设计上行的数据发送给基站。通常,RF电路包括但不限于天线、至少一个放大器、收发信机、耦合器、低噪声放大器(Low Noise Amplifier,LNA)、双工器等。此外,RF电路110还可以通过无线通信与网络和其他设备通信。所述无线通信可以使用任一通信标准或协议,包括但不限于全球移动通讯系统(Global System of Mobile communication,GSM)、通用分组无线服务(General Packet Radio Service,GPRS)、码分多址(Code Division Multiple Access,CDMA)、宽带码分多址(Wideband Code Division Multiple Access,WCDMA)、长期演进(Long Term Evolution,LTE)、电子邮件、短消息服务(Short Messaging Service,SMS)等。The RF circuit 110 can be used for transmitting and receiving information or during a call, and receiving and transmitting the signal. Specifically, after receiving the downlink information of the base station, the processor 130 processes the data. In addition, the uplink data is designed to be sent to the base station. Generally, RF circuits include, but are not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a Low Noise Amplifier (LNA), a duplexer, and the like. In addition, RF circuitry 110 can also communicate with the network and other devices via wireless communication. The wireless communication may use any communication standard or protocol, including but not limited to Global System of Mobile communication (GSM), General Packet Radio Service (GPRS), Code Division Multiple Access (Code). Division Multiple Access (CDMA), Wideband Code Division Multiple Access (WCDMA), Long Term Evolution (LTE), E-mail, Short Messaging Service (SMS), etc.
存储器140可用于存储软件程序以及模块,处理器130通过运行存储在存储器140的软件程序以及模块,从而执行手机100的各种功能应用以及数据处理。存储器140可主要包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需的应用程序(比如声音播放功能、图象播放功能等)等;存储数据区可存储根据手机100的使用所创建的数据(比如音频数据、电话本等)等。此外,存储器140可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件、闪存器件、或其他易失性固态存储器件。本发明实施例的一方面,存储器140用于存储音频电路180发送的音频数据;用于在接收到处理器130调取数据的指令后,将相应的数据发送给处理器130。The memory 140 can be used to store software programs and modules, and the processor 130 executes various functional applications and data processing of the mobile phone 100 by running software programs and modules stored in the memory 140. The memory 140 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application required for at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may be stored. Data created according to the use of the mobile phone 100 (such as audio data, phone book, etc.). Moreover, memory 140 can include high speed random access memory, and can also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device. In an aspect of the embodiment of the present invention, the memory 140 is configured to store the audio data sent by the audio circuit 180; and after receiving the instruction that the processor 130 retrieves the data, send the corresponding data to the processor 130.
输入单元150可用于接收输入的数字或字符信息,以及产生与手机100的用户设置以及功能控制有关的键信号输入。具体地,输入单元150可包括触控面板151以及其他输入设备152。触控面板151,也称为触摸屏,可收集用户在其上或附近的触摸操作(比如用户使用手指、触笔等任何适合的物体或附件在触控面板151上或在触控面板151附 近的操作),并根据预先设定的程式驱动相应的连接装置。可选的,触控面板151可包括触摸检测装置和触摸控制器两个部分。其中,触摸检测装置检测用户的触摸方位,并检测触摸操作带来的信号,将信号传送给触摸控制器;触摸控制器从触摸检测装置上接收触摸信息,并将它转换成触点坐标,再送给处理器130,并能接收处理器130发来的命令并加以执行。此外,可以采用电阻式、电容式、红外线以及表面声波等多种类型实现触控面板151。除了触控面板151,输入单元150还可以包括其他输入设备152。具体地,其他输入设备152可以包括但不限于物理键盘、功能键(比如音量控制按键、开关按键等)、轨迹球、鼠标、操作杆等中的一种或多种。本发明实施例中,当手机与外设耳机相连接时,其他输入设备152可以为外设耳机。例如:外设耳机可以包括一些用于控制音量或控制通话的实体键或虚拟键。通过外设耳机的这些键可以向手机输入信息或指令。在一些本发明实施例中,用户可以通过输入单元150来拨打或接听电话。The input unit 150 can be configured to receive input numeric or character information and to generate key signal inputs related to user settings and function control of the handset 100. Specifically, the input unit 150 may include a touch panel 151 and other input devices 152. The touch panel 151, also referred to as a touch screen, can collect touch operations on or near the user (such as the user using a finger, a stylus, or the like, any suitable object or accessory on the touch panel 151 or attached to the touch panel 151. Near operation), and drive the corresponding connecting device according to a preset program. Optionally, the touch panel 151 may include two parts: a touch detection device and a touch controller. Wherein, the touch detection device detects the touch orientation of the user, and detects a signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts the touch information into contact coordinates, and sends the touch information. The processor 130 is provided and can receive commands from the processor 130 and execute them. In addition, the touch panel 151 can be implemented in various types such as resistive, capacitive, infrared, and surface acoustic waves. In addition to the touch panel 151, the input unit 150 may also include other input devices 152. Specifically, other input devices 152 may include, but are not limited to, one or more of a physical keyboard, function keys (such as volume control buttons, switch buttons, etc.), trackballs, mice, joysticks, and the like. In the embodiment of the present invention, when the mobile phone is connected to the peripheral earphone, the other input device 152 may be a peripheral earphone. For example, a peripheral headset can include some physical or virtual keys for controlling volume or controlling calls. These keys can be used to input information or commands to the phone through the peripheral headphones. In some embodiments of the present invention, the user can make or receive a call through the input unit 150.
显示单元160可用于显示由用户输入的信息或提供给用户的信息以及手机100的各种菜单。显示单元160可包括显示面板161,可选的,可以采用LCD、OLED等形式来配置显示面板161。进一步的,触控面板151可覆盖显示面板161,当触控面板151检测到在其上或附近的触摸操作后,传送给处理器130以确定触摸事件的类型,随后处理器130根据触摸事件的类型在显示面板161上提供相应的视觉输出。虽然在图1中,触控面板151与显示面板161是作为两个独立的部件来实现手机100的输入和输出功能,但是在某些实施例中,可以将触控面板151与显示面板161集成而实现手机100的输入和输出功能。本发明实施例的一方面,显示单元160用于在接收处理器130发送的当前通话模式相关的提示信息和/或切换后通话模式相关的提示信息之后,进行显示。The display unit 160 can be used to display information input by the user or information provided to the user and various menus of the mobile phone 100. The display unit 160 may include a display panel 161. Alternatively, the display panel 161 may be configured in the form of an LCD, an OLED, or the like. Further, the touch panel 151 can cover the display panel 161. When the touch panel 151 detects a touch operation on or near the touch panel 151, the touch panel 151 transmits to the processor 130 to determine the type of the touch event, and then the processor 130 according to the touch event. The type provides a corresponding visual output on display panel 161. Although the touch panel 151 and the display panel 161 are two independent components to implement the input and output functions of the mobile phone 100 in FIG. 1, in some embodiments, the touch panel 151 may be integrated with the display panel 161. The input and output functions of the mobile phone 100 are implemented. In an aspect of the embodiment of the present invention, the display unit 160 is configured to perform display after receiving the prompt information related to the current call mode sent by the processor 130 and/or the prompt information related to the call mode after the handover.
手机100还可包括至少一种传感器170,比如光传感器、运动传感器以及其他传感器。具体地,光传感器可包括环境光传感器及接近传感器,其中,环境光传感器可根据环境光线的明暗来调节显示面板161的亮度,接近传感器可在手机100移动到耳边时,关闭显示面板161和/或背光。作为运动传感器的一种,加速计传感器可检测各个方向上(一般为三轴)加速度的大小,静止时可检测出重力的大小及方向,可用于识别手机姿态的应用(比如横竖屏切换、相关游戏、磁力计姿态校准)、振动识别相关功能(比如计步器、敲击)等。手机100还可以配置的陀螺仪、气压计、湿度计、温度计、红外线传感器等其他传感器,在此不再赘述。The handset 100 can also include at least one type of sensor 170, such as a light sensor, motion sensor, and other sensors. Specifically, the light sensor may include an ambient light sensor and a proximity sensor, wherein the ambient light sensor may adjust the brightness of the display panel 161 according to the brightness of the ambient light, and the proximity sensor may close the display panel 161 when the mobile phone 100 moves to the ear. / or backlight. As a kind of motion sensor, the accelerometer sensor can detect the magnitude of acceleration in all directions (usually three axes). When it is stationary, it can detect the magnitude and direction of gravity. It can be used to identify the gesture of the mobile phone (such as horizontal and vertical screen switching, related Game, magnetometer attitude calibration), vibration recognition related functions (such as pedometer, tapping). The mobile phone 100 can also be configured with other sensors such as a gyroscope, a barometer, a hygrometer, a thermometer, an infrared sensor, and the like, and will not be described herein.
音频电路180、听筒181、麦克风182可提供用户与手机100之间的音频接口。音 频电路180可将接收到的音频数据转换后的电信号,传输到听筒181,由听筒181转换为声音信号输出;另一方面,麦克风182将收集的声音信号转换为电信号,由音频电路180接收后转换为音频数据,再将音频数据输出至RF电路110以发送给比如另一手机,或者将音频数据输出至存储器140以便进一步处理,或者直接由处理器130对该音频数据进行处理。本发明实施例一方面,音频电路180用于接收到处理器130发送的开始接收并处理声音信号的指令后,开始接收并处理(数据转换)声音信号;用于从外设耳机和/或手机自身的麦克风182实时接收声音信号并将接收到的声音信号转换为音频数据;还用于将音频数据发送给处理器130和/或发送给存储器以便进一步处理。当外设耳机与手机连接之后,外设耳机的麦克风可以替代麦克风182工作,外设耳机的听筒可以替代听筒181工作。The audio circuit 180, the earpiece 181, and the microphone 182 can provide an audio interface between the user and the handset 100. Tone The frequency circuit 180 can transmit the converted electrical data of the received audio data to the earpiece 181 for conversion to the sound signal output by the earpiece 181; on the other hand, the microphone 182 converts the collected sound signal into an electrical signal, by the audio circuit 180. After receiving, it is converted into audio data, and then the audio data is output to the RF circuit 110 for transmission to, for example, another mobile phone, or the audio data is output to the memory 140 for further processing, or the audio data is directly processed by the processor 130. In an aspect of the embodiment of the present invention, the audio circuit 180 is configured to receive and process (data convert) the sound signal after receiving the instruction sent by the processor 130 to start receiving and processing the sound signal; for using the peripheral earphone and/or the mobile phone The own microphone 182 receives the sound signal in real time and converts the received sound signal into audio data; it is also used to transmit the audio data to the processor 130 and/or to the memory for further processing. After the peripheral earphone is connected to the mobile phone, the microphone of the peripheral earphone can work instead of the microphone 182, and the earpiece of the peripheral earphone can work instead of the earpiece 181.
WiFi属于短距离无线传输技术,手机100通过WiFi模块190可以帮助用户收发电子邮件、浏览网页和访问流式媒体等,它为用户提供了无线的宽带互联网访问。虽然图1示出了WiFi模块190,但是可以理解的是,其并不属于手机100的必须构成,完全可以根据需要在不改变发明本质的范围内而省略。WiFi is a short-range wireless transmission technology, and the mobile phone 100 can help users to send and receive emails, browse web pages, and access streaming media through the WiFi module 190, which provides wireless broadband Internet access for users. Although FIG. 1 shows the WiFi module 190, it can be understood that it does not belong to the essential configuration of the mobile phone 100, and may be omitted as needed within the scope of not changing the essence of the invention.
处理器130是手机100的控制中心,利用各种接口和线路连接整个手机的各个部分,通过运行或执行存储在存储器140内的软件程序和/或模块,以及调用存储在存储器140内的数据,执行手机100的各种功能和处理数据,从而实现基于手机的多种业务。可选的,处理器130可包括一个或多个处理单元;优选的,处理器130可集成应用处理器和调制解调处理器,其中,应用处理器主要处理操作系统、用户界面和应用程序等,调制解调处理器主要处理无线通信。可以理解的是,上述调制解调处理器也可以不集成到处理器130中。The processor 130 is the control center of the handset 100, which connects various portions of the entire handset using various interfaces and lines, by running or executing software programs and/or modules stored in the memory 140, and recalling data stored in the memory 140, The various functions and processing data of the mobile phone 100 are executed, thereby realizing various services based on the mobile phone. Optionally, the processor 130 may include one or more processing units; preferably, the processor 130 may integrate an application processor and a modem processor, where the application processor mainly processes an operating system, a user interface, an application, and the like. The modem processor primarily handles wireless communications. It can be understood that the above modem processor may not be integrated into the processor 130.
本发明实施例一方面,处理器130用于当手机连接有外设耳机时,在该手机与远端设备建立通话连接之后,通过所述外设耳机的麦克风采集第一声音信号;音频电路180用于将采集到的所述第一声音信号转换为第一音频数据;处理器130还用于判断所述第一音频数据是否为有效数据;若所述第一音频数据为非有效数据,则切换为通过该手机的麦克风182开始采集第二声音信号,即,将通话模式切换为手机自身听筒/麦克风模式。In an embodiment of the present invention, the processor 130 is configured to: when the mobile phone is connected to the peripheral earphone, after the mobile phone establishes a call connection with the remote device, the first sound signal is collected by the microphone of the peripheral earphone; the audio circuit 180 The processor 130 is further configured to determine whether the first audio data is valid data; if the first audio data is non-effective data, Switching to start collecting the second sound signal through the microphone 182 of the mobile phone, that is, switching the call mode to the handset's own handset/microphone mode.
本发明实施例另一方面,在切换为通过麦克风182采集所述第二声音信号之后,音频电路180还用于将采集到的所述第二声音信号转换为第二音频数据。处理器130还用于判断所述第二音频数据是否为有效数据;若所述第二音频数据为非有效数据,则比较 所述第一音频数据和所述第二音频数据;若所述第一音频数据的语音质量高于所述第二音频数据的语音质量,则切换为通过所述外设耳机的麦克风采集声音信号,即,将通话模式切换为耳机模式。In another aspect of the embodiment of the present invention, after switching to acquire the second sound signal through the microphone 182, the audio circuit 180 is further configured to convert the collected second sound signal into second audio data. The processor 130 is further configured to determine whether the second audio data is valid data; if the second audio data is non-valid data, compare The first audio data and the second audio data; if the voice quality of the first audio data is higher than the voice quality of the second audio data, switching to collecting a sound signal through a microphone of the peripheral earphone , that is, switch the call mode to the headset mode.
本发明实施例的又一方面,处理器130还用于在判断出当前通话模式后,将当前通话模式相关的提示信息发送给显示单元160、手机自身的听筒181或外设耳机的听筒);以及在切换通话模式之后,将切换后的通话模式相关的提示信息发送给显示单元160、手机自身的听筒181或外设耳机的听筒)。In another aspect of the embodiment of the present invention, the processor 130 is further configured to: after determining the current call mode, send the prompt information related to the current call mode to the display unit 160, the handset 181 of the mobile phone itself, or the handset of the peripheral headset); And after the call mode is switched, the prompt information related to the switched call mode is sent to the display unit 160, the handset 181 of the mobile phone itself, or the handset of the peripheral headset.
手机100还包括给各个部件供电的电源120(比如电池),优选的,电源可以通过电源管理系统与处理器130逻辑相连,从而通过电源管理系统实现管理充电、放电、以及功耗等功能。The mobile phone 100 also includes a power source 120 (such as a battery) that supplies power to various components. Preferably, the power source can be logically coupled to the processor 130 through a power management system to manage functions such as charging, discharging, and power consumption through the power management system.
尽管未示出,手机100还可以包括摄像头、蓝牙模块等,在此不再赘述。Although not shown, the mobile phone 100 may further include a camera, a Bluetooth module, and the like, and details are not described herein.
图2为本发明实施例提供的一种切换通话模式的方法。如图2所示,该方法包括:FIG. 2 is a schematic diagram of a method for switching a call mode according to an embodiment of the present invention. As shown in Figure 2, the method includes:
步骤201、连接有外设耳机的第一终端与远端设备建立通话连接。Step 201: The first terminal connected to the peripheral earphone establishes a call connection with the remote device.
本实施例中的第一终端连接有外设耳机,该外设耳机可以为有线耳机,也可以为无线耳机。当该外设耳机为有线耳机时,该耳机可以通过第一终端上的耳机插孔与该第一终端有线连接。当该外设耳机为无线耳机时,该耳机可以通过蓝牙或Wi-Fi等无线技术与该第一终端无线连接。本发明各实施例中的远端设备指的是可以与该第一终端建立通话连接的终端。The first terminal in this embodiment is connected with a peripheral earphone, and the peripheral earphone may be a wired earphone or a wireless earphone. When the peripheral earphone is a wired earphone, the earphone can be wiredly connected to the first terminal through a headphone jack on the first terminal. When the peripheral earphone is a wireless earphone, the earphone can be wirelessly connected to the first terminal through a wireless technology such as Bluetooth or Wi-Fi. The remote device in the embodiments of the present invention refers to a terminal that can establish a call connection with the first terminal.
该第一终端与远端设备建立通话连接,其中,该第一终端可以为主叫终端,也可以为被叫终端。The first terminal establishes a call connection with the remote device, where the first terminal may be the calling terminal or the called terminal.
步骤202、在该第一终端与远端设备建立通话连接之后,该第一终端通过该外设耳机的麦克风采集第一声音信号。Step 202: After the first terminal establishes a call connection with the remote device, the first terminal collects the first sound signal through the microphone of the peripheral earphone.
该外设耳机包括麦克风和听筒。麦克风可以用于采集用户发出的声音或者环境声音,并将采集到的声音传输给该第一终端。听筒可以将第一终端产生的声音信号或者第一终端从远端设备接收到的声音信号播放给用户听。The peripheral headset includes a microphone and an earpiece. The microphone can be used to collect sounds emitted by the user or ambient sounds, and transmit the collected sounds to the first terminal. The handset can play the sound signal generated by the first terminal or the sound signal received by the first terminal from the remote device to the user.
在该第一终端与远端设备建立通话连接之后,该第一终端通过该外设耳机的麦克风采集用户的声音,即第一声音信号。需要说明的是,在该第一终端没有与远端设备建立通话连接之前,该第一终端也可以通过该外设耳机的麦克风采集声音。例如:在该第一 终端作为主叫终端呼叫远端设备,且未建立通话连接时,该外设耳机的麦克风就可以用于采集声音,此时,如果采集到用户终止呼叫的语音,第一终端可以终止该呼叫。在该第一终端作为被叫终端接收到远端设备的呼叫,且未建立通话连接时,该外设耳机的麦克风也可以用于采集声音,此时,如果采集到用户挂断该来电的语音,第一终端可以挂断该来电,如果采集到用户接听该来电的语音,第一终端可以接听该来电。此外,在第一终端处于待机状态或其它没有进行通话的状态时,外设耳机的麦克风也可以用于采集用户的声音,例如:用户可以通过外设耳机的麦克风对第一终端进行语音控制,通过语音控制该第一终端打开某个应用程序或执行某个功能。也就是说,第一终端在检测到与外设耳机建立了连接之后,就可以通过外设耳机的麦克风采集声音。当然,第一终端也可以仅在与远端设备建立通话连接之后,才通过外设耳机的麦克风采集声音。After the first terminal establishes a call connection with the remote device, the first terminal collects the user's voice, that is, the first sound signal, through the microphone of the peripheral earphone. It should be noted that, before the first terminal establishes a call connection with the remote device, the first terminal may also collect sound through the microphone of the peripheral headset. For example: at the first When the terminal calls the remote device as the calling terminal, and the call connection is not established, the microphone of the peripheral earphone can be used for collecting sound. At this time, if the voice of the user terminates the call, the first terminal can terminate the call. When the first terminal receives the call of the remote device as the called terminal, and the call connection is not established, the microphone of the peripheral earphone can also be used for collecting sound. At this time, if the voice of the user hangs up the call is collected, The first terminal can hang up the incoming call. If the user receives the voice of the incoming call, the first terminal can answer the incoming call. In addition, when the first terminal is in a standby state or other state in which no call is in progress, the microphone of the peripheral earphone can also be used to collect the voice of the user. For example, the user can perform voice control on the first terminal through the microphone of the peripheral earphone. The first terminal is controlled by voice to open an application or perform a certain function. That is to say, after detecting that the first terminal has established a connection with the peripheral earphone, the sound can be collected through the microphone of the peripheral earphone. Of course, the first terminal can also collect sound through the microphone of the peripheral earphone only after establishing a call connection with the remote device.
需要说明的是,当第一终端通过外设耳机的麦克风采集声音信号时,该第一终端可以通过外设耳机的听筒播放从远端设备接收的声音。It should be noted that when the first terminal collects a sound signal through the microphone of the peripheral earphone, the first terminal can play the sound received from the remote device through the earpiece of the peripheral earphone.
步骤203、该第一终端将采集到的该第一声音信号转换为第一音频数据。第一终端通过外设耳机的麦克风采集该第一声音信号,得到第一音频数据,该第一音频数据可以为模拟信号,也可以是被模数转换之后的数字信号。Step 203: The first terminal converts the collected first sound signal into first audio data. The first terminal collects the first sound signal through the microphone of the peripheral earphone to obtain the first audio data, and the first audio data may be an analog signal or a digital signal after the analog-to-digital conversion.
步骤204、该第一终端判断该第一音频数据是否为有效数据;若判断出该第一音频数据为非有效数据,即无效数据,则执行步骤205,若判断出该第一音频数据为有效数据,则该第一终端继续使用该外设耳机进行通话,即该第一终端采用耳机模式进行通话,使用外设耳机的麦克风采集外部声音,使用外设耳机的听筒播放声音。Step 204: The first terminal determines whether the first audio data is valid data. If it is determined that the first audio data is invalid data, that is, invalid data, step 205 is performed, if it is determined that the first audio data is valid. Data, the first terminal continues to use the peripheral earphone to make a call, that is, the first terminal uses the headset mode to make a call, uses the microphone of the peripheral earphone to collect the external sound, and uses the earphone of the peripheral earphone to play the sound.
其中,该第一终端可以通过以下任一种方式判断音频数据是否为有效数据。The first terminal may determine whether the audio data is valid data by any of the following manners.
方式一:该第一终端将音频数据与经验数据进行比对,通过比对,若判断出该音频数据为人发出的声音,则确定该音频数据为有效数据,若判断出该音频数据为背景音或环境音,则确定该音频数据为非有效数据。Manner 1: The first terminal compares the audio data with the empirical data. If the audio data is determined to be valid by the comparison, if the audio data is determined to be valid data, the audio data is determined to be the background sound. Or ambient sound, then the audio data is determined to be non-valid data.
方式二:该第一终端识别音频数据的具体内容,若识别出该音频数据的内容为通话时用户经常说的语句,则确定所述第一音频数据为有效数据,若无法识别出该音频数据的内容,则确定该音频数据为非有效数据。Manner 2: the first terminal identifies the specific content of the audio data, and if the content of the audio data is the statement that the user frequently says during the call, determining that the first audio data is valid data, and if the audio data cannot be recognized The content determines that the audio data is not valid data.
方式三:该第一终端获取该音频数据与经验数据的语音类似度,若所述语音类似度大于预设阈值,则确定该音频数据为有效数据,若所述语音类似度小于或等于所述预设阈值,则确定该音频数据为非有效数据。 Manner 3: The first terminal acquires a voice similarity between the audio data and the experience data. If the voice similarity is greater than a preset threshold, determining that the audio data is valid data, if the voice similarity is less than or equal to the The preset threshold determines that the audio data is inactive data.
步骤205、该第一终端切换为通过该第一终端的麦克风采集第二声音信号。当通过外设耳机的麦克风采集到的声音为无效声音时,表示用户当前可能没有使用耳机进行通话,而是手持第一终端并在使用第一终端自身的麦克风和听筒。由此,该第一终端将耳机模式切换为正常模式,即切换为使用第一终端自身的麦克风和听筒进行通话的模式,通过第一终端自身的麦克风采集外部的声音信号,即第二声音信号。Step 205: The first terminal switches to collect a second sound signal by using a microphone of the first terminal. When the sound collected by the microphone of the peripheral earphone is an invalid sound, it means that the user may not currently use the earphone to make a call, but the first terminal is held and the first terminal's own microphone and earpiece are used. Therefore, the first terminal switches the headset mode to the normal mode, that is, switches to a mode in which the microphone of the first terminal itself and the handset are used for talking, and the external sound signal, that is, the second sound signal, is collected by the microphone of the first terminal itself. .
需要说明的是,当第一终端通过自身的麦克风采集声音信号时,该第一终端可以通过自身的听筒播放从远端设备接收的声音。It should be noted that when the first terminal collects a sound signal through its own microphone, the first terminal can play the sound received from the remote device through its own earpiece.
步骤205之后,该方法还可以包括步骤206。After step 205, the method may further include step 206.
步骤206、该第一终端将采集到的该第二声音信号转换为第二音频数据。将声音信号转换为音频数据的过程可以参见步骤203。Step 206: The first terminal converts the collected second sound signal into second audio data. The process of converting a sound signal into audio data can be seen in step 203.
步骤207、该第一终端判断该第二音频数据是否为有效数据;若判断出该第二音频数据为非有效数据,则执行步骤208;若判断出该第二音频数据为有效数据,则执行步骤210。具体判断音频数据是否为有效数据的方法可以参见步骤204中的描述。Step 207: The first terminal determines whether the second audio data is valid data; if it is determined that the second audio data is non-valid data, step 208 is performed; if it is determined that the second audio data is valid data, executing Step 210. For a method of determining whether the audio data is valid data, refer to the description in step 204.
步骤208、该第一终端比较该第一音频数据和该第二音频数据;若该第一音频数据的语音质量高于该第二音频数据的语音质量,则执行步骤209,若该第一音频数据的语音质量低于该第二音频数据的语音质量,则执行步骤210。Step 208: The first terminal compares the first audio data with the second audio data. If the voice quality of the first audio data is higher than the voice quality of the second audio data, step 209 is performed, if the first audio is used. The voice quality of the data is lower than the voice quality of the second audio data, and step 210 is performed.
步骤209、该第一终端切换为通过该外设耳机的麦克风采集声音信号。Step 209: The first terminal switches to collect a sound signal through a microphone of the peripheral earphone.
当通过外设耳机的麦克风采集到的声音信号的质量高于通过第一终端自身的麦克风采集到的声音信号的质量时,表示当前用户在使用外设耳机进行通话,所以第一终端需要重新切换为外设耳机模式进行通话,即通过外设耳机的麦克风采集外部声音。可能是因为当前通话的质量不高,才导致步骤204中的误判。When the quality of the sound signal collected by the microphone of the peripheral earphone is higher than the quality of the sound signal collected by the microphone of the first terminal itself, indicating that the current user is using the peripheral earphone for the call, the first terminal needs to be switched again. To talk to the peripheral headset mode, the external sound is collected through the microphone of the peripheral headset. It may be because the quality of the current call is not high, which leads to the misjudgment in step 204.
步骤210、该第一终端继续使用自身的麦克风和听筒进行通话,即该第一终端继续使用自身的麦克风采集外部声音,使用自身的听筒播放声音。当通过第一终端自身的麦克风采集到的声音信号的质量高于通过外设耳机的麦克风采集到的声音信号的质量时,表示当前用户没有在使用外设耳机。可能是因为当前通话的质量不高,才导致步骤207中的误判。Step 210: The first terminal continues to use its own microphone and the handset to make a call, that is, the first terminal continues to use its own microphone to collect external sound, and uses its own earpiece to play the sound. When the quality of the sound signal collected by the microphone of the first terminal itself is higher than the quality of the sound signal collected by the microphone of the peripheral earphone, it indicates that the current user is not using the peripheral earphone. It may be because the quality of the current call is not high, which leads to the misjudgment in step 207.
本方法实施例还可以包括:第一终端可以提示用户当前处于哪种通话模式。例如:当第一终端检测到与外设耳机处于连接状态时,可以提示用户当前处于耳机模式;当第一终端从耳机模式切换到正常模式时,可以提示用户当前处于正常模式,或者提示用户 模式已切换;当第一终端从正常模式切换回耳机模式时,可以再次提示用户当前所处的模式或者提示用户模式已切换。在提示用户时,第一终端可以通过自身的显示屏进行文字或图形提示,或者通过该第一终端的扬声器或外设耳机进行语音提示。The method embodiment may further include: the first terminal may prompt the user which call mode is currently in use. For example, when the first terminal detects that it is connected to the peripheral headset, the user may be prompted to be in the headset mode; when the first terminal switches from the headset mode to the normal mode, the user may be prompted to be in the normal mode or prompt the user. The mode has been switched; when the first terminal switches from the normal mode back to the headset mode, the user may be prompted again to the current mode or the user mode is prompted to be switched. When the user is prompted, the first terminal can make a text or graphic prompt through its own display screen, or make a voice prompt through the speaker or peripheral earphone of the first terminal.
本发明实施例,连接有外设耳机的终端在与远端设备建立通话连接之后,先使用外设耳机进行通话,并判断通过外设耳机的麦克风采集到的声音是否为有效的。如果是无效的,则自动切换到使用终端自身的麦克风和听筒进行通话,即自动切换通话模式。在切换之后,如果判断通过终端自身的麦克风采集到的声音质量低于通过外设耳机的麦克风采集到的声音质量,则终端再自动切换回耳机通话模式,即切换回使用外设耳机进行通话。由此,通过本发明实施例,可以实现通话模式的自动切换,提高终端使用的便利性。并且,本发明实施例可以将当前的通话模式以及模式切换的信息提示给用户,便于用户获知终端自动切换通话模式的行为。In the embodiment of the present invention, after establishing a call connection with the remote device, the terminal connected to the peripheral device first uses the peripheral earphone to make a call, and determines whether the sound collected by the microphone of the peripheral earphone is valid. If it is invalid, it will automatically switch to using the terminal's own microphone and handset to make a call, that is, automatically switch the call mode. After the handover, if it is judged that the sound quality collected by the terminal's own microphone is lower than the sound quality collected by the microphone of the peripheral earphone, the terminal automatically switches back to the headset call mode, that is, switches back to use the peripheral earphone for the call. Therefore, the embodiment of the present invention can automatically switch the call mode and improve the convenience of the terminal. Moreover, the embodiment of the present invention can prompt the current call mode and the mode switching information to the user, so that the user can know the behavior of the terminal automatically switching the call mode.
下面通过图3、图4所示的实施例,以手机为例,具体描述本发明实施例的方案。The scheme of the embodiment of the present invention is specifically described below by taking the mobile phone as an example through the embodiments shown in FIG. 3 and FIG. 4 .
具体的,如图3所示,该方法可以包括如下步骤:Specifically, as shown in FIG. 3, the method may include the following steps:
步骤301、手机开始进行通话。手机接收到来电呼叫之后,用户触发接听电话的操作;或者手机作为主叫,用户通过手机拨打电话。手机的处理器可以接收用户通过手机的输入单元输入的接听指令或拨打指令。In step 301, the mobile phone starts to make a call. After the mobile phone receives the incoming call, the user triggers the operation of answering the call; or the mobile phone acts as the calling party, and the user makes a call through the mobile phone. The processor of the mobile phone can receive an answering instruction or a dialing instruction input by the user through the input unit of the mobile phone.
步骤302、该手机判断是否与外设耳机处于连接状态,包括判断耳机插孔是否被有线耳机占用(即判断手机与有线耳机是否处于连接状态)和/或判断手机与蓝牙耳机等无线耳机是否处于连接状态;若判断手机与外设耳机没有处于连接状态,则进入步骤308;若判断手机与外设耳机处于连接状态,则进入步骤303。Step 302: The mobile phone determines whether it is connected to the peripheral earphone, including determining whether the earphone jack is occupied by the wired earphone (ie, determining whether the mobile phone and the wired earphone are connected) and/or determining whether the wireless earphone such as the mobile phone and the Bluetooth earphone is in If the mobile phone and the peripheral earphone are in a connected state, the process proceeds to step 303.
需要说明的是,本发明实施例并不限定步骤302的执行顺序,或者,可以不包括步骤302。在有线耳机插入手机之后或者无线耳机与手机配对连接之后,手机即可获知已与外设耳机建立连接,在后续的通话过程中,手机就可以选择耳机模式,即可以在步骤301之后,进入步骤303。It should be noted that the embodiment of the present invention does not limit the execution order of step 302, or may not include step 302. After the wired headset is inserted into the mobile phone or the wireless headset is paired with the mobile phone, the mobile phone can know that the connection with the peripheral earphone is established. During the subsequent call, the mobile phone can select the headset mode, that is, after step 301, the mobile phone can enter the step. 303.
步骤303、该手机通过外设耳机的麦克风采集外部的声音。Step 303: The mobile phone collects an external sound through a microphone of the peripheral earphone.
步骤304、该手机将采集到的声音信号转换为第一音频数据,并可以存储该第一音频数据。例如,该手机的音频电路接收并处理外设耳机采集的声音信号,并将处理后的第一音频数据发送给手机的处理器和/或存储器,可以是实时发送,也可以是按系统预设 的一定周期发送(例如每10ms发送一次)。Step 304: The mobile phone converts the collected sound signal into first audio data, and may store the first audio data. For example, the audio circuit of the mobile phone receives and processes the sound signal collected by the peripheral earphone, and sends the processed first audio data to the processor and/or the memory of the mobile phone, which may be sent in real time or preset by system. A certain period of transmission (for example, every 10ms).
步骤305、该手机判断预设时间段内的第一音频数据是否为有效数据;如果是有效数据,则执行步骤306,如果是无效数据,则执行步骤307。其中,预设时间段内的第一音频数据可以为:该预设时间段内外设耳机采集到的声音转换的第一音频数据。Step 305: The mobile phone determines whether the first audio data in the preset time period is valid data; if it is valid data, step 306 is performed, and if it is invalid data, step 307 is performed. The first audio data in the preset time period may be: the first audio data converted by the sound collected by the peripheral earphones in the preset time period.
例如,该手机的处理器或音频电路判断该第一音频数据是否为有效数据。当由该音频电路来判断时,该音频电路可以将判断结果发送给该处理器。所述预设时间段可以是通话建立的最开始的一段时间,例如通话建立后的最初1秒、2秒、3秒或者5秒,具体时间的长短不做限定。For example, the processor or audio circuitry of the handset determines whether the first audio data is valid data. When judged by the audio circuit, the audio circuit can transmit the determination result to the processor. The preset time period may be the first time period of the call establishment, for example, the first one second, two seconds, three seconds, or five seconds after the call is established, and the length of the specific time is not limited.
其中,手机判断音频数据是否为有效数据可以通过以下任意一种或几种方式:The mobile phone determines whether the audio data is valid data by any one or several of the following methods:
方式一:将识别结果与经验数据(可以是专家库、智能库、经验数据库等存储了海量人声的语音数据库)比对,通过比对判定音频数据是人声(有效数据)还是背景音或环境音(无效数据);所述的识别可以为语音识别或语义识别,也可以为对音频数据的其它算法,只要使得音频数据能够与经验数据进行对比即可。Method 1: Compare the recognition result with the empirical data (which can be a database of experts, a smart library, an experience database, etc., which stores a large number of vocals), and determine whether the audio data is vocal (effective data) or background sound or Ambient sound (invalid data); the identification may be speech recognition or semantic recognition, or other algorithms for audio data, as long as the audio data can be compared with empirical data.
方式二:识别音频数据的具体内容,并根据具体内容判断是否为有效数据。例如:若识别出的音频数据的内容为“你好”、“你是谁”、“喂”、“说话”、“没声音”、“我是Tom”等打电话时用户常说的词句,语言不做限定,可以是中文、英文、俄文、日文等多种语音输入,则判断为有效数据;或者只要能够识别出具体内容,就可以判断为有效数据;若无法识别,则判断为无效数据。Method 2: Identify the specific content of the audio data, and judge whether it is valid data according to the specific content. For example, if the content of the recognized audio data is “Hello”, “Who are you”, “Hey”, “Speak”, “No Sound”, “I am Tom”, etc. The language is not limited, it can be Chinese, English, Russian, Japanese and other voice input, it is judged as valid data; or as long as the specific content can be identified, it can be judged as valid data; if it is not recognized, it is judged as invalid data.
方式三:通过比对识别结果与经验数据以获取语音类似度,判断语音类似度是否超过预设的语音类似度阈值,若超过该阈值则判断为有效数据,若未超过该阈值则判断为无效数据。Manner 3: By comparing the recognition result with the empirical data to obtain the similarity degree of the speech, determining whether the speech similarity exceeds a preset speech similarity threshold, and if the threshold is exceeded, determining that the data is valid, and if the threshold is not exceeded, the determination is invalid. data.
步骤306、手机保持当前通话模式为耳机模式。Step 306: The mobile phone keeps the current call mode as the headset mode.
步骤307、手机把通话模式切换为手机自身的听筒/麦克风模式,即手机使用自身的听筒和麦克风进行通话。在切换时或切换后,手机可以提示用户通话模式已切换。Step 307: The mobile phone switches the call mode to the handset/microphone mode of the mobile phone itself, that is, the mobile phone uses its own handset and microphone to make a call. At the time of switching or after switching, the mobile phone can prompt the user that the call mode has been switched.
步骤308、手机采用手机自身的听筒/麦克风模式,即手机使用自身的听筒和麦克风进行通话。Step 308: The mobile phone adopts the handset/microphone mode of the mobile phone itself, that is, the mobile phone uses its own earpiece and microphone to make a call.
当用户手机与外设耳机处于连接状态,但打电话时用户不清楚当前连接状态仍使用手机本地进行通话而不使用耳机时,手机会根据实际情况自动判断该使用哪种通话模式,防止误挂断电话。并且,可以通过手机自身的音频电路和处理器实现自动切换通话 模式,省去用户手动操作的步骤,且在不用增加额外的硬件的情况下即可解决误挂断电话的问题。When the user's mobile phone is connected to the peripheral headset, but the user does not know the current connection status while using the mobile phone to make a call without using the headset, the mobile phone will automatically determine which call mode to use according to the actual situation to prevent misconnection. Turn off the phone. And, the phone can automatically switch the call through the phone's own audio circuit and processor. The mode eliminates the user's manual steps and solves the problem of accidentally hanging up the phone without adding additional hardware.
在某些不常见的情况下,用户确实是使用外设耳机进行通话,但由于采集的声音信号很差(距离基站较远或背景噪音太大),可能会导致声音信号被识别为无效输入,而被误切换为使用手机自身听筒/麦克风模式通话。为了进一步解决该问题,本实施例可以在前述方法实施例的基础上,进一步通过比较手机自身听筒/麦克风模式和耳机模式下采集的声音,确定最终通话模式并进行自动切换。具体如图4所示,在图3所示实施例的基础上,假设手机已经执行步骤307,即手机已切换为手机自身听筒/麦克风模式,在此之后,如图4所示,还可以包括如下步骤:In some uncommon situations, the user does use a peripheral headset to make a call, but because the collected sound signal is poor (far from the base station or the background noise is too large), the sound signal may be recognized as an invalid input. It was mistakenly switched to use the handset's own handset/microphone mode to talk. In order to further solve the problem, the embodiment may further determine the final call mode and perform automatic switching by comparing the sounds collected by the handset's own handset/microphone mode and the headset mode on the basis of the foregoing method embodiments. Specifically, as shown in FIG. 4, on the basis of the embodiment shown in FIG. 3, it is assumed that the mobile phone has performed step 307, that is, the mobile phone has switched to the handset's own handset/microphone mode, and thereafter, as shown in FIG. 4, may also include The following steps:
步骤401、手机开始使用自身的麦克风采集声音信号。例如:手机的处理器通知手机自身的麦克风开始采集外部声音,并通知音频电路开始接收并处理该麦克风采集的声音信号。Step 401: The mobile phone starts to collect the sound signal by using its own microphone. For example, the processor of the mobile phone notifies the handset's own microphone to start collecting external sound, and notifies the audio circuit to start receiving and processing the sound signal collected by the microphone.
步骤402、手机将步骤401采集到的该声音信号转换为第二音频数据。Step 402: The mobile phone converts the sound signal collected in step 401 into second audio data.
步骤403、手机判断预设时间段内的第二音频数据是否为有效数据;如果是有效数据,则执行步骤404,如果是无效数据,则执行步骤405。其中,该预设时间段可以为切换通话模式之后的一段时间,例如为切换到通过手机自身麦克风采集声音之后的最初1秒、2秒、3秒或者5秒,具体时间的长短不做限定。该预设时间段的长短可以与步骤305中的一样,也可以不一样。手机判断第二音频数据是否为有效数据的方法参见前述手机判断第一音频数据是否为有效数据的方法。Step 403: The mobile phone determines whether the second audio data in the preset time period is valid data; if it is valid data, step 404 is performed, and if it is invalid data, step 405 is performed. The preset time period may be a period of time after the call mode is switched, for example, to switch to the first one second, two seconds, three seconds, or five seconds after the voice is collected by the mobile phone's own microphone, and the length of the specific time is not limited. The length of the preset time period may be the same as or different from that in step 305. For the method for determining whether the second audio data is valid data by the mobile phone, refer to the foregoing method for determining whether the first audio data is valid data.
步骤404、该手机保持当前通话模式为自身听筒/麦克风模式。Step 404: The mobile phone keeps the current call mode as its own handset/microphone mode.
步骤405、该手机获取耳机模式下的该第一音频数据和手机自身听筒/麦克风模式下的该第二音频数据;具体可以有以下两种方式:Step 405: The mobile phone acquires the first audio data in the headset mode and the second audio data in the handset's own handset/microphone mode; specifically, the following two methods are available:
方式一:该手机获取当前处理得到的该第二音频数据,并且从该手机的存储器中获取之前存储的耳机模式下的该第一音频数据;Manner 1: The mobile phone acquires the second audio data currently processed, and acquires the first audio data in the previously stored headset mode from the memory of the mobile phone;
方式二:该手机从存储器中获取该第一音频数据和第二音频数据,其中,该第二音频数据是在步骤402中由手机存储在自身的存储器中的。Manner 2: The mobile phone acquires the first audio data and the second audio data from a memory, wherein the second audio data is stored in the memory of the mobile phone by the mobile phone in step 402.
步骤406、该手机比较该第一音频数据和该第二音频数据的语音质量;例如可以通过比较语音的音量大小、清晰度等关键因子,判断该第一音频数据的语音质量是否高于该第二音频数据的语音质量,若否,则进入步骤404,若是,即当手机自身麦克风接收 到的语音质量低于耳机接收到的语音质量时,则进入步骤407。Step 406: The mobile phone compares the voice quality of the first audio data and the second audio data. For example, whether the voice quality of the first audio data is higher than the first is determined by comparing key factors such as volume, resolution, and the like of the voice. The voice quality of the second audio data, if not, proceed to step 404, and if so, when the handset itself receives the microphone When the received voice quality is lower than the voice quality received by the headset, the process proceeds to step 407.
步骤407、手机将通话模式切换为耳机模式。Step 407: The mobile phone switches the call mode to the headset mode.
当用户确实是使用外设耳机进行通话,但由于语音输入的音量较小或音质较差(例如背景音较大)导致被识别为无效输入而误切换为手机自身听筒/麦克风模式通话时,本实施例可以通过比较手机自身听筒/麦克风模式和耳机模式下采集并处理得到的音频数据,确定最终通话模式并进行自动切换,避免由于背景音太嘈杂或者信号太差时导致的误切换。When the user does use a peripheral headset to make a call, but because the volume of the voice input is small or the sound quality is poor (such as a large background sound), it is recognized as an invalid input and is mistakenly switched to the handset's own handset/microphone mode call. The embodiment can determine the final call mode and automatically switch by comparing the audio data collected and processed by the handset's own handset/microphone mode and the headset mode, to avoid false switching caused by the background sound being too noisy or the signal being too poor.
当通过本发明实施例提供的方法切换通话模式后,手机提供文字或语音提示,提示用户手机通话模式已经切换,便于用户发现系统自动切换通话模式的行为,使用户能了解是否使用不当造成听不见声音。After the call mode is switched by the method provided by the embodiment of the present invention, the mobile phone provides a text or voice prompt to prompt the user that the mobile phone call mode has been switched, so that the user can find that the system automatically switches the call mode, so that the user can understand whether the use is improper or not. sound.
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机程序来指令相关的硬件来完成,所述的程序可存储于一计算机可读取存储介质中,该程序在执行时,可包括如上述各方法的实施例的流程。其中,所述的存储介质可为磁碟、光盘、只读存储记忆体(Read-Only Memory,ROM)或随机存储记忆体(Random Access Memory,RAM)等。One of ordinary skill in the art can understand that all or part of the process of implementing the foregoing embodiments can be completed by a computer program to instruct related hardware, and the program can be stored in a computer readable storage medium. When executed, the flow of an embodiment of the methods as described above may be included. The storage medium may be a magnetic disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM).
以上所述,仅为本发明的具体实施方式,但本发明的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本发明揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本发明的保护范围之内。因此,本发明的保护范围应该以权利要求的保护范围为准。 The above is only a specific embodiment of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art can easily think of changes or substitutions within the technical scope of the present invention. It should be covered by the scope of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.

Claims (18)

  1. 一种切换通话模式的方法,其特征在于,包括:A method for switching a call mode, comprising:
    连接有外设耳机的第一终端与远端设备建立通话连接;The first terminal connected to the peripheral earphone establishes a call connection with the remote device;
    所述第一终端通过所述外设耳机的麦克风采集第一声音信号;The first terminal acquires a first sound signal through a microphone of the peripheral earphone;
    所述第一终端将采集到的所述第一声音信号转换为第一音频数据;The first terminal converts the collected first sound signal into first audio data;
    所述第一终端判断所述第一音频数据是否为有效数据;Determining, by the first terminal, whether the first audio data is valid data;
    若所述第一音频数据为非有效数据,则所述第一终端切换为通过所述第一终端的麦克风采集第二声音信号。And if the first audio data is inactive data, the first terminal switches to acquire a second sound signal by using a microphone of the first terminal.
  2. 根据权利要求1所述的方法,其特征在于,在所述第一终端通过所述第一终端的麦克风采集所述第二声音信号之后,所述方法还包括:The method according to claim 1, wherein after the first terminal acquires the second sound signal through a microphone of the first terminal, the method further includes:
    所述第一终端将采集到的所述第二声音信号转换为第二音频数据;The first terminal converts the collected second sound signal into second audio data;
    所述第一终端判断所述第二音频数据是否为有效数据;Determining, by the first terminal, whether the second audio data is valid data;
    若所述第二音频数据为非有效数据,则所述第一终端比较所述第一音频数据和所述第二音频数据;If the second audio data is non-valid data, the first terminal compares the first audio data with the second audio data;
    若所述第一音频数据的语音质量高于所述第二音频数据的语音质量,则所述第一终端切换为通过所述外设耳机的麦克风采集声音信号。If the voice quality of the first audio data is higher than the voice quality of the second audio data, the first terminal switches to acquire a sound signal through a microphone of the peripheral earphone.
  3. 根据权利要求1或2所述的方法,其特征在于,所述第一终端判断所述第一音频数据是否为有效数据,包括:The method according to claim 1 or 2, wherein the determining, by the first terminal, whether the first audio data is valid data comprises:
    所述第一终端将所述第一音频数据与经验数据进行比对,若确定所述第一音频数据为人发出的声音,则所述第一终端确定所述第一音频数据为有效数据,若确定所述第一音频数据为背景音或环境音,则所述第一终端确定所述第一音频数据为非有效数据;或者The first terminal compares the first audio data with the empirical data, and if it is determined that the first audio data is a voice sent by a person, the first terminal determines that the first audio data is valid data, if Determining that the first audio data is a background sound or an ambient sound, and the first terminal determines that the first audio data is inactive data; or
    所述第一终端识别所述第一音频数据的具体内容,若识别出所述第一音频数据的内容为通话时用户经常说的语句,则所述第一终端确定所述第一音频数据为有效数据,若无法识别出所述第一音频数据的内容,则所述第一终端确定所述第一音频数据为非有效数据;或者The first terminal identifies the specific content of the first audio data, and if the content of the first audio data is the statement that the user frequently says during the call, the first terminal determines that the first audio data is Valid data, if the content of the first audio data cannot be recognized, the first terminal determines that the first audio data is non-valid data; or
    所述第一终端获取所述第一音频数据与经验数据的语音类似度,若所述语音类似度大于预设阈值,则所述第一终端确定所述第一音频数据为有效数据,若所述语音类似度小于或等于所述预设阈值,则所述第一终端确定所述第一音频数据为非有效数据。 The first terminal acquires a voice similarity between the first audio data and the experience data. If the voice similarity is greater than a preset threshold, the first terminal determines that the first audio data is valid data. If the speech similarity is less than or equal to the preset threshold, the first terminal determines that the first audio data is non-valid data.
  4. 根据权利要求2所述的方法,其特征在于,所述第一终端判断所述第二音频数据是否为有效数据,包括:The method according to claim 2, wherein the determining, by the first terminal, whether the second audio data is valid data comprises:
    所述第一终端将所述第二音频数据与经验数据进行比对,若确定所述第二音频数据为人发出的声音,则所述第一终端确定所述第二音频数据为有效数据,若确定所述第二音频数据为背景音或环境音,则所述第一终端确定所述第二音频数据为非有效数据;或者The first terminal compares the second audio data with the experience data, and if it is determined that the second audio data is a voice sent by a person, the first terminal determines that the second audio data is valid data, if Determining that the second audio data is a background sound or an ambient sound, and the first terminal determines that the second audio data is inactive data; or
    所述第一终端识别所述第二音频数据的具体内容,若识别出所述第二音频数据的内容为通话时用户经常说的语句,则所述第一终端确定所述第二音频数据为有效数据,若无法识别出所述第二音频数据的内容,则所述第一终端确定所述第二音频数据为非有效数据;或者The first terminal identifies the specific content of the second audio data, and if the content of the second audio data is the statement that the user frequently says during the call, the first terminal determines that the second audio data is Valid data, if the content of the second audio data cannot be recognized, the first terminal determines that the second audio data is non-valid data; or
    所述第一终端获取所述第二频数据与经验数据的语音类似度,若所述语音类似度大于预设阈值,则所述第一终端确定所述第二音频数据为有效数据,若所述语音类似度小于或等于所述预设阈值,则所述第一终端确定所述第二音频数据为非有效数据。The first terminal acquires a voice similarity between the second frequency data and the experience data. If the voice similarity is greater than a preset threshold, the first terminal determines that the second audio data is valid data. If the speech similarity is less than or equal to the preset threshold, the first terminal determines that the second audio data is non-valid data.
  5. 根据权利要求1-4任一所述的方法,其特征在于,所述方法还包括:The method according to any one of claims 1 to 4, wherein the method further comprises:
    所述第一终端通过所述第一终端的显示屏进行文字或图形提示,以提示当前的通话是否使用所述外设耳机或者提示通话模式已切换。The first terminal performs a text or graphic prompt through the display screen of the first terminal to prompt whether the current call uses the peripheral earphone or prompts that the call mode has been switched.
  6. 根据权利要求1-4任一所述的方法,其特征在于,所述方法还包括:The method according to any one of claims 1 to 4, wherein the method further comprises:
    所述第一终端通过所述第一终端的扬声器或所述外设耳机进行语音提示,以提示当前的通话是否使用所述外设耳机或者提示通话模式已切换。The first terminal performs a voice prompt through the speaker of the first terminal or the peripheral earphone to prompt whether the current call uses the peripheral earphone or prompts that the call mode has been switched.
  7. 根据权利要求1-6任一所述的方法,其特征在于,所述方法还包括:The method according to any one of claims 1 to 6, wherein the method further comprises:
    当所述第一终端通过所述外设耳机的麦克风采集声音信号时,所述第一终端通过所述外设耳机的听筒播放从所述远端设备接收的声音;When the first terminal collects a sound signal through a microphone of the peripheral earphone, the first terminal plays a sound received from the remote device through an earpiece of the peripheral earphone;
    当所述第一终端通过所述第一终端的麦克风采集声音信号时,所述第一终端通过所述第一终端的听筒播放从所述远端设备接收的声音。When the first terminal collects a sound signal through the microphone of the first terminal, the first terminal plays the sound received from the remote device through the earpiece of the first terminal.
  8. 根据权利要求1-7任一所述的方法,其特征在于,所述第一终端为主叫终端或者被叫终端。The method according to any one of claims 1-7, wherein the first terminal is a calling terminal or a called terminal.
  9. 根据权利要求1-8任一所述的方法,其特征在于,所述外设耳机为无线耳机或有线耳机。The method according to any one of claims 1-8, wherein the peripheral earphone is a wireless earphone or a wired earphone.
  10. 一种终端,其特征在于,包括:处理器、音频电路、听筒和麦克风; A terminal, comprising: a processor, an audio circuit, an earpiece, and a microphone;
    所述处理器用于:当所述终端连接有外设耳机时,在所述终端与远端设备建立通话连接之后,通过所述外设耳机的麦克风采集第一声音信号;The processor is configured to: when the terminal is connected to a peripheral earphone, after the terminal establishes a call connection with the remote device, the first sound signal is collected by the microphone of the peripheral earphone;
    所述音频电路用于:将采集到的所述第一声音信号转换为第一音频数据;The audio circuit is configured to: convert the collected first sound signal into first audio data;
    所述处理器还用于:判断所述第一音频数据是否为有效数据;若所述第一音频数据为非有效数据,则切换为通过所述终端的麦克风采集第二声音信号。The processor is further configured to: determine whether the first audio data is valid data; if the first audio data is non-valid data, switch to acquire a second sound signal by using a microphone of the terminal.
  11. 根据权利要求10所述的终端,其特征在于,The terminal according to claim 10, characterized in that
    所述音频电路还用于:在所述终端的麦克风采集所述第二声音信号之后,将采集到的所述第二声音信号转换为第二音频数据;The audio circuit is further configured to: after the microphone of the terminal collects the second sound signal, convert the collected second sound signal into second audio data;
    所述处理器还用于:判断所述第二音频数据是否为有效数据;若所述第二音频数据为非有效数据,则比较所述第一音频数据和所述第二音频数据;若所述第一音频数据的语音质量高于所述第二音频数据的语音质量,则切换为通过所述外设耳机的麦克风采集声音信号。The processor is further configured to: determine whether the second audio data is valid data; if the second audio data is non-valid data, compare the first audio data and the second audio data; The voice quality of the first audio data is higher than the voice quality of the second audio data, and then the voice signal is collected by the microphone of the peripheral earphone.
  12. 根据权利要求10或11所述的终端,其特征在于,所述处理器判断所述第一音频数据是否为有效数据时,具体用于:The terminal according to claim 10 or 11, wherein when the processor determines whether the first audio data is valid data, it is specifically used to:
    将所述第一音频数据与经验数据进行比对,若确定所述第一音频数据为人发出的声音,则确定所述第一音频数据为有效数据,若确定所述第一音频数据为背景音或环境音,则确定所述第一音频数据为非有效数据;或者Comparing the first audio data with the empirical data, if it is determined that the first audio data is a voice sent by a person, determining that the first audio data is valid data, and determining that the first audio data is a background sound Or an ambient sound, determining that the first audio data is non-valid data; or
    识别所述第一音频数据的具体内容,若识别出所述第一音频数据的内容为通话时用户经常说的语句,则确定所述第一音频数据为有效数据,若无法识别出所述第一音频数据的内容,则确定所述第一音频数据为非有效数据;或者Identifying the specific content of the first audio data, if it is recognized that the content of the first audio data is a statement frequently spoken by the user during a call, determining that the first audio data is valid data, if the first Determining, by the content of an audio data, that the first audio data is non-valid data; or
    获取所述第一音频数据与经验数据的语音类似度,若所述语音类似度大于预设阈值,则确定所述第一音频数据为有效数据,若所述语音类似度小于或等于所述预设阈值,则确定所述第一音频数据为非有效数据。Obtaining a voice similarity between the first audio data and the experience data, if the voice similarity is greater than a preset threshold, determining that the first audio data is valid data, if the voice similarity is less than or equal to the preset Setting a threshold determines that the first audio data is non-valid data.
  13. 根据权利要求11所述的终端,其特征在于,所述处理器判断所述第二音频数据是否为有效数据时,具体用于:The terminal according to claim 11, wherein when the processor determines whether the second audio data is valid data, it is specifically used to:
    将所述第二音频数据与经验数据进行比对,若确定所述第二音频数据为人发出的声音,则确定所述第二音频数据为有效数据,若确定所述第二音频数据为背景音或环境音,则确定所述第二音频数据为非有效数据;或者Comparing the second audio data with the empirical data, if it is determined that the second audio data is a sound emitted by a person, determining that the second audio data is valid data, and determining that the second audio data is a background sound Or an ambient sound, determining that the second audio data is non-valid data; or
    识别所述第二音频数据的具体内容,若识别出所述第二音频数据的内容为通话时用 户经常说的语句,则确定所述第二音频数据为有效数据,若无法识别出所述第二音频数据的内容,则确定所述第二音频数据为非有效数据;或者Identifying specific content of the second audio data, and if the content of the second audio data is recognized as a call Determining, by the user, the second audio data is valid data, and if the content of the second audio data cannot be recognized, determining that the second audio data is non-valid data; or
    获取所述第二音频数据与经验数据的语音类似度,若所述语音类似度大于预设阈值,则确定所述第二音频数据为有效数据,若所述语音类似度小于或等于所述预设阈值,则确定所述第二音频数据为非有效数据。Acquiring the similarity between the second audio data and the empirical data. If the speech similarity is greater than the preset threshold, determining that the second audio data is valid data, if the speech similarity is less than or equal to the pre- Setting a threshold determines that the second audio data is non-valid data.
  14. 根据权利要求10-13任一所述的终端,其特征在于,所述处理器还用于:The terminal according to any one of claims 10-13, wherein the processor is further configured to:
    通过所述终端的显示屏进行文字或图形提示,以提示当前的通话是否使用所述外设耳机或者提示通话模式已切换。A text or graphic prompt is displayed through the display screen of the terminal to prompt whether the current call uses the peripheral earphone or the call mode has been switched.
  15. 根据权利要求10-13任一所述的终端,其特征在于,所述处理器还用于:The terminal according to any one of claims 10-13, wherein the processor is further configured to:
    通过所述终端的扬声器或所述外设耳机进行语音提示,以提示当前的通话是否使用所述外设耳机或者提示通话模式已切换。A voice prompt is made through the speaker of the terminal or the peripheral earphone to prompt whether the current call uses the peripheral earphone or the prompt call mode has been switched.
  16. 根据权利要求10-15任一所述的终端,其特征在于,所述处理器还用于:The terminal according to any one of claims 10-15, wherein the processor is further configured to:
    当通过所述外设耳机的麦克风采集声音信号时,通过所述外设耳机的听筒播放从所述远端设备接收的声音;When a sound signal is collected through a microphone of the peripheral earphone, a sound received from the remote device is played through an earpiece of the peripheral earphone;
    当通过所述第一终端的麦克风采集声音信号时,通过所述终端的听筒播放从所述远端设备接收的声音。When a sound signal is collected by the microphone of the first terminal, the sound received from the remote device is played through the earpiece of the terminal.
  17. 根据权利要求10-16任一所述的终端,其特征在于,所述终端为主叫终端或者被叫终端。The terminal according to any one of claims 10-16, wherein the terminal is a calling terminal or a called terminal.
  18. 根据权利要求10-17任一所述的终端,其特征在于,所述外设耳机为无线耳机或有线耳机。 The terminal according to any one of claims 10-17, wherein the peripheral earphone is a wireless earphone or a wired earphone.
PCT/CN2017/079341 2016-12-29 2017-04-01 Call mode switching method and terminal WO2018120487A1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201780004769.2A CN108432220B (en) 2016-12-29 2017-04-01 Method and terminal for switching call mode

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CNPCT/CN2016/113177 2016-12-29
CN2016113177 2016-12-29

Publications (1)

Publication Number Publication Date
WO2018120487A1 true WO2018120487A1 (en) 2018-07-05

Family

ID=62710189

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/079341 WO2018120487A1 (en) 2016-12-29 2017-04-01 Call mode switching method and terminal

Country Status (2)

Country Link
CN (1) CN108432220B (en)
WO (1) WO2018120487A1 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109618052A (en) * 2018-12-11 2019-04-12 努比亚技术有限公司 A kind of call audio switching method and device, mobile terminal and readable storage medium storing program for executing
CN109743454A (en) * 2018-12-29 2019-05-10 维沃移动通信有限公司 A kind of call handling method and mobile terminal
WO2023151526A1 (en) * 2022-02-08 2023-08-17 维沃移动通信有限公司 Audio acquisition method and apparatus, electronic device and peripheral component

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109889940A (en) * 2019-03-01 2019-06-14 钰太芯微电子科技(上海)有限公司 A kind of ear belt-type apparatus with proximity sensor

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090023479A1 (en) * 2007-07-17 2009-01-22 Broadcom Corporation Method and system for routing phone call audio through handset or headset
CN103200311A (en) * 2013-02-25 2013-07-10 华为终端有限公司 Control method and control device of communication terminal conversation audio passage and communication terminal
CN103826013A (en) * 2014-03-17 2014-05-28 联想(北京)有限公司 Method for switching communication modes and mobile terminal
CN104754463A (en) * 2013-12-31 2015-07-01 环达电脑(上海)有限公司 Switching method of internal and external microphone signals
CN105812585A (en) * 2016-06-01 2016-07-27 珠海市魅族科技有限公司 Method for switching conversation modes and mobile terminal

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090023479A1 (en) * 2007-07-17 2009-01-22 Broadcom Corporation Method and system for routing phone call audio through handset or headset
CN103200311A (en) * 2013-02-25 2013-07-10 华为终端有限公司 Control method and control device of communication terminal conversation audio passage and communication terminal
CN104754463A (en) * 2013-12-31 2015-07-01 环达电脑(上海)有限公司 Switching method of internal and external microphone signals
CN103826013A (en) * 2014-03-17 2014-05-28 联想(北京)有限公司 Method for switching communication modes and mobile terminal
CN105812585A (en) * 2016-06-01 2016-07-27 珠海市魅族科技有限公司 Method for switching conversation modes and mobile terminal

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109618052A (en) * 2018-12-11 2019-04-12 努比亚技术有限公司 A kind of call audio switching method and device, mobile terminal and readable storage medium storing program for executing
CN109743454A (en) * 2018-12-29 2019-05-10 维沃移动通信有限公司 A kind of call handling method and mobile terminal
WO2023151526A1 (en) * 2022-02-08 2023-08-17 维沃移动通信有限公司 Audio acquisition method and apparatus, electronic device and peripheral component

Also Published As

Publication number Publication date
CN108432220B (en) 2020-02-21
CN108432220A (en) 2018-08-21

Similar Documents

Publication Publication Date Title
WO2020019848A1 (en) Method for performing switching with respect to primary earpiece, mobile terminal, and computer readable storage medium
CN108540655B (en) Caller identification processing method and mobile terminal
EP3691235A1 (en) Display method and mobile terminal
WO2019201271A1 (en) Call processing method and mobile terminal
CN106528545B (en) Voice information processing method and device
CN108319442B (en) Audio playing control method and mobile terminal
CN107846516B (en) Call scene prompting method and mobile terminal
WO2021129529A1 (en) Device switching method and related device
WO2018120487A1 (en) Call mode switching method and terminal
CN108551534B (en) Method and device for multi-terminal voice call
CN109639863B (en) Voice processing method and device
CN108521501B (en) Voice input method, mobile terminal and computer readable storage medium
CN110225195B (en) Voice communication method and terminal
WO2020024770A1 (en) Method for determining communication object, and mobile terminal
CN109788423B (en) Voice receiving method, device and computer readable storage medium
WO2021197311A1 (en) Volume adjustment display method and electronic apparatus
WO2021129835A1 (en) Volume control method and device, and computer-readable storage medium
CN111078186A (en) Playing method and electronic equipment
CN115190197A (en) Bluetooth headset-based communication method and device and storage medium
CN109788114B (en) Call processing method and terminal
US20220174146A1 (en) Incoming call processing method and electronic device
WO2021208893A1 (en) Audio output mode switching method and electronic device
WO2019154322A1 (en) Incoming call processing method and mobile terminal
CN108270928B (en) Voice recognition method and mobile terminal
CN108307048B (en) Message output method and device and mobile terminal

Legal Events

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

Ref document number: 17888455

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 17888455

Country of ref document: EP

Kind code of ref document: A1