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

Adds radio data recipe #1400

Merged
merged 5 commits into from
Oct 21, 2024
Merged

Conversation

m-wiesner
Copy link
Contributor

This is the recipe for some radio data we collected and are able to distribute if someone emails us for it. We may possibly have a way of releasing it with some restrictions in the future, but for now it is just a prepare script. The paper it corresponds to is

https://aclanthology.org/2024.naacl-long.286.pdf

The main use is for geolocating speech, self-supervised model pretraining, or language id.

Copy link
Collaborator

@pzelasko pzelasko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Please fix the CI and the torchaudio import.

lhotse/recipes/radio.py Outdated Show resolved Hide resolved
from lhotse.supervision import SupervisionSegment, SupervisionSet
from lhotse.utils import Pathlike

set_ffmpeg_torchaudio_info_enabled(False)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One last request - don’t set these things in the global scope because it’ll be executed when Lhotse is imported. Move it to local scope (even better i think this one works like a context manager)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I fixed it now?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Almost - now you need to move to actual usage to inside the function that does the audio reading and use it with Python with statement

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I actually forget why I started adding this in to all the Lhotse recipes. I think it fixed some problem I was having at some point, but I have no recollection of what that problem was. Do I actually need it? When I actually use it locally each time it gives me a ton of horrible logging messages.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You shouldn’t need it. We are using libsndfile now by default rather than torchaudio. Feel free to remove it if you prefer

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That is what I ended up doing. I believe the current updated commit just removed this.

@m-wiesner
Copy link
Contributor Author

Is there anything left to do for this one?

@pzelasko pzelasko merged commit 25475d4 into lhotse-speech:master Oct 21, 2024
9 checks passed
@pzelasko
Copy link
Collaborator

Looks good, thanks!

@pzelasko pzelasko added this to the v1.28.0 milestone Oct 21, 2024
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.

2 participants