hhguo commited on
Commit
ffbecfe
·
1 Parent(s): 450be06
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -25,6 +25,7 @@ if not os.path.exists('pretrained_models/fireredtts_gpt.pt'):
25
  'pretrained_models/fireredtts_token2wav.pt')
26
 
27
 
 
28
  tts = FireRedTTS(
29
  config_path="configs/config_24k.json",
30
  pretrained_path='pretrained_models',
@@ -38,7 +39,7 @@ def tts_inference(text, prompt_wav='examples/prompt_1.wav', lang='zh'):
38
  )[0].detach().cpu().numpy()
39
  print(f'Generate waveform with the shape of {syn_audio.shape}')
40
  syn_audio = (syn_audio * 32768).astype(np.int16)
41
- return 48000, syn_audio
42
 
43
 
44
  iface = gr.Interface(
 
25
  'pretrained_models/fireredtts_token2wav.pt')
26
 
27
 
28
+ sampling_rate = 24000
29
  tts = FireRedTTS(
30
  config_path="configs/config_24k.json",
31
  pretrained_path='pretrained_models',
 
39
  )[0].detach().cpu().numpy()
40
  print(f'Generate waveform with the shape of {syn_audio.shape}')
41
  syn_audio = (syn_audio * 32768).astype(np.int16)
42
+ return sampling_rate, syn_audio
43
 
44
 
45
  iface = gr.Interface(