Changes between Version 13 and Version 14 of HMMVoiceCreationMary4.0


Ignore:
Timestamp:
12/08/09 12:40:03 (16 years ago)
Author:
marcela_charfuelan
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • HMMVoiceCreationMary4.0

    v13 v14  
    11 
    2 = '''Voice Import Tools Tutorial : How to build a HMM-based voice for the MARY 4.0 (beta) platform''' = 
    3  
    4 For creating HMM-based voices we use a version of the speaker dependent training scripts provided by [http://hts.sp.nitech.ac.jp/ HTS] that was adapted to the MARY 4.0 beta platform. The steps for building a HMM voice for the MARY platform can be summarised in:[[BR]] 
    5  
    6 I)   Checking the necessary programs and files[[BR]] 
    7 II)  Data preparation[[BR]] 
    8 III) Training of HMM models[[BR]] 
    9 IV)  Adding a new HMM voice in the Mary system.[[BR]] 
    10 V)   Creating other voice in German (''to train a HMM voice with another speech database'').[[BR]] 
    11 VI) (''NEW'') Creating other voice in a language different from German or English (US). 
    12  
    13 The previous steps will be explained below creating a HMM voice using the HTS '''speaker dependent training demo''' adapted to the MARY 4.0 beta platform.[[BR]] 
     2= '''Voice Import Tools Tutorial : How to build a HMM-based voice for the MARY 4.0 platform''' = 
     3 
     4For creating HMM-based voices we use a version of the speaker dependent training scripts provided by [http://hts.sp.nitech.ac.jp/ HTS] that was adapted to the MARY 4.0 platform. The steps for building a HMM voice for the MARY platform can be summarised in:[[BR]] 
     5 
     6I) Download MARY TTS including Voice import tools[[BR]] 
     7II) Check necessary programs and files[[BR]] 
     8III) Check data: audio and text files[[BR]] 
     9IV) Run the Voice import tools [[BR]] 
     10V) Creating other voice in a language different from German or English (US). 
    1411 
    1512The training scripts used here are the latest versions, that is, it is required HTS_2.1 and SPTK-3.2. Some scripts have been added-modified to:[[BR]] 
     
    1916 
    2017''' 
    21 === I) Checking the necessary programs and files: === 
    22 ''' 
     18== I) Download MARY TTS including Voice import tools == 
     19''' 
     20 
     21Click on the latest MARY release [http://mary.dfki.de/download/4.0%20beta/openmary-standalone-install-4.0beta.jar MARY download] or download the file and run it with: 
     22{{{ 
     23java -jar openmary-standalone-install-4.0beta.jar  
     24}}} 
     25 
     26 
     27''' 
     28== II) Check the necessary programs and files: == 
     29''' 
     30 
     31To facilitate the checking and installation of the necessary external programs, once installed MARY TTS open a command line shell in your voice building directory and run: 
     32{{{ 
     33$MARY_BASE/lib/external/download_install_external_programs.sh 
     34}}} 
     35 
     36With the option '''-check''', this script will check if the necessary programs and versions are installed (that is, the programs can be found in the PATH or in the paths provided by the user); with the option '''-install''' this script will try to download and install the necessary programs in: $MARY_TTS/lib/external/bin (if problems, it will suggest how to install manually the programs). 
     37 
     38If you have already installed some of the required programs, you can provide the paths (if they are not in the PATH), for example: 
     39{{{ 
     40$MARY_BASE/lib/external/download_install_external_programs.sh -check /your/path/to/htk/bin /your/path/to/Festival/festvox/src/ehmm/bin 
     41}}} 
     42 
     43The necessary programs that this script checks are:[[BR]] 
    2344 
    2445'''MARY requirements:'''[[BR]] 
    2546- Operating System - Linux (tested on Ubuntu 9.04) [[BR]] 
    2647- MARY TTS 4.0 (beta) including Voice import tools during installation - link: [http://mary.dfki.de/download/4.0%20beta/openmary-standalone-install-4.0beta.jar MARY TTS 4.0 beta] [[BR]] 
    27 - HTS '''speaker dependent training demo''' adapted to the MARY 4.0 beta platform: 
    28      * without CMU-ARCTIC-SLT data (112K):  included in your MARY TTS 4.0 beta installation: $MARY_BASE/lib/hts/HTS-demo_for_MARY-4.0-beta.tar.gz [[BR]] 
    29      * with CMU-ARCTIC-SLT data (92MB) - link: [http://mary.dfki.de/download/4.0%20beta/HTS-demo_CMU-ARCTIC-SLT_for_MARY-4.0-beta.tar.gz HTS-demo_CMU-ARCTIC-SLT_for_MARY-4.0-beta] [[BR]] 
    30  
    31 '''HTS requirements:''' please download and follow the instructions for installing:[[BR]] 
     48- HTS '''speaker dependent training demo''' adapted to the MARY 4.0 beta platform, included in your MARY TTS 4.0 beta installation. 
     49 
     50'''HTS requirements:'''[[BR]] 
    3251- [http://hts.sp.nitech.ac.jp/archives/2.1/HTS-2.1_for_HTK-3.4.tar.bz2 HTS-2.1_for_HTK-3.4.patch] [[BR]] 
    3352- HTK-3.4 and HDecode patched with HTS-2.1_for_HTK-3.4.patch links: 
     
    3756- [http://downloads.sourceforge.net/hts-engine/hts_engine_API-1.01.tar.gz hts_engine_API-1.01] [[BR]] 
    3857 
    39 '''Other requirements:''' the following programs are also required: [[BR]] 
     58'''Other requirements:'''[[BR]] 
    4059- awk normally available in linux [[BR]] 
    4160- perl normally available in linux [[BR]] 
     
    4665- EHMM for automatic labeling, available with [http://festvox.org/download.html festvox-2.1] [[BR]] 
    4766 
    48 The HTS demo for MARY 4.0 beta, includes a shell script "check_programs.sh" that will help you to check if all the previous programs are installed. 
    49  
    50  
    51 ''' 
    52 === II) Data preparation (): === 
    53  
    54 ''' 
    55  
    56 Where to start? There are three options a, b and c: 
    57  
    58 '''a-''' If you would like to try the HTS-demo_CMU-ARCTIC-SLT for MARY 4.0 beta from scratch:[[BR]] 
    59 Download the [http://mary.dfki.de/download/4.0%20beta/HTS-demo_CMU-ARCTIC-SLT_for_MARY-4.0-beta.tar.gz HTS-demo_CMU-ARCTIC-SLT_for_MARY-4.0-beta] (92MB), unpack the file and go to that directory: 
    60 {{{ 
    61    tar -zxvf HTS-demo_CMU-ARCTIC-SLT_for_MARY-4.0-beta.tar.gz 
    62    cd HTS-demo_CMU-ARCTIC-SLT_for_MARY-4.0-beta 
    63 }}} 
    64  
    65 '''b-''' If you have already created a unit selection voice for MARY, with the CMU-ARCTIC-SLT data, and want to build a HMM-based voice for that,  
    66 copy the $MARY_BASE/lib/hts/HTS-demo_for_MARY-4.0-beta.tar.gz (112K) in your unit selection voice creation directory and unpack the file: 
    67 {{{ 
    68    tar -zxvf HTS-demo_for_MARY-4.0-beta.tar.gz 
    69 }}} 
    70 If you have already created a unit selection voice for this data, most probably you have already created phonefeatures, phonelab and a mary/features.txt file for that, so you can run steps 1-3, skip steps 4-11 and continue with section III HMM models training. 
    71  
    72 '''c-''' If you want to create a HMM voice in other language please see the section V or VI below.[[BR]] 
    73  
    74  
    75 Once you have unpacked the HTS demo for MARY 4.0 beta, follow the steps: 
    76  
    77 '''1-''' Check if all the required programs (and versions) are available in your system, you can run the shell script: 
    78 {{{ 
    79 ./check_programs.sh 
    80 }}}   
    81 This is a simple shell script that will check which programs are available in the PATH and report what is missing. You can provide the paths where you have installed the  required programs if they are not found in the PATH. The script will check minimal requirements for programs, versions, suggest how to install missing programs, etc. 
    82 If all the necessary programs are installed correctly you can continue with step 2.  
    83  
    84 '''2-''' Run the Voice Import Tools program 
    85  
    86 The Voice Import Tools programs can be started from: '''Applications -> OpenMary -> Voice import tools'''[[BR]] 
    87  
    88 When starting the voice import tools, go to your working directory (the directory where you have unpacked the HTS demo for MARY 4.0 beta) and provide information for: 
    89 {{{ 
    90   db.gender    = female 
    91   db.locale    = en_US 
    92   db.marybase  = /path/to/$MARY_BASE/ 
    93   db.voicename = slt-hsmm 
    94 }}} 
    95 If you are not familiar or have problems with the Voice Import Tools program, please read the instructions in the Tutorial: [http://mary.opendfki.de/wiki/VoiceImportToolsTutorial VoiceImportToolsTutorial] 
    96  
    97 Please remember that whenever you are in doubt about the settings of a particular component you can check its corresponding help for a description of the meaning 
    98 (and possible values) of each variable. 
    99  
    100 After starting the Voice Import Tools check the global settings of the voice, make sure that the allophones file is provided and exist: 
     67 
     68 
     69 
     70''' 
     71== III) Check data: audio and text files[[BR]] == 
     72''' 
     73 
     74In your voice building directory execute the step-by-step procedure in [http://mary.opendfki.de/wiki/VoiceImportToolsTutorial VoiceImportToolsTutorial] to make 
     75sure that the data, sound (wav) and text files are in the correct place and format.[[BR]] 
     76 
     77As a result of this step your voice building directory should contain a wav and text directories. 
     78 
     79 
     80''' 
     81== IV) Run the Voice Import tools == 
     82''' 
     83 
     84In your voice building directory run the voice import tools: 
     85{{{ 
     86export MARY_BASE="/your/path/to/MARY TTS/" 
     87java -Xmx1024m -jar $MARY_BASE/java/voiceimport.jar 
     88}}} 
     89 
     90After starting the Voice Import Tools check the global settings of the voice, make sure that the allophones file is provided and exists: 
    10191{{{ 
    10292db.alophonesSet = $MARY_BASE/lib/modules/xx/lexicon/allophones.xx.xml  (where xx is the corresponding language) 
    10393}}} 
    10494 
    105 '''3-''' Run the HMMVoiceDataPreparation of the HMM Voice Trainer group to check if text, wav or raw files are available and in the correct paths. 
    106 If just raw is provided, the program will do the conversion.  If no text files are available but utts in festival format, the program will do the conversion as well. 
    107  
    108 '''4-''' Run the AllophonesExtractor of the Automatic Labeling group to create the '''prompt_allophones''' directory required in the next step. This component requires the MARY server. [[BR]] 
    109  
    110 '''5-''' Run the EHMMlabeler component of the Automatic Labeling group to label automatically the wav files using the corresponding transcriptions. This procedure might 
     95 
     96And run the following components: 
     97 
     98 
     99'''1-''' Run the HMMVoiceDataPreparation of the HMM Voice Trainer group to set up the environment to create a HMM voice and check if required external programs and text and wav files are available and in the correct paths.  
     100 
     101'''2-''' Run the AllophonesExtractor of the Automatic Labeling group to create the '''prompt_allophones''' directory required in the next step. This component requires the MARY server. [[BR]] 
     102 
     103'''3-''' Run the EHMMlabeler component of the Automatic Labeling group to label automatically the wav files using the corresponding transcriptions. This procedure might 
    111104take several hours. For running EHMMLabeler, please use the settings editor of this component to set, according to your festvox installation, the variable: 
    112105{{{ 
    113106   EHMMLabeler.ehmm  = ../festvox/src/ehmm/bin/ 
    114107}}} 
     108The result of this step is a '''ehmm/lab''' directory. 
     109 
     110'''4-''' Run the LabelPauseDeleter component of the Automatic Labeling group. Please use the settings editor of this component to set the variable: 
     111{{{ 
     112   LabelPauseDeleter.threshold  =  10 
     113}}} 
    115114The result of this step is a '''lab''' directory. 
    116115 
    117 '''6-''' Run the LabelPauseDeleter component of the Automatic Labeling group. Please use the settings editor of this component to set the variable: 
    118 {{{ 
    119    LabelPauseDeleter.threshold  =  10 
    120 }}} 
    121  
    122 '''7-''' Run the TranscriptionAligner component of the Label-Transcript Alignment group.  This program will create the '''allophones''' directory. 
    123  
    124 '''8-''' Run the PhoneUnitLabelComputer component of the Label-Transcript Alignment group. This procedure has as input the '''lab''' directory created with the EHMMLabeler and will create as an output the  '''phonelab''' directory.  
    125  
    126 '''9-''' Run the FeatureSelelection component of the Feature Extraction group. This program will create a '''mary/features.txt''' file, it requires the MARY server running. Select here all the features and save the file. 
    127  
    128 '''10-''' Run the 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.  
    129  
    130 '''11-''' Run the PhonelabelFeatureAligner component of the Verify Alignment group. This procedure will verify alignment between "phonefeatures" and "phonelabels".[[BR]] 
     116'''5-''' Run the TranscriptionAligner component of the Label-Transcript Alignment group.  This program will create the '''allophones''' directory. 
     117 
     118'''6-''' Run the PhoneUnitLabelComputer component of the Label-Transcript Alignment group. This procedure has as input the '''lab''' directory and will create as an output the  '''phonelab''' directory.  
     119 
     120'''7-''' Run the FeatureSelelection component of the Feature Extraction group. This program will create a '''mary/features.txt''' file, it requires the MARY server running. Select here all the features and save the file. 
     121 
     122'''8-''' Run the 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.  
     123 
     124'''9-''' Run the PhonelabelFeatureAligner component of the Verify Alignment group. This procedure will verify alignment between "phonefeatures" and "phonelabels".[[BR]] 
    131125 
    132126As a result of steps 1-11 we should have:[[BR]] 
     
    134128- phonelab directory [[BR]] 
    135129- mary/features.txt file [[BR]] 
    136  
    137  
    138 ''' 
    139 === III) HMM models training: === 
    140 ''' 
    141  
    142 '''12-''' Run the 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, although some setting depends on your installation, please provide paths for: 
    143 {{{ 
    144   HMMVoiceConfigure.htsPath       = /yourpath/htk-hts2.1/bin 
    145   HMMVoiceConfigure.htsEnginePath = /yourpath/hts_engine_API-1.01/bin 
    146   HMMVoiceConfigure.sptkPath      = /yourpath/SPTK-3.2/bin 
    147   HMMVoiceConfigure.tclPath       = /yourpath/ActiveTcl-8.6/bin 
    148   HMMVoiceConfigure.soxPath       = /yourpath/usr/bin 
    149 }}} 
     130- MARY_BASE/external/externalPaths.txt 
     131 
     132 
     133''' 
     134=== HMM models training: === 
     135''' 
     136 
     137'''10-''' Run the HMMVoiceConfigure component of the HMM Voice trainer group. The default setting values ar already fixed for the arctic slt voice, some setting depends on your installation, and willbe taken from MARY_BASE/external/externalPaths.txt 
    150138 
    151139If running configure for other voice, for example a male German voice, please use the settings editor of this component to set the variables: 
     
    159147Using the settings editor 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 + parameters" with the original HTS scripts. 
    160148 
    161 '''13-''' Run the HMMVoiceFeatureSelection component of the HMM Voice trainer group. This program reads the '''mary/features.txt''' file (created in step 11), and generates the file '''mary/hmmFeatures.txt'''. This file contains extra features, apart from phone and phonological features, that will be used to train HMMs. When running this program a small set of features will be presented on top, separated by an empty line:[[BR]] 
     149'''11-''' Run the HMMVoiceFeatureSelection component of the HMM Voice trainer group. This program reads the '''mary/features.txt''' file (created in step 11), and generates the file '''mary/hmmFeatures.txt'''. This file contains extra features, apart from phone and phonological features, that will be used to train HMMs. When running this program a small set of features will be presented on top, separated by an empty line:[[BR]] 
    162150{{{ 
    163151   pos_in_syl 
     
    175163If you are not sure about using other features, use the first four, delete the others and save the file. 
    176164 
    177 '''14-''' Run the HMMVoiceMakeData component of the HMM Voice trainer group to run the HTS procedure "make data". This procedure require the following files: 
     165'''12-''' Run the HMMVoiceMakeData component of the HMM Voice trainer group to run the HTS procedure "make data". This procedure require the following files: 
    178166{{{ 
    179167   HMMVoiceMakeData.allophonesFile   = allophones.en_US.xml  # allophones set (language dependent) 
     
    204192 
    205193 
    206 '''15-''' Run the 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: 
     194'''13-''' Run the 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: 
    207195{{{ 
    208196   perl scripts/Training.pl scripts/Config.pm > logfile & 
     
    216204 
    217205''' 
    218 === IV) Adding a new voice in the MARY platform: === 
    219 ''' 
    220  
    221 '''16-''' Run the 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. Some settings of the voice can be changed here, for example: 
     206=== Adding a new voice in the MARY platform: === 
     207''' 
     208 
     209'''14-''' Run the 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. Some settings of the voice can be changed here, for example: 
    222210{{{ 
    223211  HMMVoiceInstaller.useMixExc   =  true 
     
    240228 
    241229''' 
    242 === V) Creating other voice in German === 
    243 ''' 
    244  
    245 - If you are creating the HMM-based voice for German from scratch it will be necessary: [[BR]] 
    246   * NLP components for German, those should be available with MARY 4.0  
    247   * a wav or raw directory with the speech files you will use for training the German voice. [[BR]] 
    248   * transcriptions of the files, one text file per speech file, or transcriptions in festival format if available. [[BR]] 
    249 then copy the $MARY_BASE/lib/hts/HTS-demo_for_MARY-4.0-beta.tar.gz file in the directory where you have your wav and transcription data and unpack the file: 
    250 {{{ 
    251    tar -zxvf HTS-demo_for_MARY-4.0-beta.tar.gz 
    252 }}} 
    253  
    254 Once you have unpacked the HTS demo for MARY 4.0 beta, follow the instructions as normal from step 1. Provide general settings for: 
    255 {{{ 
    256    db.gender    =  male  (or female) 
    257    db.locale    =  de 
    258    db.marybase  =  /path/to/mary/base/ 
    259    db.voicename =  german_voice 
    260 }}} 
    261  
    262  
    263 - If you have already created a German unit selection voice for MARY and want to build a HMM-based voice for that, copy the $MARY_BASE/lib/hts/HTS-demo_for_MARY-4.0-beta.tar.gz (112K) in your unit selection voice creation directory and unpack the file: 
    264 {{{ 
    265    tar -zxvf HTS-demo_for_MARY-4.0-beta.tar.gz 
    266 }}} 
    267  
    268 If you have already created a unit selection voice for German, most probably you have already created phonefeatures, phonelab and a mary/features.txt file for that, so you can run steps 1-3, skip steps 4-11 and continue with section III HMM models training. 
    269  
    270  
    271 ''' 
    272 === VI) Creating other voice in a language different from German or English (US). === 
     230=== V) Creating other voice in a language different from German or English (US). === 
    273231''' 
    274232 
     
    280238 
    281239- After creating the minimal components, you will need wav files (in a wav directory) and the corresponding transcriptions (one file per wav file in a text directory). [[BR]] 
    282 Then copy the $MARY_BASE/lib/hts/HTS-demo_for_MARY-4.0-beta.tar.gz file in the directory where you have your wav and transcription data and unpack the file: 
    283 {{{ 
    284    tar -zxvf HTS-demo_for_MARY-4.0-beta.tar.gz  
    285 }}} 
    286  
    287 Once you have unpacked the HTS demo for MARY 4.0 beta, follow the instructions as normal from step 1. Provide general settings for: 
     240Afterwards follow the instructions as normal from step 1. Provide general settings for: 
    288241{{{ 
    289242   db.gender    =  male  (or female)