------------------------------------------------
UTILTIES for Producing Input-files for MaxMBROLA
------------------------------------------------
Hannes Pirker, OFAI, August 2005

Uses Mary-TTS for producing Syllable-segmented-Mbrola-files (or
ordinary mbrola-files or sound...)  Mary is the TTS-System by Marc
Schroeder, DFKI.  See: http://mary.dfki.de

====================
mary2max.csh (LINUX:Unix)
mary2max.bat 
====================
Simplest way: call the mary2max.csh: this looks for all 
de_*.txt and en_*.txt in order to process de(utsch) and en(glish) texts.

mary2max.bat is only a fixed template you have to edit-- sorry I am
not familiar with DOS/bat

-------------------------------------------------------------
Workflow:

1. Call TTS,  output XML-file with ACOUSTPARAMS: 
   maryclient.pl FILE.txt > FILE.xml
2. Transform Mary-xml to MaxMBROL (one syllable per line): e.g.
   mary2Max.pl -m FILE.XML > FILE_Mac.txt 

Alternatively work on MBROLA-files:

1. Call TTS - output MBROLA: 
   maryclient.pl -o MBROLA FILE.txt > FILE.pho
   
2. Transform MBROLA-pho-file to e.g. a one-line File for MaxMBROLA
 mbrol2Max.pl -o FILE.pho > FILE_oneline.txt


txt2MaxOneline.sh (Unix/Linux)
------------------
Transforms ALL (de|en)_*.txt to (de|en)_*_oneline.pho, i.e. calls the Mary-TTS to produce a MBROLA-file, and then collapses this into one line.


txt2MaxOneline.bat
------------------
Is just an example for testing. Filename is hardcoded.

REQUIREMENTS
-----------

You have of course to have perl installed on your computer.
For Mary2Max.pl you also need to install the XML-DOM package.
In ActivePerl under Windows this is done by typing the following at the Command-shell:

ppm
install XML-DOM

------------------------------ D E T A I L S ----------------------------
=============
maryclient.pl
=============

 Usage:
 maryclient.pl (-h) (-i INTYPE) (-o OTYPE) infile.txt > outfile.(xml|wav|mp3)
 Host is cling.dfki.uni-sb.de
 -h print htis message
 -i INTYPE (TEXT_DE, TEXT_EN, ...),        Default=TEXT_DE 
 -o OUTTYPE (ACOUSTPARAMS, MBROLA, AUDIO), Default=ACOUSTPARAMS
 -v voicefile (mbrola-voice),              Default=de5
 -a audiotype of soundfile: WAVE or MP3,   Default=WAV; 

 Opens a socket to the Mary-Server at host cling.dfki.uni-sb.de
 and retrieves either 
 the results of the mary-TTS-component (ACOUSTPARAMS), Mbrola-files or 
even soundfiles

Author:
Original script by Marc Schroeder, DFKI
Command-line options and Help added by Hannnes Pirker, OFAI

------------------------------------------------------------------------

===========
mary2max.pl
===========

mary2max.pl  Version: 0.1

USAGE: 
mary2max.pl (-h) (-d) (-m | -l| -w) Mary-XML-file

(e.g. see maryclient.pl for producing Mary-XML-files)

If INPUT_FILE is missing, <STDIN> will be used.

DESCRIPTION 

Simple extraction of all <s> <syllable> <ph> elements and output as 
one <syllable> per line.
At sentence boundaries an empty line is inserted. 

INPUT:
Mary-XML-file containing <ph> (phonemic) info

OPTIONS

-h    print this message
-d    keep original durations

Encoding of End-of-Line:
-m    Mac-version:   use CR at end of line
-l    Linux-version: use LF at end of line
-w    Windows-version: use CRLF at end of line

Hannes Pirker, August 2005

-----------------------------------------------------------------------------
=============
mbrol2Max.pl 
=============

mbrol2Max.pl Version: 0.1

USAGE: 
mbrol2Max.pl (-h) (-o) (-f) (-s f0_at_Start) (-s f0_at_End) (-t) MBROLA_pho_file

If INPUT_FILE is missing, <STDIN> will be used.

DESCRIPTION 

Simple reformatting of mbrola-files for making make them usable in MaxMBROLA 

INPUT:
Mbrola .pho file

OUTPUT:
Mbrola file with f0 removed and/or printed as a single line

OPTIONS

-h            print this message
-f(0preserve) preserve f0, the default is to omit f0
-o(neline)    collapse resulting mbrola into one line for being used in MaxMBROLA
-s(tartf0)    specify the f0 at the begining of sentence, DEFAULT=100 
-e(ndf0)      specify the f0 at the end      of sentence, DEFAULT=(startf0 - 10)  
-t(race)

Hannes Pirker July 2005

------------------------------------------------------------------
limsi2mbrola.pl
limsi2mbrola.sh
---------------

LIMSI's text-to-speech engine is producing mbrola-files which use slightly 
different SAMPA labels than those used in the MBROLA fr1 voice.
This is a trivial script for substituting these labels.



---------------------------------- EOF ---------------------------