File size: 402 Bytes
fcf3782
1e96a52
 
 
fcf3782
56caa10
 
 
 
fcf3782
56caa10
fcf3782
1
2
3
4
5
6
7
8
9
10
11
12
13
import gradio as gr
from models.tacotron2 import Tacotron2Wave
model = Tacotron2Wave('pretrained/tacotron2_ar_adv.pth')
#model = model.cuda()

def greet(text):
    wave = model.tts("يعطوني  على حسب العذر التمديد من اسبوع الى اسبوعين ")
  
    return 22025,wave.view(-1).cpu().numpy()

demo = gr.Interface(fn=greet, inputs="text", outputs="audio")
demo.launch()