Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Please add FLAC support #9

Closed
CHJ85 opened this issue Dec 10, 2020 · 2 comments
Closed

Please add FLAC support #9

CHJ85 opened this issue Dec 10, 2020 · 2 comments

Comments

@CHJ85
Copy link

CHJ85 commented Dec 10, 2020

Hi there. Most of my songs are in flac format.
It'd be nice to have flac support.
Is this doable?

@teticio
Copy link
Owner

teticio commented Dec 24, 2020

It seems to be pretty straightforward to do this: librosa can accept FLAC files directly. You would only have to modify the code to also scan for flac files

In Mp3ToVec.py:
if filename[-3:].lower() == 'mp3' or filename[-3:].lower() == 'm4a':
->
if filename[-3:].lower() == 'mp3' or filename[-3:].lower() == 'm4a' or filename[-4].lower() == 'flac':

Be careful as there are be parts of the code that assume that the extension is only 3 characters rather than 4 - e.g., full_path[:-3]

@CHJ85
Copy link
Author

CHJ85 commented Dec 24, 2020

@teticio Wow. Thanks a bunch!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants
@CHJ85 @teticio and others