Code Monkey home page Code Monkey logo

Comments (3)

jzq2000 avatar jzq2000 commented on July 29, 2024

Besides, after I change the code to

 librosa.util.utils.sync(
                         F.T, np.linspace(0, F.shape[0], num=int(F.shape[0] * red), dtype= np.int32),
                         pad=False).T

It will also get an error like this:

traceback (most recent call last):
  File "C:\Program Files\JetBrains\PyCharm Community Edition 2020.2.1\plugins\python-ce\helpers\pydev\pydevd.py", line 1448, in _exec
    pydev_imports.execfile(file, globals, locals)  # execute the script
  File "C:\Program Files\JetBrains\PyCharm Community Edition 2020.2.1\plugins\python-ce\helpers\pydev\_pydev_imps\_pydev_execfile.py", line 18, in execfile
    exec(compile(contents+"\n", file, 'exec'), glob, loc)
  File "D:/music/tools/msaf/test_msaf.py", line 14, in <module>
    boundaries, labels = msaf.process(audio_file, feature=feature, boundaries_id=bid, framesync=True, labels_id=lid, config=config)
  File "C:\Users\v-zeju\src\lib\site-packages\msaf\run.py", line 342, in process
    est_times, est_labels = run_algorithms(file_struct, boundaries_id,
  File "C:\Users\v-zeju\src\lib\site-packages\msaf\run.py", line 214, in run_algorithms
    est_times, est_labels = run_fun(file_struct, bounds_module, labels_module,
  File "C:\Users\v-zeju\src\lib\site-packages\msaf\run.py", line 138, in run_flat
    est_idxs, est_labels = S.processFlat()
  File "C:\Users\v-zeju\src\lib\site-packages\msaf\algorithms\sf\segmenter.py", line 188, in processFlat
    est_bounds /= red
TypeError: ufunc 'true_divide' output (typecode 'd') could not be coerced to provided output parameter (typecode 'l') according to the casting rule ''same_kind''

Due to the code:

            if self.framesync:
                est_bounds /= red
                F = F_copy

from msaf.

urinieto avatar urinieto commented on July 29, 2024

Oh, thanks for reporting! I believe this should fix it:

    if self.framesync:
        est_bounds = np.asarray(est_bounds // red, dtype=np.int)
        F = F_copy

If this works, would you mind creating a PR with these changes?

Thanks!

from msaf.

urinieto avatar urinieto commented on July 29, 2024

This was fixed here: #107
Thanks for the PR!

from msaf.

Related Issues (20)

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.