File size: 402 Bytes
e001d2e 0e31adc be36f5d |
1 2 3 4 5 6 7 8 9 10 11 12 13 |
from bark import SAMPLE_RATE, generate_audio, preload_models
from scipy.io.wavfile import write as write_wav
from IPython.display import Audio
# download and load all models
preload_models()
def speaking(input):
print("####TEXT TO SPEACH####")
audio_array = generate_audio(input)
write_wav("DoTTS_generation.wav", SAMPLE_RATE, audio_array)
return Audio(audio_array, rate=SAMPLE_RATE)
|