Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -129,11 +129,12 @@ def modelspeech(text=TXT,name_model="wasmdashai/vits-ar-sa-huba-v2",speaking_r
|
|
129 |
model=get_model(name_model)
|
130 |
model.speaking_rate=speaking_rate
|
131 |
with torch.no_grad():
|
132 |
-
|
133 |
# with torch.no_grad():
|
134 |
# wav = model(input_ids=inputs["input_ids"].cuda()).waveform.cpu().numpy().reshape(-1)#.detach()
|
135 |
|
136 |
-
|
|
|
137 |
|
138 |
model_choices = gr.Dropdown(
|
139 |
choices=[
|
|
|
129 |
model=get_model(name_model)
|
130 |
model.speaking_rate=speaking_rate
|
131 |
with torch.no_grad():
|
132 |
+
wavs=_inference_forward_stream(model,input_ids=inputs.input_ids,attention_mask=inputs.attention_mask,speaker_embeddings= None,is_streaming=True)
|
133 |
# with torch.no_grad():
|
134 |
# wav = model(input_ids=inputs["input_ids"].cuda()).waveform.cpu().numpy().reshape(-1)#.detach()
|
135 |
|
136 |
+
for wav in wavs:
|
137 |
+
yield (model.config.sampling_rate,wav)
|
138 |
|
139 |
model_choices = gr.Dropdown(
|
140 |
choices=[
|