nils-werner / stft Goto Github PK
View Code? Open in Web Editor NEWSpectrogram calculation for NumPy
Home Page: http://stft.readthedocs.org/
License: MIT License
Spectrogram calculation for NumPy
Home Page: http://stft.readthedocs.org/
License: MIT License
import stft
import scipy.io.wavfile as wav
fs, audio = wav.read('input.wav')
specgram = stft.spectrogram(audio)
output = stft.ispectrogram(specgram)
wav.write('input-anchor.wav', fs, output)
'input-anchor.wav' sounds not like 'input.wav' at all.
I successfully ran the example. However, the reconstruction is not the same as the original. Perhaps due to the lack of the phase information?
although this is a minor, spectrograms are usually shaped (frame, frequencybin)
I'm experimenting with an audio of 35751 samples (sampled at 25kHz sampling rate) using a framelength of 5000 and overlap of 16 which is 312 hopsize. It seems that there's a dimension mismatch at the line
data = data * window
Is there any workaround for this issue? Thanks!
i think line 39 until 47 from utils.py should be removed (the incorrect definition is shadowed now so it shouldn't affect the functions that call center_unpad)
I'm not able to call the function stft.spectrogram
, after following the tutorials here. Here is my console output:
makeing spectrogram for file: data/055 - Angels In Amplifiers - I'm Alright.wav
/usr/lib/python3/dist-packages/scipy/io/wavfile.py:273: WavFileWarning: Chunk (non-data) not understood, skipping it.
WavFileWarning)
Traceback (most recent call last):
File "/mnt/c/Users/tstan/Documents/Class spring 21/ML/Project/stft.py", line 1, in <module>
import stft
File "/mnt/c/Users/tstan/Documents/Class spring 21/ML/Project/stft.py", line 18, in <module>
specgram = stft.spectrogram(audio)
AttributeError: module 'stft' has no attribute 'spectrogram'
I've ran into this on both Windows and Linux (runnign wsl--yes it runs a python executeable on the linux side)
I've tried fixing this with running both python 2.7 and 3.7.
Any help on how to fix this?
Thanks,
-T
Hi! I'm using this package indirectly through the mdct package. I get FutureWarnings that I see are already fixed in the repo, but are not released on PyPI. Could you make a new release? Thanks :)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.