!git clone https://github.com/CSTR-Edinburgh/merlin

Merlin needs bandmat, but there's an issue with Python 3.7 and Cython, so build it separately:

%%capture
!pip install git+https://github.com/MattShannon/bandmat
%cd merlin
/kaggle/working/merlin
%%capture
!pip install -r requirements.txt
%cd tools
/kaggle/working/merlin/tools
%%capture
!apt-get -y install csh automake autoconf
!./compile_tools.sh
%cd /kaggle/working/merlin
/kaggle/working/merlin
%cd egs/slt_arctic
/kaggle/working/merlin/egs/slt_arctic
!cat README
About the SLT Arctic corpus

The CMU_ARCTIC databases were constructed at the Language Technologies Institute at Carnegie Mellon University as phonetically balanced, US English single speaker databases designed for unit selection speech synthesis research.

The databases consist of around 1150 utterances carefully selected from out-of-copyright texts from Project Gutenberg. The databses include US English male (bdl) and female (slt) speakers (both experienced voice talent) as well as other accented speakers.

Each subdirectory of this directory contains the
scripts for a sequence of experiments.

  s1: To run slt_arctic_demo with WORLD vocoder.
  s2: To run slt_arctic_demo with MagPhase vocoder (includes acoustic feature extraction).


%cd s1
/kaggle/working/merlin/egs/slt_arctic/s1
!ls
01_setup.sh		    RESULTS.md		 scripts
02_prepare_conf_files.sh    conf		 slt_arctic_full_data
03_train_duration_model.sh  experiments		 slt_arctic_full_data.zip
04_train_acoustic_model.sh  merlin_synthesis.sh  testrefs
05_run_merlin.sh	    run_demo.sh
README.md		    run_full_voice.sh
!./01_setup.sh
################################
Usage:
Chose any of the below datasets
To run on short data:
./01_setup.sh slt_arctic_demo
./01_setup.sh awb_arctic_demo
              (or)          
To run on full data:
./01_setup.sh slt_arctic_full
./01_setup.sh awb_arctic_full
./01_setup.sh bdl_arctic_full
################################
!./01_setup.sh slt_arctic_full
Step 1:
downloading data.....
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  247M  100  247M    0     0  23.1M      0  0:00:10  0:00:10 --:--:-- 26.5M
unzipping files......
data is ready!
Merlin default voice settings configured in conf/global_settings.cfg
setup done...!
!./02_prepare_conf_files.sh
################################
Usage:
./02_prepare_conf_files.sh <path_to_global_conf_file>

default path to global conf file: conf/global_settings.cfg
Config files will be prepared based on settings in global conf file
################################
!cat conf/global_settings.cfg
MerlinDir=/kaggle/working/merlin
WorkDir=/kaggle/working/merlin/egs/slt_arctic/s1
Voice=slt_arctic_full
Labels=state_align
QuestionFile=questions-radio_dnn_416.hed
Vocoder=WORLD
SamplingFreq=16000
FileIDList=file_id_list_full.scp
Train=1000
Valid=66
Test=66
!./02_prepare_conf_files.sh conf/global_settings.cfg
Step 2:
preparing config files for acoustic, duration models...
Duration configuration settings stored in conf/duration_slt_arctic_full.conf
Acoustic configuration settings stored in conf/acoustic_slt_arctic_full.conf
preparing config files for synthesis...
Duration configuration settings stored in conf/test_dur_synth_slt_arctic_full.conf
Acoustic configuration settings stored in conf/test_synth_slt_arctic_full.conf
!./03_train_duration_model.sh
################################
Usage:
./03_train_duration_model.sh <path_to_duration_conf_file>

Default path to duration conf file: conf/duration_slt_arctic_full.conf
################################
!./03_train_duration_model.sh conf/duration_slt_arctic_full.conf
Step 3:
training duration model...
Architecture: x86_64
Distribution: Ubuntu 18.04.5 LTS
HOSTNAME=37a070d6fe91
USER=
 
PATH:
    /opt/conda/bin
    /usr/local/sbin
    /usr/local/bin
    /usr/sbin
    /usr/bin
    /sbin
    /bin
LD_LIBRARY_PATH:
    /opt/conda/lib
PYTHONPATH:
    /kaggle/lib/kagglegym
    /kaggle/lib
PYTHONBIN: python
MERLIN_THEANO_FLAGS:
    cuda.root=/usr/local/8.0
    floatX=float32
    on_unused_input=ignore
 
No GPU is available! Running on CPU...
/opt/conda/lib/python3.7/site-packages/theano/configparser.py:255: UserWarning: Theano does not recognise this flag: cuda.root
  warnings.warn(f"Theano does not recognise this flag: {key}")
Traceback (most recent call last):
  File "/kaggle/working/merlin/src/run_merlin.py", line 74, in <module>
    from models.deep_rnn import DeepRecurrentNetwork
  File "/kaggle/working/merlin/src/models/deep_rnn.py", line 9, in <module>
    from theano.tensor.shared_randomstreams import RandomStreams
ModuleNotFoundError: No module named 'theano.tensor.shared_randomstreams'