Method for tuning and adapting sound field in different spaces based on audio processor

文档序号:1925729 发布日期:2021-12-03 浏览:27次 中文

阅读说明:本技术 基于音频处理器在不同空间中调音适配声场的方法 (Method for tuning and adapting sound field in different spaces based on audio processor ) 是由 国明 侯欢 徐浩 于 2021-08-27 设计创作,主要内容包括:本发明公开一种基于音频处理器调音适配声场的方法,按下一键调音键使音频处理器的调音程序启动后,自动执行处理步骤实现调音以适配声场:由音频处理器控制扬声器播放正弦信号、白噪声,由麦克风采集信号,形成闭环系统;使用固定的硬件输入增益,逐次调整硬件输出增益,再用调整过的硬件输出增益,重新细调增益,使闭环系统趋于稳定。本发明可通过一个按键,实现自适应调音,能依据空间环境、设备位置距离、设备类型自动设置硬件增益参数、算法参数,达到最佳音频算法效果和最合理的声音大小。(The invention discloses a method for tuning and adapting a sound field based on an audio processor, which is characterized in that after a tuning key is pressed down to start a tuning program of the audio processor, the processing steps are automatically executed to realize tuning to adapt the sound field: the audio processor controls the loudspeaker to play sinusoidal signals and white noise, and the microphone collects signals to form a closed-loop system; and gradually adjusting the output gain of the hardware by using the fixed input gain of the hardware, and finely adjusting the gain again by using the adjusted output gain of the hardware to enable the closed-loop system to tend to be stable. The invention can realize self-adaptive tuning by one key, can automatically set hardware gain parameters and algorithm parameters according to the space environment, the position distance of equipment and the type of the equipment, and achieves the optimal audio algorithm effect and the most reasonable sound size.)

1. The method for tuning and adapting the sound field based on the audio processor is characterized in that after a tuning key is pressed down to start a tuning program of the audio processor, the following steps are automatically executed to realize tuning and adapt the sound field:

s1, controlling all loudspeakers to play white noise by an audio processor, collecting signals by a microphone, judging whether the microphone is accessed or not and the type of the accessed microphone according to the amplitude of the signals collected by the microphone of each channel, and endowing different hardware gains to different microphones;

s2, enabling each output channel loudspeaker to successively play sinusoidal signals with preset frequency by the audio processor according to the serial number of the output channel, then acquiring the signals by using all accessed microphones, determining whether each output channel is accessed to the loudspeaker according to the maximum amplitude and harmonic distortion rate of the signals acquired by all the accessed microphones, and determining the channel number of the loudspeakers accessed by the audio processor;

s3, on the basis of judging the number of the connected microphones and the number of the loudspeakers, enabling each connected loudspeaker to play white noise successively by the audio processor to be collected by all the connected microphones, comparing the maximum signal amplitude collected by all the microphones with a loudspeaker single-step debugging threshold value to obtain a difference value between the actual collected amplitude and the loudspeaker single-step debugging threshold value, and using the difference value to adjust the hardware gain of the corresponding loudspeaker successively;

s4, controlling all detected loudspeakers to play white noise at the same time, comparing debugging thresholds of all the loudspeakers according to the amplitude of signals collected by the detected microphone, and synchronously adjusting the hardware gains of all the loudspeakers again;

s5, entering a rechecking program, controlling all loudspeakers to play white noise at the same time, comparing microphone rechecking thresholds according to the amplitude of sound collected by each microphone, and correspondingly adjusting the microphone gain;

s6, controlling all loudspeakers to play white noise simultaneously again, collecting signals by the microphones, setting sound delay according to the change of each frame of amplitude of the downmixed signals of all the microphones, setting the length of a cancellation filter of an algorithm according to the change rate of the amplitude, and performing echo cancellation by using an echo cancellation algorithm;

and S7, determining the pressing time of the key tuning key, determining a corresponding tuning scene according to the pressing time, determining whether the corresponding tuning step is ended or not according to the determined tuning scene, and ending tuning or continuing tuning.

2. The method for tuning an adaptation to a sound field based on an audio processor of claim 1, wherein the hardware gains of the microphone and the speaker are both gains internal to the audio processor.

3. The method for tuning and adapting a sound field based on an audio processor according to claim 1, wherein in step S1, the signal amplitude collected by the microphones of each channel is compared with all the microphone detection thresholds, if the signal amplitude is greater than all the microphone detection thresholds, it indicates that the microphone is connected, otherwise, no microphone or speaker exists, and the tuning fails; if the signal amplitude is larger than the far-field microphone detection threshold value, the channel is judged to be the far-field pickup microphone, and if the signal amplitude is larger than all the microphone detection threshold values and smaller than the far-field microphone detection threshold value, the channel is judged to be the handheld microphone.

4. The method for tuning and adapting a sound field based on an audio processor according to claim 1, wherein when the maximum amplitude of the signals collected by all connected microphones corresponding to an output channel is greater than a speaker detection threshold and the harmonic distortion rate is greater than a harmonic distortion rate threshold, it is determined that the output channel is connected to a speaker.

5. The method for tuning an adapted sound field based on an audio processor of claim 1, wherein the echo cancellation algorithm parameters are adjusted by setting the sound delay and the filter length of the echo cancellation algorithm by collecting the rate of change of white noise for each frame through a microphone, and calculating the reverberation coefficient of the room and the distance between the input and output devices.

6. The method for tuning and adapting a sound field based on an audio processor according to claim 1, wherein if the one-key tuning key pressing time is less than a preset time threshold, it is determined that tuning in the current scene is completed; otherwise, the local sound amplifying function is needed, and the feedback suppression tuning is continued until the step of the feedback suppression tuning is finished.

7. The method for tuning and adapting a sound field based on an audio processor according to claim 1, wherein when the tuning is performed with feedback suppression, the audio processor controls all speakers to play white noise, all microphones acquire signals again, spectral analysis is performed according to all the acquired downmix signals, a filter of a feedback suppression algorithm is set according to spectral characteristics, and the tuning is performed with feedback suppression through the feedback suppression algorithm.

8. The method for tuning an adaptive sound field based on an audio processor according to claim 1, wherein the key tuning key is provided on the audio processor, the audio processor has multiple microphone access channels and multiple loudspeaker access channels, and the microphones and the loudspeakers are correspondingly connected through corresponding signal lines.

Technical Field

The invention relates to the technical field of audio processing, in particular to a method for tuning and adapting sound fields in different spaces based on an audio processor.

Background

The audio processor is used as a professional audio processing device and has complex audio algorithms such as echo cancellation, intelligent noise reduction, feedback suppression, automatic gain and the like and abundant input and output hardware interfaces. The debugging of an audio processor requires a skilled person to make fine parameter adjustments in order to achieve the best sound results and to enter the most stable operating state. In addition, when the audio processor is used for application scenes such as interactive teaching and local sound amplification, debugging is complicated due to complexity of building environment, diversity of input and output audio equipment and inconsistency of connection methods.

Disclosure of Invention

The invention aims to provide a method for tuning and adapting a sound field in different spaces based on an audio processor aiming at the technical defects in the prior art, wherein the debugging result is obtained according to an audio algorithm, and the final result has high consistency.

The technical scheme adopted for realizing the purpose of the invention is as follows:

a method for tuning and adapting a sound field based on an audio processor is characterized in that after a key tuning key is pressed down to start a tuning program of the audio processor, the following steps are automatically executed to realize tuning and adapting the sound field:

s1, an audio processor controls all loudspeakers to synchronously play white noise, a microphone collects signals, whether a microphone is connected or not and the type of the connected microphone are judged according to the amplitude of the signals collected by the microphone of each channel, and different hardware gains are given to different microphones;

s2, enabling each output channel loudspeaker to successively play sinusoidal signals with preset frequency by the audio processor according to the serial number of the output channel, then acquiring the signals by using all accessed microphones, determining whether each output channel is accessed to the loudspeaker according to the maximum amplitude and harmonic distortion rate of the signals acquired by all the accessed microphones, and determining the channel number of the loudspeakers accessed by the audio processor;

s3, on the basis of judging the number of the connected microphones and the number of the loudspeakers, enabling each connected loudspeaker to play white noise successively by the audio processor to be collected by all the connected microphones, comparing the maximum signal amplitude collected by all the microphones with a loudspeaker single-step debugging threshold to obtain a difference value between the actual collected amplitude and the loudspeaker single-step debugging threshold, and then using the difference value to adjust the hardware gain of the corresponding loudspeaker successively;

s4, controlling all detected loudspeakers to play white noise at the same time, comparing debugging thresholds of all the loudspeakers according to the amplitude of signals collected by the detected microphone, and synchronously adjusting the hardware gains of all the loudspeakers again;

s5, entering a rechecking program, controlling all loudspeakers to play white noise at the same time, comparing microphone rechecking thresholds according to the amplitude of sound collected by each microphone, and correspondingly adjusting the microphone gain;

s6, controlling all loudspeakers to play white noise simultaneously again, collecting signals by the microphones, setting sound delay according to the change of each frame of amplitude of the downmixed signals of all the microphones, setting the length of a cancellation filter of an algorithm according to the change rate of the amplitude, and performing echo cancellation by using an echo cancellation algorithm;

and S7, determining the pressing time of the key tuning key, determining a corresponding tuning scene according to the pressing time, determining whether the corresponding tuning step is ended or not according to the determined tuning scene, and ending tuning or continuing tuning.

And the hardware gains of the microphone and the loudspeaker are gains inside the audio processor.

Preferably, in step S1, the signal amplitude collected by the microphone of each channel is compared with all the microphone detection thresholds, if the signal amplitude is greater than all the microphone detection thresholds, it indicates that the microphone is connected, otherwise, there is no microphone or speaker, and the tuning fails; if the signal amplitude is larger than the far-field microphone detection threshold value, the channel is judged to be the far-field pickup microphone, and if the signal amplitude is larger than all the microphone detection threshold values and smaller than the far-field microphone detection threshold value, the channel is judged to be the handheld microphone.

Preferably, when the maximum amplitudes of the signals collected by all the connected microphones corresponding to one output channel are greater than the loudspeaker detection threshold and the harmonic distortion rate is greater than the harmonic distortion rate threshold, it is determined that the output channel is connected with the loudspeaker.

Preferably, the sound delay of the echo cancellation algorithm and the filter length are set to adjust parameters of the echo cancellation algorithm by collecting the change rate of each frame of white noise through a microphone and calculating the reverberation coefficient of a room and the distance between input and output devices.

Preferably, if the key pressing time of the tuning key is less than a preset time threshold, the tuning in the current scene is judged to be completed; otherwise, the local sound amplifying function is needed, and the feedback suppression tuning is continued until the step of the feedback suppression tuning is finished.

Preferably, when the feedback suppression tuning is performed, the audio processor controls all the speakers to play white noise, all the microphones acquire signals again, spectral analysis is performed according to the downmixed signals of all the acquired signals, a filter of a feedback suppression algorithm is set according to the spectral characteristics, and the feedback suppression tuning is performed through the feedback suppression algorithm.

Preferably, the key tuning key is arranged on the audio processor, the audio processor is provided with a plurality of microphone access channels and a plurality of loudspeaker access channels, and the microphone access channels and the loudspeaker access channels are correspondingly connected with the microphone and the loudspeaker through corresponding signal lines.

The invention can realize self-adaptive tuning through one physical key or software key, can automatically set reasonable hardware gain parameters, algorithm parameters and the like according to the space environment, the position distance of the equipment and the type of the equipment, and achieves the optimal audio algorithm effect and the most reasonable sound size.

Drawings

Fig. 1 is a schematic diagram of an audio processor, a microphone, and a speaker tuning system architecture according to an embodiment of the present invention.

Fig. 2 is a schematic diagram illustrating the installation and connection of the audio processor, the microphone and the speaker according to the embodiment of the present invention.

Fig. 3 is a flow chart of a method of tuning an adapted sound field according to an embodiment of the present invention.

Detailed Description

The invention is described in further detail below with reference to the figures and specific examples. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.

The invention is that the audio processor controls the loudspeaker to play sine signal and white noise, and the microphone collects the signal to form a closed loop system; and gradually adjusting the output gain of the hardware by using the fixed input gain of the hardware, and finely adjusting the gain again by using the adjusted output gain of the hardware to enable the closed-loop system to tend to be stable.

When tuning is needed, the audio processor according to the embodiment of the present invention is connected to the speaker and the microphone through the multi-channel signal interfaces thereof respectively through signal lines or connection lines, as shown in fig. 2, the speaker and the microphone may be placed at different positions in a space or in different spaces, the audio processor is configured with a one-key tuning key 1, the one-key tuning key is pressed, the tuning program in the audio processor is started, the tuning program is directly entered, and automatic tuning is performed according to the flow shown in fig. 3.

Fig. 1 is a schematic diagram of an audio processor, a microphone, and a speaker tuning system architecture according to an embodiment of the present invention. The figure shows that an audio processor has multiple interfaces, such as 1-8 interfaces, to conveniently access a corresponding microphone or speaker, fig. 2 is a schematic view of installation and connection between the audio processor and the microphone or speaker according to an embodiment of the present invention, fig. 3 shows a flowchart of a method for tuning and adapting a sound field based on the audio processor according to an embodiment of the present invention, and as shown in fig. 3, the method for tuning and adapting a sound field based on the audio processor according to an embodiment of the present invention includes, after a tuning program of the audio processor is started, the steps of:

s1, controlling all loudspeakers to play white noise by an audio processor, collecting signals by a microphone, comparing microphone detection thresholds according to the amplitude of the signals collected by the microphone of each channel, judging whether the microphone is accessed or not and the type of the accessed microphone, and endowing different hardware gains to different microphone types;

the different hardware gains given to the different microphone types described above are gains internal to the audio processor.

If the signal amplitude acquired by the microphone of each path of channel is compared with all the microphone detection threshold values, judging whether a microphone exists, if the signal amplitude is larger than all the microphone detection threshold values, the microphone is connected, otherwise, no microphone or loudspeaker exists, and the tuning fails; if the signal amplitude is larger than the far-field microphone detection threshold value, the channel is judged to be the far-field pickup microphone, if the signal amplitude is larger than the far-field microphone detection threshold value and smaller than the far-field microphone detection threshold value, the channel is judged to be the handheld microphone, and therefore the judgment processing of the microphone types is achieved.

S2, enabling each output channel loudspeaker to successively play sinusoidal signals with preset frequency, optionally 750Hz, by the audio processor according to the serial number of the output channels, then acquiring the signals by using all accessed microphones, determining whether each output channel is accessed to the loudspeaker according to the maximum amplitude and harmonic distortion rate of the signals acquired by all the accessed microphones, and determining the channel number of the loudspeakers accessed to the audio processor and the number of the accessed loudspeakers.

Optionally, when the maximum amplitude of the signals collected by all the connected microphones corresponding to one output channel is greater than the loudspeaker detection threshold and the harmonic distortion rate is greater than the harmonic distortion rate threshold, it is determined that the output channel is connected with the loudspeaker, otherwise, it is determined that no loudspeaker is present, and the tuning is disabled.

S3, on the basis of judging the number of the microphones and the number of the loudspeakers, enabling each accessed loudspeaker to play white noise successively by the audio processor to be acquired by all the accessed microphones, comparing the maximum signal amplitude acquired by all the microphones with a loudspeaker single-step debugging threshold value to obtain a difference value between the actual acquired amplitude and the loudspeaker single-step debugging threshold value, and then using the difference value to adjust the hardware gain of the corresponding loudspeaker successively;

wherein, the hardware gain of the corresponding loudspeaker is adjusted to be the gain inside the audio processor.

S4, controlling all detected loudspeakers to play white noise at the same time, comparing debugging thresholds of all the loudspeakers according to the amplitude of signals collected by the detected microphone, synchronously adjusting gains of all the loudspeakers again, and adding or subtracting the gains at the same time;

and S5, on the basis of setting all the detected hardware gains of the microphones and the loudspeakers, entering a rechecking program, controlling all the loudspeakers to play white noise at the same time, comparing the rechecking threshold of the microphones according to the amplitude of the sound collected by each microphone, and correspondingly adjusting the gains of the microphones, wherein the step S1 is referred to.

S6, controlling all loudspeakers to play white noise again, collecting signals by the microphones, setting sound delay according to the change of each frame amplitude of the downmixed signals of all the microphones, setting the filter length of an algorithm according to the change rate of the amplitude, and performing echo cancellation by using an echo cancellation algorithm;

wherein the sound delay and the filter length are applied to an echo cancellation algorithm of the audio processor.

The change rate of each frame of white noise is acquired by the microphone, the reverberation coefficient of a room and the distance between input and output equipment can be calculated, and the delay time and the filter length of an echo cancellation algorithm can be set more reasonably, so that the algorithm effect of a system is optimal, and a better tuning effect is achieved;

and S7, determining the pressing time of the key tuning key, determining a corresponding tuning scene according to the pressing time, determining whether the corresponding tuning step is ended or not according to the determined tuning scene, and ending tuning or continuing tuning.

Optionally, if the time for pressing the tuning key is less than the preset time, and if the time is 3 seconds, the tuning (non-local sound amplification function) in the current scene is determined to be completed; and if the pressing time is longer than the preset time, for example, 3 seconds, the local sound amplifying function is needed, and continuing the feedback suppression tuning until the step of the feedback suppression tuning is finished.

Optionally, when the feedback suppression tuning is performed, the audio processor controls all speakers to play white noise, all microphones collect signals, spectral analysis is performed according to all the collected downmixed signals of the signals, corresponding filters are set according to spectral characteristics, and the feedback suppression tuning is performed through a feedback suppression algorithm.

The invention can simplify the debugging step and reduce the time cost because of the automation; and the invention can make the debugging effect more stable, different spaces and the final effect consistent because the program automatically adjusts.

The foregoing is only a preferred embodiment of the present invention, and it should be noted that, for those skilled in the art, various modifications and decorations can be made without departing from the principle of the present invention, and these modifications and decorations should also be regarded as the protection scope of the present invention.

10页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:音频处理方法、介质、装置和计算设备

网友询问留言

已有0条留言

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

精彩留言,会给你点赞!