gpt4 book ai didi

java - 分割音频信号

转载 作者:塔克拉玛干 更新时间:2023-11-03 04:49:46 24 4
gpt4 key购买 nike

我有一个 double 组形式的音频信号输入。我想通过将信号分割成具有 50% 重叠的 25 ms 汉明窗口分析帧来制作该信号的帧。我有计算汉明窗的代码。有人可以告诉我如何将音频信号分割成帧吗?伪代码或 Java 代码优先。

最佳答案

伪代码:

Fs = 44100;                // sample rate, e.g. 44.1 kHz
overlap = 0.5; // overlap = 50%
nw = Fs * 0.025; // no of samples in window
ns = nw * (1.0 - overlap); // no of samples to increment n0, n1
n0 = 0; // window sample no begin
n1 = n0 + nw; // window sample no end
N = 10 * Fs; // N = total no of samples to process, e.g. 10 seconds

do
get nw samples from n0 to (n1 - 1) into temporary buffer
apply window function to temporary buffer
apply FFT to temporary buffer
... etc ...
n0 += ns; // increment window start/end by no of overlap samples
n1 += ns;
while n1 <= N;

关于java - 分割音频信号,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10603542/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com