yizhilll commited on
Commit
3f79e13
1 Parent(s): d73369c

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +4 -3
README.md CHANGED
@@ -53,7 +53,8 @@ Larger models trained with more data are on the way.
53
  # Model Usage
54
 
55
  ```python
56
- from transformers import Wav2Vec2Processor, HubertModel
 
57
  import torch
58
  from torch import nn
59
  from datasets import load_dataset
@@ -62,10 +63,10 @@ from datasets import load_dataset
62
  dataset = load_dataset("hf-internal-testing/librispeech_asr_demo", "clean", split="validation")
63
  dataset = dataset.sort("id")
64
  sampling_rate = dataset.features["audio"].sampling_rate
65
- processor = Wav2Vec2Processor.from_pretrained("facebook/hubert-large-ls960-ft")
66
 
67
  # loading our model weights
68
- model = HubertModel.from_pretrained("m-a-p/MERT-v0")
69
 
70
  # audio file is decoded on the fly
71
  inputs = processor(dataset[0]["audio"]["array"], sampling_rate=sampling_rate, return_tensors="pt")
 
53
  # Model Usage
54
 
55
  ```python
56
+ from transformers import Wav2Vec2Processor
57
+ from transformers import AutoModel
58
  import torch
59
  from torch import nn
60
  from datasets import load_dataset
 
63
  dataset = load_dataset("hf-internal-testing/librispeech_asr_demo", "clean", split="validation")
64
  dataset = dataset.sort("id")
65
  sampling_rate = dataset.features["audio"].sampling_rate
66
+ processor = Wav2Vec2Processor.from_pretrained("m-a-p/MERT-v0")
67
 
68
  # loading our model weights
69
+ model = AutoModel.from_pretrained("m-a-p/MERT-v0")
70
 
71
  # audio file is decoded on the fly
72
  inputs = processor(dataset[0]["audio"]["array"], sampling_rate=sampling_rate, return_tensors="pt")