Ahsen Khaliq commited on
Commit
3f2e884
β€’
1 Parent(s): 633eaa6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -74,13 +74,13 @@ text2speechch = Text2Speech.from_pretrained(
74
 
75
  def inference(text,lang):
76
  with torch.no_grad():
77
- if lang == "english"
78
  wav = text2speechen(text)["wav"]
79
  scipy.io.wavfile.write("out.wav",text2speechen.fs , wav.view(-1).cpu().numpy())
80
- if lang == "chinese"
81
  wav = text2speechch(text)["wav"]
82
  scipy.io.wavfile.write("out.wav",text2speechench.fs , wav.view(-1).cpu().numpy())
83
- if lang == "japanese"
84
  wav = text2speechjp(text)["wav"]
85
  scipy.io.wavfile.write("out.wav",text2speechjp.fs , wav.view(-1).cpu().numpy())
86
  return "out.wav"
 
74
 
75
  def inference(text,lang):
76
  with torch.no_grad():
77
+ if lang == "english":
78
  wav = text2speechen(text)["wav"]
79
  scipy.io.wavfile.write("out.wav",text2speechen.fs , wav.view(-1).cpu().numpy())
80
+ if lang == "chinese":
81
  wav = text2speechch(text)["wav"]
82
  scipy.io.wavfile.write("out.wav",text2speechench.fs , wav.view(-1).cpu().numpy())
83
+ if lang == "japanese":
84
  wav = text2speechjp(text)["wav"]
85
  scipy.io.wavfile.write("out.wav",text2speechjp.fs , wav.view(-1).cpu().numpy())
86
  return "out.wav"