Text-to-Speech
Safetensors
Hecheng0625 commited on
Commit
0ac1ca9
1 Parent(s): 630cca5

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +17 -1
README.md CHANGED
@@ -107,6 +107,22 @@ if __name__ == "__main__":
107
  target_text = "In this paper, we introduce MaskGCT, a fully non-autoregressive TTS model that eliminates the need for explicit alignment information between text and speech supervision."
108
  # Specify the target duration (in seconds). If target_len = None, we use a simple rule to predict the target duration.
109
  target_len = 18
110
- recovered_audio = maskgct_inference(prompt_wav_path, prompt_text, target_text, "en", "en", target_len=target_len)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
111
  sf.write(save_path, recovered_audio, 24000)
112
  ```
 
107
  target_text = "In this paper, we introduce MaskGCT, a fully non-autoregressive TTS model that eliminates the need for explicit alignment information between text and speech supervision."
108
  # Specify the target duration (in seconds). If target_len = None, we use a simple rule to predict the target duration.
109
  target_len = 18
110
+
111
+ maskgct_inference_pipeline = MaskGCT_Inference_Pipeline(
112
+ semantic_model,
113
+ semantic_codec,
114
+ codec_encoder,
115
+ codec_decoder,
116
+ t2s_model,
117
+ s2a_model_1layer,
118
+ s2a_model_full,
119
+ semantic_mean,
120
+ semantic_std,
121
+ device,
122
+ )
123
+
124
+ recovered_audio = maskgct_inference_pipeline.maskgct_inference(
125
+ prompt_wav_path, prompt_text, target_text, "en", "en", target_len=target_len
126
+ )
127
  sf.write(save_path, recovered_audio, 24000)
128
  ```