Spaces:
Running
Running
Update generate_audio.py
Browse files- generate_audio.py +1 -1
generate_audio.py
CHANGED
@@ -116,7 +116,7 @@ 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 = self.bark_processor(text, voice_preset=self.voice_preset
|
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
|
|
|
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=self.voice_preset).to(self.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
|