BALAKA commited on
Commit
574b77e
·
1 Parent(s): 838bbc8

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -86,7 +86,6 @@ def split_file(file_path):
86
 
87
 
88
  def process(file_path):
89
- return file_path
90
  if librosa.get_duration(filename=file_path) <= 5:
91
  sentence = tran_script(file_path)
92
  sentence = str(sentence).replace(' ', '').strip("[]grt")
@@ -116,6 +115,7 @@ def youtube_loader(link):
116
  yt = YouTube(str(link))
117
  video = yt.streams.filter(only_audio=True).first()
118
  out_file = video.download(output_path='mp3')
 
119
  os.rename(out_file, 'youtube.mp3')
120
  return process('/content/mp3/youtube.mp3')
121
 
 
86
 
87
 
88
  def process(file_path):
 
89
  if librosa.get_duration(filename=file_path) <= 5:
90
  sentence = tran_script(file_path)
91
  sentence = str(sentence).replace(' ', '').strip("[]grt")
 
115
  yt = YouTube(str(link))
116
  video = yt.streams.filter(only_audio=True).first()
117
  out_file = video.download(output_path='mp3')
118
+ return out_file
119
  os.rename(out_file, 'youtube.mp3')
120
  return process('/content/mp3/youtube.mp3')
121