Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -38,6 +38,10 @@ def transcribe_audio(audio_file):
|
|
| 38 |
audio_data.export(buffer, format="wav")
|
| 39 |
buffer.seek(0)
|
| 40 |
st.success("Audio converted successfully!")
|
|
|
|
|
|
|
|
|
|
|
|
|
| 41 |
return transcription['text'] if 'text' in transcription else "Transcription failed."
|
| 42 |
|
| 43 |
def translate_transcript(transcript):
|
|
|
|
| 38 |
audio_data.export(buffer, format="wav")
|
| 39 |
buffer.seek(0)
|
| 40 |
st.success("Audio converted successfully!")
|
| 41 |
+
transcription = client_el.convert(
|
| 42 |
+
file = buffer,
|
| 43 |
+
model_id = "eleven_multilingual_v2"
|
| 44 |
+
)
|
| 45 |
return transcription['text'] if 'text' in transcription else "Transcription failed."
|
| 46 |
|
| 47 |
def translate_transcript(transcript):
|