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

Support writing mp3 (soundfile 0.11) #613

Merged
merged 12 commits into from
Dec 20, 2022
Merged

Support writing mp3 (soundfile 0.11) #613

merged 12 commits into from
Dec 20, 2022

Conversation

sammlapp
Copy link
Collaborator

Also switches from tinytag to soundfile for loading metadata (to match how we write metadata)

soundfile release 0.11 supports writing mp3, so we can now write mp3 with Audio.save(). This resolves #388

Also, resolves #565 by switching to using soundfile for reading (as well as writing) metadata.
I changed the field name in metadata from 'audiomoth_id' to 'device_id', this resolves #446. I also changed the format to keep the entire name, for instance "AudioMoth 24526B065D325963", rather than just the number. This avoids possible confusion with device IDs of other ARU types.
this was called for the tinytag output but is incorrect for soundfile, which already returns a dictionary
The CI is failing because `sudo apt-get install libsndfile1` is installing 1.0.31 and needs to install 1.1.0
writing mp3 is only supported by libsndfile >=1.1.0, which is not yet available on Ubuntu. We'll allow the user to try writing any file type, but provide a helpful error message if soundfile.write raises a cryptic ValueError (which happens if libsndfile <1.1.0 and you try to write a .mp3 file, for instance)
@sammlapp sammlapp merged commit 81dd85d into develop Dec 20, 2022
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

Successfully merging this pull request may close these issues.

None yet

1 participant