Example code fixed
Browse files
README.md
CHANGED
@@ -43,7 +43,7 @@ To transcribe audio files the model can be used as a standalone acoustic model a
|
|
43 |
ds = load_dataset("patrickvonplaten/librispeech_asr_dummy", "clean", split="validation")
|
44 |
|
45 |
# tokenize
|
46 |
-
input_values = processor(ds[0]["audio"]["array"]
|
47 |
|
48 |
# retrieve logits
|
49 |
logits = model(input_values).logits
|
|
|
43 |
ds = load_dataset("patrickvonplaten/librispeech_asr_dummy", "clean", split="validation")
|
44 |
|
45 |
# tokenize
|
46 |
+
input_values = processor(ds[0]["audio"]["array"], return_tensors="pt", padding="longest").input_values # Batch size 1
|
47 |
|
48 |
# retrieve logits
|
49 |
logits = model(input_values).logits
|