Simulink无法从输出端口1

时间:2017-03-23 11:35:22

标签: matlab audio simulink

我创建了以下模型: enter image description here

它需要一个音频输入并通过去噪算法放入,然后将声音输出到扬声器。如果在没有ASLA Audio Capture的情况下取消附加并且仅使用多媒体文件(没有开关),它可以正常工作,但是一旦我按照图像所示进行设置,我就会出现以下错误:

Simulink cannot propagate the variable-size mode from the output port 1 of cryreg_v2/Short-Time FFT/x to the input port 1 of 'cryreg_v2/Short-Time FFT/Rebuffer. This input port expects a fixed-size mode. The variable-size mode originates from cryreg_v2/Manual Switch. Examine the configurations of cryreg_v2/Short-Time FFT/Rebuffer for one of the following scenarios: 1) the block does not support variable-size signals; 2) the block supports variable-size signals but needs to be configured for them.

我目前的暂停是Rebuffer没有接收麦克风输入(因为它不一致而且没有固定),所以我需要从Rebuffer接收的麦克风创建某种间隔(Something I&# 39;我不确定如何做。)

如何实际修复错误,我的怀疑是否正确?

1 个答案:

答案 0 :(得分:1)

缓冲区块不支持可变大小输入,这是错误的原因。当您断开音频捕获块时,您的输入不是可变大小,这就是它工作正常的原因。您可以通过删除多媒体文件块和切换来验证这一点,而只使用音频捕获。

您应该通过避免在手动开关的输出处创建的可变尺寸信号来解决此问题。创建可变尺寸信号是因为手动开关的输入具有不同的尺寸。为了避免可变大小,您可以将两个源块中的输出大小设置为相同,或者通过在其中一个输入中的手动切换块之前引入缓冲区块来使大小相同。