Training and testing
After the previous steps, training and testing can be achieved through 3_train.py and 4_test.py.
The first script trains a Tacotron model on the prepared training set across the NB_EPOCHS epochs, and then saves the model in the /results folder.
The second script allows the user to apply the previously saved model on any transcript of testing dataset. The selection of the audio to predict is done through a variable, item_index, which should contain the index (in the testing dataset) of the wanted item.
The estimated spectrogram is then converted to a waveform through the Griffin-Lim algorithm. The conversion function, from_spectro_to_waveform, is defined in the /processing/proc_audio.py file.
We strongly encourage the ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access