himynameisfuego / decomposestn Goto Github PK
View Code? Open in Web Editor NEWFuzzy decomposition of sound into sines, transients and noise.
License: GNU General Public License v3.0
Fuzzy decomposition of sound into sines, transients and noise.
License: GNU General Public License v3.0
Thank you for fixing the Python usage example (#1).
However, I fail to analyze a real-life wave file:
from scipy.io import wavfile
import decomposeSTN as STN
Fs = 44100
nWin1 = 8192
nWin2 = 512
_, audioInput = wavfile.read("Input/Billie.wav")
STN.decSTN(audioInput, Fs, nWin1, nWin2)
This results in:
/usr/lib/python3/dist-packages/scipy/io/wavfile.py:272: WavFileWarning: Chunk (non-data) not understood, skipping it.
warnings.warn("Chunk (non-data) not understood, skipping it.",
Traceback (most recent call last):
File "test.py", line 9, in <module>
STN.decSTN(audioInput, Fs, nWin1, nWin2)
File "/home/andrius/src/decomposeSTN/decomposeSTN.py", line 22, in decSTN
f,t,X1 = sig.stft(x, fs=Fs, window=win1, nperseg=nWin1, noverlap=nHop1, return_onesided=True)
File "/usr/lib/python3/dist-packages/scipy/signal/spectral.py", line 1171, in stft
freqs, time, Zxx = _spectral_helper(x, x, fs, window, nperseg, noverlap,
File "/usr/lib/python3/dist-packages/scipy/signal/spectral.py", line 1746, in _spectral_helper
win, nperseg = _triage_segments(window, nperseg, input_length=x.shape[-1])
File "/usr/lib/python3/dist-packages/scipy/signal/spectral.py", line 1977, in _triage_segments
raise ValueError('window is longer than input signal')
ValueError: window is longer than input signal
I am not sure whether my setup (system-provided packages on Ubuntu 20.04.6) or I am plainly using it incorrectly. Thus it would be very nice to see a complete example of how to process a wave file with decomposeSTN.
The following Python usage example is incorrect:
Line 36 in 8eb5d4a
[xs, xt, xn] = STN.decSTN(audioInput,Fs,nWin1,nWin2)
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.