Movatterモバイル変換


[0]ホーム

URL:


CN108432220B - Method and terminal for switching call mode - Google Patents

Method and terminal for switching call mode
Download PDF

Info

Publication number
CN108432220B
CN108432220BCN201780004769.2ACN201780004769ACN108432220BCN 108432220 BCN108432220 BCN 108432220BCN 201780004769 ACN201780004769 ACN 201780004769ACN 108432220 BCN108432220 BCN 108432220B
Authority
CN
China
Prior art keywords
terminal
audio data
data
microphone
sound
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201780004769.2A
Other languages
Chinese (zh)
Other versions
CN108432220A (en
Inventor
杨芬
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Huawei Technologies Co LtdfiledCriticalHuawei Technologies Co Ltd
Publication of CN108432220ApublicationCriticalpatent/CN108432220A/en
Application grantedgrantedCritical
Publication of CN108432220BpublicationCriticalpatent/CN108432220B/en
Activelegal-statusCriticalCurrent
Anticipated expirationlegal-statusCritical

Links

Images

Classifications

Landscapes

Abstract

Translated fromChinese

本发明实施例提供了一种切换通话模式的方法和终端。该方法包括:连接有外设耳机的第一终端与远端设备建立通话连接;所述第一终端通过所述外设耳机的麦克风采集第一声音信号;所述第一终端将采集到的所述第一声音信号转换为第一音频数据;所述第一终端判断所述第一音频数据是否为有效数据;若所述第一音频数据为非有效数据,则所述第一终端切换为通过所述第一终端的麦克风采集第二声音信号。由此,终端可以根据实际情况自动判断该使用哪种通话模式,防止误挂断电话,并且省去用户手动操作的步骤。

Embodiments of the present invention provide a method and a terminal for switching a call mode. The method includes: a first terminal connected with a peripheral headset establishes a call connection with a remote device; the first terminal collects a first sound signal through a microphone of the peripheral headset; the first terminal collects the collected The first sound signal is converted into first audio data; the first terminal determines whether the first audio data is valid data; if the first audio data is non-valid data, the first terminal switches to pass The microphone of the first terminal collects the second sound signal. In this way, the terminal can automatically determine which call mode to use according to the actual situation, prevent the phone from being hung up by mistake, and save the steps of manual operation by the user.

Description

Translated fromChinese
一种切换通话模式的方法和终端Method and terminal for switching call mode

本申请要求于2016年12月29日提交中国专利局、国际申请号为PCT/CN2016/113177、发明名称为“一种网络通信方法和终端”的国际专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of the international patent application with the international application number PCT/CN2016/113177 and the invention titled "A network communication method and terminal", which was submitted to the Chinese Patent Office on December 29, 2016, the entire contents of which are by reference Incorporated in this application.

技术领域technical field

本发明实施例涉及通信技术,尤其涉及一种切换通话模式的方法和终端。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、耳机模式,即用户使用外设耳机(无线或有线耳机)进行通话。There are generally two modes for a user to answer a call using a mobile phone: 1. The handset/microphone mode of the mobile phone, that is, the user directly uses the handset and microphone of the mobile phone to make a call; 2. The headset mode, that is, the user uses a peripheral headset (wireless or wired headset) ) to make a call.

当手机与外设耳机处于连接状态时,如果用户想使用手机自身的听筒和麦克风进行通话,则用户需要手动断开手机与外设耳机的连接,例如从手机上拔掉有线耳机或者断开手机与无线耳机之间的连接;由此为用户带来不便。并且,当手机与外设耳机处于连接状态时,如果手机收到来电,用户可能不知道或者忘记当前手机与耳机处于连接状态,由此用户会直接拿起手机接听而不断开耳机与手机的连接,从而导致无法听到对方的声音。When the mobile phone is connected to the peripheral headset, if the user wants to use the handset and microphone of the mobile phone 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 to the wireless headset; thus causing inconvenience to the user. Moreover, when the mobile phone and the peripheral headset are connected, if the mobile phone receives an incoming call, the user may not know or forget that the mobile phone and the headset are currently connected, so the user will directly pick up the mobile phone to answer without disconnecting the headset from the mobile phone. , so that you cannot hear the other party's voice.

发明内容SUMMARY OF THE INVENTION

本发明实施例提供了一种切换通话模式的方法和终端,以实现自动切换通话模式,提高终端使用的便利性。Embodiments of the present invention provide a method and a terminal for switching call modes, so as to realize automatic switching of call modes 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: establishing a call connection with a remote device with a first terminal connected to a peripheral headset; the first terminal using a microphone of the peripheral headset Collect the first sound signal, and convert 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 invalid data, the The first terminal switches to collect the second sound signal through the microphone of the first terminal, that is, switches to the earpiece/microphone mode of the first terminal; if it is valid data, the first terminal maintains the earphone mode. Thus, the first terminal can automatically switch the call mode according to the sound signal collected by the earphone.

进一步的,在切换为通过所述第一终端的麦克风采集第二声音信号之后,所述第一终端将采集到的所述第二声音信号转换为第二音频数据,然后判断所述第二音频数据是否为有效数据;若为有效数据,则保持所述第一终端自身的听筒/麦克风模式;若为非有效数据,则所述第一终端比较所述第一音频数据和所述第二音频数据;若所述第一音频数据的语音质量高于所述第二音频数据的语音质量,则所述第一终端切换为通过所述外设耳机的麦克风采集声音信号,否则,继续保持所述第一终端自身的听筒/麦克风模式,即继续使用第一终端自身的麦克风采集外部声音。为了避免误判,第一终端可以进一步判断第二声音信号是否有效。Further, after switching to collect the second sound signal through the microphone of the first terminal, the first terminal converts the collected second sound signal into second audio data, and then judges the second audio Whether the data is valid data; if it is valid data, keep the earpiece/microphone mode of the first terminal; if it is invalid 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 collect sound signals through the microphone of the peripheral headset, otherwise, continue to keep the The earpiece/microphone mode of the first terminal itself, that is, continuing to use the microphone of the first terminal itself to collect external sounds. In order to avoid misjudgment, the first terminal may further determine whether the second sound signal is valid.

具体的,所述第一终端可以通过以下任一方式判断第一音频数据或第二音频数据是否为有效数据:Specifically, the first terminal can determine whether the first audio data or the second audio data is valid data in any of the following ways:

方式一:所述第一终端将音频数据与经验数据进行比对,若确定所述音频数据为人发出的声音,则所述第一终端确定所述音频数据为有效数据,若确定所述音频数据为背景音或环境音,则所述第一终端确定所述音频数据为非有效数据;Mode 1: The first terminal compares the audio data with the empirical data, and if it is determined that the audio data is a sound made by a human being, the first terminal determines that the audio data is valid data, and if it is determined that the audio data is valid data is background sound or ambient sound, then the first terminal determines that the audio data is invalid data;

方式二:所述第一终端识别所述音频数据的具体内容,若识别出所述音频数据的内容为通话时用户经常说的语句,则所述第一终端确定所述音频数据为有效数据,若无法识别出所述音频数据的内容,则所述第一终端确定所述音频数据为非有效数据;Method 2: The first terminal identifies the specific content of the audio data, and if it identifies that the content of the audio data is a sentence often spoken by the user during a call, the first terminal determines that the audio data is valid data, If the content of the audio data cannot be identified, the first terminal determines that the audio data is invalid data;

方式三:所述第一终端获取所述音频数据与经验数据的语音类似度,若所述语音类似度大于预设阈值,则所述第一终端确定所述音频数据为有效数据,若所述语音类似度小于或等于所述预设阈值,则所述第一终端确定所述音频数据为非有效数据。Manner 3: The first terminal acquires the voice similarity between the audio data and the experience data, and if the voice similarity is greater than a preset threshold, the first terminal determines that the audio data is valid data, and if the voice similarity is greater than a preset threshold, the first terminal determines that the audio data is valid data. If the voice similarity is less than or equal to the preset threshold, the first terminal determines that the audio data is invalid data.

可选的,该方法还包括:所述第一终端通过所述第一终端的显示屏进行文字或图形提示,或者,所述第一终端通过所述第一终端的扬声器或所述外设耳机进行语音提示,以提示当前的通话是否使用所述外设耳机或者提示通话模式已切换。从而使得用户可以及时获知当前的通话模式。Optionally, the method further includes: the first terminal performs text or graphic prompts through a display screen of the first terminal, or the first terminal uses a speaker of the first terminal or the peripheral headset A voice prompt is performed to prompt whether the current call uses the peripheral headset or prompt that the call mode has been switched. Thus, the user can know the current call mode in time.

进一步的,该方法还包括:当所述第一终端通过所述外设耳机的麦克风采集声音信号时,所述第一终端通过所述外设耳机的听筒播放从所述远端设备接收的声音;当所述第一终端通过所述第一终端的麦克风采集声音信号时,所述第一终端通过所述第一终端的听筒播放从所述远端设备接收的声音。Further, the method further includes: when the first terminal collects a sound signal through the microphone of the peripheral earphone, the first terminal plays the sound received from the remote device through the earpiece of the peripheral earphone ; When the first terminal collects the 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 earphones are wireless earphones or wired earphones.

第二方面,本发明实施例提供一种切换通话模式的装置,该装置具有实现上述第一方面的各方法的功能。所述功能可以通过硬件实现,也可以通过硬件执行相应的软件实现。所述硬件或软件包括一个或多个与上述功能相对应的模块。In a second aspect, an embodiment of the present invention provides an apparatus for switching a call mode, and the apparatus has the function of implementing the methods of the first aspect above. The functions can be implemented by hardware, or can be implemented by hardware executing corresponding software. The hardware or software includes one or more modules corresponding to the above functions.

第三方面,本发明实施例提供一种终端,包括:处理器、存储器、音频电路、听筒、麦克风等;存储器用于存储数据;音频电路用于采集和处理声音信号;显示屏用于显示各种信息;处理器用于执行上述第一方面各方法中所述的方法。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, etc.; the memory is used to store data; the audio circuit is used to collect and process sound signals; information; the processor is configured to execute the method described in each method of the first aspect.

本发明实施例还提供了一种计算机存储介质,用于储存为上述任一方面中终端所用的计算机软件指令,其包含用于执行上述各方面所设计的方法或程序。Embodiments of the present invention further provide a computer storage medium for storing computer software instructions used by the terminal in any of the foregoing aspects, including the methods or programs designed for executing the foregoing aspects.

本发明实施例还提供了一种数据处理系统,包括用于执行上述第一方面提供的各方法的模块。An embodiment of the present invention further provides a data processing system, including modules for executing the methods provided in the first aspect.

本发明实施例还提供了一种计算机程序,用于执行上述第一方面提供的各方法。Embodiments of the present invention further provide a computer program for executing the methods provided in the first aspect.

本发明实施例可以解决用户手机与外设耳机处于连接状态,但通话时用户不清楚当前连接状态而使用手机的听筒和麦克风进行通话时,导致的无法听到对方声音误以为是单通而挂机的问题。The embodiment of the present invention can solve the problem that the user's mobile phone and the peripheral headset are in a connected state, but when the user does not know the current connection state and uses the handset and the microphone of the mobile phone to make a call, the user cannot hear the other party's voice, mistakenly thinks it is a single-pass and hangs up The problem.

附图说明Description of drawings

图1为本发明实施例提供的终端的部分结构框图;1 is a partial structural block diagram of a terminal provided by an embodiment of the present invention;

图2为本发明实施例提供的一种切换通话模式的方法;FIG. 2 is a method for switching a call mode provided by an embodiment of the present invention;

图3为本发明实施例提供的又一种切换通话模式的方法;3 is another method for switching a call mode provided by an embodiment of the present invention;

图4为本发明实施例提供的又一种切换通话模式的方法。FIG. 4 is another method for switching a call mode provided by an embodiment of the present invention.

具体实施方式Detailed ways

下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, but not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.

本发明各实施例提供的方法应用于移动终端。该移动终端例如可以为:移动电话、平板电脑(Tablet Personal Computer)、膝上型电脑(Laptop Computer)、数码相机、个人数字助理(personal digital assistant,简称PDA)、导航装置、移动上网装置(MobileInternet Device,MID)或可穿戴式设备(Wearable Device)等。The methods provided by the embodiments of the present invention are applied to a mobile terminal. The mobile terminal may be, for example, a mobile phone, a tablet computer (Tablet Personal Computer), a laptop computer (Laptop Computer), a digital camera, a personal digital assistant (PDA for short), a navigation device, a mobile Internet device (Mobile Internet Device, MID) or wearable device (Wearable Device), etc.

图1为本发明实施例提供的终端的部分结构框图。以终端100为手机为例,参考图1,手机100包括:射频(Radio Frequency,RF)电路110、电源120、处理器130、存储器140、输入单元150、显示单元160、传感器170、音频电路180、以及无线保真(wireless fidelity,WiFi)模块190等部件。本领域技术人员可以理解,图1中示出的手机结构并不构成对手机的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。FIG. 1 is a partial structural block diagram of a terminal provided by an embodiment of the present invention. Taking theterminal 100 as a mobile phone as an example, referring to FIG. 1 , themobile phone 100 includes: a radio frequency (RF)circuit 110 , apower supply 120 , aprocessor 130 , amemory 140 , aninput unit 150 , adisplay unit 160 , asensor 170 , and anaudio circuit 180 , and a wireless fidelity (wireless fidelity, WiFi)module 190 and other components. Those skilled in the art can understand that the structure of the mobile phone shown in FIG. 1 does not constitute a limitation on the mobile phone, and may include more or less components than the one shown, or combine some components, or arrange different components.

下面结合图1对手机100的各个构成部件进行具体的介绍:In the following, each component of themobile phone 100 will be introduced in detail with reference to FIG. 1 :

RF电路110可用于收发信息或通话过程中,信号的接收和发送,特别地,将基站的下行信息接收后,给处理器130处理;另外,将设计上行的数据发送给基站。通常,RF电路包括但不限于天线、至少一个放大器、收发信机、耦合器、低噪声放大器(Low NoiseAmplifier,LNA)、双工器等。此外,RF电路110还可以通过无线通信与网络和其他设备通信。所述无线通信可以使用任一通信标准或协议,包括但不限于全球移动通讯系统(GlobalSystem of Mobile communication,GSM)、通用分组无线服务(General Packet RadioService,GPRS)、码分多址(Code Division Multiple Access,CDMA)、宽带码分多址(Wideband Code Division Multiple Access,WCDMA)、长期演进(Long Term Evolution,LTE)、电子邮件、短消息服务(Short Messaging Service,SMS)等。TheRF circuit 110 can be used for receiving and sending signals during transmission and reception of information or during a call. In particular, after receiving the downlink information of the base station, it is processed by theprocessor 130; in addition, the designed uplink data is sent to the base station. Typically, the RF circuit includes, but is 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, theRF circuitry 110 may also communicate with networks and other devices via wireless communication. The wireless communication can use any communication standard or protocol, including but not limited to Global System of Mobile Communication (GSM), General Packet Radio Service (General Packet Radio Service, GPRS), Code Division Multiple Access (Code Division Multiple Access) Access, CDMA), Wideband Code Division Multiple Access (Wideband Code Division Multiple Access, WCDMA), Long Term Evolution (Long Term Evolution, LTE), email, Short Messaging Service (Short Messaging Service, SMS) and the like.

存储器140可用于存储软件程序以及模块,处理器130通过运行存储在存储器140的软件程序以及模块,从而执行手机100的各种功能应用以及数据处理。存储器140可主要包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需的应用程序(比如声音播放功能、图象播放功能等)等;存储数据区可存储根据手机100的使用所创建的数据(比如音频数据、电话本等)等。此外,存储器140可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件、闪存器件、或其他易失性固态存储器件。本发明实施例的一方面,存储器140用于存储音频电路180发送的音频数据;用于在接收到处理器130调取数据的指令后,将相应的数据发送给处理器130。Thememory 140 may be used to store software programs and modules, and theprocessor 130 executes various functional applications and data processing of themobile phone 100 by running the software programs and modules stored in thememory 140 . Thememory 140 may mainly include a stored program area and a stored data area, wherein the stored program area may store an operating system, an application program required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the storage data area may store Data (such as audio data, phonebook, etc.) created according to the use of themobile phone 100, and the like. Additionally,memory 140 may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device. In one aspect of this embodiment of the present invention, thememory 140 is configured to store audio data sent by theaudio circuit 180 , and configured to send the corresponding data to theprocessor 130 after receiving an instruction of theprocessor 130 to retrieve data.

输入单元150可用于接收输入的数字或字符信息,以及产生与手机100的用户设置以及功能控制有关的键信号输入。具体地,输入单元150可包括触控面板151以及其他输入设备152。触控面板151,也称为触摸屏,可收集用户在其上或附近的触摸操作(比如用户使用手指、触笔等任何适合的物体或附件在触控面板151上或在触控面板151附近的操作),并根据预先设定的程式驱动相应的连接装置。可选的,触控面板151可包括触摸检测装置和触摸控制器两个部分。其中,触摸检测装置检测用户的触摸方位,并检测触摸操作带来的信号,将信号传送给触摸控制器;触摸控制器从触摸检测装置上接收触摸信息,并将它转换成触点坐标,再送给处理器130,并能接收处理器130发来的命令并加以执行。此外,可以采用电阻式、电容式、红外线以及表面声波等多种类型实现触控面板151。除了触控面板151,输入单元150还可以包括其他输入设备152。具体地,其他输入设备152可以包括但不限于物理键盘、功能键(比如音量控制按键、开关按键等)、轨迹球、鼠标、操作杆等中的一种或多种。本发明实施例中,当手机与外设耳机相连接时,其他输入设备152可以为外设耳机。例如:外设耳机可以包括一些用于控制音量或控制通话的实体键或虚拟键。通过外设耳机的这些键可以向手机输入信息或指令。在一些本发明实施例中,用户可以通过输入单元150来拨打或接听电话。Theinput unit 150 may be used to receive input numerical or character information, and generate key signal input related to user settings and function control of themobile phone 100 . Specifically, theinput unit 150 may include atouch panel 151 andother input devices 152 . Thetouch panel 151, also referred to as a touch screen, can collect the user's touch operations on or near it (such as the user's finger, stylus, etc., any suitable objects or accessories on or near the touch panel 151). operation), and drive the corresponding connection device according to the preset program. Optionally, thetouch panel 151 may include two parts, a touch detection device and a touch controller. Among them, the touch detection device detects the user's touch orientation, detects the 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 it into contact coordinates, and then sends it to the touch controller. To theprocessor 130, and can receive the command sent by theprocessor 130 and execute it. In addition, thetouch panel 151 can be implemented in various types such as resistive, capacitive, infrared, and surface acoustic waves. Besides thetouch panel 151 , theinput unit 150 may further includeother input devices 152 . Specifically,other input devices 152 may include, but are not limited to, one or more of physical keyboards, function keys (such as volume control keys, switch keys, etc.), trackballs, mice, joysticks, and the like. In this embodiment of the present invention, when the mobile phone is connected to the peripheral earphone, theother input device 152 may be the peripheral earphone. For example, a peripheral headset may include some physical keys or virtual keys for volume control or call control. Information or commands can be entered into the mobile phone through these keys of the peripheral headset. In some embodiments of the present invention, the user may make or receive calls through theinput unit 150 .

显示单元160可用于显示由用户输入的信息或提供给用户的信息以及手机100的各种菜单。显示单元160可包括显示面板161,可选的,可以采用LCD、OLED等形式来配置显示面板161。进一步的,触控面板151可覆盖显示面板161,当触控面板151检测到在其上或附近的触摸操作后,传送给处理器130以确定触摸事件的类型,随后处理器130根据触摸事件的类型在显示面板161上提供相应的视觉输出。虽然在图1中,触控面板151与显示面板161是作为两个独立的部件来实现手机100的输入和输出功能,但是在某些实施例中,可以将触控面板151与显示面板161集成而实现手机100的输入和输出功能。本发明实施例的一方面,显示单元160用于在接收处理器130发送的当前通话模式相关的提示信息和/或切换后通话模式相关的提示信息之后,进行显示。Thedisplay unit 160 may be used to display information input by the user or information provided to the user and various menus of themobile phone 100 . Thedisplay unit 160 may include adisplay panel 161, and optionally, thedisplay panel 161 may be configured in the form of an LCD, an OLED, or the like. Further, thetouch panel 151 may cover thedisplay panel 161. When thetouch panel 151 detects a touch operation on or near it, it transmits it to theprocessor 130 to determine the type of the touch event, and then theprocessor 130 determines the type of the touch event according to the touch event. Type provides corresponding visual output ondisplay panel 161 . Although in FIG. 1, thetouch panel 151 and thedisplay panel 161 are used as two independent components to realize the input and output functions of themobile phone 100, in some embodiments, thetouch panel 151 and thedisplay panel 161 may be integrated And realize the input and output functions of themobile phone 100 . In an aspect of the embodiment of the present invention, thedisplay unit 160 is configured to display after receiving the prompt information related to the current call mode and/or the prompt information related to the call mode after switching sent by theprocessor 130 .

手机100还可包括至少一种传感器170,比如光传感器、运动传感器以及其他传感器。具体地,光传感器可包括环境光传感器及接近传感器,其中,环境光传感器可根据环境光线的明暗来调节显示面板161的亮度,接近传感器可在手机100移动到耳边时,关闭显示面板161和/或背光。作为运动传感器的一种,加速计传感器可检测各个方向上(一般为三轴)加速度的大小,静止时可检测出重力的大小及方向,可用于识别手机姿态的应用(比如横竖屏切换、相关游戏、磁力计姿态校准)、振动识别相关功能(比如计步器、敲击)等。手机100还可以配置的陀螺仪、气压计、湿度计、温度计、红外线传感器等其他传感器,在此不再赘述。Thecell phone 100 may also include at least onesensor 170, such as a light sensor, a 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 thedisplay panel 161 according to the brightness of the ambient light, and the proximity sensor may turn off thedisplay panel 161 and thedisplay panel 161 when themobile phone 100 is moved 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), and can detect the magnitude and direction of gravity when it is stationary. games, magnetometer attitude calibration), vibration recognition related functions (such as pedometer, tapping), etc. Themobile phone 100 may also be configured with other sensors such as a gyroscope, a barometer, a hygrometer, a thermometer, and an infrared sensor, which will not be repeated here.

音频电路180、听筒181、麦克风182可提供用户与手机100之间的音频接口。音频电路180可将接收到的音频数据转换后的电信号,传输到听筒181,由听筒181转换为声音信号输出;另一方面,麦克风182将收集的声音信号转换为电信号,由音频电路180接收后转换为音频数据,再将音频数据输出至RF电路110以发送给比如另一手机,或者将音频数据输出至存储器140以便进一步处理,或者直接由处理器130对该音频数据进行处理。本发明实施例一方面,音频电路180用于接收到处理器130发送的开始接收并处理声音信号的指令后,开始接收并处理(数据转换)声音信号;用于从外设耳机和/或手机自身的麦克风182实时接收声音信号并将接收到的声音信号转换为音频数据;还用于将音频数据发送给处理器130和/或发送给存储器以便进一步处理。当外设耳机与手机连接之后,外设耳机的麦克风可以替代麦克风182工作,外设耳机的听筒可以替代听筒181工作。Theaudio circuit 180 , theearpiece 181 and the microphone 182 can provide an audio interface between the user and themobile phone 100 . Theaudio circuit 180 can transmit the received audio data converted electrical signal to theearpiece 181, and theearpiece 181 converts it into a sound signal for output; on the other hand, the microphone 182 converts the collected sound signal into an electrical signal, which is converted by theaudio circuit 180 into an electrical signal. After receiving, it is converted into audio data, and then output to theRF circuit 110 for transmission to, for example, another mobile phone, or output to thememory 140 for further processing, or directly processed by theprocessor 130 . In one aspect of the embodiment of the present invention, theaudio circuit 180 is configured to start receiving and processing (data conversion) the sound signal after receiving the instruction sent by theprocessor 130 to start receiving and processing the sound signal; 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 send the audio data to theprocessor 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 theearpiece 181 .

WiFi属于短距离无线传输技术,手机100通过WiFi模块190可以帮助用户收发电子邮件、浏览网页和访问流式媒体等,它为用户提供了无线的宽带互联网访问。虽然图1示出了WiFi模块190,但是可以理解的是,其并不属于手机100的必须构成,完全可以根据需要在不改变发明本质的范围内而省略。WiFi is a short-distance wireless transmission technology, and themobile phone 100 can help users to send and receive emails, browse web pages, access streaming media, etc. through theWiFi module 190, which provides users with wireless broadband Internet access. Although FIG. 1 shows theWiFi module 190, it should be understood that it is not a necessary component of themobile phone 100, and can be completely omitted within the scope of not changing the essence of the invention as required.

处理器130是手机100的控制中心,利用各种接口和线路连接整个手机的各个部分,通过运行或执行存储在存储器140内的软件程序和/或模块,以及调用存储在存储器140内的数据,执行手机100的各种功能和处理数据,从而实现基于手机的多种业务。可选的,处理器130可包括一个或多个处理单元;优选的,处理器130可集成应用处理器和调制解调处理器,其中,应用处理器主要处理操作系统、用户界面和应用程序等,调制解调处理器主要处理无线通信。可以理解的是,上述调制解调处理器也可以不集成到处理器130中。Theprocessor 130 is the control center of themobile phone 100, using various interfaces and lines to connect various parts of the entire mobile phone, by running or executing the software programs and/or modules stored in thememory 140, and calling the data stored in thememory 140, Execute various functions of themobile phone 100 and process data, thereby realizing various services based on the mobile phone. Optionally, theprocessor 130 may include one or more processing units; preferably, theprocessor 130 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface, and application programs, etc. , the modem processor mainly deals with wireless communication. It can be understood that, the above-mentioned modulation and demodulation processor may not be integrated into theprocessor 130.

本发明实施例一方面,处理器130用于当手机连接有外设耳机时,在该手机与远端设备建立通话连接之后,通过所述外设耳机的麦克风采集第一声音信号;音频电路180用于将采集到的所述第一声音信号转换为第一音频数据;处理器130还用于判断所述第一音频数据是否为有效数据;若所述第一音频数据为非有效数据,则切换为通过该手机的麦克风182开始采集第二声音信号,即,将通话模式切换为手机自身听筒/麦克风模式。In one aspect of the embodiment of the present invention, theprocessor 130 is configured to collect a first sound signal through the microphone of the peripheral headset when the mobile phone is connected to a peripheral headset, after the mobile phone establishes a call connection with the remote device; theaudio circuit 180 is used to convert the collected first sound signal into first audio data; theprocessor 130 is also used to determine whether the first audio data is valid data; if the first audio data is invalid data, then It is switched to start collecting the second sound signal through the microphone 182 of the mobile phone, that is, the call mode is switched to the handset/microphone mode of the mobile phone.

本发明实施例另一方面,在切换为通过麦克风182采集所述第二声音信号之后,音频电路180还用于将采集到的所述第二声音信号转换为第二音频数据。处理器130还用于判断所述第二音频数据是否为有效数据;若所述第二音频数据为非有效数据,则比较所述第一音频数据和所述第二音频数据;若所述第一音频数据的语音质量高于所述第二音频数据的语音质量,则切换为通过所述外设耳机的麦克风采集声音信号,即,将通话模式切换为耳机模式。In another aspect of the embodiment of the present invention, after switching to collect the second sound signal through the microphone 182, theaudio circuit 180 is further configured to convert the collected second sound signal into second audio data. Theprocessor 130 is further configured to judge whether the second audio data is valid data; if the second audio data is invalid 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, it is switched to collect the sound signal through the microphone of the peripheral headset, that is, the call mode is switched to the headset mode.

本发明实施例的又一方面,处理器130还用于在判断出当前通话模式后,将当前通话模式相关的提示信息发送给显示单元160、手机自身的听筒181或外设耳机的听筒);以及在切换通话模式之后,将切换后的通话模式相关的提示信息发送给显示单元160、手机自身的听筒181或外设耳机的听筒)。In yet another aspect of the embodiment of the present invention, theprocessor 130 is further configured to, after determining the current call mode, send prompt information related to the current call mode to thedisplay unit 160, thehandset 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 thedisplay unit 160, thehandset 181 of the mobile phone itself or the handset of the peripheral headset).

手机100还包括给各个部件供电的电源120(比如电池),优选的,电源可以通过电源管理系统与处理器130逻辑相连,从而通过电源管理系统实现管理充电、放电、以及功耗等功能。Themobile phone 100 also includes a power supply 120 (such as a battery) for supplying power to various components. Preferably, the power supply can be logically connected to theprocessor 130 through a power management system, so as to manage charging, discharging, and power consumption functions through the power management system.

尽管未示出,手机100还可以包括摄像头、蓝牙模块等,在此不再赘述。Although not shown, themobile phone 100 may also include a camera, a Bluetooth module, and the like, which will not be repeated here.

图2为本发明实施例提供的一种切换通话模式的方法。如图2所示,该方法包括:FIG. 2 is a method for switching a call mode provided by an embodiment of the present invention. As shown in Figure 2, the method includes:

步骤201、连接有外设耳机的第一终端与远端设备建立通话连接。Step 201: The first terminal connected with the peripheral headset 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 the earphone jack on the first terminal. When the peripheral headset is a wireless headset, the headset 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, wherein the first terminal may be a calling terminal or a called terminal.

步骤202、在该第一终端与远端设备建立通话连接之后,该第一终端通过该外设耳机的麦克风采集第一声音信号。Step 202: After the first terminal establishes a call connection with the remote device, the first terminal collects a first sound signal through the microphone of the peripheral earphone.

该外设耳机包括麦克风和听筒。麦克风可以用于采集用户发出的声音或者环境声音,并将采集到的声音传输给该第一终端。听筒可以将第一终端产生的声音信号或者第一终端从远端设备接收到的声音信号播放给用户听。The peripheral headset includes a microphone and an earpiece. The microphone may be used to collect the sound made by the user or the ambient sound, and transmit the collected sound to the first terminal. The earpiece 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 voice signal, through the microphone of the peripheral headset. 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: when the first terminal is used as the calling terminal to call the remote device and the call connection is not established, the microphone of the peripheral headset can be used to collect sound. The terminal can terminate the call. When the first terminal as the called terminal receives a call from the remote device and the call connection is not established, the microphone of the peripheral headset can also be used to collect sound. At this time, if the voice of the user hanging up the call is collected , the first terminal can hang up the incoming call, and if the voice of the user answering the incoming call is collected, the first terminal can answer the incoming call. In addition, when the first terminal is in a standby state or other states without a call, the microphone of the peripheral headset can also be used to collect the user's voice. For example, the user can perform voice control on the first terminal through the microphone of the peripheral headset, The first terminal is controlled by voice to open a certain application or execute a certain function. That is to say, after detecting that the connection with the peripheral earphone is established, the first terminal can collect sound through the microphone of the peripheral earphone. Of course, the first terminal may also collect sound through the microphone of the peripheral headset only after establishing a call connection with the remote device.

需要说明的是,当第一终端通过外设耳机的麦克风采集声音信号时,该第一终端可以通过外设耳机的听筒播放从远端设备接收的声音。It should be noted that when the first terminal collects the 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 first audio data, where the first audio data may be an analog signal or a digital signal after 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, then step 205 is executed, and if it is determined that the first audio data is valid data, the first terminal continues to use the peripheral headset to make a call, that is, the first terminal uses the headset mode to make a call, uses the microphone of the peripheral headset to collect external sound, and uses the earpiece of the peripheral headset to play sound.

其中,该第一终端可以通过以下任一种方式判断音频数据是否为有效数据。The first terminal may determine whether the audio data is valid data in any of the following manners.

方式一:该第一终端将音频数据与经验数据进行比对,通过比对,若判断出该音频数据为人发出的声音,则确定该音频数据为有效数据,若判断出该音频数据为背景音或环境音,则确定该音频数据为非有效数据。Mode 1: The first terminal compares the audio data with the empirical data, and through the comparison, if it is determined that the audio data is a sound made by a human, the audio data is determined to be valid data, and if it is determined that the audio data is background sound or ambient sound, the audio data is determined to be invalid data.

方式二:该第一终端识别音频数据的具体内容,若识别出该音频数据的内容为通话时用户经常说的语句,则确定所述第一音频数据为有效数据,若无法识别出该音频数据的内容,则确定该音频数据为非有效数据。Method 2: The first terminal identifies the specific content of the audio data, and if it recognizes that the content of the audio data is a sentence often said by the user during a call, the first audio data is determined to be valid data, and if the audio data cannot be identified content, it is determined that the audio data is invalid data.

方式三:该第一终端获取该音频数据与经验数据的语音类似度,若所述语音类似度大于预设阈值,则确定该音频数据为有效数据,若所述语音类似度小于或等于所述预设阈值,则确定该音频数据为非有效数据。Mode 3: The first terminal acquires the voice similarity between the audio data and the experience data, and if the voice similarity is greater than a preset threshold, the audio data is determined to be valid data, and if the voice similarity is less than or equal to the If the preset threshold is set, it is determined that the audio data is invalid data.

步骤205、该第一终端切换为通过该第一终端的麦克风采集第二声音信号。当通过外设耳机的麦克风采集到的声音为无效声音时,表示用户当前可能没有使用耳机进行通话,而是手持第一终端并在使用第一终端自身的麦克风和听筒。由此,该第一终端将耳机模式切换为正常模式,即切换为使用第一终端自身的麦克风和听筒进行通话的模式,通过第一终端自身的麦克风采集外部的声音信号,即第二声音信号。Step 205: The first terminal switches to collect the second sound signal through the microphone of the first terminal. When the sound collected by the microphone of the peripheral headset is invalid, it means that the user may not currently use the headset to make a call, but is holding the first terminal and using the microphone and the earpiece of the first terminal. As a result, the first terminal switches the headset mode to the normal mode, that is, switches to the mode of using the microphone and the earpiece of the first terminal to make a call, and collects the external sound signal through the microphone of the first terminal itself, that is, the second sound signal .

需要说明的是,当第一终端通过自身的麦克风采集声音信号时,该第一终端可以通过自身的听筒播放从远端设备接收的声音。It should be noted that when the first terminal collects the sound signal through its own microphone, the first terminal can play the sound received from the remote device through its own earpiece.

步骤205之后,该方法还可以包括步骤206。Afterstep 205 , the method may further includestep 206 .

步骤206、该第一终端将采集到的该第二声音信号转换为第二音频数据。将声音信号转换为音频数据的过程可以参见步骤203。Step 206: The first terminal converts the collected second sound signal into second audio data. The process of converting the sound signal into audio data may refer to step 203 .

步骤207、该第一终端判断该第二音频数据是否为有效数据;若判断出该第二音频数据为非有效数据,则执行步骤208;若判断出该第二音频数据为有效数据,则执行步骤210。具体判断音频数据是否为有效数据的方法可以参见步骤204中的描述。Step 207, the first terminal judges whether the second audio data is valid data; if it is judged that the second audio data is invalid data, then executesstep 208; if it judges that the second audio data is valid data, executesStep 210. For the specific method of determining whether the audio data is valid data, reference may be made to the description instep 204 .

步骤208、该第一终端比较该第一音频数据和该第二音频数据;若该第一音频数据的语音质量高于该第二音频数据的语音质量,则执行步骤209,若该第一音频数据的语音质量低于该第二音频数据的语音质量,则执行步骤210。Step 208, the first terminal compares 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, then performstep 209, if the first audio If the voice quality of the data is lower than the voice quality of the second audio data,step 210 is executed.

步骤209、该第一终端切换为通过该外设耳机的麦克风采集声音信号。Step 209: The first terminal switches to collect sound signals through the microphone of the peripheral earphone.

当通过外设耳机的麦克风采集到的声音信号的质量高于通过第一终端自身的麦克风采集到的声音信号的质量时,表示当前用户在使用外设耳机进行通话,所以第一终端需要重新切换为外设耳机模式进行通话,即通过外设耳机的麦克风采集外部声音。可能是因为当前通话的质量不高,才导致步骤204中的误判。When the quality of the sound signal collected through the microphone of the peripheral headset is higher than the quality of the sound signal collected through the microphone of the first terminal itself, it means that the current user is using the peripheral headset to make a call, so the first terminal needs to switch again. Make a call in the peripheral headset mode, that is, collect the external sound through the microphone of the peripheral headset. The misjudgment instep 204 may be caused because the quality of the current call is not high.

步骤210、该第一终端继续使用自身的麦克风和听筒进行通话,即该第一终端继续使用自身的麦克风采集外部声音,使用自身的听筒播放声音。当通过第一终端自身的麦克风采集到的声音信号的质量高于通过外设耳机的麦克风采集到的声音信号的质量时,表示当前用户没有在使用外设耳机。可能是因为当前通话的质量不高,才导致步骤207中的误判。Step 210: The first terminal continues to use its own microphone and earpiece to make a call, that is, the first terminal continues to use its own microphone to collect external sounds, and uses its own earpiece to play sounds. When the quality of the sound signal collected through the microphone of the first terminal is higher than the quality of the sound signal collected through the microphone of the peripheral earphone, it indicates that the current user is not using the peripheral earphone. The misjudgment instep 207 may be caused because the quality of the current call is not high.

本方法实施例还可以包括:第一终端可以提示用户当前处于哪种通话模式。例如:当第一终端检测到与外设耳机处于连接状态时,可以提示用户当前处于耳机模式;当第一终端从耳机模式切换到正常模式时,可以提示用户当前处于正常模式,或者提示用户模式已切换;当第一终端从正常模式切换回耳机模式时,可以再次提示用户当前所处的模式或者提示用户模式已切换。在提示用户时,第一终端可以通过自身的显示屏进行文字或图形提示,或者通过该第一终端的扬声器或外设耳机进行语音提示。This embodiment of the method may further include: the first terminal may prompt the user which call mode is currently in. For example: when the first terminal detects that it is connected to the peripheral headset, it can prompt the user that it is currently in the headset mode; when the first terminal switches from the headset mode to the normal mode, it can prompt the user that it is currently in the normal mode, or prompt the user mode Switched; when the first terminal switches from the normal mode back to the headset mode, the user can be prompted again to the current mode or the user mode has been switched. When prompting the user, the first terminal may give a text or graphic prompt through its own display screen, or give a voice prompt through a speaker or a 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 with the peripheral earphone first uses the peripheral earphone to make a call, and judges 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 earpiece to make a call, that is, automatically switch the call mode. After switching, if it is judged that the quality of the sound collected by the microphone of the terminal is lower than the quality of the sound collected by the microphone of the peripheral headset, the terminal automatically switches back to the headset call mode, that is, switches back to using the peripheral headset to make a call. Therefore, through the embodiments of the present invention, automatic switching of the call mode can be realized, and the convenience of using the terminal can be improved. In addition, the embodiment of the present invention can prompt the user with the information of the current call mode and the mode switching, so that the user can know the behavior of the terminal automatically switching the call mode.

下面通过图3、图4所示的实施例,以手机为例,具体描述本发明实施例的方案。The solutions of the embodiments of the present invention are described in detail below by taking a mobile phone as an example through the embodiments shown in FIG. 3 and FIG. 4 .

具体的,如图3所示,该方法可以包括如下步骤:Specifically, as shown in Figure 3, the method may include the following steps:

步骤301、手机开始进行通话。手机接收到来电呼叫之后,用户触发接听电话的操作;或者手机作为主叫,用户通过手机拨打电话。手机的处理器可以接收用户通过手机的输入单元输入的接听指令或拨打指令。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 caller, 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 in a connected state with a peripheral headset, including judging whether the earphone jack is occupied by a wired headset (that is, judging whether the mobile phone and the wired headset are in a connected state) and/or judging whether the mobile phone and a wireless headset such as a Bluetooth headset are in a connected state. Connected state; if it is determined that the mobile phone and the peripheral headset are not in a connected state, go to step 308; if it is determined that the mobile phone and the peripheral headset are in a connected state, go to step 303.

需要说明的是,本发明实施例并不限定步骤302的执行顺序,或者,可以不包括步骤302。在有线耳机插入手机之后或者无线耳机与手机配对连接之后,手机即可获知已与外设耳机建立连接,在后续的通话过程中,手机就可以选择耳机模式,即可以在步骤301之后,进入步骤303。It should be noted that the embodiment of the present invention does not limit the execution order ofstep 302, or step 302 may not be included. After the wired headset is inserted into the mobile phone or the wireless headset is paired and connected to the mobile phone, the mobile phone can know that the connection with the peripheral headset has been established. In the subsequent call process, the mobile phone can select the headset mode, that is, afterstep 301, enter step 303.

步骤303、该手机通过外设耳机的麦克风采集外部的声音。Step 303 , the mobile phone collects external sounds through the microphone of the peripheral earphone.

步骤304、该手机将采集到的声音信号转换为第一音频数据,并可以存储该第一音频数据。例如,该手机的音频电路接收并处理外设耳机采集的声音信号,并将处理后的第一音频数据发送给手机的处理器和/或存储器,可以是实时发送,也可以是按系统预设的一定周期发送(例如每10ms发送一次)。Step 304: The mobile phone converts the collected sound signal into first audio data, and can 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 memory of the mobile phone, which can be sent in real time or preset according to the system It is sent at a certain period of time (for example, every 10ms).

步骤305、该手机判断预设时间段内的第一音频数据是否为有效数据;如果是有效数据,则执行步骤306,如果是无效数据,则执行步骤307。其中,预设时间段内的第一音频数据可以为:该预设时间段内外设耳机采集到的声音转换的第一音频数据。Step 305: The mobile phone determines whether the first audio data within the preset time period is valid data; if it is valid data, then executesstep 306, and if it is invalid data, executesstep 307. Wherein, the first audio data within the preset time period may be: the first audio data converted from the sound collected by the internal and external earphones in the preset time period.

例如,该手机的处理器或音频电路判断该第一音频数据是否为有效数据。当由该音频电路来判断时,该音频电路可以将判断结果发送给该处理器。所述预设时间段可以是通话建立的最开始的一段时间,例如通话建立后的最初1秒、2秒、3秒或者5秒,具体时间的长短不做限定。For example, the processor or audio circuit of the mobile phone determines whether the first audio data is valid data. When judged by the audio circuit, the audio circuit can send the judgment result to the processor. The preset time period may be the first period of time when the call is established, for example, the first 1 second, 2 seconds, 3 seconds, or 5 seconds after the call is established, and the specific time period is not limited.

其中,手机判断音频数据是否为有效数据可以通过以下任意一种或几种方式:Among them, the mobile phone can determine whether the audio data is valid data through any one or several of the following methods:

方式一:将识别结果与经验数据(可以是专家库、智能库、经验数据库等存储了海量人声的语音数据库)比对,通过比对判定音频数据是人声(有效数据)还是背景音或环境音(无效数据);所述的识别可以为语音识别或语义识别,也可以为对音频数据的其它算法,只要使得音频数据能够与经验数据进行对比即可。Method 1: Compare the recognition result with the experience data (it can be an expert database, an intelligent database, an experience database, etc. that store a large number of human voices), and determine whether the audio data is human voice (valid data) or background sound or Ambient sound (invalid data); the recognition can be speech recognition or semantic recognition, or other algorithms for audio data, as long as the audio data can be compared with the empirical data.

方式二:识别音频数据的具体内容,并根据具体内容判断是否为有效数据。例如:若识别出的音频数据的内容为“你好”、“你是谁”、“喂”、“说话”、“没声音”、“我是Tom”等打电话时用户常说的词句,语言不做限定,可以是中文、英文、俄文、日文等多种语音输入,则判断为有效数据;或者只要能够识别出具体内容,就可以判断为有效数据;若无法识别,则判断为无效数据。Method 2: Identify the specific content of the audio data, and determine whether it is valid data according to the specific content. For example, if the content of the identified audio data is "hello", "who are you", "hello", "speaking", "no voice", "I'm Tom" and other words that users often say when making a phone call, 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 recognized, it can be judged as valid data; if it cannot be recognized, it is judged as invalid data.

方式三:通过比对识别结果与经验数据以获取语音类似度,判断语音类似度是否超过预设的语音类似度阈值,若超过该阈值则判断为有效数据,若未超过该阈值则判断为无效数据。Method 3: Obtain the voice similarity by comparing the recognition result with the empirical data, and judge whether the voice similarity exceeds the preset voice similarity threshold. If it exceeds the threshold, it is judged as valid data, and if it does not exceed the threshold, it is judged as 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. During or after switching, the mobile phone may 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 handset 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 when making a call, and still uses the mobile phone to make local calls instead of using the headset, the mobile phone will automatically determine which call mode to use according to the actual situation to prevent mistakenly hanging up Disconnect. In addition, the phone's own audio circuit and processor can automatically switch the call mode, which saves the user's manual operation steps, and can solve the problem of accidentally hanging up the phone without adding additional hardware.

在某些不常见的情况下,用户确实是使用外设耳机进行通话,但由于采集的声音信号很差(距离基站较远或背景噪音太大),可能会导致声音信号被识别为无效输入,而被误切换为使用手机自身听筒/麦克风模式通话。为了进一步解决该问题,本实施例可以在前述方法实施例的基础上,进一步通过比较手机自身听筒/麦克风模式和耳机模式下采集的声音,确定最终通话模式并进行自动切换。具体如图4所示,在图3所示实施例的基础上,假设手机已经执行步骤307,即手机已切换为手机自身听筒/麦克风模式,在此之后,如图4所示,还可以包括如下步骤:In some uncommon cases, the user does use a peripheral headset to make a call, but due to the poor sound signal collected (far from the base station or too much background noise), the sound signal may be recognized as invalid input, It was mistakenly switched to use the handset/microphone mode of the mobile phone to make a call. In order to further solve this problem, this embodiment can determine the final call mode and perform automatic switching by comparing the sound collected in the handset/microphone mode and the earphone mode of the mobile phone 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 performedstep 307, that is, the mobile phone has been switched to the handset/microphone mode of the mobile phone. After that, as shown in FIG. Follow the steps below:

步骤401、手机开始使用自身的麦克风采集声音信号。例如:手机的处理器通知手机自身的麦克风开始采集外部声音,并通知音频电路开始接收并处理该麦克风采集的声音信号。Step 401 , the mobile phone starts to use its own microphone to collect sound signals. For example, the processor of the mobile phone notifies the microphone of the mobile phone 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 instep 401 into second audio data.

步骤403、手机判断预设时间段内的第二音频数据是否为有效数据;如果是有效数据,则执行步骤404,如果是无效数据,则执行步骤405。其中,该预设时间段可以为切换通话模式之后的一段时间,例如为切换到通过手机自身麦克风采集声音之后的最初1秒、2秒、3秒或者5秒,具体时间的长短不做限定。该预设时间段的长短可以与步骤305中的一样,也可以不一样。手机判断第二音频数据是否为有效数据的方法参见前述手机判断第一音频数据是否为有效数据的方法。Step 403 , the mobile phone determines whether the second audio data within the preset time period is valid data; if it is valid data, executestep 404 , and if it is invalid data, executestep 405 . The preset time period may be a period of time after switching the call mode, for example, the first 1 second, 2 seconds, 3 seconds, or 5 seconds after switching to the phone's own microphone to collect sound, and the specific time period is not limited. The length of the preset time period may or may not be the same as that instep 305 . For the method for the mobile phone to determine whether the second audio data is valid data, refer to the aforementioned method for the mobile phone to determine 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 obtains the first audio data in the headset mode and the second audio data in the handset/microphone mode of the mobile phone; specifically, the following two methods are available:

方式一:该手机获取当前处理得到的该第二音频数据,并且从该手机的存储器中获取之前存储的耳机模式下的该第一音频数据;Mode 1: the mobile phone obtains the second audio data currently processed, and obtains the previously stored first audio data in the headset mode from the memory of the mobile phone;

方式二:该手机从存储器中获取该第一音频数据和第二音频数据,其中,该第二音频数据是在步骤402中由手机存储在自身的存储器中的。Manner 2: The mobile phone obtains the first audio data and the second audio data from the memory, wherein the second audio data is stored in the memory of the mobile phone instep 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, it can be judged whether the voice quality of the first audio data is higher than that of the first audio data by comparing key factors such as the volume and clarity of the voice. 2. The voice quality of the audio data, if not, go to step 404, if yes, that is, when the voice quality received by the phone's own microphone is lower than the voice quality received by the earphone, go to step 407.

步骤407、手机将通话模式切换为耳机模式。Step 407, the mobile phone switches the call mode to the headset mode.

当用户确实是使用外设耳机进行通话,但由于语音输入的音量较小或音质较差(例如背景音较大)导致被识别为无效输入而误切换为手机自身听筒/麦克风模式通话时,本实施例可以通过比较手机自身听筒/麦克风模式和耳机模式下采集并处理得到的音频数据,确定最终通话模式并进行自动切换,避免由于背景音太嘈杂或者信号太差时导致的误切换。When the user is indeed using a peripheral headset to make a call, but due to the low volume of the voice input or poor sound quality (such as loud background sound), it is recognized as invalid input and is mistakenly switched to the phone's own handset/microphone The embodiment can determine the final call mode and perform automatic switching by comparing the audio data collected and processed in the handset/microphone mode of the mobile phone itself and the earphone mode to avoid false switching caused by too noisy background sound or poor signal.

当通过本发明实施例提供的方法切换通话模式后,手机提供文字或语音提示,提示用户手机通话模式已经切换,便于用户发现系统自动切换通话模式的行为,使用户能了解是否使用不当造成听不见声音。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 remind the user that the call mode of the mobile phone has been switched, which is convenient for the user to find the behavior of the system automatically switching the call mode, so that the user can know whether improper use causes inaudible sound.

本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机程序来指令相关的硬件来完成,所述的程序可存储于一计算机可读取存储介质中,该程序在执行时,可包括如上述各方法的实施例的流程。其中,所述的存储介质可为磁碟、光盘、只读存储记忆体(Read-Only Memory,ROM)或随机存储记忆体(Random AccessMemory,RAM)等。Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be implemented by instructing relevant hardware through a computer program, and the program can be stored in a computer-readable storage medium. During execution, the processes of the embodiments of the above-mentioned methods may be included. The storage medium may be a magnetic disk, an optical disk, a read-only memory (Read-Only Memory, ROM), or a random access memory (Random Access Memory, RAM) or the like.

以上所述,仅为本发明的具体实施方式,但本发明的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本发明揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本发明的保护范围之内。因此,本发明的保护范围应该以权利要求的保护范围为准。The above are only specific embodiments of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed by the present invention. should be included within the protection scope of the present invention. Therefore, the protection scope of the present invention should be subject to the protection scope of the claims.

Claims (16)

the processor is further configured to: judging whether the second audio data is valid data or not; if the second audio data is valid data, the terminal continues to use a microphone of the terminal and a receiver of the terminal to carry out conversation; if the second audio data is invalid data, comparing the first audio data with the second audio data; if the voice quality of the first audio data is higher than that of the second audio data, switching to a mode of collecting voice signals through a microphone of the external earphone and carrying out communication with a receiver of the external earphone; and if the voice quality of the first audio data is lower than that of the second audio data, the terminal continues to use a microphone of the terminal and a receiver of the terminal to carry out conversation.
CN201780004769.2A2016-12-292017-04-01 Method and terminal for switching call modeActiveCN108432220B (en)

Applications Claiming Priority (3)

Application NumberPriority DateFiling DateTitle
CN20161131772016-12-29
CNPCT/CN2016/1131772016-12-29
PCT/CN2017/079341WO2018120487A1 (en)2016-12-292017-04-01Call mode switching method and terminal

Publications (2)

Publication NumberPublication Date
CN108432220A CN108432220A (en)2018-08-21
CN108432220Btrue CN108432220B (en)2020-02-21

Family

ID=62710189

Family Applications (1)

Application NumberTitlePriority DateFiling Date
CN201780004769.2AActiveCN108432220B (en)2016-12-292017-04-01 Method and terminal for switching call mode

Country Status (2)

CountryLink
CN (1)CN108432220B (en)
WO (1)WO2018120487A1 (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN109618052A (en)*2018-12-112019-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-292019-05-10维沃移动通信有限公司 A call processing method and mobile terminal
CN109889940A (en)*2019-03-012019-06-14钰太芯微电子科技(上海)有限公司A kind of ear belt-type apparatus with proximity sensor
CN114466283B (en)*2022-02-082025-02-18维沃移动通信有限公司 Audio acquisition method, device, electronic device and peripheral component method
CN115050380A (en)*2022-07-262022-09-13江西联创电声有限公司Audio signal processing method, earphone, and computer-readable storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN103200311A (en)*2013-02-252013-07-10华为终端有限公司Control method and control device of communication terminal conversation audio passage and communication terminal
CN103826013A (en)*2014-03-172014-05-28联想(北京)有限公司Method for switching communication modes and mobile terminal
CN104754463A (en)*2013-12-312015-07-01环达电脑(上海)有限公司Switching method of internal and external microphone signals
CN105812585A (en)*2016-06-012016-07-27珠海市魅族科技有限公司Method for switching conversation modes and mobile terminal

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
US20090023479A1 (en)*2007-07-172009-01-22Broadcom CorporationMethod and system for routing phone call audio through handset or headset

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN103200311A (en)*2013-02-252013-07-10华为终端有限公司Control method and control device of communication terminal conversation audio passage and communication terminal
CN104754463A (en)*2013-12-312015-07-01环达电脑(上海)有限公司Switching method of internal and external microphone signals
CN103826013A (en)*2014-03-172014-05-28联想(北京)有限公司Method for switching communication modes and mobile terminal
CN105812585A (en)*2016-06-012016-07-27珠海市魅族科技有限公司Method for switching conversation modes and mobile terminal

Also Published As

Publication numberPublication date
WO2018120487A1 (en)2018-07-05
CN108432220A (en)2018-08-21

Similar Documents

PublicationPublication DateTitle
CN108769432B (en)Main earphone switching method and mobile terminal
CN108432220B (en) Method and terminal for switching call mode
US10630826B2 (en)Information processing device
CN112997471B (en) Audio path switching method and apparatus, readable storage medium, and electronic equipment
CN107580143A (en) A display method and mobile terminal
CN107463243B (en)Screen control method, mobile terminal and computer readable storage medium
CN108063908A (en)A kind of video call method, device and mobile terminal
CN109088997B (en)Game audio control method, terminal and computer readable storage medium
CN106331359A (en) A voice signal collection method, device and terminal
EP2119203B1 (en)Battery saving selective screen control
CN107547704A (en)Call MIC switching method, device and mobile terminal
CN102984374A (en) Communication terminal and switching method of call mode thereof
CN110225195A (en)A kind of audio communication method and terminal
CN108566221A (en)Call control method and relevant device
CN108512992A (en) An information processing method and device
CN106126170A (en) A terminal sound effect setting method and terminal
CN108712563A (en)call control method, device and mobile terminal
CN108307075B (en) A kind of incoming call processing method and mobile terminal
CN107682360A (en)The processing method and mobile terminal of a kind of voice call
CN108307048B (en)Message output method and device and mobile terminal
CN108235288B (en) A Bluetooth audio playback method and mobile terminal
CN107734153B (en)Call control method, terminal and computer readable storage medium
CN109981443A (en)Voice interactive method, device and terminal device
WO2018201943A1 (en)Device control method, device and system
CN110913070B (en) A calling method and terminal device

Legal Events

DateCodeTitleDescription
PB01Publication
PB01Publication
SE01Entry into force of request for substantive examination
SE01Entry into force of request for substantive examination
GR01Patent grant
GR01Patent grant

[8]ページ先頭

©2009-2025 Movatter.jp