Omnibus commited on
Commit
7cb7a32
1 Parent(s): 75582c2

Update vc.py

Browse files
Files changed (1) hide show
  1. vc.py +8 -1
vc.py CHANGED
@@ -43,6 +43,13 @@ def run_bark(text, n='1', lang='en'):
43
  return (f"bark_out-{uid}.wav")
44
 
45
 
 
 
 
 
 
 
 
46
 
47
  def custom_bark(inp, tog, in_aud=None, trim_aud=None, in_aud_mic=None):
48
  if tog=="Custom":
@@ -57,7 +64,7 @@ def custom_bark(inp, tog, in_aud=None, trim_aud=None, in_aud_mic=None):
57
  tts.tts_to_file(inp, speaker_wav=speaker_wav, language="en", file_path=f"{uid}-output.wav")
58
  return (f"{uid}-output.wav")
59
  if tog=="Preset":
60
- return (run_bark(inp))
61
  def load_video_yt(vid):
62
  yt = YouTube(vid)
63
  vid = yt.streams.filter(progressive=True, file_extension='mp4').order_by('resolution').desc().first().download(filename=f"{uid}-tmp.mp4")
 
43
  return (f"bark_out-{uid}.wav")
44
 
45
 
46
+ tts = TTS(model_name=f"tts_models/en/ljspeech/fast_pitch", progress_bar=False).to("cpu")
47
+
48
+ def bark_ez(text, n='1', land='en'):
49
+ uid=uuid.uuid4()
50
+ tts.tts_to_file(output, file_path=f"{uid}-output.wav")
51
+ return (f'{uid}-output.wav')
52
+
53
 
54
  def custom_bark(inp, tog, in_aud=None, trim_aud=None, in_aud_mic=None):
55
  if tog=="Custom":
 
64
  tts.tts_to_file(inp, speaker_wav=speaker_wav, language="en", file_path=f"{uid}-output.wav")
65
  return (f"{uid}-output.wav")
66
  if tog=="Preset":
67
+ return (bark_ez(inp))
68
  def load_video_yt(vid):
69
  yt = YouTube(vid)
70
  vid = yt.streams.filter(progressive=True, file_extension='mp4').order_by('resolution').desc().first().download(filename=f"{uid}-tmp.mp4")