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

CommonVoice support for convert_hf_dataset_to_nemo script #5797

Merged
merged 6 commits into from
Jan 20, 2023
Merged

Conversation

SeanNaren
Copy link
Collaborator

@SeanNaren SeanNaren commented Jan 13, 2023

What does this PR do ?

Related #5638 #5772

Renames sentence column to text before creating manifest. Exposes ensure_ascii for saving the transcripts + fix naming of config class.

Collection: ASR

Changelog

  • CommonVoice support for convert_hf_dataset_to_nemo script.

Usage

  • You can potentially add a usage example below
python scripts/speech_recognition/convert_hf_dataset_to_nemo.py \
        output_dir=/data/commonvoice/ \
        path="mozilla-foundation/common_voice_11_0" \
        name="eo" \ # esperanto
        split="validation" \
        ensure_ascii=False \
        use_auth_token=True

Pre checks:

  • Make sure you read and followed Contributor guidelines
  • Did you write any new necessary tests?
  • Did you add or update any necessary documentation?
  • Does the PR affect components that are optional to install? (Ex: Numba, Pynini, Apex etc)
    • Reviewer: Does the PR have correct import guards for all optional libraries?

PR Type:

  • New Feature
  • Bugfix
  • Documentation

Signed-off-by: SeanNaren <snarenthiran@nvidia.com>
Signed-off-by: SeanNaren <snarenthiran@nvidia.com>
@SeanNaren SeanNaren self-assigned this Jan 13, 2023
Signed-off-by: SeanNaren <snarenthiran@nvidia.com>
Signed-off-by: SeanNaren <snarenthiran@nvidia.com>
@SeanNaren
Copy link
Collaborator Author

I ran this with ensure_ascii=True and ensure_ascii=False. I then ran the manifest with the below code:

from nemo.collections.asr.data.audio_to_text import ASRManifestProcessor
from nemo.collections.common.parts.preprocessing.parsers import CharParser


x = ASRManifestProcessor(
    manifest_filepath='/data/commonvoice/mozilla-foundation/common_voice_11_0/eo/validation/validation_mozilla-foundation_common_voice_11_0_manifest.json',
    parser=CharParser(['a','b','c'])
)

Both loaded successfully, seems no issue with the manifests @titu1994

Copy link
Collaborator

@titu1994 titu1994 left a comment

Choose a reason for hiding this comment

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

LGTM, thanks !

@SeanNaren SeanNaren merged commit 37d2f8b into main Jan 20, 2023
@SeanNaren SeanNaren deleted the cv_support branch January 20, 2023 01:12
Kipok pushed a commit to Kipok/NeMo that referenced this pull request Jan 31, 2023
Kipok pushed a commit to Kipok/NeMo that referenced this pull request Jan 31, 2023
titu1994 pushed a commit to titu1994/NeMo that referenced this pull request Mar 24, 2023
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

2 participants