Spaces:
Running
on
Zero
Running
on
Zero
Upload app.py
Browse files
app.py
CHANGED
@@ -316,10 +316,10 @@ def generate(text, voice='af', ps=None, speed=1, trim=0.5, use_gpu='auto', sk=No
|
|
316 |
out = forward(tokens, voices, speed, sk)
|
317 |
else:
|
318 |
raise gr.Error(e)
|
319 |
-
print(debug, datetime.now(), voices, text, len(ps), use_gpu, repr(e))
|
320 |
return (None, '')
|
321 |
out = trim_if_needed(out, trim)
|
322 |
-
print(debug, datetime.now(), voices, text, len(ps), use_gpu, len(out))
|
323 |
return ((SAMPLE_RATE, out), ps)
|
324 |
|
325 |
def toggle_autoplay(autoplay):
|
@@ -629,7 +629,7 @@ def lf_generate(segments, voice, speed=1, trim=0, pad_between=0, use_gpu=True, s
|
|
629 |
while i < len(token_lists):
|
630 |
bs = batch_sizes.pop() if batch_sizes else 100
|
631 |
tokens = token_lists[i:i+bs]
|
632 |
-
print('📖', datetime.now(), len(tokens), voices, use_gpu, segments['Text'])
|
633 |
try:
|
634 |
if use_gpu:
|
635 |
outs = lf_forward_gpu(tokens, voices, speed, sk)
|
|
|
316 |
out = forward(tokens, voices, speed, sk)
|
317 |
else:
|
318 |
raise gr.Error(e)
|
319 |
+
print(debug, datetime.now(), voices, repr(text), len(ps), use_gpu, repr(e))
|
320 |
return (None, '')
|
321 |
out = trim_if_needed(out, trim)
|
322 |
+
print(debug, datetime.now(), voices, repr(text), len(ps), use_gpu, len(out))
|
323 |
return ((SAMPLE_RATE, out), ps)
|
324 |
|
325 |
def toggle_autoplay(autoplay):
|
|
|
629 |
while i < len(token_lists):
|
630 |
bs = batch_sizes.pop() if batch_sizes else 100
|
631 |
tokens = token_lists[i:i+bs]
|
632 |
+
print('📖', datetime.now(), len(tokens), voices, use_gpu, segments['Text'][i:i+bs])
|
633 |
try:
|
634 |
if use_gpu:
|
635 |
outs = lf_forward_gpu(tokens, voices, speed, sk)
|