WO2023226234A1 - Model training method and apparatus, and computer-readable non-transitory storage medium - Google Patents

Model training method and apparatus, and computer-readable non-transitory storage medium Download PDF

Info

Publication number
WO2023226234A1
WO2023226234A1 PCT/CN2022/117526 CN2022117526W WO2023226234A1 WO 2023226234 A1 WO2023226234 A1 WO 2023226234A1 CN 2022117526 W CN2022117526 W CN 2022117526W WO 2023226234 A1 WO2023226234 A1 WO 2023226234A1
Authority
WO
WIPO (PCT)
Prior art keywords
audio signal
audio
signal
error
control instruction
Prior art date
Application number
PCT/CN2022/117526
Other languages
French (fr)
Chinese (zh)
Inventor
林功艺
Original Assignee
神盾股份有限公司
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 神盾股份有限公司 filed Critical 神盾股份有限公司
Publication of WO2023226234A1 publication Critical patent/WO2023226234A1/en

Links

Images

Classifications

    • GPHYSICS
    • G10MUSICAL INSTRUMENTS; ACOUSTICS
    • G10KSOUND-PRODUCING DEVICES; METHODS OR DEVICES FOR PROTECTING AGAINST, OR FOR DAMPING, NOISE OR OTHER ACOUSTIC WAVES IN GENERAL; ACOUSTICS NOT OTHERWISE PROVIDED FOR
    • G10K11/00Methods or devices for transmitting, conducting or directing sound in general; Methods or devices for protecting against, or for damping, noise or other acoustic waves in general
    • G10K11/16Methods or devices for protecting against, or for damping, noise or other acoustic waves in general
    • G10K11/175Methods or devices for protecting against, or for damping, noise or other acoustic waves in general using interference effects; Masking sound
    • GPHYSICS
    • G10MUSICAL INSTRUMENTS; ACOUSTICS
    • G10KSOUND-PRODUCING DEVICES; METHODS OR DEVICES FOR PROTECTING AGAINST, OR FOR DAMPING, NOISE OR OTHER ACOUSTIC WAVES IN GENERAL; ACOUSTICS NOT OTHERWISE PROVIDED FOR
    • G10K11/00Methods or devices for transmitting, conducting or directing sound in general; Methods or devices for protecting against, or for damping, noise or other acoustic waves in general
    • G10K11/16Methods or devices for protecting against, or for damping, noise or other acoustic waves in general
    • G10K11/175Methods or devices for protecting against, or for damping, noise or other acoustic waves in general using interference effects; Masking sound
    • G10K11/178Methods or devices for protecting against, or for damping, noise or other acoustic waves in general using interference effects; Masking sound by electro-acoustically regenerating the original acoustic waves in anti-phase
    • GPHYSICS
    • G10MUSICAL INSTRUMENTS; ACOUSTICS
    • G10KSOUND-PRODUCING DEVICES; METHODS OR DEVICES FOR PROTECTING AGAINST, OR FOR DAMPING, NOISE OR OTHER ACOUSTIC WAVES IN GENERAL; ACOUSTICS NOT OTHERWISE PROVIDED FOR
    • G10K11/00Methods or devices for transmitting, conducting or directing sound in general; Methods or devices for protecting against, or for damping, noise or other acoustic waves in general
    • G10K11/16Methods or devices for protecting against, or for damping, noise or other acoustic waves in general
    • G10K11/175Methods or devices for protecting against, or for damping, noise or other acoustic waves in general using interference effects; Masking sound
    • G10K11/178Methods or devices for protecting against, or for damping, noise or other acoustic waves in general using interference effects; Masking sound by electro-acoustically regenerating the original acoustic waves in anti-phase
    • G10K11/1781Methods or devices for protecting against, or for damping, noise or other acoustic waves in general using interference effects; Masking sound by electro-acoustically regenerating the original acoustic waves in anti-phase characterised by the analysis of input or output signals, e.g. frequency range, modes, transfer functions
    • GPHYSICS
    • G10MUSICAL INSTRUMENTS; ACOUSTICS
    • G10KSOUND-PRODUCING DEVICES; METHODS OR DEVICES FOR PROTECTING AGAINST, OR FOR DAMPING, NOISE OR OTHER ACOUSTIC WAVES IN GENERAL; ACOUSTICS NOT OTHERWISE PROVIDED FOR
    • G10K11/00Methods or devices for transmitting, conducting or directing sound in general; Methods or devices for protecting against, or for damping, noise or other acoustic waves in general
    • G10K11/16Methods or devices for protecting against, or for damping, noise or other acoustic waves in general
    • G10K11/175Methods or devices for protecting against, or for damping, noise or other acoustic waves in general using interference effects; Masking sound
    • G10K11/178Methods or devices for protecting against, or for damping, noise or other acoustic waves in general using interference effects; Masking sound by electro-acoustically regenerating the original acoustic waves in anti-phase
    • G10K11/1785Methods, e.g. algorithms; Devices

Landscapes

  • Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Acoustics & Sound (AREA)
  • Multimedia (AREA)
  • Circuit For Audible Band Transducer (AREA)
  • Stereophonic System (AREA)
  • Tone Control, Compression And Expansion, Limiting Amplitude (AREA)
  • Soundproofing, Sound Blocking, And Sound Damping (AREA)

Abstract

A model training method, a model training apparatus and a computer-readable non-transitory storage medium. The model training method comprises: processing a first audio signal on the basis of a prediction model so as to generate a first control instruction; on the basis of the first control instruction, generating an audio signal corresponding to the first control instruction as a second audio signal; outputting the second audio signal so as to suppress a third audio signal, wherein the time when the first audio signal occurs is earlier than the time when the third audio signal occurs; determining an audio error signal on the basis of the second audio signal and the third audio signal; in response to the audio error signal not meeting an error condition, adjusting the prediction model, and processing the first audio signal again on the basis of the prediction model until the audio error signal meets the error condition; and in response to the audio error signal meeting the error condition, keeping the prediction model unchanged.

Description

模型训练方法及装置、非瞬时性计算机可读存储介质Model training method and device, non-transitory computer-readable storage medium
本申请要求于2022年05月23日递交的美国临时专利申请第63/344,642号、于2022年06月13日递交的美国临时专利申请第63/351,439号、于2022年06月14日递交的美国临时专利申请第63/352,213号的优先权以及于2022年08月04日递交的PCT国际申请第PCT/CN2022/110275号的优先权,在此全文引用上述美国临时专利申请和PCT国际申请的内容以作为本申请的一部分。This application requires U.S. Provisional Patent Application No. 63/344,642 filed on May 23, 2022, U.S. Provisional Patent Application No. 63/351,439 filed on June 13, 2022, and U.S. Provisional Patent Application No. 63/351,439 filed on June 14, 2022. The priority of U.S. Provisional Patent Application No. 63/352,213 and the priority of PCT International Application No. PCT/CN2022/110275 filed on August 4, 2022 are hereby cited in full. The content is included as part of this application.
技术领域Technical field
本公开的实施例涉及一种模型训练方法、模型训练装置和非瞬时性计算机可读存储介质。Embodiments of the present disclosure relate to a model training method, a model training device, and a non-transitory computer-readable storage medium.
背景技术Background technique
目前,降噪方法主要包括主动式降噪和被动式降噪。主动式降噪是通过降噪系统产生与外界噪音相等的反相信号以将噪音中和,从而实现降噪的效果。被动式降噪主要通过在对象周围形成封闭空间或者采用隔音材料来阻挡外界噪声,从而实现降噪的效果。At present, noise reduction methods mainly include active noise reduction and passive noise reduction. Active noise reduction uses the noise reduction system to generate an inverse signal that is equal to the external noise to neutralize the noise, thereby achieving the noise reduction effect. Passive noise reduction mainly achieves the noise reduction effect by forming a closed space around the object or using sound insulation materials to block external noise.
主动式降噪可以利用消音模型以实现采用落后的反相音频跟原本收到的音频(例如,噪声)进行破坏性叠加以达到抑制音频的效果。一种主动式降噪的消音流程如下:首先,通过麦克风接收声音源产生的音频Vn,并将接收的音频Vn发送到处理器,然后,处理器对音频Vn进行反相处理以生成反相音频Vn’并输出该反相音频Vn’至扬声器,扬声器发出该反相音频Vn’。人的耳朵可以接收反相音频Vn’和音频Vn,并且反相音频Vn’与音频Vn可以进行破坏性叠加从而达到抑制音频的效果。在该主动式降噪中,由于信号处理和信号传输等需要花费时间,扬声器输出的反相音频Vn’的时间必然是落后于麦克风原本收到的音频Vn的时间,由此,人的耳朵接收到反相音频Vn’的时间也必然落后于人的耳朵接收到音频Vn的时间,消音效果较差,甚至可能无法实现消音。输入端(即麦克风)到输出端(即扬声器)必然有延迟,输入端对输出端的延迟越低,则人的耳朵接收到反相音频Vn’和接收到音频Vn之间的时间差越小,消音效果越好。因此,主动式降噪对于端对端延迟要求极其严苛,使得该主动消音系统的 架构必须使用高速的模拟数字转换器以及高速运算硬件等,才能达到低延迟,实现较好的抑制音频的效果,从而导致其开发成本过高且架构较无弹性。因此,如何避免端对端延迟对主动式降噪的影响,如何实现更好的抑制音频的效果等成为需要解决的问题。Active noise reduction can use the noise cancellation model to achieve the destructive superposition of backward inverted audio with the originally received audio (for example, noise) to achieve the effect of suppressing the audio. An active noise reduction process is as follows: First, the audio Vn generated by the sound source is received through the microphone, and the received audio Vn is sent to the processor. Then, the processor performs inversion processing on the audio Vn to generate inverted audio. Vn' and output the inverted audio Vn' to the speaker, and the speaker emits the inverted audio Vn'. The human ear can receive the inverted audio Vn’ and the audio Vn, and the inverted audio Vn’ and the audio Vn can be destructively superimposed to achieve the effect of suppressing the audio. In this active noise reduction, due to the time required for signal processing and signal transmission, the time of the inverted audio Vn' output by the speaker must lag behind the time of the audio Vn originally received by the microphone. Therefore, the human ear receives The time to the inverted audio Vn' must also lag behind the time when the human ear receives the audio Vn, and the silencing effect is poor, and may even be impossible to achieve. There must be a delay from the input end (i.e. microphone) to the output end (i.e. speaker). The lower the delay from the input end to the output end, the smaller the time difference between the human ear receiving the inverted audio Vn' and the received audio Vn, the smaller the noise reduction. The better. Therefore, active noise reduction has extremely strict requirements on end-to-end delay, so the architecture of the active noise reduction system must use high-speed analog-to-digital converters and high-speed computing hardware to achieve low latency and achieve better audio suppression effects. , resulting in high development costs and less elastic architecture. Therefore, how to avoid the impact of end-to-end delay on active noise reduction and how to achieve better audio suppression effects have become problems that need to be solved.
目前,可以预先对消音模型进行训练,然后将消音模型应用到实际场景中,然而,由于不同场景下的音频信号多种多样,用于训练消音模型的训练样本的数量有限且无法完全模拟真实环境中的音频信号,训练样本中的音频信号可能与真实环境产生的音频信号不会完全相同,从而导致消音模型可能无法实现消音功能。因此,如何使得消音模型能够更加适用于真实环境,使得消音模型能够更好地实现抑制音频的效果,用于训练消音模型的样本的数量不足等成为需要解决的问题。Currently, the cancellation model can be trained in advance and then applied to actual scenarios. However, due to the variety of audio signals in different scenarios, the number of training samples used to train the cancellation model is limited and cannot fully simulate the real environment. The audio signal in the training sample may not be exactly the same as the audio signal generated in the real environment, so the cancellation model may not be able to achieve the cancellation function. Therefore, how to make the silencing model more suitable for real environments, so that the silencing model can better achieve the effect of suppressing audio, and the insufficient number of samples used to train the silencing model have become problems that need to be solved.
发明内容Contents of the invention
针对上述问题,本公开至少一个实施例提供一种模型训练方法,包括:基于预测模型,对第一音频信号进行处理以生成第一控制指令;基于所述第一控制指令,生成与所述第一控制指令对应的音频信号作为第二音频信号;输出所述第二音频信号,以抑制第三音频信号,其中,所述第一音频信号出现的时间早于所述第三音频信号出现的时间;基于所述第二音频信号和所述第三音频信号,确定音频误差信号;响应于所述音频误差信号不满足误差条件,对所述预测模型进行调整,基于所述预测模型再次对所述第一音频信号进行处理,直到所述音频误差信号满足所述误差条件;响应于所述音频误差信号满足所述误差条件,保持所述预测模型不变。In response to the above problems, at least one embodiment of the present disclosure provides a model training method, including: based on a prediction model, processing a first audio signal to generate a first control instruction; based on the first control instruction, generating a signal corresponding to the first control instruction. The audio signal corresponding to a control instruction is used as the second audio signal; the second audio signal is output to suppress the third audio signal, wherein the first audio signal appears earlier than the third audio signal. ; Based on the second audio signal and the third audio signal, determine an audio error signal; in response to the audio error signal not satisfying the error condition, adjust the prediction model, and adjust the prediction model again based on the prediction model The first audio signal is processed until the audio error signal satisfies the error condition; in response to the audio error signal satisfying the error condition, the prediction model is maintained unchanged.
例如,在本公开至少一个实施例提供的模型训练方法中,所述预测模型包括神经网络,所述基于所述第二音频信号和所述第三音频信号,确定音频误差信号,包括:基于所述第二音频信号和所述第三音频信号,通过所述神经网络的损失函数计算损失值,其中,所述音频误差信号包括所述损失值。For example, in the model training method provided by at least one embodiment of the present disclosure, the prediction model includes a neural network, and determining the audio error signal based on the second audio signal and the third audio signal includes: based on the second audio signal and the third audio signal. For the second audio signal and the third audio signal, a loss value is calculated through the loss function of the neural network, wherein the audio error signal includes the loss value.
例如,在本公开至少一个实施例提供的模型训练方法中,所述响应于所述音频误差信号不满足误差条件,对所述预测模型进行调整,包括:响应于所述损失值不满足所述误差条件,利用所述损失值对所述神经网络的参数进行调整。For example, in the model training method provided by at least one embodiment of the present disclosure, adjusting the prediction model in response to the audio error signal not meeting the error condition includes: responding to the loss value not meeting the error condition. Error conditions, using the loss value to adjust the parameters of the neural network.
例如,在本公开至少一个实施例提供的模型训练方法中,所述基于所述预测模型再次对所述第一音频信号进行处理,包括:响应于所述音频误差信号不 满足所述误差条件,基于所述神经网络,再次对所述第一音频信号进行处理以生成第二控制指令,其中,所述第二控制指令与所述第一控制指令不相同;基于所述第二控制指令,生成并输出与所述第二控制指令对应的音频信号作为所述第二音频信号。For example, in the model training method provided by at least one embodiment of the present disclosure, processing the first audio signal again based on the prediction model includes: in response to the audio error signal not meeting the error condition, Based on the neural network, the first audio signal is processed again to generate a second control instruction, wherein the second control instruction is different from the first control instruction; based on the second control instruction, generate and output the audio signal corresponding to the second control instruction as the second audio signal.
例如,在本公开至少一个实施例提供的模型训练方法中,所述预测模型包括查找表,所述响应于所述音频误差信号不满足误差条件,对所述预测模型进行调整,包括:响应于所述音频误差信号不满足所述误差条件,基于所述第一音频信号和所述第三音频信号生成音频特征编码;基于所述音频特征编码调整所述查找表。For example, in the model training method provided by at least one embodiment of the present disclosure, the prediction model includes a lookup table, and adjusting the prediction model in response to the audio error signal not meeting an error condition includes: responding to The audio error signal does not satisfy the error condition, audio feature coding is generated based on the first audio signal and the third audio signal, and the lookup table is adjusted based on the audio feature coding.
例如,在本公开至少一个实施例提供的模型训练方法中,所述预测模型包括查找表,所述基于所述预测模型再次对所述第一音频信号进行处理,包括:响应于所述音频误差信号不满足所述误差条件,基于所述查找表,再次对所述第一音频信号进行处理以生成第二控制指令,其中,所述第二控制指令与所述第一控制指令不相同;基于所述第二控制指令,生成并输出与所述第二控制指令对应的音频信号作为所述第二音频信号。For example, in the model training method provided by at least one embodiment of the present disclosure, the prediction model includes a lookup table, and processing the first audio signal again based on the prediction model includes: responding to the audio error If the signal does not meet the error condition, the first audio signal is processed again to generate a second control instruction based on the lookup table, where the second control instruction is different from the first control instruction; based on The second control instruction generates and outputs an audio signal corresponding to the second control instruction as the second audio signal.
例如,在本公开至少一个实施例提供的模型训练方法中,所述基于所述第二音频信号和所述第三音频信号,确定音频误差信号,包括:计算所述第二音频信号和所述第三音频信号之间的均方根误差,以得到所述音频误差信号。For example, in the model training method provided by at least one embodiment of the present disclosure, determining the audio error signal based on the second audio signal and the third audio signal includes: calculating the second audio signal and the The root mean square error between the third audio signals to obtain the audio error signal.
例如,在本公开至少一个实施例提供的模型训练方法中,所述基于预测模型,对第一音频信号进行处理以生成第一控制指令,包括:获取所述第一音频信号;基于所述预测模型对所述第一音频信号进行处理以预测得到第四音频信号;基于所述第四音频信号,生成所述第一控制指令。For example, in the model training method provided by at least one embodiment of the present disclosure, processing the first audio signal to generate the first control instruction based on the prediction model includes: obtaining the first audio signal; based on the prediction The model processes the first audio signal to predict a fourth audio signal; and generates the first control instruction based on the fourth audio signal.
例如,在本公开至少一个实施例提供的模型训练方法中,所述预测模型包括查找表,所述基于所述预测模型对所述第一音频信号进行处理以预测得到第四音频信号,包括:基于所述第一音频信号生成第一音频特征编码;基于所述第一音频特征编码查询所述查找表,以得到第二音频特征编码;基于所述第二音频特征编码,预测得到所述第四音频信号。For example, in the model training method provided by at least one embodiment of the present disclosure, the prediction model includes a lookup table, and processing the first audio signal based on the prediction model to predict a fourth audio signal includes: Generate a first audio feature code based on the first audio signal; query the lookup table based on the first audio feature code to obtain a second audio feature code; predict the third audio feature code based on the second audio feature code Four audio signals.
例如,在本公开至少一个实施例提供的模型训练方法中,所述第二音频信号的相位与所述第四音频信号的相位相反。For example, in the model training method provided by at least one embodiment of the present disclosure, the phase of the second audio signal is opposite to the phase of the fourth audio signal.
例如,在本公开至少一个实施例提供的模型训练方法中,输出与所述第一控制指令对应的音频信号的时刻和所述第三音频信号开始出现的时刻之间的 时间差的绝对值小于时间阈值。For example, in the model training method provided by at least one embodiment of the present disclosure, the absolute value of the time difference between the time when the audio signal corresponding to the first control instruction is output and the time when the third audio signal starts to appear is less than the time threshold.
本公开至少一个实施例还提供一种模型训练装置,包括:指令生成模块,被配置为基于预测模型,对第一音频信号进行处理以生成第一控制指令;音频生成模块,被配置为基于所述第一控制指令,生成与所述第一控制指令对应的音频信号作为第二音频信号;输出模块,被配置为输出所述第二音频信号,以抑制第三音频信号,其中,所述第一音频信号出现的时间早于所述第三音频信号出现的时间;误差计算模块,被配置为基于所述第二音频信号和所述第三音频信号,确定音频误差信号;调整模块,被配置为响应于所述音频误差信号不满足误差条件,对所述预测模型进行调整;响应于所述音频误差信号满足所述误差条件,保持所述预测模型不变;其中,所述指令生成模块还被配置为响应于所述音频误差信号不满足误差条件,基于所述预测模型再次对所述第一音频信号进行处理,直到所述音频误差信号满足所述误差条件。At least one embodiment of the present disclosure also provides a model training device, including: an instruction generation module configured to process the first audio signal to generate a first control instruction based on the prediction model; and the audio generation module is configured to process the first audio signal based on the prediction model. The first control instruction generates an audio signal corresponding to the first control instruction as a second audio signal; the output module is configured to output the second audio signal to suppress the third audio signal, wherein the third audio signal is An audio signal occurs earlier than the third audio signal; an error calculation module is configured to determine an audio error signal based on the second audio signal and the third audio signal; an adjustment module is configured In response to the audio error signal not meeting the error condition, the prediction model is adjusted; in response to the audio error signal meeting the error condition, the prediction model is kept unchanged; wherein the instruction generation module further configured to, in response to the audio error signal not satisfying an error condition, process the first audio signal again based on the prediction model until the audio error signal satisfies the error condition.
例如,在本公开至少一个实施例提供的模型训练装置中,所述预测模型包括神经网络,在执行所述基于所述第二音频信号和所述第三音频信号,确定音频误差信号的操作时,所述误差计算模块被配置为基于所述第二音频信号和所述第三音频信号,通过所述神经网络的损失函数计算损失值,其中,所述音频误差信号包括所述损失值。For example, in the model training device provided by at least one embodiment of the present disclosure, the prediction model includes a neural network, and when performing the operation of determining an audio error signal based on the second audio signal and the third audio signal , the error calculation module is configured to calculate a loss value through a loss function of the neural network based on the second audio signal and the third audio signal, wherein the audio error signal includes the loss value.
例如,在本公开至少一个实施例提供的模型训练装置中,在执行所述响应于所述音频误差信号不满足误差条件,对所述预测模型进行调整的操作时,所述调整模块被配置为:响应于所述损失值不满足所述误差条件,利用所述损失值对所述神经网络的参数进行调整。For example, in the model training device provided by at least one embodiment of the present disclosure, when performing the operation of adjusting the prediction model in response to the audio error signal not meeting an error condition, the adjustment module is configured to : In response to the loss value not meeting the error condition, use the loss value to adjust the parameters of the neural network.
例如,在本公开至少一个实施例提供的模型训练装置中,在执行所述基于所述预测模型再次对所述第一音频信号进行处理的操作时,所述指令生成模块被配置为:响应于所述音频误差信号不满足所述误差条件,基于所述神经网络,再次对所述第一音频信号进行处理以生成第二控制指令,其中,所述第二控制指令与所述第一控制指令不相同;所述音频生成模块还被配置为基于所述第二控制指令,生成并输出与所述第二控制指令对应的音频信号作为所述第二音频信号。For example, in the model training device provided by at least one embodiment of the present disclosure, when performing the operation of processing the first audio signal again based on the prediction model, the instruction generation module is configured to: respond to If the audio error signal does not meet the error condition, the first audio signal is processed again based on the neural network to generate a second control instruction, where the second control instruction is the same as the first control instruction. Not the same; the audio generation module is further configured to generate and output an audio signal corresponding to the second control instruction as the second audio signal based on the second control instruction.
例如,在本公开至少一个实施例提供的模型训练装置中,所述预测模型包括查找表,所述调整模块包括特征编码生成子模块和查找表调整子模块,所述特征编码生成子模块被配置为:响应于所述音频误差信号不满足所述误差条件, 基于所述第一音频信号和所述第三音频信号生成音频特征编码;所述查找表调整子模块被配置为基于所述音频特征编码调整所述查找表。For example, in the model training device provided by at least one embodiment of the present disclosure, the prediction model includes a lookup table, and the adjustment module includes a feature code generation submodule and a lookup table adjustment submodule, and the feature code generation submodule is configured To: in response to the audio error signal not satisfying the error condition, generate audio feature encoding based on the first audio signal and the third audio signal; the lookup table adjustment sub-module is configured to based on the audio feature Coding adjusts the lookup table.
例如,在本公开至少一个实施例提供的模型训练装置中,所述预测模型包括查找表,在执行所述基于所述预测模型再次对所述第一音频信号进行处理的操作时,所述指令生成模块被配置为:响应于所述音频误差信号不满足所述误差条件,基于所述查找表,再次对所述第一音频信号进行处理以生成第二控制指令,其中,所述第二控制指令与所述第一控制指令不相同;所述音频生成模块还被配置为基于所述第二控制指令,生成并输出与所述第二控制指令对应的音频信号作为所述第二音频信号。For example, in the model training device provided by at least one embodiment of the present disclosure, the prediction model includes a lookup table, and when performing the operation of processing the first audio signal again based on the prediction model, the instruction The generation module is configured to: in response to the audio error signal not satisfying the error condition, process the first audio signal again to generate a second control instruction based on the lookup table, wherein the second control instruction The instruction is different from the first control instruction; the audio generation module is further configured to generate and output an audio signal corresponding to the second control instruction as the second audio signal based on the second control instruction.
例如,在本公开至少一个实施例提供的模型训练装置中,在执行所述基于所述第二音频信号和所述第三音频信号,确定音频误差信号的操作时,所述误差计算模块被配置为:计算所述第二音频信号和所述第三音频信号之间的均方根误差,以得到所述音频误差信号。For example, in the model training device provided by at least one embodiment of the present disclosure, when performing the operation of determining an audio error signal based on the second audio signal and the third audio signal, the error calculation module is configured is: calculating the root mean square error between the second audio signal and the third audio signal to obtain the audio error signal.
例如,在本公开至少一个实施例提供的模型训练装置中,所述指令生成模块包括音频获取子模块、预测子模块和生成子模块,所述音频获取子模块被配置为获取所述第一音频信号;所述预测子模块被配置为基于所述预测模型对所述第一音频信号进行处理以预测得到第四音频信号;所述生成子模块被配置为基于所述第四音频信号,生成所述第一控制指令。For example, in the model training device provided by at least one embodiment of the present disclosure, the instruction generation module includes an audio acquisition sub-module, a prediction sub-module and a generation sub-module, and the audio acquisition sub-module is configured to acquire the first audio signal; the prediction sub-module is configured to process the first audio signal based on the prediction model to predict a fourth audio signal; the generation sub-module is configured to generate the fourth audio signal based on the fourth audio signal. The first control instruction.
例如,在本公开至少一个实施例提供的模型训练装置中,所述预测模型包括查找表,所述预测子模块包括查询单元和预测单元,所述查询单元被配置为基于所述第一音频信号生成第一音频特征编码;基于所述第一音频特征编码查询所述查找表,以得到第二音频特征编码;所述预测单元被配置为基于所述第二音频特征编码,预测得到所述第四音频信号。For example, in the model training device provided by at least one embodiment of the present disclosure, the prediction model includes a lookup table, the prediction sub-module includes a query unit and a prediction unit, the query unit is configured to based on the first audio signal Generate a first audio feature code; query the lookup table based on the first audio feature code to obtain a second audio feature code; the prediction unit is configured to predict the first audio feature code based on the second audio feature code. Four audio signals.
例如,在本公开至少一个实施例提供的模型训练装置中,所述第二音频信号的相位与所述第四音频信号的相位相反。For example, in the model training device provided by at least one embodiment of the present disclosure, the phase of the second audio signal is opposite to the phase of the fourth audio signal.
例如,在本公开至少一个实施例提供的模型训练装置中,输出与所述第一控制指令对应的音频信号的时刻和所述第三音频信号开始出现的时刻之间的时间差的绝对值小于时间阈值。For example, in the model training device provided by at least one embodiment of the present disclosure, the absolute value of the time difference between the time when the audio signal corresponding to the first control instruction is output and the time when the third audio signal starts to appear is less than the time threshold.
本公开至少一个实施例还提供一种模型训练装置,包括:一个或多个存储器,非瞬时性地存储有计算机可执行指令;一个或多个处理器,配置为运行所述计算机可执行指令,其中,所述计算机可执行指令被所述一个或多个处理器 运行时实现根据本公开任一个实施例所述的模型训练方法。At least one embodiment of the present disclosure also provides a model training device, including: one or more memories non-transiently storing computer-executable instructions; one or more processors configured to run the computer-executable instructions, Wherein, the computer-executable instructions implement the model training method according to any embodiment of the present disclosure when run by the one or more processors.
本公开至少一个实施例还提供一种非瞬时性计算机可读存储介质,其中,所述非瞬时性计算机可读存储介质存储有计算机可执行指令,所述计算机可执行指令被处理器执行时实现根据本公开任一个实施例所述的模型训练方法。At least one embodiment of the present disclosure also provides a non-transitory computer-readable storage medium, wherein the non-transitory computer-readable storage medium stores computer-executable instructions, and the computer-executable instructions are implemented when executed by a processor. A model training method according to any embodiment of the present disclosure.
根据本公开的任一实施例提供的模型训练方法、模型训练装置和非瞬时性计算机可读存储介质,利用当前音频信号(即,第一音频信号)和未来音频信号(即,第三音频信号)对预测模型进行实时训练,提升预测模型输出的预测结果的准确度,避免基于预测模型输出的预测结果无法实现对未来音频信号进行抑制的问题,提升基于预测模型进行消音的效果。According to the model training method, model training device and non-transitory computer-readable storage medium provided by any embodiment of the present disclosure, the current audio signal (ie, the first audio signal) and the future audio signal (ie, the third audio signal) are used ) conduct real-time training of the prediction model to improve the accuracy of the prediction results output by the prediction model, avoid the problem that the prediction results based on the prediction model output cannot suppress future audio signals, and improve the effect of noise reduction based on the prediction model.
此外,本公开至少一个实施例提供一种音频处理方法,包括:基于第一音频信号,生成控制指令;基于所述控制指令,生成第二音频信号;输出所述第二音频信号,以抑制第三音频信号,其中,所述第二音频信号的相位与所述第三音频信号的相位之和小于相位阈值,所述第一音频信号出现的时间早于所述第三音频信号出现的时间。In addition, at least one embodiment of the present disclosure provides an audio processing method, including: generating a control instruction based on a first audio signal; generating a second audio signal based on the control instruction; and outputting the second audio signal to suppress the second audio signal. Three audio signals, wherein the sum of the phases of the second audio signal and the third audio signal is less than a phase threshold, and the first audio signal appears earlier than the third audio signal.
例如,在本公开至少一个实施例提供的音频处理方法中,所述输出所述第二音频信号,以抑制第三音频信号,包括:基于所述控制指令,确定输出所述第二音频信号的第一时刻;在所述第一时刻输出所述第二音频信号,其中,所述第三音频信号从第二时刻开始出现,所述第一时刻和所述第二时刻之间的时间差的绝对值小于时间阈值。For example, in the audio processing method provided by at least one embodiment of the present disclosure, the outputting the second audio signal to suppress the third audio signal includes: based on the control instruction, determining the output of the second audio signal. The first moment; outputting the second audio signal at the first moment, wherein the third audio signal starts to appear from the second moment, and the absolute time difference between the first moment and the second moment is The value is less than the time threshold.
例如,在本公开至少一个实施例提供的音频处理方法中,所述第一时刻和所述第二时刻之间的时间差为0。For example, in the audio processing method provided by at least one embodiment of the present disclosure, the time difference between the first moment and the second moment is 0.
例如,在本公开至少一个实施例提供的音频处理方法中,所述基于第一音频信号,生成控制指令,包括:获取所述第一音频信号;对所述第一音频信号进行处理以预测得到第四音频信号;基于所述第四音频信号,生成所述控制指令。For example, in the audio processing method provided by at least one embodiment of the present disclosure, generating a control instruction based on a first audio signal includes: acquiring the first audio signal; processing the first audio signal to predict a fourth audio signal; based on the fourth audio signal, the control instruction is generated.
例如,在本公开至少一个实施例提供的音频处理方法中,所述第二音频信号和/或所述第三音频信号和/或所述第四音频信号是周期性的或间歇性的时域信号。For example, in the audio processing method provided by at least one embodiment of the present disclosure, the second audio signal and/or the third audio signal and/or the fourth audio signal are periodic or intermittent time domain Signal.
例如,在本公开至少一个实施例提供的音频处理方法中,所述对所述第一音频信号进行处理以预测得到第四音频信号,包括:基于所述第一音频信号生成第一音频特征编码;基于所述第一音频特征编码查询查找表,以得到第二音 频特征编码;基于所述第二音频特征编码,预测得到所述第四音频信号。For example, in the audio processing method provided by at least one embodiment of the present disclosure, processing the first audio signal to predict a fourth audio signal includes: generating a first audio feature code based on the first audio signal ; Query the lookup table based on the first audio feature coding to obtain the second audio feature coding; predict and obtain the fourth audio signal based on the second audio feature coding.
例如,在本公开至少一个实施例提供的音频处理方法中,所述查找表包括至少一个第一编码字段。For example, in the audio processing method provided by at least one embodiment of the present disclosure, the lookup table includes at least one first encoding field.
例如,在本公开至少一个实施例提供的音频处理方法中,所述查找表还包括至少一个第二编码字段,多个所述第一编码字段组成一个所述第二编码字段。For example, in the audio processing method provided by at least one embodiment of the present disclosure, the lookup table further includes at least one second encoding field, and multiple first encoding fields constitute one second encoding field.
例如,在本公开至少一个实施例提供的音频处理方法中,所述第二音频特征编码包括至少一个所述第一编码字段和/或至少一个所述第二编码字段。For example, in the audio processing method provided by at least one embodiment of the present disclosure, the second audio feature encoding includes at least one of the first encoding field and/or at least one of the second encoding field.
例如,在本公开至少一个实施例提供的音频处理方法中,所述获取所述第一音频信号,包括:采集初始音频信号;对所述初始音频信号进行下采样处理以得到所述第一音频信号。For example, in the audio processing method provided by at least one embodiment of the present disclosure, obtaining the first audio signal includes: collecting an initial audio signal; performing downsampling processing on the initial audio signal to obtain the first audio signal. Signal.
例如,在本公开至少一个实施例提供的音频处理方法中,所述获取所述第一音频信号,包括:采集初始音频信号;对所述初始音频信号进行滤波处理以得到所述第一音频信号。For example, in the audio processing method provided by at least one embodiment of the present disclosure, obtaining the first audio signal includes: collecting an initial audio signal; filtering the initial audio signal to obtain the first audio signal .
例如,在本公开至少一个实施例提供的音频处理方法中,所述第二音频信号的相位与所述第三音频信号的相位相反。For example, in the audio processing method provided by at least one embodiment of the present disclosure, the phase of the second audio signal is opposite to the phase of the third audio signal.
本公开至少一个实施例还提供一种音频处理装置,包括:指令生成模块,被配置为基于第一音频信号,生成控制指令;音频生成模块,被配置为基于所述控制指令,生成第二音频信号;输出模块,被配置为输出所述第二音频信号,以抑制第三音频信号;其中,所述第二音频信号的相位与所述第三音频信号的相位之和小于相位阈值,所述第一音频信号出现的时间早于所述第三音频信号出现的时间。At least one embodiment of the present disclosure also provides an audio processing device, including: an instruction generation module configured to generate a control instruction based on a first audio signal; and an audio generation module configured to generate a second audio based on the control instruction. signal; an output module configured to output the second audio signal to suppress a third audio signal; wherein the sum of the phases of the second audio signal and the phase of the third audio signal is less than a phase threshold, the The first audio signal appears earlier than the third audio signal.
例如,在本公开至少一个实施例提供的音频处理装置中,所述输出模块包括时刻确定子模块和输出子模块,所述时刻确定子模块被配置为基于所述控制指令,确定输出所述第二音频信号的第一时刻;所述输出子模块被配置为在所述第一时刻输出所述第二音频信号,其中,所述第三音频信号从第二时刻开始出现,所述第一时刻和所述第二时刻之间的时间差的绝对值小于时间阈值。For example, in the audio processing device provided by at least one embodiment of the present disclosure, the output module includes a time determination sub-module and an output sub-module, and the time determination sub-module is configured to determine to output the first time based on the control instruction. The first moment of the second audio signal; the output sub-module is configured to output the second audio signal at the first moment, wherein the third audio signal begins to appear from the second moment, and the first moment The absolute value of the time difference between the second moment and the second moment is less than the time threshold.
例如,在本公开至少一个实施例提供的音频处理装置中,所述第一时刻和所述第二时刻之间的时间差为0。For example, in the audio processing device provided by at least one embodiment of the present disclosure, the time difference between the first time and the second time is 0.
例如,在本公开至少一个实施例提供的音频处理装置中,所述指令生成模块包括音频获取子模块、预测子模块和生成子模块,所述音频获取子模块被配置为获取所述第一音频信号;所述预测子模块被配置为对所述第一音频信号进 行处理以预测得到第四音频信号;所述生成子模块被配置为基于所述第四音频信号,生成所述控制指令。For example, in the audio processing device provided by at least one embodiment of the present disclosure, the instruction generation module includes an audio acquisition sub-module, a prediction sub-module and a generation sub-module, and the audio acquisition sub-module is configured to acquire the first audio signal; the prediction sub-module is configured to process the first audio signal to predict a fourth audio signal; the generation sub-module is configured to generate the control instruction based on the fourth audio signal.
例如,在本公开至少一个实施例提供的音频处理装置中,所述第二音频信号和/或所述第三音频信号和/或所述第四音频信号是周期性的或间歇性的时域信号。For example, in the audio processing device provided by at least one embodiment of the present disclosure, the second audio signal and/or the third audio signal and/or the fourth audio signal are periodic or intermittent time domain Signal.
例如,在本公开至少一个实施例提供的音频处理装置中,所述预测子模块包括查询单元和预测单元,所述查询单元被配置为基于所述第一音频信号生成第一音频特征编码以及基于所述第一音频特征编码查询查找表,以得到第二音频特征编码;所述预测单元被配置为基于所述第二音频特征编码,预测得到所述第四音频信号。For example, in the audio processing device provided by at least one embodiment of the present disclosure, the prediction sub-module includes a query unit and a prediction unit, the query unit is configured to generate a first audio feature encoding based on the first audio signal and a prediction unit based on the first audio signal. The first audio feature coding queries a lookup table to obtain a second audio feature coding; the prediction unit is configured to predict the fourth audio signal based on the second audio feature coding.
例如,在本公开至少一个实施例提供的音频处理装置中,所述查找表包括至少一个第一编码字段。For example, in the audio processing device provided by at least one embodiment of the present disclosure, the lookup table includes at least one first encoding field.
例如,在本公开至少一个实施例提供的音频处理装置中,所述查找表还包括至少一个第二编码字段,多个所述第一编码字段组成一个所述第二编码字段。For example, in the audio processing device provided by at least one embodiment of the present disclosure, the lookup table further includes at least one second encoding field, and multiple first encoding fields constitute one second encoding field.
例如,在本公开至少一个实施例提供的音频处理装置中,所述第二音频特征编码包括至少一个所述第一编码字段和/或至少一个所述第二编码字段。For example, in the audio processing device provided by at least one embodiment of the present disclosure, the second audio feature encoding includes at least one of the first encoding field and/or at least one of the second encoding field.
例如,在本公开至少一个实施例提供的音频处理装置中,所述音频获取子模块包括采集单元和下采样处理单元,所述采集单元被配置为采集初始音频信号;所述下采样处理单元被配置为对所述初始音频信号进行下采样处理以得到所述第一音频信号。For example, in the audio processing device provided by at least one embodiment of the present disclosure, the audio acquisition sub-module includes a collection unit and a down-sampling processing unit, the collection unit is configured to collect an initial audio signal; the down-sampling processing unit is Configured to perform downsampling processing on the initial audio signal to obtain the first audio signal.
例如,在本公开至少一个实施例提供的音频处理装置中,所述音频获取子模块包括采集单元和滤波单元,所述采集单元被配置为采集初始音频信号;所述滤波单元被配置为对所述初始音频信号进行滤波处理以得到所述第一音频信号。For example, in the audio processing device provided by at least one embodiment of the present disclosure, the audio acquisition sub-module includes an acquisition unit and a filtering unit, the acquisition unit is configured to acquire an initial audio signal; the filtering unit is configured to The initial audio signal is filtered to obtain the first audio signal.
例如,在本公开至少一个实施例提供的音频处理装置中,所述第二音频信号的相位与所述第三音频信号的相位相反。For example, in the audio processing device provided by at least one embodiment of the present disclosure, the phase of the second audio signal is opposite to the phase of the third audio signal.
本公开至少一个实施例还提供一种音频处理装置,包括:一个或多个存储器,非瞬时性地存储有计算机可执行指令;一个或多个处理器,配置为运行所述计算机可执行指令,其中,所述计算机可执行指令被所述一个或多个处理器运行时实现根据本公开任一个实施例所述的音频处理方法。At least one embodiment of the present disclosure also provides an audio processing device, including: one or more memories non-transiently storing computer-executable instructions; one or more processors configured to run the computer-executable instructions, Wherein, the computer-executable instructions implement the audio processing method according to any embodiment of the present disclosure when run by the one or more processors.
本公开至少一个实施例还提供一种非瞬时性计算机可读存储介质,其中, 所述非瞬时性计算机可读存储介质存储有计算机可执行指令,所述计算机可执行指令被处理器执行时实现根据本公开任一个实施例所述的音频处理方法。At least one embodiment of the present disclosure also provides a non-transitory computer-readable storage medium, wherein the non-transitory computer-readable storage medium stores computer-executable instructions, which are implemented when executed by a processor. An audio processing method according to any embodiment of the present disclosure.
根据本公开的任一实施例提供的音频处理方法、音频处理装置和非瞬时性计算机可读存储介质,通过学习当前音频信号(即,第一音频信号)的特征,产生未来音频信号的反相音频信号(即,第二音频信号)以抑制未来音频信号(即,第三音频信号),避免由于输入端和输出端之间的延迟导致的反相音频信号和需要抑制的音频信号不同步的问题,提升消音效果,可大幅降低或甚至消除输入端对输出端的延迟对消音的影响,抑制音频的效果比业界常用的落后式的主动消音系统的抑制音频的效果更好。According to the audio processing method, audio processing device and non-transitory computer-readable storage medium provided by any embodiment of the present disclosure, an inversion of the future audio signal is generated by learning the characteristics of the current audio signal (ie, the first audio signal) audio signal (i.e., the second audio signal) to suppress the future audio signal (i.e., the third audio signal) to avoid the inversion audio signal due to the delay between the input end and the output end being out of sync with the audio signal that needs to be suppressed Problem, improving the noise cancellation effect can significantly reduce or even eliminate the impact of the input-to-output delay on noise cancellation, and the audio suppression effect is better than the backward active cancellation system commonly used in the industry.
附图说明Description of the drawings
为了更清楚地说明本公开实施例的技术方案,下面将对实施例的附图作简单地介绍,显而易见地,下面描述中的附图仅仅涉及本公开的一些实施例,而非对本公开的限制。In order to more clearly illustrate the technical solutions of the embodiments of the present disclosure, the drawings of the embodiments will be briefly introduced below. Obviously, the drawings in the following description only relate to some embodiments of the present disclosure and do not limit the present disclosure. .
图1为本公开至少一个实施例提供的一种音频处理系统的示意性框图;Figure 1 is a schematic block diagram of an audio processing system provided by at least one embodiment of the present disclosure;
图2A为本公开至少一个实施例提供的一种音频处理方法的示意性流程图;Figure 2A is a schematic flow chart of an audio processing method provided by at least one embodiment of the present disclosure;
图2B为图2A所示的步骤S10的示意性流程图;Figure 2B is a schematic flow chart of step S10 shown in Figure 2A;
图2C为图2B所示的步骤S102的示意性流程图;Figure 2C is a schematic flow chart of step S102 shown in Figure 2B;
图3为本公开至少一个实施例提供的一种第一音频信号和第三音频信号的示意图;Figure 3 is a schematic diagram of a first audio signal and a third audio signal provided by at least one embodiment of the present disclosure;
图4为本公开至少一个实施例提供的一种第三音频信号和第四音频信号的示意图;Figure 4 is a schematic diagram of a third audio signal and a fourth audio signal provided by at least one embodiment of the present disclosure;
图5A为本公开一些实施例提供的一种音频信号的示意图;Figure 5A is a schematic diagram of an audio signal provided by some embodiments of the present disclosure;
图5B为图5A中的虚线矩形框P1中的音频信号的放大示意图;Figure 5B is an enlarged schematic diagram of the audio signal in the dotted rectangular frame P1 in Figure 5A;
图6为本公开至少一个实施例提供的一种音频处理装置的示意性框图;Figure 6 is a schematic block diagram of an audio processing device provided by at least one embodiment of the present disclosure;
图7为本公开至少一个实施例提供的另一种音频处理装置的示意性框图;Figure 7 is a schematic block diagram of another audio processing device provided by at least one embodiment of the present disclosure;
图8为本公开至少一个实施例提供的一种非瞬时性计算机可读存储介质的示意图;Figure 8 is a schematic diagram of a non-transitory computer-readable storage medium provided by at least one embodiment of the present disclosure;
图9为本公开至少一个实施例提供的一种模型训练系统的示意性框图;Figure 9 is a schematic block diagram of a model training system provided by at least one embodiment of the present disclosure;
图10A为本公开至少一个实施例提供的一种模型训练方法的示意性流程图;Figure 10A is a schematic flow chart of a model training method provided by at least one embodiment of the present disclosure;
图10B为图10A所示的步骤S200的示意性流程图;Figure 10B is a schematic flow chart of step S200 shown in Figure 10A;
图10C为图10B所示的步骤S2002的示意性流程图;Figure 10C is a schematic flow chart of step S2002 shown in Figure 10B;
图11为本公开至少一个实施例提供的一种第一音频信号和第三音频信号的示意图;Figure 11 is a schematic diagram of a first audio signal and a third audio signal provided by at least one embodiment of the present disclosure;
图12A为本公开至少一个实施例提供的一种音频误差信号与训练迭代次数之间的示意图;Figure 12A is a schematic diagram of an audio error signal and the number of training iterations provided by at least one embodiment of the present disclosure;
图12B为本公开至少一个实施例提供的另一种音频误差信号与训练迭代次数之间的示意图;Figure 12B is a schematic diagram between another audio error signal and the number of training iterations provided by at least one embodiment of the present disclosure;
图13为本公开至少一个实施例提供的一种模型训练装置的示意性框图;Figure 13 is a schematic block diagram of a model training device provided by at least one embodiment of the present disclosure;
图14为本公开至少一个实施例提供的另一种模型训练装置的示意性框图;以及Figure 14 is a schematic block diagram of another model training device provided by at least one embodiment of the present disclosure; and
图15为本公开至少一个实施例提供的一种非瞬时性计算机可读存储介质的示意图。Figure 15 is a schematic diagram of a non-transitory computer-readable storage medium provided by at least one embodiment of the present disclosure.
具体实施方式Detailed ways
为了使得本公开实施例的目的、技术方案和优点更加清楚,下面将结合本公开实施例的附图,对本公开实施例的技术方案进行清楚、完整地描述。显然,所描述的实施例是本公开的一部分实施例,而不是全部的实施例。基于所描述的本公开的实施例,本领域普通技术人员在无需创造性劳动的前提下所获得的所有其他实施例,都属于本公开保护的范围。In order to make the purpose, technical solutions and advantages of the embodiments of the present disclosure more clear, the technical solutions of the embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings of the embodiments of the present disclosure. Obviously, the described embodiments are some, but not all, of the embodiments of the present disclosure. Based on the described embodiments of the present disclosure, all other embodiments obtained by those of ordinary skill in the art without creative efforts fall within the scope of protection of the present disclosure.
除非另外定义,本公开使用的技术术语或者科学术语应当为本公开所属领域内具有一般技能的人士所理解的通常意义。本公开中使用的“第一”、“第二”以及类似的词语并不表示任何顺序、数量或者重要性,而只是用来区分不同的组成部分。“包括”或者“包含”等类似的词语意指出现该词前面的元件或者物件涵盖出现在该词后面列举的元件或者物件及其等同,而不排除其他元件或者物件。“连接”或者“相连”等类似的词语并非限定于物理的或者机械的连接,而是可以包括电性的连接,不管是直接的还是间接的。Unless otherwise defined, technical terms or scientific terms used in this disclosure shall have the usual meaning understood by a person with ordinary skill in the art to which this disclosure belongs. "First", "second" and similar words used in this disclosure do not indicate any order, quantity or importance, but are only used to distinguish different components. Words such as "include" or "comprising" mean that the elements or things appearing before the word include the elements or things listed after the word and their equivalents, without excluding other elements or things. Words such as "connected" or "connected" are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect.
为了保持本公开实施例的以下说明清楚且简明,本公开省略了部分已知功能和已知部件的详细说明。In order to keep the following description of the embodiments of the present disclosure clear and concise, the present disclosure omits detailed descriptions of some well-known functions and well-known components.
本公开至少一个实施例提供一种音频处理方法。该音频处理方法包括:基于第一音频信号,生成控制指令;基于控制指令,生成第二音频信号;输出第 二音频信号,以抑制第三音频信号。第二音频信号的相位与第三音频信号的相位之和小于相位阈值,第一音频信号出现的时间早于第三音频信号出现的时间。At least one embodiment of the present disclosure provides an audio processing method. The audio processing method includes: generating a control instruction based on the first audio signal; generating a second audio signal based on the control instruction; and outputting the second audio signal to suppress the third audio signal. The sum of the phases of the second audio signal and the phase of the third audio signal is less than the phase threshold, and the first audio signal appears earlier than the third audio signal.
在本公开的实施例提供的音频处理方法中,通过学习当前音频信号(即,第一音频信号)的特征,产生未来音频信号的反相音频信号(即,第二音频信号)以抑制未来音频信号(即,第三音频信号),避免由于输入端和输出端之间的延迟导致的反相音频信号和需要抑制的音频信号不同步的问题,提升消音效果,可大幅降低或甚至消除输入端对输出端的延迟对消音的影响,抑制音频的效果比业界常用的落后式的主动消音系统的抑制音频的效果更好。In the audio processing method provided by embodiments of the present disclosure, by learning the characteristics of the current audio signal (ie, the first audio signal), an inverted audio signal (ie, the second audio signal) of the future audio signal is generated to suppress the future audio signal (i.e., the third audio signal), to avoid the problem of out-of-synchronization between the inverted audio signal and the audio signal that needs to be suppressed due to the delay between the input end and the output end, and improve the noise canceling effect, which can significantly reduce or even eliminate the input end. Regarding the impact of output delay on noise cancellation, the audio suppression effect is better than the audio suppression effect of the backward active cancellation system commonly used in the industry.
本公开的实施例还提供一种音频处理装置和非瞬时性计算机可读存储介质。该音频处理方法可应用于本公开实施例提供的音频处理装置,该音频处理装置可被配置于电子设备上。该电子设备可以是个人计算机、移动终端、汽车头枕等,该移动终端可以是手机、耳机、平板电脑等硬件设备。Embodiments of the present disclosure also provide an audio processing device and a non-transitory computer-readable storage medium. The audio processing method can be applied to the audio processing device provided by the embodiment of the present disclosure, and the audio processing device can be configured on an electronic device. The electronic device may be a personal computer, a mobile terminal, a car headrest, etc. The mobile terminal may be a mobile phone, a headset, a tablet computer or other hardware devices.
下面结合附图对本公开的实施例进行详细说明,但是本公开并不限于这些具体的实施例。The embodiments of the present disclosure will be described in detail below with reference to the accompanying drawings, but the present disclosure is not limited to these specific embodiments.
图1为本公开至少一个实施例提供的一种音频处理系统的示意性框图,图2A为本公开至少一个实施例提供的一种音频处理方法的示意性流程图,图2B为图2A所示的步骤S10的示意性流程图,图2C为图2B所示的步骤S102的示意性流程图,图3为本公开至少一个实施例提供的一种第一音频信号和第三音频信号的示意图。Figure 1 is a schematic block diagram of an audio processing system provided by at least one embodiment of the present disclosure. Figure 2A is a schematic flow chart of an audio processing method provided by at least one embodiment of the present disclosure. Figure 2B is shown in Figure 2A Figure 2C is a schematic flow chart of step S10 shown in Figure 2B. Figure 3 is a schematic diagram of a first audio signal and a third audio signal provided by at least one embodiment of the present disclosure.
图1所示的音频处理系统可以用于实现本公开任一实施例提供的音频处理方法,例如,图2A所示的音频处理方法。如图1所示,音频处理系统可以包括音频接收部分、音频处理部分和音频输出部分。音频接收部分可以接收声音源在时刻tt1发出的音频信号Sn1,然后将音频信号Sn1传输至音频处理部分,音频处理部分对音频信号Sn1进行处理,以预测得到未来音频信号Sn3的反相音频信号Sn2;然后该反相音频信号Sn2通过音频输出部分输出。反相音频信号Sn2可以用于抑制声音源在晚于时刻tt1的时刻tt2产生的未来音频信号Sn3。例如,目标对象(例如,人的耳朵等)可以同时接收到反相音频信号Sn2和未来音频信号Sn3,以使得反相音频信号Sn2和未来音频信号Sn3可以进行破坏性叠加,从而实现消音。The audio processing system shown in Figure 1 can be used to implement the audio processing method provided by any embodiment of the present disclosure, for example, the audio processing method shown in Figure 2A. As shown in Figure 1, the audio processing system may include an audio receiving part, an audio processing part and an audio output part. The audio receiving part can receive the audio signal Sn1 emitted by the sound source at time tt1, and then transmit the audio signal Sn1 to the audio processing part. The audio processing part processes the audio signal Sn1 to predict the inverted audio signal Sn2 of the future audio signal Sn3. ;Then the inverted audio signal Sn2 is output through the audio output section. The inverted audio signal Sn2 may be used to suppress future audio signals Sn3 generated by the sound source at time tt2 later than time tt1. For example, the target object (for example, a human ear, etc.) can receive the inverted audio signal Sn2 and the future audio signal Sn3 at the same time, so that the inverted audio signal Sn2 and the future audio signal Sn3 can be destructively superimposed, thereby achieving silence.
例如,音频接收部分可以包括麦克风、放大器(例如,麦克风放大器)、模数转换器(analog to digital converter,ADC)、下采样器(downsampler)等,音 频处理部分可以包括AI引擎和/或数字信号处理器(Digital Signal Processing,DSP))等,音频输出部分可以包括上采样器(Upsampler)、数模转换器(digital to analog converter,DAC)、放大器(例如,扬声器放大器)以及扬声器等。For example, the audio receiving part may include a microphone, an amplifier (for example, a microphone amplifier), an analog to digital converter (ADC), a downsampler, etc., and the audio processing part may include an AI engine and/or a digital signal Processor (Digital Signal Processing, DSP), etc., the audio output part can include an upsampler, a digital to analog converter (digital to analog converter, DAC), an amplifier (for example, a speaker amplifier), a speaker, etc.
如图2A所示,本公开的一个实施例提供的音频处理方法包括步骤S10至S12。在步骤S10,基于第一音频信号,生成控制指令;在步骤S11,基于控制指令,生成第二音频信号;在步骤S12,输出第二音频信号,以抑制第三音频信号。As shown in Figure 2A, an audio processing method provided by one embodiment of the present disclosure includes steps S10 to S12. In step S10, a control instruction is generated based on the first audio signal; in step S11, a second audio signal is generated based on the control instruction; in step S12, the second audio signal is output to suppress the third audio signal.
例如,第一音频信号可以为图1所示的音频信号Sn1,第二音频信号可以为图1所示的反相音频信号Sn2,第三音频信号可以为图1所示的未来音频信号Sn3。For example, the first audio signal may be the audio signal Sn1 shown in FIG. 1 , the second audio signal may be the inverted audio signal Sn2 shown in FIG. 1 , and the third audio signal may be the future audio signal Sn3 shown in FIG. 1 .
例如,音频接收部分可以接收第一音频信号;音频处理部分可以对第一音频信号进行处理以生成控制指令,并基于控制指令生成第二音频信号;音频输出部分可以输出第二音频信号,从而实现抑制第三音频信号。For example, the audio receiving part can receive a first audio signal; the audio processing part can process the first audio signal to generate a control instruction, and generate a second audio signal based on the control instruction; the audio output part can output the second audio signal, thereby achieving Suppress third audio signal.
例如,第一音频信号出现的时间早于第三音频信号出现的时间。如图3所示,第一音频信号开始出现的时刻为t11,第三音频信号开始出现的时刻为t21,在时间轴t上,时刻t11早于时刻t21。例如,第一音频信号存在的时间段可以为时刻t11到时刻t12之间的时间段,第三音频信号存在的时间段为时刻t21到时刻t22之间的时间段。考虑到信号处理过程的时间等因素,时刻t12和时刻t21可以不是同一时刻,时刻t12早于时刻t21。For example, the first audio signal appears earlier than the third audio signal. As shown in Figure 3, the time when the first audio signal starts to appear is t11, and the time when the third audio signal starts to appear is t21. On the time axis t, time t11 is earlier than time t21. For example, the time period during which the first audio signal exists may be the time period between time t11 and time t12, and the time period during which the third audio signal exists may be the time period between time t21 and time t22. Taking into account factors such as the time of the signal processing process, time t12 and time t21 may not be the same time, and time t12 is earlier than time t21.
需要说明的是,在本公开的实施例中,“音频信号存在的时间段或出现的时间”表示该音频信号对应的音频存在的时间段或出现的时间。It should be noted that, in the embodiment of the present disclosure, "the time period in which the audio signal exists or the time in which it appears" means the time period in which the audio corresponding to the audio signal exists or the time in which it appears.
例如,第二音频信号的相位与第三音频信号的相位之和小于相位阈值,相位阈值可以根据实际情况设置,本公开对此不作具体限制。例如,在一些实施例中,第二音频信号的相位与第三音频信号的相位相反,从而可以实现完全消音,即完全抑制第三音频信号,此时,当第二音频信号和第三音频信号由音频采集装置(例如,麦克风等)接收时,音频采集装置所接收到的音频信号的误差能量为0;若第二音频信号和第三音频信号被人耳接收,相当于人没有听到声音。For example, the sum of the phases of the second audio signal and the phase of the third audio signal is less than the phase threshold. The phase threshold can be set according to the actual situation, and this disclosure does not specifically limit this. For example, in some embodiments, the phase of the second audio signal is opposite to the phase of the third audio signal, so that complete silence can be achieved, that is, the third audio signal is completely suppressed. At this time, when the second audio signal and the third audio signal When received by an audio collection device (for example, a microphone, etc.), the error energy of the audio signal received by the audio collection device is 0; if the second audio signal and the third audio signal are received by the human ear, it is equivalent to the person not hearing the sound. .
例如,在一些实施例中,第一音频信号可以为时刻t11到时刻t12之间的最大声量(振幅最大)的时域音频信号,第一音频信号不是特定频率的音频信号,从而本公开的实施例提供的音频处理方法不需要从音频信号中提取频谱特 征来产生频谱图,由此可以简化音频信号的处理过程,节省处理时间。For example, in some embodiments, the first audio signal may be the time-domain audio signal with the maximum volume (maximum amplitude) between time t11 and time t12, and the first audio signal is not an audio signal of a specific frequency, so the implementation of the present disclosure The audio processing method provided in the example does not need to extract spectral features from the audio signal to generate a spectrogram, which can simplify the audio signal processing process and save processing time.
例如,第一音频信号和第三音频信号可以为外界环境、机器等产生的音频信号,机器运转的声音、装修过程的电钻声和电锯声等。例如,机器可以包括家用电器(空调、抽油烟机、洗衣机等)等。For example, the first audio signal and the third audio signal may be audio signals generated by the external environment, machines, etc., the sound of machine operation, the sound of electric drills and electric saws during decoration, etc. For example, machines may include household appliances (air conditioners, range hoods, washing machines, etc.) and the like.
例如,在一些实施例中,如图2B所示,步骤S10可以包括步骤S101~步骤103,在步骤S101中,获取第一音频信号;在步骤S102中,对第一音频信号进行处理以预测得到第四音频信号;在步骤S103中,基于第四音频信号,生成控制指令。在本公开的实施例提供的音频处理方法中,通过学习当前音频信号(即第一音频信号)的特征,预测得到音频信号(即第四音频信号)。For example, in some embodiments, as shown in Figure 2B, step S10 may include steps S101 to 103. In step S101, a first audio signal is obtained; in step S102, the first audio signal is processed to predict Fourth audio signal; in step S103, a control instruction is generated based on the fourth audio signal. In the audio processing method provided by embodiments of the present disclosure, the audio signal (ie, the fourth audio signal) is predicted by learning the characteristics of the current audio signal (ie, the first audio signal).
例如,第四音频信号是预测得到的未来的音频信号,例如,在时间轴上,第四音频信号存在的时间段落后于第一音频信号存在的时间段,例如,第四音频信号存在的时间段与第三音频信号存在的时间段相同,从而第四音频信号存在的时间段也可以为图3所示的时刻t21到时刻t22之间的时间段。For example, the fourth audio signal is a predicted future audio signal. For example, on the time axis, the time period in which the fourth audio signal exists is later than the time period in which the first audio signal exists, for example, the time period in which the fourth audio signal exists. The segment is the same as the time period in which the third audio signal exists, so the time period in which the fourth audio signal exists may also be the time period between time t21 and time t22 shown in FIG. 3 .
图4为本公开至少一个实施例提供的一种第三音频信号和第四音频信号的示意图。在图4所示的示例中,横轴表示时间(Time),纵轴表示幅度(Amplitude),幅度可以表示为电压值。如图4所示,在一个实施例中,预测得到的第四音频信号与第三音频信号大致相同。Figure 4 is a schematic diagram of a third audio signal and a fourth audio signal provided by at least one embodiment of the present disclosure. In the example shown in Figure 4, the horizontal axis represents time (Time), the vertical axis represents amplitude (Amplitude), and the amplitude can be expressed as a voltage value. As shown in Figure 4, in one embodiment, the predicted fourth audio signal is substantially the same as the third audio signal.
例如,在一实施例中,第三音频信号和第四音频信号可以完全相同,此时,基于第四音频信号最终生成的第二音频信号的相位与第三音频信号的相位相反,从而实现完全消音。For example, in one embodiment, the third audio signal and the fourth audio signal may be exactly the same. In this case, the phase of the second audio signal finally generated based on the fourth audio signal is opposite to the phase of the third audio signal, thereby achieving complete Silencing.
例如,在步骤S102中,对第一音频信号进行处理以预测第四音频信号可以包括通过神经网络对第一音频信号进行处理以预测得到第四音频信号。For example, in step S102, processing the first audio signal to predict the fourth audio signal may include processing the first audio signal through a neural network to predict the fourth audio signal.
例如,神经网络可以包括循环神经网络、长短时记忆网络或生成对抗网络等。在本公开的实施例中,可以基于人工智能学习音频信号的特征,从而预测尚未发生的未来某个时间段的音频信号,据此产生未来的该时间段的反相音频信号,用以抑制该时间段的音频信号。For example, neural networks may include recurrent neural networks, long short-term memory networks, or generative adversarial networks. In embodiments of the present disclosure, the characteristics of the audio signal can be learned based on artificial intelligence, thereby predicting the audio signal of a certain future time period that has not yet occurred, and thereby generating an inverted audio signal of the future time period to suppress the time period audio signal.
例如,在一些实施例中,如图2C所示,步骤S102可以包括步骤S1021~步骤1023,在步骤S1021中,基于第一音频信号生成第一音频特征编码;在步骤S1022中,基于第一音频特征编码查询查找表,以得到第二音频特征编码;在步骤S1023中,基于第二音频特征编码,预测得到第四音频信号。For example, in some embodiments, as shown in Figure 2C, step S102 may include steps S1021 to 1023. In step S1021, a first audio feature code is generated based on the first audio signal; in step S1022, based on the first audio signal, The feature coding queries the lookup table to obtain the second audio feature coding; in step S1023, based on the second audio feature coding, a fourth audio signal is predicted.
例如,第一音频信号可以为模拟信号,可以通过模数转换器对第一音频信 号进行处理,以得到处理后的第一音频信号,处理后的第一音频信号为数字信号,基于该处理后的第一音频信号可以生成第一音频特征编码。For example, the first audio signal may be an analog signal, and the first audio signal may be processed through an analog-to-digital converter to obtain a processed first audio signal. The processed first audio signal may be a digital signal. Based on the processed The first audio signal may generate a first audio feature code.
又例如,第一音频信号可以为数字信号,例如,PDM(Pulse-density-modulation,脉冲密度调制)信号,此时,可以直接基于第一音频信号生成第一音频特征编码。PDM信号可以采用二进制数0和1表示。For another example, the first audio signal may be a digital signal, such as a PDM (Pulse-density-modulation, pulse density modulation) signal. In this case, the first audio feature code may be generated directly based on the first audio signal. PDM signals can be represented by binary numbers 0 and 1.
例如,可以采用任何合适的编码方式实现第一音频特征编码。例如,在一些实施例中,在表示一个音频信号时,可以采用音频信号的变化状态来描述该音频信号,可以采用多比特(multi-bits)来表示一个音频信号的变化状态。例如,可以采用两比特(2bits)表示音频信号的变化状态,在一些示例中,如下述表格1所示,00表示音频信号变大,01表示音频信号变小,10表示没有音频信号,11表示音频信号不变。For example, any suitable encoding method may be used to implement the first audio feature encoding. For example, in some embodiments, when representing an audio signal, the changing state of the audio signal can be used to describe the audio signal, and multi-bits can be used to represent the changing state of the audio signal. For example, two bits (2bits) can be used to represent the changing state of the audio signal. In some examples, as shown in Table 1 below, 00 means that the audio signal becomes larger, 01 means that the audio signal becomes smaller, 10 means that there is no audio signal, and 11 means that there is no audio signal. The audio signal remains unchanged.
比特Bits 音频信号的变化状态The changing state of the audio signal
0000 音频信号变大Audio signal becomes louder
0101 音频信号变小Audio signal becomes smaller
1010 没有音频信号no audio signal
1111 音频信号不变Audio signal remains unchanged
表1Table 1
“音频信号变大”表示单位时间段(每个时间步(time step))中的音频信号的振幅随着时间变大,“音频信号变小”表示单位时间段中的音频信号的振幅随着时间变小,“音频信号不变”表示单位时间段中的音频信号的振幅随着时间不变,“没有音频信号”表示在单位时间段中没有音频信号,即音频信号的振幅为0。"The audio signal becomes larger" means that the amplitude of the audio signal in the unit time period (each time step) becomes larger with time, and "the audio signal becomes smaller" means that the amplitude of the audio signal in the unit time period increases with time. The time becomes smaller, "the audio signal remains unchanged" means that the amplitude of the audio signal in the unit time period does not change with time, and "no audio signal" means that there is no audio signal in the unit time period, that is, the amplitude of the audio signal is 0.
图5A为本公开一些实施例提供的一种音频信号的示意图,图5B为图5A中的虚线矩形框P1中的音频信号的放大示意图。Figure 5A is a schematic diagram of an audio signal provided by some embodiments of the present disclosure. Figure 5B is an enlarged schematic diagram of the audio signal in the dotted rectangular box P1 in Figure 5A.
在图5A中,横坐标为时间(ms,毫秒),纵坐标为音频信号的振幅(volts,伏特)。如图5A所示,音频信号V是周期性变化的信号,音频信号V的周期性的模式(pattern)为虚线矩形框P2所示的模式。In Figure 5A, the abscissa is time (ms, milliseconds), and the ordinate is the amplitude of the audio signal (volts, volts). As shown in FIG. 5A , the audio signal V is a periodically changing signal, and the periodic pattern of the audio signal V is the pattern shown by the dotted rectangular frame P2.
如图5B所示,波形段30所表示的音频信号的振幅随着时间t不变,波形段30对应的时间为一个单位时间段,则波形段30可以表示为音频特征编码(11);类似地,波形段31所表示的音频信号的振幅随着时间t逐渐变大,波 形段31对应的时间为四个单位时间段,则波形段31可以表示为音频特征编码(00,00,00,00);波形段32所表示的音频信号的振幅随着时间t不变,波形段32对应的时间为一个单位时间段,波形段32可以表示为音频特征编码(11);波形段33所表示的音频信号的振幅随着时间t逐渐变小,波形段33对应的时间为六个单位时间段,则波形段33可以表示为音频特征编码(01,01,01,01,01,01);波形段34所表示的音频信号的振幅随着时间t不变,波形段34对应的时间为一个单位时间段,则波形段34可以表示为音频特征编码(11);波形段35所表示的音频信号的振幅随着时间t逐渐变大,波形段35对应的时间为八个单位时间段,则波形段35可以表示为音频特征编码(00,00,00,00,00,00,00,00);以此类推,波形段36可以表示为音频特征编码(01,01,01,01,01,01,01,01,01,01,01,01),波形段37可以表示为音频特征编码(11),波形段38可以表示为音频特征编码(00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00)。从而,图5B所示的音频信号对应的音频特征编码可以表示为{11,00,00,00,00,11,01,01,01,01,01,01,11,00,00,00,00,00,00,00,00,01,01,01,01,01,01,01,01,01,01,01,01,11,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,…}。As shown in Figure 5B, the amplitude of the audio signal represented by the waveform segment 30 does not change with time t, and the time corresponding to the waveform segment 30 is a unit time period, then the waveform segment 30 can be expressed as audio feature coding (11); similarly Ground, the amplitude of the audio signal represented by waveform segment 31 gradually increases with time t, and the time corresponding to waveform segment 31 is four unit time segments, then waveform segment 31 can be expressed as audio feature encoding (00,00,00, 00); the amplitude of the audio signal represented by waveform segment 32 remains unchanged with time t, the time corresponding to waveform segment 32 is a unit time period, and waveform segment 32 can be represented as audio feature encoding (11); represented by waveform segment 33 The amplitude of the audio signal gradually becomes smaller with time t, and the time corresponding to the waveform segment 33 is six unit time periods, then the waveform segment 33 can be expressed as the audio feature code (01,01,01,01,01,01); The amplitude of the audio signal represented by waveform segment 34 does not change with time t, and the time corresponding to waveform segment 34 is a unit time period, then waveform segment 34 can be expressed as audio feature encoding (11); the audio signal represented by waveform segment 35 The amplitude of the signal gradually increases with time t, and the time corresponding to the waveform segment 35 is eight unit time segments, then the waveform segment 35 can be expressed as audio feature encoding (00,00,00,00,00,00,00,00 ); By analogy, waveform segment 36 can be expressed as audio feature coding (01,01,01,01,01,01,01,01,01,01,01,01), and waveform segment 37 can be expressed as audio feature coding (11), the waveform segment 38 can be expressed as audio feature encoding (00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00). Therefore, the audio feature encoding corresponding to the audio signal shown in Figure 5B can be expressed as {11,00,00,00,00,11,01,01,01,01,01,01,11,00,00,00, 00,00,00,00,00,01,01,01,01,01,01,01,01,01,01,01,01,11,00,00,00,00,00,00,00, 00,00,00,00,00,00,00,00,00,…}.
例如,在一些实施例中,查找表(codebook)包括至少一个第一编码字段。例如,在另一些实施例中,查找表还包括至少一个第二编码字段,多个第一编码字段组成一个第二编码字段,从而可以实现从低级特征组合而形成降维的高阶特征。例如,查找表中的编码字段(codeword,例如,codeword可以包括第一编码字段和第二编码字段)的编码方式可以与上述第一音频特征编码的编码方式相同。For example, in some embodiments, a lookup table (codebook) includes at least one first code field. For example, in other embodiments, the lookup table further includes at least one second encoding field, and multiple first encoding fields constitute a second encoding field, so that dimensionally reduced high-order features can be formed from combinations of low-level features. For example, the coding method of the coding field (codeword, for example, the codeword may include a first coding field and a second coding field) in the lookup table may be the same as the coding method of the above-mentioned first audio feature coding.
例如,在一些实施例中,当采用两比特表示音频信号的变化状态,从而实现特征编码时,第一编码字段可以为00、01、10和11之一。可以由00、01、10和11进行组合以构成第二编码字段。例如,一个第二编码字段可以表示为{00,00,00,01,01,01,11,11,01,…},其由00、01和11组合构成。For example, in some embodiments, when two bits are used to represent the changing state of the audio signal to implement feature encoding, the first encoding field may be one of 00, 01, 10, and 11. 00, 01, 10 and 11 can be combined to form the second encoding field. For example, a second encoding field may be represented as {00,00,00,01,01,01,11,11,01,…}, which is composed of a combination of 00, 01 and 11.
例如,当查找表包括多个第二编码字段时,多个第二编码字段分别包括的第一编码字段的数量可以各不相同。For example, when the lookup table includes a plurality of second encoding fields, the number of first encoding fields included in each of the plurality of second encoding fields may be different.
需要说明的是,当采用更多比特(例如,3比特、4比特等)表示音频信号的变化状态,从而实现特征编码时,第一编码字段的种类可以更多,例如,当采用3比特表示音频信号的变化状态时,第一编码字段的种类最多可以为8种, 此时,第一编码字段可以为000、001、010、011,100、101、110和111中的部分或全部。It should be noted that when more bits (for example, 3 bits, 4 bits, etc.) are used to represent the changing state of the audio signal to implement feature encoding, the types of the first coding field can be more, for example, when 3 bits are used to represent When the audio signal changes state, the first encoding field can have up to 8 types. At this time, the first encoding field can be part or all of 000, 001, 010, 011, 100, 101, 110 and 111.
例如,一个或多个第二编码字段还可以进行组合以得到第三编码字段,或一个或多个第二编码字段以及一个或多个第一编码字段可以进行组合以得到第三编码字段,类似地,一个或多个第三编码字段可以进行组合或一个或多个第三编码字段与第一编码字段和/或第二编码字段可以进行组合,以得到更高阶的编码字段。在本公开的实施例中,低阶的特征编码可以进行组合以得到高阶的特征编码,从而实现更高效且更长时间的预测。For example, one or more second encoding fields can also be combined to obtain a third encoding field, or one or more second encoding fields and one or more first encoding fields can be combined to obtain a third encoding field, similarly Alternatively, one or more third coding fields may be combined or one or more third coding fields may be combined with the first coding field and/or the second coding field to obtain a higher order coding field. In embodiments of the present disclosure, low-order feature codes can be combined to obtain high-order feature codes, thereby achieving more efficient and longer predictions.
例如,第二音频特征编码包括至少一个第一编码字段和/或至少一个第二编码字段。例如,在一些实施例中,第二音频特征编码可以包括完整的一个或多个第二编码字段,或者,第二音频特征编码可以包括一个第二编码字段中的部分第一编码字段。For example, the second audio feature encoding includes at least one first encoding field and/or at least one second encoding field. For example, in some embodiments, the second audio feature encoding may include one or more complete second encoding fields, or the second audio feature encoding may include part of the first encoding field in one second encoding field.
需要说明的是,当查找表中包括第三编码字段时,第二音频特征编码可以包括至少一个第一编码字段和/或至少一个第二编码字段和/或至少一个第三编码字段。It should be noted that when the lookup table includes a third encoding field, the second audio feature encoding may include at least one first encoding field and/or at least one second encoding field and/or at least one third encoding field.
例如,在一实施例中,查找表包括第二编码字段W1、第二编码字段W2和第二编码字段W3,且W1={11,00,00,00,00,11,01,01,01,01,01,01,11,00,00,00,00,00,00,00,00,01,01,01,01,01,01,01,01,01,01,01,01,11,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,….},W2={11,01,00,00,01,01,01,01,01,01,01,….},W3={11,00,01,00,00,01,01,01,11,00,00,00,01,01,01,01,01,01,01,01,01,….}。For example, in one embodiment, the lookup table includes the second encoding field W1, the second encoding field W2, and the second encoding field W3, and W1={11,00,00,00,00,11,01,01,01 ,01,01,01,11,00,00,00,00,00,00,00,00,01,01,01,01,01,01,01,01,01,01,01,01,11 ,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,….}, W2={11,01,00,00,01, 01,01,01,01,01,01,….}, W3={11,00,01,00,00,01,01,01,11,00,00,00,01,01,01,01 ,01,01,01,01,01,….}.
在一个实施例中,如图5B所示,从时刻t31开始,音频采集装置持续采集第一音频信号,当音频采集装置采集到的第一音频信号对应的第一个特征编码字段表示为{11},对应于波形段30,则基于查找表进行查询,以确定查找表中是否存在某个编码字段(包括第一编码字段和第二编码字段)包括{11},在上述示例中,查询到查找表中的第二编码字段W1、第二编码字段W2和第二编码字段W3均包括{11},此时,第二编码字段W1、第二编码字段W2和第二编码字段W3均作为待输出编码字段列表中的待输出编码字段。In one embodiment, as shown in Figure 5B, starting from time t31, the audio collection device continues to collect the first audio signal. When the first feature encoding field corresponding to the first audio signal collected by the audio collection device is expressed as {11 }, corresponding to waveform segment 30, a query is performed based on the lookup table to determine whether there is a certain coding field (including the first coding field and the second coding field) in the lookup table, including {11}. In the above example, the query The second encoding field W1, the second encoding field W2, and the second encoding field W3 in the lookup table all include {11}. At this time, the second encoding field W1, the second encoding field W2, and the second encoding field W3 are all used as to-be-coded fields. The encoding fields to be output in the output encoding field list.
然后,如图5B所示,当音频采集装置采集到的第一音频信号对应的第二个特征编码字段表示为{00},对应于波形段31中的第一个单位时间段,继续对查找表进行查询(此时可以仅对待输出编码字段列中的待输出编码字段进行 查询,从而可以节省查询时间,然而,也可以对整个查找表进行查询),以确定查找表中是否存在某个编码字段包括{11,00},在上述示例中,查询到查找表中的第二编码字段W1和第二编码字段W3均包括{11,00},由于第二编码字段W2包括{11,01},而不包括{11,00},从而不满足音频采集装置采集到的第一音频信号的特征,因此,可以将第二编码字段W2从待输出编码字段列表中删除,此时,第二编码字段W1和第二编码字段W3作为待输出编码字段列表中的待输出编码字段。Then, as shown in Figure 5B, when the second feature encoding field corresponding to the first audio signal collected by the audio collection device is represented as {00}, corresponding to the first unit time period in the waveform segment 31, continue the search. Query the table (at this time, you can only query the coding field to be output in the coding field column to be output, which can save query time. However, you can also query the entire lookup table) to determine whether a certain encoding exists in the lookup table. The field includes {11,00}. In the above example, it is found that the second encoding field W1 and the second encoding field W3 in the lookup table both include {11,00}, because the second encoding field W2 includes {11,01}. , and does not include {11,00}, thus not meeting the characteristics of the first audio signal collected by the audio collection device. Therefore, the second encoding field W2 can be deleted from the list of encoding fields to be output. At this time, the second encoding field W2 Field W1 and the second encoding field W3 serve as the encoding fields to be output in the encoding field list to be output.
然后,当音频采集装置采集到的第一音频信号对应的第三个特征编码字段表示为{00},对应于波形段31中的第二个单位时间段,继续对查找表进行查询,以确定查找表中是否存在某个编码字段包括{11,00,00},在上述示例中,查询到查找表中的第二编码字段W1包括{11,00,00}。那么,可以预测接下来的音频信号应该就是第二编码字段W1这个模式。对于第二编码字段W1中的前三个编码字段{11,00,00},由于其在时间上,其对应的音频信号已经过去,从而可以输出从第二编码字段W1中的第四个字段(即{00})开始的所有后续编码字段作为预测得到的第二音频编码特征,此时,第二音频特征编码表示为{00,00,11,01,01,01,01,01,01,11,00,00,00,00,00,00,00,00,01,01,01,01,01,01,01,01,01,01,01,01,11,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,…….}。Then, when the third feature encoding field corresponding to the first audio signal collected by the audio collection device is represented as {00}, corresponding to the second unit time period in the waveform segment 31, continue to query the lookup table to determine Check whether there is a certain encoding field in the lookup table that includes {11,00,00}. In the above example, the second encoding field W1 in the lookup table is queried and includes {11,00,00}. Then, it can be predicted that the next audio signal should be the pattern of the second encoding field W1. For the first three coding fields {11,00,00} in the second coding field W1, since their corresponding audio signals have passed in time, the fourth field in the second coding field W1 can be output (ie {00}) is used as the predicted second audio coding feature. At this time, the second audio feature coding is expressed as {00,00,11,01,01,01,01,01,01 ,11,00,00,00,00,00,00,00,00,01,01,01,01,01,01,01,01,01,01,01,01,11,00,00,00 ,00,00,00,00,00,00,00,00,00,00,00,00,00,…….}.
需要说明的是,在实际应用中,当匹配多少个特征编码字段才确定第二音频特征编码可以根据实际应用场景、设计需求等因素调整,例如,在上述示例中,当匹配3个(在实际应用中,可以匹配10、20、50个等)特征编码字段,则可以确定第二音频特征编码。It should be noted that in actual applications, how many feature coding fields are matched before determining the second audio feature coding can be adjusted according to actual application scenarios, design requirements and other factors. For example, in the above example, when 3 matching fields (in actual In the application, if 10, 20, 50, etc.) feature coding fields can be matched, the second audio feature coding can be determined.
例如,在上述示例中,第一音频信号对应的第一音频特征编码包括3个特征编码字段,且表示为{11,00,00},如图5B所示,第一音频信号对应的时间段为时刻t31至时刻t32。当考虑到系统处理信号的时间等因素,实际上系统需要在时刻t33才能输出第二音频信号,时刻t33晚于时刻t32,此时,第二音频特征编码中的前两个特征编码字段{00,00}对应的时间段(即时刻t32至时刻t33之间的时间段)已经过去,从而实际上预测得到的第四音频信号对应的音频特征编码表示为{11,01,01,01,01,01,01,11,00,00,00,00,00,00,00,00,01,01,01,01,01,01,01,01,01,01,01,01,11,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,….}。For example, in the above example, the first audio feature code corresponding to the first audio signal includes 3 feature code fields and is represented as {11,00,00}. As shown in Figure 5B, the time period corresponding to the first audio signal It is from time t31 to time t32. When considering factors such as the system's signal processing time, the system actually needs to output the second audio signal at time t33, which is later than time t32. At this time, the first two feature coding fields in the second audio feature coding {00 The time period corresponding to ,00} (that is, the time period between time t32 and time t33) has passed, so the audio feature encoding corresponding to the predicted fourth audio signal is actually expressed as {11,01,01,01,01 ,01,01,11,00,00,00,00,00,00,00,00,01,01,01,01,01,01,01,01,01,01,01,01,11,00 ,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,…}.
例如,若第三音频信号和第四音频信号完全相同,则第三音频信号对应的 音频特征编码也表示为{11,01,01,01,01,01,01,11,00,00,00,00,00,00,00,00,01,01,01,01,01,01,01,01,01,01,01,01,11,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,….}。For example, if the third audio signal and the fourth audio signal are exactly the same, the audio feature code corresponding to the third audio signal is also expressed as {11,01,01,01,01,01,01,11,00,00,00 ,00,00,00,00,00,01,01,01,01,01,01,01,01,01,01,01,01,11,00,00,00,00,00,00,00 ,00,00,00,00,00,00,00,00,00,…}.
例如,第二音频信号为对第四音频信号进行反相处理得到的信号,即第二音频信号可以为{11,01,01,01,01,01,01,11,00,00,00,00,00,00,00,00,01,01,01,01,01,01,01,01,01,01,01,01,11,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,….}这个模式的反相音频信号。For example, the second audio signal is a signal obtained by inverting the fourth audio signal, that is, the second audio signal can be {11,01,01,01,01,01,01,11,00,00,00, 00,00,00,00,00,01,01,01,01,01,01,01,01,01,01,01,01,11,00,00,00,00,00,00,00, 00,00,00,00,00,00,00,00,00,….} The inverted audio signal of this pattern.
例如,在一些实施例中,第二音频信号的时间长度、第三音频信号的时间长度和第四音频信号的时间长度是大致相同的,例如,完全相同。For example, in some embodiments, the duration of the second audio signal, the duration of the third audio signal, and the duration of the fourth audio signal are substantially the same, eg, identical.
例如,在一些实施例中,可以针对查找表中的至少部分第一编码字段和/或第二编码字段设置前导特征编码字段,例如,可以为第二编码字段W1设置前导特征编码{11,00,00},当检测到该前导特征编码字段,则将第二编码字段W1输出作为第二音频特征编码。在此情况下,当检测到第一音频信号对应的第一音频特征编码为{11,00,00},该第一音频信号对应的第一音频特征编码与前导特征编码字段{11,00,00}匹配,从而可以将第二编码字段W1输出作为第二音频特征编码。For example, in some embodiments, the leading feature coding field may be set for at least part of the first coding field and/or the second coding field in the lookup table. For example, the leading feature coding field may be set for the second coding field W1 {11,00 ,00}, when the leading feature coding field is detected, the second coding field W1 is output as the second audio feature coding. In this case, when it is detected that the first audio feature code corresponding to the first audio signal is {11,00,00}, the first audio feature code corresponding to the first audio signal and the preamble feature code field {11,00, 00} matching, so that the second encoding field W1 can be output as the second audio feature encoding.
又例如,可以为第二编码字段W1设置前导特征编码字段{11,00,00,01,01},当检测到该前导特征编码字段中的部分字段,则将第二编码字段W1和该前导特征编码字段中的剩余字段输出作为第二音频特征编码,在此情况下,当检测到第一音频信号对应的第一音频特征编码为{11,00,00},该第一音频信号对应的第一音频特征编码与前导特征编码字段中的前三个字段{11,00,00}匹配,从而可以将前导特征编码字段中的剩余字段{01,01}和第二编码字段W1输出作为第二音频特征编码。此时,第二音频特征编码中的前两个特征编码字段{01,01}(即前导特征编码字段中的剩余字段)对应的时间可以为系统处理信号的时间,从而实际上预测得到的第四音频信号对应的音频特征编码可以为完整的第二编码字段W1。For another example, the leading feature coding field {11,00,00,01,01} can be set for the second coding field W1. When some fields in the leading feature coding field are detected, the second coding field W1 and the leading feature coding field are The remaining fields in the feature encoding field are output as the second audio feature encoding. In this case, when it is detected that the first audio feature encoding corresponding to the first audio signal is {11,00,00}, the first audio signal corresponding The first audio feature encoding matches the first three fields {11,00,00} in the leading feature encoding field, so that the remaining fields {01,01} and the second encoding field W1 in the leading feature encoding field can be output as the third 2. Audio feature encoding. At this time, the time corresponding to the first two feature coding fields {01,01} in the second audio feature coding (i.e., the remaining fields in the leading feature coding field) can be the time for the system to process the signal, so that the predicted first The audio feature encoding corresponding to the four audio signals may be the complete second encoding field W1.
需要说明的是,前导特征编码字段的长度可以根据实际情况调整,本公开对此不作限制。It should be noted that the length of the leading feature encoding field can be adjusted according to actual conditions, and this disclosure does not limit this.
值得注意的是,对于查找表而言,当用于存储查找表的存储器足够大,查找表存储的内容够丰富(即查找表中的编码字段的组合够多),则可消除用户 想要消除的所有类型的音频信号。而对于神经网络而言,当用于训练神经网络的样本足够丰富,样本的类型足够丰富,则也可以基于神经网络预测得到用户想要消除的任何类型的音频信号。It is worth noting that for look-up tables, when the memory used to store the look-up table is large enough and the content stored in the look-up table is rich enough (that is, there are enough combinations of encoding fields in the look-up table), the user's desire to eliminate all types of audio signals. For neural networks, when the samples used to train the neural network are rich enough and the types of samples are rich enough, any type of audio signal that the user wants to eliminate can be predicted based on the neural network.
例如,查找表可以以表格等形式存储在存储器中,本公开的实施例对查找表的具体形式不作限制。For example, the lookup table may be stored in the memory in the form of a table, etc. The embodiments of the present disclosure do not limit the specific form of the lookup table.
例如,通过查找表的方式可以实现神经网络中的预测。For example, predictions in neural networks can be achieved by looking up tables.
例如,第二音频信号和/或第三音频信号和/或第四音频信号是周期性的或间歇性的时域信号,第二音频信号和/或第三音频信号和/或第四音频信号的信号特征是周期性或间歇性的时域振幅变化,即第二音频信号和/或第三音频信号和/或第四音频信号具有连续重复、间歇重复的特质,具有固定的模式。对于间歇性的音频信号,由于在该间歇性的音频信号的停歇期间不存在音频信号,因此在停歇期间没有频谱特征可供提取,而停歇期间却可以成为该间歇性的音频信号的时域特征之一。For example, the second audio signal and/or the third audio signal and/or the fourth audio signal are periodic or intermittent time domain signals, and the second audio signal and/or the third audio signal and/or the fourth audio signal The signal characteristics are periodic or intermittent time domain amplitude changes, that is, the second audio signal and/or the third audio signal and/or the fourth audio signal have the characteristics of continuous repetition or intermittence repetition, and have a fixed pattern. For intermittent audio signals, since there is no audio signal during the pause period of the intermittent audio signal, there is no spectral feature to be extracted during the pause period, but the pause period can become the time domain feature of the intermittent audio signal. one.
例如,在一些实施例中,步骤S101可以包括:采集初始音频信号;对初始音频信号进行下采样处理(downsampling)以得到第一音频信号。For example, in some embodiments, step S101 may include: collecting an initial audio signal; performing downsampling on the initial audio signal to obtain a first audio signal.
由于音频采集装置采集得到的初始音频信号的采样率(sample rate)较高,不利于后端的音频信号处理装置(例如,人工智能引擎(AI(Artificial Intelligence)Engine)、数字信号处理器(Digital Signal Processing,简称DSP)等)的处理,因此,可以对初始音频信号进行下采样处理以实现降频,便于音频信号处理装置处理,例如可以降频至48K赫兹甚至更低。Since the sampling rate of the initial audio signal collected by the audio acquisition device is high, it is not conducive to the back-end audio signal processing device (for example, artificial intelligence engine (AI (Artificial Intelligence) Engine), digital signal processor (Digital Signal) Processing (DSP for short), etc.), therefore, the initial audio signal can be down-sampled to achieve frequency reduction, which is convenient for processing by the audio signal processing device. For example, the frequency can be reduced to 48K Hz or even lower.
例如,在另一些实施例中,步骤S101可以包括:采集初始音频信号;对初始音频信号进行滤波处理以得到第一音频信号。For example, in other embodiments, step S101 may include: collecting an initial audio signal; and filtering the initial audio signal to obtain a first audio signal.
在一些应用场景下,太安静并不安全,因此,还可以通过带宽控制器(Bandwidth controller)进行滤波处理,以针对特定频率范围内的音频信号进行抑制。针对连续性及间歇性的音频信号(例如,敲击或滴水噪音等),将第一音频信号的有效频宽设定在该需要被抑制的音频信号对应的频率范围,例如,1K~6K赫兹,从而确保使用者还能听到较为重要的声音,例如,当应用在汽车领域时,必须确保驾驶员能够听到喇叭声等,以提升驾驶安全性。In some application scenarios, being too quiet is not safe. Therefore, filtering can also be performed through a bandwidth controller (Bandwidth controller) to suppress audio signals within a specific frequency range. For continuous and intermittent audio signals (for example, knocking or dripping noise, etc.), the effective bandwidth of the first audio signal is set to the frequency range corresponding to the audio signal that needs to be suppressed, for example, 1K ~ 6K Hz , thereby ensuring that users can still hear more important sounds. For example, when used in the automotive field, it must be ensured that the driver can hear the horn, etc. to improve driving safety.
例如,在一些实施例中,滤波处理和下采样处理还可以结合使用,本公开对滤波处理和下采样处理的处理顺序不作限制。例如,在一些实施例中,获取第一音频信号可以包括:采集初始音频信号;对初始音频信号进行滤波处理以 得到预定频率范围内的音频信号;对在预定频率范围内的音频信号进行下采样处理以得到第一音频信号;或者,获取第一音频信号可以包括:采集初始音频信号;对初始音频信号进行下采样处理;对下采样处理后的音频信号进行滤波处理以得到第一音频信号。For example, in some embodiments, filtering processing and downsampling processing can also be used in combination, and the present disclosure does not limit the processing order of filtering processing and downsampling processing. For example, in some embodiments, obtaining the first audio signal may include: collecting an initial audio signal; filtering the initial audio signal to obtain an audio signal within a predetermined frequency range; and downsampling the audio signal within the predetermined frequency range. Processing to obtain the first audio signal; alternatively, obtaining the first audio signal may include: collecting an initial audio signal; performing downsampling processing on the initial audio signal; and performing filtering processing on the downsampled audio signal to obtain the first audio signal.
例如,控制指令可以包括第二音频信号输出的时刻、第四音频信号和指示对第四音频信号进行反相的控制信号等。For example, the control instruction may include the time at which the second audio signal is output, the fourth audio signal, a control signal instructing to invert the fourth audio signal, and the like.
例如,在一些实施例中,步骤S11可以包括:基于控制指令,确定第四音频信号和指示对第四音频信号进行反相的控制信号;基于该控制信号,对该第四音频信号进行反相处理,以生成第二音频信号。For example, in some embodiments, step S11 may include: based on the control instruction, determining a fourth audio signal and a control signal indicating inverting the fourth audio signal; based on the control signal, inverting the fourth audio signal Processed to generate a second audio signal.
例如,在一些实施例中,步骤S12可以包括:基于控制指令,确定输出第二音频信号的第一时刻;在第一时刻输出第二音频信号。For example, in some embodiments, step S12 may include: determining a first moment to output the second audio signal based on the control instruction; and outputting the second audio signal at the first moment.
例如,第三音频信号从第二时刻开始出现,第一时刻和第二时刻之间的时间差的绝对值小于时间阈值。需要说明的是,时间阈值可以根据实际情况具体设置,本公开对此不作限制,时间阈值越小,则消音效果越好。For example, the third audio signal starts to appear from the second moment, and the absolute value of the time difference between the first moment and the second moment is less than the time threshold. It should be noted that the time threshold can be specifically set according to the actual situation, and this disclosure does not limit this. The smaller the time threshold, the better the silencing effect.
例如,在一些实施例中,第一时刻和第二时刻之间的时间差为0,即第二音频信号的开始输出的时刻和第三音频信号开始出现的时刻相同,在图3所示的示例中,第二音频信号的开始输出的时刻和第三音频信号开始出现的时刻均为时刻t21。For example, in some embodiments, the time difference between the first moment and the second moment is 0, that is, the moment when the second audio signal starts to be output and the moment when the third audio signal starts to appear are the same. In the example shown in Figure 3 , the time when the second audio signal starts to be output and the time when the third audio signal starts to appear are both time t21.
例如,第一时刻和第二时刻之间的时间差可以根据实际情况设置,例如,可以设置第一时刻和第二时刻以保证第二音频信号和第三音频信号同时被传输至目标对象,从而避免音频信号的传输而导致第二音频信号和第三音频信号不同步的问题,进一步提升消音效果。例如,目标对象可以为人的耳朵、麦克风等。For example, the time difference between the first moment and the second moment can be set according to the actual situation. For example, the first moment and the second moment can be set to ensure that the second audio signal and the third audio signal are transmitted to the target object at the same time, thereby avoiding The transmission of audio signals causes the second audio signal and the third audio signal to be out of sync, further improving the noise canceling effect. For example, the target object can be a human ear, a microphone, etc.
例如,第二音频信号可以通过扬声器等可以将电信号转换为声音信号进行输出的装置进行输出。For example, the second audio signal can be output through a device such as a speaker that can convert an electrical signal into a sound signal for output.
需要说明的是,当音频采集装置没有采集到音频信号,则可以不执行本公开提供的音频处理方法,直到音频采集装置采集到音频信号为止,从而可以节省功耗。It should be noted that when the audio collection device does not collect the audio signal, the audio processing method provided by the present disclosure may not be executed until the audio collection device collects the audio signal, thereby saving power consumption.
在本公开的实施例中,音频处理方法可以将环境音频信号中的周期性的音频信号(例如,噪声)降低或消除,例如,在图书馆这样的应用场景中,消除旁边建筑工地施工的声音等。这类的场景不需要特别知道想留下来的音频信号, 单纯的降低需要消除的环境中的目标待消音声音,而这些目标待消音声音通常具有连续重复、间歇重复的特质,因此可以通过预测方式预测得到。需要说明的是,“目标待消音声音”可以根据实际情况确定,例如,对于图书馆这样的应用场景,当图书馆周围具有建筑工地时,外界环境音频信号可以包括两种音频信号,第一种音频信号可以为工地钻地声,第二种音频信号可以为周围人的讨论声。通常,工地钻地声具有周期性的特点,且通常具有固定的模式,而讨论声大概率不具固定模式,也不具有周期性的特点,此时,目标待消音声音则为工地钻地声,通过本公开的实施例提供的音频处理方法,则可以实现对工地钻地声的预测,从而消除或降低工地钻地声。In embodiments of the present disclosure, the audio processing method can reduce or eliminate periodic audio signals (for example, noise) in environmental audio signals. For example, in application scenarios such as libraries, the sound of construction at a nearby construction site can be eliminated. wait. This type of scenario does not require special knowledge of the audio signals that you want to keep. It simply reduces the target sounds to be silenced in the environment that need to be eliminated. These target sounds to be silenced usually have the characteristics of continuous repetition or intermittence repetition, so they can be predicted through prediction. Predicted. It should be noted that the "target sound to be silenced" can be determined according to the actual situation. For example, for an application scenario such as a library, when there is a construction site around the library, the external environment audio signal can include two audio signals. The first The audio signal can be the sound of drilling at the construction site, and the second audio signal can be the sound of discussions by people around you. Usually, the sound of construction site drilling has periodic characteristics and usually has a fixed pattern. However, the discussion sound most likely does not have a fixed pattern and does not have periodic characteristics. At this time, the target sound to be silenced is the construction site drilling sound. Through the audio processing method provided by the embodiments of the present disclosure, it is possible to predict the drilling sound at the construction site, thereby eliminating or reducing the drilling sound at the construction site.
本公开的实施例提供的音频处理方法可以应用于汽车驾驶头枕,从而在驾驶员的耳朵附近创造静音区,避免外界非必要的音频信号(例如,发动机噪音、路噪、风噪和胎噪等汽车行驶过程中的噪声信号)对驾驶员产生干扰。又例如,该音频处理方法还可以应用于吹风机、排油烟机、吸尘器、非变频式空调等设备中,以降低这些设备发出的运转声音,使得用户可以待在吵杂的环境,而不受到周围环境噪声的影响。该音频处理方法还可以应用于耳机等,以降低或消除外界声音,使得用户可以更好地接收耳机发出的声音(音乐声或通话声等)。The audio processing method provided by embodiments of the present disclosure can be applied to automobile driving headrests to create a silent zone near the driver's ears to avoid unnecessary external audio signals (such as engine noise, road noise, wind noise, and tire noise). Noise signals while the car is driving) interfere with the driver. For another example, this audio processing method can also be applied to hair dryers, range hoods, vacuum cleaners, non-inverter air conditioners and other equipment to reduce the operating sound emitted by these equipment, allowing users to stay in noisy environments without being affected by the surrounding environment. The impact of environmental noise. This audio processing method can also be applied to headphones, etc., to reduce or eliminate external sounds, so that users can better receive the sounds from the headphones (music or phone calls, etc.).
本公开至少一个实施例还提供一种音频处理装置。图6为本公开至少一个实施例提供的一种音频处理装置的示意性框图。At least one embodiment of the present disclosure also provides an audio processing device. Figure 6 is a schematic block diagram of an audio processing device provided by at least one embodiment of the present disclosure.
如图6所示,音频处理装置600包括指令生成模块601、音频生成模块602和输出模块603。图6所示的音频处理装置600的组件和结构只是示例性的,而非限制性的,根据需要,该音频处理装置600还可以包括其他组件和结构。As shown in FIG. 6 , the audio processing device 600 includes an instruction generation module 601 , an audio generation module 602 and an output module 603 . The components and structures of the audio processing device 600 shown in FIG. 6 are only exemplary and not restrictive. The audio processing device 600 may also include other components and structures as needed.
指令生成模块601被配置为基于第一音频信号,生成控制指令。指令生成模块601用于执行图2A所示的步骤S10。The instruction generation module 601 is configured to generate a control instruction based on the first audio signal. The instruction generation module 601 is used to execute step S10 shown in Figure 2A.
音频生成模块602被配置为基于控制指令,生成第二音频信号。音频生成模块602用于执行图2A所示的步骤S11。The audio generation module 602 is configured to generate a second audio signal based on the control instruction. The audio generation module 602 is used to perform step S11 shown in Figure 2A.
输出模块603被配置为输出第二音频信号,以抑制第三音频信号。输出模块603用于执行图2A所示的步骤S12。The output module 603 is configured to output the second audio signal to suppress the third audio signal. The output module 603 is used to perform step S12 shown in Figure 2A.
关于指令生成模块601所实现的功能的具体说明可以参考上述音频处理方法的实施例中的图2A所示的步骤S10的相关描述,关于音频生成模块602所实现的功能的具体说明可以参考上述音频处理方法的实施例中的图2A所示的步骤S11的相关描述,关于输出模块603所实现的功能的具体说明可以参考上 述音频处理方法的实施例中的图2A所示的步骤S12的相关描述。音频处理装置可以实现与前述音频处理方法相似或相同的技术效果,在此不再赘述。For a specific description of the functions implemented by the instruction generation module 601, please refer to the relevant description of step S10 shown in FIG. 2A in the embodiment of the above audio processing method. For a specific description of the functions implemented by the audio generation module 602, please refer to the above audio For the relevant description of step S11 shown in FIG. 2A in the embodiment of the processing method, for a specific description of the functions implemented by the output module 603, please refer to the relevant description of step S12 shown in FIG. 2A in the embodiment of the audio processing method. . The audio processing device can achieve similar or identical technical effects to the foregoing audio processing method, which will not be described again here.
例如,第一音频信号出现的时间早于第三音频信号出现的时间。For example, the first audio signal appears earlier than the third audio signal.
例如,第二音频信号的相位与第三音频信号的相位之和小于相位阈值,在一些实施例中,第二音频信号的相位与第三音频信号的相位相反,从而可以完全抑制第三音频信号。For example, the sum of the phases of the second audio signal and the third audio signal is less than the phase threshold. In some embodiments, the phase of the second audio signal is opposite to the phase of the third audio signal, so that the third audio signal can be completely suppressed. .
例如,在一些实施例中,指令生成模块601可以包括音频获取子模块、预测子模块和生成子模块。音频获取子模块被配置为获取第一音频信号;预测子模块被配置为对第一音频信号进行处理以预测得到第四音频信号;生成子模块被配置为基于第四音频信号,生成控制指令。For example, in some embodiments, the instruction generation module 601 may include an audio acquisition sub-module, a prediction sub-module and a generation sub-module. The audio acquisition sub-module is configured to acquire the first audio signal; the prediction sub-module is configured to process the first audio signal to predict a fourth audio signal; the generation sub-module is configured to generate a control instruction based on the fourth audio signal.
例如,第二音频信号和/或第三音频信号和/或第四音频信号是周期性的或间歇性的时域信号。For example, the second audio signal and/or the third audio signal and/or the fourth audio signal are periodic or intermittent time domain signals.
例如,第三音频信号和第四音频信号可以完全相同。For example, the third audio signal and the fourth audio signal may be exactly the same.
例如,在一些实施例中,预测子模块可以基于神经网络对第一音频信号进行处理以预测得到第四音频信号。例如,预测子模块可以包括图1所示的音频处理部分中的AI引擎和/或数字信号处理器等,AI引擎可以包括神经网络,例如,AI引擎可以包括循环神经网络、长短时记忆网络或生成对抗网络等中的至少一个神经网络。For example, in some embodiments, the prediction sub-module may process the first audio signal based on a neural network to predict the fourth audio signal. For example, the prediction sub-module may include the AI engine and/or digital signal processor in the audio processing part shown in Figure 1. The AI engine may include a neural network. For example, the AI engine may include a recurrent neural network, a long short-term memory network, or At least one neural network among generative adversarial networks and the like.
例如,在一些实施中,预测子模块包括查询单元和预测单元。查询单元被配置为基于第一音频信号生成第一音频特征编码以及基于第一音频特征编码查询查找表,以得到第二音频特征编码。预测单元被配置为基于第二音频特征编码,预测得到第四音频信号。For example, in some implementations, the prediction sub-module includes a query unit and a prediction unit. The query unit is configured to generate a first audio feature code based on the first audio signal and query the lookup table based on the first audio feature code to obtain a second audio feature code. The prediction unit is configured to predict the fourth audio signal based on the second audio feature encoding.
例如,查询单元可以包括存储器以用于存储查找表。For example, the lookup unit may include memory for storing lookup tables.
例如,在一些实施例中,查找表可以包括至少一个第一编码字段。例如,在另一些实施例中,查找表还包括至少一个第二编码字段,多个第一编码字段组成一个第二编码字段。关于查找表的具体内容可以参考上述音频处理方法的实施例中的相关描述,重复之处不再赘述。For example, in some embodiments, the lookup table may include at least one first encoding field. For example, in other embodiments, the lookup table further includes at least one second encoding field, and multiple first encoding fields constitute one second encoding field. Regarding the specific content of the lookup table, reference may be made to the relevant descriptions in the embodiments of the audio processing method described above, and repeated details will not be described again.
例如,第二音频特征编码包括至少一个第一编码字段和/或至少一个第二编码字段。For example, the second audio feature encoding includes at least one first encoding field and/or at least one second encoding field.
例如,在一些实施例中,音频获取子模块包括采集单元和下采样处理单元。采集单元被配置为采集初始音频信号;下采样处理单元被配置为对初始音频信 号进行下采样处理以得到第一音频信号。For example, in some embodiments, the audio acquisition sub-module includes an acquisition unit and a downsampling processing unit. The acquisition unit is configured to collect the initial audio signal; the down-sampling processing unit is configured to perform down-sampling processing on the initial audio signal to obtain the first audio signal.
例如,在一些实施例中,音频获取子模块包括采集单元和滤波单元,采集单元被配置为采集初始音频信号;滤波单元被配置为对初始音频信号进行滤波处理以得到第一音频信号。For example, in some embodiments, the audio acquisition sub-module includes an acquisition unit and a filtering unit. The acquisition unit is configured to acquire an initial audio signal; and the filtering unit is configured to filter the initial audio signal to obtain a first audio signal.
例如,音频获取子模块可以实现为图1所示的音频接收部分。例如,采集单元可以包括音频采集装置,例如,图1所示的音频接收部分中的麦克风等。例如,采集单元还可以包括放大器、模数转换器等。For example, the audio acquisition sub-module can be implemented as the audio receiving part shown in Figure 1. For example, the collection unit may include an audio collection device, such as a microphone in the audio receiving part shown in FIG. 1 , or the like. For example, the acquisition unit may also include an amplifier, an analog-to-digital converter, etc.
例如,在一些实施例中,输出模块603可以包括时刻确定子模块和输出子模块。时刻确定子模块被配置为基于控制指令,确定输出第二音频信号的第一时刻;输出子模块被配置为在第一时刻输出第二音频信号。For example, in some embodiments, the output module 603 may include a moment determination sub-module and an output sub-module. The time determination sub-module is configured to determine a first time to output the second audio signal based on the control instruction; the output sub-module is configured to output the second audio signal at the first time.
例如,输出模块603可以实现为图1所示的音频输出部分。For example, the output module 603 may be implemented as the audio output part shown in FIG. 1 .
例如,第三音频信号从第二时刻开始出现,第一时刻和第二时刻之间的时间差的绝对值小于时间阈值。For example, the third audio signal starts to appear from the second moment, and the absolute value of the time difference between the first moment and the second moment is less than the time threshold.
例如,第一时刻和所述第二时刻之间的时间差可以为0。For example, the time difference between the first time and the second time may be zero.
例如,输出子模块可以包括扬声器等音频输出装置。例如,输出子模块还可以包括数模转换器等。For example, the output sub-module may include audio output devices such as speakers. For example, the output sub-module may also include a digital-to-analog converter, etc.
例如,指令生成模块601、音频生成模块602和/或输出模块603可以为硬件、软件、固件以及它们的任意可行的组合。例如,指令生成模块601、音频生成模块602和/或输出模块603可以为专用或通用的电路、芯片或装置等,也可以为处理器和存储器的结合。本公开的实施例不对上述各个模块、子模块和单元的具体实现形式进行限制。For example, the instruction generation module 601, the audio generation module 602, and/or the output module 603 may be hardware, software, firmware, or any feasible combination thereof. For example, the instruction generation module 601, the audio generation module 602 and/or the output module 603 can be a dedicated or general-purpose circuit, chip or device, or a combination of a processor and a memory. The embodiments of the present disclosure do not limit the specific implementation forms of each of the above modules, sub-modules and units.
本公开至少一个实施例还提供一种音频处理装置,图7为本公开至少一个实施例提供的另一种音频处理装置的示意性框图。At least one embodiment of the present disclosure also provides an audio processing device. FIG. 7 is a schematic block diagram of another audio processing device provided by at least one embodiment of the present disclosure.
例如,如图7所示,音频处理装置700包括一个或多个存储器701和一个或多个处理器702。一个或多个存储器701被配置为非瞬时性地存储有计算机可执行指令;一个或多个处理器702配置为运行计算机可执行指令。计算机可执行指令被一个或多个处理器702运行时实现根据上述任一实施例所述的音频处理方法。关于该音频处理方法的各个步骤的具体实现以及相关解释内容可以参见上述音频处理方法的实施例的描述,在此不做赘述。For example, as shown in FIG. 7 , the audio processing device 700 includes one or more memories 701 and one or more processors 702 . One or more memories 701 are configured to store non-transitory computer-executable instructions; one or more processors 702 are configured to execute the computer-executable instructions. The computer-executable instructions, when executed by one or more processors 702, implement the audio processing method according to any of the above embodiments. For the specific implementation and related explanations of each step of the audio processing method, please refer to the description of the above embodiments of the audio processing method, and will not be described again here.
例如,在一些实施例中,音频处理装置700还可以包括通信接口和通信总线。存储器701、处理器702和通信接口可以通过通信总线实现相互通信,存 储器701、处理器6702和通信接口等组件之间也可以通过网络连接进行通信。本公开对网络的类型和功能在此不作限制。For example, in some embodiments, the audio processing device 700 may further include a communication interface and a communication bus. The memory 701, the processor 702 and the communication interface can communicate with each other through the communication bus, and the memory 701, the processor 6702 and the communication interface and other components can also communicate through a network connection. This disclosure does not limit the type and function of the network.
例如,通信总线可以是外设部件互连标准(PCI)总线或扩展工业标准结构(EISA)总线等。该通信总线可以分为地址总线、数据总线、控制总线等。For example, the communication bus may be a Peripheral Component Interconnect Standard (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, or the like. The communication bus can be divided into address bus, data bus, control bus, etc.
例如,通信接口用于实现音频处理装置700与其他设备之间的通信。通信接口可以为通用串行总线(Universal Serial Bus,USB)接口等。For example, the communication interface is used to implement communication between the audio processing device 700 and other devices. The communication interface may be a Universal Serial Bus (USB) interface, etc.
例如,处理器702和存储器701可以设置在服务器端(或云端)。For example, the processor 702 and the memory 701 can be provided on the server side (or cloud).
例如,处理器702可以控制音频处理装置700中的其它组件以执行期望的功能。处理器702可以是中央处理器(CPU)、网络处理器(NP)等;还可以是数字信号处理器(DSP)、专用集成电路(ASIC)、现场可编程门阵列(FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件。中央处理元(CPU)可以为X86或ARM架构等。For example, processor 702 may control other components in audio processing device 700 to perform desired functions. The processor 702 may be a central processing unit (CPU), a network processor (NP), etc.; it may also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable Logic devices, discrete gate or transistor logic devices, discrete hardware components. The central processing unit (CPU) can be X86 or ARM architecture, etc.
例如,存储器701可以包括一个或多个计算机程序产品的任意组合,计算机程序产品可以包括各种形式的计算机可读存储介质,例如易失性存储器和/或非易失性存储器。易失性存储器例如可以包括随机存取存储器(RAM)和/或高速缓冲存储器(cache)等。非易失性存储器例如可以包括只读存储器(ROM)、硬盘、可擦除可编程只读存储器(EPROM)、便携式紧致盘只读存储器(CD-ROM)、USB存储器、闪存等。在所述计算机可读存储介质上可以存储一个或多个计算机可执行指令,处理器702可以运行所述计算机可执行指令,以实现音频处理装置700的各种功能。在存储介质中还可以存储各种应用程序和各种数据等。For example, memory 701 may include any combination of one or more computer program products, which may include various forms of computer-readable storage media, such as volatile memory and/or non-volatile memory. Volatile memory may include, for example, random access memory (RAM) and/or cache memory (cache), etc. Non-volatile memory may include, for example, read-only memory (ROM), hard disk, erasable programmable read-only memory (EPROM), portable compact disk read-only memory (CD-ROM), USB memory, flash memory, and the like. One or more computer-executable instructions may be stored on the computer-readable storage medium, and the processor 702 may execute the computer-executable instructions to implement various functions of the audio processing device 700 . Various applications and various data can also be stored in the storage medium.
例如,关于音频处理装置700执行音频处理的过程的详细说明可以参考音频处理方法的实施例中的相关描述,重复之处不再赘述。For example, for detailed description of the process of audio processing performed by the audio processing device 700, reference may be made to the relevant descriptions in the embodiments of the audio processing method, and repeated details will not be described again.
例如,在一些实施例中,音频处理装置700可以通过芯片、小型装置/设备等形式呈现。For example, in some embodiments, the audio processing device 700 may be embodied in the form of a chip, a small device/device, or the like.
图8为本公开至少一个实施例提供的一种非瞬时性计算机可读存储介质的示意图。例如,如图8所示,在非瞬时性计算机可读存储介质1000上可以非暂时性地存储一个或多个计算机可执行指令1001。例如,当计算机可执行指令1001由处理器执行时可以执行根据上文所述的音频处理方法中的一个或多个步骤。FIG. 8 is a schematic diagram of a non-transitory computer-readable storage medium provided by at least one embodiment of the present disclosure. For example, as shown in Figure 8, one or more computer-executable instructions 1001 may be non-transitory stored on a non-transitory computer-readable storage medium 1000. For example, one or more steps in the audio processing method described above may be performed when the computer-executable instructions 1001 are executed by a processor.
例如,该非瞬时性计算机可读存储介质1000可以应用于上述音频处理装置700中,例如,其可以包括音频处理装置700中的存储器701。For example, the non-transitory computer-readable storage medium 1000 can be applied in the above-mentioned audio processing device 700, and for example, it can include the memory 701 in the audio processing device 700.
关于非瞬时性计算机可读存储介质1000的说明可以参考图7所示的音频处理装置600的实施例中对于存储器701的描述,重复之处不再赘述。For description of the non-transitory computer-readable storage medium 1000, reference may be made to the description of the memory 701 in the embodiment of the audio processing device 600 shown in FIG. 7, and repeated descriptions will not be repeated.
本公开的至少一个实施例提供一种音频处理方法、音频处理装置和非瞬时性计算机可读存储介质,通过学习当前音频信号的特征,预测得到音频信号(即第四音频信号),据此预测得到的音频信号产生未来音频信号的反相音频信号以抑制未来音频信号,避免由于输入端和输出端之间的延迟导致的反相音频信号和需要抑制的音频信号不同步的问题,提升消音效果,可大幅降低或甚至消除输入端对输出端的延迟对消音的影响,抑制音频的效果比业界常用的落后式的主动消音系统的抑制音频的效果更好;由于第一音频信号为时域信号,第一音频信号不是特定频率的音频信号,从而本公开的实施例提供的音频处理方法不需要从音频信号中提取频谱特征来产生频谱图,由此可以简化音频信号的处理过程,节省处理时间;在查找表中,低阶的特征编码可以进行组合以得到高阶的特征编码,从而实现更高效且更长时间的预测;并且在该音频处理方法中,还可以通过带宽控制器进行滤波处理,从而实现针对特定频率范围内的音频信号进行抑制,确保使用者还能听到较为重要的声音,例如,当应用在汽车领域时,必须确保驾驶员能够听到喇叭声等,以提升驾驶安全性;此外,当没有采集到音频信号,则可以不执行本公开提供的音频处理方法,直到采集到音频信号为止,从而可以节省功耗。At least one embodiment of the present disclosure provides an audio processing method, an audio processing device and a non-transitory computer-readable storage medium. By learning the characteristics of the current audio signal, the audio signal (ie, the fourth audio signal) is predicted, and the audio signal is predicted based on the characteristics of the current audio signal. The obtained audio signal generates an inverted audio signal of the future audio signal to suppress the future audio signal, avoiding the problem of out-of-sync between the inverted audio signal and the audio signal that needs to be suppressed due to the delay between the input end and the output end, and improving the silencing effect. , can significantly reduce or even eliminate the impact of the input-to-output delay on noise reduction, and the audio suppression effect is better than that of the backward active noise reduction system commonly used in the industry; because the first audio signal is a time domain signal, The first audio signal is not an audio signal of a specific frequency, so the audio processing method provided by embodiments of the present disclosure does not need to extract spectral features from the audio signal to generate a spectrogram, thereby simplifying the audio signal processing process and saving processing time; In the lookup table, low-order feature codes can be combined to obtain high-order feature codes, thereby achieving more efficient and longer predictions; and in this audio processing method, filtering processing can also be performed through a bandwidth controller, This enables the suppression of audio signals within a specific frequency range to ensure that users can still hear more important sounds. For example, when used in the automotive field, it must be ensured that the driver can hear the horn, etc. to improve driving safety. ; In addition, when the audio signal is not collected, the audio processing method provided by the present disclosure may not be executed until the audio signal is collected, thereby saving power consumption.
本公开至少一个实施例提供一种模型训练方法。该模型训练方法包括:基于预测模型,对第一音频信号进行处理以生成第一控制指令;基于第一控制指令,生成与第一控制指令对应的音频信号作为第二音频信号;输出第二音频信号,以抑制第三音频信号,其中,第一音频信号出现的时间早于第三音频信号出现的时间;基于第二音频信号和第三音频信号,确定音频误差信号;响应于音频误差信号不满足误差条件,对预测模型进行调整,基于预测模型再次对第一音频信号进行处理,直到音频误差信号满足误差条件;响应于音频误差信号满足误差条件,保持预测模型不变。At least one embodiment of the present disclosure provides a model training method. The model training method includes: based on the prediction model, processing the first audio signal to generate a first control instruction; based on the first control instruction, generating an audio signal corresponding to the first control instruction as a second audio signal; outputting the second audio signal signal to suppress the third audio signal, wherein the first audio signal appears earlier than the third audio signal; determines the audio error signal based on the second audio signal and the third audio signal; in response to the audio error signal not When the error condition is met, the prediction model is adjusted, and the first audio signal is processed again based on the prediction model until the audio error signal meets the error condition; in response to the audio error signal meeting the error condition, the prediction model remains unchanged.
需要说明的是,在下述参照附图的模型训练方法描述中,“第一”、“第二”、“第三”等序数词的限定仅仅是为了区别同一实施例中的多个信号(例如,第一音频信号、第二音频信号、第三音频信号、第四音频信号),在本公开中,不同实施例中同一序数词限定的信号(例如,上述音频处理方法描述中的“第一音频信号”与模型训练方法中的“第一音频信号”)并不必定相同。It should be noted that in the following description of the model training method with reference to the accompanying drawings, the limitations of ordinal numbers such as “first”, “second”, and “third” are only to distinguish multiple signals in the same embodiment (for example, , the first audio signal, the second audio signal, the third audio signal, the fourth audio signal). In the present disclosure, signals defined by the same ordinal word in different embodiments (for example, the "first audio signal" in the description of the above audio processing method Audio signal" is not necessarily the same as the "first audio signal" in the model training method).
在本公开的实施例提供的模型训练方法中,利用当前音频信号(即,第一音频信号)和未来音频信号(即,第三音频信号)对预测模型进行实时训练,提升预测模型输出的预测结果的准确度,避免基于预测模型输出的预测结果无法实现对未来音频信号进行抑制的问题,提升基于预测模型进行消音的效果。In the model training method provided by the embodiment of the present disclosure, the current audio signal (ie, the first audio signal) and the future audio signal (ie, the third audio signal) are used to perform real-time training on the prediction model to improve the prediction of the prediction model output. The accuracy of the results avoids the problem that the prediction results based on the prediction model output cannot suppress future audio signals, and improves the effect of noise reduction based on the prediction model.
本公开的实施例还提供一种模型训练装置和非瞬时性计算机可读存储介质。该模型训练方法可应用于本公开实施例提供的模型训练装置,该模型训练装置可被配置于电子设备上。该电子设备可以是个人计算机、移动终端、汽车头枕等,该移动终端可以是手机、耳机、平板电脑等硬件设备。Embodiments of the present disclosure also provide a model training device and a non-transitory computer-readable storage medium. The model training method can be applied to the model training device provided by the embodiment of the present disclosure, and the model training device can be configured on an electronic device. The electronic device may be a personal computer, a mobile terminal, a car headrest, etc. The mobile terminal may be a mobile phone, a headset, a tablet computer or other hardware devices.
图9为本公开至少一个实施例提供的一种模型训练系统的示意性框图,图10A为本公开至少一个实施例提供的一种模型训练方法的示意性流程图,图10B为图10A所示的步骤S200的示意性流程图,图10C为图10B所示的步骤S2002的示意性流程图,图11为本公开至少一个实施例提供的一种第一音频信号和第三音频信号的示意图。Figure 9 is a schematic block diagram of a model training system provided by at least one embodiment of the present disclosure. Figure 10A is a schematic flow chart of a model training method provided by at least one embodiment of the present disclosure. Figure 10B is shown in Figure 10A 10C is a schematic flow chart of step S200 shown in FIG. 10B , and FIG. 11 is a schematic diagram of a first audio signal and a third audio signal provided by at least one embodiment of the present disclosure.
在本公开的实施例中,可以采用预先训练的方式和/或现场训练的方式对预测模型进行训练,预先训练的方式表示基于预先得到的训练集中的训练音频样本对预测模型进行训练;现场训练的方式表示基于实际应用场景中采集到音频信号对预测模型进行训练。In embodiments of the present disclosure, the prediction model can be trained using a pre-training method and/or an on-site training method. The pre-training method means training the prediction model based on the training audio samples in the training set obtained in advance; on-site training means training the prediction model based on audio signals collected in actual application scenarios.
图9所示的模型训练系统可以用于实现本公开任一实施例提供的模型训练方法,例如,图10A所示的模型训练方法。图9所示的模型训练系统可以适用于现场训练的方式,也可以适用于预先训练的方式。The model training system shown in Figure 9 can be used to implement the model training method provided by any embodiment of the present disclosure, for example, the model training method shown in Figure 10A. The model training system shown in Figure 9 can be applied to on-site training or pre-training.
如图9所示,模型训练系统可以包括音频获取部分、误差计算部分、预测部分和音频输出部分。音频获取部分可以获取音频信号Sn11,然后将音频信号Sn11传输至预测部分;预测部分对音频信号Sn11进行处理,以预测得到未来音频信号Sn13的反相音频信号Sn12。该反相音频信号Sn12可以通过音频输出部分输出,以抑制未来音频信号Sn13,例如,目标对象Ta(例如,人的耳朵等)可以同时接收到反相音频信号Sn12和未来音频信号Sn13,以使得反相音频信号Sn12和未来音频信号Sn13可以进行破坏性叠加。此时,音频获取部分还可以采集当前应用场景中的音频信号,该采集的音频信号为反相音频信号Sn12与出现时间晚于音频信号Sn11的未来音频信号Sn13进行破坏性叠加之后的叠加结果Sr,例如,当反相音频信号Sn12能够用于完全对未来音频信号Sn13进行消音,那么该叠加结果Sr可能是静音信号,即没有音频信号。然后, 音频获取部分可以将该叠加结果Sr传输至误差计算部分;误差计算部分可以基于该叠加结果Sr生成误差音频信号ES。最后,误差计算部分可以将误差音频信号ES传输至预测部分,在误差音频信号不满足条件时,预测部分可以响应误差音频信号对预测模型进行调整,在误差音频信号满足条件时,预测部分可以不对预测模型进行调整,从而使得预测模型保持不变。As shown in Figure 9, the model training system may include an audio acquisition part, an error calculation part, a prediction part and an audio output part. The audio acquisition part can acquire the audio signal Sn11, and then transmit the audio signal Sn11 to the prediction part; the prediction part processes the audio signal Sn11 to predict the inverted audio signal Sn12 of the future audio signal Sn13. The inverted audio signal Sn12 can be output through the audio output part to suppress the future audio signal Sn13. For example, the target object Ta (eg, a human ear, etc.) can receive the inverted audio signal Sn12 and the future audio signal Sn13 at the same time, so that The inverted audio signal Sn12 and the future audio signal Sn13 can be destructively superimposed. At this time, the audio acquisition part can also collect the audio signal in the current application scenario. The collected audio signal is the destructive superposition result Sr of the inverted audio signal Sn12 and the future audio signal Sn13 that appears later than the audio signal Sn11. , for example, when the inverted audio signal Sn12 can be used to completely silence the future audio signal Sn13, then the superposition result Sr may be a silent signal, that is, there is no audio signal. Then, the audio acquisition part can transmit the superposition result Sr to the error calculation part; the error calculation part can generate an error audio signal ES based on the superposition result Sr. Finally, the error calculation part can transmit the error audio signal ES to the prediction part. When the error audio signal does not meet the conditions, the prediction part can adjust the prediction model in response to the error audio signal. When the error audio signal meets the conditions, the prediction part can not The predictive model is adjusted so that the predictive model remains unchanged.
在一实施例中,音频获取部分还可以从预测部分获取反相音频信号Sn12以及采集当前应用场景中的音频信号(即图9所示的叠加结果Sr)。然后,音频获取部分可以将反相音频信号Sn12和该叠加结果Sr传输至误差计算部分;误差计算部分可以基于反相音频信号Sn12和该叠加结果Sr得到未来音频信号Sn13,并且对反相音频信号Sn12和未来音频信号Sn13进行处理,以生成误差音频信号ES。In one embodiment, the audio acquisition part can also acquire the inverted audio signal Sn12 from the prediction part and collect the audio signal in the current application scenario (ie, the superposition result Sr shown in Figure 9). Then, the audio acquisition part can transmit the inverted audio signal Sn12 and the superposition result Sr to the error calculation part; the error calculation part can obtain the future audio signal Sn13 based on the inverse audio signal Sn12 and the superposition result Sr, and calculate the inverted audio signal Sn12 and the future audio signal Sn13 are processed to generate an error audio signal ES.
在一实施例中,对于预先训练的方式,音频获取部分还可以从预测部分获取反相音频信号Sn12,还可以获取出现时间晚于音频信号Sn11的未来音频信号Sn13,然后,并将反相音频信号Sn12和未来音频信号Sn13传输至误差计算部分;误差计算部分可以对反相音频信号Sn12和未来音频信号Sn13进行处理,以生成误差音频信号ES。In one embodiment, for the pre-training method, the audio acquisition part can also obtain the inverted audio signal Sn12 from the prediction part, and can also obtain the future audio signal Sn13 whose appearance time is later than the audio signal Sn11, and then, the inverted audio signal The signal Sn12 and the future audio signal Sn13 are transmitted to the error calculation part; the error calculation part can process the inverted audio signal Sn12 and the future audio signal Sn13 to generate an error audio signal ES.
例如,音频获取部分可以包括麦克风、放大器(例如,麦克风放大器)、模数转换器(analog to digital converter,ADC)、下采样器(downsampler)等,误差计算部分可以包括处理器等;预测部分可以包括AI引擎和/或数字信号处理器(Digital Signal Processing,DSP)等,音频输出部分可以包括上采样器(Upsampler)、数模转换器(digital to analog converter,DAC)、放大器(例如,扬声器放大器)以及扬声器等。For example, the audio acquisition part may include a microphone, an amplifier (for example, a microphone amplifier), an analog to digital converter (ADC), a downsampler (downsampler), etc., and the error calculation part may include a processor, etc.; the prediction part may Including AI engine and/or digital signal processor (Digital Signal Processing, DSP), etc., the audio output part can include upsampler (Upsampler), digital to analog converter (digital to analog converter, DAC), amplifier (for example, speaker amplifier ) and speakers, etc.
如图10A所示,本公开的一个实施例提供的模型训练方法包括步骤S200至步骤S207。在步骤S200,基于预测模型,对第一音频信号进行处理以生成第一控制指令;在步骤S201,基于第一控制指令,生成与第一控制指令对应的音频信号作为第二音频信号;在步骤S202,输出第二音频信号,以抑制第三音频信号;在步骤S203,基于第二音频信号和第三音频信号,确定音频误差信号;在步骤S204,判断音频误差信号是否满足误差条件;响应于音频误差信号不满足误差条件,对应于图10A的N分支,则执行步骤S205和步骤S207,在步骤S205,对预测模型进行调整,在步骤S207,基于预测模型再次对第一音频信号进行处理,直到音频误差信号满足误差条件;响应于音频误差信号满足误差条 件,对应于图10A的Y分支,则执行步骤S206,在步骤S206,保持预测模型不变。As shown in Figure 10A, a model training method provided by an embodiment of the present disclosure includes steps S200 to S207. In step S200, based on the prediction model, the first audio signal is processed to generate a first control instruction; in step S201, based on the first control instruction, an audio signal corresponding to the first control instruction is generated as a second audio signal; in step S201, based on the first control instruction, an audio signal corresponding to the first control instruction is generated as a second audio signal; S202, output the second audio signal to suppress the third audio signal; in step S203, determine the audio error signal based on the second audio signal and the third audio signal; in step S204, determine whether the audio error signal satisfies the error condition; in response to If the audio error signal does not meet the error condition, corresponding to the N branch of Figure 10A, steps S205 and S207 are executed. In step S205, the prediction model is adjusted. In step S207, the first audio signal is processed again based on the prediction model. Until the audio error signal satisfies the error condition; in response to the audio error signal satisfying the error condition, corresponding to the Y branch of FIG. 10A, step S206 is executed. In step S206, the prediction model is kept unchanged.
例如,第一音频信号出现的时间早于第三音频信号出现的时间,也就是说,相对于第一音频信号而言,第三音频信号属于未来的音频信号。For example, the first audio signal appears earlier than the third audio signal. That is to say, relative to the first audio signal, the third audio signal belongs to the future audio signal.
例如,第一音频信号可以为图9所示的音频信号Sn11,第二音频信号可以为图9所示的反相音频信号Sn12,第三音频信号可以为图9所示的未来音频信号Sn13。音频获取部分可以获取第一音频信号;预测部分可以基于预测模型对第一音频信号进行处理以生成第一控制指令,并基于第一控制指令生成第二音频信号;然后误差计算部分可以对第二音频信号和第三音频信号进行处理,以得到误差音频信号,预测部分可以基于该误差音频信号确定是否对预测模型进行调整,从而实现对预测模型进行训练。For example, the first audio signal may be the audio signal Sn11 shown in FIG. 9 , the second audio signal may be the inverted audio signal Sn12 shown in FIG. 9 , and the third audio signal may be the future audio signal Sn13 shown in FIG. 9 . The audio acquisition part can acquire the first audio signal; the prediction part can process the first audio signal based on the prediction model to generate a first control instruction, and generate a second audio signal based on the first control instruction; and then the error calculation part can process the second audio signal based on the prediction model. The audio signal and the third audio signal are processed to obtain an error audio signal. The prediction part can determine whether to adjust the prediction model based on the error audio signal, thereby achieving training of the prediction model.
需要说明的是,在本公开的模型训练方法的实施例中,“第一音频信号”表示由预测模型进行处理以生成第二音频信号的一类音频信号,例如,步骤S200中的第一音频信号和步骤S207中的第一音频信号可以不相同;“第二音频信号”表示生成的用于抑制未来音频信号的一类音频信号。“第三音频信号”表示需要被抑制的一类音频信号。“第一控制指令”表示预测模型首次对第一音频信号进行处理得到的控制指令。It should be noted that in the embodiment of the model training method of the present disclosure, the "first audio signal" represents a type of audio signal processed by the prediction model to generate a second audio signal, for example, the first audio signal in step S200 The signal may be different from the first audio signal in step S207; the "second audio signal" represents a type of audio signal generated for suppressing future audio signals. "Third audio signal" represents a type of audio signal that needs to be suppressed. The "first control instruction" represents the control instruction obtained by processing the first audio signal for the first time by the prediction model.
例如,在一实施例中,可以采用预先训练的方式对预测模型进行训练,训练集中的每个训练音频样本可以包括第一训练音频信号和第二训练音频信号,第一训练音频信号出现的时间早于第二训练音频信号出现的时间,相对于第一训练音频信号,第二训练音频信号为未来的音频信号。在预先训练中,利用训练集对预测模型进行训练直到该预测模型对第一训练音频信号进行处理得到的预测结果与第二训练音频信号相符。训练音频样本中的第一训练音频信号即为上述第一音频信号,训练音频样本中的第二训练音频信号即为上述第三音频信号。For example, in one embodiment, the prediction model can be trained in a pre-training manner. Each training audio sample in the training set can include a first training audio signal and a second training audio signal. The time when the first training audio signal appears Earlier than the time when the second training audio signal appears, the second training audio signal is a future audio signal relative to the first training audio signal. In the pre-training, the prediction model is trained using the training set until the prediction result obtained by processing the first training audio signal by the prediction model is consistent with the second training audio signal. The first training audio signal in the training audio sample is the above-mentioned first audio signal, and the second training audio signal in the training audio sample is the above-mentioned third audio signal.
对于预先训练的方式,因为训练集中的训练音频样本中的音频为预先录音得到的,与真实应用场景中的音频可能不会完全相同,训练集中的训练音频样本没办法像真实应用场景中的音频那么真实,由此可能使得当训练得到的预测模型应用到实际应用场景中,出现无法消音的问题。因此,在本公开的实施例中,可以进一步采用现场训练的方式对预测模型进行训练。在现场训练的方式中,一开始需要一段时间进行模型训练,但一段时间后,预测模型的训练结果 会越来越佳。由于通过实际应用场景中的音频信号进行现场实时训练,训练出的预测模型的准确性会比利用训练集中的训练音频样本训练得到的预测模型的准确性更高,基于现场训练的方式得到的预测模型可以更加适用于实际应用场景,避免预测模型无法实现对实际应用场景中的音频信号进行抑制的问题,提高预测模型对不同应用场景的适应能力,使得预测模型可以适应不同的应用场景,且在不同的应用场景下预测模型的预测准确度均较高,提高实际应用场景中的消音效果。此外,由于可以基于实际应用场景中的音频信号对预测模型进行训练,可以降低对用于训练预测模型的样本量的需求。For the pre-training method, because the audio in the training audio samples in the training set is pre-recorded, it may not be exactly the same as the audio in the real application scenario. The training audio samples in the training set cannot be like the audio in the real application scenario. So real, this may cause problems that cannot be silenced when the trained prediction model is applied to actual application scenarios. Therefore, in the embodiment of the present disclosure, the prediction model can be further trained using on-site training. In the on-site training method, it takes a period of time to train the model at the beginning, but after a period of time, the training results of the prediction model will become better and better. Since on-site real-time training is performed through audio signals in actual application scenarios, the accuracy of the trained prediction model will be higher than that of the prediction model trained using training audio samples in the training set. The prediction based on on-site training The model can be more suitable for actual application scenarios, avoid the problem that the prediction model cannot suppress audio signals in actual application scenarios, and improve the adaptability of the prediction model to different application scenarios, so that the prediction model can adapt to different application scenarios, and in The prediction accuracy of the prediction model is high in different application scenarios, which improves the noise reduction effect in actual application scenarios. In addition, since the prediction model can be trained based on audio signals in actual application scenarios, the requirement for the sample size used to train the prediction model can be reduced.
例如,在另一实施例中,可以基于在当前应用场景中实时采集到的音频信号执行图10A所示的模型训练方法。此时,音频获取部分可以采集在当前应用场景中的声音源从当前时刻开始发出的音频信号以得到第一音频信号,音频获取部分可以采集声音源在当前时刻之后的某个时刻开始发出的音频信号作为第三音频信号。例如,如图11所示,在一个实施例中,在当前应用场景中,音频信号A开始出现的时刻为t100且存在的时间段可以为时刻t100到时刻t101之间的时间段,音频信号B开始出现的时刻为t200且存在的时间段可以为时刻t200到时刻t201之间的时间段,音频信号C开始出现的时刻为t300且存在的时间段可以为时刻t300到时刻t301之间的时间段,音频信号D开始出现的时刻为t400且存在的时间段可以为时刻t400到时刻t401之间的时间段。在时间轴t上,时刻t101早于时刻t200,时刻t201早于时刻t300,时刻t301早于时刻t400。如图11所示,若当前时刻为t100,音频获取部分可以采集音频信号A以作为第一音频信号,音频获取部分可以采集音频信号B以作为第三音频信号。For example, in another embodiment, the model training method shown in FIG. 10A can be executed based on audio signals collected in real time in the current application scenario. At this time, the audio acquisition part can collect the audio signal emitted by the sound source in the current application scenario starting from the current moment to obtain the first audio signal. The audio acquisition part can collect the audio signal emitted by the sound source starting at a certain moment after the current moment. signal as the third audio signal. For example, as shown in Figure 11, in one embodiment, in the current application scenario, the time when audio signal A starts to appear is t100 and the time period it exists can be the time period between time t100 and time t101. Audio signal B The time when audio signal C starts to appear is t200 and the existing time period can be the time period between time t200 and time t201. The time when audio signal C starts to appear is t300 and the existing time period can be the time period between time t300 and time t301. , the time when the audio signal D starts to appear is t400 and the time period it exists may be the time period between time t400 and time t401. On the time axis t, time t101 is earlier than time t200, time t201 is earlier than time t300, and time t301 is earlier than time t400. As shown in Figure 11, if the current time is t100, the audio acquisition part can collect audio signal A as the first audio signal, and the audio acquisition part can collect audio signal B as the third audio signal.
需要说明的是,预先训练的方式和现场训练的方式可以结合以实现对预测模型进行训练。例如,可以采用预先训练的方式对预测模型进行预训练,然后在将预训练后的预测模型应用到实际应用场景中,再采用现场训练的方式继续对预测模型进行训练,从而可以节省模型在实际应用场景中的现场训练的时间。It should be noted that the pre-training method and the on-site training method can be combined to achieve training of the prediction model. For example, the prediction model can be pre-trained in a pre-training manner, and then the pre-trained prediction model can be applied to actual application scenarios, and then on-site training can be used to continue training the prediction model, thus saving the time required for the model to be used in actual applications. Time for on-site training in the application scenario.
在下面的描述中,除非特别说明,以第一音频信号和第三音频信号为在当前实际应用场景中采集到的音频信号为例进行描述。In the following description, unless otherwise specified, the first audio signal and the third audio signal are audio signals collected in the current actual application scenario as an example.
例如,第一音频信号和第三音频信号可以为当前实际应用场景中的外界环境、机器等产生的音频信号,机器运转的声音、装修过程的电钻声和电锯声等。例如,机器可以包括家用电器(空调、抽油烟机、洗衣机等)等。For example, the first audio signal and the third audio signal may be audio signals generated by the external environment, machines, etc. in the current actual application scenario, the sound of machine operation, the sound of electric drills and electric saws during decoration, etc. For example, machines may include household appliances (air conditioners, range hoods, washing machines, etc.) and the like.
例如,在一些实施例中,第一音频信号可以为第一音频信号存在的时间段内在当前实际应用场景中的最大声量(振幅最大)的时域音频信号,第一音频信号不是特定频率的音频信号,从而本公开的实施例提供的模型训练方法不需要从音频信号中提取频谱特征来产生频谱图,由此可以简化音频信号的处理过程,节省处理时间。For example, in some embodiments, the first audio signal may be a time domain audio signal with the largest volume (largest amplitude) in the current actual application scenario during the time period in which the first audio signal exists, and the first audio signal is not audio of a specific frequency. signal, so that the model training method provided by embodiments of the present disclosure does not need to extract spectral features from the audio signal to generate a spectrogram, thereby simplifying the audio signal processing process and saving processing time.
例如,在一些实施例中,如图10B所示,步骤S200可以包括步骤S2001~步骤S2003,在步骤S2001中,获取第一音频信号;在步骤S2002中,基于预测模型对第一音频信号进行处理以预测得到第四音频信号;在步骤S2003中,基于第四音频信号,生成第一控制指令。在本公开的实施例提供的模型训练方法中,预测模型可以学习当前音频信号(即第一音频信号)的特征,以预测得到音频信号(即第四音频信号)。For example, in some embodiments, as shown in FIG. 10B , step S200 may include steps S2001 to S2003. In step S2001, the first audio signal is obtained; in step S2002, the first audio signal is processed based on the prediction model. The fourth audio signal is obtained by prediction; in step S2003, a first control instruction is generated based on the fourth audio signal. In the model training method provided by embodiments of the present disclosure, the prediction model can learn the characteristics of the current audio signal (ie, the first audio signal) to predict the audio signal (ie, the fourth audio signal).
例如,第四音频信号是预测得到的未来的音频信号。例如,在时间轴上,第四音频信号存在的时间段落后于第一音频信号存在的时间段。例如,第四音频信号存在的时间段与第三音频信号存在的时间段相同。For example, the fourth audio signal is a predicted future audio signal. For example, on the time axis, the time period in which the fourth audio signal exists is later than the time period in which the first audio signal exists. For example, the time period during which the fourth audio signal exists is the same as the time period during which the third audio signal exists.
例如,在一些实施例中,步骤S2001可以包括:采集初始音频信号;对初始音频信号进行下采样处理以得到第一音频信号。For example, in some embodiments, step S2001 may include: collecting an initial audio signal; and performing downsampling processing on the initial audio signal to obtain a first audio signal.
例如,在另一些实施例中,步骤S2001可以包括:采集初始音频信号;对初始音频信号进行滤波处理以得到第一音频信号。For example, in other embodiments, step S2001 may include: collecting an initial audio signal; and filtering the initial audio signal to obtain a first audio signal.
例如,在一些实施例中,滤波处理和下采样处理还可以结合使用,即可以对初始音频信号进行滤波处理和下采样处理以得到第一音频信号,本公开对滤波处理和下采样处理的处理顺序不作限制。For example, in some embodiments, filtering processing and downsampling processing can also be used in combination, that is, filtering processing and downsampling processing can be performed on the initial audio signal to obtain the first audio signal. The processing of filtering processing and downsampling processing in this disclosure There is no restriction on the order.
例如,在一实施例中,预测模型包括查找表,如图10C所示,步骤S2002可以包括步骤S2012~步骤S2032,在步骤S2012中,基于第一音频信号生成第一音频特征编码;在步骤S2022中,基于第一音频特征编码查询查找表,以得到第二音频特征编码;在步骤S2032中,基于第二音频特征编码,预测得到第四音频信号。For example, in one embodiment, the prediction model includes a lookup table. As shown in Figure 10C, step S2002 may include steps S2012 to S2032. In step S2012, a first audio feature code is generated based on the first audio signal; in step S2022 In step S2032, the lookup table is queried based on the first audio feature coding to obtain the second audio feature coding; in step S2032, the fourth audio signal is predicted based on the second audio feature coding.
例如,第一音频信号可以为模拟信号,可以通过模数转换器对第一音频信号进行处理,以得到处理后的第一音频信号,处理后的第一音频信号为数字信号,基于该处理后的第一音频信号可以生成第一音频特征编码。For example, the first audio signal may be an analog signal, and the first audio signal may be processed through an analog-to-digital converter to obtain a processed first audio signal. The processed first audio signal may be a digital signal. Based on the processed The first audio signal may generate a first audio feature code.
又例如,第一音频信号可以为数字信号,例如,PDM信号,此时,可以直接基于第一音频信号生成第一音频特征编码。PDM信号可以采用二进制数0 和1表示。For another example, the first audio signal may be a digital signal, such as a PDM signal. In this case, the first audio feature code may be generated directly based on the first audio signal. PDM signals can be represented by binary numbers 0 and 1.
例如,可以采用任何合适的编码方式实现第一音频特征编码。例如,在一些实施例中,在表示一个音频信号时,可以采用音频信号的变化状态来描述该音频信号,可以采用多比特来表示一个音频信号的变化状态。例如,可以采用两比特表示音频信号的变化状态,关于采用两比特表示音频信号的变化状态的相关描述可以参考上面音频处理方法的实施例中的相关描述,重复之处不再赘述。For example, any suitable encoding method may be used to implement the first audio feature encoding. For example, in some embodiments, when representing an audio signal, the changing state of the audio signal can be used to describe the audio signal, and multiple bits can be used to represent the changing state of the audio signal. For example, two bits may be used to represent the changing state of the audio signal. For the relevant description of using two bits to represent the changing state of the audio signal, please refer to the relevant description in the embodiment of the audio processing method above, and the repeated details will not be repeated.
例如,在一些实施例中,查找表(codebook)包括至少一个第一编码字段。例如,在另一些实施例中,查找表还包括至少一个第二编码字段,多个第一编码字段组成一个第二编码字段,从而可以实现从低级特征组合而形成降维的高阶特征。例如,第二音频特征编码包括至少一个第一编码字段和/或至少一个第二编码字段。For example, in some embodiments, a lookup table (codebook) includes at least one first code field. For example, in other embodiments, the lookup table further includes at least one second encoding field, and multiple first encoding fields constitute a second encoding field, so that dimensionally reduced high-order features can be formed from combinations of low-level features. For example, the second audio feature encoding includes at least one first encoding field and/or at least one second encoding field.
例如,在一些实施例中,第二音频特征编码可以包括完整的一个或多个第二编码字段,或者,第二音频特征编码可以包括一个第二编码字段中的部分第一编码字段。For example, in some embodiments, the second audio feature encoding may include one or more complete second encoding fields, or the second audio feature encoding may include part of the first encoding field in one second encoding field.
需要说明的是,关于查找表的具体说明可以参考上面关于音频处理方法的实施例中的相关描述,重复之处不再赘述。It should be noted that for the specific description of the lookup table, reference can be made to the relevant descriptions in the embodiments of the audio processing method above, and repeated details will not be repeated.
例如,在一实施例中,预测模型包括神经网络,在步骤S2002中,可以通过神经网络对第一音频信号进行处理以预测得到第四音频信号。例如,神经网络可以包括循环神经网络、长短时记忆网络或生成对抗网络等。For example, in one embodiment, the prediction model includes a neural network, and in step S2002, the first audio signal can be processed through the neural network to predict a fourth audio signal. For example, neural networks may include recurrent neural networks, long short-term memory networks, or generative adversarial networks.
例如,通过查找表的方式可以实现神经网络中的预测。For example, predictions in neural networks can be achieved by looking up tables.
例如,第一控制指令可以包括第二音频信号输出的时刻、第四音频信号和指示对第四音频信号进行反相的控制信号等。For example, the first control instruction may include a time at which the second audio signal is output, a fourth audio signal, a control signal instructing to invert the fourth audio signal, and the like.
例如,步骤S201可以包括:基于第一控制指令,确定第四音频信号和指示对第四音频信号进行反相的控制信号;基于该控制信号,对该第四音频信号进行反相处理,以生成第二音频信号。For example, step S201 may include: determining a fourth audio signal and a control signal indicating inverting the fourth audio signal based on the first control instruction; performing inversion processing on the fourth audio signal based on the control signal to generate second audio signal.
例如,第二音频信号的相位与第四音频信号的相位相反。For example, the phase of the second audio signal is opposite to the phase of the fourth audio signal.
例如,在步骤S202中,第二音频信号可以被输出至音频获取部分,音频获取部分可以将第二音频信号传输至误差计算部分以供误差计算部分进行计算。For example, in step S202, the second audio signal may be output to the audio acquisition part, and the audio acquisition part may transmit the second audio signal to the error calculation part for calculation by the error calculation part.
例如,在步骤S202中,第二音频信号还可以被输出至音频输出部分,音 频输出部分可以输出该第二音频信号,从而可以对第三音频信号进行抑制,此时,音频获取部分可以采集第二音频信号和第三音频信号进行叠加之后的叠加结果,并将该叠加结果传输至误差计算部分进行计算。For example, in step S202, the second audio signal can also be output to the audio output part, and the audio output part can output the second audio signal, so that the third audio signal can be suppressed. At this time, the audio acquisition part can collect the third audio signal. The superposition result after the second audio signal and the third audio signal are superimposed, and the superposition result is transmitted to the error calculation part for calculation.
例如,输出与第一控制指令对应的音频信号(即第二音频信号)的时刻和第三音频信号开始出现的时刻之间的时间差的绝对值小于时间阈值,在一个实施例中,输出与第一控制指令对应的音频信号的时刻和第三音频信号开始出现的时刻之间的时间差可以为0。输出与第一控制指令对应的音频信号的时刻可以基于第一控制指令确定。For example, the absolute value of the time difference between the time when the audio signal corresponding to the first control instruction (ie, the second audio signal) is output and the time when the third audio signal starts to appear is less than the time threshold. In one embodiment, the time difference between the output and the first audio signal is less than the time threshold. The time difference between the time of the audio signal corresponding to a control instruction and the time when the third audio signal starts to appear may be 0. The time at which the audio signal corresponding to the first control instruction is output may be determined based on the first control instruction.
需要说明的是,时间阈值可以根据实际情况具体设置,本公开对此不作限制,时间阈值越小,则训练得到的预测模型所实现的消音效果越好。It should be noted that the time threshold can be specifically set according to the actual situation, and this disclosure does not limit this. The smaller the time threshold, the better the noise reduction effect achieved by the trained prediction model.
例如,在一实施例中,步骤S203可以包括:计算第二音频信号和第三音频信号之间的均方根误差,以得到音频误差信号。例如,在一实施例中,在执行计算第二音频信号和第三音频信号之间的均方根误差之前,对于预先训练的方式,可以首先通过音频获取部分获取第二音频信号和第三音频信号,然后将该第二音频信号和第三音频信号传输至误差计算部分以进行计算;对于现场训练的方式,首先,可以通过音频获取部分获取第二音频信号,并通过音频获取部分采集第二音频信号与第三音频信号进行破坏性叠加之后的叠加结果;然后,音频获取部分可以将第二音频信号和该叠加结果传输至误差计算部分;然后,误差计算部分可以基于第二音频信号和该叠加结果得到第三音频信号,并对该第二音频信号和第三音频信号进行计算。For example, in an embodiment, step S203 may include: calculating the root mean square error between the second audio signal and the third audio signal to obtain the audio error signal. For example, in one embodiment, before performing calculation of the root mean square error between the second audio signal and the third audio signal, in a pre-training manner, the second audio signal and the third audio signal may first be acquired through the audio acquisition part. signal, and then transmit the second audio signal and the third audio signal to the error calculation part for calculation; for the on-site training method, first, the second audio signal can be obtained through the audio acquisition part, and the second audio signal can be collected through the audio acquisition part The superposition result after destructive superposition of the audio signal and the third audio signal; then, the audio acquisition part can transmit the second audio signal and the superposition result to the error calculation part; then, the error calculation part can be based on the second audio signal and the The superposition result obtains a third audio signal, and calculation is performed on the second audio signal and the third audio signal.
图12A为本公开至少一个实施例提供的一种音频误差信号与训练迭代次数之间的示意图。如图12A所示,音频误差信号为第二音频信号和第三音频信号之间的均方根误差,在对预测模型进行迭代训练大约100次之后,第二音频信号和第三音频信号之间的均方根误差降低到接近0。Figure 12A is a schematic diagram of an audio error signal and the number of training iterations provided by at least one embodiment of the present disclosure. As shown in Figure 12A, the audio error signal is the root mean square error between the second audio signal and the third audio signal. After iteratively training the prediction model for approximately 100 times, the audio error signal is the root mean square error between the second audio signal and the third audio signal. The root mean square error is reduced to close to 0.
例如,在一实施例中,预测模型包括神经网络,此时,由于第二音频信号是基于预测的第四音频信号确定的,从而可以将第二音频信号作为神经网络对应的输出,利用神经网络的输出(体现为第二音频信号)和第一音频信号对应的标签数据groudtruth(体现为第三音频信号)构建神经网络的损失函数并基于该损失函数计算损失值。此时,步骤S203可以包括:基于第二音频信号和第三音频信号,通过神经网络的损失函数计算损失值。音频误差信号包括损失值。For example, in one embodiment, the prediction model includes a neural network. At this time, since the second audio signal is determined based on the predicted fourth audio signal, the second audio signal can be used as the corresponding output of the neural network, using the neural network The output (embodied as the second audio signal) and the label data groundtruth corresponding to the first audio signal (embodied as the third audio signal) construct a loss function of the neural network and calculate the loss value based on the loss function. At this time, step S203 may include: calculating the loss value through the loss function of the neural network based on the second audio signal and the third audio signal. The audio error signal includes loss values.
图12B为本公开至少一个实施例提供的另一种音频误差信号与训练迭代次数之间的示意图。如图12B所示,音频误差信号为通过神经网络的损失函数计算得到的损失值,在对预测模型进行迭代训练大约50次之后损失值降低为接近0。FIG. 12B is a schematic diagram of another audio error signal and the number of training iterations provided by at least one embodiment of the present disclosure. As shown in Figure 12B, the audio error signal is the loss value calculated through the loss function of the neural network. After the prediction model is iteratively trained about 50 times, the loss value is reduced to close to 0.
例如,当第二音频信号对第三音频信号的抑制效果越好,则音频误差信号越小。当第二音频信号的相位与第三音频信号的相位相反,则可以实现完全消音,此时,音频误差信号可以为最小,例如,为0。For example, when the second audio signal suppresses the third audio signal better, the audio error signal becomes smaller. When the phase of the second audio signal is opposite to the phase of the third audio signal, complete silence can be achieved. At this time, the audio error signal can be minimum, for example, 0.
例如,在步骤S204中,判断音频误差信号是否满足误差条件,当音频误差信号满足误差条件,其表示基于第二音频信号可以较好地实现对第三音频信号的抑制,从而实现消音,此时,预测模型的预测效果较好,从而可以保持预测模型不变;当音频误差信号不满足误差条件,其表示基于第二音频信号可能无法实现对第三音频信号的抑制,甚至由于第二音频信号的产生导致当前环境中的音频信号更大,此时,预测模型的预测效果较差,需要对预测模型进行调整。For example, in step S204, it is determined whether the audio error signal satisfies the error condition. When the audio error signal satisfies the error condition, it means that the third audio signal can be better suppressed based on the second audio signal, thereby achieving silence. At this time , the prediction effect of the prediction model is better, so that the prediction model can be kept unchanged; when the audio error signal does not meet the error condition, it means that the suppression of the third audio signal may not be achieved based on the second audio signal, even due to the second audio signal The generation of causes the audio signal in the current environment to be larger. At this time, the prediction effect of the prediction model is poor, and the prediction model needs to be adjusted.
例如,在一实施例中,预测模型包括神经网络,响应于音频误差信号不满足误差条件,在步骤S205中,对预测模型进行调整包括:响应于损失值不满足误差条件,利用损失值对神经网络的参数进行调整。基于预测模型再次对第一音频信号进行处理,包括:响应于音频误差信号不满足误差条件,基于神经网络,再次对第一音频信号进行处理以生成第二控制指令;基于第二控制指令,生成并输出与第二控制指令对应的音频信号作为第二音频信号。For example, in one embodiment, the prediction model includes a neural network, and in response to the audio error signal not meeting the error condition, in step S205, adjusting the prediction model includes: in response to the loss value not meeting the error condition, using the loss value to Network parameters are adjusted. Processing the first audio signal again based on the prediction model includes: in response to the audio error signal not meeting the error condition, processing the first audio signal again based on the neural network to generate a second control instruction; based on the second control instruction, generating and output the audio signal corresponding to the second control instruction as the second audio signal.
例如,可以基于进行参数调整之后的神经网络再次对第一音频信号进行处理以生成第二控制指令。For example, the first audio signal can be processed again based on the neural network after parameter adjustment to generate the second control instruction.
例如,在另一实施例中,预测模型包括查找表,响应于音频误差信号不满足误差条件,在步骤S205中,对预测模型进行调整包括:响应于音频误差信号不满足误差条件,基于第一音频信号和第三音频信号生成音频特征编码;基于音频特征编码调整查找表。基于预测模型再次对第一音频信号进行处理,包括:响应于音频误差信号不满足误差条件,基于查找表,再次对第一音频信号进行处理以生成第二控制指令;基于第二控制指令,生成并输出与第二控制指令对应的音频信号作为第二音频信号。For example, in another embodiment, the prediction model includes a lookup table, and in response to the audio error signal not meeting the error condition, in step S205, adjusting the prediction model includes: in response to the audio error signal not meeting the error condition, based on the first The audio signal and the third audio signal generate an audio feature code; the lookup table is adjusted based on the audio feature code. Processing the first audio signal again based on the prediction model includes: in response to the audio error signal not satisfying the error condition, processing the first audio signal again based on the lookup table to generate a second control instruction; based on the second control instruction, generating and output the audio signal corresponding to the second control instruction as the second audio signal.
例如,第二控制指令与第一控制指令不相同。For example, the second control instruction is different from the first control instruction.
需要说明的是,在本公开的模型训练方法的实施例中,“第二控制指令”表 示对预测模型进行重复迭代训练时得到的控制指令。It should be noted that in the embodiment of the model training method of the present disclosure, the "second control instruction" represents the control instruction obtained when the prediction model is repeatedly iteratively trained.
例如,当基于第二音频信号(基于第一音频信号(图11所示的音频信号A)生成的第一控制指令对应的音频信号)和第三音频信号(图11所示的音频信号B)确定的音频误差信号不满足误差条件,则可以基于第一音频信号(图11所示的音频信号A)和第三音频信号(图11所示的音频信号B)生成音频特征编码F,然后基于音频特征编码F调整查找表。For example, when based on the second audio signal (the audio signal corresponding to the first control instruction generated based on the first audio signal (audio signal A shown in Figure 11)) and the third audio signal (audio signal B shown in Figure 11) If the determined audio error signal does not satisfy the error condition, the audio feature code F can be generated based on the first audio signal (audio signal A shown in Figure 11) and the third audio signal (audio signal B shown in Figure 11), and then based on Audio feature encoding F adjustment lookup table.
例如,基于音频特征编码F调整查找表可以包括:将音频特征编码F与查找表中的所有编码字段进行比较,当音频特征编码F与查找表中的任一编码字段均不相同,则将音频特征编码F加入查找表中以更新查找表,以得到更新后的查找表;当音频特征编码F与查找表中的某个编码字段相同,则保持查找表不变,即不对查找表进行更新。例如,在一实施例中,调整前的查找表可以包括编码字段A、编码字段B和编码字段C,若音频特征编码F与编码字段A、编码字段B和编码字段C中的任一个均不同,此时,调整后的查找表可以包括编码字段A、编码字段B、编码字段C和音频特征编码F;当音频特征编码F与编码字段A相同,此时,保持查找表不变,调整后的查找表和调整前的查找表相同,即调整后的查找表可以包括编码字段A、编码字段B和编码字段C。For example, adjusting the lookup table based on the audio feature coding F may include: comparing the audio feature coding F with all coding fields in the lookup table. When the audio feature coding F is not the same as any coding field in the lookup table, then the audio feature coding F is different from any coding field in the lookup table. Feature code F is added to the lookup table to update the lookup table to obtain an updated lookup table; when the audio feature code F is the same as a certain coding field in the lookup table, the lookup table remains unchanged, that is, the lookup table is not updated. For example, in one embodiment, the lookup table before adjustment may include encoding field A, encoding field B, and encoding field C, if the audio feature encoding F is different from any one of encoding field A, encoding field B, and encoding field C. , at this time, the adjusted lookup table can include coding field A, coding field B, coding field C and audio feature coding F; when audio feature coding F is the same as coding field A, at this time, the lookup table remains unchanged and after adjustment The lookup table is the same as the lookup table before adjustment, that is, the adjusted lookup table can include encoding field A, encoding field B, and encoding field C.
例如,在一实施例中,可以基于更新前的查找表,再次对第一音频信号进行处理以生成第二控制指令;在另一实施例中,可以基于更新后的查找表,再次对第一音频信号进行处理以生成第二控制指令。For example, in one embodiment, the first audio signal can be processed again to generate the second control instruction based on the lookup table before updating; in another embodiment, the first audio signal can be processed again based on the updated lookup table. The audio signal is processed to generate a second control instruction.
需要说明的是,在将音频特征编码F加入查找表之前,当查找表中的编码字段的数量达到最大值,即查找表的存储空间已满,则可以从查找表中选择使用频率低于频率阈值的一个编码字段,并将该编码字段删除,然后,再将音频特征编码F加入查找表以更新查找表,从而避免无法存储音频特征编码F的问题,还可以避免查找表所需的存储空间过大。It should be noted that before adding the audio feature code F to the lookup table, when the number of coding fields in the lookup table reaches the maximum, that is, the storage space of the lookup table is full, you can select from the lookup table a frequency lower than the frequency used. A coding field of the threshold, delete the coding field, and then add the audio feature code F to the lookup table to update the lookup table, thereby avoiding the problem of being unable to store the audio feature code F, and also avoiding the storage space required for the lookup table. is too big.
例如,误差条件可以根据实际情况设置。For example, error conditions can be set according to actual conditions.
下面基于预先训练和现场训练的一个示例简单描述本公开的实施例提供的模型训练方法的整体流程。The following briefly describes the overall process of the model training method provided by the embodiments of the present disclosure based on an example of pre-training and on-site training.
在预先训练的一个示例中,首先,可以通过例如音频获取部分从训练集中获取第一个训练音频样本,基于第一个训练音频样本对预测模型执行一次训练过程(包括步骤S200~S206),在该训练过程中,该第一个训练音频样本中的第一训练音频信号作为第一音频信号,该第一个训练音频样本中的第二训练音频 信号作为第三音频信号,在步骤S204中,当该训练过程中的音频误差信号满足误差条件,则执行步骤S206,即保持预测模型不变;当该训练过程中的音频误差信号不满足误差条件,则执行步骤S205和步骤S207,在步骤S205中,对预测模型进行调整,然后在步骤S207中,可以通过音频获取部分从训练集中获取第二个训练音频样本,基于第二个训练音频样本对预测模型执行下一次训练过程(重复执行步骤S200~S206),在该下一次训练过程中,该第二个训练音频样本中的第一训练音频信号作为第一音频信号,该第二个训练音频样本中的第二训练音频信号作为第三音频信号。以此类推,在预先训练中,对预测模型进行迭代训练。In an example of pre-training, first, the first training audio sample can be obtained from the training set through, for example, the audio acquisition part, and a training process (including steps S200 to S206) is performed on the prediction model based on the first training audio sample. During the training process, the first training audio signal in the first training audio sample is used as the first audio signal, and the second training audio signal in the first training audio sample is used as the third audio signal. In step S204, When the audio error signal during the training process meets the error condition, step S206 is executed, that is, the prediction model is kept unchanged; when the audio error signal during the training process does not meet the error condition, step S205 and step S207 are executed. In step S205 , the prediction model is adjusted, and then in step S207, the second training audio sample can be obtained from the training set through the audio acquisition part, and the next training process is performed on the prediction model based on the second training audio sample (repeat step S200 ~S206), in the next training process, the first training audio signal in the second training audio sample is used as the first audio signal, and the second training audio signal in the second training audio sample is used as the third audio signal Signal. By analogy, in pre-training, the prediction model is iteratively trained.
例如,第一个训练音频样本和第二个训练音频样本可以为同一个训练音频样本,也就是说,可以利用同一个训练音频样本对预测模型进行多次迭代训练,此时,步骤S200中的第一音频信号和步骤S207中的第一音频信号相同;第一个训练音频样本和第二个训练音频样本也可以为不同的训练音频样本,此时,步骤S200中的第一音频信号和步骤S207中的第一音频信号不相同。For example, the first training audio sample and the second training audio sample can be the same training audio sample. That is to say, the same training audio sample can be used to train the prediction model for multiple iterations. At this time, in step S200 The first audio signal is the same as the first audio signal in step S207; the first training audio sample and the second training audio sample can also be different training audio samples. In this case, the first audio signal in step S200 is the same as the first audio signal in step S207. The first audio signals in S207 are not the same.
需要说明的是,在预先训练的方式中,当执行到步骤S206时,该模型训练方法还可以包括:查看训练集是否包括没有用于对预测模型进行训练的训练音频样本,当训练集包括尚未用于对预测模型进行训练的训练音频样本,则获取尚未用于对预测模型进行训练的训练音频样本以对预测模型进行训练,直到训练集中的所有训练音频样本均用于对预测模型进行训练。It should be noted that in the pre-training mode, when step S206 is executed, the model training method may also include: checking whether the training set includes training audio samples that have not been used to train the prediction model. When the training set includes training audio samples that have not been used to train the prediction model, Training audio samples used to train the prediction model, then obtain training audio samples that have not been used to train the prediction model to train the prediction model until all training audio samples in the training set are used to train the prediction model.
在现场训练的一个示例中,如图11所示,若当前时刻为t100,可以通过例如音频获取部分采集音频信号A以作为第一音频信号以对预测模型执行一次训练过程,在该训练过程中的步骤S200~S201中,基于第一音频信号(即音频信号A)生成第二音频信号;在该训练过程的步骤S202中,可以通过音频获取部分采集音频信号B以作为与第一音频信号(即音频信号A)对应的第三音频信号;在步骤S203中,确定基于第一音频信号(即音频信号A)得到的第二音频信号和第三音频信号(即音频信号B)之间的音频误差信号;在该训练过程的步骤S204中,当基于第一音频信号(即音频信号A)得到的第二音频信号和第三音频信号(即音频信号B)之间的音频误差信号满足误差条件,则执行步骤S206,即保持预测模型不变;当基于第一音频信号(即音频信号A)得到的第二音频信号和第三音频信号(即音频信号B)之间的音频误差信号不满足误差条件,则执行步骤S205,对预测模型进行调整;然后执行步骤S207, 在执行步骤S207时,时刻t201已经过去,音频获取部分需要再次采集当前时刻(晚于时刻t201)开始出现的音频信号作为第一音频信号,如图11所示,若当前时刻变为时刻t300,则在步骤S207中,音频获取部分可以采集音频信号C以作为第一音频信号对预测模型执行下一次训练过程(重复执行步骤S200~S206),在该下一次训练过程中,音频获取部分采集音频信号D以作为与第一音频信号(即音频信号C)对应的第三音频信号。以此类推,在现场训练中,对预测模型进行迭代训练。In an example of on-site training, as shown in Figure 11, if the current time is t100, the audio signal A can be collected as the first audio signal through, for example, the audio acquisition part to perform a training process on the prediction model. During this training process In steps S200 to S201, a second audio signal is generated based on the first audio signal (i.e. audio signal A); in step S202 of the training process, the audio signal B can be collected through the audio acquisition part as the same as the first audio signal ( That is, the third audio signal corresponding to audio signal A); in step S203, determine the audio frequency between the second audio signal obtained based on the first audio signal (ie, audio signal A) and the third audio signal (ie, audio signal B). Error signal; in step S204 of the training process, when the audio error signal between the second audio signal and the third audio signal (ie audio signal B) obtained based on the first audio signal (ie audio signal A) satisfies the error condition , then execute step S206, that is, keep the prediction model unchanged; when the audio error signal between the second audio signal and the third audio signal (ie, audio signal B) obtained based on the first audio signal (ie, audio signal A) does not satisfy If there is an error condition, then execute step S205 to adjust the prediction model; then execute step S207. When executing step S207, time t201 has passed, and the audio acquisition part needs to collect the audio signal that starts to appear at the current time (later than time t201) again as The first audio signal, as shown in Figure 11, if the current time becomes time t300, then in step S207, the audio acquisition part can collect the audio signal C as the first audio signal to perform the next training process (repeated execution) on the prediction model Steps S200 to S206), in the next training process, the audio acquisition part collects the audio signal D as the third audio signal corresponding to the first audio signal (ie, the audio signal C). By analogy, in field training, the predictive model is trained iteratively.
本公开至少一个实施例还提供一种模型训练装置。图13为本公开至少一个实施例提供的一种模型训练装置的示意性框图。At least one embodiment of the present disclosure also provides a model training device. Figure 13 is a schematic block diagram of a model training device provided by at least one embodiment of the present disclosure.
如图13所示,模型训练装置1300包括指令生成模块1301、音频生成模块1302、输出模块1303、误差计算模块1304和调整模块1305。图13所示的模型训练装置1300的组件和结构只是示例性的,而非限制性的,根据需要,该模型训练装置1300还可以包括其他组件和结构。As shown in Figure 13, the model training device 1300 includes an instruction generation module 1301, an audio generation module 1302, an output module 1303, an error calculation module 1304 and an adjustment module 1305. The components and structures of the model training device 1300 shown in FIG. 13 are only exemplary and not restrictive. The model training device 1300 may also include other components and structures as needed.
指令生成模块1301被配置为基于预测模型,对第一音频信号进行处理以生成第一控制指令。指令生成模块1301用于执行图10A所示的步骤S200。The instruction generation module 1301 is configured to process the first audio signal to generate a first control instruction based on the prediction model. The instruction generation module 1301 is used to execute step S200 shown in Figure 10A.
音频生成模块1302被配置为基于第一控制指令,生成与第一控制指令对应的音频信号作为第二音频信号。音频生成模块1302用于执行图10A所示的步骤S201。The audio generation module 1302 is configured to generate an audio signal corresponding to the first control instruction as a second audio signal based on the first control instruction. The audio generation module 1302 is used to perform step S201 shown in Figure 10A.
输出模块1303被配置为输出第二音频信号,以抑制第三音频信号。输出模块1303用于执行图10A所示的步骤S202。例如,第一音频信号出现的时间早于第三音频信号出现的时间。The output module 1303 is configured to output the second audio signal to suppress the third audio signal. The output module 1303 is used to perform step S202 shown in Figure 10A. For example, the first audio signal appears earlier than the third audio signal.
误差计算模块1304被配置为基于第二音频信号和第三音频信号,确定音频误差信号。误差计算模块1304用于执行图10A所示的步骤S203。The error calculation module 1304 is configured to determine an audio error signal based on the second audio signal and the third audio signal. The error calculation module 1304 is used to perform step S203 shown in Figure 10A.
调整模块1305被配置为响应于音频误差信号不满足误差条件,对预测模型进行调整;响应于音频误差信号满足误差条件,保持预测模型不变。调整模块1305用于执行图10A所示的步骤S205~步骤S206。调整模块1305还被配置为判断音频误差信号是否满足误差条件,即调整模块1305还用于执行图10A所示的步骤S204。The adjustment module 1305 is configured to adjust the prediction model in response to the audio error signal not meeting the error condition; and to keep the prediction model unchanged in response to the audio error signal meeting the error condition. The adjustment module 1305 is used to execute steps S205 to S206 shown in FIG. 10A. The adjustment module 1305 is also configured to determine whether the audio error signal satisfies the error condition, that is, the adjustment module 1305 is also configured to perform step S204 shown in FIG. 10A.
指令生成模块1301还被配置为响应于音频误差信号不满足误差条件,基于预测模型再次对第一音频信号进行处理,直到音频误差信号满足误差条件。指令生成模块1301还用于执行图10A所示的步骤S207。The instruction generation module 1301 is further configured to, in response to the audio error signal not satisfying the error condition, process the first audio signal again based on the prediction model until the audio error signal satisfies the error condition. The instruction generation module 1301 is also used to execute step S207 shown in Figure 10A.
关于指令生成模块1301所实现的功能的具体说明可以参考上述模型训练方法的实施例中的图10A所示的步骤S200和步骤S207的相关描述,关于音频生成模块1302所实现的功能的具体说明可以参考上述模型训练方法的实施例中的图10A所示的步骤S201的相关描述,关于输出模块1303所实现的功能的具体说明可以参考上述模型训练方法的实施例中的图10A所示的步骤S202的相关描述,关于误差计算模块1404所实现的功能的具体说明可以参考上述模型训练方法的实施例中的图10A所示的步骤S203的相关描述,关于调整模块1305所实现的功能的具体说明可以参考上述模型训练方法的实施例中的图10A所示的步骤S204~S206的相关描述。模型训练装置可以实现与前述模型训练方法相似或相同的技术效果,在此不再赘述。For a specific description of the functions implemented by the instruction generation module 1301, please refer to the relevant description of step S200 and step S207 shown in Figure 10A in the embodiment of the above model training method. For a specific description of the functions implemented by the audio generation module 1302, please refer to Referring to the relevant description of step S201 shown in FIG. 10A in the embodiment of the above model training method, for a specific description of the functions implemented by the output module 1303, refer to step S202 shown in FIG. 10A in the embodiment of the above model training method. For a detailed description of the functions implemented by the error calculation module 1404, please refer to the relevant description of step S203 shown in Figure 10A in the embodiment of the above model training method. For a specific description of the functions implemented by the adjustment module 1305, please refer to Refer to the relevant description of steps S204 to S206 shown in FIG. 10A in the embodiment of the above model training method. The model training device can achieve similar or identical technical effects to the foregoing model training method, which will not be described again here.
例如,在一些实施例中,指令生成模块1301包括音频获取子模块、预测子模块和生成子模块。音频获取子模块被配置为获取第一音频信号;预测子模块被配置为基于预测模型对第一音频信号进行处理以预测得到第四音频信号;生成子模块被配置为基于第四音频信号,生成第一控制指令。For example, in some embodiments, the instruction generation module 1301 includes an audio acquisition sub-module, a prediction sub-module and a generation sub-module. The audio acquisition sub-module is configured to acquire the first audio signal; the prediction sub-module is configured to process the first audio signal based on the prediction model to predict a fourth audio signal; the generation sub-module is configured to generate based on the fourth audio signal. First control command.
例如,音频获取子模块可以实现为图9所示的音频获取部分。For example, the audio acquisition sub-module can be implemented as the audio acquisition part shown in Figure 9.
例如,在一些实施例中,预测模型包括神经网络,预测子模块可以基于神经网络对第一音频信号进行处理以预测得到第四音频信号。例如,预测子模块可以包括图9所示的预测部分中的AI引擎和/或数字信号处理器等,AI引擎可以包括神经网络。For example, in some embodiments, the prediction model includes a neural network, and the prediction sub-module can process the first audio signal based on the neural network to predict the fourth audio signal. For example, the prediction sub-module may include an AI engine and/or a digital signal processor in the prediction part shown in Figure 9, and the AI engine may include a neural network.
例如,在一些实施例中,预测模型包括查找表,预测子模块包括查询单元和预测单元,查询单元被配置为基于第一音频信号生成第一音频特征编码;基于第一音频特征编码查询查找表,以得到第二音频特征编码;预测单元被配置为基于第二音频特征编码,预测得到第四音频信号。For example, in some embodiments, the prediction model includes a lookup table, the prediction sub-module includes a query unit and a prediction unit, the query unit is configured to generate a first audio feature encoding based on the first audio signal; query the lookup table based on the first audio feature encoding , to obtain the second audio feature coding; the prediction unit is configured to predict and obtain the fourth audio signal based on the second audio feature coding.
例如,查询单元可以包括存储器以用于存储查找表。For example, the lookup unit may include memory for storing lookup tables.
例如,第二音频信号的相位与第四音频信号的相位相反。For example, the phase of the second audio signal is opposite to the phase of the fourth audio signal.
例如,输出模块1303输出与第一控制指令对应的音频信号(即第二音频信号)的时刻和第三音频信号开始出现的时刻之间的时间差的绝对值小于时间阈值。For example, the absolute value of the time difference between the time when the output module 1303 outputs the audio signal (ie, the second audio signal) corresponding to the first control instruction and the time when the third audio signal starts to appear is less than the time threshold.
例如,输出模块1303可以实现为图9所示的音频输出部分。例如,输出模块1303可以包括扬声器等音频输出装置,还可以包括数模转换器等。For example, the output module 1303 can be implemented as the audio output part shown in FIG. 9 . For example, the output module 1303 may include audio output devices such as speakers, and may also include a digital-to-analog converter and the like.
例如,在一些实施例中,预测模型包括神经网络,在执行基于第二音频信 号和第三音频信号,确定音频误差信号的操作时,误差计算模块1304被配置为基于第二音频信号和第三音频信号,通过神经网络的损失函数计算损失值。音频误差信号包括损失值。在执行响应于音频误差信号不满足误差条件,对预测模型进行调整的操作时,调整模块1305被配置为:响应于损失值不满足误差条件,利用损失值对神经网络的参数进行调整。在执行基于预测模型再次对第一音频信号进行处理的操作时,指令生成模块1301被配置为:响应于音频误差信号不满足误差条件,基于神经网络,再次对第一音频信号进行处理以生成第二控制指令。第二控制指令与第一控制指令不相同。音频生成模块1302还被配置为基于第二控制指令,生成并输出与第二控制指令对应的音频信号作为第二音频信号。For example, in some embodiments, the prediction model includes a neural network, and when performing the operation of determining the audio error signal based on the second audio signal and the third audio signal, the error calculation module 1304 is configured to determine the audio error signal based on the second audio signal and the third audio signal. For audio signals, the loss value is calculated through the loss function of the neural network. The audio error signal includes loss values. When performing the operation of adjusting the prediction model in response to the audio error signal not meeting the error condition, the adjustment module 1305 is configured to: use the loss value to adjust parameters of the neural network in response to the loss value not meeting the error condition. When performing the operation of processing the first audio signal again based on the prediction model, the instruction generation module 1301 is configured to: in response to the audio error signal not satisfying the error condition, based on the neural network, process the first audio signal again to generate the third audio signal. 2. Control instructions. The second control instruction is different from the first control instruction. The audio generation module 1302 is further configured to generate and output an audio signal corresponding to the second control instruction as a second audio signal based on the second control instruction.
例如,在一些实施例中,预测模型包括查找表,调整模块1305包括特征编码生成子模块和查找表调整子模块,特征编码生成子模块被配置为:响应于音频误差信号不满足误差条件,基于第一音频信号和第三音频信号生成音频特征编码;查找表调整子模块被配置为基于音频特征编码调整查找表。For example, in some embodiments, the prediction model includes a lookup table, and the adjustment module 1305 includes a feature encoding generation submodule and a lookup table adjustment submodule. The feature encoding generation submodule is configured to: in response to the audio error signal not satisfying the error condition, based on The first audio signal and the third audio signal generate audio feature coding; the lookup table adjustment sub-module is configured to adjust the lookup table based on the audio feature coding.
例如,在一些实施例中,预测模型包括查找表,在执行基于预测模型再次对第一音频信号进行处理的操作时,指令生成模块1301被配置为:响应于音频误差信号不满足误差条件,基于查找表,再次对第一音频信号进行处理以生成第二控制指令。第二控制指令与第一控制指令不相同。音频生成模块1302还被配置为基于第二控制指令,生成并输出与第二控制指令对应的音频信号作为第二音频信号。For example, in some embodiments, the prediction model includes a lookup table, and when performing the operation of processing the first audio signal again based on the prediction model, the instruction generation module 1301 is configured to: in response to the audio error signal not satisfying the error condition, based on Look up the table and process the first audio signal again to generate the second control instruction. The second control instruction is different from the first control instruction. The audio generation module 1302 is further configured to generate and output an audio signal corresponding to the second control instruction as a second audio signal based on the second control instruction.
例如,在执行基于第二音频信号和第三音频信号,确定音频误差信号的操作时,误差计算模块1304被配置为:计算第二音频信号和第三音频信号之间的均方根误差,以得到音频误差信号。For example, when performing the operation of determining the audio error signal based on the second audio signal and the third audio signal, the error calculation module 1304 is configured to: calculate the root mean square error between the second audio signal and the third audio signal to Get the audio error signal.
例如,指令生成模块1301、音频生成模块1302、输出模块1303、误差计算模块1304和/或调整模块1305可以为硬件、软件、固件以及它们的任意可行的组合。例如,指令生成模块1301、音频生成模块1302、输出模块1303、误差计算模块1304和/或调整模块1305可以为专用或通用的电路、芯片或装置等,也可以为处理器和存储器的结合。本公开的实施例不对上述各个模块、子模块和单元的具体实现形式进行限制。For example, the instruction generation module 1301, the audio generation module 1302, the output module 1303, the error calculation module 1304 and/or the adjustment module 1305 can be hardware, software, firmware, and any feasible combination thereof. For example, the instruction generation module 1301, audio generation module 1302, output module 1303, error calculation module 1304 and/or adjustment module 1305 can be a dedicated or general circuit, chip or device, or a combination of a processor and a memory. The embodiments of the present disclosure do not limit the specific implementation forms of each of the above modules, sub-modules and units.
本公开至少一个实施例还提供一种模型训练装置,图14为本公开至少一个实施例提供的另一种模型训练装置的示意性框图。At least one embodiment of the present disclosure also provides a model training device. FIG. 14 is a schematic block diagram of another model training device provided by at least one embodiment of the present disclosure.
例如,如图14所示,模型训练装置1400包括一个或多个存储器1401和一个或多个处理器1402。一个或多个存储器1401被配置为非瞬时性地存储有计算机可执行指令;一个或多个处理器1402配置为运行计算机可执行指令。计算机可执行指令被一个或多个处理器1402运行时实现根据上述任一实施例所述的模型训练方法。关于该模型训练方法的各个步骤的具体实现以及相关解释内容可以参见上述模型训练方法的实施例的描述,在此不做赘述。For example, as shown in Figure 14, the model training device 1400 includes one or more memories 1401 and one or more processors 1402. One or more memories 1401 are configured to store non-transitory computer-executable instructions; one or more processors 1402 are configured to execute the computer-executable instructions. The computer-executable instructions, when executed by one or more processors 1402, implement the model training method according to any of the above embodiments. For the specific implementation and related explanations of each step of the model training method, please refer to the description of the above embodiment of the model training method, and will not be described again here.
例如,在一些实施例中,模型训练装置1400还可以包括通信接口和通信总线。存储器1401、处理器1402和通信接口可以通过通信总线实现相互通信,存储器1401、处理器1402和通信接口等组件之间也可以通过网络连接进行通信。本公开对网络的类型和功能在此不作限制。For example, in some embodiments, the model training device 1400 may also include a communication interface and a communication bus. The memory 1401, the processor 1402 and the communication interface can communicate with each other through a communication bus, and the memory 1401, the processor 1402 and the communication interface and other components can also communicate through a network connection. This disclosure does not limit the type and function of the network.
例如,通信总线可以是外设部件互连标准(PCI)总线或扩展工业标准结构(EISA)总线等。该通信总线可以分为地址总线、数据总线、控制总线等。For example, the communication bus may be a Peripheral Component Interconnect Standard (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, or the like. The communication bus can be divided into address bus, data bus, control bus, etc.
例如,通信接口用于实现模型训练装置1400与其他设备之间的通信。通信接口可以为通用串行总线(Universal Serial Bus,USB)接口等。For example, the communication interface is used to implement communication between the model training device 1400 and other devices. The communication interface may be a Universal Serial Bus (USB) interface, etc.
例如,处理器1402和存储器1401可以设置在服务器端(或云端)。For example, the processor 1402 and the memory 1401 can be provided on the server side (or cloud).
例如,处理器1402可以控制模型训练装置1400中的其它组件以执行期望的功能。处理器1402可以是中央处理器(CPU)、网络处理器(NP)等;还可以是数字信号处理器(DSP)、专用集成电路(ASIC)、现场可编程门阵列(FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件。中央处理元(CPU)可以为X86或ARM架构等。For example, processor 1402 may control other components in model training device 1400 to perform desired functions. The processor 1402 may be a central processing unit (CPU), a network processor (NP), etc.; it may also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA), or other programmable Logic devices, discrete gate or transistor logic devices, discrete hardware components. The central processing unit (CPU) can be X86 or ARM architecture, etc.
例如,存储器1401可以包括一个或多个计算机程序产品的任意组合,计算机程序产品可以包括各种形式的计算机可读存储介质,例如易失性存储器和/或非易失性存储器。易失性存储器例如可以包括随机存取存储器(RAM)和/或高速缓冲存储器(cache)等。非易失性存储器例如可以包括只读存储器(ROM)、硬盘、可擦除可编程只读存储器(EPROM)、便携式紧致盘只读存储器(CD-ROM)、USB存储器、闪存等。在计算机可读存储介质上可以存储一个或多个计算机可执行指令,处理器1402可以运行计算机可执行指令,以实现模型训练装置1400的各种功能。在存储介质中还可以存储各种应用程序和各种数据等。For example, memory 1401 may include any combination of one or more computer program products, which may include various forms of computer-readable storage media, such as volatile memory and/or non-volatile memory. Volatile memory may include, for example, random access memory (RAM) and/or cache memory (cache), etc. Non-volatile memory may include, for example, read-only memory (ROM), hard disk, erasable programmable read-only memory (EPROM), portable compact disk read-only memory (CD-ROM), USB memory, flash memory, and the like. One or more computer-executable instructions may be stored on the computer-readable storage medium, and the processor 1402 may execute the computer-executable instructions to implement various functions of the model training device 1400. Various applications and various data can also be stored in the storage medium.
例如,关于模型训练装置1400执行模型训练的过程的详细说明可以参考模型训练方法的实施例中的相关描述,重复之处不再赘述。For example, for a detailed description of the process of model training performed by the model training device 1400, reference may be made to the relevant descriptions in the embodiments of the model training method, and repeated descriptions will not be repeated.
图15为本公开至少一个实施例提供的一种非瞬时性计算机可读存储介质的示意图。例如,如图15所示,在非瞬时性计算机可读存储介质2000上可以非暂时性地存储一个或多个计算机可执行指令2001。例如,当计算机可执行指令2001由处理器执行时可以执行根据上文所述的模型训练方法中的一个或多个步骤。Figure 15 is a schematic diagram of a non-transitory computer-readable storage medium provided by at least one embodiment of the present disclosure. For example, as shown in Figure 15, one or more computer-executable instructions 2001 may be non-transitory stored on a non-transitory computer-readable storage medium 2000. For example, one or more steps in the model training method described above may be performed when the computer-executable instructions 2001 are executed by a processor.
例如,该非瞬时性计算机可读存储介质2000可以应用于上述模型训练装置1400中,例如,其可以包括模型训练装置1400中的存储器1401。For example, the non-transitory computer-readable storage medium 2000 can be applied in the above-mentioned model training device 1400. For example, it can include the memory 1401 in the model training device 1400.
关于非瞬时性计算机可读存储介质2000的说明可以参考图14所示的模型训练装置1400的实施例中对于存储器1401的描述,重复之处不再赘述。For description of the non-transitory computer-readable storage medium 2000, reference may be made to the description of the memory 1401 in the embodiment of the model training device 1400 shown in FIG. 14, and repeated descriptions will not be repeated.
本公开的至少一个实施例提供一种模型训练方法、模型训练装置和非瞬时性计算机可读存储介质,利用当前音频信号(即,第一音频信号)和未来音频信号(即,第三音频信号)对预测模型进行实时训练,提升预测模型输出的预测结果的准确度,避免基于预测模型输出的预测结果无法实现对未来音频信号进行抑制的问题,提升基于预测模型进行消音的效果;此外,可以通过当前实际应用场景中的音频信号进行现场实时训练,训练出的预测模型的准确性会比利用训练集中的训练音频样本训练得到的预测模型的准确性更高,基于现场训练的方式得到的预测模型可以更加适用于实际应用场景,避免预测模型无法实现对实际应用场景中的音频信号进行抑制的问题,提高预测模型对不同应用场景的适应能力,使得预测模型可以适应不同的应用场景,且在不同的应用场景下预测模型的预测准确度均较高,提高实际应用场景中的消音效果;由于可以基于实际应用场景中的音频信号对预测模型进行训练,可以降低对用于训练预测模型的样本量的需求;由于第一音频信号为时域信号,第一音频信号不是特定频率的音频信号,从而本公开的实施例提供的模型训练方法不需要从音频信号中提取频谱特征来产生频谱图,由此可以简化音频信号的处理过程,节省处理时间;在将音频特征编码F加入查找表之前,从查找表中选择使用频率低于频率阈值的一个编码字段,并将该编码字段删除,然后,再将音频特征编码F加入查找表以更新查找表,从而避免无法存储音频特征编码F的问题,还可以避免查找表所需的存储空间过大。At least one embodiment of the present disclosure provides a model training method, a model training device and a non-transitory computer-readable storage medium, using a current audio signal (ie, a first audio signal) and a future audio signal (ie, a third audio signal). ) Conduct real-time training of the prediction model to improve the accuracy of the prediction results output by the prediction model, avoid the problem that the prediction results based on the prediction model output cannot suppress future audio signals, and improve the effect of noise reduction based on the prediction model; in addition, you can Through on-site real-time training of audio signals in current actual application scenarios, the accuracy of the trained prediction model will be higher than that of the prediction model trained using training audio samples in the training set. The prediction based on on-site training The model can be more suitable for actual application scenarios, avoid the problem that the prediction model cannot suppress audio signals in actual application scenarios, and improve the adaptability of the prediction model to different application scenarios, so that the prediction model can adapt to different application scenarios, and in The prediction accuracy of the prediction model in different application scenarios is high, which improves the noise cancellation effect in actual application scenarios; because the prediction model can be trained based on the audio signals in actual application scenarios, the number of samples used to train the prediction model can be reduced. Quantitative requirements; since the first audio signal is a time domain signal and the first audio signal is not an audio signal of a specific frequency, the model training method provided by the embodiment of the present disclosure does not need to extract spectral features from the audio signal to generate a spectrogram, This can simplify the audio signal processing process and save processing time; before adding the audio feature code F to the lookup table, select a coding field with a frequency lower than the frequency threshold from the lookup table, and delete the coding field, and then, The audio feature code F is then added to the lookup table to update the lookup table, thereby avoiding the problem of being unable to store the audio feature code F and also avoiding excessive storage space required for the lookup table.
对于本公开,还有以下几点需要说明:Regarding this disclosure, there are still several points that need to be explained:
(1)本公开实施例附图只涉及到与本公开实施例涉及到的结构,其他结构可参考通常设计。(1) The drawings of the embodiments of this disclosure only refer to structures related to the embodiments of this disclosure, and other structures may refer to common designs.
(2)在不冲突的情况下,本公开的实施例及实施例中的特征可以相互组合以得到新的实施例。(2) Without conflict, the embodiments of the present disclosure and the features in the embodiments can be combined with each other to obtain new embodiments.
以上所述仅为本公开的具体实施方式,但本公开的保护范围并不局限于此,本公开的保护范围应以所述权利要求的保护范围为准。The above are only specific implementation modes of the present disclosure, but the protection scope of the present disclosure is not limited thereto. The protection scope of the present disclosure should be subject to the protection scope of the claims.

Claims (24)

  1. 一种模型训练方法,包括:A model training method including:
    基于预测模型,对第一音频信号进行处理以生成第一控制指令;Based on the prediction model, process the first audio signal to generate a first control instruction;
    基于所述第一控制指令,生成与所述第一控制指令对应的音频信号作为第二音频信号;Based on the first control instruction, generate an audio signal corresponding to the first control instruction as a second audio signal;
    输出所述第二音频信号,以抑制第三音频信号,其中,所述第一音频信号出现的时间早于所述第三音频信号出现的时间;Outputting the second audio signal to suppress a third audio signal, wherein the first audio signal occurs earlier than the third audio signal;
    基于所述第二音频信号和所述第三音频信号,确定音频误差信号;determining an audio error signal based on the second audio signal and the third audio signal;
    响应于所述音频误差信号不满足误差条件,对所述预测模型进行调整,基于所述预测模型再次对所述第一音频信号进行处理,直到所述音频误差信号满足所述误差条件;In response to the audio error signal not satisfying the error condition, adjusting the prediction model and processing the first audio signal again based on the prediction model until the audio error signal satisfies the error condition;
    响应于所述音频误差信号满足所述误差条件,保持所述预测模型不变。In response to the audio error signal satisfying the error condition, the prediction model is maintained unchanged.
  2. 根据权利要求1所述的模型训练方法,其中,所述预测模型包括神经网络,The model training method according to claim 1, wherein the prediction model includes a neural network,
    所述基于所述第二音频信号和所述第三音频信号,确定音频误差信号,包括:基于所述第二音频信号和所述第三音频信号,通过所述神经网络的损失函数计算损失值,Determining the audio error signal based on the second audio signal and the third audio signal includes: calculating a loss value through a loss function of the neural network based on the second audio signal and the third audio signal. ,
    其中,所述音频误差信号包括所述损失值。Wherein, the audio error signal includes the loss value.
  3. 根据权利要求2所述的模型训练方法,其中,所述响应于所述音频误差信号不满足误差条件,对所述预测模型进行调整,包括:The model training method according to claim 2, wherein the adjusting the prediction model in response to the audio error signal not satisfying an error condition includes:
    响应于所述损失值不满足所述误差条件,利用所述损失值对所述神经网络的参数进行调整。In response to the loss value not satisfying the error condition, the parameters of the neural network are adjusted using the loss value.
  4. 根据权利要求3所述的模型训练方法,其中,所述基于所述预测模型再次对所述第一音频信号进行处理,包括:The model training method according to claim 3, wherein processing the first audio signal again based on the prediction model includes:
    响应于所述音频误差信号不满足所述误差条件,基于所述神经网络,再次对所述第一音频信号进行处理以生成第二控制指令,其中,所述第二控制指令与所述第一控制指令不相同;In response to the audio error signal not satisfying the error condition, based on the neural network, the first audio signal is processed again to generate a second control instruction, wherein the second control instruction is consistent with the first The control instructions are not the same;
    基于所述第二控制指令,生成并输出与所述第二控制指令对应的音频信号作为所述第二音频信号。Based on the second control instruction, an audio signal corresponding to the second control instruction is generated and output as the second audio signal.
  5. 根据权利要求1所述的模型训练方法,其中,所述预测模型包括查找 表,The model training method according to claim 1, wherein the prediction model includes a lookup table,
    所述响应于所述音频误差信号不满足误差条件,对所述预测模型进行调整,包括:In response to the audio error signal not meeting an error condition, adjusting the prediction model includes:
    响应于所述音频误差信号不满足所述误差条件,基于所述第一音频信号和所述第三音频信号生成音频特征编码;In response to the audio error signal not satisfying the error condition, generating audio feature encoding based on the first audio signal and the third audio signal;
    基于所述音频特征编码调整所述查找表。The lookup table is adjusted based on the audio feature encoding.
  6. 根据权利要求1所述的模型训练方法,其中,所述预测模型包括查找表,The model training method according to claim 1, wherein the prediction model includes a lookup table,
    所述基于所述预测模型再次对所述第一音频信号进行处理,包括:Processing the first audio signal again based on the prediction model includes:
    响应于所述音频误差信号不满足所述误差条件,基于所述查找表,再次对所述第一音频信号进行处理以生成第二控制指令,其中,所述第二控制指令与所述第一控制指令不相同;In response to the audio error signal not satisfying the error condition, the first audio signal is processed again to generate a second control instruction based on the lookup table, wherein the second control instruction is consistent with the first The control instructions are not the same;
    基于所述第二控制指令,生成并输出与所述第二控制指令对应的音频信号作为所述第二音频信号。Based on the second control instruction, an audio signal corresponding to the second control instruction is generated and output as the second audio signal.
  7. 根据权利要求1~6任一项所述的模型训练方法,其中,所述基于所述第二音频信号和所述第三音频信号,确定音频误差信号,包括:The model training method according to any one of claims 1 to 6, wherein determining the audio error signal based on the second audio signal and the third audio signal includes:
    计算所述第二音频信号和所述第三音频信号之间的均方根误差,以得到所述音频误差信号。The root mean square error between the second audio signal and the third audio signal is calculated to obtain the audio error signal.
  8. 根据权利要求1~6任一项所述的模型训练方法,其中,所述基于预测模型,对第一音频信号进行处理以生成第一控制指令,包括:The model training method according to any one of claims 1 to 6, wherein the processing of the first audio signal to generate the first control instruction based on the prediction model includes:
    获取所述第一音频信号;Obtain the first audio signal;
    基于所述预测模型对所述第一音频信号进行处理以预测得到第四音频信号;Process the first audio signal based on the prediction model to predict a fourth audio signal;
    基于所述第四音频信号,生成所述第一控制指令。The first control instruction is generated based on the fourth audio signal.
  9. 根据权利要求8所述的模型训练方法,其中,所述预测模型包括查找表,The model training method according to claim 8, wherein the prediction model includes a lookup table,
    所述基于所述预测模型对所述第一音频信号进行处理以预测得到第四音频信号,包括:Processing the first audio signal based on the prediction model to predict a fourth audio signal includes:
    基于所述第一音频信号生成第一音频特征编码;Generate a first audio feature code based on the first audio signal;
    基于所述第一音频特征编码查询所述查找表,以得到第二音频特征编码;Query the lookup table based on the first audio feature code to obtain a second audio feature code;
    基于所述第二音频特征编码,预测得到所述第四音频信号。Based on the second audio feature encoding, the fourth audio signal is predicted.
  10. 根据权利要求8所述的模型训练方法,其中,所述第二音频信号的相位与所述第四音频信号的相位相反。The model training method according to claim 8, wherein the phase of the second audio signal is opposite to the phase of the fourth audio signal.
  11. 根据权利要求1~6任一项所述的模型训练方法,其中,输出与所述第一控制指令对应的音频信号的时刻和所述第三音频信号开始出现的时刻之间的时间差的绝对值小于时间阈值。The model training method according to any one of claims 1 to 6, wherein the absolute value of the time difference between the time when the audio signal corresponding to the first control instruction is output and the time when the third audio signal starts to appear less than the time threshold.
  12. 一种模型训练装置,包括:A model training device including:
    指令生成模块,被配置为基于预测模型,对第一音频信号进行处理以生成第一控制指令;an instruction generation module configured to process the first audio signal to generate a first control instruction based on the prediction model;
    音频生成模块,被配置为基于所述第一控制指令,生成与所述第一控制指令对应的音频信号作为第二音频信号;an audio generation module configured to generate an audio signal corresponding to the first control instruction as a second audio signal based on the first control instruction;
    输出模块,被配置为输出所述第二音频信号,以抑制第三音频信号,其中,所述第一音频信号出现的时间早于所述第三音频信号出现的时间;An output module configured to output the second audio signal to suppress a third audio signal, wherein the first audio signal appears earlier than the third audio signal;
    误差计算模块,被配置为基于所述第二音频信号和所述第三音频信号,确定音频误差信号;an error calculation module configured to determine an audio error signal based on the second audio signal and the third audio signal;
    调整模块,被配置为响应于所述音频误差信号不满足误差条件,对所述预测模型进行调整;响应于所述音频误差信号满足所述误差条件,保持所述预测模型不变;an adjustment module configured to adjust the prediction model in response to the audio error signal not meeting the error condition; and to keep the prediction model unchanged in response to the audio error signal meeting the error condition;
    其中,所述指令生成模块还被配置为响应于所述音频误差信号不满足误差条件,基于所述预测模型再次对所述第一音频信号进行处理,直到所述音频误差信号满足所述误差条件。Wherein, the instruction generation module is further configured to, in response to the audio error signal not satisfying the error condition, process the first audio signal again based on the prediction model until the audio error signal satisfies the error condition. .
  13. 根据权利要求12所述的模型训练装置,其中,所述预测模型包括神经网络,The model training device according to claim 12, wherein the prediction model includes a neural network,
    在执行所述基于所述第二音频信号和所述第三音频信号,确定音频误差信号的操作时,所述误差计算模块被配置为基于所述第二音频信号和所述第三音频信号,通过所述神经网络的损失函数计算损失值,When performing the operation of determining an audio error signal based on the second audio signal and the third audio signal, the error calculation module is configured to based on the second audio signal and the third audio signal, The loss value is calculated through the loss function of the neural network,
    其中,所述音频误差信号包括所述损失值。Wherein, the audio error signal includes the loss value.
  14. 根据权利要求13所述的模型训练装置,其中,在执行所述响应于所述音频误差信号不满足误差条件,对所述预测模型进行调整的操作时,所述调整模块被配置为:响应于所述损失值不满足所述误差条件,利用所述损失值对所述神经网络的参数进行调整。The model training device according to claim 13, wherein when performing the operation of adjusting the prediction model in response to the audio error signal not satisfying an error condition, the adjustment module is configured to: respond to If the loss value does not satisfy the error condition, the loss value is used to adjust the parameters of the neural network.
  15. 根据权利要求14所述的模型训练装置,其中,在执行所述基于所述 预测模型再次对所述第一音频信号进行处理的操作时,所述指令生成模块被配置为:响应于所述音频误差信号不满足所述误差条件,基于所述神经网络,再次对所述第一音频信号进行处理以生成第二控制指令,其中,所述第二控制指令与所述第一控制指令不相同;The model training device according to claim 14, wherein when performing the operation of processing the first audio signal again based on the prediction model, the instruction generation module is configured to: respond to the audio signal. The error signal does not satisfy the error condition, and based on the neural network, the first audio signal is processed again to generate a second control instruction, wherein the second control instruction is different from the first control instruction;
    所述音频生成模块还被配置为基于所述第二控制指令,生成并输出与所述第二控制指令对应的音频信号作为所述第二音频信号。The audio generation module is further configured to generate and output an audio signal corresponding to the second control instruction as the second audio signal based on the second control instruction.
  16. 根据权利要求12所述的模型训练装置,其中,所述预测模型包括查找表,所述调整模块包括特征编码生成子模块和查找表调整子模块,The model training device according to claim 12, wherein the prediction model includes a lookup table, and the adjustment module includes a feature encoding generation submodule and a lookup table adjustment submodule,
    所述特征编码生成子模块被配置为:响应于所述音频误差信号不满足所述误差条件,基于所述第一音频信号和所述第三音频信号生成音频特征编码;The feature code generation sub-module is configured to: in response to the audio error signal not satisfying the error condition, generate an audio feature code based on the first audio signal and the third audio signal;
    所述查找表调整子模块被配置为基于所述音频特征编码调整所述查找表。The lookup table adjustment sub-module is configured to adjust the lookup table based on the audio feature encoding.
  17. 根据权利要求12所述的模型训练装置,其中,所述预测模型包括查找表,在执行所述基于所述预测模型再次对所述第一音频信号进行处理的操作时,所述指令生成模块被配置为:响应于所述音频误差信号不满足所述误差条件,基于所述查找表,再次对所述第一音频信号进行处理以生成第二控制指令,其中,所述第二控制指令与所述第一控制指令不相同;The model training device according to claim 12, wherein the prediction model includes a lookup table, and when performing the operation of processing the first audio signal again based on the prediction model, the instruction generation module is configured to: in response to the audio error signal not satisfying the error condition, based on the lookup table, process the first audio signal again to generate a second control instruction, wherein the second control instruction is consistent with the The above first control instructions are different;
    所述音频生成模块还被配置为基于所述第二控制指令,生成并输出与所述第二控制指令对应的音频信号作为所述第二音频信号。The audio generation module is further configured to generate and output an audio signal corresponding to the second control instruction as the second audio signal based on the second control instruction.
  18. 根据权利要求12~17任一项所述的模型训练装置,其中,在执行所述基于所述第二音频信号和所述第三音频信号,确定音频误差信号的操作时,所述误差计算模块被配置为:计算所述第二音频信号和所述第三音频信号之间的均方根误差,以得到所述音频误差信号。The model training device according to any one of claims 12 to 17, wherein when performing the operation of determining an audio error signal based on the second audio signal and the third audio signal, the error calculation module Configured to: calculate a root mean square error between the second audio signal and the third audio signal to obtain the audio error signal.
  19. 根据权利要求12~17任一项所述的模型训练装置,其中,所述指令生成模块包括音频获取子模块、预测子模块和生成子模块,The model training device according to any one of claims 12 to 17, wherein the instruction generation module includes an audio acquisition sub-module, a prediction sub-module and a generation sub-module,
    所述音频获取子模块被配置为获取所述第一音频信号;The audio acquisition sub-module is configured to acquire the first audio signal;
    所述预测子模块被配置为基于所述预测模型对所述第一音频信号进行处理以预测得到第四音频信号;The prediction sub-module is configured to process the first audio signal based on the prediction model to predict a fourth audio signal;
    所述生成子模块被配置为基于所述第四音频信号,生成所述第一控制指令。The generating sub-module is configured to generate the first control instruction based on the fourth audio signal.
  20. 根据权利要求19所述的模型训练装置,其中,所述预测模型包括查找表,所述预测子模块包括查询单元和预测单元,The model training device according to claim 19, wherein the prediction model includes a lookup table, and the prediction sub-module includes a query unit and a prediction unit,
    所述查询单元被配置为基于所述第一音频信号生成第一音频特征编码;基 于所述第一音频特征编码查询所述查找表,以得到第二音频特征编码;The query unit is configured to generate a first audio feature code based on the first audio signal; query the lookup table based on the first audio feature code to obtain a second audio feature code;
    所述预测单元被配置为基于所述第二音频特征编码,预测得到所述第四音频信号。The prediction unit is configured to predict the fourth audio signal based on the second audio feature encoding.
  21. 根据权利要求19所述的模型训练装置,其中,所述第二音频信号的相位与所述第四音频信号的相位相反。The model training device according to claim 19, wherein the phase of the second audio signal is opposite to the phase of the fourth audio signal.
  22. 根据权利要求12~17任一项所述的模型训练装置,其中,输出与所述第一控制指令对应的音频信号的时刻和所述第三音频信号开始出现的时刻之间的时间差的绝对值小于时间阈值。The model training device according to any one of claims 12 to 17, wherein the absolute value of the time difference between the time when the audio signal corresponding to the first control instruction is output and the time when the third audio signal starts to appear less than the time threshold.
  23. 一种模型训练装置,包括:A model training device including:
    一个或多个存储器,非瞬时性地存储有计算机可执行指令;One or more memories that non-transitoryly store computer-executable instructions;
    一个或多个处理器,配置为运行所述计算机可执行指令,one or more processors configured to execute the computer-executable instructions,
    其中,所述计算机可执行指令被所述一个或多个处理器运行时实现根据权利要求1~11任一项所述的模型训练方法。Wherein, the computer-executable instructions implement the model training method according to any one of claims 1 to 11 when run by the one or more processors.
  24. 一种非瞬时性计算机可读存储介质,其中,所述非瞬时性计算机可读存储介质存储有计算机可执行指令,所述计算机可执行指令被处理器执行时实现根据权利要求1~11任一项所述的模型训练方法。A non-transitory computer-readable storage medium, wherein the non-transitory computer-readable storage medium stores computer-executable instructions, and when executed by a processor, the computer-executable instructions implement any one of claims 1 to 11 The model training method described in the item.
PCT/CN2022/117526 2022-05-23 2022-09-07 Model training method and apparatus, and computer-readable non-transitory storage medium WO2023226234A1 (en)

Applications Claiming Priority (8)

Application Number Priority Date Filing Date Title
US202263344642P 2022-05-23 2022-05-23
US63/344,642 2022-05-23
US202263351439P 2022-06-13 2022-06-13
US63/351,439 2022-06-13
US202263352213P 2022-06-14 2022-06-14
US63/352,213 2022-06-14
CNPCT/CN2022/110275 2022-08-04
PCT/CN2022/110275 WO2023226193A1 (en) 2022-05-23 2022-08-04 Audio processing method and apparatus, and non-transitory computer-readable storage medium

Publications (1)

Publication Number Publication Date
WO2023226234A1 true WO2023226234A1 (en) 2023-11-30

Family

ID=83825587

Family Applications (2)

Application Number Title Priority Date Filing Date
PCT/CN2022/110275 WO2023226193A1 (en) 2022-05-23 2022-08-04 Audio processing method and apparatus, and non-transitory computer-readable storage medium
PCT/CN2022/117526 WO2023226234A1 (en) 2022-05-23 2022-09-07 Model training method and apparatus, and computer-readable non-transitory storage medium

Family Applications Before (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/110275 WO2023226193A1 (en) 2022-05-23 2022-08-04 Audio processing method and apparatus, and non-transitory computer-readable storage medium

Country Status (3)

Country Link
CN (1) CN115294952A (en)
TW (1) TW202347318A (en)
WO (2) WO2023226193A1 (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110293103A1 (en) * 2010-06-01 2011-12-01 Qualcomm Incorporated Systems, methods, devices, apparatus, and computer program products for audio equalization
US20140270224A1 (en) * 2013-03-15 2014-09-18 Cirrus Logic, Inc. Ambient noise-based adaptation of secondary path adaptive response in noise-canceling personal audio devices
CN109671440A (en) * 2019-01-09 2019-04-23 四川虹微技术有限公司 A kind of analogue audio frequency distortion methods, device, server and storage medium
CN112634923A (en) * 2020-12-14 2021-04-09 广州智讯通信系统有限公司 Audio echo cancellation method, device and storage medium based on command scheduling system
CN113707167A (en) * 2021-08-31 2021-11-26 北京地平线信息技术有限公司 Training method and training device for residual echo suppression model

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
GB0820653D0 (en) * 2008-11-11 2008-12-17 Isis Innovation Acoustic noise reduction during magnetic resonance imaging
CN102110438A (en) * 2010-12-15 2011-06-29 方正国际软件有限公司 Method and system for authenticating identity based on voice
CN104900237B (en) * 2015-04-24 2019-07-05 上海聚力传媒技术有限公司 A kind of methods, devices and systems for audio-frequency information progress noise reduction process
CN110970010A (en) * 2019-12-03 2020-04-07 广州酷狗计算机科技有限公司 Noise elimination method, device, storage medium and equipment
CN113470684B (en) * 2021-07-23 2024-01-12 平安科技(深圳)有限公司 Audio noise reduction method, device, equipment and storage medium
CN113903322A (en) * 2021-10-16 2022-01-07 艾普科模具材料(上海)有限公司 Automobile active noise reduction system and method based on mobile terminal and programmable logic device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110293103A1 (en) * 2010-06-01 2011-12-01 Qualcomm Incorporated Systems, methods, devices, apparatus, and computer program products for audio equalization
US20140270224A1 (en) * 2013-03-15 2014-09-18 Cirrus Logic, Inc. Ambient noise-based adaptation of secondary path adaptive response in noise-canceling personal audio devices
CN109671440A (en) * 2019-01-09 2019-04-23 四川虹微技术有限公司 A kind of analogue audio frequency distortion methods, device, server and storage medium
CN112634923A (en) * 2020-12-14 2021-04-09 广州智讯通信系统有限公司 Audio echo cancellation method, device and storage medium based on command scheduling system
CN113707167A (en) * 2021-08-31 2021-11-26 北京地平线信息技术有限公司 Training method and training device for residual echo suppression model

Also Published As

Publication number Publication date
WO2023226193A1 (en) 2023-11-30
CN115294952A (en) 2022-11-04
TW202347318A (en) 2023-12-01
TW202347319A (en) 2023-12-01

Similar Documents

Publication Publication Date Title
US11412333B2 (en) Interactive system for hearing devices
US9536527B1 (en) Reporting operational metrics in speech-based systems
US9263040B2 (en) Method and system for using sound related vehicle information to enhance speech recognition
US9934780B2 (en) Method and system for using sound related vehicle information to enhance spoken dialogue by modifying dialogue's prompt pitch
US9294834B2 (en) Method and apparatus for reducing noise in voices of mobile terminal
JP2004511823A (en) Dynamically reconfigurable speech recognition system and method
US20130185066A1 (en) Method and system for using vehicle sound information to enhance audio prompting
AU2017405291B2 (en) Method and apparatus for processing speech signal adaptive to noise environment
KR20190026234A (en) Method and apparatus for removimg an echo signal
JP2021503633A (en) Voice noise reduction methods, devices, servers and storage media
JP2011511571A (en) Improve sound quality by intelligently selecting between signals from multiple microphones
US20200045166A1 (en) Acoustic signal processing device, acoustic signal processing method, and hands-free communication device
CN111261179A (en) Echo cancellation method and device and intelligent equipment
JP2009504060A (en) Improvement of speech intelligibility of mobile communication devices by controlling the operation of vibrator according to background noise
WO2023226234A1 (en) Model training method and apparatus, and computer-readable non-transitory storage medium
US11290802B1 (en) Voice detection using hearable devices
CN112151055B (en) Audio processing method and device
US11386911B1 (en) Dereverberation and noise reduction
TWI837756B (en) Audio processing method, device, and non-transitory computer-readable storage medium
CN115188390A (en) Audio noise reduction method and related device
CN114501281A (en) Sound adjusting method and device, electronic equipment and computer readable medium
CN115457930A (en) Model training method and device, and non-transitory computer readable storage medium
CN113593612A (en) Voice signal processing method, apparatus, medium, and computer program product
CN117392994B (en) Audio signal processing method, device, equipment and storage medium
WO2023220918A1 (en) Audio signal processing method and apparatus, storage medium and vehicle

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 22943423

Country of ref document: EP

Kind code of ref document: A1