Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -49,7 +49,7 @@ MAX_IMAGE_SIZE = 1024
|
|
| 49 |
# Speech GenAI
|
| 50 |
# Function for translating different language using pretrained models
|
| 51 |
def translate(audio):
|
| 52 |
-
outputs = asr_pipe(
|
| 53 |
return outputs["text"]
|
| 54 |
|
| 55 |
# Function to synthesise the text using the processor above
|
|
|
|
| 49 |
# Speech GenAI
|
| 50 |
# Function for translating different language using pretrained models
|
| 51 |
def translate(audio):
|
| 52 |
+
outputs = asr_pipe(audio, max_new_tokens=256, generate_kwargs={"task": "translate"})
|
| 53 |
return outputs["text"]
|
| 54 |
|
| 55 |
# Function to synthesise the text using the processor above
|