Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
@@ -82,13 +82,13 @@ def transcribe_from_youtube(url, apply_wiener_filter, apply_normalization, apply
|
|
82 |
|
83 |
transcription, _ = transcribe_speech(audio)
|
84 |
|
85 |
-
|
86 |
-
|
87 |
|
88 |
except Exception as e:
|
89 |
return str(e), None
|
90 |
|
91 |
-
return transcription,
|
92 |
|
93 |
def populate_metadata(url):
|
94 |
yt = YouTube(url)
|
|
|
82 |
|
83 |
transcription, _ = transcribe_speech(audio)
|
84 |
|
85 |
+
audio_np = audio.numpy().squeeze()
|
86 |
+
sf.write("temp_audio.wav", audio_np, 16000, subtype='PCM_16')
|
87 |
|
88 |
except Exception as e:
|
89 |
return str(e), None
|
90 |
|
91 |
+
return transcription, "temp_audio.wav"
|
92 |
|
93 |
def populate_metadata(url):
|
94 |
yt = YouTube(url)
|