Unverified Commit 32090c72 authored by Yih-Dar's avatar Yih-Dar Committed by GitHub
Browse files

[Fix doc example] UniSpeechSatForPreTraining (#15152)



* fix doc example - cannot import name 'UniSpeechSatFeatureEncoder'

* fix ckpt name
Co-authored-by: default avatarydshieh <ydshieh@users.noreply.github.com>
parent 6f8e644f
...@@ -1298,13 +1298,13 @@ class UniSpeechSatForPreTraining(UniSpeechSatPreTrainedModel): ...@@ -1298,13 +1298,13 @@ class UniSpeechSatForPreTraining(UniSpeechSatPreTrainedModel):
```python ```python
>>> import torch >>> import torch
>>> from transformers import UniSpeechSatFeatureEncoder, UniSpeechSatForPreTraining >>> from transformers import Wav2Vec2FeatureExtractor, UniSpeechSatForPreTraining
>>> from transformers.models.unispeech_sat.modeling_unispeech_sat import _compute_mask_indices >>> from transformers.models.unispeech_sat.modeling_unispeech_sat import _compute_mask_indices
>>> from datasets import load_dataset >>> from datasets import load_dataset
>>> import soundfile as sf >>> import soundfile as sf
>>> feature_extractor = UniSpeechSatFeatureEncoder.from_pretrained("patrickvonplaten/unispeech_sat-base") >>> feature_extractor = Wav2Vec2FeatureExtractor.from_pretrained("microsoft/unispeech-sat-base")
>>> model = UniSpeechSatForPreTraining.from_pretrained("patrickvonplaten/unispeech_sat-base") >>> model = UniSpeechSatForPreTraining.from_pretrained("microsoft/unispeech-sat-base")
>>> def map_to_array(batch): >>> def map_to_array(batch):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment