Coder Social home page Coder Social logo

Comments (6)

frankenjoe avatar frankenjoe commented on August 23, 2024

I guess this can happen if we publish on a device that does not have MP3 support when using audiofile.

I think it's because of this line: https://github.com/audeering/audb/blob/master/audb/core/dependencies.py#L164 Since we don't know which formats are supported by audiofile, we are pretty conservative here and only read the meta data if we know a file is WAV or FLAC.

from audb.

hagenw avatar hagenw commented on August 23, 2024

OK, so it's not really a bug, but a case where it would make sense to return None instead of 0 ;)
But I still think returning 0 is ok, if we don't know it.

I think one of the other reasons why we didn't included the metadata calculation for formats beside FLAC and WAV is that it can take longer for other formats, compare https://audeering.github.io/audiofile/benchmark.html#id4

So maybe we should just stay with the current behavior?

from audb.

frankenjoe avatar frankenjoe commented on August 23, 2024

So maybe we should just stay with the current behavior?

I would say so. And we should encourage users to always convert audio files to WAV and FLAC.

from audb.

hagenw avatar hagenw commented on August 23, 2024

And we should encourage users to always convert audio files to WAV and FLAC

Maybe internally, but for other users there might be good reasons to store the data in the original format.

Also internally we loose the information what was the original format when not storing it in a table (might not be needed, but just wanted to mention it).

from audb.

frankenjoe avatar frankenjoe commented on August 23, 2024

Maybe internally, but for other users there might be good reasons to store the data in the original format.

At some point I had the idea that a user can register custom functions that read the duration, sampling_rate, etc. for file types that we do not support with audiofile. But I dropped it as I didn't see a real use-case for the moment.

from audb.

hagenw avatar hagenw commented on August 23, 2024

As we will not change this immediately, but we should also revisit it at some point I marked it as wontfix

from audb.

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.