@ audio/stft (英语)
在浏览器中尝试: 光谱。运行此软件包,没有上传.
手杖式STFT用于
@audio生态系统——分批/分流/分析,分流分流.
Hann 分析 + 合成窗口,并正确规范相重叠-添加. 框架运行在跳网格上,从一个开始 N − 跳到最后一个样本之前,所以每一个样本,第一个和最后一个包含在内,都有完全的重叠:一个身份进程准确返回输入. 在输入前,框架查看其镜像( numpy's) reflect),因此从第一个帧中学习的过程满足了信号的水平. ctx.pos 给出每个帧的第一个输入样本(这些早期帧的负数). 摘录自 @audio/denoise-core (从一号波开始就在那里进行了不同的测试),包括共享的溪流环相接固定.
import { stftBatch, stftStream, stftAnalyse } from '@audio/stft'
// process(mag, phase, state, ctx) → { mag, phase }, called per frame
const identity = (mag, phase) => ({ mag, phase })
// batch — whole signal in, Float32Array out
let out = stftBatch(input, identity, { fs: 44100, frameSize: 2048, hopSize: 512 })
// stream — real-time chunks; identical output to batch for any chunk sizes
let s = stftStream(identity, { fs: 44100 })
let piece = s.write(chunk) // returns processed samples as they become available
let tail = s.flush()
// analyse — visit magnitude/phase frames without resynthesis
stftAnalyse(input, (mag, phase, ctx) => { /* inspect */ }, { fs: 44100 })
还有出口 wrapPhase, (中文(简体) ), hannWindow (周期性汉恩 window-function, (中文(简体) ), normFloor, (中文(简体) ), PI2。 。 。 .
另见
@audio/window——视听窗口工具包(填充,应用,COLA检查)fourier-transform- 下方的FFT(剪接层)
许可证
麻省理工学院