Version 1 (modified by marcela_charfuelan, 17 years ago) (diff) |
---|
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:
I) Checking necessary programs and files
II) Data preparation
III) Training of HMM models
IV) Adding a new HMM voice in the Mary system.
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:
- Use Mary instead of festival as text analyzer.
- Train bandpass voicing strengths for mixed excitation.
- Process language specific settings as parameters.
I) Checking the necessary programs and files:
MARY requirements:
- Operating System - Linux
- MARY TTS Recent Version - Download Link: http://mary.dfki.de/Download
- Openmary - SVN from http://mary.opendfki.de
- Mary patch for HTS demo: HTS-2.0.1-demo_CMU-ARCTIC-SLT_for_Mary-3.5.0.patch
HTS requirements, please download and follow the instructions for installing:
- HTK-3.4
- HTS-2.0.1_for_HTK-3.4.patch
- SPTK-3.1
- HTS-demo_CMU-ARCTIC-SLT (for HTS-2.0.1)
Other requirements, please download and follow the instructions for installing:
- EHMM for automatic labeling, available with festvox-2.1 (Recent Version) http://festvox.org/download.html
- sox, normally available in linux.
- tcl-tk supporting snack, for example ActiveTcl - Download Link: http://www.activestate.com/Products/ActiveTcl/
- perl, normally available in linux.
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.
http://mary.dfki.de/Download/HTS-2.0.1-demo_CMU-ARCTIC-SLT_for_Mary-3.5.0.patch
apply the patch to the HTS-demo_CMU-ARCTIC-SLT directory:
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:
export MARY_BASE="/dir/to/openmary"
then you can run:
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:
- EHMMLabeler.ehmm to corresponding path in ../festvox/src/ehmm/bin/
4- Run LabelPauseDeleter component of the Automatic Labeling group. Please set:
- 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:
- HMMVoiceConfigure.dataSet : german_set_name
- HMMVoiceConfigure.featureList : feature_list_de.pl (context features used for this voice can be change in this file).
- HMMVoiceConfigure.lowerF0 : 40 (for male)
- HMMVoiceConfigure.speaker : speaker_name
- HMMVoiceConfigure.upperF0 : 280 (for male)
- HMMVoiceConfigure.voiceLang : de
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:
- HMMVoiceMakeData.makeSTR 1
- HMMVocieMakeData.makeCMPMARY 1
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:
perl scripts/Training.pl scripts/Config.pm
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:
- HMMVoiceInstaller.FeaList: make sure that this name is the one used during training, it should be the one in:
data/feature_list_xx.pl (xx=en for English or xx=de for German)
- HMMVoiceInstaller.Flab: this is an example of file to synthesise in HTSCONTEXT format. One example can be found in:
data/labels/gen/
- HMMVoiceInstaller.useMixExc: set this variable to true for using mixed excitation
- HMMVoiceInstaller.useGV: set this variable to true for using global variance in parameter generation.
The VoiceInstaller will:
- Create a new mary config file in: $MARY_BASE/conf/german-hmm-voice.config
- Add the files corresponding to this voice in: $MARY_BASE/lib/voices/hmm-voice/
- copy features list: data/feature_list_en.pl to $MARY_BASE/lib/voices/hmm-voice
- 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
- copy the HTS trees: voices/qst001/ver1/*.inf to $MARY_BASE/lib/voices/hmm-voice
- copy the HTS PDF models: voices/qst001/ver1/*.pdf to $MARY_BASE/lib/voices/hmm-voice
- copy global variance models (if useGV is set to true): data/gv/gv-*-littend.pdf to $MARY_BASE/lib/voices/hmm-voice
- copy filter taps for mixed excitation: data/filters/mix_excitation_filters.txt to $MARY_BASE/lib/voices/hmm-voice
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:
- a wav or raw directory with the speech files you will use for training the German voice.
- transcriptions of the files, one text file per speech file, or transcriptions in festival format if available.
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.
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