stevenhillis commited on
Commit
ea0162a
1 Parent(s): 9c1a82f

Forgot text param

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -18,7 +18,7 @@ def tts_fn(text, prompt_audio, prompt_seconds, inference_steps, inference_temper
18
  byte_io = io.BytesIO(bytes())
19
  wavfile.write(byte_io, sr, prompt_audio)
20
  prompt_audio_bytes = byte_io.read()
21
- params={'synthesize': 'true', 'pitch_steps': int(pitch_steps), 'soundstorm_steps': inference_steps, 'temperature': inference_temperature, 'prompt_seconds': prompt_seconds}
22
  response = requests.post(base_url, data=prompt_audio_bytes, params=params, headers={'Authorization': f'Token {token_str}'})
23
  try:
24
  with open('result.wav', 'wb') as f:
 
18
  byte_io = io.BytesIO(bytes())
19
  wavfile.write(byte_io, sr, prompt_audio)
20
  prompt_audio_bytes = byte_io.read()
21
+ params={'synthesize': 'true', 'text': urllib.parse.quote(text), 'pitch_steps': int(pitch_steps), 'soundstorm_steps': inference_steps, 'temperature': inference_temperature, 'prompt_seconds': prompt_seconds}
22
  response = requests.post(base_url, data=prompt_audio_bytes, params=params, headers={'Authorization': f'Token {token_str}'})
23
  try:
24
  with open('result.wav', 'wb') as f: