-
Notifications
You must be signed in to change notification settings - Fork 34.1k
Add Unispeech & Unispeech-SAT #13963
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
patrickvonplaten
merged 30 commits into
huggingface:master
from
patrickvonplaten:add_unispeech
Oct 26, 2021
Merged
Changes from 22 commits
Commits
Show all changes
30 commits
Select commit
Hold shift + click to select a range
d047f17
unispeech
patrickvonplaten 2d9562e
add copy from
patrickvonplaten bafdcc6
remove hubert copy from
patrickvonplaten 0273ad9
finish for today
patrickvonplaten 38c7ecf
add unispeech-sat
patrickvonplaten 5c9b66f
merge conflicts
patrickvonplaten d2bb748
adapt more
patrickvonplaten c91bdb6
up
patrickvonplaten 4addd96
up
patrickvonplaten 1f4cdd3
up
patrickvonplaten e9b2342
Merge branch 'add_unispeech' of https://github.com/patrickvonplaten/t…
patrickvonplaten 2f510f8
up
patrickvonplaten 923f68d
up
patrickvonplaten 4fd5dcb
add modeling
patrickvonplaten 37e1857
add tests
patrickvonplaten 9582b07
Merge branch 'master' of https://github.com/huggingface/transformers …
patrickvonplaten 7377014
up
patrickvonplaten 24e97dd
up
patrickvonplaten 2392bb7
Merge branch 'master' of https://github.com/huggingface/transformers …
patrickvonplaten 52bf95c
finish
patrickvonplaten d43f3f9
up
patrickvonplaten afbc4e0
Apply suggestions from code review
patrickvonplaten c8d24c9
up
patrickvonplaten 77246c2
Merge branch 'add_unispeech' of https://github.com/patrickvonplaten/t…
patrickvonplaten 96384a2
up
patrickvonplaten 26dfd37
Merge branch 'add_unispeech' of https://github.com/patrickvonplaten/t…
patrickvonplaten 086f88c
Apply suggestions from code review
patrickvonplaten c46b5da
Merge branch 'master' of https://github.com/huggingface/transformers …
patrickvonplaten 613f1b8
up
patrickvonplaten 6b98dfb
up
patrickvonplaten File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,87 @@ | ||
| .. | ||
| Copyright 2021 The HuggingFace Team. All rights reserved. | ||
|
|
||
| Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with | ||
| the License. You may obtain a copy of the License at | ||
|
|
||
| http://www.apache.org/licenses/LICENSE-2.0 | ||
|
|
||
| Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on | ||
| an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the | ||
| specific language governing permissions and limitations under the License. | ||
|
|
||
| UniSpeech | ||
| ----------------------------------------------------------------------------------------------------------------------- | ||
|
|
||
| Overview | ||
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
|
|
||
| The UniSpeech model was proposed in `UniSpeech: Unified Speech Representation Learning with Labeled and Unlabeled Data | ||
| <https://arxiv.org/abs/2101.07597>`__ by Chengyi Wang, Yu Wu, Yao Qian, Kenichi Kumatani, Shujie Liu, Furu Wei, Michael | ||
| Zeng, Xuedong Huang . | ||
|
|
||
| The abstract from the paper is the following: | ||
|
|
||
| *In this paper, we propose a unified pre-training approach called UniSpeech to learn speech representations with both | ||
| unlabeled and labeled data, in which supervised phonetic CTC learning and phonetically-aware contrastive | ||
| self-supervised learning are conducted in a multi-task learning manner. The resultant representations can capture | ||
| information more correlated with phonetic structures and improve the generalization across languages and domains. We | ||
| evaluate the effectiveness of UniSpeech for cross-lingual representation learning on public CommonVoice corpus. The | ||
| results show that UniSpeech outperforms self-supervised pretraining and supervised transfer learning for speech | ||
| recognition by a maximum of 13.4% and 17.8% relative phone error rate reductions respectively (averaged over all | ||
| testing languages). The transferability of UniSpeech is also demonstrated on a domain-shift speech recognition task, | ||
| i.e., a relative word error rate reduction of 6% against the previous approach.* | ||
|
|
||
| Tips: | ||
|
|
||
| - UniSpeech is a speech model that accepts a float array corresponding to the raw waveform of the speech signal. Please | ||
| use :class:`~transformers.Wav2Vec2Processor` for the feature extraction. | ||
| - UniSpeech model can be fine-tuned using connectionist temporal classification (CTC) so the model output has to be | ||
| decoded using :class:`~transformers.Wav2Vec2CTCTokenizer`. | ||
|
|
||
| This model was contributed by `patrickvonplaten <https://huggingface.co/patrickvonplaten>`__. | ||
|
patrickvonplaten marked this conversation as resolved.
Outdated
|
||
|
|
||
|
|
||
| UniSpeechConfig | ||
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
|
|
||
| .. autoclass:: transformers.UniSpeechConfig | ||
| :members: | ||
|
|
||
|
|
||
| UniSpeech specific outputs | ||
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
|
|
||
| .. autoclass:: transformers.models.unispeech.modeling_unispeech.UniSpeechBaseModelOutput | ||
| :members: | ||
|
|
||
| .. autoclass:: transformers.models.unispeech.modeling_unispeech.UniSpeechForPreTrainingOutput | ||
| :members: | ||
|
|
||
|
|
||
| UniSpeechModel | ||
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
|
|
||
| .. autoclass:: transformers.UniSpeechModel | ||
| :members: forward | ||
|
|
||
|
|
||
| UniSpeechForCTC | ||
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
|
|
||
| .. autoclass:: transformers.UniSpeechForCTC | ||
| :members: forward | ||
|
|
||
|
|
||
| UniSpeechForSequenceClassification | ||
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
|
|
||
| .. autoclass:: transformers.UniSpeechForSequenceClassification | ||
| :members: forward | ||
|
|
||
|
|
||
| UniSpeechForPreTraining | ||
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
|
|
||
| .. autoclass:: transformers.UniSpeechForPreTraining | ||
| :members: forward | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.