-1

我想在使用 tarsosDSP 进行音高检测之前过滤传入的音频。我试图在音高检测之前添加一个高通和低通滤波器。但是,即使在 300hz 或 6000Hz 范围之外,音高检测也会输出所有频率。代码有问题吗?

   PitchDetectionHandler handler = new PitchDetectionHandler() {
        @Override
        public void handlePitch(PitchDetectionResult pitchDetectionResult,
                                AudioEvent audioEvent) {

            System.out.println(audioEvent.getTimeStamp() + " " +pitchDetectionResult.getPitch());

        }
    };


    AudioDispatcher dispatcher = AudioDispatcherFactory.fromDefaultMicrophone(44100,2048,0);
    dispatcher.addAudioProcessor(new LowPassFS(5000, 44100));
    dispatcher.addAudioProcessor(new HighPass(2000, 44100));
   //dispatcher.run();

    dispatcher.addAudioProcessor(new PitchProcessor(PitchProcessor.PitchEstimationAlgorithm.YIN, 44100, 2048, handler));

    new Thread(dispatcher,"Audio Dispatcher").start();
4

1 回答 1

-1

音调可以低于输入滤波器通带中的所有频率(请参阅音调估计中的“缺失基频”)。

根据过渡带的宽度,高于截止频率 20% 的频率可能仅被低通滤波器部分衰减。

于 2016-08-28T23:03:56.620 回答