Dionyssos's picture
apply null cond lm.forw()
6cb7713
raw
history blame
432 Bytes
import audiofile
import numpy as np
from audiocraft import AudioGen
text_list = ['dogs barging in the street',
'music']
sound_generator = AudioGen(duration=.74,
device='cuda:0').to('cuda:0').eval()
x = sound_generator.generate(text_list) # [bs, 1, 7680]
# print('demo', x.shape)
x = x[0, :, :].detach().cpu().numpy()
x /= np.abs(x).max() + 1e-7
audiofile.write('del_seane.wav', x, 16000)