Aki004 commited on
Commit
8fca5f5
1 Parent(s): dd7ea67

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -5
app.py CHANGED
@@ -32,11 +32,8 @@ def tts_mode(txt, voice):
32
  raw_path.seek(0)
33
  model = Svc(fr"Herta-Svc/G_10000.pth", f"Herta-Svc/config.json", device = 'cpu')
34
  out_audio, out_sr = model.infer('speaker0', 0, raw_path, auto_predict_f0 = True,)
35
- soundfile.write('xxx.wav', out_audio.cpu().numpy(), 44100)
36
- audio_file = open('xxx.wav', 'rb')
37
- audio_bytes = audio_file.read()
38
-
39
- return audio_bytes
40
 
41
  if __name__ == '__main__':
42
  parser = argparse.ArgumentParser()
 
32
  raw_path.seek(0)
33
  model = Svc(fr"Herta-Svc/G_10000.pth", f"Herta-Svc/config.json", device = 'cpu')
34
  out_audio, out_sr = model.infer('speaker0', 0, raw_path, auto_predict_f0 = True,)
35
+
36
+ return (44100, out_audio.cpu().numpy())
 
 
 
37
 
38
  if __name__ == '__main__':
39
  parser = argparse.ArgumentParser()