srinivasbilla commited on
Commit
6ff754c
Β·
verified Β·
1 Parent(s): 3a20400

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
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=120)
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=2048, # 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,
 
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,