conds=quantizer(wavs=wavs,namespace='semantic')# (2, 8, 1024) - 8 is number of quantizers
```
After much training, you will pass your finetuned or trained-from-scratch `AudioLM` and `MuLaN` wrapped in `MuLaNEmbedQuantizer` to the `MusicLM`
To train (or finetune) the three transformers that are a part of `AudioLM`, you simply follow the instructions over at `audiolm-pytorch` for training, but pass in the `MulanEmbedQuantizer` instance to the training classes under the keyword `audio_conditioner`
audio_conditioner=quantizer,# pass in the MulanEmbedQuantizer instance above
folder='/path/to/audio/files',
batch_size=1,
data_max_length=320*32,
num_train_steps=1
)
trainer.train()
```
After much training on all three transformers (semantic, coarse, fine), you will pass your finetuned or trained-from-scratch `AudioLM` and `MuLaN` wrapped in `MuLaNEmbedQuantizer` to the `MusicLM`
assertnotexists(audio_lm.audio_conditioner),'mulan must not have been passed into AudioLM. it will be managed externally now, embedding the text into the joint embedding space for text-to-audio synthesis'