Fix example code for current version of huggingface
Browse files
README.md
CHANGED
@@ -63,12 +63,7 @@ def transcribe(audio_path: str) -> str:
|
|
63 |
language="Chinese",
|
64 |
).input_features.to(DEVICE)
|
65 |
|
66 |
-
|
67 |
-
language="Chinese", task="transcribe"
|
68 |
-
)
|
69 |
-
predicted_ids = model.generate(
|
70 |
-
input_features, forced_decoder_ids=forced_decoder_ids
|
71 |
-
)
|
72 |
transcription = processor.batch_decode(predicted_ids, skip_special_tokens=True)[0]
|
73 |
return transcription
|
74 |
|
|
|
63 |
language="Chinese",
|
64 |
).input_features.to(DEVICE)
|
65 |
|
66 |
+
predicted_ids = model.generate(input_features)
|
|
|
|
|
|
|
|
|
|
|
67 |
transcription = processor.batch_decode(predicted_ids, skip_special_tokens=True)[0]
|
68 |
return transcription
|
69 |
|