CN106331359B - A kind of speech signal collection method, device and terminal - Google Patents

A kind of speech signal collection method, device and terminal Download PDF

Info

Publication number
CN106331359B
CN106331359B CN201610790742.8A CN201610790742A CN106331359B CN 106331359 B CN106331359 B CN 106331359B CN 201610790742 A CN201610790742 A CN 201610790742A CN 106331359 B CN106331359 B CN 106331359B
Authority
CN
China
Prior art keywords
audio
audio signal
signal
amplitude
voice
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.)
Expired - Fee Related
Application number
CN201610790742.8A
Other languages
Chinese (zh)
Other versions
CN106331359A (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.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp 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 Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN201610790742.8A priority Critical patent/CN106331359B/en
Publication of CN106331359A publication Critical patent/CN106331359A/en
Application granted granted Critical
Publication of CN106331359B publication Critical patent/CN106331359B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/72Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
    • H04M1/724User interfaces specially adapted for cordless or mobile telephones
    • H04M1/72448User interfaces specially adapted for cordless or mobile telephones with means for adapting the functionality of the device according to specific conditions
    • H04M1/72454User interfaces specially adapted for cordless or mobile telephones with means for adapting the functionality of the device according to specific conditions according to context-related or environment-related conditions

Landscapes

  • Engineering & Computer Science (AREA)
  • Environmental & Geological Engineering (AREA)
  • Human Computer Interaction (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Telephone Function (AREA)

Abstract

本发明公开了一种语音信号采集方法、装置及终端,该语音信号采集方法包括:获取第一音频信号和第二音频信号,该第一音频信号由第一音频采集单元针对通话语音采集得到,该第二音频信号由第二音频采集单元针对环境噪音采集得到;根据该第一音频信号的第一幅值和第二音频信号的第二幅值判断是否满足预设调整条件;若是,则对该第二音频采集单元的属性参数进行调整,以使该第二音频采集单元对通话语音信号进行采集。上述语音信号采集方法在采集通话人声的主麦克风出现异常的情况下,能通过采集环境噪音的副麦克风来采集通话人声,从而保证通话的正常进行,操作简单,灵活性高。

The invention discloses a voice signal collection method, device and terminal. The voice signal collection method includes: acquiring a first audio signal and a second audio signal. The first audio signal is acquired by a first audio acquisition unit for conversation voice, The second audio signal is collected by the second audio acquisition unit for environmental noise; judge whether the preset adjustment condition is satisfied according to the first amplitude of the first audio signal and the second amplitude of the second audio signal; if so, then The attribute parameters of the second audio collection unit are adjusted so that the second audio collection unit collects the call voice signal. The voice signal collection method mentioned above can collect the voice of the caller through the secondary microphone for collecting environmental noise when the main microphone for collecting the voice of the caller is abnormal, so as to ensure the normal progress of the call, with simple operation and high flexibility.

Description

一种语音信号采集方法、装置及终端A voice signal collection method, device and terminal

技术领域technical field

本发明涉及移动通信技术领域,尤其涉及一种语音信号采集方法、装置及终端。The present invention relates to the technical field of mobile communication, in particular to a voice signal collection method, device and terminal.

背景技术Background technique

随着终端技术的不断发展和手机的普及,用户对手机的依赖程度越来越高,其中最常用的功能为语音通话功能。With the continuous development of terminal technology and the popularization of mobile phones, users rely more and more on mobile phones, and the most commonly used function is the voice call function.

当双方进行语音通话时,双方手机会通过内置的麦克风各自进行声音采集,并将采集到的声音转换成音频信号发送至对方,当对方手机接收到该音频信号后,其会通过内置的扬声器进行播放。为便于声音采集,麦克风安装处一般都设有声音采集孔,声音可以通过该声音采集孔直接传送至麦克风,提高了采集的灵敏度。但是,由于该麦克风通常安装在手机的端部,故用户在抓握手机的过程中,其手指往往容易堵住该声音采集孔,从而影响麦克风的采集工作,难以保证用户的正常语音通话。When the two parties make a voice call, the mobile phones of both parties will collect the sound through the built-in microphone, and convert the collected sound into an audio signal and send it to the other party. play. In order to facilitate sound collection, the microphone is generally installed with a sound collection hole, and the sound can be directly transmitted to the microphone through the sound collection hole, which improves the sensitivity of collection. However, since the microphone is usually installed at the end of the mobile phone, the user's fingers often block the sound collection hole when holding the mobile phone, thereby affecting the collection work of the microphone and making it difficult to ensure the normal voice communication of the user.

发明内容Contents of the invention

本发明的目的在于提供一种语音信号采集方法、装置及终端,以解决现有手机容易因为主麦克风的声音采集孔被堵而影响通话的技术问题。The purpose of the present invention is to provide a voice signal collection method, device and terminal to solve the technical problem that the existing mobile phone is easy to affect the call because the sound collection hole of the main microphone is blocked.

为解决上述技术问题,本发明实施例提供以下技术方案:In order to solve the above technical problems, embodiments of the present invention provide the following technical solutions:

一种语音信号采集方法,其包括:A method for collecting voice signals, comprising:

获取第一音频信号和第二音频信号,所述第一音频信号由第一音频采集单元针对通话语音采集得到,所述第二音频信号由第二音频采集单元针对环境噪音采集得到;Acquiring a first audio signal and a second audio signal, the first audio signal is collected by the first audio collection unit for conversation voice, and the second audio signal is collected by the second audio collection unit for environmental noise;

根据所述第一音频信号的第一幅值和第二音频信号的第二幅值判断是否满足预设调整条件;judging whether a preset adjustment condition is satisfied according to the first amplitude of the first audio signal and the second amplitude of the second audio signal;

若是,则对所述第二音频采集单元的属性参数进行调整,以使所述第二音频采集单元对通话语音信号进行采集。If yes, adjust the attribute parameters of the second audio collection unit, so that the second audio collection unit collects the call voice signal.

为解决上述技术问题,本发明实施例还提供以下技术方案:In order to solve the above technical problems, embodiments of the present invention also provide the following technical solutions:

一种语音信号采集装置,其包括:A voice signal acquisition device, comprising:

第一音频采集单元,用于获取第一音频信号,所述第一音频信号针对通话语音采集得到;The first audio collection unit is used to obtain the first audio signal, and the first audio signal is collected for the call voice;

第二音频采集单元,用于获取第二音频信号,所述第二音频信号针对环境噪音采集得到;The second audio acquisition unit is configured to acquire a second audio signal, and the second audio signal is collected for environmental noise;

判断单元,用于根据所述第一音频信号的第一幅值和第二音频信号的第二幅值判断是否满足预设调整条件;a judging unit, configured to judge whether a preset adjustment condition is met according to the first amplitude of the first audio signal and the second amplitude of the second audio signal;

调整单元,用于若是,则对所述第二音频采集单元的属性参数进行调整,以使所述第二音频采集单元对通话语音信号进行采集。The adjustment unit is configured to, if yes, adjust the attribute parameters of the second audio collection unit, so that the second audio collection unit collects the call voice signal.

为解决上述技术问题,本发明实施例还提供以下技术方案:In order to solve the above technical problems, embodiments of the present invention also provide the following technical solutions:

一种终端,其包括主麦克风和副麦克风,所述主麦克风用于针对通话语音进行采集,得到第一音频信号,所述副麦克风用于针对环境噪音进行采集,得到第二音频信号;A terminal, which includes a main microphone and an auxiliary microphone, the main microphone is used to collect call voice to obtain a first audio signal, and the auxiliary microphone is used to collect environmental noise to obtain a second audio signal;

当所述第一音频信号的第一幅值和第二音频信号的第二幅值满足预设调整条件时,所述副麦克风替换所述主麦克风进行通话语音信号的采集。When the first amplitude of the first audio signal and the second amplitude of the second audio signal meet a preset adjustment condition, the secondary microphone replaces the primary microphone to collect the call voice signal.

本发明所述的语音信号采集方法、装置及终端,通过获取第一音频信号和第二音频信号,该第一音频信号由第一音频采集单元针对通话语音采集得到,该第二音频信号由第二音频采集单元针对环境噪音采集得到,之后,根据该第一音频信号的第一幅值和第二音频信号的第二幅值判断是否满足预设调整条件,若是,则对该第二音频采集单元的属性参数进行调整,以使该第二音频采集单元对通话语音信号进行采集,从而在采集通话人声的主麦克风出现异常的情况下,能通过采集环境噪音的副麦克风来采集通话人声,保证通话的正常进行,操作简单,灵活性高。The voice signal collection method, device and terminal of the present invention obtain the first audio signal and the second audio signal, the first audio signal is collected by the first audio collection unit for the call voice, and the second audio signal is collected by the second audio signal The second audio acquisition unit collects the environmental noise, and then judges whether the preset adjustment condition is satisfied according to the first amplitude of the first audio signal and the second amplitude of the second audio signal, and if so, collects the second audio The attribute parameters of the unit are adjusted so that the second audio acquisition unit collects the voice signal of the conversation, so that when the main microphone for collecting the voice of the conversation is abnormal, the voice of the conversation can be collected through the secondary microphone for collecting environmental noise , to ensure the normal progress of the call, simple operation and high flexibility.

附图说明Description of drawings

下面结合附图,通过对本发明的具体实施方式详细描述,将使本发明的技术方案及其它有益效果显而易见。The technical solutions and other beneficial effects of the present invention will be apparent through the detailed description of specific embodiments of the present invention in conjunction with the accompanying drawings.

图1是本发明实施例提供的语音信号采集方法的流程示意图;Fig. 1 is a schematic flow chart of the speech signal collection method that the embodiment of the present invention provides;

图2是本发明实施例提供的语音信号采集方法的流程示意图;Fig. 2 is a schematic flow chart of the voice signal collection method provided by the embodiment of the present invention;

图3是本发明实施例提供的语音信号采集装置的结构示意图;FIG. 3 is a schematic structural diagram of a voice signal acquisition device provided by an embodiment of the present invention;

图4是本发明实施例提供的语音信号采集装置的另一结构示意图;Fig. 4 is another structural schematic diagram of the voice signal acquisition device provided by the embodiment of the present invention;

图5是本发明实施例提供的终端的结构示意图。FIG. 5 is a schematic structural diagram of a terminal provided by an embodiment of the present invention.

具体实施方式detailed description

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

本发明实施例提供一种语音信号采集方法、装置及终端。以下将分别进行详细说明。需说明的是,以下实施例的序号不作为实施例优先顺序的限定。Embodiments of the present invention provide a voice signal collection method, device, and terminal. The details will be described respectively below. It should be noted that the serial numbers of the following embodiments are not intended to limit the order of priority of the embodiments.

第一实施例first embodiment

本实施例将从语音信号采集装置的角度进行描述,该语音信号采集装置具体可以集成在手机、平板电脑或笔记本电脑等设备中。This embodiment will be described from the perspective of a voice signal acquisition device, and the voice signal acquisition device may be integrated into a device such as a mobile phone, a tablet computer, or a notebook computer.

请参阅图1,图1具体描述了本发明第一实施例提供的语音信号采集方法,其可以包括:Referring to Fig. 1, Fig. 1 specifically describes the voice signal collection method provided by the first embodiment of the present invention, which may include:

S101、获取第一音频信号和第二音频信号,该第一音频信号由第一音频采集单元针对通话语音采集得到,该第二音频信号由第二音频采集单元针对环境噪音采集得到。S101. Acquire a first audio signal and a second audio signal, the first audio signal is collected by the first audio collection unit for call voice, and the second audio signal is collected by the second audio collection unit for environmental noise.

本实施例中,该第一音频信号主要包括人声,该第二音频信号主要包括环境噪音,通过采集第二音频信号,可以对该第一音频信号中的环境噪音进行过滤,得到较为清晰的人声。该第一音频采集单元和第二音频采集单元可以包括麦克风,具体数量可以根据实际需求而定,比如,该第一音频采集单元可以包括2个或3个麦克风,形成麦克风阵列。In this embodiment, the first audio signal mainly includes human voice, and the second audio signal mainly includes environmental noise. By collecting the second audio signal, the environmental noise in the first audio signal can be filtered to obtain a clearer audio signal. human voice. The first audio collection unit and the second audio collection unit may include microphones, and the specific number may be determined according to actual needs. For example, the first audio collection unit may include 2 or 3 microphones to form a microphone array.

通常,为较好的采集环境噪音或通话语音,该第一音频采集单元和第二音频采集单元中属性参数的设置是不同的,比如用于主拾音的第一音频采集单元的增益(放大倍数)明显大于用于噪声参考的第二音频采集单元的增益,等等,除此以外,该第一音频采集单元和第二音频采集单元的安装位置也是不同的,比如考虑到用户通话时抓握终端的习惯,该第一音频采集单元一般安装在终端的底部,该第二音频采集单元一般安装在终端的顶部。Usually, for better collecting ambient noise or conversation voice, the setting of attribute parameter in this first audio frequency collection unit and the second audio frequency collection unit is different, such as the gain (amplification) of the first audio collection unit that is used for main sound pickup multiple) is obviously greater than the gain of the second audio acquisition unit used for noise reference, etc., in addition, the installation positions of the first audio acquisition unit and the second audio acquisition unit are also different, such as considering that the user catches the According to the habit of holding the terminal, the first audio collection unit is generally installed at the bottom of the terminal, and the second audio collection unit is generally installed at the top of the terminal.

S102、根据该第一音频信号的第一幅值和第二音频信号的第二幅值判断是否满足预设调整条件,若满足,则可以执行下述步骤S103,若不满足,则可以执行上述步骤S101。S102. Determine whether the preset adjustment condition is satisfied according to the first amplitude of the first audio signal and the second amplitude of the second audio signal. If it is satisfied, the following step S103 can be performed; if not, the above-mentioned adjustment condition can be performed. Step S101.

本实施例中,该预设调整条件可以根据实际需求而定,该第一幅值和第二幅值主要用于反映信号强度。通常情况下,该第一音频采集单元采集的通话人声的信号强度大于第二音频采集单元采集的环境噪音的信号强度。In this embodiment, the preset adjustment condition may be determined according to actual requirements, and the first amplitude and the second amplitude are mainly used to reflect signal strength. Usually, the signal strength of the caller's voice collected by the first audio collection unit is greater than the signal strength of the ambient noise collected by the second audio collection unit.

例如,上述步骤S102具体可以包括:For example, the above step S102 may specifically include:

计算该第二音频信号的第二幅值和第一音频信号的第一幅值之间的差值;calculating the difference between the second amplitude of the second audio signal and the first amplitude of the first audio signal;

若该差值大于预设差值,则判断满足预设调整条件;If the difference is greater than the preset difference, it is judged that the preset adjustment condition is met;

若该差值不大于预设差值,则判断不满足预设调整条件。If the difference is not greater than the preset difference, it is determined that the preset adjustment condition is not met.

本实施例中,该预设差值可以根据实际需求而定,其可以为一个预估值,也可以是一个经验值。当第二幅值大于第一幅值,且第二幅值和第一幅值间的差值大于预设差值时,说明第一音频采集单元被堵或出现异常,从而利用该第一音频采集单元采集的通话语音信号会很弱,难以满足通话需求,此时,可以判断满足预设调整条件。In this embodiment, the preset difference can be determined according to actual needs, and it can be an estimated value or an empirical value. When the second amplitude is greater than the first amplitude, and the difference between the second amplitude and the first amplitude is greater than the preset difference, it means that the first audio acquisition unit is blocked or abnormal, so that the first audio The call voice signal collected by the acquisition unit will be very weak and difficult to meet the call requirements. At this time, it can be judged that the preset adjustment condition is met.

需要说明的是,若该异常情况是短时间发生的,比如用户的手指不小心堵住了该第一音频采集单元之后又移开了,这种情况下可以继续利用该第一音频采集单元采集通话语音,无需进行调整操作,因此,为弄清楚该异常情况是长时间发生的还是短暂的,该第一音频信号和第二音频信号可以是在一定时长内采集得到的信号段,此时,只有当该信号段内每一时刻的第二幅值和第一幅值之间的差值均满足预设调整条件时,才表明该异常情况是长时间发生的,才可以判断满足预设调整条件。It should be noted that if the abnormal situation occurs in a short period of time, for example, the user's finger accidentally blocks the first audio collection unit and then removes it, in this case, the first audio collection unit can continue to be used to collect There is no need to adjust the voice of the conversation. Therefore, in order to find out whether the abnormal situation occurs for a long time or for a short time, the first audio signal and the second audio signal can be signal segments collected within a certain period of time. At this time, Only when the difference between the second amplitude and the first amplitude at each moment in the signal segment meets the preset adjustment conditions, it indicates that the abnormal situation has occurred for a long time, and the preset adjustment can be judged condition.

S103、对该第二音频采集单元的属性参数进行调整,以使该第二音频采集单元对通话语音信号进行采集。S103. Adjust the attribute parameters of the second audio collection unit, so that the second audio collection unit collects the call voice signal.

例如,上述步骤S103具体可以包括:For example, the above step S103 may specifically include:

获取预设阀值;Get the preset threshold;

利用该预设阀值对该第二音频采集单元的属性参数进行调整。The attribute parameters of the second audio collection unit are adjusted by using the preset threshold value.

本实施例中,该预设阀值可以根据实际需求而定。该属性参数的调整方法可以有多种,比如可以直接将该属性参数的值调整到该预设阀值,也可以将该属性参数的值调整到该预设阀值的N倍,等等。通过利用该预设阀值对第二音频采集单元的属性参数进行调整,可以使用于噪声参考的第二音频采集单元具备主拾音功能。In this embodiment, the preset threshold may be determined according to actual needs. There are many ways to adjust the attribute parameter. For example, the value of the attribute parameter can be directly adjusted to the preset threshold, or the value of the attribute parameter can be adjusted to N times the preset threshold, and so on. By using the preset threshold value to adjust the attribute parameters of the second audio collection unit, the second audio collection unit used for noise reference can have the main sound pickup function.

其中,该属性参数可以包括增益值,此时,上述“利用该预设阀值对该第二音频采集单元的属性参数进行调整”的步骤具体可以包括:Wherein, the attribute parameter may include a gain value. At this time, the above-mentioned step of "using the preset threshold value to adjust the attribute parameter of the second audio collection unit" may specifically include:

将该第二音频采集单元的增益值调整到预设阀值。The gain value of the second audio collection unit is adjusted to a preset threshold value.

本实施例中,通过调整增益值到预设阀值,可以改变该第二音频采集单元获取的音频信号与噪音之间的关系,得到适宜的频响曲线,减小声音的失真度,以使该第二音频采集单元适用于采集通话人声,也即具备主拾音功能。In this embodiment, by adjusting the gain value to the preset threshold value, the relationship between the audio signal acquired by the second audio acquisition unit and the noise can be changed to obtain a suitable frequency response curve and reduce the distortion of the sound, so that The second audio collection unit is suitable for collecting the voice of a talking person, that is, it has a main sound pickup function.

由上述可知,本实施例提供的语音信号采集方法,通过获取第一音频信号和第二音频信号,该第一音频信号由第一音频采集单元针对通话语音采集得到,该第二音频信号由第二音频采集单元针对环境噪音采集得到,之后,根据该第一音频信号的第一幅值和第二音频信号的第二幅值判断是否满足预设调整条件,若是,则对该第二音频采集单元的属性参数进行调整,以使该第二音频采集单元对通话语音信号进行采集,从而在采集通话人声的主麦克风出现异常的情况下,能调用采集环境噪音的副麦克风来获采集通话人声,保证通话的正常进行,操作简单,灵活性高。As can be seen from the above, the voice signal collection method provided in this embodiment obtains the first audio signal and the second audio signal, the first audio signal is collected by the first audio collection unit for the call voice, and the second audio signal is collected by the second audio signal The second audio acquisition unit collects the environmental noise, and then judges whether the preset adjustment condition is satisfied according to the first amplitude of the first audio signal and the second amplitude of the second audio signal, and if so, collects the second audio The attribute parameters of the unit are adjusted so that the second audio acquisition unit collects the voice signal of the call, so that when the main microphone that collects the voice of the caller is abnormal, the secondary microphone that collects the ambient noise can be called to acquire the voice signal of the caller. Sound, to ensure the normal progress of the call, simple operation, high flexibility.

第二实施例second embodiment

根据实施例一所描述的方法,以下将举例作进一步详细说明。According to the method described in Embodiment 1, an example will be given below for further detailed description.

在本实施例中,将以该语音信号采集装置集成在终端中为例进行详细说明。In this embodiment, it will be described in detail by taking the voice signal collection device integrated in a terminal as an example.

如图2所示,一种语音信号采集方法,具体流程可以如下:As shown in Figure 2, a method for collecting voice signals, the specific process can be as follows:

S201、终端获取第一音频信号和第二音频信号,该第一音频信号由第一音频采集单元针对通话语音采集得到,该第二音频信号由第二音频采集单元针对环境噪音采集得到。S201. The terminal acquires a first audio signal and a second audio signal, the first audio signal is collected by the first audio collection unit for call voice, and the second audio signal is collected by the second audio collection unit for environmental noise.

譬如,当用户与好友通过终端进行通话时,可以通过安装在终端底部的主麦克风(第一音频采集单元)采集通话语音,得到第一音频信号,通过安装在终端顶部的副麦克风(第二音频采集单元)采集环境噪音,得到第二音频信号。For example, when a user talks to a friend through the terminal, the voice of the call can be collected through the main microphone (first audio collection unit) installed at the bottom of the terminal to obtain the first audio signal, and the second audio signal can be obtained through the secondary microphone (second audio collection unit) installed at the top of the terminal. The collecting unit) collects the ambient noise to obtain the second audio signal.

S202、终端分别获取该第一音频信号和第二音频信号的幅值,得到第一幅值和第二幅值。S202. The terminal acquires the amplitudes of the first audio signal and the second audio signal respectively, to obtain the first amplitude and the second amplitude.

譬如,若该第一音频信号和第二音频信号是在指定时长内采集的信号段,则终端可以分别获取该第一音频信号和第二音频信号在该指定时长内每一时刻的幅值。For example, if the first audio signal and the second audio signal are signal segments collected within a specified time period, the terminal may respectively acquire the amplitudes of the first audio signal and the second audio signal at each moment within the specified time period.

S203、终端判断该第二幅值是否大于第一幅值,若是,则可以执行下述步骤S204,若否,则可以不执行任何操作。S203. The terminal judges whether the second magnitude is greater than the first magnitude. If yes, the following step S204 may be performed. If not, no operation may be performed.

譬如,终端可以将任一时刻对应的第二幅值和第一幅值进行比较分析,只有当该指定时长内每一时刻对应的第二幅值均大于第一幅值时,才判断该第二幅值大于第一幅值。For example, the terminal can compare and analyze the second amplitude value corresponding to any moment with the first amplitude value, and only when the second amplitude value corresponding to each moment within the specified time period is greater than the first amplitude value, it can judge that the second amplitude value is greater than the first amplitude value. The second magnitude is greater than the first magnitude.

S204、终端计算该第一幅值和第二幅值之间的差值,当该差值大于预设差值时,终端将该第二音频采集单元的增益值调整到预设阀值。S204. The terminal calculates a difference between the first amplitude and the second amplitude, and when the difference is greater than a preset difference, the terminal adjusts the gain value of the second audio collection unit to a preset threshold.

譬如,终端可以计算任一时刻对应的第二幅值和第一幅值之间的差值,并将每一差值与该预设差值进行比较分析,当所有差值均大于预设差值时,终端可以增大安装在顶部的主麦克风的增益值,使该增益值达到预设阀值,从而调整频响曲线,使该主麦克风适用于采集通话人声。For example, the terminal can calculate the difference between the second amplitude and the first amplitude corresponding to any moment, and compare and analyze each difference with the preset difference. When all the differences are greater than the preset difference When the value is set, the terminal can increase the gain value of the main microphone installed on the top, so that the gain value reaches the preset threshold value, thereby adjusting the frequency response curve, so that the main microphone is suitable for collecting human voices.

由上述可知,本实施例提供的语音信号采集方法,终端通过获取第一音频信号和第二音频信号,其中该第一音频信号由第一音频采集单元针对通话语音采集得到,该第二音频信号由第二音频采集单元针对环境噪音采集得到,之后,分别获取该第一音频信号和第二音频信号的幅值,得到第一幅值和第二幅值,接着,判断该第二幅值是否大于第一幅值,若是,则计算该第一幅值和第二幅值之间的差值,且当该差值大于预设差值时,终端将该第二音频采集单元的增益值调整到预设阀值,相对于现有技术来说,通过在第一音频采集单元出现异常的情况下,改变第二音频采集单元的属性参数,达到利用该第二音频采集单元来采集通话语音的目的,从而保证通话语音的正常采集,操作简单,灵活性高。As can be seen from the above, in the voice signal collection method provided in this embodiment, the terminal obtains the first audio signal and the second audio signal, wherein the first audio signal is obtained by the first audio collection unit for the call voice, and the second audio signal It is collected by the second audio acquisition unit for environmental noise, and then the amplitudes of the first audio signal and the second audio signal are obtained respectively to obtain the first amplitude and the second amplitude, and then it is judged whether the second amplitude is greater than the first amplitude, if so, calculate the difference between the first amplitude and the second amplitude, and when the difference is greater than the preset difference, the terminal adjusts the gain value of the second audio acquisition unit To the preset threshold, compared with the prior art, by changing the attribute parameters of the second audio acquisition unit when the first audio acquisition unit is abnormal, the second audio acquisition unit is used to collect the call voice The purpose is to ensure the normal collection of call voice, simple operation and high flexibility.

第三实施例third embodiment

在实施例一和实施例二所述方法的基础上,本实施例将从语音信号采集装置的角度进一步进行描述,请参阅图3,图3具体描述了本发明第三实施例提供的语音信号采集装置,其可以包括:第一音频采集单元10、第二音频采集单元20、判断单元30和调整单元40,其中:On the basis of the methods described in Embodiment 1 and Embodiment 2, this embodiment will further describe from the perspective of a voice signal acquisition device, please refer to Figure 3, which specifically describes the voice signal provided by the third embodiment of the present invention The collection device may include: a first audio collection unit 10, a second audio collection unit 20, a judgment unit 30 and an adjustment unit 40, wherein:

(1)第一音频采集单元10(1) the first audio collection unit 10

第一音频采集单元10,用于获取第一音频信号,该第一音频信号针对通话语音采集得到。The first audio collection unit 10 is configured to obtain a first audio signal, and the first audio signal is collected for a call voice.

(2)第二音频采集单元20(2) second audio collection unit 20

第二音频采集单元20,用于获取第二音频信号,该第二音频信号针对环境噪音采集得到。The second audio collection unit 20 is configured to obtain a second audio signal, and the second audio signal is obtained by collecting ambient noise.

本实施例中,该第一音频信号主要包括人声,该第二音频信号主要包括环境噪音,通过采集第二音频信号,可以对该第一音频信号中的环境噪音进行过滤,得到较为清晰的通话人声。该第一音频采集单元10和第二音频采集单元20可以包括麦克风,具体数量可以根据实际需求而定,比如,该第一音频采集单元10可以包括2个或3个麦克风,形成麦克风阵列。In this embodiment, the first audio signal mainly includes human voice, and the second audio signal mainly includes environmental noise. By collecting the second audio signal, the environmental noise in the first audio signal can be filtered to obtain a clearer audio signal. Talking voice. The first audio collection unit 10 and the second audio collection unit 20 may include microphones, and the specific number may be determined according to actual needs. For example, the first audio collection unit 10 may include 2 or 3 microphones to form a microphone array.

通常,为较好的采集环境噪音或通话语音,该第一音频采集单元10和第二音频采集单元20中属性参数的设置是不同的,比如用于主拾音的第一音频采集单元10的增益(放大倍数)明显大于用于噪声参考的第二音频采集单元20的增益,等等,除此以外,该第一音频采集单元10和第二音频采集单元20的安装位置也是不同的,比如考虑到用户通话时抓握终端的习惯,该第一音频采集单元10一般安装在终端的底部,该第二音频采集单元20一般安装在终端的顶部。Usually, in order to better collect ambient noise or conversation voice, the setting of attribute parameters in the first audio collection unit 10 and the second audio collection unit 20 is different, such as the first audio collection unit 10 used for main sound pickup The gain (magnification) is obviously greater than the gain of the second audio acquisition unit 20 used for noise reference, etc. In addition, the installation positions of the first audio acquisition unit 10 and the second audio acquisition unit 20 are also different, such as Considering the user's habit of holding the terminal when talking, the first audio collection unit 10 is generally installed at the bottom of the terminal, and the second audio collection unit 20 is generally installed at the top of the terminal.

(3)判断单元30(3) judging unit 30

判断单元30,用于根据该第一音频信号的第一幅值和第二音频信号的第二幅值判断是否满足预设调整条件。The judging unit 30 is configured to judge whether a preset adjustment condition is satisfied according to the first amplitude of the first audio signal and the second amplitude of the second audio signal.

本实施例中,该预设调整条件可以根据实际需求而定,该第一幅值和第二幅值主要用于反映信号强度。通常情况下,该第一音频采集单元采集的通话人声的信号强度大于第二音频采集单元采集的环境噪音的信号强度。In this embodiment, the preset adjustment condition may be determined according to actual requirements, and the first amplitude and the second amplitude are mainly used to reflect signal strength. Usually, the signal strength of the caller's voice collected by the first audio collection unit is greater than the signal strength of the ambient noise collected by the second audio collection unit.

例如,请参见图4,该判断单元30具体可以包括计算子单元31和判断子单元32,其中:For example, referring to FIG. 4, the judging unit 30 may specifically include a calculation subunit 31 and a judging subunit 32, wherein:

计算子单元31,用于计算该第二音频信号的第二幅值和第一音频信号的第一幅值之间的差值;A calculating subunit 31, configured to calculate the difference between the second amplitude of the second audio signal and the first amplitude of the first audio signal;

判断子单元32,用于若该差值大于预设差值,则判断满足预设调整条件;若该差值不大于预设差值,则判断不满足预设调整条件。The judging subunit 32 is configured to judge that the preset adjustment condition is satisfied if the difference is greater than the preset difference; and judge that the preset adjustment condition is not satisfied if the difference is not greater than the preset difference.

本实施例中,该预设差值可以根据实际需求而定,其可以为一个预估值,也可以是一个经验值。当第二幅值大于第一幅值,且第二幅值和第一幅值间的差值大于预设差值时,说明第一音频采集单元10被堵或出现异常,从而利用该第一音频采集单元10采集的通话语音信号会很弱,难以满足通话需求,此时,可以判断满足预设调整条件。In this embodiment, the preset difference can be determined according to actual needs, and it can be an estimated value or an empirical value. When the second amplitude value is greater than the first amplitude value, and the difference between the second amplitude value and the first amplitude value is greater than the preset difference value, it indicates that the first audio collection unit 10 is blocked or abnormal, so that the first audio acquisition unit 10 is used to The call voice signal collected by the audio collection unit 10 will be very weak and difficult to meet the call requirements. At this time, it can be determined that the preset adjustment condition is met.

需要说明的是,若该异常情况是短时间发生的,比如用户的手指不小心堵住了该第一音频采集单元之后又移开了,这种情况下可以继续利用该第一音频采集单元10采集通话语音,无需进行调整操作,因此,为弄清楚该异常情况是长时间发生的还是短暂的,该第一音频信号和第二音频信号可以是在一定时长内采集得到的信号段,此时,只有当该信号段内每一时刻的第二幅值和第一幅值之间的差值均满足预设调整条件时,才表明该异常情况是长时间发生的,判断子单元32才可以判断满足预设调整条件。It should be noted that if the abnormal situation occurs in a short time, for example, the user's finger accidentally blocks the first audio collection unit and then removes it. In this case, the first audio collection unit 10 can continue to be used. There is no need to perform an adjustment operation to collect the conversation voice. Therefore, in order to find out whether the abnormal situation occurs for a long time or for a short time, the first audio signal and the second audio signal can be signal segments collected within a certain period of time. At this time , only when the difference between the second amplitude and the first amplitude at each moment in the signal segment satisfies the preset adjustment condition, it indicates that the abnormal situation has occurred for a long time, and the judging subunit 32 can It is judged that the preset adjustment condition is met.

(4)调整单元40(4) Adjustment unit 40

调整单元40,用于若是,则对该第二音频采集单元的属性参数进行调整,以使该第二音频采集单元对通话语音信号进行采集。The adjustment unit 40 is configured to, if yes, adjust the attribute parameters of the second audio collection unit, so that the second audio collection unit collects the call voice signal.

例如,该调整单元40具体可以包括获取子单元41和调整子单元42,其中:For example, the adjustment unit 40 may specifically include an acquisition subunit 41 and an adjustment subunit 42, wherein:

获取子单元41,用于获取预设阀值;An acquisition subunit 41, configured to acquire a preset threshold;

调整子单元42,用于利用该预设阀值对该第二音频采集单元的属性参数进行调整。The adjustment subunit 42 is configured to use the preset threshold value to adjust the attribute parameters of the second audio collection unit.

本实施例中,该预设阀值可以根据实际需求而定。该属性参数的调整方法可以有多种,比如调整单元40可以直接将该属性参数的值调整到该预设阀值,也可以将该属性参数的值调整到该预设阀值的N倍,等等。调整单元40通过利用该预设阀值对第二音频采集单元20的属性参数进行调整,可以使用于噪声参考的第二音频采集单元20具备主拾音功能。In this embodiment, the preset threshold may be determined according to actual needs. There are many ways to adjust the attribute parameter. For example, the adjustment unit 40 can directly adjust the value of the attribute parameter to the preset threshold value, or adjust the value of the attribute parameter to N times the preset threshold value. wait. The adjustment unit 40 adjusts the attribute parameters of the second audio collection unit 20 by using the preset threshold value, so that the second audio collection unit 20 used for noise reference can have the main sound pickup function.

例如,该属性参数可以包括增益值,此时,该调整子单元42具体可以用于:For example, the attribute parameter may include a gain value. At this time, the adjustment subunit 42 may specifically be used for:

将该第二音频采集单元的增益值调整到预设阀值。The gain value of the second audio collection unit is adjusted to a preset threshold value.

本实施例中,通过调整增益值到预设阀值,可以改变该第二音频采集单元获取的音频信号与噪音之间的关系,得到适宜的频响曲线,减小声音的失真度。In this embodiment, by adjusting the gain value to the preset threshold value, the relationship between the audio signal acquired by the second audio acquisition unit and the noise can be changed, an appropriate frequency response curve can be obtained, and sound distortion can be reduced.

具体实施时,以上各个单元可以作为独立的实体来实现,也可以进行任意组合,作为同一或若干个实体来实现,以上各个单元的具体实施可参见前面的方法实施例,在此不再赘述。During specific implementation, each of the above units may be implemented as an independent entity, or may be combined arbitrarily as the same or several entities. The specific implementation of each of the above units may refer to the previous method embodiments, and will not be repeated here.

由上述可知,本实施例提供的语音信号采集装置,通过分别利用第一音频采集单元10和第二音频采集单元20获取第一音频信号和第二音频信号,该第一音频信号针对通话语音采集得到,该第二音频信号针对环境噪音采集得到,之后,通过判断单元30根据该第一音频信号的第一幅值和第二音频信号的第二幅值判断是否满足预设调整条件,若满足,则调整单元40对该第二音频采集单元20的属性参数进行调整,以使该第二音频采集单元20对通话语音信号进行采集,从而在采集通话人声的主麦克风出现异常的情况下,能通过采集环境噪音的副麦克风来采集通话人声,保证通话的正常进行,操作简单,灵活性高。As can be seen from the above, the voice signal acquisition device provided in this embodiment obtains the first audio signal and the second audio signal by using the first audio acquisition unit 10 and the second audio acquisition unit 20 respectively, and the first audio signal is aimed at the call voice acquisition. Obtained, the second audio signal is collected for environmental noise, and then, the judging unit 30 judges whether the preset adjustment condition is satisfied according to the first amplitude of the first audio signal and the second amplitude of the second audio signal. , then the adjustment unit 40 adjusts the attribute parameters of the second audio collection unit 20, so that the second audio collection unit 20 collects the call voice signal, so that when the main microphone for collecting the caller’s voice is abnormal, The voice of the caller can be collected through the secondary microphone that collects the ambient noise to ensure the normal progress of the call, with simple operation and high flexibility.

第四实施例Fourth embodiment

相应的,本发明实施例还提供一种终端,如图5所示,该终端可以包括射频(RF,Radio Frequency)电路501、包括有一个或一个以上计算机可读存储介质的存储器502、输入单元503、显示单元504、传感器505、音频电路505、无线保真(WiFi,Wireless Fidelity)模块507、包括有一个或者一个以上处理核心的处理器508、以及电源509等部件。本领域技术人员可以理解,图5中示出的终端结构并不构成对终端的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。其中:Correspondingly, the embodiment of the present invention also provides a terminal. As shown in FIG. 5, the terminal may include a radio frequency (RF, Radio Frequency) circuit 501, a memory 502 including one or more computer-readable storage media, and an input unit 503 , a display unit 504 , a sensor 505 , an audio circuit 505 , a wireless fidelity (WiFi, Wireless Fidelity) module 507 , a processor 508 including one or more processing cores, and a power supply 509 and other components. Those skilled in the art can understand that the terminal structure shown in FIG. 5 does not constitute a limitation on the terminal, and may include more or less components than those shown in the figure, or combine some components, or arrange different components. in:

RF电路501可用于收发信息或通话过程中,信号的接收和发送,特别地,将基站的下行信息接收后,交由一个或者一个以上处理器508处理;另外,将涉及上行的数据发送给基站。通常,RF电路501包括但不限于天线、至少一个放大器、调谐器、一个或多个振荡器、用户身份模块(SIM,Subscriber Identity Module)卡、收发信机、耦合器、低噪声放大器(LNA,Low Noise Amplifier)、双工器等。此外,RF电路501还可以通过无线通信与网络和其他设备通信。所述无线通信可以使用任一通信标准或协议,包括但不限于全球移动通讯系统(GSM,Global System of Mobile communication)、通用分组无线服务(GPRS,GeneralPacket Radio Service)、码分多址(CDMA,Code Division Multiple Access)、宽带码分多址(WCDMA,Wideband Code Division Multiple Access)、长期演进(LTE,Long TermEvolution)、电子邮件、短消息服务(SMS,Short Messaging Service)等。The RF circuit 501 can be used for sending and receiving information or receiving and sending signals during a call. In particular, after receiving the downlink information of the base station, it is handed over to one or more processors 508 for processing; in addition, the data related to the uplink is sent to the base station . Generally, the RF circuit 501 includes, but is not limited to, an antenna, at least one amplifier, a tuner, one or more oscillators, a Subscriber Identity Module (SIM, Subscriber Identity Module) card, a transceiver, a coupler, a low noise amplifier (LNA, Low Noise Amplifier), duplexer, etc. In addition, the RF circuit 501 can also communicate with networks and other devices through wireless communication. The wireless communication can use any communication standard or protocol, including but not limited to Global System for Mobile Communications (GSM, Global System of Mobile communication), General Packet Radio Service (GPRS, General Packet Radio Service), Code Division Multiple Access (CDMA, Code Division Multiple Access), Wideband Code Division Multiple Access (WCDMA, Wideband Code Division Multiple Access), Long Term Evolution (LTE, Long Term Evolution), email, Short Message Service (SMS, Short Messaging Service), etc.

存储器502可用于存储软件程序以及模块,处理器508通过运行存储在存储器502的软件程序以及模块,从而执行各种功能应用以及数据处理。存储器502可主要包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需的应用程序(比如声音播放功能、图像播放功能等)等;存储数据区可存储根据终端的使用所创建的数据(比如音频数据、电话本等)等。此外,存储器502可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件、闪存器件、或其他易失性固态存储器件。相应地,存储器502还可以包括存储器控制器,以提供处理器508和输入单元503对存储器502的访问。The memory 502 can be used to store software programs and modules, and the processor 508 executes various functional applications and data processing by running the software programs and modules stored in the memory 502 . The memory 502 can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, at least one application program required by a function (such as a sound playback function, an image playback function, etc.); Data created by the use of the terminal (such as audio data, phonebook, etc.) and the like. In addition, the memory 502 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid-state storage devices. Correspondingly, the memory 502 may further include a memory controller to provide access to the memory 502 by the processor 508 and the input unit 503 .

输入单元503可用于接收输入的数字或字符信息,以及产生与用户设置以及功能控制有关的键盘、鼠标、操作杆、光学或者轨迹球信号输入。具体地,在一个具体的实施例中,输入单元503可包括触敏表面以及其他输入设备。触敏表面,也称为触摸显示屏或者触控板,可收集用户在其上或附近的触摸操作(比如用户使用手指、触笔等任何适合的物体或附件在触敏表面上或在触敏表面附近的操作),并根据预先设定的程式驱动相应的连接装置。可选的,触敏表面可包括触摸检测装置和触摸控制器两个部分。其中,触摸检测装置检测用户的触摸方位,并检测触摸操作带来的信号,将信号传送给触摸控制器;触摸控制器从触摸检测装置上接收触摸信息,并将它转换成触点坐标,再送给处理器508,并能接收处理器508发来的命令并加以执行。此外,可以采用电阻式、电容式、红外线以及表面声波等多种类型实现触敏表面。除了触敏表面,输入单元503还可以包括其他输入设备。具体地,其他输入设备可以包括但不限于物理键盘、功能键(比如音量控制按键、开关按键等)、轨迹球、鼠标、操作杆等中的一种或多种。The input unit 503 can be used to receive input numbers or character information, and generate keyboard, mouse, joystick, optical or trackball signal input related to user settings and function control. Specifically, in a specific embodiment, the input unit 503 may include a touch-sensitive surface and other input devices. A touch-sensitive surface, also known as a touch display or trackpad, collects user touch operations on or near it (for example, the user uses a finger, stylus, etc. any suitable object or accessory on the touch-sensitive surface or on the touch-sensitive Operation near the surface), and drive the corresponding connection device according to the preset program. Optionally, the touch-sensitive surface 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 sends it to to the processor 508, and can receive and execute commands sent by the processor 508. In addition, touch-sensitive surfaces can be implemented in various types such as resistive, capacitive, infrared, and surface acoustic wave. In addition to touch-sensitive surfaces, the input unit 503 may also include other input devices. Specifically, other input devices 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.

显示单元504可用于显示由用户输入的信息或提供给用户的信息以及终端的各种图形用户接口,这些图形用户接口可以由图形、文本、图标、视频和其任意组合来构成。显示单元504可包括显示面板,可选的,可以采用液晶显示器(LCD,Liquid Crystal Display)、有机发光二极管(OLED,Organic Light-Emitting Diode)等形式来配置显示面板。进一步的,触敏表面可覆盖显示面板,当触敏表面检测到在其上或附近的触摸操作后,传送给处理器508以确定触摸事件的类型,随后处理器508根据触摸事件的类型在显示面板上提供相应的视觉输出。虽然在图5中,触敏表面与显示面板是作为两个独立的部件来实现输入和输入功能,但是在某些实施例中,可以将触敏表面与显示面板集成而实现输入和输出功能。The display unit 504 can be used to display information input by or provided to the user and various graphical user interfaces of the terminal. These graphical user interfaces can be composed of graphics, text, icons, videos and any combination thereof. The display unit 504 may include a display panel. Optionally, the display panel may be configured in the form of a liquid crystal display (LCD, Liquid Crystal Display), an organic light-emitting diode (OLED, Organic Light-Emitting Diode), and the like. Further, the touch-sensitive surface can cover the display panel. When the touch-sensitive surface detects a touch operation on or near it, it is sent to the processor 508 to determine the type of the touch event, and then the processor 508 displays on the display according to the type of the touch event. The corresponding visual output is provided on the panel. Although in FIG. 5, the touch-sensitive surface and the display panel are used as two independent components to realize the input and input functions, in some embodiments, the touch-sensitive surface and the display panel can be integrated to realize the input and output functions.

终端还可包括至少一种传感器505,比如光传感器、运动传感器以及其他传感器。具体地,光传感器可包括环境光传感器及接近传感器,其中,环境光传感器可根据环境光线的明暗来调节显示面板的亮度,接近传感器可在终端移动到耳边时,关闭显示面板和/或背光。作为运动传感器的一种,重力加速度传感器可检测各个方向上(一般为三轴)加速度的大小,静止时可检测出重力的大小及方向,可用于识别手机姿态的应用(比如横竖屏切换、相关游戏、磁力计姿态校准)、振动识别相关功能(比如计步器、敲击)等;至于终端还可配置的陀螺仪、气压计、湿度计、温度计、红外线传感器等其他传感器,在此不再赘述。The terminal may also include at least one sensor 505, 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 the display panel according to the brightness of the ambient light, and the proximity sensor may turn off the display panel and/or the backlight when the terminal moves to the ear . As a kind of motion sensor, the gravitational acceleration sensor can detect the magnitude of acceleration in various directions (generally three axes), and can detect the magnitude and direction of gravity when it is stationary, and can be used for applications that recognize the attitude of mobile phones (such as horizontal and vertical screen switching, related Games, magnetometer attitude calibration), vibration recognition related functions (such as pedometer, tap), etc.; as for other sensors such as gyroscope, barometer, hygrometer, thermometer, infrared sensor, etc. repeat.

音频电路506、扬声器,传声器可提供用户与终端之间的音频接口。音频电路506可将接收到的音频数据转换后的电信号,传输到扬声器,由扬声器转换为声音信号输出;另一方面,传声器将收集的声音信号转换为电信号,由音频电路506接收后转换为音频数据,再将音频数据输出处理器508处理后,经RF电路501以发送给比如另一终端,或者将音频数据输出至存储器502以便进一步处理。音频电路506还可能包括耳塞插孔,以提供外设耳机与终端的通信。The audio circuit 506, the speaker, and the microphone can provide an audio interface between the user and the terminal. The audio circuit 506 can transmit the electrical signal converted from the received audio data to the speaker, and the speaker converts it into an audio signal for output; on the other hand, the microphone converts the collected audio signal into an electrical signal, which is converted by the audio circuit 506 After being processed by the audio data output processor 508, the audio data is sent to another terminal through the RF circuit 501, or the audio data is output to the memory 502 for further processing. The audio circuit 506 may also include an earplug jack to provide communication between an external earphone and the terminal.

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

处理器508是终端的控制中心,利用各种接口和线路连接整个手机的各个部分,通过运行或执行存储在存储器502内的软件程序和/或模块,以及调用存储在存储器502内的数据,执行终端的各种功能和处理数据,从而对手机进行整体监控。可选的,处理器508可包括一个或多个处理核心;优选的,处理器508可集成应用处理器和调制解调处理器,其中,应用处理器主要处理操作系统、用户界面和应用程序等,调制解调处理器主要处理无线通信。可以理解的是,上述调制解调处理器也可以不集成到处理器508中。The processor 508 is the control center of the terminal, and uses various interfaces and lines to connect various parts of the entire mobile phone. By running or executing software programs and/or modules stored in the memory 502, and calling data stored in the memory 502, execution Various functions and processing data of the terminal, so as to monitor the mobile phone as a whole. Optionally, the processor 508 may include one or more processing cores; preferably, the processor 508 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 handles wireless communications. It can be understood that the foregoing modem processor may not be integrated into the processor 508 .

终端还包括给各个部件供电的电源509(比如电池),优选的,电源可以通过电源管理系统与处理器508逻辑相连,从而通过电源管理系统实现管理充电、放电、以及功耗管理等功能。电源509还可以包括一个或一个以上的直流或交流电源、再充电系统、电源故障检测电路、电源转换器或者逆变器、电源状态指示器等任意组件。The terminal also includes a power supply 509 (such as a battery) for supplying power to various components. Preferably, the power supply can be logically connected to the processor 508 through a power management system, so that functions such as charging, discharging, and power consumption management can be implemented through the power management system. The power supply 509 may also include one or more DC or AC power supplies, recharging systems, power failure detection circuits, power converters or inverters, power status indicators and other arbitrary components.

尽管未示出,终端还可以包括主麦克风和副麦克风,该主麦克风用于针对通话语音进行采集,得到第一音频信号,该副麦克风用于针对环境噪音进行采集,得到第二音频信号。当该第一音频信号的第一幅值和第二音频信号的第二幅值满足预设调整条件时,该副麦克风替换该主麦克风进行通话语音信号的采集。Although not shown, the terminal may further include a primary microphone and a secondary microphone, the primary microphone is used to collect call voice to obtain a first audio signal, and the secondary microphone is used to collect ambient noise to obtain a second audio signal. When the first amplitude of the first audio signal and the second amplitude of the second audio signal meet a preset adjustment condition, the auxiliary microphone replaces the main microphone to collect the voice signal of the call.

此外,终端还可以包括摄像头、蓝牙模块等,在此不再赘述。具体在本实施例中,终端中的处理器508会按照如下的指令,将一个或一个以上的应用程序的进程对应的可执行文件加载到存储器502中,并由处理器508来运行存储在存储器502中的应用程序,从而实现各种功能:In addition, the terminal may also include a camera, a Bluetooth module, etc., which will not be repeated here. Specifically, in this embodiment, the processor 508 in the terminal loads the executable file corresponding to the process of one or more application programs into the memory 502 according to the following instructions, and the processor 508 runs the executable file stored in the memory. 502 in order to achieve various functions:

控制该主麦克风针对通话语音进行采集,得到第一音频信号,以及控制该副麦克风针对环境噪音进行采集,得到第二音频信号;Controlling the primary microphone to collect call voice to obtain a first audio signal, and controlling the secondary microphone to collect ambient noise to obtain a second audio signal;

当该第一音频信号的第一幅值和第二音频信号的第二幅值满足预设调整条件时,控制该副麦克风替换该主麦克风进行通话语音信号的采集。When the first amplitude of the first audio signal and the second amplitude of the second audio signal meet the preset adjustment condition, the secondary microphone is controlled to replace the main microphone to collect the call voice signal.

优选的,在处理器控制该副麦克风替换该主麦克风进行通话语音信号的采集之前,还可以包括:Preferably, before the processor controls the secondary microphone to replace the primary microphone to collect the call voice signal, it may also include:

计算该第二音频信号的第二幅值和第一音频信号的第一幅值之间的差值;calculating the difference between the second amplitude of the second audio signal and the first amplitude of the first audio signal;

若该差值大于预设差值,则判断满足预设调整条件;If the difference is greater than the preset difference, it is judged that the preset adjustment condition is met;

若该差值不大于预设差值,则判断不满足预设调整条件。If the difference is not greater than the preset difference, it is determined that the preset adjustment condition is not met.

优选的,该属性参数包括增益值,处理器控制该副麦克风替换该主麦克风进行通话语音信号的采集,包括:Preferably, the attribute parameter includes a gain value, and the processor controls the secondary microphone to replace the primary microphone to collect the voice signal of the call, including:

获取预设阀值;Get the preset threshold;

利用该预设阀值对该副麦克风的属性参数进行调整。The attribute parameters of the secondary microphone are adjusted by using the preset threshold value.

优选的,处理器利用该预设阀值对该副麦克风的属性参数进行调整,包括:Preferably, the processor uses the preset threshold to adjust the attribute parameters of the secondary microphone, including:

将该副麦克风的增益值调整到预设阀值。Adjust the gain value of the secondary microphone to the preset threshold.

以上各操作的实现方法具体可参见上述实施例,此处不再赘述。For the implementation methods of the above operations, reference may be made to the foregoing embodiments, and details are not repeated here.

该终端可以实现本发明实施例所提供的任一种语音信号采集装置所能实现的有效效果,详见前面的实施例,在此不再赘述。The terminal can achieve the effective effects that can be achieved by any voice signal acquisition device provided by the embodiments of the present invention. For details, refer to the previous embodiments, which will not be repeated here.

本领域普通技术人员可以理解上述实施例的各种方法中的全部或部分步骤是可以通过程序来指令相关的硬件来完成,该程序可以存储于一计算机可读存储介质中,存储介质可以包括:只读存储器(ROM,Read Only Memory)、随机存取记忆体(RAM,RandomAccess Memory)、磁盘或光盘等。Those of ordinary skill in the art can understand that all or part of the steps in the various methods of the above-mentioned embodiments can be completed by instructing related hardware through a program, and the program can be stored in a computer-readable storage medium, and the storage medium can include: Read Only Memory (ROM, Read Only Memory), Random Access Memory (RAM, Random Access Memory), disk or CD, etc.

以上对本发明实施例所提供的一种语音信号采集方法、装置及终端进行了详细介绍,本文中应用了具体个例对本发明的原理及实施方式进行了阐述,以上实施例的说明只是用于帮助理解本发明的方法及其核心思想;同时,对于本领域的技术人员,依据本发明的思想,在具体实施方式及应用范围上均会有改变之处,综上所述,本说明书内容不应理解为对本发明的限制。Above, a kind of voice signal collection method, device and terminal provided by the embodiment of the present invention have been introduced in detail. In this paper, specific examples have been used to illustrate the principle and implementation of the present invention. The description of the above embodiment is only used to help Understand the method of the present invention and its core idea; at the same time, for those skilled in the art, according to the idea of the present invention, there will be changes in the specific implementation and scope of application. In summary, the content of this specification should not be construed as a limitation of the invention.

Claims (5)

1. a kind of speech signal collection method, it is characterised in that including:
The first audio signal and the second audio signal of collection in certain time length are obtained, first audio signal is by the first sound Frequency collecting unit is directed to the signal segment that call voice is collected, and second audio signal is by the second audio collection unit pin The signal segment collected to environmental noise;
Calculate each moment in the certain time length, the second amplitude of second audio signal and the first of the first audio signal Difference between amplitude;
If the difference at each moment is all higher than preset difference value, pre-set threshold value is obtained, and using the pre-set threshold value to described the The property parameters of two audio collection units are adjusted.
2. speech signal collection method according to claim 1, it is characterised in that the property parameters include yield value, It is described using the pre-set threshold value property parameters of the second audio collection unit are adjusted including:
The yield value of the second audio collection unit is adjusted to pre-set threshold value.
3. a kind of voice signal acquisition device, it is characterised in that including:
First audio collection unit, the first audio signal gathered for obtaining in certain time length, first audio signal is The signal segment collected for call voice;
Second audio collection unit, the second audio signal gathered for obtaining in the certain time length, the second audio letter Number it is the signal segment collected for environmental noise;
Judging unit, is specifically included:
Computation subunit, for calculating each moment in the certain time length, the second amplitude of second audio signal and Difference between the first amplitude of one audio signal;Judgment sub-unit, if the difference for each moment is all higher than preset difference value, Then judge to meet default regularization condition;If the difference at each moment is not all higher than preset difference value, judgement is unsatisfactory for default tune Shelf-regulating Conditions;
Adjustment unit, is specifically included:
Subelement is obtained, if for judging to meet default regularization condition, obtaining pre-set threshold value;Subelement is adjusted, for utilizing The pre-set threshold value is adjusted to the property parameters of the second audio collection unit.
4. voice signal acquisition device according to claim 3, it is characterised in that the property parameters include yield value, It is described adjustment subelement specifically for:
The yield value of the second audio collection unit is adjusted to pre-set threshold value.
5. a kind of computer-readable recording medium, its computer program that is stored with, wherein, when the computer program is in computer During upper operation so that the computer performs the method as described in claim 1.
CN201610790742.8A 2016-08-31 2016-08-31 A kind of speech signal collection method, device and terminal Expired - Fee Related CN106331359B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610790742.8A CN106331359B (en) 2016-08-31 2016-08-31 A kind of speech signal collection method, device and terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610790742.8A CN106331359B (en) 2016-08-31 2016-08-31 A kind of speech signal collection method, device and terminal

Publications (2)

Publication Number Publication Date
CN106331359A CN106331359A (en) 2017-01-11
CN106331359B true CN106331359B (en) 2017-09-12

Family

ID=57789108

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610790742.8A Expired - Fee Related CN106331359B (en) 2016-08-31 2016-08-31 A kind of speech signal collection method, device and terminal

Country Status (1)

Country Link
CN (1) CN106331359B (en)

Families Citing this family (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108390996A (en) * 2018-01-25 2018-08-10 维沃移动通信有限公司 A kind of display methods, mobile terminal
CN109005272B (en) * 2018-07-24 2021-01-29 Oppo(重庆)智能科技有限公司 Voice pickup method and related products
CN109151701A (en) * 2018-07-26 2019-01-04 Oppo广东移动通信有限公司 Microphone hole blockage detection method and related product
CN110166615A (en) * 2019-05-28 2019-08-23 努比亚技术有限公司 Automatically switch method, apparatus, terminal and the storage medium in call uplink signal source
CN110166879B (en) * 2019-06-28 2020-11-13 歌尔科技有限公司 Voice acquisition control method and device and TWS earphone
CN110536193B (en) * 2019-07-24 2020-12-22 华为技术有限公司 Audio signal processing method and device
CN112449040A (en) * 2020-11-17 2021-03-05 珠海格力电器股份有限公司 Microphone control method of mobile terminal and mobile terminal
CN112492498B (en) * 2021-02-05 2021-05-07 杭州兆华电子有限公司 Testing method of call noise reduction earphone
CN115547314A (en) * 2021-06-29 2022-12-30 佛山市顺德区美的电子科技有限公司 Control method, control device, air conditioner and storage medium of sound collection device
CN115910123B (en) * 2022-11-18 2025-04-29 深圳市锐尔觅移动通信有限公司 Audio processing method, device and electronic equipment
CN120729982A (en) * 2024-03-21 2025-09-30 荣耀终端股份有限公司 Volume adjustment method and electronic device

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102710856A (en) * 2012-05-23 2012-10-03 华为终端有限公司 Control method and control device
CN203219384U (en) * 2012-12-26 2013-09-25 深圳市金立通信设备有限公司 Device for processing communication environment noise and mobile terminal
CN103325378A (en) * 2013-07-16 2013-09-25 珠海市魅族科技有限公司 Terminal voice noise reducing method and terminal
CN104538040A (en) * 2014-11-28 2015-04-22 广东欧珀移动通信有限公司 A method and device for dynamically selecting call voice signals
JP2016090799A (en) * 2014-11-05 2016-05-23 日本電信電話株式会社 Noise suppression device, method and program thereof

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102710856A (en) * 2012-05-23 2012-10-03 华为终端有限公司 Control method and control device
CN203219384U (en) * 2012-12-26 2013-09-25 深圳市金立通信设备有限公司 Device for processing communication environment noise and mobile terminal
CN103325378A (en) * 2013-07-16 2013-09-25 珠海市魅族科技有限公司 Terminal voice noise reducing method and terminal
JP2016090799A (en) * 2014-11-05 2016-05-23 日本電信電話株式会社 Noise suppression device, method and program thereof
CN104538040A (en) * 2014-11-28 2015-04-22 广东欧珀移动通信有限公司 A method and device for dynamically selecting call voice signals

Also Published As

Publication number Publication date
CN106331359A (en) 2017-01-11

Similar Documents

Publication Publication Date Title
CN106331359B (en) A kind of speech signal collection method, device and terminal
CN104243671B (en) Volume adjusting method, device and electronic equipment
CN106357925B (en) Switching method, device and terminal for screen brightness adjustment mode
CN109067981B (en) Split-screen application switching method, device, storage medium and electronic device
CN106936516B (en) Display state control method, storage medium and terminal
CN106850978A (en) A kind of application control method and relevant device
CN106373531A (en) Display brightness adjustment method and electronic device
CN103634717A (en) Method, device and terminal equipment utilizing earphone to control
CN106385485A (en) Call recording method, device and mobile terminal
CN107219951B (en) Touch screen control method and device, storage medium and terminal equipment
CN107172671A (en) A kind of channel switching method, device, storage medium and terminal
CN106126170A (en) A terminal sound effect setting method and terminal
CN107171740B (en) Radio frequency interference processing method, device, storage medium and terminal
CN103489452A (en) Method and device for eliminating call noise and terminal device
CN106254673A (en) Terminal fall detection method and device
CN106454953B (en) Flow control method, device and terminal
CN106648205B (en) Sleep control method, device and terminal
CN106374988B (en) Method, device and terminal for configuring inter-downlink-band carrier aggregation
CN106255146B (en) A kind of electricity-saving control method of terminal, device and terminal
CN110022600B (en) Driving current adjusting method and device, storage medium and mobile terminal
CN109739641B (en) Self-adaptive CPU frequency modulation acceleration method and device, mobile terminal and storage medium
CN106227337A (en) Method, device and terminal for adjusting screen brightness
CN108900361A (en) Cloud resource, which configures, determines method, apparatus and electronic equipment
CN106210951A (en) Adaptation method, device and terminal of a bluetooth headset
CN106445841B (en) Data transmission control method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CP01 Change in the name or title of a patent holder

Address after: Changan town in Guangdong province Dongguan 523860 usha Beach Road No. 18

Patentee after: GUANGDONG OPPO MOBILE TELECOMMUNICATIONS Corp.,Ltd.

Address before: Changan town in Guangdong province Dongguan 523860 usha Beach Road No. 18

Patentee before: GUANGDONG OPPO MOBILE TELECOMMUNICATIONS Corp.,Ltd.

CP01 Change in the name or title of a patent holder
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20170912

CF01 Termination of patent right due to non-payment of annual fee