{"id":27010570,"url":"https://github.com/superkogito/fastft","last_synced_at":"2025-04-04T11:05:40.158Z","repository":{"id":224489325,"uuid":"751076301","full_name":"SuperKogito/fastft","owner":"SuperKogito","description":"Implementation of [Librosa](https://github.com/librosa/librosa) like [STFT](https://en.wikipedia.org/wiki/Short-time_Fourier_transform) using [FFTW](https://www.fftw.org/) ","archived":false,"fork":false,"pushed_at":"2024-05-30T19:12:43.000Z","size":48621,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-05-31T15:13:21.060Z","etag":null,"topics":["audio","audio-analysis","audio-processing","dsp","signal-processing","speech-processing","stft"],"latest_commit_sha":null,"homepage":"https://superkogito.github.io/fastft/","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SuperKogito.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-01-31T22:02:40.000Z","updated_at":"2024-05-30T19:14:12.000Z","dependencies_parsed_at":null,"dependency_job_id":"397f2fd8-767b-492e-bf8f-63503a3e1bdc","html_url":"https://github.com/SuperKogito/fastft","commit_stats":null,"previous_names":["superkogito/fftw_stft","superkogito/fastft"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SuperKogito%2Ffastft","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SuperKogito%2Ffastft/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SuperKogito%2Ffastft/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SuperKogito%2Ffastft/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SuperKogito","download_url":"https://codeload.github.com/SuperKogito/fastft/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247166164,"owners_count":20894654,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["audio","audio-analysis","audio-processing","dsp","signal-processing","speech-processing","stft"],"created_at":"2025-04-04T11:05:39.694Z","updated_at":"2025-04-04T11:05:40.152Z","avatar_url":"https://github.com/SuperKogito.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"![](extras/logo.png)\n\n\n**Fastft**: **Fa**st **S**hort **T**ime **F**ourrier **T**ransform implementation based on **F**astest **F**ourier **T**ransform in the **W**est (**FFTW**).\n\n\n# Motivation\n\nThe Short Time Fourier Transform (STFT) is a common tool in audio AI tasks. However, there is currently no standard implementation in C that facilitates fast and efficient features extraction for the purpose of inference. **Fastft** aims to address this gap by offering an implementation based on the Fastest Fourier Transform in the West (FFTW). This implementation is suitable for Spectrogram/STFT-based inference (e.g., models like [Spleeter](https://github.com/deezer/spleeter), [MOSnet](https://github.com/lochenchou/MOSNet), etc.), and it can also be extended to cover feature extraction algorithms such as MFCC. The implementation aims to be as efficient as possible in order to target CPU-based low-latency inference solutions. \n\nWhile some deep learning libraries offer the option of incorporating STFT into the model, these implementations **often differ** and **may restrict developer flexibility**; two critical considerations when targeting embedded hardware.\n\n\n# Project structure\n\nThe following is an illustration of the different components of the project.\n\n```\n├── CMakeLists.txt\n├── comparison                                # compare Librosa.stft to Fastft\n│   ├── benchmark.py\n│   ├── CMakeLists.txt\n│   ├── fastft_librosa_mse.png\n│   ├── fastft_vs_librosa.png\n│   ├── main.cpp\n│   ├── README.md\n│   └── requirements.txt\n├── docs                                      # project documentation\n│   ├── Doxygen\n│   │   ├── Doxyfile.cfg\n│   │   └── xml\n│   └── Sphinx\n│       ├── make.bat\n│       ├── Makefile\n│       └── source\n├── example                                  # usecase/ example\n│   └── cMOSNet\n│       ├── CMakeLists.txt\n│       ├── main.c\n│       ├── mosnet_cnn.onnx\n│       ├── README.md\n│       ├── reference\n│       └── test.wav\n├── extras                                    \n│   ├── logo.png\n│   └── small_logo.png\n├── include\n│   ├── pad.h\n│   ├── signal.h\n│   ├── spectral.h\n│   ├── trafo_istft.h\n│   ├── trafo_stft.h\n│   └── window.h\n├── README.md\n├── resources\n│   ├── chirp.wav\n│   └── test.wav\n├── src\n│   ├── pad.c\n│   ├── signal.c\n│   ├── spectral.c\n│   ├── trafo_istft.c\n│   ├── trafo_stft.c\n│   └── window.c\n└── test                                     # gtests folder\n    ├── CMakeLists.txt \n    ├── main.cpp\n    └── test_stft.cpp\n```\n\n# Build\n\nTo build fastft you will need to install the following two libraries: \n\n- [FFTW](https://www.fftw.org/)\n- [Libsndfile](https://libsndfile.github.io/libsndfile/)\n\nThen, simply build the project using:\n\n```\nmkdir build\ncd build\ncmake ..\nmake\n```\n\n## Run the gtests\n\nfastft includes some unit tests based on [gtests](http://google.github.io/googletest/). \nThese can be run using `build/test/fastft_tests` after the build.\n\n## Comparison \nA comparison betweeen librosa's python output and fastft output is present under `comparison/`.\n\n## Demo\nA demo / usecase example is available under `example/cMOSNet/`.\n\n## Documentation \n\nThe code documentation is available under [https://superkogito.github.io/fastft/](https://superkogito.github.io/fastft/).\n\n## Citation\n\n```\n@misc{Malek2024,\n url    = {https://github.com/SuperKogito/fastft}, \n year   = {2024}, \n author = {Ayoub Malek}, \n title  = {Fastft: Fast Short Time Fourrier Transform implementation based on Fastest Fourier Transform in the West (FFTW).}\n} \n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsuperkogito%2Ffastft","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsuperkogito%2Ffastft","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsuperkogito%2Ffastft/lists"}