MTG / essentia

C++ library for audio and music analysis, description and synthesis, including Python bindings
http://essentia.upf.edu
GNU Affero General Public License v3.0
2.86k stars 534 forks source link

Change in frameCutter ? Error when checking types. Expected: Real, received: std::vector<Real> #1419

Open Vriska opened 5 months ago

Vriska commented 5 months ago

Based on this issue https://github.com/MTG/essentia/issues/175, it looks like frameCutter should be outputting real but it's outputting a real vector instead. How should I handle this ? I tried passing it to FrameToReal but that's giving me another error- the opposite basically

Error when checking types. Expected: std::vector, received: Real

What on earth is going on ?

`` filename = path +'/'+str(i)

    loader =EqloudLoader(filename=filename, sampleRate=44100)

    frameCutter = FrameCutter(frameSize = 2048, hopSize = 128)

    frameRealer = FrameToReal()

    print("Duration of the audio sample [sec]:")

    pitch_extractor = PredominantPitchMelodia()

    fileout = FileOutput(filename = 'pitch.txt')

    loader.audio >> frameCutter.signal

    frameCutter.frame>>frameRealer.signal

    frameRealer.signal>>pitch_extractor.signal

    pitch_extractor.pitch>>fileout

    pitch_extractor.pitchConfidence>> None

    essentia.reset(loader)

    essentia.run(loader)

``

Also does Loader load the entire music file into ram or can I keep writing into the music file while this processing is going on . I want to write to a file and process the frames at the same time, is my approach correct ?