Hilley commited on
Commit
3cf00a5
1 Parent(s): f106107

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -4
app.py CHANGED
@@ -87,13 +87,16 @@ def generate_audio(text, audio_ref, temperature, top_P, top_K, audio_seed_input,
87
  save_path = "output.wav"
88
 
89
  # Run the base speaker tts
90
- src_path = "tmp.wav"
91
- chat_tts(text, temperature, top_P, top_K, audio_seed_input, text_seed_input, refine_text_flag, refine_text_input, src_path)
 
 
92
 
93
  # Run the tone color converter
94
  encode_message = "@Hilley"
95
- tone_color_converter.convert(
96
- audio_src_path=src_path,
 
97
  src_se=source_se,
98
  tgt_se=target_se,
99
  output_path=save_path,
 
87
  save_path = "output.wav"
88
 
89
  # Run the base speaker tts
90
+ #src_path = "tmp.wav"
91
+ #chat_tts(text, temperature, top_P, top_K, audio_seed_input, text_seed_input, refine_text_flag, refine_text_input, src_path)
92
+ src_path = None
93
+ sample_rate, audio = chat_tts(text, temperature, top_P, top_K, audio_seed_input, text_seed_input, refine_text_flag, refine_text_input, src_path)[0]
94
 
95
  # Run the tone color converter
96
  encode_message = "@Hilley"
97
+ tone_color_converter.convert_data(
98
+ audio=audio,
99
+ sample_rate=sample_rate,
100
  src_se=source_se,
101
  tgt_se=target_se,
102
  output_path=save_path,