Skip to content

Add Unispeech & Unispeech-SAT - #13963

Merged
patrickvonplaten merged 30 commits into
huggingface:masterfrom
patrickvonplaten:add_unispeech
Oct 26, 2021
Merged

Add Unispeech & Unispeech-SAT#13963
patrickvonplaten merged 30 commits into
huggingface:masterfrom
patrickvonplaten:add_unispeech

Conversation

@patrickvonplaten

@patrickvonplaten patrickvonplaten commented Oct 11, 2021

Copy link
Copy Markdown
Contributor

What does this PR do?

This PR adds UniSpeech from Microsoft: https://github.com/microsoft/UniSpeech

TODOS:

Future PR:

  • Correct pretraining loss

@patrickvonplaten

Copy link
Copy Markdown
Contributor Author

Wait until #13877 is merged

Comment thread docs/source/model_doc/unispeech_sat.rst
Comment thread src/transformers/models/unispeech/modeling_unispeech.py
Comment thread src/transformers/models/unispeech_sat/modeling_unispeech_sat.py Outdated
Comment thread src/transformers/models/unispeech_sat/modeling_unispeech_sat.py Outdated
Comment thread src/transformers/models/unispeech_sat/modeling_unispeech_sat.py Outdated
Comment thread src/transformers/models/unispeech_sat/modeling_unispeech_sat.py Outdated
Comment thread src/transformers/models/unispeech_sat/modeling_unispeech_sat.py Outdated
Comment thread src/transformers/models/unispeech_sat/modeling_unispeech_sat.py Outdated
Comment thread src/transformers/models/unispeech_sat/modeling_unispeech_sat.py
Comment thread src/transformers/models/unispeech/modeling_unispeech.py Outdated
Comment thread src/transformers/models/unispeech/modeling_unispeech.py Outdated
@patrickvonplaten

Copy link
Copy Markdown
Contributor Author

PR is good for review IMO:

@patrickvonplaten

Copy link
Copy Markdown
Contributor Author

I think we can merge the pretrained models now. To make them "promotable" we should still do 2 things:

  • Unispeech: Add phoneme <-> text tokenizer, need some feedback here from the authors
  • Unispeech-SAT: the model should work very well for speaker-verification and speaker-diarization. We should add those two tasks and then promote the model on it as it performs very well

@sgugger sgugger left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks a lot for adding those two models!

Comment thread README.md Outdated
Comment thread README.md Outdated
Comment thread docs/source/model_doc/unispeech.rst Outdated
Comment thread src/transformers/models/unispeech/modeling_unispeech.py
Comment thread src/transformers/models/unispeech/modeling_unispeech.py Outdated
Comment thread src/transformers/models/unispeech_sat/modeling_unispeech_sat.py
Comment thread tests/test_modeling_unispeech.py Outdated
Comment thread tests/test_modeling_unispeech.py Outdated
Comment thread tests/test_modeling_unispeech_sat.py Outdated
Comment thread tests/test_modeling_unispeech_sat.py Outdated

@anton-l anton-l left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks good, thanks a lot for debugging the original models!

Comment thread src/transformers/models/unispeech/modeling_unispeech.py Outdated

# quantize all (unmasked) extracted features and project to final vq dim
extract_features = self.dropout_features(outputs[1])
quantized_features, codevector_perplexity = self.quantizer(extract_features)

@anton-l anton-l Oct 25, 2021

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Doesn't UniSpeech use the same masking strategy for quantization as Wav2Vec? Or did you remove masking just for debugging purposes?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

pretraining is quite different and not implemented yet really - this code should not be used yet

Comment thread src/transformers/models/unispeech/modeling_unispeech.py
@patrickvonplaten patrickvonplaten changed the title Add Unispeech Add Unispeech & Unispeech-SAT Oct 26, 2021
@patrickvonplaten
patrickvonplaten merged commit 9f3aa46 into huggingface:master Oct 26, 2021
@patrickvonplaten
patrickvonplaten deleted the add_unispeech branch October 26, 2021 17:00
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.

3 participants