Gregniuki commited on
Commit
22e294e
·
verified ·
1 Parent(s): 4feb122

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -61,7 +61,7 @@ print(f"Using device: {device}, dtype: {dtype}")
61
  pipe = pipeline(
62
  "automatic-speech-recognition",
63
  model="openai/whisper-large-v3-turbo",
64
- torch_dtype=torch.float32,
65
  device=device,
66
  )
67
  #vocos = Vocos.from_pretrained("charactr/vocos-mel-24khz")
@@ -344,7 +344,7 @@ def infer(ref_audio_orig, ref_text, gen_text, exp_name, remove_silence, cross_fa
344
  audio, sr = torchaudio.load(ref_audio)
345
 
346
  # Use the new chunk_text function to split gen_text
347
- max_chars = int(len(ref_text.encode('utf-8')) / (audio.shape[-1] / sr) * (28 - audio.shape[-1] / sr))
348
  gen_text_batches = chunk_text(gen_text, max_chars=135)
349
  print('ref_text', ref_text)
350
  for i, batch_text in enumerate(gen_text_batches):
 
61
  pipe = pipeline(
62
  "automatic-speech-recognition",
63
  model="openai/whisper-large-v3-turbo",
64
+ torch_dtype=dtype,
65
  device=device,
66
  )
67
  #vocos = Vocos.from_pretrained("charactr/vocos-mel-24khz")
 
344
  audio, sr = torchaudio.load(ref_audio)
345
 
346
  # Use the new chunk_text function to split gen_text
347
+ max_chars = int(len(ref_text.encode('utf-8')) / (audio.shape[-1] / sr) * (25 - audio.shape[-1] / sr))
348
  gen_text_batches = chunk_text(gen_text, max_chars=135)
349
  print('ref_text', ref_text)
350
  for i, batch_text in enumerate(gen_text_batches):