Spaces:
Runtime error
Runtime error
ASG Models
commited on
Update app.py
Browse files
app.py
CHANGED
|
@@ -137,7 +137,7 @@ def generate_audio_ai(text,name_model):
|
|
| 137 |
#torch.cuda.empty_cache()
|
| 138 |
with torch.no_grad():
|
| 139 |
for chunk in _inference_forward_stream(model,input_ids=inputs.input_ids,attention_mask=inputs.attention_mask,speaker_embeddings= speaker_embeddings,chunk_size=64):
|
| 140 |
-
yield 16000,chunk.
|
| 141 |
|
| 142 |
# yield generate_audio(text_answer,name_model)
|
| 143 |
def remove_extra_spaces(text):
|
|
|
|
| 137 |
#torch.cuda.empty_cache()
|
| 138 |
with torch.no_grad():
|
| 139 |
for chunk in _inference_forward_stream(model,input_ids=inputs.input_ids,attention_mask=inputs.attention_mask,speaker_embeddings= speaker_embeddings,chunk_size=64):
|
| 140 |
+
yield 16000,chunk.cpu().numpy().squeeze()#.astype(np.int16).tobytes()
|
| 141 |
|
| 142 |
# yield generate_audio(text_answer,name_model)
|
| 143 |
def remove_extra_spaces(text):
|