Giter Club home page Giter Club logo

Comments (4)

OlaWod avatar OlaWod commented on July 23, 2024

This may be caused by data preprocessing, the audio length doesn't match spectrogram length.
librosa.effects.trim can have different trimed segment with different sampling rates. For example, wav, _ = librosa.effects.trim(<24k_wav>, top_db=20) might trim out the first 0.3 seconds, while wav, _ = librosa.effects.trim(<22k_wav>, top_db=20) might trim out the first 0.33 seconds.
The 24k wav and 16k spectrogram and 16k wavlm feature should be from the same segment.
And btw I just found that I forgot librosa loads 22k wav by default, the original downsampling code upsamples 22k wav to 24k wav. Just fixed it.

from freevc.

lsw5835 avatar lsw5835 commented on July 23, 2024

Thanks for your kindly answering.
Then, if there is no leading and trailing silence, is there no difference in length between 16k spectrogram and 24k wav?

from freevc.

OlaWod avatar OlaWod commented on July 23, 2024

If you didn't trim both 16k wav (where the 16k spectrogram come from) and 24k wav, then yes.
librosa.effects.trim might have the possibility to trim a little even if there is no apparent leading and trailing silence.

from freevc.

lsw5835 avatar lsw5835 commented on July 23, 2024

Thanks very much. After matching the length of 16k and 24k it works fine.

from freevc.

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.