anzorq commited on
Commit
6723721
1 Parent(s): 194bfe5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
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
- # Convert to 32-bit float for Gradio output
86
- audio_output = audio.numpy().astype(np.float32)
87
 
88
  except Exception as e:
89
  return str(e), None
90
 
91
- return transcription, (16000, audio_output)
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)