WO2018018782A1 - Noise reduction method, terminal, and computer storage medium - Google Patents
Noise reduction method, terminal, and computer storage medium Download PDFInfo
- Publication number
- WO2018018782A1 WO2018018782A1 PCT/CN2016/105309 CN2016105309W WO2018018782A1 WO 2018018782 A1 WO2018018782 A1 WO 2018018782A1 CN 2016105309 W CN2016105309 W CN 2016105309W WO 2018018782 A1 WO2018018782 A1 WO 2018018782A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- terminal
- mic
- signal
- noise
- earphone
- Prior art date
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04M—TELEPHONIC COMMUNICATION
- H04M9/00—Arrangements for interconnection not involving centralised switching
- H04M9/08—Two-way loud-speaking telephone systems with means for conditioning the signal, e.g. for suppressing echoes for one or both directions of traffic
- H04M9/082—Two-way loud-speaking telephone systems with means for conditioning the signal, e.g. for suppressing echoes for one or both directions of traffic using echo cancellers
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04R—LOUDSPEAKERS, MICROPHONES, GRAMOPHONE PICK-UPS OR LIKE ACOUSTIC ELECTROMECHANICAL TRANSDUCERS; DEAF-AID SETS; PUBLIC ADDRESS SYSTEMS
- H04R1/00—Details of transducers, loudspeakers or microphones
- H04R1/10—Earpieces; Attachments therefor ; Earphones; Monophonic headphones
- H04R1/1083—Reduction of ambient noise
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04M—TELEPHONIC COMMUNICATION
- H04M1/00—Substation equipment, e.g. for use by subscribers
- H04M1/02—Constructional features of telephone sets
- H04M1/19—Arrangements of transmitters, receivers, or complete sets to prevent eavesdropping, to attenuate local noise or to prevent undesired transmission; Mouthpieces or receivers specially adapted therefor
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04R—LOUDSPEAKERS, MICROPHONES, GRAMOPHONE PICK-UPS OR LIKE ACOUSTIC ELECTROMECHANICAL TRANSDUCERS; DEAF-AID SETS; PUBLIC ADDRESS SYSTEMS
- H04R1/00—Details of transducers, loudspeakers or microphones
- H04R1/10—Earpieces; Attachments therefor ; Earphones; Monophonic headphones
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04R—LOUDSPEAKERS, MICROPHONES, GRAMOPHONE PICK-UPS OR LIKE ACOUSTIC ELECTROMECHANICAL TRANSDUCERS; DEAF-AID SETS; PUBLIC ADDRESS SYSTEMS
- H04R3/00—Circuits for transducers, loudspeakers or microphones
- H04R3/02—Circuits for transducers, loudspeakers or microphones for preventing acoustic reaction, i.e. acoustic oscillatory feedback
Definitions
- the invention relates to a noise reduction technology, in particular to a noise reduction method and a terminal and a computer storage medium.
- Intelligent terminals such as mobile phones, tablet computers, etc., generally have a microphone (MIC), which can be used to collect sound information, for example, using a MIC to collect the user's voice during a call.
- MIC microphone
- the noise reduction of the MIC of the smart terminal is mainly based on the MIC of the terminal itself for noise reduction.
- There are two MICs in the terminal one is the main MIC for collecting voice, and the other is the auxiliary MIC for collecting environmental noise.
- the data collected by the two MICs is processed to achieve noise reduction.
- the above solution only reduces noise for the MIC of the terminal body, and the method for noise reduction between the earphone MIC and the MIC on the terminal body is blank, which causes the headset MIC to work when the headset is used for talking, on the terminal.
- the MIC does not work and the resources generated are wasted.
- an embodiment of the present invention provides a noise reduction method, a terminal, and a computer storage medium.
- Audio processing is performed on the voice signal and the ambient noise signal to obtain a noise-reduced voice signal.
- the detecting whether the earphone is connected to the terminal comprises:
- the detecting whether the earphone is connected to the terminal, and detecting whether the terminal is in a call state includes:
- Detect whether the MIC pin of the earphone socket changes from a low level to a high level Detect whether the MIC pin of the earphone socket changes from a low level to a high level.
- the MIC pin of the earphone socket changes from a low level to a high level it is determined that the terminal is in a call state.
- the audio processing of the voice signal and the ambient noise signal includes:
- the method further includes:
- the primary MIC and the secondary MIC are turned off.
- the detecting module is configured to detect whether the earphone is connected to the terminal, and detect whether the terminal is in a call state;
- a setting module configured to: when detecting that the earphone is connected to the terminal, and the terminal is in a call state, setting the headset MIC in the working state as a main MIC; and activating the terminal MIC, setting the terminal MIC as a secondary MIC;
- An acquisition module configured to collect a voice signal by using the primary MIC, and collect an ambient noise signal by using the auxiliary MIC;
- an audio module configured to perform audio processing on the voice signal and the ambient noise signal to obtain a noise-reduced voice signal.
- the detecting module is further configured to detect whether the earphone is inserted into the terminal; or use Bluetooth to detect whether the earphone is connected to the terminal.
- the detecting module includes:
- the first detecting sub-module is configured to detect whether the detecting pin of the earphone socket changes from a low level to a high level, and when the detecting pin of the earphone socket changes from a low level to a high level, determining that the earphone is inserted into the terminal;
- the second detecting submodule is configured to detect whether the MIC pin of the earphone socket changes from a low level to a high level, and when the MIC pin of the earphone socket changes from a low level to a high level, determining that the terminal is in a call state.
- the audio module includes:
- a signal amplification submodule configured to perform signal amplification processing on the voice signal and the ambient noise signal
- noise reduction sub-module configured to cancel a noise signal in the voice signal according to the ambient noise signal to obtain an analog noise-reduced voice signal
- an analog-to-digital conversion submodule configured to perform analog-to-digital conversion on the analog noise-reduced speech signal to obtain a digital noise-reduction speech signal.
- the terminal further includes:
- the module is closed, configured to turn off the primary MIC and the secondary MIC when the terminal is over.
- the computer storage medium provided by the embodiment of the present invention stores a computer program for performing the above noise reduction method.
- the earphone MIC that is in the working state Setting a main MIC; and activating the terminal MIC, setting the terminal MIC as a secondary MIC; collecting a voice signal by using the main MIC, and collecting an environmental noise signal by using the auxiliary MIC; and the voice signal and the ambient noise
- the signal is subjected to audio processing to obtain a noise-reduced speech signal.
- FIG. 1 is a schematic structural diagram of hardware of an optional mobile terminal embodying various embodiments of the present invention
- FIG. 2 is a schematic diagram of a wireless communication system of the mobile terminal shown in FIG. 1;
- FIG. 3 is a schematic flowchart of a noise reduction method according to Embodiment 1 of the present invention.
- FIG. 4 is a schematic flowchart of a noise reduction method according to Embodiment 2 of the present invention.
- FIG. 5 is a schematic structural diagram of a terminal according to Embodiment 3 of the present invention.
- FIG. 6 is a schematic structural diagram of a terminal according to Embodiment 4 of the present invention.
- the mobile terminal can be implemented in various forms.
- the terminal described in the embodiments of the present invention may include, for example, a mobile phone, a smart phone, a notebook computer, a digital broadcast receiver, a personal digital assistant (PDA, Personal Digital Assistant), a tablet (PAD), a portable multimedia player (PMP). , Portable Media Player), mobile devices of navigation devices and the like, and fixed terminals such as digital TVs, desktop computers, and the like.
- PDA Personal Digital Assistant
- PDA Personal Digital Assistant
- PAD personal Digital Assistant
- PMP portable multimedia player
- mobile devices of navigation devices and the like and fixed terminals
- fixed terminals such as digital TVs, desktop computers, and the like.
- fixed terminals such as digital TVs, desktop computers, and the like.
- FIG. 1 is a schematic diagram showing the hardware structure of an optional mobile terminal for implementing various embodiments of the present invention.
- the mobile terminal 100 may include a wireless communication unit 110, an audio/video (A/V) input unit 120, a user input unit 130, a sensing unit 140, an output unit 150, a memory 160, an interface unit 170, a controller 180, and a power supply unit 190. and many more.
- Figure 1 illustrates a mobile terminal having various components, but it should be understood that not all illustrated components are required to be implemented. More or fewer components can be implemented instead.
- the wireless communication unit 110 specifically includes a broadcast receiving module 111, a mobile communication module 112, a wireless internet module 113, a short-range communication module 114, and a location information module 115.
- the A/V input unit 120 specifically includes a camera 121 and a microphone 122.
- the sensing unit 140 specifically includes a proximity sensor 141.
- the output unit 150 specifically includes a display unit 151, an audio output module 152, and an alarm unit 153.
- the controller 180 specifically includes: a multimedia module 181.
- the mobile terminal 100 as shown in FIG. 1 may be configured to utilize the number of transmissions via a frame or a packet It operates according to, for example, wired and wireless communication systems as well as satellite-based communication systems.
- a communication system in which a mobile terminal is operable according to an embodiment of the present invention will now be described with reference to FIG.
- Such communication systems may use different air interfaces and/or physical layers.
- the air interface used by the communication system includes, for example, Frequency Division Multiple Access (FDMA), Time Division Multiple Access (TDMA), Code Division Multiple Access (CDMA), and General Purpose Code Division Multiple Access (CDMA).
- FDMA Frequency Division Multiple Access
- TDMA Time Division Multiple Access
- CDMA Code Division Multiple Access
- CDMA General Purpose Code Division Multiple Access
- UMTS Universal Mobile Telecommunications System
- LTE Long Term Evolution
- GSM Global System for Mobile Communications
- the following description relates to a CDMA communication system, but such teachings are equally applicable to other types of systems.
- the CDMA wireless communication system may include a plurality of mobile terminals 100, a plurality of base stations (BS) 270, a base station controller (BSC) 275, and a mobile switching center (MSC) 280.
- the MSC 280 is configured to interface with a Public Switched Telephone Network (PSTN) 290.
- PSTN Public Switched Telephone Network
- the MSC 280 is also configured to interface with a BSC 275 that can be coupled to the base station 270 via a backhaul line.
- the backhaul line can be constructed in accordance with any of a number of well known interfaces including, for example, E1/T1, ATM, IP, PPP, Frame Relay, HDSL, ADSL, or xDSL. It will be appreciated that the system as shown in FIG. 2 can include multiple BSCs 275.
- Terminals such as mobile phones, tablet computers, etc.
- a headphone jack When the headphone jack of the terminal is plugged into the earphone for a call, there is only one main microphone (MIC) on the earphone, and there is no noise reduction MIC, so that the call process is likely to cause noise and Insufficient collection of surrounding sound field environment information.
- the terminal itself has a main MIC, and some terminals have two main and two MICs; when talking with a headset, Only the main MIC on the earphone is used, and the MIC on the terminal is idle, which causes a great waste.
- the MIC of the headset itself is used as the main MIC, and the MIC of the terminal itself is automatically switched to the noise reduction MIC.
- the main MIC and the noise reduction MIC are provided, and the noise suppression and the pair are suppressed.
- the collection of the ambient sound field will be better.
- the earphone MIC and the terminal MIC are combined to work at the same time, thereby suppressing noise and improving the collection effect of the environmental sound field, and fully utilizing resources.
- FIG. 3 is a schematic flowchart of a noise reduction method according to Embodiment 1 of the present invention.
- the noise reduction method in this example is applied to a terminal.
- the noise reduction method includes the following steps:
- Step 301 Detect whether the earphone is connected to the terminal, and detect whether the terminal is in a call state.
- the user before using the earphone, the user needs to perform the following operations: the terminal is powered on; the earphone is inserted into the terminal, and the call state is maintained. Specifically, the user makes a call to make the terminal in a call state; or the user answers the call, so that the terminal is in a call state.
- the headset can be a four-segment MIC headset.
- a four-segment MIC earphone there are also a speaker component and a microphone component.
- the horn component is used to play an audio signal
- the microphone component is used to collect an audio signal.
- the four-segment MIC headset has the following features:
- the earphone plug is in the form of four sections;
- the headset is a stereo headset.
- detecting whether the earphone is connected to the terminal specifically: detecting whether the earphone is inserted into the terminal.
- the headset can be a Bluetooth headset.
- a Bluetooth headset there are also speaker components and microphone components.
- the horn component is used to play an audio signal
- the microphone component is used to collect an audio signal.
- detecting whether the earphone is connected to the terminal specifically: detecting whether the earphone is connected to the terminal by using Bluetooth.
- Step 302 When it is detected that the earphone is connected to the terminal, and the terminal is in a call state, the headset MIC in the working state is set as the main MIC; and the terminal MIC is activated, and the terminal MIC is set as the auxiliary MIC.
- the earphone MIC when it is detected that the earphone is connected to the terminal, and the terminal is in a call state, the earphone MIC is already in an active state. Set the headset MIC in working state as the main MIC.
- the terminal MIC is activated, and the terminal MIC is set as a secondary MIC.
- the secondary MIC is used for noise reduction. Therefore, the secondary MIC is also referred to as a noise reduction MIC.
- Step 303 Acquire a voice signal by using the primary MIC, and collect an ambient noise signal by using the secondary MIC.
- the earphone MIC and the terminal MIC work simultaneously, the earphone MIC (main MIC) collects a voice signal, and the terminal MIC (secondary MIC) collects an environmental noise signal.
- Step 304 Perform audio processing on the voice signal and the ambient noise signal to obtain a noise-reduced voice signal.
- the signals of the primary MIC and the secondary MIC are simultaneously sent to the audio module for audio processing, thereby denoising the voice signal to obtain a noise-reduced voice signal.
- the signals of the main MIC and the auxiliary MIC are simultaneously sent to the audio module for audio processing, including:
- the primary MIC and the secondary MIC are turned off.
- the terminal MIC auxiliary MIC
- FIG. 4 is a schematic flowchart of a noise reduction method according to Embodiment 2 of the present invention.
- the noise reduction method in this example is applied to a terminal.
- the noise reduction method includes the following steps:
- Step 401 Detect whether the detection pin of the earphone socket changes from a low level to a high level, and when the detection pin of the earphone socket changes from a low level to a high level, determine that the earphone is inserted into the terminal.
- the user before using the earphone, the user needs to perform the following operations: the terminal is powered on; the earphone is inserted into the terminal, and the call state is maintained. Specifically, the user makes a call to make the terminal in a call state; or the user answers the call, so that the terminal is in a call state.
- the headset can be a four-segment MIC headset.
- a four-segment MIC earphone there are also a speaker component and a microphone component.
- the horn component is used to play an audio signal
- the microphone component is used to collect an audio signal.
- the four-segment MIC headset has the following features:
- the earphone plug is in the form of four sections;
- the headset is a stereo headset.
- the detection pin of the earphone socket is at a low level. After the four-stage MIC earphone is plugged in, the left or right channel of the earphone will connect the detection pin to it. At this time, the detection pin of the earphone socket is high. Level, when the detection module detects that the detection pin changes from low level to high level, it detects that a headset is inserted into the terminal.
- Step 402 Detect whether the MIC pin of the earphone socket changes from a low level to a high level. When the MIC pin of the earphone socket changes from a low level to a high level, it is determined that the terminal is in a call state.
- the MIC pin on the headphone jack is low. After dialing the phone, the terminal is kept in the call state. At this time, the MIC pin of the headphone jack will have a DC offset of about 1V, and the detection module detects When the MIC pin level signal on the headphone jack changes from low level to high level, it is detected that the terminal is in a call state.
- Step 403 When it is detected that the earphone is inserted into the terminal, and the terminal is in a call state, the headset MIC in the working state is set as the main MIC; and the terminal MIC is activated, and the terminal MIC is set as the auxiliary MIC.
- the earphone MIC when it is detected that the earphone is connected to the terminal, and the terminal is in a call state, the earphone MIC is already in an active state. Set the headset MIC in working state as the main MIC.
- the terminal MIC is activated, and the terminal MIC is set as a secondary MIC.
- the secondary MIC is used for noise reduction. Therefore, the secondary MIC is also referred to as a noise reduction MIC.
- the activation mode of the activation terminal MIC is different according to the type of the terminal MIC.
- the MIC type is a micro-electromechanical system (MEMS) MIC
- the activation mode may be: pulling up the MEMS MIC in the terminal.
- the microphone's DC bias voltage (micbias) provides a 1V DC offset to the terminal MIC.
- Step 404 Acquire a voice signal by using the primary MIC, and collect an environmental noise signal by using the secondary MIC.
- the earphone MIC and the terminal MIC work simultaneously, the earphone MIC (main MIC) collects a voice signal, and the terminal MIC (secondary MIC) collects an environmental noise signal.
- Step 405 Perform audio processing on the voice signal and the ambient noise signal to obtain a noise-reduced voice signal.
- the signals of the primary MIC and the secondary MIC are simultaneously sent to the audio module for audio processing, thereby denoising the voice signal to obtain a noise-reduced voice signal.
- the signals of the main MIC and the auxiliary MIC are simultaneously sent to the audio module for audio processing, including:
- the primary MIC and the secondary MIC are turned off, so that the terminal MIC (secondary MIC) can achieve normal operation.
- FIG. 5 is a schematic structural diagram of a terminal according to Embodiment 3 of the present invention. As shown in FIG. 5, the terminal includes:
- the detecting module 51 is configured to detect whether the earphone is connected to the terminal, and detect whether the terminal is in a call state;
- the setting module 52 is configured to: when detecting that the earphone is connected to the terminal, and the terminal is in a call state, set the headset MIC in the working state as the main MIC; and activate the terminal MIC, and set the terminal MIC as the auxiliary MIC ;
- the acquiring module 53 is configured to collect a voice signal by using the primary MIC, and collect an environmental noise signal by using the auxiliary MIC;
- the audio module 54 is configured to perform audio processing on the voice signal and the ambient noise signal to obtain a noise-reduced voice signal.
- each module in the terminal may be processed by a Central Processing Unit (CPU), a Micro Processor Unit (MPU), or a digital signal processing located in the terminal. (Digital Signal Processor, DSP), or Field Programmable Gate Array (FPGA) implementation.
- CPU Central Processing Unit
- MPU Micro Processor Unit
- DSP Digital Signal Processor
- FPGA Field Programmable Gate Array
- FIG. 6 is a schematic structural diagram of a terminal according to Embodiment 4 of the present invention. As shown in FIG. 6, the terminal includes:
- the detecting module 61 is configured to detect whether the earphone is connected to the terminal, and detect whether the terminal is in a call state;
- the setting module 62 is configured to: when detecting that the earphone is connected to the terminal, and the terminal is in the In the speech state, the headset MIC in the working state is set as the main MIC; and the terminal MIC is activated, and the terminal MIC is set as the auxiliary MIC;
- the acquiring module 63 is configured to collect a voice signal by using the primary MIC, and collect an environmental noise signal by using the auxiliary MIC;
- the audio module 64 is configured to perform audio processing on the voice signal and the ambient noise signal to obtain a noise-reduced voice signal.
- the detecting module 61 is further configured to detect whether the earphone is inserted into the terminal; or use Bluetooth to detect whether the earphone is connected to the terminal.
- the detecting module 61 includes:
- the first detecting sub-module 611 is configured to detect whether the detecting pin of the earphone socket changes from a low level to a high level, and when the detecting pin of the earphone socket changes from a low level to a high level, determining that the earphone is inserted into the terminal;
- the second detecting sub-module 612 is configured to detect whether the MIC pin of the earphone socket changes from a low level to a high level, and when the MIC pin of the earphone socket changes from a low level to a high level, determining that the terminal is in a call state.
- the audio module 64 includes:
- the signal amplification sub-module 641 is configured to perform signal amplification processing on the voice signal and the ambient noise signal;
- the noise reduction sub-module 642 is configured to: cancel the noise signal in the voice signal according to the ambient noise signal, to obtain an analog noise-reduced voice signal;
- the analog-to-digital conversion sub-module 643 is configured to perform analog-to-digital conversion on the analog noise-reduced speech signal to obtain a digital noise-reduction speech signal.
- the terminal further includes:
- a shutdown module (not shown) is configured to turn off the primary MIC and the secondary MIC when the terminal talk ends.
- each module and its sub-modules in the terminal may be implemented by a central processing unit (CPU) or a microprocessor (Micro Processor Unit, MPU) located in the terminal. Or a digital signal processor (DSP), or a Field Programmable Gate Array (FPGA).
- CPU central processing unit
- MPU Micro Processor Unit
- DSP digital signal processor
- FPGA Field Programmable Gate Array
- the terminal in the form of a software function module and sold or used as a stand-alone product, it may also be stored in a computer readable storage medium.
- the technical solution of the embodiments of the present invention may be embodied in the form of a software product in essence or in the form of a software product stored in a storage medium, including a plurality of instructions.
- a computer device (which may be a personal computer, server, or network device, etc.) is caused to perform all or part of the methods described in various embodiments of the present invention.
- the foregoing storage medium includes various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read only memory (ROM), a magnetic disk, or an optical disk.
- program codes such as a USB flash drive, a mobile hard disk, a read only memory (ROM), a magnetic disk, or an optical disk.
- an embodiment of the present invention further provides a computer storage medium, wherein a computer program is stored, and the computer program is used to perform the noise reduction method of the embodiment of the present invention.
- embodiments of the present invention can be provided as a method, system, or computer program product. Accordingly, the present invention can take the form of a hardware embodiment, a software embodiment, or a combination of software and hardware. Moreover, the invention can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage and optical storage, etc.) including computer usable program code.
- the computer program instructions can also be stored in a computer readable memory that can direct a computer or other programmable data processing device to operate in a particular manner, such that the instructions stored in the computer readable memory produce an article of manufacture comprising the instruction device.
- the apparatus implements the functions specified in one or more blocks of a flow or a flow and/or block diagram of the flowchart.
- These computer program instructions can also be loaded onto a computer or other programmable data processing device such that a series of operational steps are performed on a computer or other programmable device to produce computer-implemented processing for execution on a computer or other programmable device.
- the instructions provide steps for implementing the functions specified in one or more of the flow or in a block or blocks of a flow diagram.
- the technical solution of the embodiment of the present invention when detecting that the earphone is connected to the terminal, and the terminal is in a call state, setting the headset MIC in the working state as the main MIC; and activating the terminal MIC as the auxiliary MIC; using the main MIC
- the voice signal is collected, and the ambient noise signal is collected by using the auxiliary MIC; the voice signal and the environmental noise signal are processed by audio to obtain a noise-reduced voice signal.
- the noise reduction effect of the user using the headset to make a call is greatly improved; the hardware resources of the terminal itself (ie, the terminal MIC) are fully utilized without adding new hardware costs.
Landscapes
- Engineering & Computer Science (AREA)
- Signal Processing (AREA)
- Physics & Mathematics (AREA)
- Acoustics & Sound (AREA)
- Health & Medical Sciences (AREA)
- General Health & Medical Sciences (AREA)
- Otolaryngology (AREA)
- Telephone Function (AREA)
Abstract
Disclosed are a noise reduction method, a terminal, and a computer storage medium. The method comprises: detecting whether earphones are connected to a terminal, and detecting whether the terminal is in a call state; setting an MIC of the earphones in a working state as a main MIC when it is detected that the earphones are connected to the terminal, and the terminal is in a call state; activating the MIC of the terminal, and setting the MIC of the terminal as an auxiliary MIC; acquiring a voice signal by using the main MIC, and acquiring an ambient noise signal by using the auxiliary MIC; and performing audio processing on the voice signal and the ambient noise signal to obtain a noise-reduced voice signal.
Description
本发明涉及降噪技术,尤其涉及一种降噪方法及终端、计算机存储介质。The invention relates to a noise reduction technology, in particular to a noise reduction method and a terminal and a computer storage medium.
智能终端,例如手机、平板电脑等一般都具有麦克风(MIC),利用MIC能够对声音信息进行采集,例如在通话过程中利用MIC对用户的声音进行采集。Intelligent terminals, such as mobile phones, tablet computers, etc., generally have a microphone (MIC), which can be used to collect sound information, for example, using a MIC to collect the user's voice during a call.
目前,智能终端的MIC的降噪主要是用终端本身的MIC进行降噪。在终端中具有两个MIC,一个为主MIC,用于采集语音;另一个为辅MIC,用于采集环境噪声,通过对两个MIC采集到的数据进行处理,从而实现降噪。At present, the noise reduction of the MIC of the smart terminal is mainly based on the MIC of the terminal itself for noise reduction. There are two MICs in the terminal, one is the main MIC for collecting voice, and the other is the auxiliary MIC for collecting environmental noise. The data collected by the two MICs is processed to achieve noise reduction.
上述方案只是针对终端本体的MIC进行降噪,对于耳机MIC和终端本体上的MIC两者之间配合进行降噪的方式却是空白,导致了在用耳机通话时,只有耳机MIC工作,终端上的MIC不工作而产生的资源浪费。The above solution only reduces noise for the MIC of the terminal body, and the method for noise reduction between the earphone MIC and the MIC on the terminal body is blank, which causes the headset MIC to work when the headset is used for talking, on the terminal. The MIC does not work and the resources generated are wasted.
发明内容Summary of the invention
为解决上述技术问题,本发明实施例提供了一种降噪方法及终端、计算机存储介质。To solve the above technical problem, an embodiment of the present invention provides a noise reduction method, a terminal, and a computer storage medium.
本发明实施例提供的降噪方法,包括:The noise reduction method provided by the embodiment of the invention includes:
检测耳机是否与终端相连接,以及检测终端是否处于通话状态;Detecting whether the headset is connected to the terminal, and detecting whether the terminal is in a call state;
当检测到耳机与终端相连接,且所述终端处于通话状态时,将处于工作状态的耳机MIC设置为主MIC;并激活终端MIC,将所述终端MIC设
置为辅MIC;When detecting that the earphone is connected to the terminal, and the terminal is in a call state, setting the headset MIC in the working state as the main MIC; and activating the terminal MIC, setting the terminal MIC
Set as auxiliary MIC;
利用所述主MIC采集语音信号,以及利用所述辅MIC采集环境噪声信号;Acquiring a voice signal by using the main MIC, and collecting an environmental noise signal by using the auxiliary MIC;
对所述语音信号以及所述环境噪声信号进行音频处理,得到降噪语音信号。Audio processing is performed on the voice signal and the ambient noise signal to obtain a noise-reduced voice signal.
本发明实施例中,所述检测耳机是否与终端相连接,包括:In the embodiment of the present invention, the detecting whether the earphone is connected to the terminal comprises:
检测耳机是否插入至终端;或者,Detect whether the headset is plugged into the terminal; or,
利用蓝牙检测耳机是否与终端相连接。Use Bluetooth to detect if the headset is connected to the terminal.
本发明实施例中,所述检测耳机是否与终端相连接,以及检测终端是否处于通话状态,包括:In the embodiment of the present invention, the detecting whether the earphone is connected to the terminal, and detecting whether the terminal is in a call state, includes:
检测耳机插座的检测管脚是否由低电平变化为高电平,当耳机插座的检测管脚由低电平变化为高电平时,确定耳机插入至终端;Detecting whether the detecting pin of the earphone socket changes from a low level to a high level, and when the detecting pin of the earphone socket changes from a low level to a high level, determining that the earphone is inserted into the terminal;
检测耳机插座的MIC管脚是否由低电平变化为高电平,当耳机插座的MIC管脚由低电平变化为高电平时,确定终端处于通话状态。Detect whether the MIC pin of the earphone socket changes from a low level to a high level. When the MIC pin of the earphone socket changes from a low level to a high level, it is determined that the terminal is in a call state.
本发明实施例中,所述对所述语音信号以及所述环境噪声信号进行音频处理,包括:In the embodiment of the present invention, the audio processing of the voice signal and the ambient noise signal includes:
对所述语音信号以及所述环境噪声信号进行信号放大处理;Performing signal amplification processing on the voice signal and the ambient noise signal;
根据所述环境噪声信号,消除所述语音信号中的噪声信号,得到模拟降噪语音信号;Acquiring the noise signal in the voice signal according to the ambient noise signal to obtain an analog noise-reduced voice signal;
对所述模拟降噪语音信号进行模数转换,得到数字降噪语音信号。Performing analog-to-digital conversion on the analog noise-reduced speech signal to obtain a digital noise-reduction speech signal.
本发明实施例中,所述方法还包括:In the embodiment of the present invention, the method further includes:
当终端通话结束时,关闭所述主MIC和所述辅MIC。When the terminal talk ends, the primary MIC and the secondary MIC are turned off.
本发明实施例提供的终端,包括:The terminal provided by the embodiment of the present invention includes:
检测模块,配置为检测耳机是否与终端相连接,以及检测终端是否处于通话状态;
The detecting module is configured to detect whether the earphone is connected to the terminal, and detect whether the terminal is in a call state;
设置模块,配置为当检测到耳机与终端相连接,且所述终端处于通话状态时,将处于工作状态的耳机MIC设置为主MIC;并激活终端MIC,将所述终端MIC设置为辅MIC;a setting module configured to: when detecting that the earphone is connected to the terminal, and the terminal is in a call state, setting the headset MIC in the working state as a main MIC; and activating the terminal MIC, setting the terminal MIC as a secondary MIC;
采集模块,配置为利用所述主MIC采集语音信号,以及利用所述辅MIC采集环境噪声信号;An acquisition module, configured to collect a voice signal by using the primary MIC, and collect an ambient noise signal by using the auxiliary MIC;
音频模块,配置为对所述语音信号以及所述环境噪声信号进行音频处理,得到降噪语音信号。And an audio module configured to perform audio processing on the voice signal and the ambient noise signal to obtain a noise-reduced voice signal.
本发明实施例中,所述检测模块,还配置为检测耳机是否插入至终端;或者,利用蓝牙检测耳机是否与终端相连接。In the embodiment of the present invention, the detecting module is further configured to detect whether the earphone is inserted into the terminal; or use Bluetooth to detect whether the earphone is connected to the terminal.
本发明实施例中,所述检测模块包括:In the embodiment of the present invention, the detecting module includes:
第一检测子模块,配置为检测耳机插座的检测管脚是否由低电平变化为高电平,当耳机插座的检测管脚由低电平变化为高电平时,确定耳机插入至终端;The first detecting sub-module is configured to detect whether the detecting pin of the earphone socket changes from a low level to a high level, and when the detecting pin of the earphone socket changes from a low level to a high level, determining that the earphone is inserted into the terminal;
第二检测子模块,配置为检测耳机插座的MIC管脚是否由低电平变化为高电平,当耳机插座的MIC管脚由低电平变化为高电平时,确定终端处于通话状态。The second detecting submodule is configured to detect whether the MIC pin of the earphone socket changes from a low level to a high level, and when the MIC pin of the earphone socket changes from a low level to a high level, determining that the terminal is in a call state.
本发明实施例中,所述音频模块包括:In the embodiment of the present invention, the audio module includes:
信号放大子模块,配置为对所述语音信号以及所述环境噪声信号进行信号放大处理;a signal amplification submodule configured to perform signal amplification processing on the voice signal and the ambient noise signal;
降噪子模块,配置为根据所述环境噪声信号,消除所述语音信号中的噪声信号,得到模拟降噪语音信号;a noise reduction sub-module configured to cancel a noise signal in the voice signal according to the ambient noise signal to obtain an analog noise-reduced voice signal;
模数转换子模块,配置为对所述模拟降噪语音信号进行模数转换,得到数字降噪语音信号。And an analog-to-digital conversion submodule configured to perform analog-to-digital conversion on the analog noise-reduced speech signal to obtain a digital noise-reduction speech signal.
本发明实施例中,所述终端还包括:In the embodiment of the present invention, the terminal further includes:
关闭模块,配置为当终端通话结束时,关闭所述主MIC和所述辅MIC。
The module is closed, configured to turn off the primary MIC and the secondary MIC when the terminal is over.
本发明实施例提供的计算机存储介质存储有计算机程序,该计算机程序用于执行上述降噪方法。The computer storage medium provided by the embodiment of the present invention stores a computer program for performing the above noise reduction method.
本发明实施例的技术方案中,检测耳机是否与终端相连接,以及检测终端是否处于通话状态;当检测到耳机与终端相连接,且所述终端处于通话状态时,将处于工作状态的耳机MIC设置为主MIC;并激活终端MIC,将所述终端MIC设置为辅MIC;利用所述主MIC采集语音信号,以及利用所述辅MIC采集环境噪声信号;对所述语音信号以及所述环境噪声信号进行音频处理,得到降噪语音信号。如此,结合耳机MIC和终端MIC后,用户使用耳机打电话的降噪效果得到了很大提升;充分利用了终端本身的硬件资源(即终端MIC),而不用增加新的硬件成本。In the technical solution of the embodiment of the present invention, detecting whether the earphone is connected to the terminal, and detecting whether the terminal is in a call state; when detecting that the earphone is connected to the terminal, and the terminal is in a call state, the earphone MIC that is in the working state Setting a main MIC; and activating the terminal MIC, setting the terminal MIC as a secondary MIC; collecting a voice signal by using the main MIC, and collecting an environmental noise signal by using the auxiliary MIC; and the voice signal and the ambient noise The signal is subjected to audio processing to obtain a noise-reduced speech signal. In this way, after combining the headphone MIC and the terminal MIC, the noise reduction effect of the user using the headset to make a call is greatly improved; the hardware resources of the terminal itself (ie, the terminal MIC) are fully utilized without adding new hardware costs.
附图以示例而非限制的方式大体示出了本文中所讨论的各个实施例。The drawings generally illustrate the various embodiments discussed herein by way of example and not limitation.
图1为实现本发明各个实施例的一个可选的移动终端的硬件结构示意图;1 is a schematic structural diagram of hardware of an optional mobile terminal embodying various embodiments of the present invention;
图2为如图1所示的移动终端的无线通信系统示意图;2 is a schematic diagram of a wireless communication system of the mobile terminal shown in FIG. 1;
图3为本发明实施例一的降噪方法的流程示意图;3 is a schematic flowchart of a noise reduction method according to Embodiment 1 of the present invention;
图4为本发明实施例二的降噪方法的流程示意图;4 is a schematic flowchart of a noise reduction method according to Embodiment 2 of the present invention;
图5为本发明实施例三的终端的结构组成示意图;FIG. 5 is a schematic structural diagram of a terminal according to Embodiment 3 of the present invention; FIG.
图6为本发明实施例四的终端的结构组成示意图。FIG. 6 is a schematic structural diagram of a terminal according to Embodiment 4 of the present invention.
为了能够更加详尽地了解本发明实施例的特点与技术内容,下面结合附图对本发明实施例的实现进行详细阐述,所附附图仅供参考说明之用,并非用来限定本发明实施例。The embodiments of the present invention are described in detail below with reference to the accompanying drawings.
现在将参考附图描述实现本发明各个实施例的移动终端。在后续的描
述中,使用用于表示元件的诸如“模块”、“部件”或“单元”的后缀仅为了有利于本发明实施例的说明,其本身并没有特定的意义。因此,“模块”与“部件”可以混合地使用。A mobile terminal embodying various embodiments of the present invention will now be described with reference to the accompanying drawings. Follow-up
The suffixes such as "module", "component" or "unit" used to denote elements are merely illustrative of the embodiments of the invention, and are not intended to be specific in themselves. Therefore, "module" and "component" can be used in combination.
移动终端可以以各种形式来实施。例如,本发明实施例中描述的终端可以包括诸如移动电话、智能电话、笔记本电脑、数字广播接收器、个人数字助理(PDA,Personal Digital Assistant)、平板电脑(PAD)、便携式多媒体播放器(PMP,Portable Media Player)、导航装置等等的移动终端以及诸如数字TV、台式计算机等等的固定终端。下面,假设终端是移动终端。然而,本领域技术人员将理解的是,除了特别用于移动目的的元件之外,根据本发明的实施方式的构造也能够应用于固定类型的终端。The mobile terminal can be implemented in various forms. For example, the terminal described in the embodiments of the present invention may include, for example, a mobile phone, a smart phone, a notebook computer, a digital broadcast receiver, a personal digital assistant (PDA, Personal Digital Assistant), a tablet (PAD), a portable multimedia player (PMP). , Portable Media Player), mobile devices of navigation devices and the like, and fixed terminals such as digital TVs, desktop computers, and the like. In the following, it is assumed that the terminal is a mobile terminal. However, those skilled in the art will appreciate that configurations in accordance with embodiments of the present invention can be applied to fixed type terminals in addition to components that are specifically for mobile purposes.
图1为实现本发明各个实施例的一个可选的移动终端的硬件结构示意图。FIG. 1 is a schematic diagram showing the hardware structure of an optional mobile terminal for implementing various embodiments of the present invention.
移动终端100可以包括无线通信单元110、音频/视频(A/V)输入单元120、用户输入单元130、感测单元140、输出单元150、存储器160、接口单元170、控制器180和电源单元190等等。图1示出了具有各种组件的移动终端,但是应理解的是,并不要求实施所有示出的组件。可以替代地实施更多或更少的组件。The mobile terminal 100 may include a wireless communication unit 110, an audio/video (A/V) input unit 120, a user input unit 130, a sensing unit 140, an output unit 150, a memory 160, an interface unit 170, a controller 180, and a power supply unit 190. and many more. Figure 1 illustrates a mobile terminal having various components, but it should be understood that not all illustrated components are required to be implemented. More or fewer components can be implemented instead.
无线通信单元110具体包括:广播接收模块111、移动通信模块112、无线互联网模块113、短程通信模块114、位置信息模块115。The wireless communication unit 110 specifically includes a broadcast receiving module 111, a mobile communication module 112, a wireless internet module 113, a short-range communication module 114, and a location information module 115.
A/V输入单元120具体包括:相机121、麦克风122。The A/V input unit 120 specifically includes a camera 121 and a microphone 122.
感测单元140具体包括:接近传感器141。The sensing unit 140 specifically includes a proximity sensor 141.
输出单元150具体包括:显示单元151、音频输出模块152、警报单元153。The output unit 150 specifically includes a display unit 151, an audio output module 152, and an alarm unit 153.
控制器180具体包括:多媒体模块181。The controller 180 specifically includes: a multimedia module 181.
如图1中所示的移动终端100可以被构造为利用经由帧或分组发送数
据的诸如有线和无线通信系统以及基于卫星的通信系统来操作。The mobile terminal 100 as shown in FIG. 1 may be configured to utilize the number of transmissions via a frame or a packet
It operates according to, for example, wired and wireless communication systems as well as satellite-based communication systems.
现在将参考图2描述其中根据本发明实施例的移动终端能够操作的通信系统。A communication system in which a mobile terminal is operable according to an embodiment of the present invention will now be described with reference to FIG.
这样的通信系统可以使用不同的空中接口和/或物理层。例如,由通信系统使用的空中接口包括例如频分多址(FDMA,Frequency Division Multiple Access)、时分多址(TDMA,Time Division Multiple Access)、码分多址(CDMA,Code Division Multiple Access)和通用移动通信系统(UMTS,Universal Mobile Telecommunications System)(特别地,长期演进(LTE,Long Term Evolution))、全球移动通信系统(GSM)等等。作为非限制性示例,下面的描述涉及CDMA通信系统,但是这样的教导同样适用于其它类型的系统。Such communication systems may use different air interfaces and/or physical layers. For example, the air interface used by the communication system includes, for example, Frequency Division Multiple Access (FDMA), Time Division Multiple Access (TDMA), Code Division Multiple Access (CDMA), and General Purpose Code Division Multiple Access (CDMA). UMTS (Universal Mobile Telecommunications System) (particularly, Long Term Evolution (LTE), Global System for Mobile Communications (GSM), and the like. As a non-limiting example, the following description relates to a CDMA communication system, but such teachings are equally applicable to other types of systems.
参考图2,CDMA无线通信系统可以包括多个移动终端100、多个基站(BS,Base Station)270、基站控制器(BSC,Base Station Controller)275和移动交换中心(MSC,Mobile Switching Center)280。MSC280被构造为与公共电话交换网络(PSTN,Public Switched Telephone Network)290形成接口。MSC280还被构造为与可以经由回程线路耦接到基站270的BSC275形成接口。回程线路可以根据若干己知的接口中的任一种来构造,所述接口包括例如E1/T1、ATM、IP、PPP、帧中继、HDSL、ADSL或xDSL。将理解的是,如图2中所示的系统可以包括多个BSC275。Referring to FIG. 2, the CDMA wireless communication system may include a plurality of mobile terminals 100, a plurality of base stations (BS) 270, a base station controller (BSC) 275, and a mobile switching center (MSC) 280. . The MSC 280 is configured to interface with a Public Switched Telephone Network (PSTN) 290. The MSC 280 is also configured to interface with a BSC 275 that can be coupled to the base station 270 via a backhaul line. The backhaul line can be constructed in accordance with any of a number of well known interfaces including, for example, E1/T1, ATM, IP, PPP, Frame Relay, HDSL, ADSL, or xDSL. It will be appreciated that the system as shown in FIG. 2 can include multiple BSCs 275.
基于上述移动终端100硬件结构以及通信系统,提出本发明方法各个实施例。Based on the above-described hardware structure of the mobile terminal 100 and the communication system, various embodiments of the method of the present invention are proposed.
终端,例如手机、平板电脑等大都具有耳机插孔,当终端的耳机插孔插入耳机进行通话时,耳机上只有一个主麦克风(MIC),没有降噪MIC,这样,通话过程容易引起噪声及对周围声场环境信息的采集不足。然而,终端本身还有主MIC,有些终端上还有主副两个MIC;在用耳机通话时,
仅仅用到耳机上的主MIC,对于终端上的MIC都闲置不用,造成了很大的浪费。基于此,当用耳机通话时,耳机本身的MIC作为主MIC,终端本身的MIC自动切换为降噪MIC,这样,用耳机通话时既有主MIC,也有降噪MIC,对噪声的抑制和对环境声场的采集效果会更好。Terminals, such as mobile phones, tablet computers, etc., all have a headphone jack. When the headphone jack of the terminal is plugged into the earphone for a call, there is only one main microphone (MIC) on the earphone, and there is no noise reduction MIC, so that the call process is likely to cause noise and Insufficient collection of surrounding sound field environment information. However, the terminal itself has a main MIC, and some terminals have two main and two MICs; when talking with a headset,
Only the main MIC on the earphone is used, and the MIC on the terminal is idle, which causes a great waste. Based on this, when talking with the headset, the MIC of the headset itself is used as the main MIC, and the MIC of the terminal itself is automatically switched to the noise reduction MIC. Thus, when the headset is used for conversation, both the main MIC and the noise reduction MIC are provided, and the noise suppression and the pair are suppressed. The collection of the ambient sound field will be better.
本发明实施例中,结合了耳机MIC和终端MIC同时工作,从而对噪声的抑制和对环境声场的采集效果进行了改善,并充分利用了资源。In the embodiment of the present invention, the earphone MIC and the terminal MIC are combined to work at the same time, thereby suppressing noise and improving the collection effect of the environmental sound field, and fully utilizing resources.
图3为本发明实施例一的降噪方法的流程示意图,本示例中的降噪方法应用于终端,如图3所示,所述降噪方法包括以下步骤:3 is a schematic flowchart of a noise reduction method according to Embodiment 1 of the present invention. The noise reduction method in this example is applied to a terminal. As shown in FIG. 3, the noise reduction method includes the following steps:
步骤301:检测耳机是否与终端相连接,以及检测终端是否处于通话状态。Step 301: Detect whether the earphone is connected to the terminal, and detect whether the terminal is in a call state.
本发明实施例中,用户在使用耳机前,需要执行如下操作:终端开机;将耳机插入终端,并保持通话状态。具体地,用户拨打电话,使得终端处于通话状态;或者,用户接听电话,使得终端处于通话状态。In the embodiment of the present invention, before using the earphone, the user needs to perform the following operations: the terminal is powered on; the earphone is inserted into the terminal, and the call state is maintained. Specifically, the user makes a call to make the terminal in a call state; or the user answers the call, so that the terminal is in a call state.
在一实施方式中,耳机可以是四段式MIC耳机。在四段式MIC耳机中,具有喇叭部件也有麦克风部件。其中,喇叭部件用于播放音频信号,麦克风部件用于采集音频信号。In an embodiment, the headset can be a four-segment MIC headset. In a four-segment MIC earphone, there are also a speaker component and a microphone component. The horn component is used to play an audio signal, and the microphone component is used to collect an audio signal.
这里,四段式MIC耳机具有如下特征:Here, the four-segment MIC headset has the following features:
1、耳机插头为四节形式;1. The earphone plug is in the form of four sections;
2、耳机线内部导线数量至少有4根;2. There are at least 4 internal wires in the headphone cable;
3、耳机是立体声耳麦。3. The headset is a stereo headset.
基于上述耳机,检测耳机是否与终端相连接,具体为:检测耳机是否插入至终端。Based on the foregoing earphone, detecting whether the earphone is connected to the terminal, specifically: detecting whether the earphone is inserted into the terminal.
在另一实施方式中,耳机可以是蓝牙耳机。在蓝牙耳机中,具有喇叭部件也有麦克风部件。其中,喇叭部件用于播放音频信号,麦克风部件用于采集音频信号。
In another embodiment, the headset can be a Bluetooth headset. In a Bluetooth headset, there are also speaker components and microphone components. The horn component is used to play an audio signal, and the microphone component is used to collect an audio signal.
基于上述耳机,检测耳机是否与终端相连接,具体为:利用蓝牙检测耳机是否与终端相连接。Based on the foregoing earphone, detecting whether the earphone is connected to the terminal, specifically: detecting whether the earphone is connected to the terminal by using Bluetooth.
步骤302:当检测到耳机与终端相连接,且所述终端处于通话状态时,将处于工作状态的耳机MIC设置为主MIC;并激活终端MIC,将所述终端MIC设置为辅MIC。Step 302: When it is detected that the earphone is connected to the terminal, and the terminal is in a call state, the headset MIC in the working state is set as the main MIC; and the terminal MIC is activated, and the terminal MIC is set as the auxiliary MIC.
本发明实施例中,当检测到耳机与终端相连接,且所述终端处于通话状态时,耳机MIC已经处于工作状态。将处于工作状态的耳机MIC设置为主MIC。In the embodiment of the present invention, when it is detected that the earphone is connected to the terminal, and the terminal is in a call state, the earphone MIC is already in an active state. Set the headset MIC in working state as the main MIC.
与此同时,并激活终端MIC,将所述终端MIC设置为辅MIC,这里,辅MIC用来进行降噪,因此,辅MIC也称为降噪MIC。At the same time, the terminal MIC is activated, and the terminal MIC is set as a secondary MIC. Here, the secondary MIC is used for noise reduction. Therefore, the secondary MIC is also referred to as a noise reduction MIC.
步骤303:利用所述主MIC采集语音信号,以及利用所述辅MIC采集环境噪声信号。Step 303: Acquire a voice signal by using the primary MIC, and collect an ambient noise signal by using the secondary MIC.
本发明实施例中,耳机MIC和终端MIC同时工作,耳机MIC(主MIC)采集语音信号,终端MIC(辅MIC)采集环境噪声信号。In the embodiment of the present invention, the earphone MIC and the terminal MIC work simultaneously, the earphone MIC (main MIC) collects a voice signal, and the terminal MIC (secondary MIC) collects an environmental noise signal.
步骤304:对所述语音信号以及所述环境噪声信号进行音频处理,得到降噪语音信号。Step 304: Perform audio processing on the voice signal and the ambient noise signal to obtain a noise-reduced voice signal.
本发明实施例中,将主MIC和辅MIC的信号同时送入到音频模块进行音频处理,从而对语音信号进行降噪,得到降噪语音信号。In the embodiment of the present invention, the signals of the primary MIC and the secondary MIC are simultaneously sent to the audio module for audio processing, thereby denoising the voice signal to obtain a noise-reduced voice signal.
这里,将主MIC和辅MIC的信号同时送入到音频模块进行音频处理具体包括:Here, the signals of the main MIC and the auxiliary MIC are simultaneously sent to the audio module for audio processing, including:
对所述语音信号以及所述环境噪声信号进行信号放大处理;Performing signal amplification processing on the voice signal and the ambient noise signal;
根据所述环境噪声信号,消除所述语音信号中的噪声信号,得到模拟降噪语音信号;Acquiring the noise signal in the voice signal according to the ambient noise signal to obtain an analog noise-reduced voice signal;
对所述模拟降噪语音信号进行模数转换,得到数字降噪语音信号。Performing analog-to-digital conversion on the analog noise-reduced speech signal to obtain a digital noise-reduction speech signal.
本发明实施例中,当终端通话结束时,关闭所述主MIC和所述辅MIC,
从而可以使得终端MIC(辅MIC)实现正常的工作。In the embodiment of the present invention, when the terminal ends the call, the primary MIC and the secondary MIC are turned off.
Thereby, the terminal MIC (auxiliary MIC) can be made to perform normal work.
图4为本发明实施例二的降噪方法的流程示意图,本示例中的降噪方法应用于终端,如图4所示,所述降噪方法包括以下步骤:4 is a schematic flowchart of a noise reduction method according to Embodiment 2 of the present invention. The noise reduction method in this example is applied to a terminal. As shown in FIG. 4, the noise reduction method includes the following steps:
步骤401:检测耳机插座的检测管脚是否由低电平变化为高电平,当耳机插座的检测管脚由低电平变化为高电平时,确定耳机插入至终端。Step 401: Detect whether the detection pin of the earphone socket changes from a low level to a high level, and when the detection pin of the earphone socket changes from a low level to a high level, determine that the earphone is inserted into the terminal.
本发明实施例中,用户在使用耳机前,需要执行如下操作:终端开机;将耳机插入终端,并保持通话状态。具体地,用户拨打电话,使得终端处于通话状态;或者,用户接听电话,使得终端处于通话状态。In the embodiment of the present invention, before using the earphone, the user needs to perform the following operations: the terminal is powered on; the earphone is inserted into the terminal, and the call state is maintained. Specifically, the user makes a call to make the terminal in a call state; or the user answers the call, so that the terminal is in a call state.
在一实施方式中,耳机可以是四段式MIC耳机。在四段式MIC耳机中,具有喇叭部件也有麦克风部件。其中,喇叭部件用于播放音频信号,麦克风部件用于采集音频信号。In an embodiment, the headset can be a four-segment MIC headset. In a four-segment MIC earphone, there are also a speaker component and a microphone component. The horn component is used to play an audio signal, and the microphone component is used to collect an audio signal.
这里,四段式MIC耳机具有如下特征:Here, the four-segment MIC headset has the following features:
1、耳机插头为四节形式;1. The earphone plug is in the form of four sections;
2、耳机线内部导线数量至少有4根;2. There are at least 4 internal wires in the headphone cable;
3、耳机是立体声耳麦。3. The headset is a stereo headset.
终端开机后,此时耳机插座的检测管脚为低电平,插上四段式MIC耳机后,耳机左或右声道将检测管脚与其连接,此时,耳机插座的检测管脚为高电平,检测模块检测到检测管脚从低电平变化为高电平时,则检测到有耳机插至终端。After the terminal is turned on, the detection pin of the earphone socket is at a low level. After the four-stage MIC earphone is plugged in, the left or right channel of the earphone will connect the detection pin to it. At this time, the detection pin of the earphone socket is high. Level, when the detection module detects that the detection pin changes from low level to high level, it detects that a headset is inserted into the terminal.
步骤402:检测耳机插座的MIC管脚是否由低电平变化为高电平,当耳机插座的MIC管脚由低电平变化为高电平时,确定终端处于通话状态。Step 402: Detect whether the MIC pin of the earphone socket changes from a low level to a high level. When the MIC pin of the earphone socket changes from a low level to a high level, it is determined that the terminal is in a call state.
在拨通电话之前,耳机插座上的MIC管脚为低电平,在拨通电话后,使终端保持通话状态,此时耳机插座的MIC管脚会有1V左右的直流偏置,检测模块检测到耳机插座上的MIC管脚电平信号从低电平变化到高电平时,则检测到终端处于通话状态。
Before dialing the phone, the MIC pin on the headphone jack is low. After dialing the phone, the terminal is kept in the call state. At this time, the MIC pin of the headphone jack will have a DC offset of about 1V, and the detection module detects When the MIC pin level signal on the headphone jack changes from low level to high level, it is detected that the terminal is in a call state.
步骤403:当检测到耳机插入至终端,且所述终端处于通话状态时,将处于工作状态的耳机MIC设置为主MIC;并激活终端MIC,将所述终端MIC设置为辅MIC。Step 403: When it is detected that the earphone is inserted into the terminal, and the terminal is in a call state, the headset MIC in the working state is set as the main MIC; and the terminal MIC is activated, and the terminal MIC is set as the auxiliary MIC.
本发明实施例中,当检测到耳机与终端相连接,且所述终端处于通话状态时,耳机MIC已经处于工作状态。将处于工作状态的耳机MIC设置为主MIC。In the embodiment of the present invention, when it is detected that the earphone is connected to the terminal, and the terminal is in a call state, the earphone MIC is already in an active state. Set the headset MIC in working state as the main MIC.
与此同时,并激活终端MIC,将所述终端MIC设置为辅MIC,这里,辅MIC用来进行降噪,因此,辅MIC也称为降噪MIC。At the same time, the terminal MIC is activated, and the terminal MIC is set as a secondary MIC. Here, the secondary MIC is used for noise reduction. Therefore, the secondary MIC is also referred to as a noise reduction MIC.
本发明实施例中,激活终端MIC的激活方式依据终端MIC类型的不同而不同,在一实施方式中,MIC类型为微型机电系统(MEMS)MIC,激活方式可以是:拉高终端中MEMS MIC的麦克风直流偏置电压(micbias),给终端MIC提供1V直流偏置。In the embodiment of the present invention, the activation mode of the activation terminal MIC is different according to the type of the terminal MIC. In an embodiment, the MIC type is a micro-electromechanical system (MEMS) MIC, and the activation mode may be: pulling up the MEMS MIC in the terminal. The microphone's DC bias voltage (micbias) provides a 1V DC offset to the terminal MIC.
步骤404:利用所述主MIC采集语音信号,以及利用所述辅MIC采集环境噪声信号。Step 404: Acquire a voice signal by using the primary MIC, and collect an environmental noise signal by using the secondary MIC.
本发明实施例中,耳机MIC和终端MIC同时工作,耳机MIC(主MIC)采集语音信号,终端MIC(辅MIC)采集环境噪声信号。In the embodiment of the present invention, the earphone MIC and the terminal MIC work simultaneously, the earphone MIC (main MIC) collects a voice signal, and the terminal MIC (secondary MIC) collects an environmental noise signal.
步骤405:对所述语音信号以及所述环境噪声信号进行音频处理,得到降噪语音信号。Step 405: Perform audio processing on the voice signal and the ambient noise signal to obtain a noise-reduced voice signal.
本发明实施例中,将主MIC和辅MIC的信号同时送入到音频模块进行音频处理,从而对语音信号进行降噪,得到降噪语音信号。In the embodiment of the present invention, the signals of the primary MIC and the secondary MIC are simultaneously sent to the audio module for audio processing, thereby denoising the voice signal to obtain a noise-reduced voice signal.
这里,将主MIC和辅MIC的信号同时送入到音频模块进行音频处理具体包括:Here, the signals of the main MIC and the auxiliary MIC are simultaneously sent to the audio module for audio processing, including:
对所述语音信号以及所述环境噪声信号进行信号放大处理;Performing signal amplification processing on the voice signal and the ambient noise signal;
根据所述环境噪声信号,消除所述语音信号中的噪声信号,得到模拟降噪语音信号;
Acquiring the noise signal in the voice signal according to the ambient noise signal to obtain an analog noise-reduced voice signal;
对所述模拟降噪语音信号进行模数转换,得到数字降噪语音信号。Performing analog-to-digital conversion on the analog noise-reduced speech signal to obtain a digital noise-reduction speech signal.
本发明实施例中,当终端通话结束时,关闭所述主MIC和所述辅MIC,从而可以使得终端MIC(辅MIC)实现正常的工作。In the embodiment of the present invention, when the terminal ends the call, the primary MIC and the secondary MIC are turned off, so that the terminal MIC (secondary MIC) can achieve normal operation.
图5为本发明实施例三的终端的结构组成示意图,如图5所示,所述终端包括:FIG. 5 is a schematic structural diagram of a terminal according to Embodiment 3 of the present invention. As shown in FIG. 5, the terminal includes:
检测模块51,配置为检测耳机是否与终端相连接,以及检测终端是否处于通话状态;The detecting module 51 is configured to detect whether the earphone is connected to the terminal, and detect whether the terminal is in a call state;
设置模块52,配置为当检测到耳机与终端相连接,且所述终端处于通话状态时,将处于工作状态的耳机MIC设置为主MIC;并激活终端MIC,将所述终端MIC设置为辅MIC;The setting module 52 is configured to: when detecting that the earphone is connected to the terminal, and the terminal is in a call state, set the headset MIC in the working state as the main MIC; and activate the terminal MIC, and set the terminal MIC as the auxiliary MIC ;
采集模块53,配置为利用所述主MIC采集语音信号,以及利用所述辅MIC采集环境噪声信号;The acquiring module 53 is configured to collect a voice signal by using the primary MIC, and collect an environmental noise signal by using the auxiliary MIC;
音频模块54,配置为对所述语音信号以及所述环境噪声信号进行音频处理,得到降噪语音信号。The audio module 54 is configured to perform audio processing on the voice signal and the ambient noise signal to obtain a noise-reduced voice signal.
本领域技术人员应当理解,图5所示的终端中的各模块的实现功能可参照前述降噪方法的相关描述而理解。Those skilled in the art should understand that the implementation functions of the modules in the terminal shown in FIG. 5 can be understood by referring to the related description of the foregoing noise reduction method.
在实际应用中,所述终端中的各个模块所实现的功能,均可由位于终端中的中央处理器(Central Processing Unit,CPU)、或微处理器(Micro Processor Unit,MPU)、或数字信号处理器(Digital Signal Processor,DSP)、或现场可编程门阵列(Field Programmable Gate Array,FPGA)等实现。In practical applications, the functions implemented by each module in the terminal may be processed by a Central Processing Unit (CPU), a Micro Processor Unit (MPU), or a digital signal processing located in the terminal. (Digital Signal Processor, DSP), or Field Programmable Gate Array (FPGA) implementation.
图6为本发明实施例四的终端的结构组成示意图,如图6所示,所述终端包括:FIG. 6 is a schematic structural diagram of a terminal according to Embodiment 4 of the present invention. As shown in FIG. 6, the terminal includes:
检测模块61,配置为检测耳机是否与终端相连接,以及检测终端是否处于通话状态;The detecting module 61 is configured to detect whether the earphone is connected to the terminal, and detect whether the terminal is in a call state;
设置模块62,配置为当检测到耳机与终端相连接,且所述终端处于通
话状态时,将处于工作状态的耳机MIC设置为主MIC;并激活终端MIC,将所述终端MIC设置为辅MIC;The setting module 62 is configured to: when detecting that the earphone is connected to the terminal, and the terminal is in the
In the speech state, the headset MIC in the working state is set as the main MIC; and the terminal MIC is activated, and the terminal MIC is set as the auxiliary MIC;
采集模块63,配置为利用所述主MIC采集语音信号,以及利用所述辅MIC采集环境噪声信号;The acquiring module 63 is configured to collect a voice signal by using the primary MIC, and collect an environmental noise signal by using the auxiliary MIC;
音频模块64,配置为对所述语音信号以及所述环境噪声信号进行音频处理,得到降噪语音信号。The audio module 64 is configured to perform audio processing on the voice signal and the ambient noise signal to obtain a noise-reduced voice signal.
所述检测模块61,还配置为检测耳机是否插入至终端;或者,利用蓝牙检测耳机是否与终端相连接。The detecting module 61 is further configured to detect whether the earphone is inserted into the terminal; or use Bluetooth to detect whether the earphone is connected to the terminal.
所述检测模块61包括:The detecting module 61 includes:
第一检测子模块611,配置为检测耳机插座的检测管脚是否由低电平变化为高电平,当耳机插座的检测管脚由低电平变化为高电平时,确定耳机插入至终端;The first detecting sub-module 611 is configured to detect whether the detecting pin of the earphone socket changes from a low level to a high level, and when the detecting pin of the earphone socket changes from a low level to a high level, determining that the earphone is inserted into the terminal;
第二检测子模块612,配置为检测耳机插座的MIC管脚是否由低电平变化为高电平,当耳机插座的MIC管脚由低电平变化为高电平时,确定终端处于通话状态。The second detecting sub-module 612 is configured to detect whether the MIC pin of the earphone socket changes from a low level to a high level, and when the MIC pin of the earphone socket changes from a low level to a high level, determining that the terminal is in a call state.
所述音频模块64包括:The audio module 64 includes:
信号放大子模块641,配置为对所述语音信号以及所述环境噪声信号进行信号放大处理;The signal amplification sub-module 641 is configured to perform signal amplification processing on the voice signal and the ambient noise signal;
降噪子模块642,配置为根据所述环境噪声信号,消除所述语音信号中的噪声信号,得到模拟降噪语音信号;The noise reduction sub-module 642 is configured to: cancel the noise signal in the voice signal according to the ambient noise signal, to obtain an analog noise-reduced voice signal;
模数转换子模块643,配置为对所述模拟降噪语音信号进行模数转换,得到数字降噪语音信号。The analog-to-digital conversion sub-module 643 is configured to perform analog-to-digital conversion on the analog noise-reduced speech signal to obtain a digital noise-reduction speech signal.
所述终端还包括:The terminal further includes:
关闭模块(图中未示出),配置为当终端通话结束时,关闭所述主MIC和所述辅MIC。
A shutdown module (not shown) is configured to turn off the primary MIC and the secondary MIC when the terminal talk ends.
本领域技术人员应当理解,图6所示的终端中的各模块及其子模块的实现功能可参照前述降噪方法的相关描述而理解。Those skilled in the art should understand that the implementation functions of each module and its sub-modules in the terminal shown in FIG. 6 can be understood by referring to the related description of the foregoing noise reduction method.
在实际应用中,所述终端中的各个模块及其子模块所实现的功能,均可由位于终端中的中央处理器(Central Processing Unit,CPU)、或微处理器(Micro Processor Unit,MPU)、或数字信号处理器(Digital Signal Processor,DSP)、或现场可编程门阵列(Field Programmable Gate Array,FPGA)等实现。In practical applications, the functions implemented by each module and its sub-modules in the terminal may be implemented by a central processing unit (CPU) or a microprocessor (Micro Processor Unit, MPU) located in the terminal. Or a digital signal processor (DSP), or a Field Programmable Gate Array (FPGA).
本发明实施例上述终端如果以软件功能模块的形式实现并作为独立的产品销售或使用时,也可以存储在一个计算机可读取存储介质中。基于这样的理解,本发明实施例的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机、服务器、或者网络设备等)执行本发明各个实施例所述方法的全部或部分。而前述的存储介质包括:U盘、移动硬盘、只读存储器(ROM,Read Only Memory)、磁碟或者光盘等各种可以存储程序代码的介质。这样,本发明实施例不限制于任何特定的硬件和软件结合。In the embodiment of the present invention, if the terminal is implemented in the form of a software function module and sold or used as a stand-alone product, it may also be stored in a computer readable storage medium. Based on such understanding, the technical solution of the embodiments of the present invention may be embodied in the form of a software product in essence or in the form of a software product stored in a storage medium, including a plurality of instructions. A computer device (which may be a personal computer, server, or network device, etc.) is caused to perform all or part of the methods described in various embodiments of the present invention. The foregoing storage medium includes various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read only memory (ROM), a magnetic disk, or an optical disk. Thus, embodiments of the invention are not limited to any specific combination of hardware and software.
相应地,本发明实施例还提供一种计算机存储介质,其中存储有计算机程序,该计算机程序用于执行本发明实施例的降噪方法。Correspondingly, an embodiment of the present invention further provides a computer storage medium, wherein a computer program is stored, and the computer program is used to perform the noise reduction method of the embodiment of the present invention.
本领域内的技术人员应明白,本发明的实施例可提供为方法、系统、或计算机程序产品。因此,本发明可采用硬件实施例、软件实施例、或结合软件和硬件方面的实施例的形式。而且,本发明可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器和光学存储器等)上实施的计算机程序产品的形式。Those skilled in the art will appreciate that embodiments of the present invention can be provided as a method, system, or computer program product. Accordingly, the present invention can take the form of a hardware embodiment, a software embodiment, or a combination of software and hardware. Moreover, the invention can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage and optical storage, etc.) including computer usable program code.
本发明是参照根据本发明实施例的方法、设备(系统)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程
图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。The present invention has been described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (system), and computer program products according to embodiments of the invention. It should be understood that the flow can be implemented by computer program instructions
Each of the processes and/or blocks in the figures and/or block diagrams, and combinations of the flows and/or blocks in the flowcharts and/or block diagrams. These computer program instructions can be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing device to produce a machine for the execution of instructions for execution by a processor of a computer or other programmable data processing device. Means for implementing the functions specified in one or more of the flow or in a block or blocks of the flow chart.
这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。The computer program instructions can also be stored in a computer readable memory that can direct a computer or other programmable data processing device to operate in a particular manner, such that the instructions stored in the computer readable memory produce an article of manufacture comprising the instruction device. The apparatus implements the functions specified in one or more blocks of a flow or a flow and/or block diagram of the flowchart.
这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。These computer program instructions can also be loaded onto a computer or other programmable data processing device such that a series of operational steps are performed on a computer or other programmable device to produce computer-implemented processing for execution on a computer or other programmable device. The instructions provide steps for implementing the functions specified in one or more of the flow or in a block or blocks of a flow diagram.
以上所述,仅为本发明的较佳实施例而已,并非用于限定本发明的保护范围。The above is only the preferred embodiment of the present invention and is not intended to limit the scope of the present invention.
本发明实施例的技术方案,当检测到耳机与终端相连接,且所述终端处于通话状态时,将处于工作状态的耳机MIC设置为主MIC;并激活终端MIC设置为辅MIC;利用主MIC采集语音信号,以及利用辅MIC采集环境噪声信号;对语音信号以及环境噪声信号进行音频处理,得到降噪语音信号。如此,用户使用耳机打电话的降噪效果得到了很大提升;充分利用了终端本身的硬件资源(即终端MIC),而不用增加新的硬件成本。
The technical solution of the embodiment of the present invention, when detecting that the earphone is connected to the terminal, and the terminal is in a call state, setting the headset MIC in the working state as the main MIC; and activating the terminal MIC as the auxiliary MIC; using the main MIC The voice signal is collected, and the ambient noise signal is collected by using the auxiliary MIC; the voice signal and the environmental noise signal are processed by audio to obtain a noise-reduced voice signal. In this way, the noise reduction effect of the user using the headset to make a call is greatly improved; the hardware resources of the terminal itself (ie, the terminal MIC) are fully utilized without adding new hardware costs.
Claims (11)
- 一种降噪方法,所述方法包括:A noise reduction method, the method comprising:检测耳机是否与终端相连接,以及检测终端是否处于通话状态;Detecting whether the headset is connected to the terminal, and detecting whether the terminal is in a call state;当检测到耳机与终端相连接,且所述终端处于通话状态时,将处于工作状态的耳机麦克风MIC设置为主MIC;并激活终端MIC,将所述终端MIC设置为辅MIC;When it is detected that the earphone is connected to the terminal, and the terminal is in a call state, the headset microphone MIC in the working state is set as the main MIC; and the terminal MIC is activated, and the terminal MIC is set as the auxiliary MIC;利用所述主MIC采集语音信号,以及利用所述辅MIC采集环境噪声信号;Acquiring a voice signal by using the main MIC, and collecting an environmental noise signal by using the auxiliary MIC;对所述语音信号以及所述环境噪声信号进行音频处理,得到降噪语音信号。Audio processing is performed on the voice signal and the ambient noise signal to obtain a noise-reduced voice signal.
- 根据权利要求1所述的降噪方法,其中,所述检测耳机是否与终端相连接,包括:The noise reduction method according to claim 1, wherein the detecting whether the earphone is connected to the terminal comprises:检测耳机是否插入至终端;或者,Detect whether the headset is plugged into the terminal; or,利用蓝牙检测耳机是否与终端相连接。Use Bluetooth to detect if the headset is connected to the terminal.
- 根据权利要求2所述的降噪方法,其中,所述检测耳机是否与终端相连接,以及检测终端是否处于通话状态,包括:The noise reduction method according to claim 2, wherein the detecting whether the earphone is connected to the terminal and detecting whether the terminal is in a call state comprises:检测耳机插座的检测管脚是否由低电平变化为高电平,当耳机插座的检测管脚由低电平变化为高电平时,确定耳机插入至终端;Detecting whether the detecting pin of the earphone socket changes from a low level to a high level, and when the detecting pin of the earphone socket changes from a low level to a high level, determining that the earphone is inserted into the terminal;检测耳机插座的MIC管脚是否由低电平变化为高电平,当耳机插座的MIC管脚由低电平变化为高电平时,确定终端处于通话状态。Detect whether the MIC pin of the earphone socket changes from a low level to a high level. When the MIC pin of the earphone socket changes from a low level to a high level, it is determined that the terminal is in a call state.
- 根据权利要求1所述的降噪方法,其中,所述对所述语音信号以及所述环境噪声信号进行音频处理,包括:The noise reduction method according to claim 1, wherein said performing audio processing on said voice signal and said ambient noise signal comprises:对所述语音信号以及所述环境噪声信号进行信号放大处理;Performing signal amplification processing on the voice signal and the ambient noise signal;根据所述环境噪声信号,消除所述语音信号中的噪声信号,得到模拟降噪语音信号; Acquiring the noise signal in the voice signal according to the ambient noise signal to obtain an analog noise-reduced voice signal;对所述模拟降噪语音信号进行模数转换,得到数字降噪语音信号。Performing analog-to-digital conversion on the analog noise-reduced speech signal to obtain a digital noise-reduction speech signal.
- 根据权利要求1至4任一项所述的降噪方法,其中,所述方法还包括:The noise reduction method according to any one of claims 1 to 4, wherein the method further comprises:当终端通话结束时,关闭所述主MIC和所述辅MIC。When the terminal talk ends, the primary MIC and the secondary MIC are turned off.
- 一种终端,所述终端包括:A terminal, the terminal comprising:检测模块,配置为检测耳机是否与终端相连接,以及检测终端是否处于通话状态;The detecting module is configured to detect whether the earphone is connected to the terminal, and detect whether the terminal is in a call state;设置模块,配置为当检测到耳机与终端相连接,且所述终端处于通话状态时,将处于工作状态的耳机MIC设置为主MIC;并激活终端MIC,将所述终端MIC设置为辅MIC;a setting module configured to: when detecting that the earphone is connected to the terminal, and the terminal is in a call state, setting the headset MIC in the working state as a main MIC; and activating the terminal MIC, setting the terminal MIC as a secondary MIC;采集模块,配置为利用所述主MIC采集语音信号,以及利用所述辅MIC采集环境噪声信号;An acquisition module, configured to collect a voice signal by using the primary MIC, and collect an ambient noise signal by using the auxiliary MIC;音频模块,配置为对所述语音信号以及所述环境噪声信号进行音频处理,得到降噪语音信号。And an audio module configured to perform audio processing on the voice signal and the ambient noise signal to obtain a noise-reduced voice signal.
- 根据权利要求6所述的终端,其中,所述检测模块,还配置为检测耳机是否插入至终端;或者,利用蓝牙检测耳机是否与终端相连接。The terminal according to claim 6, wherein the detecting module is further configured to detect whether the earphone is inserted into the terminal; or use Bluetooth to detect whether the earphone is connected to the terminal.
- 根据权利要求7所述的终端,其中,所述检测模块包括:The terminal of claim 7, wherein the detecting module comprises:第一检测子模块,配置为检测耳机插座的检测管脚是否由低电平变化为高电平,当耳机插座的检测管脚由低电平变化为高电平时,确定耳机插入至终端;The first detecting sub-module is configured to detect whether the detecting pin of the earphone socket changes from a low level to a high level, and when the detecting pin of the earphone socket changes from a low level to a high level, determining that the earphone is inserted into the terminal;第二检测子模块,配置为检测耳机插座的MIC管脚是否由低电平变化为高电平,当耳机插座的MIC管脚由低电平变化为高电平时,确定终端处于通话状态。The second detecting submodule is configured to detect whether the MIC pin of the earphone socket changes from a low level to a high level, and when the MIC pin of the earphone socket changes from a low level to a high level, determining that the terminal is in a call state.
- 根据权利要求6所述的终端,其中,所述音频模块包括:The terminal of claim 6, wherein the audio module comprises:信号放大子模块,配置为对所述语音信号以及所述环境噪声信号进行 信号放大处理;a signal amplification submodule configured to perform the speech signal and the ambient noise signal Signal amplification processing;降噪子模块,配置为根据所述环境噪声信号,消除所述语音信号中的噪声信号,得到模拟降噪语音信号;a noise reduction sub-module configured to cancel a noise signal in the voice signal according to the ambient noise signal to obtain an analog noise-reduced voice signal;模数转换子模块,配置为对所述模拟降噪语音信号进行模数转换,得到数字降噪语音信号。And an analog-to-digital conversion submodule configured to perform analog-to-digital conversion on the analog noise-reduced speech signal to obtain a digital noise-reduction speech signal.
- 根据权利要求6至9任一项所述的终端,其中,所述终端还包括:The terminal according to any one of claims 6 to 9, wherein the terminal further comprises:关闭模块,配置为当终端通话结束时,关闭所述主MIC和所述辅MIC。The module is closed, configured to turn off the primary MIC and the secondary MIC when the terminal is over.
- 一种计算机存储介质,所述计算机存储介质中存储有计算机可执行指令,该计算机可执行指令配置为执行权利要求1-5任一项所述的降噪方法。 A computer storage medium having stored therein computer executable instructions configured to perform the noise reduction method of any of claims 1-5.
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610589385.9 | 2016-07-25 | ||
CN201610589385.9A CN107659864A (en) | 2016-07-25 | 2016-07-25 | A kind of noise-reduction method and terminal |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2018018782A1 true WO2018018782A1 (en) | 2018-02-01 |
Family
ID=61015411
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2016/105309 WO2018018782A1 (en) | 2016-07-25 | 2016-11-10 | Noise reduction method, terminal, and computer storage medium |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN107659864A (en) |
WO (1) | WO2018018782A1 (en) |
Families Citing this family (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108924352A (en) * | 2018-06-29 | 2018-11-30 | 努比亚技术有限公司 | Sound quality method for improving, terminal and computer readable storage medium |
CN109327592A (en) * | 2018-11-07 | 2019-02-12 | Oppo广东移动通信有限公司 | A kind of call control method, device and computer storage medium |
CN113542960B (en) * | 2021-07-13 | 2023-07-14 | RealMe重庆移动通信有限公司 | Audio signal processing method, system, device, electronic equipment and storage medium |
CN114268820B (en) * | 2021-12-20 | 2024-04-30 | 歌尔科技有限公司 | Barrage sending method based on Bluetooth headset, equipment and medium |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO1999011045A1 (en) * | 1997-08-21 | 1999-03-04 | The Secretary Of State For The Environment, Transport And The Regions | Telephone handset noise suppression |
CN101420491A (en) * | 2008-11-24 | 2009-04-29 | 深圳华为通信技术有限公司 | Method, apparatus and controller for ear microphone denoising |
CN102368793A (en) * | 2011-10-12 | 2012-03-07 | 惠州Tcl移动通信有限公司 | Cell phone and conversation signal processing method thereof |
CN104333630A (en) * | 2013-12-31 | 2015-02-04 | 广州三星通信技术研究有限公司 | Mobile phone having wireless earphone embedded therein |
CN105530587A (en) * | 2016-01-26 | 2016-04-27 | 上海斐讯数据通信技术有限公司 | Test system and method for earphone insertion detection of mobile terminal |
-
2016
- 2016-07-25 CN CN201610589385.9A patent/CN107659864A/en active Pending
- 2016-11-10 WO PCT/CN2016/105309 patent/WO2018018782A1/en active Application Filing
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO1999011045A1 (en) * | 1997-08-21 | 1999-03-04 | The Secretary Of State For The Environment, Transport And The Regions | Telephone handset noise suppression |
CN101420491A (en) * | 2008-11-24 | 2009-04-29 | 深圳华为通信技术有限公司 | Method, apparatus and controller for ear microphone denoising |
CN102368793A (en) * | 2011-10-12 | 2012-03-07 | 惠州Tcl移动通信有限公司 | Cell phone and conversation signal processing method thereof |
CN104333630A (en) * | 2013-12-31 | 2015-02-04 | 广州三星通信技术研究有限公司 | Mobile phone having wireless earphone embedded therein |
CN105530587A (en) * | 2016-01-26 | 2016-04-27 | 上海斐讯数据通信技术有限公司 | Test system and method for earphone insertion detection of mobile terminal |
Also Published As
Publication number | Publication date |
---|---|
CN107659864A (en) | 2018-02-02 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP6489563B2 (en) | Volume control method, system, device and program | |
US9654874B2 (en) | Systems and methods for feedback detection | |
JP6419222B2 (en) | Method and headset for improving sound quality | |
US20170318374A1 (en) | Headset, an apparatus and a method with automatic selective voice pass-through | |
US20080158000A1 (en) | Autodetect of user presence using a sensor | |
US8363823B1 (en) | Two microphone uplink communication and stereo audio playback on three wire headset assembly | |
EP3606015B1 (en) | Method for call processing and electronic device | |
US20180150276A1 (en) | System and method for enabling communication of ambient sound as an audio stream | |
WO2018018782A1 (en) | Noise reduction method, terminal, and computer storage medium | |
CN112770214A (en) | Earphone control method and device and earphone | |
CN103237111A (en) | Method and mobile terminal for amplifying conversation volume | |
JP6381062B2 (en) | Method and device for processing audio signals for communication devices | |
EP3328090A1 (en) | System and method for enabling communication of ambient sound as an audio stream | |
WO2020118496A1 (en) | Audio path switching method and device, readable storage medium and electronic equipment | |
WO2016177204A1 (en) | Noise processing method and apparatus | |
CN108605067B (en) | Method for playing audio and mobile terminal | |
CN103873980B (en) | Audio-frequency processing method, device and electronic equipment | |
KR101648042B1 (en) | Earphone system for mobile phone with Active Noise Cancellation function | |
CN104639719A (en) | Calling method and communication terminal | |
CN107454265A (en) | Change the method and device of record call-information based on call mode | |
CN111083250A (en) | Mobile terminal and noise reduction method thereof | |
CN108377298B (en) | Method and device for switching answering mode, mobile terminal and computer readable storage medium | |
CN106101923A (en) | A kind of audio data processing method and equipment | |
US20130039154A1 (en) | Remote control of a portable electronic device and method therefor | |
CN109618062B (en) | Voice interaction method, device, equipment and computer readable storage medium |
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: 16910361 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: 16910361 Country of ref document: EP Kind code of ref document: A1 |