facebookresearch / stopes

A library for preparing data for machine translation research (monolingual preprocessing, bitext mining, etc.) built by the FAIR NLLB team.
https://facebookresearch.github.io/stopes/
MIT License
251 stars 37 forks source link

Migrate asr bleu #52

Closed CalderJohnson closed 1 year ago

CalderJohnson commented 1 year ago

Why ?

Why do we need to implement this feature ? What is the use case ?

asr_bleu is a program that is currently a part of fairseq. It evaluates the performance of an ASR (automatic speech recognition) model by using the BLEU (bilingual evaluation understudy) metric. If integrated into the stopes library, it will be able to leverage the many advantages stopes offers such as easy configuration and parallelism (currently it runs entirely in serial with no parallelism). The migration of this pipeline will be a powerful and useful addition to the stopes toolkit and expand the functionality of the library even further.

How ?

Document the technical decisions you made.

We set up the asr_bleu pipeline in stopes by taking the original code and moving its configurations into a hydra based setup. We also created a retrieve_data module to encapsulate the code the composes the evaluation data. The goal is to take the existing pipeline and integrate it into stopes in a way that allows for easy configuration and parallelism.

If some parts are WIP, please explicit them here.

The pipeline is in a minimum viable product state. The rest of the pipeline's functionality is still serial, and modules like the transcribe_audio module still need to be put into stopes modules. There will be much more work done to finish the pipeline's functionality and extensively test and optimize it. The pipeline in its entirety should be considered WIP.

Test plan

We tested the pipeline using this sample data and the french huggingface asr model. Inside the folder is also data for an english test. However, the english asr model is from fairseq, and there is a compatibility issue we are still resolving with the fairseq models.

https://drive.google.com/drive/folders/1vJNKsfQLz5Vfl8yXF_-cdMF-MgxBN_ZZ?usp=sharing

facebook-github-bot commented 1 year ago

Hi @CalderJohnson!

Thank you for your pull request and welcome to our community.

Action Required

In order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you.

Process

In order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA.

Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with CLA signed. The tagging process may take up to 1 hour after signing. Please give it that time before contacting us about it.

If you have received this in error or have any questions, please contact us at cla@meta.com. Thanks!