Somalitts commited on
Commit
f76188c
·
verified ·
1 Parent(s): 4c9fdb8

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -6
app.py CHANGED
@@ -142,12 +142,7 @@ def normalize_text(text):
142
 
143
  return text
144
 
145
- def text_to_speech(text):
146
- text = normalize_text(text)
147
- inputs = processor(text=text, return_tensors="pt").to(device)
148
- with torch.no_grad():
149
- speech = model.generate_speech(inputs["input_ids"], speaker_embedding.unsqueeze(0), vocoder=vocoder)
150
- return (16000, speech.cpu().numpy())
151
 
152
  iface = gr.Interface(
153
  fn=text_to_speech,
 
142
 
143
  return text
144
 
145
+
 
 
 
 
 
146
 
147
  iface = gr.Interface(
148
  fn=text_to_speech,