yasserrmd commited on
Commit
bfbd340
·
verified ·
1 Parent(s): 720869b

Update generate_audio.py

Browse files
Files changed (1) hide show
  1. generate_audio.py +2 -2
generate_audio.py CHANGED
@@ -116,8 +116,8 @@ class TTSGenerator:
116
  # audio_arr = speech_output[0].cpu().numpy()
117
  # return audio_arr, self.bark_sampling_rate
118
  # Tokenize input text and obtain input IDs and attention mask
119
- inputs = bark_processor(text, voice_preset="v2/en_speaker_6").to(device)
120
- speech_output = bark_model.generate(**inputs, temperature=0.9, semantic_temperature=0.8)
121
  audio_arr = speech_output[0].cpu().numpy()
122
  return audio_arr, self.bark_sampling_rate
123
 
 
116
  # audio_arr = speech_output[0].cpu().numpy()
117
  # return audio_arr, self.bark_sampling_rate
118
  # Tokenize input text and obtain input IDs and attention mask
119
+ inputs = self.bark_processor(text, voice_preset="v2/en_speaker_6").to(device)
120
+ speech_output = self.bark_model.generate(**inputs, temperature=0.9, semantic_temperature=0.8)
121
  audio_arr = speech_output[0].cpu().numpy()
122
  return audio_arr, self.bark_sampling_rate
123