kevinwang676 commited on
Commit
22f1a00
1 Parent(s): 9f0c986

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -1
app.py CHANGED
@@ -1,5 +1,6 @@
1
  import os
2
  import torch
 
3
  import librosa
4
  import gradio as gr
5
  from scipy.io.wavfile import write
@@ -226,7 +227,9 @@ import shutil
226
 
227
  def convert_from_srt(apikey, filename, audio_full, voice, multilingual):
228
  subtitle_list = read_srt(filename)
229
- audio_data, sr = librosa.load(audio_full, sr=16000, mono=True)
 
 
230
 
231
  write("audio_full.wav", sr, audio_data.astype(np.int16))
232
 
 
1
  import os
2
  import torch
3
+ import torchaudio
4
  import librosa
5
  import gradio as gr
6
  from scipy.io.wavfile import write
 
227
 
228
  def convert_from_srt(apikey, filename, audio_full, voice, multilingual):
229
  subtitle_list = read_srt(filename)
230
+ #audio_data, sr = librosa.load(audio_full, sr=16000, mono=True)
231
+
232
+ audio_data, sr = torchaudio.load(audio_full)
233
 
234
  write("audio_full.wav", sr, audio_data.astype(np.int16))
235