stevenhillis commited on
Commit
5d0f451
·
1 Parent(s): 9eec6ef

try no reshape

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -11,7 +11,7 @@ token_str = os.environ['DG_TOKEN']
11
  def tts_fn(text, prompt_audio, prompt_seconds, inference_steps, inference_temperature, pitch_steps):
12
  texts = [text]
13
  sr = prompt_audio[0]
14
- prompt_audio = np.reshape(prompt_audio[1], (1, -1)).astype(np.float32, order='C') / 32768.0
15
  byte_io = io.BytesIO(bytes())
16
  wavfile.write(byte_io, sr, prompt_audio)
17
  prompt_audio_bytes = byte_io.read()
 
11
  def tts_fn(text, prompt_audio, prompt_seconds, inference_steps, inference_temperature, pitch_steps):
12
  texts = [text]
13
  sr = prompt_audio[0]
14
+ prompt_audio = prompt_audio[1].astype(np.float32, order='C') / 32768.0
15
  byte_io = io.BytesIO(bytes())
16
  wavfile.write(byte_io, sr, prompt_audio)
17
  prompt_audio_bytes = byte_io.read()