Spaces:
Runtime error
Runtime error
Update app.py
Browse filescorrect method "asr_pipe" to be called instead of "pipe".
app.py
CHANGED
@@ -24,7 +24,7 @@ speaker_embeddings = torch.tensor(embeddings_dataset[7306]["xvector"]).unsqueeze
|
|
24 |
|
25 |
def translate(audio):
|
26 |
# outputs = pipe(audio, max_new_tokens=256, generate_kwargs={"task":"translate"})
|
27 |
-
outputs =
|
28 |
return outputs["text"]
|
29 |
|
30 |
|
|
|
24 |
|
25 |
def translate(audio):
|
26 |
# outputs = pipe(audio, max_new_tokens=256, generate_kwargs={"task":"translate"})
|
27 |
+
outputs = asr_pipe(audio, max_new_tokens=256, generate_kwargs={"task": "transcribe", "language": "es"})
|
28 |
return outputs["text"]
|
29 |
|
30 |
|