''' == Creating HMM voices for MARY with the HMM Voice building tools. == ''' The steps for building a HMM voice for Mary system can be summarised in:[[BR]] I) Checking the necessary programs and files[[BR]] II) Data preparation[[BR]] III) Training of HMM models[[BR]] IV) Adding a new HMM voice in the Mary system.[[BR]] The following is an explanation of these steps for running the HTS-demo_CMU-ARCTIC-SLT (http://hts.sp.nitech.ac.jp/archives/2.0.1/HTS-demo_CMU-ARCTIC-SLT.tar.bz2) using the Mary system. The training scripts used here are the latest versions, that is, it is required HTS_2.0.1 and SPTK-3.1. Some scripts have been added-modified to:[[BR]] - Use Mary instead of festival as text analyzer.[[BR]] - Train bandpass voicing strengths for mixed excitation.[[BR]] - Process language specific settings as parameters.[[BR]] ''' === I) Checking the necessary programs and files: === ''' MARY requirements:[[BR]] - Operating System - Linux[[BR]] - MARY TTS Recent Version - Download Link: http://mary.dfki.de/Download [[BR]] - Openmary - SVN from http://mary.opendfki.de [[BR]] - Mary patch for HTS demo: HTS-2.0.1-demo_CMU-ARCTIC-SLT_for_Mary-3.5.0.patch [[BR]] HTS requirements, please download and follow the instructions for installing:[[BR]] - HTK-3.4 [[BR]] - HTS-2.0.1_for_HTK-3.4.patch [[BR]] - SPTK-3.1 [[BR]] - HTS-demo_CMU-ARCTIC-SLT (for HTS-2.0.1) [[BR]] Other requirements, please download and follow the instructions for installing: [[BR]] - EHMM for automatic labeling, available with festvox-2.1 (Recent Version) http://festvox.org/download.html [[BR]] - sox, normally available in linux. [[BR]] - tcl-tk supporting snack, for example ActiveTcl - Download Link: http://www.activestate.com/Products/ActiveTcl/ [[BR]] - perl, normally available in linux. [[BR]] 0.1) download and un-zip, un-tar the latest Speaker dependent training demo for English. Here it is used: HTS-demo_CMU-ARCTIC-SLT.tar.bz2 for HTS-2.0.1 0.2) download the patch file for using Mary instead of Festival text analyser. attachment: HTS-2.0.1-demo_CMU-ARCTIC-SLT_for_Mary-3.5.0.patch [[BR]] apply the patch to the HTS-demo_CMU-ARCTIC-SLT directory: [[BR]] patch -p1 -d . < HTS-2.0.1-demo_CMU-ARCTIC-SLT_for_Mary-3.5.0.patch 0.3) create a wav directory. 0.4) Run the VoiceImport program First of all you need to set your MARY_BASE directory: [[BR]] export MARY_BASE="/dir/to/openmary" then you can run: [[BR]] java -jar -Xmx1024m $MARY_BASE/java/voiceimport.jar If you are not familiar or have problems with the VoiceImport program, please read and follow the instructions in the Voice Import Tools Tutorial: http://mary.opendfki.de/wiki/VoiceImportToolsTutorial If you want to create another voice in German or English please see the section V below. ''' === II) Data preparation: === ''' 1- Run HMMVoiceDataPreparation of the HMM Voice Trainer group, to check if text, wav and data/raw files are available and in the correct paths. If just data/raw provided, the program will do the conversion. If no text files are available but data/utts in festival format, the program will do the conversion as well. 2- Run PhoneUnitFeatureComputer component of the Feature Extraction group to extract context feature vectors from the text data. This procedure will create a "phonefeatures" directory. For running this component the MARY server should be running as well. 3- Run the EHMMlabeler component of the Automatic Labeling group to label automatically the wav files using the corresponding transcriptions. For running EHMMLabeler, please set: [[BR]] * EHMMLabeler.ehmm to corresponding path in ../festvox/src/ehmm/bin/ 4- Run LabelPauseDeleter component of the Automatic Labeling group. Please set: [[BR]] * LabelPauseDeleter.threshold = 10. 5- Run PhoneUnitLabelComputer component of the Labels and Pause Correction group. 6- Run PhonelabelFeatureAligner component of the Labels and Pause Correction group. This procedure will create a "phonelab" directory. ''' === III) HMM models training: === ''' 7- Run HMMVoiceConfigure component of the HMM Voice trainer group, the default setting values of this component are already fixed for the HTS-demo_CMU-ARCTIC-SLT voice. If running for other voice, for example a male German voice, please set: [[BR]] * HMMVoiceConfigure.dataSet : german_set_name [[BR]] * HMMVoiceConfigure.featureList : feature_list_de.pl (context features used for this voice can be change in this file). [[BR]] * HMMVoiceConfigure.lowerF0 : 40 (for male) [[BR]] * HMMVoiceConfigure.speaker : speaker_name [[BR]] * HMMVoiceConfigure.upperF0 : 280 (for male) [[BR]] * HMMVoiceConfigure.voiceLang : de [[BR]] Using the setting of this component you can also change other variables like using LSP instead og MGC, sampling frequency, etc., the same as you would do when running "make configure" with the original HTS scripts. 8- Run HMMVoiceMakeData component of the HMM Voice trainer group to run the HTS procedure "make data". This procedure is the same as in the original scripts with additional sections for calculating strenghts (for mixed exitation), global variance, and handling of Mary context features. Particular procedures can be repeated isolated, fixing the particular settings for this component. For example, if the procedure that creates strengths (str directory) has to be repeated with a different set of filters (data/filters/), please set: [[BR]] * HMMVoiceMakeData.makeSTR 1 [[BR]] * HMMVocieMakeData.makeCMPMARY 1 [[BR]] all the other variables in 0, and run again the component. (In this case you need to run as well makeCMPMARY because you need to compose again the vectors mgc+lf0+str). The procedures can be repeated manually as well, going to the data directory and running "make data" or "make str", as is normally done with the original HTS scripts. Note: the Makefile in data/ includes a gv: section copied from HTS-2.1alpha version to calculate global variance files. In Mary, this files are generated little endian and contain a header of size one short to indicate the size of the vectors it contains. 9- Run HMMVoiceMakeVoice component of the HMM Voice trainer group, here again particular training steps can be repeated selecting them (setting in 1, all the others in 0) from the settings of this component. This is equivalent to run again: [[BR]] perl scripts/Training.pl scripts/Config.pm [[BR]] after modifying the Config.pm file, as is normally done with the original HTS scripts. This component will generate general information about the execution of the training steps. Detailed information about the training status can be found in the logfile in the current directory. The training procedure can take several hours, check the log file time to time to check progress. ''' === IV) Adding a new voice in the MARY platform: === ''' 10- Run HMMVoiceInstaller component of the Install Voice group. The default setting values of this component are already fixed for the HTS-demo_CMU-ARCTIC-SLT voice. If you are training other voice please set: [[BR]] * HMMVoiceInstaller.FeaList: make sure that this name is the one used during training, it should be the one in: [[BR]] data/feature_list_xx.pl (xx=en for English or xx=de for German) [[BR]] * HMMVoiceInstaller.Flab: this is an example of file to synthesise in HTSCONTEXT format. One example can be found in: [[BR]] data/labels/gen/ [[BR]] * HMMVoiceInstaller.useMixExc: set this variable to true for using mixed excitation [[BR]] * HMMVoiceInstaller.useGV: set this variable to true for using global variance in parameter generation. [[BR]] The VoiceInstaller will: [[BR]] - Create a new mary config file in: $MARY_BASE/conf/german-hmm-voice.config [[BR]] - Add the files corresponding to this voice in: $MARY_BASE/lib/voices/hmm-voice/ [[BR]] - copy features list: data/feature_list_en.pl to $MARY_BASE/lib/voices/hmm-voice [[BR]] - copy one example of phonelab for testing the synthesiser: data/labels/gen/gen_cmu_us_arctic_slt_xxxx.lab to $MARY_BASE/lib/voices/hmm-voice [[BR]] - copy the HTS trees: voices/qst001/ver1/*.inf to $MARY_BASE/lib/voices/hmm-voice [[BR]] - copy the HTS PDF models: voices/qst001/ver1/*.pdf to $MARY_BASE/lib/voices/hmm-voice [[BR]] - copy global variance models (if useGV is set to true): data/gv/gv-*-littend.pdf to $MARY_BASE/lib/voices/hmm-voice [[BR]] - copy filter taps for mixed excitation: data/filters/mix_excitation_filters.txt to $MARY_BASE/lib/voices/hmm-voice [[BR]] After successfully installing a new voice, it can be used with the mary_server and the mary_client. ''' === V) Creating other voice in German or English. === ''' If using German: For creating a new German voice it is necessary: [[BR]] * a wav or raw directory with the speech files you will use for training the German voice. [[BR]] * transcriptions of the files, one text file per speech file, or transcriptions in festival format if available. [[BR]] Then we use as a base the original HTS-demo_CMU-ARCTIC-SLT directory: - Download and un-zip, un-tar the HTS-demo_CMU-ARCTIC-SLT for HTS-2.0.1 - Rename this directory as your new voice name, for example german_voice, and delete the directories data/raw and data/utt. - Apply the Mary patch to the german_voice directory. [[BR]] patch -p1 -d . < HTS-2.0.1-demo_CMU-ARCTIC-SLT_for_Mary-3.5.0.patch - Move your speech files to this directory, if you have a wav directory, this should be copied in the current directory (german_voice/wav). If you have a raw directory, this should be copied in the data directory (german_voice/data/raw). - Move your transcription files to this directory, if you have a text directory containing the transcription of each file in separate files, this should be copied in the current directory (german_voice/text). If you have transcriptions in festival format please copy this directory in the data/utts directory (german_voice/data/utts/). - Now run the VoiceImport program and follow the instructions as normal. Provide general settings for gender, locale must be "de", path to mary_base and name of the voice. Marcela Charfuelan DFKI 04.09.2008