Omnibus commited on
Commit
b1a2210
1 Parent(s): 9039dde

Update vc.py

Browse files
Files changed (1) hide show
  1. vc.py +4 -4
vc.py CHANGED
@@ -29,9 +29,9 @@ def load_video_yt(vid):
29
  return vid, vid_aud, f"{uid}-tmp_aud.mp4"
30
 
31
  def trim_clip(clip, start_t, end_t):
32
- #clip = Path(f"{uid}-tmp_aud.mp4")
33
- #song = AudioSegment.from_file(f"{uid}-tmp_aud.mp4", format="mp4")
34
- song = AudioSegment.from_file(Path(f"{clip}"), format="mp4")
35
  start_min = int(start_t.split(":",1)[0])
36
  start_sec = int(start_t.split(":",1)[1])
37
  end_min = int(end_t.split(":",1)[0])
@@ -44,7 +44,7 @@ def trim_clip(clip, start_t, end_t):
44
 
45
  return f"{uid}-trim.wav"
46
  def pre_aud(inp):
47
- print(Path(inp))
48
  song = AudioSegment.from_file(Path(f'{inp}'), format="mp4")
49
  song.export(f"{uid}-tmp_aud.mp4", format="mp4")
50
  print(f'pre_aud:: {f"{uid}-tmp_aud.mp4"}')
 
29
  return vid, vid_aud, f"{uid}-tmp_aud.mp4"
30
 
31
  def trim_clip(clip, start_t, end_t):
32
+ clip = Path(f"{uid}-tmp_aud.mp4")
33
+ song = AudioSegment.from_file(f"{uid}-tmp_aud.mp4", format="mp4")
34
+ #song = AudioSegment.from_file(Path(f"{clip}"), format="mp4")
35
  start_min = int(start_t.split(":",1)[0])
36
  start_sec = int(start_t.split(":",1)[1])
37
  end_min = int(end_t.split(":",1)[0])
 
44
 
45
  return f"{uid}-trim.wav"
46
  def pre_aud(inp):
47
+ print(inp)
48
  song = AudioSegment.from_file(Path(f'{inp}'), format="mp4")
49
  song.export(f"{uid}-tmp_aud.mp4", format="mp4")
50
  print(f'pre_aud:: {f"{uid}-tmp_aud.mp4"}')