Pygriffinlim
A python implementation of the Griffin Lim Algorithm for audio reconstruction from magnitudes
Install / Use
/learn @rbarghou/PygriffinlimREADME
pygriffinlim
A python implementation of the Griffin Lim Algorithm for audio reconstruction from magnitudes
Overview
The Griffin Lim algorithm provides a way to approximate a waveform from a "modified STFT transform". In practice, this means a STFT where the phase data has been lost or removed. The Griffin Lim Algorithm does not produce the original waveform, but rather a new waveform with a very similar spectrogram.
Improvements on the Modified Fast Griffin Lim are still possible, as evidenced by recent work with WaveNet. However, in practice, the Modified Griffin Lim remains a robust, efficient and understandable algorithm, which makes it useful in many audio pipelines.
This is an implementation of 3 different versions of the Griffin Lim algorithm.
- The basic Griffin Lim which converges slowly
- The Fast Griffin Lim which converges more quickly
- The Modified Fast Griffin Lim which converges to slightly better values.
CLI Instructions
After installing this package with pip, you can use the command pygl which has reasonable help.
Full disclosure
I have not read the Griffin Lim paper very closely, and I expect that my implementation is missing crucial aspects. But this is a practical repository, not an academic one. Please report any bugs as github issues.
Related Skills
node-connect
344.1kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
96.8kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
344.1kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
344.1kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
