Spaces:
Runtime error
Runtime error
srinivasbilla
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -52,7 +52,7 @@ def extract_speech_ids(speech_tokens_str):
|
|
52 |
print(f"Unexpected token: {token_str}")
|
53 |
return speech_ids
|
54 |
|
55 |
-
@spaces.GPU(duration=
|
56 |
def infer(sample_audio_path, target_text, progress=gr.Progress()):
|
57 |
with tempfile.NamedTemporaryFile(delete=False, suffix=".wav") as f:
|
58 |
progress(0, 'Loading and trimming audio...')
|
@@ -104,7 +104,7 @@ def infer(sample_audio_path, target_text, progress=gr.Progress()):
|
|
104 |
# Generate the speech autoregressively
|
105 |
outputs = model.generate(
|
106 |
input_ids,
|
107 |
-
max_length=
|
108 |
eos_token_id= speech_end_id ,
|
109 |
do_sample=True,
|
110 |
top_p=1,
|
|
|
52 |
print(f"Unexpected token: {token_str}")
|
53 |
return speech_ids
|
54 |
|
55 |
+
@spaces.GPU(duration=60)
|
56 |
def infer(sample_audio_path, target_text, progress=gr.Progress()):
|
57 |
with tempfile.NamedTemporaryFile(delete=False, suffix=".wav") as f:
|
58 |
progress(0, 'Loading and trimming audio...')
|
|
|
104 |
# Generate the speech autoregressively
|
105 |
outputs = model.generate(
|
106 |
input_ids,
|
107 |
+
max_length=1024, # We trained our model with a max length of 2048
|
108 |
eos_token_id= speech_end_id ,
|
109 |
do_sample=True,
|
110 |
top_p=1,
|