gorkemgoknar commited on
Commit
a166963
·
1 Parent(s): d9adead

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +16 -14
app.py CHANGED
@@ -171,21 +171,23 @@ def predict(prompt, language, audio_file_pth, mic_file_path, use_mic, voice_clea
171
 
172
  metrics_text= ""
173
 
174
- t_latent=time.time()
175
- gpt_cond_latent, _, speaker_embedding = model.get_conditioning_latents(audio_path=speaker_wav)
176
- latent_calculation_time = time.time() - t_latent
177
- ##metrics_text=f"Embedding calculation time: {latent_calculation_time:.2f} seconds\n"
178
-
179
- wav_chunks = []
180
-
181
- t_inference=time.time()
182
-
183
- chunks = model.inference_stream(
184
- prompt,
185
- language,
186
- gpt_cond_latent,
187
- speaker_embedding,)
188
  try:
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
189
  first_chunk=True
190
  for i, chunk in enumerate(chunks):
191
  if first_chunk:
 
171
 
172
  metrics_text= ""
173
 
174
+
 
 
 
 
 
 
 
 
 
 
 
 
 
175
  try:
176
+ t_latent=time.time()
177
+ gpt_cond_latent, _, speaker_embedding = model.get_conditioning_latents(audio_path=speaker_wav)
178
+ latent_calculation_time = time.time() - t_latent
179
+ ##metrics_text=f"Embedding calculation time: {latent_calculation_time:.2f} seconds\n"
180
+
181
+ wav_chunks = []
182
+
183
+ t_inference=time.time()
184
+
185
+ chunks = model.inference_stream(
186
+ prompt,
187
+ language,
188
+ gpt_cond_latent,
189
+ speaker_embedding,)
190
+
191
  first_chunk=True
192
  for i, chunk in enumerate(chunks):
193
  if first_chunk: