Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
@@ -77,16 +77,12 @@ def transcribe_from_youtube(url, apply_wiener_filter, apply_normalization, apply
|
|
77 |
progress(0.4, "Applying Spectral Gating filter...")
|
78 |
audio = spectral_gating(audio)
|
79 |
|
80 |
-
transcription,
|
81 |
-
audio_np = processed_audio.numpy().squeeze()
|
82 |
-
audio_output = BytesIO()
|
83 |
-
torchaudio.save(audio_output, torch.tensor(audio_np).unsqueeze(0), 16000, format="wav")
|
84 |
-
audio_output.seek(0)
|
85 |
|
86 |
except Exception as e:
|
87 |
return str(e), None
|
88 |
|
89 |
-
return transcription,
|
90 |
|
91 |
def populate_metadata(url):
|
92 |
yt = YouTube(url)
|
|
|
77 |
progress(0.4, "Applying Spectral Gating filter...")
|
78 |
audio = spectral_gating(audio)
|
79 |
|
80 |
+
transcription, _ = transcribe_speech(audio)
|
|
|
|
|
|
|
|
|
81 |
|
82 |
except Exception as e:
|
83 |
return str(e), None
|
84 |
|
85 |
+
return transcription, audio.numpy()
|
86 |
|
87 |
def populate_metadata(url):
|
88 |
yt = YouTube(url)
|