Code Monkey home page Code Monkey logo

decomposestn's People

Contributors

himynameisfuego avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

edoalvarezr

decomposestn's Issues

Please provide a working Python example

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.