Spaces:
Sleeping
Sleeping
ASG Models
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -146,17 +146,9 @@ def generate_audio_ai(text,name_model):
|
|
146 |
for chunk in _inference_forward_stream(model,input_ids=inputs.input_ids,attention_mask=inputs.attention_mask,speaker_embeddings= speaker_embeddings,chunk_size=256):
|
147 |
yield 16000,remove_noise_nr(chunk)#.cpu().numpy().squeeze()#.astype(np.int16).tobytes()
|
148 |
|
149 |
-
|
150 |
def remove_extra_spaces(text):
|
151 |
-
"""
|
152 |
-
Removes extra spaces between words in a string.
|
153 |
|
154 |
-
Args:
|
155 |
-
text: The string to process.
|
156 |
-
|
157 |
-
Returns:
|
158 |
-
The string with extra spaces removed.
|
159 |
-
"""
|
160 |
return ' '.join(text.split())
|
161 |
|
162 |
def query(text,API_URL):
|
|
|
146 |
for chunk in _inference_forward_stream(model,input_ids=inputs.input_ids,attention_mask=inputs.attention_mask,speaker_embeddings= speaker_embeddings,chunk_size=256):
|
147 |
yield 16000,remove_noise_nr(chunk)#.cpu().numpy().squeeze()#.astype(np.int16).tobytes()
|
148 |
|
149 |
+
|
150 |
def remove_extra_spaces(text):
|
|
|
|
|
151 |
|
|
|
|
|
|
|
|
|
|
|
|
|
152 |
return ' '.join(text.split())
|
153 |
|
154 |
def query(text,API_URL):
|