Skip to content

Add multiprocess mechanism for Common Voice #1025

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

Merged
merged 22 commits into from
Jun 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions lhotse/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
RecordingSet,
set_audio_duration_mismatch_tolerance,
set_ffmpeg_torchaudio_info_enabled,
get_ffmpeg_torchaudio_info_enabled,
)
from .caching import is_caching_enabled, set_caching_enabled
from .cut import CutSet, MonoCut, MultiCut, create_cut_set_eager, create_cut_set_lazy
Expand Down
13 changes: 13 additions & 0 deletions lhotse/audio.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,19 @@ def set_ffmpeg_torchaudio_info_enabled(enabled: bool) -> None:
FFMPEG_TORCHAUDIO_INFO_ENABLED = enabled


def get_ffmpeg_torchaudio_info_enabled() -> bool:
"""
Return FFMPEG_TORCHAUDIO_INFO_ENABLED, which is Lhotse's global setting for whether to
use ffmpeg-torchaudio to compute the duration of audio files.

Example::

>>> import lhotse
>>> lhotse.get_ffmpeg_torchaudio_info_enabled()
"""
return FFMPEG_TORCHAUDIO_INFO_ENABLED


# TODO: document the dataclasses like this:
# https://stackoverflow.com/a/3051356/5285891

Expand Down
4 changes: 2 additions & 2 deletions lhotse/bin/modes/recipes/commonvoice.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@ def commonvoice(
@click.option(
"-v",
"--release",
default="cv-corpus-8.0-2022-01-19",
help="the name of the CommonVoice release (e.g., 'cv-corpus-8.0-2022-01-19').It is used as part of the download URL.",
default="cv-corpus-13.0-2023-03-09",
help="the name of the CommonVoice release (e.g., 'cv-corpus-13.0-2023-03-09').It is used as part of the download URL.",
)
def commonvoice(
target_dir: Pathlike,
Expand Down
Loading