Microphone gain adjusting method, device, system and storage medium

文档序号:1651482 发布日期:2019-12-24 浏览:34次 中文

阅读说明:本技术 麦克风增益调节方法、装置、系统及存储介质 (Microphone gain adjusting method, device, system and storage medium ) 是由 凌华东 于 2019-08-29 设计创作,主要内容包括:本发明公开了一种麦克风增益调节方法、装置、系统及存储介质。本发明中获取扬声器所播放声音信号的音量值;判断音量值是否大于预设音量阈值;若是,则根据播放声音信号的音量值对预设麦克风增益做减小处理,并将减小后得到的目标增益设定为当前麦克风增益。本发明中的麦克风增益调节方法在扬声器播放声音信号的音量值大于预设音量阈值时,减小预设麦克风增益,将较小的麦克风增益设定为当前麦克风增益,避免扬声器发出的较大音量的声音信号被麦克风拾取放大后产生非线性失真,可得到准确的用户声音信号,进而保证有效唤醒智能音响。(The invention discloses a microphone gain adjusting method, a microphone gain adjusting device, a microphone gain adjusting system and a storage medium. The invention obtains the volume value of the sound signal played by the loudspeaker; judging whether the volume value is larger than a preset volume threshold value or not; if so, reducing the preset microphone gain according to the volume value of the played sound signal, and setting the target gain obtained after reduction as the current microphone gain. According to the microphone gain adjusting method, when the volume value of the sound signal played by the loudspeaker is larger than the preset volume threshold value, the preset microphone gain is reduced, the smaller microphone gain is set as the current microphone gain, nonlinear distortion generated after the sound signal with larger volume sent by the loudspeaker is picked and amplified by the microphone is avoided, the accurate user sound signal can be obtained, and the intelligent sound is effectively awakened.)

1. The microphone gain adjusting method is applied to an intelligent sound box, and a microphone and a loudspeaker are arranged on the intelligent sound box body, and is characterized by comprising the following steps:

acquiring the volume value of a sound signal played by the loudspeaker;

judging whether the volume value is larger than a preset volume threshold value or not;

if so, reducing the preset microphone gain according to the volume value of the played sound signal, and setting the target gain obtained after reduction as the current microphone gain.

2. The method of claim 1, wherein the relationship between the preset microphone gain and the target gain is:

G=G0-△G

where G is the target gain, G0 is the preset microphone gain, and Δ G is the reduced gain.

3. The microphone gain adjustment method according to claim 2, wherein a volume value of the sound signal and a reduced gain corresponding to the volume value are prestored in the smart audio; the step of reducing the preset microphone gain according to the volume value of the played sound signal and setting the target gain obtained after reduction as the current microphone gain comprises the following steps:

obtaining a reduced gain corresponding to the volume value according to the volume value of the played sound signal;

reducing the reduced gain from a preset microphone gain to obtain a target gain;

setting the target gain to a current microphone gain.

4. The microphone gain adjustment method according to claim 1, wherein the step of setting the preset volume threshold value comprises:

controlling the loudspeaker to play the sound signal with the first volume value so that the average volume value of the sound signals picked up by the microphone is equal to a preset maximum decibel value;

setting a ratio of the first volume value to a maximum volume value of the speaker as the preset volume value.

5. The microphone gain adjustment method according to claim 1, wherein a volume threshold table is pre-stored in the smart sound box, and the volume threshold table includes a sound type and a preset volume threshold corresponding to the sound type; before the step of obtaining the volume value of the sound played by the loudspeaker, the method further comprises the following steps:

acquiring the type of sound played by the loudspeaker;

and inquiring and acquiring a preset volume threshold corresponding to the sound type according to the sound type and a prestored volume threshold table.

6. The microphone gain adjustment method according to claim 5, wherein the step of obtaining the type of sound played by the speaker further comprises the steps of:

detecting and judging whether the loudspeaker plays the sound signal;

if the sound signal is not played, setting the preset microphone gain as the current microphone gain;

and if the sound signal is played, acquiring the sound type played by the loudspeaker.

7. The microphone gain adjustment method according to claim 6, wherein the not playing the sound signal comprises pausing the playing of the sound signal and stopping the playing of the sound signal.

8. A microphone gain adjustment apparatus, comprising:

the volume acquisition module is used for acquiring the volume value of the sound signal played by the loudspeaker;

the volume judging module is used for judging whether the volume value is larger than a preset volume threshold value or not;

and the gain adjusting module is used for reducing the preset microphone gain according to the volume value of the played sound signal when the volume value is larger than a preset volume threshold value, and setting the target gain obtained after reduction as the current microphone gain.

9. A microphone gain adjustment system, comprising a processor and a memory, wherein the processor is coupled to the memory and executes instructions to implement the microphone gain adjustment method of any of claims 1-7 when in operation.

10. A storage medium having a computer program stored thereon, the computer program being executable by a processor to implement the microphone gain adjustment method of any one of claims 1 to 7.

Technical Field

The present invention relates to the field of voice control technologies, and in particular, to a method, an apparatus, a system, and a storage medium for adjusting microphone gain.

Background

For the intelligent sound box appearing in recent years, a microphone and a loudspeaker are arranged on the box body of the intelligent sound box, when music is played by the loudspeaker, a user speaks into the intelligent sound box, at the moment, the microphone picks up music sound signals and user sound signals, and in order to obtain the user sound signals, an echo cancellation algorithm is needed to filter the music sound signals to obtain the user sound signals. However, the existing smart speaker usually performs gain amplification processing on the sound signals picked up by the microphone, the gain value is fixed and is large, when the speaker plays music and the volume is large, the smart speaker performs gain amplification processing on the music sound signals picked up by the microphone, and the amplified music sound signals obtained can have amplitude clipping phenomenon and generate nonlinear distortion. However, the echo cancellation algorithm can only effectively filter linear sound signals, and cannot completely filter sound signals with nonlinear distortion, and at this time, the user sound signals obtained after processing by the echo cancellation algorithm are inaccurate, so that it is difficult for the user to wake up the smart sound box when the volume of the smart sound box playing music is large.

Disclosure of Invention

The invention mainly provides a microphone gain adjusting method which can solve the problem that when the volume of music played by an intelligent sound box is larger, the sound signals of the music after gain amplification processing generate nonlinear distortion, so that a user is difficult to awaken the intelligent sound box.

In order to solve the technical problems, the invention adopts a technical scheme that: providing a microphone gain adjusting method, wherein the microphone gain adjusting method is applied to a smart sound box, a microphone and a loudspeaker are arranged on a box body of the smart sound box, and the microphone gain adjusting method comprises the following steps:

acquiring the volume value of a sound signal played by the loudspeaker;

judging whether the volume value is larger than a preset volume threshold value or not;

if so, reducing the preset microphone gain according to the volume value of the played sound signal, and setting the target gain obtained after reduction as the current microphone gain.

Preferably, the relationship between the preset microphone gain and the target gain is:

G=G0-△G

where G is the target gain, G0 is the preset microphone gain, and Δ G is the reduced gain.

Preferably, the volume value of the sound signal and the reduced scale gain corresponding to the volume value are prestored in the smart sound; the step of reducing the preset microphone gain according to the volume value of the played sound signal and setting the target gain obtained after reduction as the current microphone gain comprises the following steps:

obtaining a reduced gain corresponding to the volume value according to the volume value of the played sound signal;

reducing the reduced gain from a preset microphone gain to obtain a target gain;

setting the target gain to a current microphone gain.

Preferably, the step of setting the preset volume threshold includes:

controlling the loudspeaker to play the sound signal with the first volume value so that the average volume value of the sound signals picked up by the microphone is equal to a preset maximum decibel value;

setting a ratio of the first volume value to a maximum volume value of the speaker as the preset volume value.

Preferably, a volume threshold table is prestored in the smart sound box, and the volume threshold table includes a sound type and a preset volume threshold corresponding to the sound type; before the step of obtaining the volume value of the sound played by the loudspeaker, the method further comprises the following steps:

acquiring the type of sound played by the loudspeaker;

and inquiring and acquiring a preset volume threshold corresponding to the sound type according to the sound type and a prestored volume threshold table.

Preferably, the step of obtaining the type of sound played by the speaker further comprises the following steps:

detecting and judging whether the loudspeaker plays the sound signal;

if the sound signal is not played, setting the preset microphone gain as the current microphone gain;

and if the sound signal is played, acquiring the sound type played by the loudspeaker.

Preferably, the sound signal not being played includes a pause sound signal and a stop sound signal.

In order to solve the technical problem, the invention adopts another technical scheme that: there is provided a microphone gain adjustment apparatus including:

the volume acquisition module is used for acquiring the volume value of the sound signal played by the loudspeaker;

the volume judging module is used for judging whether the volume value is larger than a preset volume threshold value or not;

and the gain adjusting module is used for reducing the preset microphone gain according to the volume value of the played sound signal when the volume value is larger than a preset volume threshold value, and setting the target gain obtained after reduction as the current microphone gain.

In order to solve the technical problem, the invention adopts another technical scheme that: there is provided a microphone gain adjustment system comprising a processor and a memory, the processor being coupled to the memory and the processor executing instructions in operation to implement the microphone gain adjustment method.

In order to solve the technical problem, the invention adopts another technical scheme that: there is provided a storage medium having stored thereon a computer program for execution by a processor to implement the microphone gain adjustment method.

The invention has the beneficial effects that: different from the prior art, the invention acquires the volume value of the sound signal played by the loudspeaker; judging whether the volume value is larger than a preset volume threshold value or not; if so, reducing the preset microphone gain according to the volume value of the played sound signal, and setting the target gain obtained after reduction as the current microphone gain. According to the microphone gain adjusting method, when the volume value of the sound signal played by the loudspeaker is larger than the preset volume threshold value, the preset microphone gain is reduced, the smaller microphone gain is set as the current microphone gain, nonlinear distortion generated after the sound signal with larger volume sent by the loudspeaker is picked and amplified by the microphone is avoided, the accurate user sound signal can be obtained, and the intelligent sound is effectively awakened.

Drawings

In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the description of the embodiments are briefly introduced below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and other drawings can be obtained by those skilled in the art without inventive efforts, wherein:

fig. 1 is a flowchart of a microphone gain adjustment method according to an embodiment of the present invention;

FIG. 2 is a flow chart of a microphone gain adjustment method according to another embodiment of the invention;

fig. 3 is a schematic structural diagram of a microphone gain adjustment apparatus according to another embodiment of the present invention;

fig. 4 is a schematic structural diagram of a microphone gain adjustment system according to another embodiment of the present invention;

fig. 5 is a schematic structural diagram of a storage medium according to another embodiment of the present invention.

Detailed Description

The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.

10页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:360度音源实时回放系统

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!