Added Flite 1.4 code

I'm not using version 2.0 because that version makes it almost impossible
to create a slim build without compiling all the voice synth code (which
we don't need).
This commit is contained in:
Daniel Wolf 2016-05-23 21:08:56 +02:00
parent d4b9a8e0c6
commit 9f4ebd23e3
343 changed files with 154502 additions and 0 deletions

7
lib/.gitignore vendored Normal file
View File

@ -0,0 +1,7 @@
# Excluding 80MB worth of voice information
/flite-1.4/lang/cmu_time_awb
/flite-1.4/lang/cmu_us_awb
/flite-1.4/lang/cmu_us_kal
/flite-1.4/lang/cmu_us_kal16
/flite-1.4/lang/cmu_us_rms
/flite-1.4/lang/cmu_us_slt

View File

@ -0,0 +1,66 @@
The initial development of flite was primarily done by awb while
travelling, perhaps the name is doubly appropriate as a substantial
amount of the coding was done over 30,000ft). During most of that
time awb was funded by the Language Technonologies Institute at
Carnegie Mellon University.
Kevin A. Lenzo was involved in the design, conversion techniques and
representions for the voice distributed with flite (as well as being
the actual voice itself).
Other contributions are:
Henry Spencer
For the regex code
University of Edinburgh
for releasing Festival for free, making a companion runtime synthesizer
a practical project, much of the design of flite relies on the
architecture decisions made in the Festival Speech Synthesis Systems and
the Edinburgh Speech Tools.
The duration cart tree and intonation (accent and F0) models were
derived from the models in the Festival distribution. which in turn
were trained from the Boston University FM Radio Data Corpus.
Carnegie Mellon University
The included lexicon is derived from CMULEX and the letter to sound
rules are constructed using the Lenzo and Black techniques for
building LTS decision graphs.
Nagoya Institute of Technology
The mlsa code derives from HTS (following a long chain)
Tomoki Toda
The mlsa and mlpg support came view Tomoki's support for voice convertion
in FestVox which in turn (some of which) comes from NITECH's HTS.
Marcela Charfuelan (DFKI)
For the mixed-excitation techniques. These origianlly came from NITECH
but we understood the technqiues from Marcela's Open Mary Java code and
implemented them in our optimized version of MLSA.
David Huggins-Daines (dhd@cepstral.com)
much of the clunits code, porting to multiple platforms, substantial
code tidy up and configure/autoconf guidance.
Cepstral, LLC (http://cepstral.com)
For supporting DHD to spend time on flite and passing back the important
early fixes and enhancements including SAPI support (funded by FCT)
Willie Walker <william.walker@sun.com> and the rest of the Sun Speech Group
lots of low level bugs (and fixes).
Portuguese Foundation for Science and Technology (FCT) Praxis XXI program
The SAPI interface provided by Cepstral, LLC was partially funded by
the above program.
Craig Reese: IDA/Supercomputing Research Center
Joe Campbell: Department of Defense
who wrote the ulaw conversion routines in src/speech/cst_wave_utils.c
Mario Lang:
causing the support of shared libraries to happen
Eric House (fixin@peak.org)
who provided examples of how to do 68K Call Backs for system functions
Greg Parker gparker@sealiesoftware.com
peal, the binding glue and shared library foo for getting the arm
version doing something reasonable under PalmOS
Lukas Loehrer <loehrerl@gmx.net> Feb 2006
alsa support (default if available)
Brian Langner
redid the Visual Studio support

217
lib/flite-1.4/COPYING Normal file
View File

@ -0,0 +1,217 @@
Flite is free software.
We have kept the core code to BSD-like copyright, thus the system is
free to use in commercial products, with commercial extensions. GPL
code is only included as part of the build process and does not
taint any of the run-time code.
Note the PalmOS code uses BSD code that requires acknowledgements in
any distribution documentation.
As a collection it is distributed under the following license. Note
a few files in this distribution have a different but equally free
non-conflicting licence, see below.
Language Technologies Institute
Carnegie Mellon University
Copyright (c) 1999-2008
All Rights Reserved.
Permission is hereby granted, free of charge, to use and distribute
this software and its documentation without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of this work, and to
permit persons to whom this work is furnished to do so, subject to
the following conditions:
1. The code must retain the above copyright notice, this list of
conditions and the following disclaimer.
2. Any modifications must be clearly marked as such.
3. Original authors' names are not deleted.
4. The authors' names are not used to endorse or promote products
derived from this software without specific prior written
permission.
CARNEGIE MELLON UNIVERSITY AND THE CONTRIBUTORS TO THIS WORK
DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT
SHALL CARNEGIE MELLON UNIVERSITY NOR THE CONTRIBUTORS BE LIABLE
FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
THIS SOFTWARE.
All files within this distribution have the above license except
the following
src/cg/cst_mlpg.h
src/cg/cst_mlpg.c
src/cg/cst_mlsa.h
src/cg/cst_mlsa.c
src/cg/cst_vc.h
src/cg/cst_vc.c
/*********************************************************************/
/* */
/* Nagoya Institute of Technology, Aichi, Japan, */
/* Nara Institute of Science and Technology, Nara, Japan */
/* and */
/* Carnegie Mellon University, Pittsburgh, PA */
/* Copyright (c) 2003-2004 */
/* All Rights Reserved. */
/* */
/* Permission is hereby granted, free of charge, to use and */
/* distribute this software and its documentation without */
/* restriction, including without limitation the rights to use, */
/* copy, modify, merge, publish, distribute, sublicense, and/or */
/* sell copies of this work, and to permit persons to whom this */
/* work is furnished to do so, subject to the following conditions: */
/* */
/* 1. The code must retain the above copyright notice, this list */
/* of conditions and the following disclaimer. */
/* 2. Any modifications must be clearly marked as such. */
/* 3. Original authors' names are not deleted. */
/* */
/* NAGOYA INSTITUTE OF TECHNOLOGY, NARA INSTITUTE OF SCIENCE AND */
/* TECHNOLOGY, CARNEGIE MELLON UNIVERSITY, AND THE CONTRIBUTORS TO */
/* THIS WORK DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, */
/* INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, */
/* IN NO EVENT SHALL NAGOYA INSTITUTE OF TECHNOLOGY, NARA */
/* INSTITUTE OF SCIENCE AND TECHNOLOGY, CARNEGIE MELLON UNIVERSITY, */
/* NOR THE CONTRIBUTORS BE LIABLE FOR ANY SPECIAL, INDIRECT OR */
/* CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM */
/* LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, */
/* NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN */
/* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */
/* */
/*********************************************************************/
These functions are derived from the versions in festvox/src/vc/ as
modified by Tomoki Toda which in turn contain code derived from
NITECH's HTS system. Their copyright has the same freedoms as
as Flite's but under NAIST, NITECH and/or CMU.
src/audio/au_wince.c
src/utils/cst_file_stdio.c
src/utils/cst_mmap_posix.c
src/utils/cst_mmap_win32.c
src/utils/cst_mmap_none.c
src/utils/cst_file_wince.c
sapi/
are copyright Cepstral, LLC rather than CMU but fall under the same
free licence as the above, except for the owner.
doc/alice
Is the first two chapters of Alice in Wonderland as distributed by the
Gutenburg project and is now in the public domain
src/regex/regexp.c
src/regex/regsub.c
* Copyright (c) 1986 by University of Toronto.
* Written by Henry Spencer. Not derived from licensed software.
*
* Permission is granted to anyone to use this software for any
* purpose on any computer system, and to redistribute it freely,
* subject to the following restrictions:
*
* 1. The author is not responsible for the consequences of use of
* this software, no matter how awful, even if they arise
* from defects in it.
*
* 2. The origin of this software must not be misrepresented, either
* by explicit claim or by omission.
*
* 3. Altered versions must be plainly marked as such, and must not
* be misrepresented as being the original software.
src/speech/rateconv.c
* Copyright (c) 1992, 1995 by Markus Mummert
*
* Redistribution and use of this software, modifcation and inclusion
* into other forms of software are permitted provided that the following
* conditions are met:
*
* 1. Redistributions of this software must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. If this software is redistributed in a modified condition
* it must reveal clearly that it has been modified.
lang/usenglish/us_durz_cart.c
lang/usenglish/us_durz_cart.h
lang/usenglish/us_int_accent_cart.c
lang/usenglish/us_int_accent_cart.h
lang/usenglish/us_int_tone_cart.c
lang/usenglish/us_int_tone_cart.h
lang/usenglish/us_phoneset.c
lang/usenglish/us_f0lr.c
These are directly (or indirectly) compiled/derived from files that are
part of the Festival Speech Synthesis System (1.4.1). Hence they have
a joint copyright CMU/Edinburgh but with the same free licence
configure
# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
#
# This configure script is free software; the Free Software Foundation
# gives unlimited permission to copy, distribute and modify it.
configure.sub
config.guess
missing
install-sh
mkinstalldirs
Copyright FSF, and under the GPL, these files are only used for
convenient configuration and are not part of the generated binary,
and therefore do not impose any GPL restrctions on the rest of the
system. But as they are standard methods for configuration they
are included.
palm/include/peal.h
palm/include/pealstub.h
palm/arm_flite/pealstub.c
palm/m68k_flite/peal.c
/**********
* Copyright (c) 2004 Greg Parker. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY GREG PARKER ``AS IS'' AND ANY EXPRESS OR
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
**********/
The whole Sun Microsystems math library was ported to Palm
for this but its not actually needed, though the include file is
to allow bits of the system to compile that currently linked in
to the system, so we just have the include file here
palm/include/fdlibm.h
* ====================================================
* Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
*
* Developed at SunSoft, a Sun Microsystems, Inc. business.
* Permission to use, copy, modify, and distribute this
* software is freely granted, provided that this notice
* is preserved.
* ====================================================

49
lib/flite-1.4/Exports.def Normal file
View File

@ -0,0 +1,49 @@
LIBRARY "fliteDll"
EXPORTS
flite_init
flite_voice_select
flite_file_to_speech
flite_text_to_speech
flite_phones_to_speech
flite_ssml_to_speech
flite_text_to_wave
flite_synth_text
flite_synth_phones
flite_do_synth
flite_process_output
usenglish_init
cmu_lex_init
cmu_dari_lang_init
cmu_dari_lex_init
cmu_pashto_lang_init
cmu_pashto_lex_init
new_voice
delete_voice
flite_feat_set
flite_feat_set_float
flite_feat_set_int
flite_feat_set_string
flite_feat_remove
flite_ffeature_string
flite_get_param_val
flite_get_param_float
flite_get_param_int
flite_get_param_string
flite_voice_add_lex_addenda
cg_synth
cg_db_val
clunits_synth
clunit_db_val
dur_stats_val
cart_val
uttfunc_val
lexicon_val
cst_strdup
audio_open
audio_write
audio_close
audio_stream_chunk
audio_streaming_info_val
new_audio_streaming_info

127
lib/flite-1.4/Makefile Normal file
View File

@ -0,0 +1,127 @@
###########################################################################
## ##
## Language Technologies Institute ##
## Carnegie Mellon University ##
## Copyright (c) 1999-2009 ##
## All Rights Reserved. ##
## ##
## Permission is hereby granted, free of charge, to use and distribute ##
## this software and its documentation without restriction, including ##
## without limitation the rights to use, copy, modify, merge, publish, ##
## distribute, sublicense, and/or sell copies of this work, and to ##
## permit persons to whom this work is furnished to do so, subject to ##
## the following conditions: ##
## 1. The code must retain the above copyright notice, this list of ##
## conditions and the following disclaimer. ##
## 2. Any modifications must be clearly marked as such. ##
## 3. Original authors' names are not deleted. ##
## 4. The authors' names are not used to endorse or promote products ##
## derived from this software without specific prior written ##
## permission. ##
## ##
## CARNEGIE MELLON UNIVERSITY AND THE CONTRIBUTORS TO THIS WORK ##
## DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ##
## ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT ##
## SHALL CARNEGIE MELLON UNIVERSITY NOR THE CONTRIBUTORS BE LIABLE ##
## FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES ##
## WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN ##
## AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ##
## ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF ##
## THIS SOFTWARE. ##
## ##
###########################################################################
## ##
## Fast efficient small run-time speech synthesis system ##
## http://cmuflite.org ##
## ##
## Authors: Alan W Black (awb@cs.cmu.edu) ##
## Kevin A. Lenzo (lenzo@cs.cmu.edu) ##
## Date: May 2009 ##
## Version: 1.3.13 current ##
## ##
###########################################################################
TOP=.
DIRNAME=
BUILD_DIRS = include src lang doc
ALL_DIRS=config $(BUILD_DIRS) testsuite sapi palm wince windows tools main
CONFIG=configure configure.in config.sub config.guess \
missing install-sh mkinstalldirs
WINDOWS = Exports.def flite.sln fliteDll.vcproj
FILES = Makefile README ACKNOWLEDGEMENTS COPYING $(CONFIG) $(WINDOWS)
DIST_CLEAN = config.cache config.log config.status \
config/config config/system.mak FileList
HOST_ONLY_DIRS = tools main
ALL = $(BUILD_DIRS)
config_dummy := $(shell test -f config/config || ( echo '*** '; echo '*** Making default config file ***'; echo '*** '; ./configure; ) >&2)
include $(TOP)/config/common_make_rules
ifeq ($(TARGET_OS),wince)
BUILD_DIRS += wince
endif
ifeq ($(TARGET_OS),palmos)
INCLUDES += -I$(TOP)/palm/include
endif
config/config: config/config.in config.status
./config.status
configure: configure.in
autoconf
flop:
./configure --target=arm-palmos
$(MAKE)
ls -al palm/flop/flop.prc
backup: time-stamp
@ $(RM) -f $(TOP)/FileList
@ $(MAKE) file-list
@ echo .time-stamp >>FileList
@ ln -s . $(PROJECT_PREFIX)-$(PROJECT_VERSION)-$(PROJECT_STATE)
@ sed 's/^\.\///' <FileList | sed 's/^/'$(PROJECT_PREFIX)-$(PROJECT_VERSION)-$(PROJECT_STATE)'\//' >.file-list-all
@ tar jcvf $(PROJECT_PREFIX)-$(PROJECT_VERSION)-$(PROJECT_STATE).tar.bz2 `cat $(PROJECT_PREFIX)-$(PROJECT_VERSION)-$(PROJECT_STATE)/.file-list-all`
@ $(RM) -f $(TOP)/.file-list-all
@ $(RM) $(PROJECT_PREFIX)-$(PROJECT_VERSION)-$(PROJECT_STATE)
@ ls -l $(PROJECT_PREFIX)-$(PROJECT_VERSION)-$(PROJECT_STATE).tar.bz2
backupbz2: time-stamp
@ $(RM) -f $(TOP)/FileList
@ $(MAKE) file-list
@ echo .time-stamp >>FileList
@ ln -s . $(PROJECT_PREFIX)-$(PROJECT_VERSION)-$(PROJECT_STATE)
@ sed 's/^\.\///' <FileList | sed 's/^/'$(PROJECT_PREFIX)-$(PROJECT_VERSION)-$(PROJECT_STATE)'\//' | grep -v cmu_us_kal | grep -v cmu_us_awb | grep -v cmu_us_rms | grep -v cmu_us_slt | grep -v cmu_time_awb >.file-list-all
@ tar jcvf $(PROJECT_PREFIX)-$(PROJECT_VERSION)-$(PROJECT_STATE).tar.bz2 `cat $(PROJECT_PREFIX)-$(PROJECT_VERSION)-$(PROJECT_STATE)/.file-list-all`
@ $(RM) -f $(TOP)/.file-list-all
@ $(RM) $(PROJECT_PREFIX)-$(PROJECT_VERSION)-$(PROJECT_STATE)
@ ls -l $(PROJECT_PREFIX)-$(PROJECT_VERSION)-$(PROJECT_STATE).tar.bz2
tags:
@ $(RM) -f $(TOP)/FileList
@ $(MAKE) file-list
etags `cat FileList | grep "\.[ch]$$"`
install:
@echo Installing
mkdir -p $(INSTALLBINDIR)
mkdir -p $(INSTALLLIBDIR)
mkdir -p $(INSTALLINCDIR)
$(INSTALL) -m 644 include/*.h $(INSTALLINCDIR)
@ $(MAKE) -C main --no-print-directory install
time-stamp :
@ echo $(PROJECT_NAME) >.time-stamp
@ echo $(PROJECT_PREFIX) >>.time-stamp
@ echo $(PROJECT_VERSION) >>.time-stamp
@ echo $(PROJECT_DATE) >>.time-stamp
@ echo $(PROJECT_STATE) >>.time-stamp
@ echo $(LOGNAME) >>.time-stamp
@ hostname >>.time-stamp
@ date >>.time-stamp
test:
@ $(MAKE) --no-print-directory -C testsuite test

272
lib/flite-1.4/README Normal file
View File

@ -0,0 +1,272 @@
Flite: a small run-time speech synthesis engine
version 1.4-release
Copyright Carnegie Mellon University 1999-2009
All rights reserved
http://cmuflite.org
Flite is a small fast run-time speech synthesis engine. It is the
latest addition to the suite of free software synthesis tools
including University of Edinburgh's Festival Speech Synthesis System
and Carnegie Mellon University's FestVox project, tools, scripts and
documentation for building synthetic voices. However, flite itself
does not require either of these systems to compile and run.
The core Flite library was developed by Alan W Black <awb@cs.cmu.edu>
(mostly in his so-called spare time) while employed in the Language
Technologies Institute at Carnegie Mellon University. The name
"flite", originally chosen to mean "festival-lite" is perhaps doubly
appropriate as a substantial part of design and coding was done over
30,000ft while awb was travelling, and (usually) isn't in meetings.
The voices, lexicon and language components of flite, both their
compression techniques and their actual contents were developed by
Kevin A. Lenzo <lenzo@cs.cmu.edu> and Alan W Black <awb@cs.cmu.edu>.
Flite is the answer to the complaint that Festival is too big, too slow,
and not portable enough.
o Flite is designed for very small devices, such as PDAs, and also
for large server machines with lots of ports.
o Flite is not a replacement for Festival but an alternative run time
engine for voices developed in the FestVox framework where size and
speed is crucial.
o Flite is all in ANSI C, it contains no C++ or Scheme, thus requires
more care in programming, and is harder to customize at run time.
o It is thread safe
o Voices, lexicons and language descriptions can be compiled
(mostly automatically for voices and lexicons) into C representations
from their FestVox formats
o All voices, lexicons and language model data are const and in the
text segment (i.e. they may be put in ROM). As they are linked in
at compile time, there is virtually no startup delay.
o Although the synthesized output is not exactly the same as the same
voice in Festival they are effectively equivalent. That is flite
doesn't sound better or worse than the equivalent voice in festival,
just faster, smaller and scalable.
o For standard diphone voices, maximum run time memory
requirements are approximately less than twice the memory requirement
for the waveform generated. For 32bit archtectures
this effectively means under 1M.
o The flite program supports, synthesis of individual strings or files
(utterance by utterance) to direct audio devices or to waveform files.
o The flite library offers simple functions suitable for use in specific
applications.
Flite is distributed with a single 8K diphone voice (derived from the
cmu_us_kal voice), a pruned lexicon (derived from
cmulex) and a set of models for US English. Here are comparisons
with Festival using basically the same 8KHz diphone voice
Flite Festival
core code 60K 2.6M
USEnglish 100K ??
lexicon 600K 5M
diphone 1.8M 2.1M
runtime <1M 16-20M
On a 500Mhz PIII, a timing test of the first two chapters of
"Alice in Wonderland" (doc/alice) was done. This produces about
1300 seconds of speech. With flite it takes 19.128 seconds (about
70.6 times faster than real time) with Festival it takes 97 seconds
(13.4 times faster than real time). On the ipaq (with the 16KHz diphones)
flite synthesizes 9.79 time faster than real time.
Requirements:
o A good C compiler, some of these files are quite large and some C
compilers might choke on these, gcc is fine. Sun CC 3.01 has been
tested too. Visual C++ 6.0 is known to fail on the large diphone
database files. We recommend you use GCC under Cygwin or mingw32
instead.
o GNU Make
o An audio device isn't required as flite can write its output to
a waveform file.
Supported platforms:
We have successfully compiled and run on
o Various Intel Linux systems (and iPaq Linux), under various versions
of GCC (2.7.2 to 4.x)
o FreeBSD 3.x and 4.x
o Solaris 5.7, and Solaris 9
o Initial support for Mac OS X
o Windows 2000/XP under Cygwin 1.3.5 and later
o Support for WinCE (2.11 and 3.0) WM (5.x plus) is included
o PalmOS 5.x devices (Treo 600, Zire 31 and Tungsten C)
o Successfully compiles and runs under 64Bit Linux architectures
o OSF1 V4.0 (gives an unimportant warning about sizes when compiled cst_val.c)
Other similar platforms should just work, we have also cross compiled
on a Linux machine for StrongARM. However note that new byte order
architectures may not work directly as there is some careful
byte order constraints in some structures. These are portable but may
require reordering of some fields, contact us if you are moving to
a new archiecture.
News
----
New in 1.4 (December 2009)
o crude multi-voice selection support (may change)
o 4 basic voices are included 3 clustergen (awb, rms and slt) plus
the kal diphone database
o CMULEX now uses maximum onset for syllabification
o alsa support
o Clustergen support (including mlpg with mixed excitation)
But is still slow on limited processors
o Windows support with Visual Studio (specifically for the Olympus
Spoken Dialog System)
o WinCE support is redone with cegcc/mingw32ce with example
example TTS app: Fluwm: Flite on Windows Mobile
o Speed-ups in feature interpretation limiting calls to alloc
o Speed-ups (and fixes) for converting clunits festvox voices
New in 1.3-release (October 2005)
o fixes to lpc residual extraction to give better quality output
o An updated lexicon (festlex_CMU from festival-2.0) and better
compression its about 30% of the previous size, with about
the same accuracy
o Fairly substantial code movements to better support PalmOS and
multi-platform cross compilation builds
o A PalmOS 5.0 port with an small example talking app ("flop")
o runs under ix86_64 linux
New in 1.2-release (February 2003)
o A build process for diphone and clunits/ldom voices
FestVox voices can be converted (sometimes) automatically
o Various bug fixes
o Initial support for Mac OS X (not talking to audio device yet)
but compiles and runs
o Text files can be synthesize to a single audio file
o (optional) shared library support (Linux)
Compilation
-----------
In general
tar zxvf flite-1.4-release.tar.gz
cd flite-1.4-release
./configure
make
Where tar is gnu tar (gtar), and make is gnu make (gmake).
Configuration should be automatic, but maybe doesn't work in all cases
especially if you have some new compiler. You can explicitly set to
compiler in config/config and add any options you see fit. Configure
tries to guess these but it might be able for cross compilation cases
Interesting options there are
-DWORDS_BIGENDIAN=1 for bigendian machines (e.g. Sparc, M68x)
-DNO_UNION_INITIALIZATION=1 For compilers without C 99 union inintialization
-DCST_AUDIO_NONE if you don't need/want audio support
There are different sets of voices and languages you can select between
them (and your own sets if you make config/XXX.lv). For example
./configure --with-langvox=transtac
Will use the languages and voices defined in config/transtac.lv
Usage:
------
The ./bin/flite voices contains all supported voices and you may
choose between the voices with the -voice flag and list the supported
voices with the -lw flag. Note the kal (diphone) voice is a different
technology from the others and is much less computationally expensive
but more robotic. For each voice additional binaries that contain
only that voice are created in ./bin/flite_FULLVOICENAME,
e.g. ./bin/flite_cmu_us_awb.
If it compiles properly a binary will be put in bin/, note by
default -g is on so it will be bigger than is actually required
./bin/flite "Flite is a small fast run-time synthesis engine" flite.wav
Will produce an 8KHz riff headered waveform file (riff is Microsoft's
wave format often called .WAV).
./bin/flite doc/alice
Will play the text file doc/alice. If the first argument contains
a space it is treated as text otherwise it is treated as a filename.
If a second argument is given a waveform file is written to it,
if no argument is given or "play" is given it will attempt to
write directly to the audio device (if supported). if "none"
is given the audio is simply thrown away (used for benchmarking).
Explicit options are also available.
./bin/flite -v doc/alice none
Will synthesize the file without playing the audio and give a summary
of the speed.
./bin/flite doc/alice alice.wav
will synthesize the whole of alice into a single file (previoous
versions would only give the last utterance in the file, but
that is fixed now).
An additional set of feature setting options are available, these are
*debug* options, Voices are represented as sets of feature values (see
lang/cmu_us_kal/cmu_us_kal.c) and you can override values on the
command line. This can stop flite from working if malicious values
are set and therefor this facility is not intended to be made
available for standard users. But these are useful for
debugging. Some typical examples are
./bin/flite --sets join_type=simple_join doc/intro
Use simple concatenation of diphones without prosodic modification
./bin/flite -pw doc/alice
Print sentences as they are said
./bin/flite --setf duration_stretch=1.5 doc/alice
Make it speak slower
./bin/flite --setf int_f0_target_mean=145 doc/alice
Make it speak higher
The talking clock is an example talking clode as discussed on
http://festvox.org/ldom it requires a single argument HH:MM
under Unix you can call it
./bin/flite_time `date +%H:%M`
./bin/flite -lv
List the voices available in this build
./bin/flite -voice rms -f doc/alice
Speak with the US male rms voice
./bin/flite -voice awb -f doc/alice
Speak with the "Scottish" male awb voice
./bin/flite -voice slt -f doc/alice
Speak with the US female slt voice
Voice quality
-------------
So you've eagerly downloaded flite, compiled it and run it, now you
are disappointed that is doesn't sound wonderful, sure its fast and
small but what you really hoped for was the dulcit tones of a deep
baritone voice that would make you desperately hang on every phrase it
sang. But instead you get an 8Khz diphone voice that sounds like it
came from the last millenium.
Well, first, you are right, it is an 8KHz diphone voice from the last
millenium, and that was actually deliberate. As we developed flite we
wanted a voice that was stable and that we could directly compare with
that very same voice in Festival. Flite is an *engine*. We want to
be able take voices built with the FestVox process and compile them
for flite, the result should be exactly the same quality (though of
course trading the size for quality in flite is also an option). The
included voice is just an sample voice that was used in the testing
process. We have better voices in Festival and are working on the
coversion process to make it both more automatic and more robust and
tunable, but we haven't done that yet, so in this first beta release.
This old poor sounding voice is all we have, sorry, we'll provide you
with free, high-quality, scalable, configurable, natural sounding
voices for flite, in all languages and dialects, with the tools to
built new voices efficiently and robustly as soon as we can. Though
in the mean time, a few higher quality voices will be released with
the next version.

1327
lib/flite-1.4/config.guess vendored Normal file

File diff suppressed because it is too large Load Diff

1452
lib/flite-1.4/config.sub vendored Normal file

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,48 @@
###########################################################################
## ##
## Language Technologies Institute ##
## Carnegie Mellon University ##
## Copyright (c) 1999 ##
## All Rights Reserved. ##
## ##
## Permission is hereby granted, free of charge, to use and distribute ##
## this software and its documentation without restriction, including ##
## without limitation the rights to use, copy, modify, merge, publish, ##
## distribute, sublicense, and/or sell copies of this work, and to ##
## permit persons to whom this work is furnished to do so, subject to ##
## the following conditions: ##
## 1. The code must retain the above copyright notice, this list of ##
## conditions and the following disclaimer. ##
## 2. Any modifications must be clearly marked as such. ##
## 3. Original authors' names are not deleted. ##
## 4. The authors' names are not used to endorse or promote products ##
## derived from this software without specific prior written ##
## permission. ##
## ##
## CARNEGIE MELLON UNIVERSITY AND THE CONTRIBUTORS TO THIS WORK ##
## DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ##
## ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT ##
## SHALL CARNEGIE MELLON UNIVERSITY NOR THE CONTRIBUTORS BE LIABLE ##
## FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES ##
## WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN ##
## AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ##
## ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF ##
## THIS SOFTWARE. ##
## ##
###########################################################################
## ##
## Config directory ##
## ##
###########################################################################
TOP=..
DIRNAME=config
BUILD_DIRS =
ALL_DIRS=
LVMODULES = all.lv default.lv transtac.lv
FILES = Makefile common_make_rules project.mak config.in system.mak.in \
$(LVMODULES)
ALL =
include $(TOP)/config/common_make_rules

View File

@ -0,0 +1,10 @@
#
# all languages, lexicons and voices
LEXES = cmulex cmu_dari_lex
LANGS = usenglish cmu_dari_lang
VOXES = cmu_us_kal cmu_time_awb cmu_us_kal16 \
cmu_us_awb cmu_us_rms cmu_us_slt \
cmu_dari_male0
EXTRABINS = $(BINDIR)/flite_time$(EXEEXT)

View File

@ -0,0 +1,210 @@
########################################################-*-mode:Makefile-*-
## ##
## Language Technologies Institute ##
## Carnegie Mellon University ##
## Copyright (c) 1999 ##
## All Rights Reserved. ##
## ##
## Permission is hereby granted, free of charge, to use and distribute ##
## this software and its documentation without restriction, including ##
## without limitation the rights to use, copy, modify, merge, publish, ##
## distribute, sublicense, and/or sell copies of this work, and to ##
## permit persons to whom this work is furnished to do so, subject to ##
## the following conditions: ##
## 1. The code must retain the above copyright notice, this list of ##
## conditions and the following disclaimer. ##
## 2. Any modifications must be clearly marked as such. ##
## 3. Original authors' names are not deleted. ##
## 4. The authors' names are not used to endorse or promote products ##
## derived from this software without specific prior written ##
## permission. ##
## ##
## CARNEGIE MELLON UNIVERSITY AND THE CONTRIBUTORS TO THIS WORK ##
## DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ##
## ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT ##
## SHALL CARNEGIE MELLON UNIVERSITY NOR THE CONTRIBUTORS BE LIABLE ##
## FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES ##
## WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN ##
## AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ##
## ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF ##
## THIS SOFTWARE. ##
## ##
###########################################################################
## ##
## Common make rules included in all Makefiles ##
## ##
###########################################################################
# System type
-include $(TOP)/config/system.mak
# Include project specific rules
-include $(TOP)/config/project.mak
## User defined configuration options
include $(TOP)/config/config
INCLUDES = -I$(TOP)/include
ifeq ($(TARGET_OS),palmos)
INCLUDES += -I$(TOP)/palm/include
endif
CPPFLAGS += $(LOCAL_INCLUDES) $(INCLUDES)
CFLAGS += $(EXTRA_CC_FLAGS) $(OPT) $(DBG)
## These'll become (target)arch dependent at some point
TARGET_PLATFORM=$(TARGET_CPU)-$(TARGET_OS)
HOST_PLATFORM=$(HOST_CPU)-$(HOST_OS)
ifndef BUILDDIR
BUILDDIR=$(TOP)/build/$(TARGET_PLATFORM)
endif
OBJDIR=$(BUILDDIR)/obj/$(DIRNAME)
BINDIR=$(BUILDDIR)/bin
ifeq ($(HOST_PLATFORM),$(TARGET_PLATFORM))
BINDIR=$(TOP)/bin
endif
LIBDIR=$(BUILDDIR)/lib
BUILDDIRS=$(OBJDIR) $(BINDIR) $(LIBDIR)
FLITELIBS = $(BUILDDIR)/lib/libflite.a
FLITELIBFLAGS = -L$(BUILDDIR)/lib -lflite
LDFLAGS += -lm $(AUDIOLIBS) $(OTHERLIBS)
FULLOBJS = $(OBJS:%=$(OBJDIR)/%)
ifdef SHFLAGS
SOOBJS = $(OBJS:.o=.os)
FULLSHOBJS = $(SOOBJS:%=$(OBJDIR)/%)
ifdef LIBNAME
ALL += $(OBJDIR)/.build_so
endif
endif
ifdef LIBNAME
ALL += $(OBJDIR)/.build_lib
endif
# Only do some directories when you are not cross compiling
ifeq ($(HOST_PLATFORM),$(TARGET_PLATFORM))
OTHER_BUILD_DIRS = $(HOST_ONLY_DIRS)
ALL += $(HOST_ONLY_BUILDS)
endif
# When target is palm add the palm directory at the top level
ifeq ($(DIRNAME),)
ifeq ($(TARGET_OS),palmos)
OTHER_BUILD_DIRS += palm
endif
endif
all: $(BUILDDIRS) $(OTHER_BUILD_DIRS) $(OBJDIR)/.make_build_dirs $(ALL) nothing
nothing:
@ echo > /dev/null
$(BUILDDIRS):
@ mkdir -p $@ 2>/dev/null || true
$(OBJDIR)/%.o : %.c
$(CC) $(DEFS) $(CPPFLAGS) $(CFLAGS) -c $< -o $@
$(OBJDIR)/%.os : %.c
$(CC) $(SHFLAGS) $(DEFS) $(CPPFLAGS) $(CFLAGS) -c $< -o $@
$(OBJDIR)/.build_lib: $(FULLOBJS)
@ (cd $(OBJDIR) && $(AR) cruv ../../../$(LIBDIR)/lib$(LIBNAME).a $(OBJS))
@ $(RANLIB) $(LIBDIR)/lib$(LIBNAME).a
@ touch $(OBJDIR)/.build_lib
$(OBJDIR)/.build_so: $(FULLSHOBJS)
@ (cd $(OBJDIR) && $(AR) cruv ../../../$(LIBDIR)/lib$(LIBNAME).shared.a $(SOOBJS))
@ $(RANLIB) $(LIBDIR)/lib$(LIBNAME).shared.a
@ touch $(OBJDIR)/.build_so
# Used in the lib/ directory and in building new voices
$(LIBDIR)/%.so: $(LIBDIR)/%.shared.a
@ echo making $@
@ rm -rf shared_os && mkdir shared_os
@ rm -f $@ $@.${PROJECT_VERSION} $@.${PROJECT_SHLIB_VERSION}
@ (cd shared_os && ar x ../$<)
@ (cd shared_os && $(CC) -shared -Wl,-soname,`basename $@`.${PROJECT_SHLIB_VERSION} -o ../$@.${PROJECT_VERSION} *.os)
@ (cd $(LIBDIR) && ln -s `basename $@.${PROJECT_VERSION}` `basename $@.${PROJECT_SHLIB_VERSION}` )
@ (cd $(LIBDIR) && ln -s `basename $@.${PROJECT_SHLIB_VERSION}` `basename $@` )
@ rm -rf shared_os
$(OBJDIR)/.make_build_dirs:
@ echo making in $(DIRNAME) ...
ifdef BUILD_DIRS
@ set -e; for i in $(BUILD_DIRS) $(OTHER_BUILD_DIRS) ; \
do \
$(MAKE) -C $$i --no-print-directory; \
done
endif
clean:
@ echo make clean in $(DIRNAME) ...
@ rm -rf .build_lib .build_so *.o *.os *.a *~ $(LOCAL_CLEAN) $(OBJDIR)
ifdef ALL_DIRS
@ set -e; for i in $(ALL_DIRS) ; \
do \
$(MAKE) -C $$i --no-print-directory clean; \
done
endif
distclean:
@ echo make distclean in $(DIRNAME) ...
ifdef ALL_DIRS
@ set -e; for i in $(ALL_DIRS) ; \
do \
$(MAKE) -C $$i --no-print-directory distclean; \
done
endif
@ rm -rf .build_lib .build_shlib make.depend \
*.o *.os *.a *~ $(LOCAL_CLEAN) $(DIST_CLEAN) $(OBJDIR)
DEPEND=$(OBJDIR)/make.depend
MAKE_DEPEND=$(CC) -MM $(CPPFLAGS) $(CFLAGS)
depend:
@ echo make depend in $(DIRNAME) ...
@ rm -f $(DEPEND)
@ $(MAKE) nothing
ifdef ALL_DIRS
@ set -e; for i in $(ALL_DIRS) ; \
do \
$(MAKE) -C $$i --no-print-directory depend ; \
done
endif
$(DEPEND): $(SRCS) $(OBJDIR)
@ rm -f $(DEPEND)
@ for i in $(SRCS) ; \
do \
echo "# $$i" ; \
$(MAKE_DEPEND) $$i | sed -e 's,^\([^:][^:]*\):,$(OBJDIR)/\1:,'; \
echo ; \
done > $(DEPEND)
file-list:
@ echo making file-list in $(DIRNAME) ...
@ for f in $(FILES) ; \
do \
echo $(DIRNAME)/$$f >>$(TOP)/FileList ; \
done
ifdef ALL_DIRS
@ for i in $(ALL_DIRS) ; \
do \
$(MAKE) -C $$i --no-print-directory file-list; \
done
endif
info:
@echo Project Name = $(PROJECT_NAME)
@echo Project Prefix = $(PROJECT_PREFIX)
@echo Project Version = $(PROJECT_VERSION)
@echo Project Date = $(PROJECT_DATE)
@echo Project State = $(PROJECT_STATE)
@echo
@echo Configuration Variables
@echo none at present
# If there are sources in this directory, load in the dependencies
ifdef SRCS
-include $(DEPEND)
endif

View File

@ -0,0 +1,54 @@
# -*- makefile -*-
#
# This file is automatically generated by configure.
# Do not hand edit.
TARGET_OS = @TARGET_OS@
TARGET_CPU = @TARGET_CPU@
HOST_OS = @HOST_OS@
HOST_CPU = @HOST_CPU@
CC = @CC@
CFLAGS = @CFLAGS@
CPPFLAGS = @CPPFLAGS@
SHFLAGS = @SHFLAGS@
AR = @AR@
RANLIB = @RANLIB@
INSTALL = @INSTALL@
NM = @NM@
M68KCC = @M68KCC@
WINDRES = @WINDRES@
DLLTOOL = @DLLTOOL@
DLLWRAP = @DLLWRAP@
SIZE = @SIZE@
STRIP = @STRIP@
AUDIODRIVER = @AUDIODRIVER@
AUDIODEFS = @AUDIODEFS@
AUDIOLIBS = @AUDIOLIBS@
LEXDEFS = @LEXDEFS@
VOXDEFS = @VOXDEFS@
OTHERLIBS = @OTHERLIBS@
MMAPTYPE = @MMAPTYPE@
STDIOTYPE = @STDIOTYPE@
FL_LANG = @FL_LANG@
FL_VOX = @FL_VOX@
FL_LEX = @FL_LEX@
# The list of which languages, lexicons and voices have to be included
langvox = @FL_LANGVOX@
include $(TOP)/config/$(langvox).lv
prefix = @prefix@
exec_prefix = @exec_prefix@
EXEEXT = @EXEEXT@
INSTALLBINDIR = @bindir@
INSTALLLIBDIR = @libdir@
INSTALLINCDIR = @includedir@/flite

View File

@ -0,0 +1,8 @@
#
# The base languages, lexicons and voices
LEXES = cmulex
LANGS = usenglish
VOXES = cmu_us_kal cmu_time_awb cmu_us_kal16 \
cmu_us_awb cmu_us_rms cmu_us_slt
EXTRABINS = $(BINDIR)/flite_time$(EXEEXT)

View File

@ -0,0 +1,43 @@
########################################################-*-mode:Makefile-*-
## ##
## Language Technologies Institute ##
## Carnegie Mellon University ##
## Copyright (c) 1999 ##
## All Rights Reserved. ##
## ##
## Permission is hereby granted, free of charge, to use and distribute ##
## this software and its documentation without restriction, including ##
## without limitation the rights to use, copy, modify, merge, publish, ##
## distribute, sublicense, and/or sell copies of this work, and to ##
## permit persons to whom this work is furnished to do so, subject to ##
## the following conditions: ##
## 1. The code must retain the above copyright notice, this list of ##
## conditions and the following disclaimer. ##
## 2. Any modifications must be clearly marked as such. ##
## 3. Original authors' names are not deleted. ##
## 4. The authors' names are not used to endorse or promote products ##
## derived from this software without specific prior written ##
## permission. ##
## ##
## CARNEGIE MELLON UNIVERSITY AND THE CONTRIBUTORS TO THIS WORK ##
## DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ##
## ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT ##
## SHALL CARNEGIE MELLON UNIVERSITY NOR THE CONTRIBUTORS BE LIABLE ##
## FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES ##
## WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN ##
## AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ##
## ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF ##
## THIS SOFTWARE. ##
## ##
###########################################################################
## ##
## Project description ##
## ##
###########################################################################
PROJECT_NAME = Festival Lite
PROJECT_PREFIX = flite
PROJECT_VERSION = 1.4
PROJECT_DATE = December 2009
PROJECT_STATE = release
PROJECT_SHLIB_VERSION = 1

View File

@ -0,0 +1,9 @@
# -*- makefile -*-
#
# This file is automatically generated by configure.
# Do not hand edit.
OSTYPE := @host_os@
MACHINETYPE := @host_cpu@
PLATFORM := @host@
FULLOSTYPE := @host_vendor@-@host_os@

View File

@ -0,0 +1,9 @@
#
# The base languages, lexicons and voices
LEXES = cmulex cmu_dari_lex cmu_pashto_lex
LANGS = usenglish cmu_dari_lang cmu_pashto_lang
VOXES = cmu_us_rms cmu_dari_male0
VOXES = cmu_us_kal cmu_us_rms cmu_dari_male0 cmu_pashto_transtac_male1
EXTRABINS =

6011
lib/flite-1.4/configure vendored Normal file

File diff suppressed because it is too large Load Diff

366
lib/flite-1.4/configure.in Normal file
View File

@ -0,0 +1,366 @@
dnl########################################################################
dnl ##
dnl Language Technologies Institute ##
dnl Carnegie Mellon University ##
dnl Copyright (c) 1999-2008 ##
dnl All Rights Reserved. ##
dnl ##
dnl Permission is hereby granted, free of charge, to use and distribute ##
dnl this software and its documentation without restriction, including ##
dnl without limitation the rights to use, copy, modify, merge, publish, ##
dnl distribute, sublicense, and/or sell copies of this work, and to ##
dnl permit persons to whom this work is furnished to do so, subject to ##
dnl the following conditions: ##
dnl 1. The code must retain the above copyright notice, this list of ##
dnl conditions and the following disclaimer. ##
dnl 2. Any modifications must be clearly marked as such. ##
dnl 3. Original authors' names are not deleted. ##
dnl 4. The authors' names are not used to endorse or promote products ##
dnl derived from this software without specific prior written ##
dnl permission. ##
dnl ##
dnl CARNEGIE MELLON UNIVERSITY AND THE CONTRIBUTORS TO THIS WORK ##
dnl DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ##
dnl ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT ##
dnl SHALL CARNEGIE MELLON UNIVERSITY NOR THE CONTRIBUTORS BE LIABLE ##
dnl FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES ##
dnl WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN ##
dnl AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ##
dnl ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF ##
dnl THIS SOFTWARE. ##
dnl ##
dnl########################################################################
AC_INIT(include/flite.h)
AC_CANONICAL_SYSTEM
AC_PROG_CC
AC_PROG_RANLIB
AC_PROG_INSTALL
AC_CHECK_TOOL(AR, ar)
AC_C_BIGENDIAN
if test "x$GCC" = "xyes"; then
CFLAGS="$CFLAGS -Wall"
fi
AC_ARG_ENABLE( shared,
[ --disable-shared without shared library support],
[case "${enableval}" in
yes) shared=true ;;
no) shared=false ;;
*) AC_MSG_ERROR(bad value ${enableval} for shared options) ;;
esac],
[shared=false])
case "$target_cpu" in
i386|i486|i586|i686)
TARGET_CPU=i386
;;
*)
TARGET_CPU=$target_cpu
;;
esac
TARGET_OS=$target_os
M68KCC=
M68KCLAGS=
WINDRES=
case "$target_os" in
palmos*)
shared=false
CFLAGS="$CFLAGS -DCST_NO_SOCKETS"
# PalmOS Apps are always in M68K
M68KCC=/usr/m68k-palmos/bin/gcc
# Generic build is ARM or M68K (probably ARM though)
CC="/usr/$TARGET_CPU-palmos/bin/gcc"
if test "$target_cpu" = "arm"
then
CC="$CC -fPIC -march=armv4t"
fi
RANLIB=/usr/$TARGET_CPU-palmos/bin/ranlib
AR=/usr/$TARGET_CPU-palmos/bin/ar
LEXDEFS="-DCST_NO_STATIC_LEX -DCST_NO_STATIC_LTS_MODEL"
VOXDEFS="-DCST_NO_STATIC_VOX"
;;
dnl wince*)
dnl # For the GNUWINCE environment
dnl # http://win-ce.voxware.com:28575/Development%20Tools/
dnl shared=false
dnl CFLAGS="$CFLAGS -DCST_NO_SOCKETS -march=armv4 -mapcs-32 -malignment-traps -DNEWLIB -DSARM -DWIN32 -DGNUWINCE"
dnl CC="/usr/local/wince/bin/arm-wince-pe-gcc"
dnl RANLIB=/usr/local/wince/bin/arm-wince-pe-ranlib
dnl AR=/usr/local/wince/bin/arm-wince-pe-ar
dnl ;;
wince*)
# For the CEGCC environment (mingw32ce)
# http://cegcc.sourceforge.net/
shared=false
# cegcc
# CFLAGS="$CFLAGS -DCST_NO_SOCKETS -DUNDER_CE -DNEWLIB -DSARM -DWIN32 -DGNUWINCE"
# CC="/opt/cegcc/bin/arm-cegcc-gcc"
# RANLIB="/opt/cegcc/bin/arm-cegcc-ranlib"
# AR="/opt/cegcc/bin/arm-cegcc-ar"
# mingw32ce
CFLAGS="$CFLAGS -DCST_NO_SOCKETS -DUNDER_CE -DSARM -DWIN32"
if test -f "/opt/mingw32ce/bin/arm-mingw32ce-gcc"
then
MINGW32CEPREF="/opt/mingw32ce/bin/arm-mingw32ce-"
else
MINGW32CEPREF="/opt/mingw32ce/bin/arm-wince-mingw32ce-"
fi
CC="${MINGW32CEPREF}gcc"
RANLIB="${MINGW32CEPREF}ranlib"
AR="${MINGW32CEPREF}ar"
SIZE="${MINGW32CEPREF}size"
STRIP="${MINGW32CEPREF}strip"
WINDRES="${MINGW32CEPREF}windres"
DLLTOOL="${MINGW32CEPREF}dlltool"
DLLWRAP="${MINGW32CEPREF}dllwrap"
NM="${MINGW32CEPREF}nm"
;;
mingw*)
# For the Windows under mingw32 environment
# http://www.mingw.org
shared=false
CFLAGS="$CFLAGS -DCST_NO_SOCKETS -DUNDER_WINDOWS -DWIN32 -shared"
MINGWPREF="i386-mingw32-"
CC="${MINGWPREF}gcc"
RANLIB="${MINGWPREF}ranlib"
AR="${MINGWPREF}ar"
WINDRES="${MINGWPREF}windres"
DLLTOOL="${MINGWPREF}dlltool"
DLLWRAP="${MINGWPREF}dllwrap"
NM="${MINGWPREF}nm"
;;
uclinux*)
LDFLAGS="$LDFLAGS -Wl,-elf2flt"
;;
darwin*)
CFLAGS="$CFLAGS -no-cpp-precomp"
;;
esac
AC_SUBST(TARGET_OS)
AC_SUBST(TARGET_CPU)
AC_SUBST(M68KCC)
AC_SUBST(WINDRES)
AC_SUBST(SIZE)
AC_SUBST(STRIP)
AC_SUBST(DLLTOOL)
AC_SUBST(DLLWRAP)
AC_SUBST(NM)
AC_SUBST(LEXDEFS)
AC_SUBST(VOXDEFS)
case "$host_cpu" in
i386|i486|i586|i686)
HOST_CPU=i386
;;
*)
HOST_CPU=$host_cpu
;;
esac
HOST_OS=$host_os
AC_SUBST(HOST_OS)
AC_SUBST(HOST_CPU)
SHFLAGS=
OTHERLIBS=
if test "$shared" = true; then
case "$target_os" in
linux*|k*bsd*-gnu|gnu*)
SHFLAGS="-fPIC"
;;
solaris*)
SHFLAGS="-fPIC"
OTHERLIBS="-lsocket -ldl"
;;
*)
;;
esac
fi
case "$target_os" in
wince*)
# cegcc
#OTHERLIBS="-lc -lgcc -lwinsock -lcoredll"
# mingw32ce
OTHERLIBS=
;;
*)
;;
esac
AC_SUBST(OTHERLIBS)
AC_SUBST(SHFLAGS)
AC_ARG_ENABLE( sockets,
[ --disable-sockets without socket support],
[case "${enableval}" in
yes) sockets=true ;;
no) sockets=false ;;
*) AC_MSG_ERROR(bad value ${enableval} for sockets options) ;;
esac],
[sockets=true])
if test "$sockets" = false; then
AC_DEFINE(CST_NO_SOCKETS)
fi
dnl
dnl Does this compiler support initialization of unions
dnl
AC_TRY_COMPILE([#include <stdio.h>],
[ struct a { union { float b; int c; } d; };
const struct a e = { .d={ .b=3.14 } }; ],
[unioninit=yes],
[unioninit=no])
if test "$unioninit" = no; then
AC_DEFINE(NO_UNION_INITIALIZATION)
fi
dnl
dnl Does this platform support mmap(2)
dnl Note we don't use AC_FUNC_MMAP because we really only care whether
dnl read-only mappings work.
dnl
AC_CHECK_FUNC(mmap,MMAPTYPE=posix)
dnl AC_CHECK_FUNC doesn't seem to work for Win32 API calls...
if test "x$MMAPTYPE" = x; then
case "$target_os" in
cygwin*|mingw*)
MMAPTYPE=win32
;;
*)
MMAPTYPE=none
;;
esac
fi
AC_SUBST(MMAPTYPE)
dnl stdio type, palmos/wince are different
if test "$target_os" = "palmos"
then
STDIOTYPE=palmos
else
if test "$target_os" = "wince"
then
STDIOTYPE=wince
else
STDIOTYPE=stdio
fi
fi
AC_SUBST(STDIOTYPE)
dnl
dnl determine audio type or use none if none supported on this platform
dnl
AUDIODRIVER=none
AC_CHECK_HEADER(sys/soundcard.h,
[AUDIODRIVER="oss"
AUDIODEFS=-DCST_AUDIO_LINUX])
AC_CHECK_HEADER(machine/soundcard.h,
[AUDIODRIVER="oss"
AUDIODEFS=-DCST_AUDIO_FREEBSD])
AC_CHECK_HEADER(sys/audioio.h,
[AUDIODRIVER="sun"
AUDIODEFS=-DCST_AUDIO_SUNOS])
# Seems the alsa code I have breaks on earlier versions
# I'm not sure what the threshold version is, but made this depend on
# the one I know -- you can still specific --with-audio=alsa
AC_TRY_COMPILE([#include <alsa/version.h>],
[int j=
#if SND_LIB_SUBMINOR >= 11
3;
#endif],
[AUDIODRIVER="alsa"
AUDIODEFS=-DCST_AUDIO_ALSA
AUDIOLIBS=-lasound])
AC_CHECK_HEADER(mmsystem.h,
[AUDIODRIVER="wince"
AUDIODEFS=-DCST_AUDIO_WINCE
AUDIOLIBS=-lwinmm])
dnl I don't care what you ask for, for wince you get wince
case "$target_os" in
wince*)
AUDIODRIVER="wince"
AUDIODEFS=-DCST_AUDIO_WINCE
AUDIOLIBS=
;;
mingw*)
AUDIODRIVER="none"
AUDIODEFS=-DCST_AUDIO_NONE
AUDIOLIBS=
;;
*)
;;
esac
dnl
dnl allow the user to override the one detected above
dnl
AC_ARG_WITH( audio,
[ --with-audio with specific audio support (none linux freebsd etc) ],
AUDIODRIVER=$with_audio )
if test "x$AUDIODEFS" = x; then
case "$AUDIODRIVER" in
linux|oss)
AUDIODRIVER=oss
AUDIODEFS=-DCST_AUDIO_LINUX
;;
alsa)
AUDIODRIVER="alsa"
AUDIODEFS=-DCST_AUDIO_ALSA
AUDIOLIBS=-lasound
;;
*bsd)
AUDIODRIVER=oss
AUDIODEFS=-DCST_AUDIO_FREEBSD
;;
qnx)
AUDIODRIVER=alsa
AUDIODEFS=-DCST_AUDIO_QNX
;;
none)
AUDIODEFS=-DCST_AUDIO_NONE
;;
esac
fi
AC_SUBST(AUDIODRIVER)
AC_SUBST(AUDIODEFS)
AC_SUBST(AUDIOLIBS)
dnl
dnl language/lexicon/voice parameters
dnl
AC_ARG_WITH( lang, [ --with-lang with language ],
FL_LANG=$with_lang )
if test "x$with_lang" = "x"; then
FL_LANG="usenglish"
fi
AC_SUBST(FL_LANG)
AC_ARG_WITH( vox, [ --with-vox with vox ],
FL_VOX=$with_vox )
if test "x$with_vox" = "x"; then
FL_VOX="cmu_us_kal"
fi
AC_SUBST(FL_VOX)
AC_ARG_WITH( lex, [ --with-lex with lexicon ],
FL_LEX=$with_lex )
if test "x$with_lex" = "x"; then
FL_LEX="cmulex"
fi
AC_SUBST(FL_LEX)
AC_SUBST(EXEEXT)
FL_LANGVOX="default"
AC_ARG_WITH( langvox,
[ --with-langvox with subsets of lang, lex and voices ],
FL_LANGVOX=$with_langvox )
AC_SUBST(FL_LANGVOX)
AC_OUTPUT(config/config config/system.mak)

View File

@ -0,0 +1,69 @@
###########################################################################
## ##
## Language Technologies Institute ##
## Carnegie Mellon University ##
## Copyright (c) 1999 ##
## All Rights Reserved. ##
## ##
## Permission is hereby granted, free of charge, to use and distribute ##
## this software and its documentation without restriction, including ##
## without limitation the rights to use, copy, modify, merge, publish, ##
## distribute, sublicense, and/or sell copies of this work, and to ##
## permit persons to whom this work is furnished to do so, subject to ##
## the following conditions: ##
## 1. The code must retain the above copyright notice, this list of ##
## conditions and the following disclaimer. ##
## 2. Any modifications must be clearly marked as such. ##
## 3. Original authors' names are not deleted. ##
## 4. The authors' names are not used to endorse or promote products ##
## derived from this software without specific prior written ##
## permission. ##
## ##
## CARNEGIE MELLON UNIVERSITY AND THE CONTRIBUTORS TO THIS WORK ##
## DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ##
## ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT ##
## SHALL CARNEGIE MELLON UNIVERSITY NOR THE CONTRIBUTORS BE LIABLE ##
## FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES ##
## WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN ##
## AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ##
## ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF ##
## THIS SOFTWARE. ##
## ##
###########################################################################
## ##
## Documenation ##
## ##
###########################################################################
TOP=..
DIRNAME=doc
BUILD_DIRS =
ALL_DIRS=
FILES = Makefile flite.texi intro.txt alice stuff.ed
ALL =
include $(TOP)/config/common_make_rules
doc: flite.html flite.pdf
cp -p flite.pdf html
flite.html: flite.texi
@ if [ ! -d html ] ; \
then mkdir -p html ; fi
(cd html; texi2html -number -split_chapter ../flite.texi)
@ if [ -d html/flite ] ; \
then mv html/flite/*.html html ; \
rmdir html/flite; fi
@ for i in html/*.html ; \
do \
sed 's/<BODY>/<BODY bgcolor="#ffffff">/' $$i >ttt.html; \
mv ttt.html $$i ; \
done
@ cat stuff.ed | ed html/flite_toc.html
@ (cd html; rm -f index.html; ln flite_toc.html index.html)
flite.pdf: flite.texi
@ texi2pdf flite.texi

456
lib/flite-1.4/doc/alice Normal file
View File

@ -0,0 +1,456 @@
ALICE'S ADVENTURES IN WONDERLAND by Lewis Carroll.
CHAPTER I: Down the Rabbit-Hole.
Alice was beginning to get very tired of sitting by her sister
on the bank, and of having nothing to do: once or twice she had
peeped into the book her sister was reading, but it had no
pictures or conversations in it, `and what is the use of a book,'
thought Alice `without pictures or conversation?'
So she was considering in her own mind (as well as she could,
for the hot day made her feel very sleepy and stupid), whether
the pleasure of making a daisy-chain would be worth the trouble
of getting up and picking the daisies, when suddenly a White
Rabbit with pink eyes ran close by her.
There was nothing so VERY remarkable in that; nor did Alice
think it so VERY much out of the way to hear the Rabbit say to
itself, `Oh dear! Oh dear! I shall be late!' (when she thought
it over afterwards, it occurred to her that she ought to have
wondered at this, but at the time it all seemed quite natural);
but when the Rabbit actually TOOK A WATCH OUT OF ITS WAISTCOAT-
POCKET, and looked at it, and then hurried on, Alice started to
her feet, for it flashed across her mind that she had never
before seen a rabbit with either a waistcoat-pocket, or a watch to
take out of it, and burning with curiosity, she ran across the
field after it, and fortunately was just in time to see it pop
down a large rabbit-hole under the hedge.
In another moment down went Alice after it, never once
considering how in the world she was to get out again.
The rabbit-hole went straight on like a tunnel for some way,
and then dipped suddenly down, so suddenly that Alice had not a
moment to think about stopping herself before she found herself
falling down a very deep well.
Either the well was very deep, or she fell very slowly, for she
had plenty of time as she went down to look about her and to
wonder what was going to happen next. First, she tried to look
down and make out what she was coming to, but it was too dark to
see anything; then she looked at the sides of the well, and
noticed that they were filled with cupboards and book-shelves;
here and there she saw maps and pictures hung upon pegs. She
took down a jar from one of the shelves as she passed; it was
labelled `ORANGE MARMALADE', but to her great disappointment it
was empty: she did not like to drop the jar for fear of killing
somebody, so managed to put it into one of the cupboards as she
fell past it.
`Well!' thought Alice to herself, `after such a fall as this, I
shall think nothing of tumbling down stairs! How brave they'll
all think me at home! Why, I wouldn't say anything about it,
even if I fell off the top of the house!' (Which was very likely
true.)
Down, down, down. Would the fall NEVER come to an end! `I
wonder how many miles I've fallen by this time?' she said aloud.
`I must be getting somewhere near the centre of the earth. Let
me see: that would be four thousand miles down, I think--' (for,
you see, Alice had learnt several things of this sort in her
lessons in the schoolroom, and though this was not a VERY good
opportunity for showing off her knowledge, as there was no one to
listen to her, still it was good practice to say it over) `--yes,
that's about the right distance--but then I wonder what Latitude
or Longitude I've got to?' (Alice had no idea what Latitude was,
or Longitude either, but thought they were nice grand words to
say.)
Presently she began again. `I wonder if I shall fall right
THROUGH the earth! How funny it'll seem to come out among the
people that walk with their heads downward! The Antipathies, I
think--' (she was rather glad there WAS no one listening, this
time, as it didn't sound at all the right word) `--but I shall
have to ask them what the name of the country is, you know.
Please, Ma'am, is this New Zealand or Australia?' (and she tried
to curtsey as she spoke--fancy CURTSEYING as you're falling
through the air! Do you think you could manage it?) `And what
an ignorant little girl she'll think me for asking! No, it'll
never do to ask: perhaps I shall see it written up somewhere.'
Down, down, down. There was nothing else to do, so Alice soon
began talking again. `Dinah'll miss me very much to-night, I
should think!' (Dinah was the cat.) `I hope they'll remember
her saucer of milk at tea-time. Dinah my dear! I wish you were
down here with me! There are no mice in the air, I'm afraid, but
you might catch a bat, and that's very like a mouse, you know.
But do cats eat bats, I wonder?' And here Alice began to get
rather sleepy, and went on saying to herself, in a dreamy sort of
way, `Do cats eat bats? Do cats eat bats?' and sometimes, `Do
bats eat cats?' for, you see, as she couldn't answer either
question, it didn't much matter which way she put it. She felt
that she was dozing off, and had just begun to dream that she
was walking hand in hand with Dinah, and saying to her very
earnestly, `Now, Dinah, tell me the truth: did you ever eat a
bat?' when suddenly, thump! thump! down she came upon a heap of
sticks and dry leaves, and the fall was over.
Alice was not a bit hurt, and she jumped up on to her feet in a
moment: she looked up, but it was all dark overhead; before her
was another long passage, and the White Rabbit was still in
sight, hurrying down it. There was not a moment to be lost:
away went Alice like the wind, and was just in time to hear it
say, as it turned a corner, `Oh my ears and whiskers, how late
it's getting!' She was close behind it when she turned the
corner, but the Rabbit was no longer to be seen: she found
herself in a long, low hall, which was lit up by a row of lamps
hanging from the roof.
There were doors all round the hall, but they were all locked;
and when Alice had been all the way down one side and up the
other, trying every door, she walked sadly down the middle,
wondering how she was ever to get out again.
Suddenly she came upon a little three-legged table, all made of
solid glass; there was nothing on it except a tiny golden key,
and Alice's first thought was that it might belong to one of the
doors of the hall; but, alas! either the locks were too large, or
the key was too small, but at any rate it would not open any of
them. However, on the second time round, she came upon a low
curtain she had not noticed before, and behind it was a little
door about fifteen inches high: she tried the little golden key
in the lock, and to her great delight it fitted!
Alice opened the door and found that it led into a small
passage, not much larger than a rat-hole: she knelt down and
looked along the passage into the loveliest garden you ever saw.
How she longed to get out of that dark hall, and wander about
among those beds of bright flowers and those cool fountains, but
she could not even get her head though the doorway; `and even if
my head would go through,' thought poor Alice, `it would be of
very little use without my shoulders. Oh, how I wish
I could shut up like a telescope! I think I could, if I only
know how to begin.' For, you see, so many out-of-the-way things
had happened lately, that Alice had begun to think that very few
things indeed were really impossible.
There seemed to be no use in waiting by the little door, so she
went back to the table, half hoping she might find another key on
it, or at any rate a book of rules for shutting people up like
telescopes: this time she found a little bottle on it, (`which
certainly was not here before,' said Alice,) and round the neck
of the bottle was a paper label, with the words `DRINK ME'
beautifully printed on it in large letters.
It was all very well to say `Drink me,' but the wise little
Alice was not going to do THAT in a hurry. `No, I'll look
first,' she said, `and see whether it's marked "poison" or not';
for she had read several nice little histories about children who
had got burnt, and eaten up by wild beasts and other unpleasant
things, all because they WOULD not remember the simple rules
their friends had taught them: such as, that a red-hot poker
will burn you if you hold it too long; and that if you cut your
finger VERY deeply with a knife, it usually bleeds; and she had
never forgotten that, if you drink much from a bottle marked
`poison,' it is almost certain to disagree with you, sooner or
later.
However, this bottle was NOT marked `poison,' so Alice ventured
to taste it, and finding it very nice, (it had, in fact, a sort
of mixed flavour of cherry-tart, custard, pine-apple, roast
turkey, toffee, and hot buttered toast,) she very soon finished
it off.
* * * * * * *
* * * * * *
* * * * * * *
`What a curious feeling!' said Alice; `I must be shutting up
like a telescope.'
And so it was indeed: she was now only ten inches high, and
her face brightened up at the thought that she was now the right
size for going though the little door into that lovely garden.
First, however, she waited for a few minutes to see if she was
going to shrink any further: she felt a little nervous about
this; `for it might end, you know,' said Alice to herself, `in my
going out altogether, like a candle. I wonder what I should be
like then?' And she tried to fancy what the flame of a candle is
like after the candle is blown out, for she could not remember
ever having seen such a thing.
After a while, finding that nothing more happened, she decided
on going into the garden at once; but, alas for poor Alice! when
she got to the door, she found he had forgotten the little golden
key, and when she went back to the table for it, she found she
could not possibly reach it: she could see it quite plainly
through the glass, and she tried her best to climb up one of the
legs of the table, but it was too slippery; and when she had
tired herself out with trying, the poor little thing sat down and
cried.
`Come, there's no use in crying like that!' said Alice to
herself, rather sharply; `I advise you to leave off this minute!'
She generally gave herself very good advice, (though she very
seldom followed it), and sometimes she scolded herself so
severely as to bring tears into her eyes; and once she remembered
trying to box her own ears for having cheated herself in a game
of croquet she was playing against herself, for this curious
child was very fond of pretending to be two people. `But it's no
use now,' thought poor Alice, `to pretend to be two people! Why,
there's hardly enough of me left to make ONE respectable
person!'
Soon her eye fell on a little glass box that was lying under
the table: she opened it, and found in it a very small cake, on
which the words `EAT ME' were beautifully marked in currants.
`Well, I'll eat it,' said Alice, `and if it makes me grow larger,
I can reach the key; and if it makes me grow smaller, I can creep
under the door; so either way I'll get into the garden, and I
don't care which happens!'
She ate a little bit, and said anxiously to herself, `Which
way? Which way?', holding her hand on the top of her head to
feel which way it was growing, and she was quite surprised to
find that she remained the same size: to be sure, this generally
happens when one eats cake, but Alice had got so much into the
way of expecting nothing but out-of-the-way things to happen,
that it seemed quite dull and stupid for life to go on in the
common way.
So she set to work, and very soon finished off the cake.
* * * * * * *
* * * * * *
* * * * * * *
CHAPTER II
The Pool of Tears
`Curiouser and curiouser!' cried Alice (she was so much
surprised, that for the moment she quite forgot how to speak good
English); `now I'm opening out like the largest telescope that
ever was! Good-bye, feet!' (for when she looked down at her
feet, they seemed to be almost out of sight, they were getting so
far off). `Oh, my poor little feet, I wonder who will put on
your shoes and stockings for you now, dears? I'm sure _I_ shan't
be able! I shall be a great deal too far off to trouble myself
about you: you must manage the best way you can; --but I must be
kind to them,' thought Alice, `or perhaps they won't walk the
way I want to go! Let me see: I'll give them a new pair of
boots every Christmas.'
And she went on planning to herself how she would manage it.
`They must go by the carrier,' she thought; `and how funny it'll
seem, sending presents to one's own feet! And how odd the
directions will look!
ALICE'S RIGHT FOOT, ESQ.
HEARTHRUG,
NEAR THE FENDER,
(WITH ALICE'S LOVE).
Oh dear, what nonsense I'm talking!'
Just then her head struck against the roof of the hall: in
fact she was now more than nine feet high, and she at once took
up the little golden key and hurried off to the garden door.
Poor Alice! It was as much as she could do, lying down on one
side, to look through into the garden with one eye; but to get
through was more hopeless than ever: she sat down and began to
cry again.
`You ought to be ashamed of yourself,' said Alice, `a great
girl like you,' (she might well say this), `to go on crying in
this way! Stop this moment, I tell you!' But she went on all
the same, shedding gallons of tears, until there was a large pool
all round her, about four inches deep and reaching half down the
hall.
After a time she heard a little pattering of feet in the
distance, and she hastily dried her eyes to see what was coming.
It was the White Rabbit returning, splendidly dressed, with a
pair of white kid gloves in one hand and a large fan in the
other: he came trotting along in a great hurry, muttering to
himself as he came, `Oh! the Duchess, the Duchess! Oh! won't she
be savage if I've kept her waiting!' Alice felt so desperate
that she was ready to ask help of any one; so, when the Rabbit
came near her, she began, in a low, timid voice, `If you please,
sir--' The Rabbit started violently, dropped the white kid
gloves and the fan, and skurried away into the darkness as hard
as he could go.
Alice took up the fan and gloves, and, as the hall was very
hot, she kept fanning herself all the time she went on talking:
`Dear, dear! How queer everything is to-day! And yesterday
things went on just as usual. I wonder if I've been changed in
the night? Let me think: was I the same when I got up this
morning? I almost think I can remember feeling a little
different. But if I'm not the same, the next question is, Who in
the world am I? Ah, THAT'S the great puzzle!' And she began
thinking over all the children she knew that were of the same age
as herself, to see if she could have been changed for any of
them.
`I'm sure I'm not Ada,' she said, `for her hair goes in such
long ringlets, and mine doesn't go in ringlets at all; and I'm
sure I can't be Mabel, for I know all sorts of things, and she,
oh! she knows such a very little! Besides, SHE'S she, and I'm I,
and--oh dear, how puzzling it all is! I'll try if I know all the
things I used to know. Let me see: four times five is twelve,
and four times six is thirteen, and four times seven is--oh dear!
I shall never get to twenty at that rate! However, the
Multiplication Table doesn't signify: let's try Geography.
London is the capital of Paris, and Paris is the capital of Rome,
and Rome--no, THAT'S all wrong, I'm certain! I must have been
changed for Mabel! I'll try and say "How doth the little--"'
and she crossed her hands on her lap as if she were saying lessons,
and began to repeat it, but her voice sounded hoarse and
strange, and the words did not come the same as they used to do:--
`How doth the little crocodile
Improve his shining tail,
And pour the waters of the Nile
On every golden scale!
`How cheerfully he seems to grin,
How neatly spread his claws,
And welcome little fishes in
With gently smiling jaws!'
`I'm sure those are not the right words,' said poor Alice, and
her eyes filled with tears again as she went on, `I must be Mabel
after all, and I shall have to go and live in that poky little
house, and have next to no toys to play with, and oh! ever so
many lessons to learn! No, I've made up my mind about it; if I'm
Mabel, I'll stay down here! It'll be no use their putting their
heads down and saying "Come up again, dear!" I shall only look
up and say "Who am I then? Tell me that first, and then, if I
like being that person, I'll come up: if not, I'll stay down
here till I'm somebody else"--but, oh dear!' cried Alice, with a
sudden burst of tears, `I do wish they WOULD put their heads
down! I am so VERY tired of being all alone here!'
As she said this she looked down at her hands, and was
surprised to see that she had put on one of the Rabbit's little
white kid gloves while she was talking. `How CAN I have done
that?' she thought. `I must be growing small again.' She got up
and went to the table to measure herself by it, and found that,
as nearly as she could guess, she was now about two feet high,
and was going on shrinking rapidly: she soon found out that the
cause of this was the fan she was holding, and she dropped it
hastily, just in time to avoid shrinking away altogether.
`That WAS a narrow escape!' said Alice, a good deal frightened at
the sudden change, but very glad to find herself still in
existence; `and now for the garden!' and she ran with all speed
back to the little door: but, alas! the little door was shut
again, and the little golden key was lying on the glass table as
before, `and things are worse than ever,' thought the poor child,
`for I never was so small as this before, never! And I declare
it's too bad, that it is!'
As she said these words her foot slipped, and in another
moment, splash! she was up to her chin in salt water. He first
idea was that she had somehow fallen into the sea, `and in that
case I can go back by railway,' she said to herself. (Alice had
been to the seaside once in her life, and had come to the general
conclusion, that wherever you go to on the English coast you find
a number of bathing machines in the sea, some children digging in
the sand with wooden spades, then a row of lodging houses, and
behind them a railway station.) However, she soon made out that
she was in the pool of tears which she had wept when she was nine
feet high.
`I wish I hadn't cried so much!' said Alice, as she swam about,
trying to find her way out. `I shall be punished for it now, I
suppose, by being drowned in my own tears! That WILL be a queer
thing, to be sure! However, everything is queer to-day.'
Just then she heard something splashing about in the pool a
little way off, and she swam nearer to make out what it was: at
first she thought it must be a walrus or hippopotamus, but then
she remembered how small she was now, and she soon made out that
it was only a mouse that had slipped in like herself.
`Would it be of any use, now,' thought Alice, `to speak to this
mouse? Everything is so out-of-the-way down here, that I should
think very likely it can talk: at any rate, there's no harm in
trying.' So she began: `O Mouse, do you know the way out of
this pool? I am very tired of swimming about here, O Mouse!'
(Alice thought this must be the right way of speaking to a mouse:
she had never done such a thing before, but she remembered having
seen in her brother's Latin Grammar, `A mouse--of a mouse--to a
mouse--a mouse--O mouse!' The Mouse looked at her rather
inquisitively, and seemed to her to wink with one of its little
eyes, but it said nothing.
`Perhaps it doesn't understand English,' thought Alice; `I
daresay it's a French mouse, come over with William the
Conqueror.' (For, with all her knowledge of history, Alice had
no very clear notion how long ago anything had happened.) So she
began again: `Ou est ma chatte?' which was the first sentence in
her French lesson-book. The Mouse gave a sudden leap out of the
water, and seemed to quiver all over with fright. `Oh, I beg
your pardon!' cried Alice hastily, afraid that she had hurt the
poor animal's feelings. `I quite forgot you didn't like cats.'
`Not like cats!' cried the Mouse, in a shrill, passionate
voice. `Would YOU like cats if you were me?'
`Well, perhaps not,' said Alice in a soothing tone: `don't be
angry about it. And yet I wish I could show you our cat Dinah:
I think you'd take a fancy to cats if you could only see her.
She is such a dear quiet thing,' Alice went on, half to herself,
as she swam lazily about in the pool, `and she sits purring so
nicely by the fire, licking her paws and washing her face--and
she is such a nice soft thing to nurse--and she's such a capital
one for catching mice--oh, I beg your pardon!' cried Alice again,
for this time the Mouse was bristling all over, and she felt
certain it must be really offended. `We won't talk about her any
more if you'd rather not.'
`We indeed!' cried the Mouse, who was trembling down to the end
of his tail. `As if I would talk on such a subject! Our family
always HATED cats: nasty, low, vulgar things! Don't let me hear
the name again!'
`I won't indeed!' said Alice, in a great hurry to change the
subject of conversation. `Are you--are you fond--of--of dogs?'
The Mouse did not answer, so Alice went on eagerly: `There is
such a nice little dog near our house I should like to show you!
A little bright-eyed terrier, you know, with oh, such long curly
brown hair! And it'll fetch things when you throw them, and
it'll sit up and beg for its dinner, and all sorts of things--I
can't remember half of them--and it belongs to a farmer, you
know, and he says it's so useful, it's worth a hundred pounds!
He says it kills all the rats and--oh dear!' cried Alice in a
sorrowful tone, `I'm afraid I've offended it again!' For the
Mouse was swimming away from her as hard as it could go, and
making quite a commotion in the pool as it went.
So she called softly after it, `Mouse dear! Do come back
again, and we won't talk about cats or dogs either, if you don't
like them!' When the Mouse heard this, it turned round and swam
slowly back to her: its face was quite pale (with passion, Alice
thought), and it said in a low trembling voice, `Let us get to
the shore, and then I'll tell you my history, and you'll
understand why it is I hate cats and dogs.'
It was high time to go, for the pool was getting quite crowded
with the birds and animals that had fallen into it: there were a
Duck and a Dodo, a Lory and an Eaglet, and several other curious
creatures. Alice led the way, and the whole party swam to the
shore.

1191
lib/flite-1.4/doc/flite.texi Normal file

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,6 @@
Flite is a small, fast run-time synthesis engine, designed for
embedded systems and servers. Flite was developed by Alan W Black and
Kevin Lenzo at Carnegie Mellon University, in Pittsburgh. The
city with TTS at its heart.

View File

@ -0,0 +1,23 @@
13
d
d
a
<ADDRESS>by <A HREF="http://www.cs.cmu.edu/~awb/">Alan W Black</A> and <A HREF="http://www.cs.cmu.edu/~lenzo/">Kevin A. Lenzo</A></ADDRESS>
<ADDRESS><A HREF="http://www.speech.cs.cmu.edu">Speech Group at Carnegie Mellon University</A></ADDRESS>
<HR>
Full distribution with sources and this document
<A HREF="http://cmuflite.org/packed/flite-1.4/flite-1.4-release.tar.gz">flite-1.4-release.tar.gz</A><br>
PDF version of this document alone
<A HREF="flite.pdf">flite.pdf</A>
<br>
Updates and news on Flite will be posted on
<A HREF="http://cmuflite.org">http://cmuflite.org</A>
</P>
<P>
NOTE: this document is incomplete
</P>
<HR>
.
w
q

60
lib/flite-1.4/flite.sln Normal file
View File

@ -0,0 +1,60 @@

Microsoft Visual Studio Solution File, Format Version 9.00
# Visual Studio 2005
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "fliteDll", "fliteDll.vcproj", "{FAEFFFEB-D98F-4641-A0CF-04E31C8F90F2}"
ProjectSection(WebsiteProperties) = preProject
Debug.AspNetCompiler.Debug = "True"
Release.AspNetCompiler.Debug = "False"
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cmu_us_rms", "lang\cmu_us_rms\cmu_us_rms.vcproj", "{596A15AB-57B8-4EC2-BEC5-C34689D7ED5C}"
ProjectSection(WebsiteProperties) = preProject
Debug.AspNetCompiler.Debug = "True"
Release.AspNetCompiler.Debug = "False"
EndProjectSection
ProjectSection(ProjectDependencies) = postProject
{FAEFFFEB-D98F-4641-A0CF-04E31C8F90F2} = {FAEFFFEB-D98F-4641-A0CF-04E31C8F90F2}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cmu_dari_male0", "lang\cmu_dari_male0\cmu_dari_male0.vcproj", "{2AA75D28-C2B0-442D-BDE6-6A612597F897}"
ProjectSection(WebsiteProperties) = preProject
Debug.AspNetCompiler.Debug = "True"
Release.AspNetCompiler.Debug = "False"
EndProjectSection
ProjectSection(ProjectDependencies) = postProject
{FAEFFFEB-D98F-4641-A0CF-04E31C8F90F2} = {FAEFFFEB-D98F-4641-A0CF-04E31C8F90F2}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cmu_pashto_transtac_male1", "lang\cmu_pashto_transtac_male1\cmu_pashto_transtac_male1.vcproj", "{318A1257-0E9F-406A-A9E9-B019ABAE017D}"
ProjectSection(WebsiteProperties) = preProject
Debug.AspNetCompiler.Debug = "True"
Release.AspNetCompiler.Debug = "False"
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
Release|Win32 = Release|Win32
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{FAEFFFEB-D98F-4641-A0CF-04E31C8F90F2}.Debug|Win32.ActiveCfg = Debug|Win32
{FAEFFFEB-D98F-4641-A0CF-04E31C8F90F2}.Debug|Win32.Build.0 = Debug|Win32
{FAEFFFEB-D98F-4641-A0CF-04E31C8F90F2}.Release|Win32.ActiveCfg = Release|Win32
{FAEFFFEB-D98F-4641-A0CF-04E31C8F90F2}.Release|Win32.Build.0 = Release|Win32
{596A15AB-57B8-4EC2-BEC5-C34689D7ED5C}.Debug|Win32.ActiveCfg = Debug|Win32
{596A15AB-57B8-4EC2-BEC5-C34689D7ED5C}.Debug|Win32.Build.0 = Debug|Win32
{596A15AB-57B8-4EC2-BEC5-C34689D7ED5C}.Release|Win32.ActiveCfg = Release|Win32
{596A15AB-57B8-4EC2-BEC5-C34689D7ED5C}.Release|Win32.Build.0 = Release|Win32
{2AA75D28-C2B0-442D-BDE6-6A612597F897}.Debug|Win32.ActiveCfg = Debug|Win32
{2AA75D28-C2B0-442D-BDE6-6A612597F897}.Debug|Win32.Build.0 = Debug|Win32
{2AA75D28-C2B0-442D-BDE6-6A612597F897}.Release|Win32.ActiveCfg = Release|Win32
{2AA75D28-C2B0-442D-BDE6-6A612597F897}.Release|Win32.Build.0 = Release|Win32
{318A1257-0E9F-406A-A9E9-B019ABAE017D}.Debug|Win32.ActiveCfg = Debug|Win32
{318A1257-0E9F-406A-A9E9-B019ABAE017D}.Debug|Win32.Build.0 = Debug|Win32
{318A1257-0E9F-406A-A9E9-B019ABAE017D}.Release|Win32.ActiveCfg = Release|Win32
{318A1257-0E9F-406A-A9E9-B019ABAE017D}.Release|Win32.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal

View File

@ -0,0 +1,894 @@
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="8.00"
Name="fliteDll"
ProjectGUID="{FAEFFFEB-D98F-4641-A0CF-04E31C8F90F2}"
RootNamespace="fliteDll"
Keyword="Win32Proj"
>
<Platforms>
<Platform
Name="Win32"
/>
</Platforms>
<ToolFiles>
</ToolFiles>
<Configurations>
<Configuration
Name="Debug|Win32"
OutputDirectory="lib"
IntermediateDirectory="windows\build\$(ConfigurationName)"
ConfigurationType="2"
CharacterSet="1"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="include"
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;FLITEDLL_EXPORTS;NO_UNION_INITIALIZATION;CST_NO_SOCKETS;CST_AUDIO_WIN32"
MinimalRebuild="true"
ExceptionHandling="0"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
UsePrecompiledHeader="0"
WarningLevel="3"
Detect64BitPortabilityProblems="true"
DebugInformationFormat="4"
CompileAs="1"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
LinkIncremental="2"
ModuleDefinitionFile="Exports.def"
GenerateDebugInformation="true"
SubSystem="2"
TargetMachine="1"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCWebDeploymentTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Release|Win32"
OutputDirectory="lib"
IntermediateDirectory="windows\build\$(ConfigurationName)"
ConfigurationType="2"
CharacterSet="1"
WholeProgramOptimization="1"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories="include"
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;FLITEDLL_EXPORTS;NO_UNION_INITIALIZATION;CST_NO_SOCKETS;CST_AUDIO_WIN32"
ExceptionHandling="0"
RuntimeLibrary="2"
UsePrecompiledHeader="0"
WarningLevel="3"
Detect64BitPortabilityProblems="true"
DebugInformationFormat="3"
CompileAs="1"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="winmm.lib"
LinkIncremental="1"
ModuleDefinitionFile="Exports.def"
GenerateDebugInformation="true"
SubSystem="2"
OptimizeReferences="2"
EnableCOMDATFolding="2"
TargetMachine="1"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCWebDeploymentTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
</Configurations>
<References>
</References>
<Files>
<Filter
Name="Source Files"
Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
>
<File
RelativePath=".\src\audio\au_command.c"
>
</File>
<File
RelativePath=".\src\audio\au_none.c"
>
</File>
<File
RelativePath=".\src\audio\au_streaming.c"
>
</File>
<File
RelativePath=".\src\audio\au_wince.c"
>
</File>
<File
RelativePath=".\src\audio\auclient.c"
>
</File>
<File
RelativePath=".\src\audio\audio.c"
>
</File>
<File
RelativePath=".\src\audio\auserver.c"
>
</File>
<File
RelativePath=".\lang\cmu_dari_lang\cmu_dari_lang.c"
>
</File>
<File
RelativePath=".\lang\cmu_dari_lex\cmu_dari_lex.c"
>
</File>
<File
RelativePath=".\lang\cmu_dari_lex\cmu_dari_lex_data.c"
>
</File>
<File
RelativePath=".\lang\cmu_dari_lex\cmu_dari_lex_entries.c"
>
</File>
<File
RelativePath=".\lang\cmu_dari_lex\cmu_dari_lex_lts_model.c"
>
</File>
<File
RelativePath=".\lang\cmu_dari_lex\cmu_dari_lex_lts_rules.c"
>
</File>
<File
RelativePath=".\lang\cmu_dari_lang\cmu_dari_phoneset.c"
>
</File>
<File
RelativePath=".\lang\cmu_dari_lang\cmu_dari_phrasing_cart.c"
>
</File>
<File
RelativePath=".\lang\cmu_dari_lex\cmu_dari_postlex.c"
>
</File>
<File
RelativePath=".\lang\cmu_dari_lang\cmu_dari_text.c"
>
</File>
<File
RelativePath=".\lang\cmulex\cmu_lex.c"
>
</File>
<File
RelativePath=".\lang\cmulex\cmu_lex_data.c"
>
</File>
<File
RelativePath=".\lang\cmulex\cmu_lex_entries.c"
>
</File>
<File
RelativePath=".\lang\cmulex\cmu_lts_model.c"
>
</File>
<File
RelativePath=".\lang\cmulex\cmu_lts_rules.c"
>
</File>
<File
RelativePath=".\lang\cmu_pashto_lang\cmu_pashto_lang.c"
>
</File>
<File
RelativePath=".\lang\cmu_pashto_lex\cmu_pashto_lex.c"
>
</File>
<File
RelativePath=".\lang\cmu_pashto_lex\cmu_pashto_lex_data.c"
>
</File>
<File
RelativePath=".\lang\cmu_pashto_lex\cmu_pashto_lex_entries.c"
>
</File>
<File
RelativePath=".\lang\cmu_pashto_lex\cmu_pashto_lts_model.c"
>
</File>
<File
RelativePath=".\lang\cmu_pashto_lex\cmu_pashto_lts_rules.c"
>
</File>
<File
RelativePath=".\lang\cmu_pashto_lang\cmu_pashto_phoneset.c"
>
</File>
<File
RelativePath=".\lang\cmu_pashto_lang\cmu_pashto_phrasing_cart.c"
>
</File>
<File
RelativePath=".\lang\cmu_pashto_lex\cmu_pashto_postlex.c"
>
</File>
<File
RelativePath=".\lang\cmu_pashto_lang\cmu_pashto_text.c"
>
</File>
<File
RelativePath=".\lang\cmulex\cmu_postlex.c"
>
</File>
<File
RelativePath=".\src\utils\cst_alloc.c"
>
</File>
<File
RelativePath=".\src\utils\cst_args.c"
>
</File>
<File
RelativePath=".\src\stats\cst_cart.c"
>
</File>
<File
RelativePath=".\src\cg\cst_cg.c"
>
</File>
<File
RelativePath=".\src\wavesynth\cst_clunits.c"
>
</File>
<File
RelativePath=".\src\wavesynth\cst_diphone.c"
>
</File>
<File
RelativePath=".\src\utils\cst_endian.c"
>
</File>
<File
RelativePath=".\src\utils\cst_error.c"
>
</File>
<File
RelativePath=".\src\utils\cst_features.c"
>
</File>
<File
RelativePath=".\src\hrg\cst_ffeature.c"
>
</File>
<File
RelativePath=".\src\synth\cst_ffeatures.c"
>
</File>
<File
RelativePath=".\src\utils\cst_file_stdio.c"
>
</File>
<File
RelativePath=".\src\hrg\cst_item.c"
>
</File>
<File
RelativePath=".\src\lexicon\cst_lexicon.c"
>
</File>
<File
RelativePath=".\src\speech\cst_lpcres.c"
>
</File>
<File
RelativePath=".\src\lexicon\cst_lts.c"
>
</File>
<File
RelativePath=".\src\lexicon\cst_lts_rewrites.c"
>
</File>
<File
RelativePath=".\src\cg\cst_mlpg.c"
>
</File>
<File
RelativePath=".\src\cg\cst_mlsa.c"
>
</File>
<File
RelativePath=".\src\utils\cst_mmap_win32.c"
>
</File>
<File
RelativePath=".\src\synth\cst_phoneset.c"
>
</File>
<File
RelativePath=".\src\wavesynth\cst_reflpc.c"
>
</File>
<File
RelativePath=".\src\regex\cst_regex.c"
>
</File>
<File
RelativePath=".\src\hrg\cst_rel_io.c"
>
</File>
<File
RelativePath=".\src\hrg\cst_relation.c"
>
</File>
<File
RelativePath=".\src\wavesynth\cst_sigpr.c"
>
</File>
<File
RelativePath=".\src\utils\cst_socket.c"
>
</File>
<File
RelativePath=".\src\stats\cst_ss.c"
>
</File>
<File
RelativePath=".\src\synth\cst_ssml.c"
>
</File>
<File
RelativePath=".\src\utils\cst_string.c"
>
</File>
<File
RelativePath=".\src\wavesynth\cst_sts.c"
>
</File>
<File
RelativePath=".\src\synth\cst_synth.c"
>
</File>
<File
RelativePath=".\src\utils\cst_tokenstream.c"
>
</File>
<File
RelativePath=".\src\speech\cst_track.c"
>
</File>
<File
RelativePath=".\src\speech\cst_track_io.c"
>
</File>
<File
RelativePath=".\src\wavesynth\cst_units.c"
>
</File>
<File
RelativePath=".\src\synth\cst_utt_utils.c"
>
</File>
<File
RelativePath=".\src\hrg\cst_utterance.c"
>
</File>
<File
RelativePath=".\src\utils\cst_val.c"
>
</File>
<File
RelativePath=".\src\utils\cst_val_const.c"
>
</File>
<File
RelativePath=".\src\utils\cst_val_user.c"
>
</File>
<File
RelativePath=".\src\cg\cst_vc.c"
>
</File>
<File
RelativePath=".\src\stats\cst_viterbi.c"
>
</File>
<File
RelativePath=".\src\synth\cst_voice.c"
>
</File>
<File
RelativePath=".\src\speech\cst_wave.c"
>
</File>
<File
RelativePath=".\src\speech\cst_wave_io.c"
>
</File>
<File
RelativePath=".\src\speech\cst_wave_utils.c"
>
</File>
<File
RelativePath=".\src\utils\cst_wchar.c"
>
</File>
<File
RelativePath=".\Exports.def"
>
</File>
<File
RelativePath=".\lang\cmu_dari_lang\fbmap.c"
>
</File>
<File
RelativePath=".\src\synth\flite.c"
>
</File>
<File
RelativePath=".\windows\fliteDll.cpp"
>
</File>
<File
RelativePath=".\lang\cmu_pashto_lang\ps_fbmap.c"
>
</File>
<File
RelativePath=".\src\speech\rateconv.c"
>
</File>
<File
RelativePath=".\src\regex\regexp.c"
>
</File>
<File
RelativePath=".\src\regex\regsub.c"
>
</File>
<File
RelativePath=".\lang\usenglish\us_aswd.c"
>
</File>
<File
RelativePath=".\lang\usenglish\us_dur_stats.c"
>
</File>
<File
RelativePath=".\lang\usenglish\us_durz_cart.c"
>
</File>
<File
RelativePath=".\lang\usenglish\us_expand.c"
>
</File>
<File
RelativePath=".\lang\usenglish\us_f0_model.c"
>
</File>
<File
RelativePath=".\lang\usenglish\us_f0lr.c"
>
</File>
<File
RelativePath=".\lang\usenglish\us_ffeatures.c"
>
</File>
<File
RelativePath=".\lang\usenglish\us_gpos.c"
>
</File>
<File
RelativePath=".\lang\usenglish\us_int_accent_cart.c"
>
</File>
<File
RelativePath=".\lang\usenglish\us_int_tone_cart.c"
>
</File>
<File
RelativePath=".\lang\usenglish\us_nums_cart.c"
>
</File>
<File
RelativePath=".\lang\usenglish\us_phoneset.c"
>
</File>
<File
RelativePath=".\lang\usenglish\us_phrasing_cart.c"
>
</File>
<File
RelativePath=".\lang\usenglish\us_pos_cart.c"
>
</File>
<File
RelativePath=".\lang\usenglish\us_text.c"
>
</File>
<File
RelativePath=".\lang\usenglish\usenglish.c"
>
</File>
</Filter>
<Filter
Name="Header Files"
Filter="h;hpp;hxx;hm;inl;inc;xsd"
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
>
<File
RelativePath=".\lang\cmu_dari_lang\cmu_dari_lang.h"
>
</File>
<File
RelativePath=".\lang\cmu_dari_lex\cmu_dari_lex.h"
>
</File>
<File
RelativePath=".\lang\cmu_dari_lex\cmu_dari_lex_lts_model.h"
>
</File>
<File
RelativePath=".\lang\cmu_dari_lang\cmu_dari_phrasing_cart.h"
>
</File>
<File
RelativePath=".\lang\cmulex\cmu_lex.h"
>
</File>
<File
RelativePath=".\lang\cmulex\cmu_lts_model.h"
>
</File>
<File
RelativePath=".\lang\cmu_pashto_lang\cmu_pashto_lang.h"
>
</File>
<File
RelativePath=".\lang\cmu_pashto_lex\cmu_pashto_lex.h"
>
</File>
<File
RelativePath=".\lang\cmu_pashto_lex\cmu_pashto_lts_model.h"
>
</File>
<File
RelativePath=".\lang\cmu_pashto_lang\cmu_pashto_phrasing_cart.h"
>
</File>
<File
RelativePath=".\include\cst_alloc.h"
>
</File>
<File
RelativePath=".\include\cst_args.h"
>
</File>
<File
RelativePath=".\include\cst_audio.h"
>
</File>
<File
RelativePath=".\include\cst_cart.h"
>
</File>
<File
RelativePath=".\include\cst_cg.h"
>
</File>
<File
RelativePath=".\include\cst_clunits.h"
>
</File>
<File
RelativePath=".\include\cst_diphone.h"
>
</File>
<File
RelativePath=".\include\cst_endian.h"
>
</File>
<File
RelativePath=".\include\cst_error.h"
>
</File>
<File
RelativePath=".\include\cst_features.h"
>
</File>
<File
RelativePath=".\include\cst_ffeatures.h"
>
</File>
<File
RelativePath=".\include\cst_file.h"
>
</File>
<File
RelativePath=".\include\cst_hrg.h"
>
</File>
<File
RelativePath=".\include\cst_item.h"
>
</File>
<File
RelativePath=".\include\cst_lexicon.h"
>
</File>
<File
RelativePath=".\include\cst_lts.h"
>
</File>
<File
RelativePath=".\include\cst_lts_rewrites.h"
>
</File>
<File
RelativePath=".\include\cst_math.h"
>
</File>
<File
RelativePath=".\src\cg\cst_mlpg.h"
>
</File>
<File
RelativePath=".\src\cg\cst_mlsa.h"
>
</File>
<File
RelativePath=".\include\cst_phoneset.h"
>
</File>
<File
RelativePath=".\include\cst_regex.h"
>
</File>
<File
RelativePath=".\src\regex\cst_regex_defs.h"
>
</File>
<File
RelativePath=".\include\cst_relation.h"
>
</File>
<File
RelativePath=".\include\cst_sigpr.h"
>
</File>
<File
RelativePath=".\include\cst_socket.h"
>
</File>
<File
RelativePath=".\include\cst_ss.h"
>
</File>
<File
RelativePath=".\include\cst_string.h"
>
</File>
<File
RelativePath=".\include\cst_sts.h"
>
</File>
<File
RelativePath=".\include\cst_synth.h"
>
</File>
<File
RelativePath=".\include\cst_tokenstream.h"
>
</File>
<File
RelativePath=".\include\cst_track.h"
>
</File>
<File
RelativePath=".\include\cst_units.h"
>
</File>
<File
RelativePath=".\include\cst_utt_utils.h"
>
</File>
<File
RelativePath=".\include\cst_utterance.h"
>
</File>
<File
RelativePath=".\include\cst_val.h"
>
</File>
<File
RelativePath=".\include\cst_val_const.h"
>
</File>
<File
RelativePath=".\include\cst_val_defs.h"
>
</File>
<File
RelativePath=".\src\cg\cst_vc.h"
>
</File>
<File
RelativePath=".\include\cst_viterbi.h"
>
</File>
<File
RelativePath=".\include\cst_voice.h"
>
</File>
<File
RelativePath=".\include\cst_wave.h"
>
</File>
<File
RelativePath=".\include\cst_wchar.h"
>
</File>
<File
RelativePath=".\include\flite.h"
>
</File>
<File
RelativePath=".\src\audio\native_audio.h"
>
</File>
<File
RelativePath=".\windows\stdafx.h"
>
</File>
<File
RelativePath=".\lang\usenglish\us_durz_cart.h"
>
</File>
<File
RelativePath=".\lang\usenglish\us_f0.h"
>
</File>
<File
RelativePath=".\lang\usenglish\us_ffeatures.h"
>
</File>
<File
RelativePath=".\lang\usenglish\us_int_accent_cart.h"
>
</File>
<File
RelativePath=".\lang\usenglish\us_int_tone_cart.h"
>
</File>
<File
RelativePath=".\lang\usenglish\us_nums_cart.h"
>
</File>
<File
RelativePath=".\lang\usenglish\us_phrasing_cart.h"
>
</File>
<File
RelativePath=".\lang\usenglish\us_pos_cart.h"
>
</File>
<File
RelativePath=".\lang\usenglish\us_regexes.h"
>
</File>
<File
RelativePath=".\lang\usenglish\us_text.h"
>
</File>
<File
RelativePath=".\lang\usenglish\usenglish.h"
>
</File>
</Filter>
<Filter
Name="Resource Files"
Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
>
</Filter>
<File
RelativePath=".\windows\ReadMe.txt"
>
</File>
</Files>
<Globals>
</Globals>
</VisualStudioProject>

View File

@ -0,0 +1,92 @@
###########################################################################
## ##
## Language Technologies Institute ##
## Carnegie Mellon University ##
## Copyright (c) 1999 ##
## All Rights Reserved. ##
## ##
## Permission is hereby granted, free of charge, to use and distribute ##
## this software and its documentation without restriction, including ##
## without limitation the rights to use, copy, modify, merge, publish, ##
## distribute, sublicense, and/or sell copies of this work, and to ##
## permit persons to whom this work is furnished to do so, subject to ##
## the following conditions: ##
## 1. The code must retain the above copyright notice, this list of ##
## conditions and the following disclaimer. ##
## 2. Any modifications must be clearly marked as such. ##
## 3. Original authors' names are not deleted. ##
## 4. The authors' names are not used to endorse or promote products ##
## derived from this software without specific prior written ##
## permission. ##
## ##
## CARNEGIE MELLON UNIVERSITY AND THE CONTRIBUTORS TO THIS WORK ##
## DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ##
## ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT ##
## SHALL CARNEGIE MELLON UNIVERSITY NOR THE CONTRIBUTORS BE LIABLE ##
## FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES ##
## WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN ##
## AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ##
## ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF ##
## THIS SOFTWARE. ##
## ##
###########################################################################
## ##
## Flite basic include files ##
## ##
###########################################################################
TOP=..
DIRNAME=include
BUILD_DIRS =
ALL_DIRS=
H = cst_alloc.h \
cst_args.h \
cst_audio.h \
cst_cart.h \
cst_clunits.h \
cst_cg.h \
cst_diphone.h \
cst_endian.h \
cst_error.h \
cst_features.h \
cst_file.h \
cst_hrg.h \
cst_item.h \
cst_math.h \
cst_lexicon.h \
cst_lts.h \
cst_lts_rewrites.h \
cst_phoneset.h \
cst_regex.h \
cst_relation.h \
cst_sigpr.h \
cst_socket.h \
cst_string.h \
cst_sts.h \
cst_synth.h \
cst_tokenstream.h \
cst_track.h \
cst_units.h \
cst_utt_utils.h \
cst_utterance.h \
cst_val.h \
cst_val_const.h \
cst_val_defs.h \
cst_viterbi.h \
cst_voice.h \
cst_wave.h \
cst_ss.h \
cst_ffeatures.h \
cst_wchar.h \
flite.h
FILES = Makefile $(H)
INSTALL_HEADERS = $(H)
ALL = flite_version.h
include $(TOP)/config/common_make_rules
flite_version.h: $(TOP)/config/project.mak
@grep "^PROJECT" $(TOP)/config/project.mak | \
awk '{printf("#define FLITE_%s \"%s",$$1,$$3); for (i=4; i<=NF; i++) printf(" %s",$$i); printf("\"\n")}' >flite_version.h

View File

@ -0,0 +1,82 @@
/*************************************************************************/
/* */
/* Language Technologies Institute */
/* Carnegie Mellon University */
/* Copyright (c) 1999 */
/* All Rights Reserved. */
/* */
/* Permission is hereby granted, free of charge, to use and distribute */
/* this software and its documentation without restriction, including */
/* without limitation the rights to use, copy, modify, merge, publish, */
/* distribute, sublicense, and/or sell copies of this work, and to */
/* permit persons to whom this work is furnished to do so, subject to */
/* the following conditions: */
/* 1. The code must retain the above copyright notice, this list of */
/* conditions and the following disclaimer. */
/* 2. Any modifications must be clearly marked as such. */
/* 3. Original authors' names are not deleted. */
/* 4. The authors' names are not used to endorse or promote products */
/* derived from this software without specific prior written */
/* permission. */
/* */
/* CARNEGIE MELLON UNIVERSITY AND THE CONTRIBUTORS TO THIS WORK */
/* DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING */
/* ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT */
/* SHALL CARNEGIE MELLON UNIVERSITY NOR THE CONTRIBUTORS BE LIABLE */
/* FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES */
/* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN */
/* AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, */
/* ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF */
/* THIS SOFTWARE. */
/* */
/*************************************************************************/
/* Author: Alan W Black (awb@cs.cmu.edu) */
/* Date: July 1999 */
/*************************************************************************/
/* */
/* Basic wraparounds for malloc and free */
/* */
/*************************************************************************/
#ifndef __CST_ALLOC_H__
#define __CST_ALLOC_H__
#ifndef TRUE
#define TRUE (1==1)
#endif
#ifndef FALSE
#define FALSE (1==0)
#endif
/* Global allocation (the only kind on Unix) */
void *cst_safe_alloc(int size);
void *cst_safe_calloc(int size);
void *cst_safe_realloc(void *p,int size);
/* Allocate on local heap (needed on WinCE for various reasons) */
#ifdef UNDER_CE
#include <windows.h>
typedef HANDLE cst_alloc_context;
cst_alloc_context new_alloc_context(int size);
void delete_alloc_context(cst_alloc_context ctx);
void *cst_local_alloc(cst_alloc_context ctx, int size);
void cst_local_free(cst_alloc_context ctx, void *p);
#else /* not UNDER_CE */
typedef void * cst_alloc_context;
#define new_alloc_context(size) (NULL)
#define delete_alloc_context(ctx)
#define cst_local_alloc(ctx,size) cst_safe_alloc(size)
#define cst_local_free(cst,p) cst_free(p)
#endif /* UNDER_CE */
/* The public interface to the alloc functions */
/* Note the underlying call is calloc, so everything is zero'd */
#define cst_alloc(TYPE,SIZE) ((TYPE *)cst_safe_alloc(sizeof(TYPE)*(SIZE)))
#define cst_calloc(TYPE,SIZE) ((TYPE *)cst_safe_calloc(sizeof(TYPE)*(SIZE)))
#define cst_realloc(P,TYPE,SIZE) ((TYPE *)cst_safe_realloc((void *)(P),sizeof(TYPE)*(SIZE)))
void cst_free(void *p);
#endif

View File

@ -0,0 +1,49 @@
/*************************************************************************/
/* */
/* Language Technologies Institute */
/* Carnegie Mellon University */
/* Copyright (c) 2001 */
/* All Rights Reserved. */
/* */
/* Permission is hereby granted, free of charge, to use and distribute */
/* this software and its documentation without restriction, including */
/* without limitation the rights to use, copy, modify, merge, publish, */
/* distribute, sublicense, and/or sell copies of this work, and to */
/* permit persons to whom this work is furnished to do so, subject to */
/* the following conditions: */
/* 1. The code must retain the above copyright notice, this list of */
/* conditions and the following disclaimer. */
/* 2. Any modifications must be clearly marked as such. */
/* 3. Original authors' names are not deleted. */
/* 4. The authors' names are not used to endorse or promote products */
/* derived from this software without specific prior written */
/* permission. */
/* */
/* CARNEGIE MELLON UNIVERSITY AND THE CONTRIBUTORS TO THIS WORK */
/* DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING */
/* ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT */
/* SHALL CARNEGIE MELLON UNIVERSITY NOR THE CONTRIBUTORS BE LIABLE */
/* FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES */
/* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN */
/* AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, */
/* ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF */
/* THIS SOFTWARE. */
/* */
/*************************************************************************/
/* Author: Alan W Black (awb@cs.cmu.edu) */
/* Date: November 2001 */
/*************************************************************************/
/* */
/* parse args */
/* */
/*************************************************************************/
#ifndef _CST_ARGS_H__
#define _CST_ARGS_H__
#include "cst_features.h"
cst_val *cst_args(char **argv, int argc,
const char *description,
cst_features *args);
#endif

View File

@ -0,0 +1,118 @@
/*************************************************************************/
/* */
/* Language Technologies Institute */
/* Carnegie Mellon University */
/* Copyright (c) 2000 */
/* All Rights Reserved. */
/* */
/* Permission is hereby granted, free of charge, to use and distribute */
/* this software and its documentation without restriction, including */
/* without limitation the rights to use, copy, modify, merge, publish, */
/* distribute, sublicense, and/or sell copies of this work, and to */
/* permit persons to whom this work is furnished to do so, subject to */
/* the following conditions: */
/* 1. The code must retain the above copyright notice, this list of */
/* conditions and the following disclaimer. */
/* 2. Any modifications must be clearly marked as such. */
/* 3. Original authors' names are not deleted. */
/* 4. The authors' names are not used to endorse or promote products */
/* derived from this software without specific prior written */
/* permission. */
/* */
/* CARNEGIE MELLON UNIVERSITY AND THE CONTRIBUTORS TO THIS WORK */
/* DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING */
/* ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT */
/* SHALL CARNEGIE MELLON UNIVERSITY NOR THE CONTRIBUTORS BE LIABLE */
/* FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES */
/* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN */
/* AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, */
/* ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF */
/* THIS SOFTWARE. */
/* */
/*************************************************************************/
/* Author: Alan W Black (awb@cs.cmu.edu) */
/* Date: August 2000 */
/*************************************************************************/
/* */
/* Audio */
/* */
/*************************************************************************/
#ifndef _CST_AUDIO_H__
#define _CST_AUDIO_H__
#include "cst_wave.h"
#include "cst_hrg.h"
#ifdef CST_AUDIO_WIN32
#define CST_AUDIOBUFFSIZE 8092
#else
#define CST_AUDIOBUFFSIZE 128
#endif
#define CST_AUDIO_DEFAULT_PORT 1746
#define CST_AUDIO_DEFAULT_SERVER "localhost"
#define CST_AUDIO_DEFAULT_ENCODING "short"
typedef enum {
CST_AUDIO_LINEAR16 = 0,
CST_AUDIO_LINEAR8,
CST_AUDIO_MULAW
} cst_audiofmt;
/* Returns the number of bytes per sample for a given audio format */
int audio_bps(cst_audiofmt fmt);
typedef struct cst_audiodev_struct {
int sps, real_sps;
int channels, real_channels;
cst_audiofmt fmt, real_fmt;
int byteswap;
cst_rateconv *rateconv;
void *platform_data;
} cst_audiodev;
/* Generic audio functions */
cst_audiodev *audio_open(int sps, int channels, cst_audiofmt fmt);
int audio_close(cst_audiodev *ad);
int audio_write(cst_audiodev *ad, void *buff, int num_bytes);
int audio_flush(cst_audiodev *ad); /* wait for buffers to empty */
int audio_drain(cst_audiodev *ad); /* empty buffers now */
/* Generic high level audio functions */
int play_wave(cst_wave *w);
int play_wave_sync(cst_wave *w, cst_relation *rel,
int (*call_back)(cst_item *));
int play_wave_client(cst_wave *w, const char *servername, int port,
const char *encoding);
int auserver(int port);
/* Play wave to specified device */
int play_wave_device(cst_wave *w, cst_audiodev *ad);
/* Output to a file as if its an audio device */
cst_audiodev *audio_open_file(int sps, int channels, cst_audiofmt fmt,
const char *filename);
int audio_close_file(cst_audiodev *ad);
int audio_write_file(cst_audiodev *ad, void *buff, int num_bytes);
int audio_drain_file(cst_audiodev *ad);
int audio_flush_file(cst_audiodev *ad);
/* For audio streaming */
#define CST_AUDIO_STREAM_STOP -1
#define CST_AUDIO_STREAM_CONT 0
typedef int (*cst_audio_stream_callback)(const cst_wave *w,int start,int size,
int last, void *user);
typedef struct cst_audio_streaming_info_struct
{
int min_buffsize;
cst_audio_stream_callback asc;
void *userdata;
} cst_audio_streaming_info;
cst_audio_streaming_info *new_audio_streaming_info();
void delete_audio_streaming_info(cst_audio_streaming_info *asi);
CST_VAL_USER_TYPE_DCLS(audio_streaming_info,cst_audio_streaming_info)
/* An example audio streaming callback function src/audio/au_streaming.c */
int audio_stream_chunk(const cst_wave *w, int start, int size,
int last, void *user);
#endif

View File

@ -0,0 +1,77 @@
/*************************************************************************/
/* */
/* Language Technologies Institute */
/* Carnegie Mellon University */
/* Copyright (c) 2000 */
/* All Rights Reserved. */
/* */
/* Permission is hereby granted, free of charge, to use and distribute */
/* this software and its documentation without restriction, including */
/* without limitation the rights to use, copy, modify, merge, publish, */
/* distribute, sublicense, and/or sell copies of this work, and to */
/* permit persons to whom this work is furnished to do so, subject to */
/* the following conditions: */
/* 1. The code must retain the above copyright notice, this list of */
/* conditions and the following disclaimer. */
/* 2. Any modifications must be clearly marked as such. */
/* 3. Original authors' names are not deleted. */
/* 4. The authors' names are not used to endorse or promote products */
/* derived from this software without specific prior written */
/* permission. */
/* */
/* CARNEGIE MELLON UNIVERSITY AND THE CONTRIBUTORS TO THIS WORK */
/* DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING */
/* ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT */
/* SHALL CARNEGIE MELLON UNIVERSITY NOR THE CONTRIBUTORS BE LIABLE */
/* FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES */
/* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN */
/* AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, */
/* ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF */
/* THIS SOFTWARE. */
/* */
/*************************************************************************/
/* Author: Alan W Black (awb@cs.cmu.edu) */
/* Date: January 2000 */
/*************************************************************************/
/* */
/* CART tree support */
/* */
/*************************************************************************/
#ifndef _CST_CART_H__
#define _CST_CART_H__
#include "cst_file.h"
#include "cst_val.h"
#include "cst_features.h"
#include "cst_item.h"
#include "cst_relation.h"
#define CST_CART_OP_NONE 255
#define CST_CART_OP_LEAF 255
#define CST_CART_OP_IS 0
#define CST_CART_OP_IN 1
#define CST_CART_OP_LESS 2
#define CST_CART_OP_GREATER 3
#define CST_CART_OP_MATCHES 4
#define CST_CART_OP_EQUALS 5
typedef struct cst_cart_node_struct {
unsigned char feat;
unsigned char op;
/* yes is always the next node */
unsigned short no_node; /* or answer index */
const cst_val *val;
} cst_cart_node;
typedef struct cst_cart_struct {
const cst_cart_node *rule_table;
const char * const *feat_table;
} cst_cart;
void delete_cart(cst_cart *c);
CST_VAL_USER_TYPE_DCLS(cart,cst_cart)
const cst_val *cart_interpret(cst_item *item, const cst_cart *tree);
#endif

View File

@ -0,0 +1,129 @@
/*************************************************************************/
/* */
/* Language Technologies Institute */
/* Carnegie Mellon University */
/* Copyright (c) 2007 */
/* All Rights Reserved. */
/* */
/* Permission is hereby granted, free of charge, to use and distribute */
/* this software and its documentation without restriction, including */
/* without limitation the rights to use, copy, modify, merge, publish, */
/* distribute, sublicense, and/or sell copies of this work, and to */
/* permit persons to whom this work is furnished to do so, subject to */
/* the following conditions: */
/* 1. The code must retain the above copyright notice, this list of */
/* conditions and the following disclaimer. */
/* 2. Any modifications must be clearly marked as such. */
/* 3. Original authors' names are not deleted. */
/* 4. The authors' names are not used to endorse or promote products */
/* derived from this software without specific prior written */
/* permission. */
/* */
/* CARNEGIE MELLON UNIVERSITY AND THE CONTRIBUTORS TO THIS WORK */
/* DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING */
/* ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT */
/* SHALL CARNEGIE MELLON UNIVERSITY NOR THE CONTRIBUTORS BE LIABLE */
/* FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES */
/* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN */
/* AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, */
/* ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF */
/* THIS SOFTWARE. */
/* */
/*************************************************************************/
/* Author: Alan W Black (awb@cs.cmu.edu) */
/* Date: November 2007 */
/*************************************************************************/
/* */
/* clustergen db */
/* */
/* A statistical corpus based synthesizer. */
/* See Black, A. (2006), CLUSTERGEN: A Statistical Parametric */
/* Synthesizer using Trajectory Modeling", Interspeech 2006 - ICSLP, */
/* Pittsburgh, PA. */
/* http://www.cs.cmu.edu/~awb/papers/is2006/IS061394.PDF */
/* */
/*************************************************************************/
#ifndef _CST_CG_H__
#define _CST_CG_H__
#include "cst_cart.h"
#include "cst_track.h"
#include "cst_wave.h"
#include "cst_audio.h"
#include "cst_synth.h" /* for dur_stat */
typedef struct cst_cg_db_struct {
const char *name;
const char * const *types;
int num_types;
const int sample_rate;
float f0_mean, f0_stddev;
/* Cluster trees */
const cst_cart * const *f0_trees;
const cst_cart * const *param_trees0; /* single or static */
const cst_cart * const *param_trees1; /* deltas */
const cst_cart * const *param_trees2; /* me str */
/* Model params e.g. mceps, deltas intersliced with stddevs */
const int num_channels0;
const int num_frames0;
const unsigned short * const * model_vectors0;
const int num_channels1;
const int num_frames1;
const unsigned short * const * model_vectors1;
const int num_channels2;
const int num_frames2;
const unsigned short * const * model_vectors2;
/* Currently shared between different models */
const float *model_min; /* for vector coeffs encoding */
const float *model_range; /* for vector coeffs encoding */
const float frame_advance;
/* duration model (cart + phonedurs) */
const dur_stat * const *dur_stats;
const cst_cart *dur_cart;
/* phone to states map */
const char * const * const *phone_states;
/* Other parameters */
const int do_mlpg; /* implies deltas are in the model_vectors */
const float *dynwin;
const int dynwinsize;
const float mlsa_alpha;
const float mlsa_beta;
const int multimodel;
const int mixed_excitation;
/* filters for Mixed Excitation */
const int ME_num;
const int ME_order;
const double * const *me_h;
const float gain;
} cst_cg_db;
/* Access model parameters, unpacking them as required */
#define CG_MODEL_VECTOR(M,N,X,Y) \
(M->model_min[Y]+((float)(M->N[X][Y])/65535.0*M->model_range[Y]))
CST_VAL_USER_TYPE_DCLS(cg_db,cst_cg_db)
cst_utterance *cg_synth(cst_utterance *utt);
cst_wave *mlsa_resynthesis(const cst_track *t,
const cst_track *str,
cst_cg_db *cg_db,
cst_audio_streaming_info *asc);
cst_track *mlpg(const cst_track *param_track, cst_cg_db *cg_db);
#endif

View File

@ -0,0 +1,98 @@
/*************************************************************************/
/* */
/* Language Technologies Institute */
/* Carnegie Mellon University */
/* Copyright (c) 2000 */
/* All Rights Reserved. */
/* */
/* Permission is hereby granted, free of charge, to use and distribute */
/* this software and its documentation without restriction, including */
/* without limitation the rights to use, copy, modify, merge, publish, */
/* distribute, sublicense, and/or sell copies of this work, and to */
/* permit persons to whom this work is furnished to do so, subject to */
/* the following conditions: */
/* 1. The code must retain the above copyright notice, this list of */
/* conditions and the following disclaimer. */
/* 2. Any modifications must be clearly marked as such. */
/* 3. Original authors' names are not deleted. */
/* 4. The authors' names are not used to endorse or promote products */
/* derived from this software without specific prior written */
/* permission. */
/* */
/* CARNEGIE MELLON UNIVERSITY AND THE CONTRIBUTORS TO THIS WORK */
/* DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING */
/* ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT */
/* SHALL CARNEGIE MELLON UNIVERSITY NOR THE CONTRIBUTORS BE LIABLE */
/* FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES */
/* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN */
/* AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, */
/* ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF */
/* THIS SOFTWARE. */
/* */
/*************************************************************************/
/* Author: Alan W Black (awb@cs.cmu.edu) */
/* Date: April 2001 */
/*************************************************************************/
/* */
/* clunits db */
/* */
/*************************************************************************/
#ifndef _CST_CLUNITS_H__
#define _CST_CLUNITS_H__
#include "cst_wave.h"
#include "cst_cart.h"
#include "cst_viterbi.h"
#include "cst_track.h"
#include "cst_sts.h"
#define CLUNIT_NONE (unsigned short)65535
typedef struct cst_clunit_struct {
unsigned short type, phone;
int start, end;
int prev, next;
} cst_clunit;
typedef struct cst_clunit_type_struct {
const char *name;
int start, count;
} cst_clunit_type;
typedef struct cst_clunit_db_struct {
const char *name;
const cst_clunit_type *types;
const cst_cart * const *trees;
const cst_clunit *units;
int num_types, num_units;
/* These may be set up at runtime (in file-mapped databases) */
cst_sts_list *sts, *mcep;
/* These are pre-scaled by 65536 to accomodate fixed-point machines */
const int *join_weights;
/* Misc. important parameters */
int optimal_coupling;
int extend_selections;
int f0_weight;
char *(*unit_name_func)(cst_item *s);
} cst_clunit_db;
CST_VAL_USER_TYPE_DCLS(clunit_db,cst_clunit_db)
CST_VAL_USER_TYPE_DCLS(vit_cand,cst_vit_cand)
cst_utterance *clunits_synth(cst_utterance *utt);
cst_utterance *clunits_dump_units(cst_utterance *utt);
char *clunits_ldom_phone_word(cst_item *s);
int clunit_get_unit_index(cst_clunit_db *cludb,
const char *unit_type,
int instance);
int clunit_get_unit_index_name(cst_clunit_db *cludb,
const char *name);
#define UNIT_TYPE(db,u) ((db)->types[(db)->units[(u)].type].name)
#define UNIT_INDEX(db,u) ((u) - (db)->types[(db)->units[(u)].type].start)
#endif

View File

@ -0,0 +1,72 @@
/*************************************************************************/
/* */
/* Language Technologies Institute */
/* Carnegie Mellon University */
/* Copyright (c) 2001 */
/* All Rights Reserved. */
/* */
/* Permission is hereby granted, free of charge, to use and distribute */
/* this software and its documentation without restriction, including */
/* without limitation the rights to use, copy, modify, merge, publish, */
/* distribute, sublicense, and/or sell copies of this work, and to */
/* permit persons to whom this work is furnished to do so, subject to */
/* the following conditions: */
/* 1. The code must retain the above copyright notice, this list of */
/* conditions and the following disclaimer. */
/* 2. Any modifications must be clearly marked as such. */
/* 3. Original authors' names are not deleted. */
/* 4. The authors' names are not used to endorse or promote products */
/* derived from this software without specific prior written */
/* permission. */
/* */
/* CARNEGIE MELLON UNIVERSITY AND THE CONTRIBUTORS TO THIS WORK */
/* DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING */
/* ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT */
/* SHALL CARNEGIE MELLON UNIVERSITY NOR THE CONTRIBUTORS BE LIABLE */
/* FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES */
/* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN */
/* AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, */
/* ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF */
/* THIS SOFTWARE. */
/* */
/*************************************************************************/
/* Author: Alan W Black (awb@cs.cmu.edu) */
/* Date: January 2001 */
/*************************************************************************/
/* */
/* Diphone databases */
/* */
/*************************************************************************/
#ifndef _CST_DIPHONE_H__
#define _CST_DIPHONE_H__
#include "cst_file.h"
#include "cst_val.h"
#include "cst_features.h"
#include "cst_wave.h"
#include "cst_track.h"
#include "cst_sts.h"
#include "cst_hrg.h"
struct cst_diphone_entry_struct {
char *name;
unsigned short start_pm;
unsigned char pb_pm;
unsigned char end_pm;
};
typedef struct cst_diphone_entry_struct cst_diphone_entry;
struct cst_diphone_db_struct {
const char *name;
int num_entries;
const cst_diphone_entry *diphones;
const cst_sts_list *sts;
};
typedef struct cst_diphone_db_struct cst_diphone_db;
CST_VAL_USER_TYPE_DCLS(diphone_db,cst_diphone_db)
cst_utterance* diphone_synth(cst_utterance *utt);
cst_utterance *get_diphone_units(cst_utterance *utt);
#endif

View File

@ -0,0 +1,70 @@
/*************************************************************************/
/* */
/* Language Technologies Institute */
/* Carnegie Mellon University */
/* Copyright (c) 1999 */
/* All Rights Reserved. */
/* */
/* Permission is hereby granted, free of charge, to use and distribute */
/* this software and its documentation without restriction, including */
/* without limitation the rights to use, copy, modify, merge, publish, */
/* distribute, sublicense, and/or sell copies of this work, and to */
/* permit persons to whom this work is furnished to do so, subject to */
/* the following conditions: */
/* 1. The code must retain the above copyright notice, this list of */
/* conditions and the following disclaimer. */
/* 2. Any modifications must be clearly marked as such. */
/* 3. Original authors' names are not deleted. */
/* 4. The authors' names are not used to endorse or promote products */
/* derived from this software without specific prior written */
/* permission. */
/* */
/* CARNEGIE MELLON UNIVERSITY AND THE CONTRIBUTORS TO THIS WORK */
/* DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING */
/* ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT */
/* SHALL CARNEGIE MELLON UNIVERSITY NOR THE CONTRIBUTORS BE LIABLE */
/* FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES */
/* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN */
/* AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, */
/* ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF */
/* THIS SOFTWARE. */
/* */
/*************************************************************************/
/* Author: Alan W Black (awb@cs.cmu.edu) */
/* Date: August 2000 */
/*************************************************************************/
/* */
/* endianness */
/* */
/*************************************************************************/
#ifndef __CST_ENDIAN_H__
#define __CST_ENDIAN_H__
extern const int cst_endian_loc;
/* Sun, HP, SGI Mips, M68000 */
#define CST_BIG_ENDIAN (((char *)&cst_endian_loc)[0] == 0)
/* Intel, Alpha, DEC Mips, Vax, Arm, Other MIPS (Casio etc) */
#define CST_LITTLE_ENDIAN (((char *)&cst_endian_loc)[0] != 0)
/* EST byte order strings */
#define BYTE_ORDER_BIG "10"
#define BYTE_ORDER_LITTLE "01"
#define SWAPINT(x) ((((unsigned int)x) & 0xff) << 24 | \
(((unsigned int)x) & 0xff00) << 8 | \
(((unsigned int)x) & 0xff0000) >> 8 | \
(((unsigned int)x) & 0xff000000) >> 24)
/* For m68k we want to be a little more explicit */
#define SWAPLONG(x) ((((unsigned long)x) & 0xff) << 24 | \
(((unsigned long)x) & 0xff00) << 8 | \
(((unsigned long)x) & 0xff0000) >> 8 | \
(((unsigned long)x) & 0xff000000) >> 24)
#define SWAPSHORT(x) ((((unsigned short)x) & 0xff) << 8 | \
(((unsigned short)x) & 0xff00) >> 8)
void swap_bytes_short(short * b,int n);
void swapdouble(double *d);
void swapfloat(float *f);
#endif

View File

@ -0,0 +1,78 @@
/*************************************************************************/
/* */
/* Language Technologies Institute */
/* Carnegie Mellon University */
/* Copyright (c) 1999 */
/* All Rights Reserved. */
/* */
/* Permission is hereby granted, free of charge, to use and distribute */
/* this software and its documentation without restriction, including */
/* without limitation the rights to use, copy, modify, merge, publish, */
/* distribute, sublicense, and/or sell copies of this work, and to */
/* permit persons to whom this work is furnished to do so, subject to */
/* the following conditions: */
/* 1. The code must retain the above copyright notice, this list of */
/* conditions and the following disclaimer. */
/* 2. Any modifications must be clearly marked as such. */
/* 3. Original authors' names are not deleted. */
/* 4. The authors' names are not used to endorse or promote products */
/* derived from this software without specific prior written */
/* permission. */
/* */
/* CARNEGIE MELLON UNIVERSITY AND THE CONTRIBUTORS TO THIS WORK */
/* DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING */
/* ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT */
/* SHALL CARNEGIE MELLON UNIVERSITY NOR THE CONTRIBUTORS BE LIABLE */
/* FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES */
/* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN */
/* AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, */
/* ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF */
/* THIS SOFTWARE. */
/* */
/*************************************************************************/
/* Author: Alan W Black (awb@cs.cmu.edu) */
/* Date: December 1999 */
/*************************************************************************/
/* */
/* Error handler */
/* */
/*************************************************************************/
#ifndef _CST_ERROR_H__
#define _CST_ERROR_H__
#include <stdlib.h>
#ifdef DIE_ON_ERROR
# ifdef UNDER_CE
# define cst_error() *(int *)0=0
# else
# define cst_error() abort()
# endif
#elif __palmos__
#ifdef __ARM_ARCH_4T__
typedef long *jmp_buf[10]; /* V1-V8, SP, LR (see po_setjmp.c) */
extern jmp_buf *cst_errjmp;
extern char cst_error_msg[];
int setjmp(register jmp_buf env);
void longjmp(register jmp_buf env, register int value);
# define cst_error() (cst_errjmp ? longjmp(*cst_errjmp,1) : 0)
#else /* m68K */
/* I've never tested this or even compiled it (Flite is ARM compiled) */
# define cst_error() ErrFatalDisplayIf(-1, "cst_error")
#endif
#else /* not palmos */
#include <setjmp.h>
extern jmp_buf *cst_errjmp;
# define cst_error() (cst_errjmp ? longjmp(*cst_errjmp,1) : exit(-1))
#endif
/* WinCE sometimes doesn't have stdio, so this is a wrapper for
fprintf(stderr, ...) */
int cst_errmsg(const char *fmt, ...);
#define cst_dbgmsg cst_errmsg
/* Need macros to help set catches */
#endif

View File

@ -0,0 +1,89 @@
/*************************************************************************/
/* */
/* Language Technologies Institute */
/* Carnegie Mellon University */
/* Copyright (c) 1999 */
/* All Rights Reserved. */
/* */
/* Permission is hereby granted, free of charge, to use and distribute */
/* this software and its documentation without restriction, including */
/* without limitation the rights to use, copy, modify, merge, publish, */
/* distribute, sublicense, and/or sell copies of this work, and to */
/* permit persons to whom this work is furnished to do so, subject to */
/* the following conditions: */
/* 1. The code must retain the above copyright notice, this list of */
/* conditions and the following disclaimer. */
/* 2. Any modifications must be clearly marked as such. */
/* 3. Original authors' names are not deleted. */
/* 4. The authors' names are not used to endorse or promote products */
/* derived from this software without specific prior written */
/* permission. */
/* */
/* CARNEGIE MELLON UNIVERSITY AND THE CONTRIBUTORS TO THIS WORK */
/* DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING */
/* ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT */
/* SHALL CARNEGIE MELLON UNIVERSITY NOR THE CONTRIBUTORS BE LIABLE */
/* FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES */
/* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN */
/* AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, */
/* ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF */
/* THIS SOFTWARE. */
/* */
/*************************************************************************/
/* Author: Alan W Black (awb@cs.cmu.edu) */
/* Date: December 1999 */
/*************************************************************************/
/* */
/* feature-values lists */
/* */
/*************************************************************************/
#ifndef _CST_FEATURES_H__
#define _CST_FEATURES_H__
#include "cst_alloc.h"
#include "cst_val.h"
#include "cst_string.h"
typedef struct cst_featvalpair_struct {
const char *name;
cst_val *val;
struct cst_featvalpair_struct *next;
} cst_featvalpair;
typedef struct cst_features_struct {
struct cst_featvalpair_struct *head;
cst_alloc_context ctx;
} cst_features;
/* Constructor functions */
cst_features *new_features(void);
cst_features *new_features_local(cst_alloc_context ctx);
void delete_features(cst_features *f);
/* Accessor functions */
int feat_int(const cst_features *f, const char *name);
float feat_float(const cst_features *f, const char *name);
const char *feat_string(const cst_features *f, const char *name);
const cst_val *feat_val(const cst_features *f, const char *name);
int get_param_int(const cst_features *f, const char *name,int def);
float get_param_float(const cst_features *f, const char *name, float def);
const char *get_param_string(const cst_features *f, const char *name, const char *def);
const cst_val *get_param_val(const cst_features *f, const char *name, cst_val *def);
/* Setting functions */
void feat_set_int(cst_features *f, const char *name, int v);
void feat_set_float(cst_features *f, const char *name, float v);
void feat_set_string(cst_features *f, const char *name, const char *v);
void feat_set(cst_features *f, const char *name,const cst_val *v);
int feat_remove(cst_features *f,const char *name);
int feat_present(const cst_features *f,const char *name);
int feat_length(const cst_features *f);
CST_VAL_USER_TYPE_DCLS(features,cst_features)
int feat_copy_into(const cst_features *from,cst_features *to);
int feat_print(cst_file fd,const cst_features *f);
#endif

View File

@ -0,0 +1,65 @@
/*************************************************************************/
/* */
/* Language Technologies Institute */
/* Carnegie Mellon University */
/* Copyright (c) 2007 */
/* All Rights Reserved. */
/* */
/* Permission is hereby granted, free of charge, to use and distribute */
/* this software and its documentation without restriction, including */
/* without limitation the rights to use, copy, modify, merge, publish, */
/* distribute, sublicense, and/or sell copies of this work, and to */
/* permit persons to whom this work is furnished to do so, subject to */
/* the following conditions: */
/* 1. The code must retain the above copyright notice, this list of */
/* conditions and the following disclaimer. */
/* 2. Any modifications must be clearly marked as such. */
/* 3. Original authors' names are not deleted. */
/* 4. The authors' names are not used to endorse or promote products */
/* derived from this software without specific prior written */
/* permission. */
/* */
/* CARNEGIE MELLON UNIVERSITY AND THE CONTRIBUTORS TO THIS WORK */
/* DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING */
/* ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT */
/* SHALL CARNEGIE MELLON UNIVERSITY NOR THE CONTRIBUTORS BE LIABLE */
/* FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES */
/* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN */
/* AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, */
/* ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF */
/* THIS SOFTWARE. */
/* */
/*************************************************************************/
/* Author: Alan W Black (awb@cs.cmu.edu) */
/* Date: November 2007 */
/*************************************************************************/
/* Language independant feature functions */
/*************************************************************************/
#ifndef _CST_FFEATURES_H
#define _CST_FFEATURES_H
#include "cst_val.h"
#include "cst_item.h"
const cst_val *ph_vc(const cst_item *p);
const cst_val *ph_vlng(const cst_item *p);
const cst_val *ph_vheight(const cst_item *p);
const cst_val *ph_vrnd(const cst_item *p);
const cst_val *ph_vfront(const cst_item *p);
const cst_val *ph_ctype(const cst_item *p);
const cst_val *ph_cplace(const cst_item *p);
const cst_val *ph_cvox(const cst_item *p);
const cst_val *cg_duration(const cst_item *p);
const cst_val *cg_state_pos(const cst_item *p);
const cst_val *cg_state_place(const cst_item *p);
const cst_val *cg_state_index(const cst_item *p);
const cst_val *cg_state_rindex(const cst_item *p);
const cst_val *cg_phone_place(const cst_item *p);
const cst_val *cg_phone_index(const cst_item *p);
const cst_val *cg_phone_rindex(const cst_item *p);
void basic_ff_register(cst_features *ffunctions);
#endif /* _CST_FFEATURES_H */

View File

@ -0,0 +1,121 @@
/*************************************************************************/
/* */
/* Language Technologies Institute */
/* Carnegie Mellon University */
/* Copyright (c) 1999 */
/* All Rights Reserved. */
/* */
/* Permission is hereby granted, free of charge, to use and distribute */
/* this software and its documentation without restriction, including */
/* without limitation the rights to use, copy, modify, merge, publish, */
/* distribute, sublicense, and/or sell copies of this work, and to */
/* permit persons to whom this work is furnished to do so, subject to */
/* the following conditions: */
/* 1. The code must retain the above copyright notice, this list of */
/* conditions and the following disclaimer. */
/* 2. Any modifications must be clearly marked as such. */
/* 3. Original authors' names are not deleted. */
/* 4. The authors' names are not used to endorse or promote products */
/* derived from this software without specific prior written */
/* permission. */
/* */
/* CARNEGIE MELLON UNIVERSITY AND THE CONTRIBUTORS TO THIS WORK */
/* DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING */
/* ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT */
/* SHALL CARNEGIE MELLON UNIVERSITY NOR THE CONTRIBUTORS BE LIABLE */
/* FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES */
/* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN */
/* AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, */
/* ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF */
/* THIS SOFTWARE. */
/* */
/*************************************************************************/
/* Author: Alan W Black (awb@cs.cmu.edu) */
/* Date: August 2000 */
/*************************************************************************/
/* */
/* Some File stuff */
/* */
/*************************************************************************/
#ifndef _CST_FILE_H__
#define _CST_FILE_H__
#define CST_WRONG_FORMAT -2
#define CST_ERROR_FORMAT -1
#define CST_OK_FORMAT 0
#ifdef UNDER_CE
/* File access stuff (WinCE 2.11 is really damaged) */
#include <windows.h>
#include <winbase.h>
typedef HANDLE cst_file;
#elif __palmos__
#include <PalmOS.h>
#include <System/StdIOPalm.h>
typedef FILE * cst_file;
#else
#include <stdio.h>
typedef FILE * cst_file;
#endif
/* File mapping stuff */
#ifdef _WIN32
#include <windows.h>
typedef struct cst_filemap_struct {
void *mem;
cst_file fh;
size_t mapsize;
HANDLE h;
} cst_filemap;
#elif __palmos__
typedef struct cst_filemap_struct {
void *mem;
cst_file fh;
unsigned int mapsize;
int fd;
} cst_filemap;
#else
typedef struct cst_filemap_struct {
void *mem;
cst_file fh;
size_t mapsize;
int fd;
} cst_filemap;
#endif
#define CST_OPEN_WRITE (1<<0)
#define CST_OPEN_READ (1<<1)
#define CST_OPEN_APPEND (1<<2)
#define CST_OPEN_BINARY (1<<3)
#define CST_SEEK_ABSOLUTE 0
#define CST_SEEK_RELATIVE 1
#define CST_SEEK_ENDREL 2
cst_file cst_fopen(const char *path, int mode);
long cst_fwrite(cst_file fh, const void *buf, long size, long count);
long cst_fread(cst_file fh, void *buf, long size, long count);
int cst_fprintf(cst_file fh, char *fmt, ...);
int cst_sprintf(char *s, const char *fmt, ...);
#if defined(__palmos__)
#include <stdarg.h>
int cst_vsprintf(char *s, const char *fmt, va_list args);
#endif
int cst_fclose(cst_file fh);
int cst_fgetc(cst_file fh);
/* These aren't LFS-compliant. I don't think we'll need >2G files. */
long cst_ftell(cst_file fh);
long cst_fseek(cst_file fh, long pos, int whence);
long cst_filesize(cst_file fh);
cst_filemap *cst_mmap_file(const char *path);
int cst_munmap_file(cst_filemap *map);
cst_filemap *cst_read_whole_file(const char *path);
int cst_free_whole_file(cst_filemap *map);
cst_filemap *cst_read_part_file(const char *path);
int cst_free_part_file(cst_filemap *map);
#endif

View File

@ -0,0 +1,50 @@
/*************************************************************************/
/* */
/* Language Technologies Institute */
/* Carnegie Mellon University */
/* Copyright (c) 1999 */
/* All Rights Reserved. */
/* */
/* Permission is hereby granted, free of charge, to use and distribute */
/* this software and its documentation without restriction, including */
/* without limitation the rights to use, copy, modify, merge, publish, */
/* distribute, sublicense, and/or sell copies of this work, and to */
/* permit persons to whom this work is furnished to do so, subject to */
/* the following conditions: */
/* 1. The code must retain the above copyright notice, this list of */
/* conditions and the following disclaimer. */
/* 2. Any modifications must be clearly marked as such. */
/* 3. Original authors' names are not deleted. */
/* 4. The authors' names are not used to endorse or promote products */
/* derived from this software without specific prior written */
/* permission. */
/* */
/* CARNEGIE MELLON UNIVERSITY AND THE CONTRIBUTORS TO THIS WORK */
/* DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING */
/* ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT */
/* SHALL CARNEGIE MELLON UNIVERSITY NOR THE CONTRIBUTORS BE LIABLE */
/* FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES */
/* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN */
/* AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, */
/* ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF */
/* THIS SOFTWARE. */
/* */
/*************************************************************************/
/* Author: Alan W Black (awb@cs.cmu.edu) */
/* Date: December 1999 */
/*************************************************************************/
/* */
/* Heterogeneous Relation Graphs */
/* */
/*************************************************************************/
#ifndef _CST_HRG_H__
#define _CST_HRG_H__
#include "cst_file.h"
#include "cst_val.h"
#include "cst_features.h"
#include "cst_item.h"
#include "cst_relation.h"
#include "cst_utterance.h"
#endif

View File

@ -0,0 +1,135 @@
/*************************************************************************/
/* */
/* Language Technologies Institute */
/* Carnegie Mellon University */
/* Copyright (c) 1999 */
/* All Rights Reserved. */
/* */
/* Permission is hereby granted, free of charge, to use and distribute */
/* this software and its documentation without restriction, including */
/* without limitation the rights to use, copy, modify, merge, publish, */
/* distribute, sublicense, and/or sell copies of this work, and to */
/* permit persons to whom this work is furnished to do so, subject to */
/* the following conditions: */
/* 1. The code must retain the above copyright notice, this list of */
/* conditions and the following disclaimer. */
/* 2. Any modifications must be clearly marked as such. */
/* 3. Original authors' names are not deleted. */
/* 4. The authors' names are not used to endorse or promote products */
/* derived from this software without specific prior written */
/* permission. */
/* */
/* CARNEGIE MELLON UNIVERSITY AND THE CONTRIBUTORS TO THIS WORK */
/* DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING */
/* ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT */
/* SHALL CARNEGIE MELLON UNIVERSITY NOR THE CONTRIBUTORS BE LIABLE */
/* FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES */
/* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN */
/* AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, */
/* ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF */
/* THIS SOFTWARE. */
/* */
/*************************************************************************/
/* Author: Alan W Black (awb@cs.cmu.edu) */
/* Date: December 1999 */
/*************************************************************************/
/* */
/* Item */
/* */
/*************************************************************************/
#ifndef _CST_ITEM_H__
#define _CST_ITEM_H__
#include "cst_file.h"
#include "cst_features.h"
/* Everyone needs these so forward define these */
typedef struct cst_relation_struct cst_relation;
typedef struct cst_utterance_struct cst_utterance;
typedef struct cst_item_struct cst_item;
/* So items, relations and utterances can be used as vals */
CST_VAL_USER_TYPE_DCLS(relation,cst_relation)
CST_VAL_USER_TYPE_DCLS(item,cst_item)
CST_VAL_USER_TYPE_DCLS(utterance,cst_utterance)
typedef struct cst_item_contents_struct {
cst_features *features;
cst_features *relations;
} cst_item_contents;
struct cst_item_struct {
cst_item_contents *contents; /* the shared part of an item */
cst_relation *relation;
cst_item *n;
cst_item *p;
cst_item *u;
cst_item *d;
};
/* Constructor functions */
cst_item *new_item_relation(cst_relation *r,cst_item *i);
cst_item_contents *new_item_contents(cst_item *i);
/* Remove this item from this references */
void delete_item(cst_item *item);
void item_contents_set(cst_item *current, cst_item *i);
void item_unref_contents(cst_item *i);
cst_item *item_as(const cst_item *i,const char *rname);
cst_utterance *item_utt(const cst_item *i);
/* List accessor/manipulator function */
cst_item *item_next(const cst_item *i);
cst_item *item_prev(const cst_item *i);
cst_item *item_append(cst_item *i,cst_item *new_item);
cst_item *item_prepend(cst_item *i,cst_item *new_item);
/* Tree accessor/manipulator function */
cst_item *item_parent(const cst_item *i);
cst_item *item_nth_daughter(const cst_item *i,int n);
cst_item *item_daughter(const cst_item *i);
cst_item *item_last_daughter(const cst_item *i);
cst_item *item_add_daughter(cst_item *i,cst_item *new_item);
cst_item *item_append_sibling(cst_item *i,cst_item *new_item);
cst_item *item_prepend_sibling(cst_item *i,cst_item *new_item);
/* Feature accessor/manipulator functions */
int item_feat_present(const cst_item *i,const char *name);
int item_feat_remove(const cst_item *i,const char *name);
cst_features *item_feats(const cst_item *i);
const cst_val *item_feat(const cst_item *i,const char *name);
int item_feat_int(const cst_item *i,const char *name);
float item_feat_float(const cst_item *i,const char *name);
const char *item_feat_string(const cst_item *i,const char *name);
void item_set(const cst_item *i,const char *name,const cst_val *val);
void item_set_int(const cst_item *i,const char *name,int val);
void item_set_float(const cst_item *i,const char *name,float val);
void item_set_string(const cst_item *i,const char *name,const char *val);
#define item_name(I) item_feat_string(I,"name")
int item_equal(const cst_item *a, const cst_item *b);
const char *ffeature_string(const cst_item *item,const char *featpath);
int ffeature_int(const cst_item *item,const char *featpath);
float ffeature_float(const cst_item *item,const char *featpath);
const cst_val *ffeature(const cst_item *item,const char *featpath);
cst_item* path_to_item(const cst_item *item,const char *featpath);
/* Feature function, for features that are derived algorithmically from others. */
typedef const cst_val *(*cst_ffunction)(const cst_item *i);
CST_VAL_USER_FUNCPTR_DCLS(ffunc,cst_ffunction)
void ff_register(cst_features *ffeatures, const char *name,
cst_ffunction f);
void ff_unregister(cst_features *ffeatures, const char *name);
/* Generalized item hook function, like cst_uttfunc. */
typedef cst_val *(*cst_itemfunc)(cst_item *i);
CST_VAL_USER_FUNCPTR_DCLS(itemfunc,cst_itemfunc)
#endif

View File

@ -0,0 +1,87 @@
/*************************************************************************/
/* */
/* Language Technologies Institute */
/* Carnegie Mellon University */
/* Copyright (c) 1999 */
/* All Rights Reserved. */
/* */
/* Permission is hereby granted, free of charge, to use and distribute */
/* this software and its documentation without restriction, including */
/* without limitation the rights to use, copy, modify, merge, publish, */
/* distribute, sublicense, and/or sell copies of this work, and to */
/* permit persons to whom this work is furnished to do so, subject to */
/* the following conditions: */
/* 1. The code must retain the above copyright notice, this list of */
/* conditions and the following disclaimer. */
/* 2. Any modifications must be clearly marked as such. */
/* 3. Original authors' names are not deleted. */
/* 4. The authors' names are not used to endorse or promote products */
/* derived from this software without specific prior written */
/* permission. */
/* */
/* CARNEGIE MELLON UNIVERSITY AND THE CONTRIBUTORS TO THIS WORK */
/* DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING */
/* ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT */
/* SHALL CARNEGIE MELLON UNIVERSITY NOR THE CONTRIBUTORS BE LIABLE */
/* FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES */
/* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN */
/* AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, */
/* ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF */
/* THIS SOFTWARE. */
/* */
/*************************************************************************/
/* Author: Alan W Black (awb@cs.cmu.edu) */
/* Date: December 1999 */
/*************************************************************************/
/* */
/* Lexicon related functions */
/* */
/*************************************************************************/
#ifndef _CST_LEXICON_H__
#define _CST_LEXICON_H__
#include "cst_item.h"
#include "cst_lts.h"
typedef struct lexicon_struct {
char *name;
int num_entries;
/* Entries are centered around bytes with value 255 */
/* entries and forward (compressed) pronunciations and backwards */
/* each are terminated (preceeded in pron case) by 0 */
/* This saves 4 bytes per entry for an index */
unsigned char *data; /* the entries and phone strings */
int num_bytes; /* the number of bytes in the data */
char **phone_table;
cst_lts_rules *lts_rule_set;
int (*syl_boundary)(const cst_item *i,const cst_val *p);
cst_val *(*lts_function)(const struct lexicon_struct *l, const char *word, const char *pos);
char ***addenda;
/* ngram frequency table used for packed entries */
const char * const *phone_hufftable;
const char * const *entry_hufftable;
cst_utterance *(*postlex)(cst_utterance *u);
cst_val *lex_addenda; /* For pronunciations added at run time */
} cst_lexicon;
cst_lexicon *new_lexicon();
void delete_lexicon(cst_lexicon *lex);
cst_val *cst_lex_make_entry(const cst_lexicon *lex,
const cst_string *entry);
cst_val *cst_lex_load_addenda(const cst_lexicon *lex,
const char *lexfile);
cst_val *lex_lookup(const cst_lexicon *l, const char *word, const char *pos);
int in_lex(const cst_lexicon *l, const char *word, const char *pos);
CST_VAL_USER_TYPE_DCLS(lexicon,cst_lexicon)
#endif

View File

@ -0,0 +1,78 @@
/*************************************************************************/
/* */
/* Language Technologies Institute */
/* Carnegie Mellon University */
/* Copyright (c) 1999 */
/* All Rights Reserved. */
/* */
/* Permission is hereby granted, free of charge, to use and distribute */
/* this software and its documentation without restriction, including */
/* without limitation the rights to use, copy, modify, merge, publish, */
/* distribute, sublicense, and/or sell copies of this work, and to */
/* permit persons to whom this work is furnished to do so, subject to */
/* the following conditions: */
/* 1. The code must retain the above copyright notice, this list of */
/* conditions and the following disclaimer. */
/* 2. Any modifications must be clearly marked as such. */
/* 3. Original authors' names are not deleted. */
/* 4. The authors' names are not used to endorse or promote products */
/* derived from this software without specific prior written */
/* permission. */
/* */
/* CARNEGIE MELLON UNIVERSITY AND THE CONTRIBUTORS TO THIS WORK */
/* DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING */
/* ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT */
/* SHALL CARNEGIE MELLON UNIVERSITY NOR THE CONTRIBUTORS BE LIABLE */
/* FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES */
/* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN */
/* AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, */
/* ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF */
/* THIS SOFTWARE. */
/* */
/*************************************************************************/
/* Author: Alan W Black (awb@cs.cmu.edu) */
/* Date: December 1999 */
/*************************************************************************/
/* */
/* Letter to sound rules */
/* */
/*************************************************************************/
#ifndef _CST_LTS_H__
#define _CST_LTS_H__
#include "cst_val.h"
typedef unsigned short cst_lts_addr;
typedef int cst_lts_phone;
typedef unsigned char cst_lts_feat;
typedef unsigned char cst_lts_letter;
typedef unsigned char cst_lts_model;
/* end of rule value */
#define CST_LTS_EOR 255
typedef struct cst_lts_rules_struct {
char *name;
const cst_lts_addr *letter_index; /* index into model first state */
const cst_lts_model *models;
const char * const * phone_table;
int context_window_size;
int context_extra_feats;
const char * const * letter_table;
} cst_lts_rules;
/* Note this is designed to be 6 bytes */
typedef struct cst_lts_rule_struct {
cst_lts_feat feat;
cst_lts_letter val;
cst_lts_addr qtrue;
cst_lts_addr qfalse;
} cst_lts_rule;
cst_lts_rules *new_lts_rules();
cst_val *lts_apply(const char *word,const char *feats,const cst_lts_rules *r);
cst_val *lts_apply_val(const cst_val *wlist,const char *feats,const cst_lts_rules *r);
#endif

View File

@ -0,0 +1,55 @@
/*************************************************************************/
/* */
/* Language Technologies Institute */
/* Carnegie Mellon University */
/* Copyright (c) 2002 */
/* All Rights Reserved. */
/* */
/* Permission is hereby granted, free of charge, to use and distribute */
/* this software and its documentation without restriction, including */
/* without limitation the rights to use, copy, modify, merge, publish, */
/* distribute, sublicense, and/or sell copies of this work, and to */
/* permit persons to whom this work is furnished to do so, subject to */
/* the following conditions: */
/* 1. The code must retain the above copyright notice, this list of */
/* conditions and the following disclaimer. */
/* 2. Any modifications must be clearly marked as such. */
/* 3. Original authors' names are not deleted. */
/* 4. The authors' names are not used to endorse or promote products */
/* derived from this software without specific prior written */
/* permission. */
/* */
/* CARNEGIE MELLON UNIVERSITY AND THE CONTRIBUTORS TO THIS WORK */
/* DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING */
/* ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT */
/* SHALL CARNEGIE MELLON UNIVERSITY NOR THE CONTRIBUTORS BE LIABLE */
/* FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES */
/* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN */
/* AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, */
/* ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF */
/* THIS SOFTWARE. */
/* */
/*************************************************************************/
/* Author: Alan W Black (awb@cs.cmu.edu) */
/* Date: August 2002 */
/*************************************************************************/
/* */
/* Letter to sound rewrite rules */
/* */
/*************************************************************************/
#ifndef _CST_LTS_REWRITES_H__
#define _CST_LTS_REWRITES_H__
#include "cst_val.h"
typedef struct cst_lts_rewrites_struct {
char *name;
const cst_val *sets;
const cst_val *rules;
} cst_lts_rewrites;
cst_val *lts_rewrites(const cst_val *itape, const cst_lts_rewrites *r);
cst_val *lts_rewrites_word(const char *word, const cst_lts_rewrites *r);
#endif

View File

@ -0,0 +1,51 @@
/*************************************************************************/
/* */
/* Language Technologies Institute */
/* Carnegie Mellon University */
/* Copyright (c) 2004 */
/* All Rights Reserved. */
/* */
/* Permission is hereby granted, free of charge, to use and distribute */
/* this software and its documentation without restriction, including */
/* without limitation the rights to use, copy, modify, merge, publish, */
/* distribute, sublicense, and/or sell copies of this work, and to */
/* permit persons to whom this work is furnished to do so, subject to */
/* the following conditions: */
/* 1. The code must retain the above copyright notice, this list of */
/* conditions and the following disclaimer. */
/* 2. Any modifications must be clearly marked as such. */
/* 3. Original authors' names are not deleted. */
/* 4. The authors' names are not used to endorse or promote products */
/* derived from this software without specific prior written */
/* permission. */
/* */
/* CARNEGIE MELLON UNIVERSITY AND THE CONTRIBUTORS TO THIS WORK */
/* DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING */
/* ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT */
/* SHALL CARNEGIE MELLON UNIVERSITY NOR THE CONTRIBUTORS BE LIABLE */
/* FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES */
/* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN */
/* AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, */
/* ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF */
/* THIS SOFTWARE. */
/* */
/*************************************************************************/
/* Author: Alan W Black (awb@cs.cmu.edu) */
/* Date: July 2004 */
/*************************************************************************/
/* */
/* Math wrapper */
/* */
/*************************************************************************/
#ifndef _CST_MATH_H__
#define _CST_MATH_H__
#if __palmos__
/* Sun Microsystem's Free fdlibm */
/* We actually don't use it but it allows the system to compile */
/* #include <fdlibm.h> */
#else
#include <math.h>
#endif
#endif

View File

@ -0,0 +1,76 @@
/*************************************************************************/
/* */
/* Language Technologies Institute */
/* Carnegie Mellon University */
/* Copyright (c) 1999 */
/* All Rights Reserved. */
/* */
/* Permission is hereby granted, free of charge, to use and distribute */
/* this software and its documentation without restriction, including */
/* without limitation the rights to use, copy, modify, merge, publish, */
/* distribute, sublicense, and/or sell copies of this work, and to */
/* permit persons to whom this work is furnished to do so, subject to */
/* the following conditions: */
/* 1. The code must retain the above copyright notice, this list of */
/* conditions and the following disclaimer. */
/* 2. Any modifications must be clearly marked as such. */
/* 3. Original authors' names are not deleted. */
/* 4. The authors' names are not used to endorse or promote products */
/* derived from this software without specific prior written */
/* permission. */
/* */
/* CARNEGIE MELLON UNIVERSITY AND THE CONTRIBUTORS TO THIS WORK */
/* DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING */
/* ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT */
/* SHALL CARNEGIE MELLON UNIVERSITY NOR THE CONTRIBUTORS BE LIABLE */
/* FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES */
/* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN */
/* AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, */
/* ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF */
/* THIS SOFTWARE. */
/* */
/*************************************************************************/
/* Author: Alan W Black (awb@cs.cmu.edu) */
/* Date: December 2000 */
/*************************************************************************/
/* */
/* Phoneset functions */
/* */
/*************************************************************************/
#ifndef _CST_PHONESET_H__
#define _CST_PHONESET_H__
#include "cst_file.h"
#include "cst_val.h"
#include "cst_features.h"
#include "cst_item.h"
struct cst_phoneset_struct {
const char *name;
const char * const * featnames;
const cst_val * const *featvals;
const char * const * phonenames;
const char *silence;
const int num_phones;
const int * const * fvtable;
};
typedef struct cst_phoneset_struct cst_phoneset;
/* Constructor functions */
cst_phoneset *new_phoneset();
void delete_phoneset(cst_phoneset *u);
const cst_val *phone_feature(const cst_phoneset *ps,
const char* phonename,
const char *featname);
const char *phone_feature_string(const cst_phoneset *ps,
const char* phonename,
const char *featname);
int phone_id(const cst_phoneset *ps,const char* phonename);
int phone_feat_id(const cst_phoneset *ps,const char* featname);
const cst_phoneset *item_phoneset(const cst_item *i);
CST_VAL_USER_TYPE_DCLS(phoneset,cst_phoneset)
#endif

View File

@ -0,0 +1,160 @@
/*************************************************************************/
/* */
/* Language Technologies Institute */
/* Carnegie Mellon University */
/* Copyright (c) 1999 */
/* All Rights Reserved. */
/* */
/* Permission is hereby granted, free of charge, to use and distribute */
/* this software and its documentation without restriction, including */
/* without limitation the rights to use, copy, modify, merge, publish, */
/* distribute, sublicense, and/or sell copies of this work, and to */
/* permit persons to whom this work is furnished to do so, subject to */
/* the following conditions: */
/* 1. The code must retain the above copyright notice, this list of */
/* conditions and the following disclaimer. */
/* 2. Any modifications must be clearly marked as such. */
/* 3. Original authors' names are not deleted. */
/* 4. The authors' names are not used to endorse or promote products */
/* derived from this software without specific prior written */
/* permission. */
/* */
/* CARNEGIE MELLON UNIVERSITY AND THE CONTRIBUTORS TO THIS WORK */
/* DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING */
/* ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT */
/* SHALL CARNEGIE MELLON UNIVERSITY NOR THE CONTRIBUTORS BE LIABLE */
/* FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES */
/* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN */
/* AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, */
/* ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF */
/* THIS SOFTWARE. */
/* */
/*************************************************************************/
/* Author: Alan W Black (awb@cs.cmu.edu) */
/* Date: January 2000 */
/*************************************************************************/
/* */
/* cst front-end to Henry Spencer's regex code */
/* */
/*************************************************************************/
/* Includes portions or regexp.h, copyright follows: */
/*
* Copyright (c) 1986 by University of Toronto.
* Copyright (c) 1989, 1993
* The Regents of the University of California. All rights reserved.
*
* This code is derived from software contributed to Berkeley
* by Henry Spencer.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgement:
* This product includes software developed by the University of
* California, Berkeley and its contributors.
* 4. Neither the name of the University nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* @(#)regexp.h 8.1 (Berkeley) 6/2/93
*/
#ifndef _CST_REGEX_H__
#define _CST_REGEX_H__
#include "cst_file.h"
#include "cst_string.h"
/*
* The first byte of the regexp internal "program" is actually this magic
* number; the start node begins in the second byte.
*/
#define CST_REGMAGIC 0234
typedef struct cst_regex_struct {
char regstart; /* Internal use only. */
char reganch; /* Internal use only. */
char *regmust; /* Internal use only. */
int regmlen; /* Internal use only. */
int regsize;
char *program;
} cst_regex;
#define CST_NSUBEXP 10
typedef struct cst_regstate_struct {
const char *startp[CST_NSUBEXP];
const char *endp[CST_NSUBEXP];
const char *input;
const char *bol;
} cst_regstate;
cst_regex *new_cst_regex(const char *str);
void delete_cst_regex(cst_regex *r);
int cst_regex_match(const cst_regex *r, const char *str);
cst_regstate *cst_regex_match_return(const cst_regex *r, const char *str);
/* Internal functions from original HS code */
cst_regex *hs_regcomp(const char *);
cst_regstate *hs_regexec(const cst_regex *, const char *);
void hs_regdelete(cst_regex *);
/* Works similarly to snprintf(3), in that at most max characters are
written to out, including the trailing NUL, and the return value is
the number of characters written, *excluding* the trailing NUL.
Also works similarly to wcstombs(3) in that passing NULL as out
will count the number of characters that would be written without
doing any actual conversion, and ignoring max. So, you could use
it like this:
rx = new_cst_regex("\\(.*\\)_\\(.*\\)");
if ((rs = cst_regex_match_return(rx, "foo_bar")) != NULL) {
size_t n;
n = cst_regsub(rs, "\\1_\\2_quux", NULL, 0) + 1;
out = cst_alloc(char, n);
cst_regsub(rs, "\\1_\\2_quux", out, n);
} */
size_t cst_regsub(const cst_regstate *r, const char *in, char *out, size_t max);
/* Initialize the regex engine and global regex constants */
void cst_regex_init();
/* Regexps used in text processing (these are latin-alphabet specific
and to some extent US English-specific) */
extern const cst_regex * const cst_rx_white;
extern const cst_regex * const cst_rx_alpha;
extern const cst_regex * const cst_rx_uppercase;
extern const cst_regex * const cst_rx_lowercase;
extern const cst_regex * const cst_rx_alphanum;
extern const cst_regex * const cst_rx_identifier;
extern const cst_regex * const cst_rx_int;
extern const cst_regex * const cst_rx_double;
extern const cst_regex * const cst_rx_commaint;
extern const cst_regex * const cst_rx_digits;
extern const cst_regex * const cst_rx_dotted_abbrev;
/* Table of regexps used in CART trees (only one so far) */
extern const cst_regex * const cst_regex_table[];
#define CST_RX_dotted_abbrev_NUM 0
#endif

View File

@ -0,0 +1,72 @@
/*************************************************************************/
/* */
/* Language Technologies Institute */
/* Carnegie Mellon University */
/* Copyright (c) 1999 */
/* All Rights Reserved. */
/* */
/* Permission is hereby granted, free of charge, to use and distribute */
/* this software and its documentation without restriction, including */
/* without limitation the rights to use, copy, modify, merge, publish, */
/* distribute, sublicense, and/or sell copies of this work, and to */
/* permit persons to whom this work is furnished to do so, subject to */
/* the following conditions: */
/* 1. The code must retain the above copyright notice, this list of */
/* conditions and the following disclaimer. */
/* 2. Any modifications must be clearly marked as such. */
/* 3. Original authors' names are not deleted. */
/* 4. The authors' names are not used to endorse or promote products */
/* derived from this software without specific prior written */
/* permission. */
/* */
/* CARNEGIE MELLON UNIVERSITY AND THE CONTRIBUTORS TO THIS WORK */
/* DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING */
/* ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT */
/* SHALL CARNEGIE MELLON UNIVERSITY NOR THE CONTRIBUTORS BE LIABLE */
/* FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES */
/* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN */
/* AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, */
/* ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF */
/* THIS SOFTWARE. */
/* */
/*************************************************************************/
/* Author: Alan W Black (awb@cs.cmu.edu) */
/* Date: December 1999 */
/*************************************************************************/
/* */
/* Relation */
/* */
/*************************************************************************/
#ifndef _CST_RELATION_H__
#define _CST_RELATION_H__
#include "cst_file.h"
#include "cst_val.h"
#include "cst_features.h"
#include "cst_item.h"
#include "cst_utterance.h"
struct cst_relation_struct {
char *name;
cst_features *features;
cst_utterance *utterance;
cst_item *head;
cst_item *tail;
};
/* Constructor functions */
cst_relation *new_relation(const char *name, cst_utterance *u);
void delete_relation(cst_relation *r);
cst_item *relation_head(cst_relation *r);
cst_item *relation_tail(cst_relation *r);
const char *relation_name(cst_relation *r);
cst_item *relation_append(cst_relation *r,cst_item *i);
cst_item *relation_prepend(cst_relation *r,cst_item *i);
int relation_load(cst_relation *r, const char *filename);
int relation_save(cst_relation *r, const char *filename);
#endif

View File

@ -0,0 +1,51 @@
/*************************************************************************/
/* */
/* Language Technologies Institute */
/* Carnegie Mellon University */
/* Copyright (c) 2001 */
/* All Rights Reserved. */
/* */
/* Permission is hereby granted, free of charge, to use and distribute */
/* this software and its documentation without restriction, including */
/* without limitation the rights to use, copy, modify, merge, publish, */
/* distribute, sublicense, and/or sell copies of this work, and to */
/* permit persons to whom this work is furnished to do so, subject to */
/* the following conditions: */
/* 1. The code must retain the above copyright notice, this list of */
/* conditions and the following disclaimer. */
/* 2. Any modifications must be clearly marked as such. */
/* 3. Original authors' names are not deleted. */
/* 4. The authors' names are not used to endorse or promote products */
/* derived from this software without specific prior written */
/* permission. */
/* */
/* CARNEGIE MELLON UNIVERSITY AND THE CONTRIBUTORS TO THIS WORK */
/* DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING */
/* ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT */
/* SHALL CARNEGIE MELLON UNIVERSITY NOR THE CONTRIBUTORS BE LIABLE */
/* FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES */
/* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN */
/* AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, */
/* ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF */
/* THIS SOFTWARE. */
/* */
/*************************************************************************/
/* Author: Alan W Black (awb@cs.cmu.edu) */
/* Date: January 2001 */
/*************************************************************************/
/* */
/* Signal processing */
/* */
/*************************************************************************/
#ifndef _CST_SIGPR_H__
#define _CST_SIGPR_H__
#include "cst_file.h"
#include "cst_val.h"
#include "cst_sts.h"
cst_wave *lpc_resynth(cst_lpcres *lpcres);
cst_wave *lpc_resynth_fixedpoint(cst_lpcres *lpcres);
cst_wave *lpc_resynth_spike(cst_lpcres *lpcres);
#endif

View File

@ -0,0 +1,49 @@
/*************************************************************************/
/* */
/* Language Technologies Institute */
/* Carnegie Mellon University */
/* Copyright (c) 2000 */
/* All Rights Reserved. */
/* */
/* Permission is hereby granted, free of charge, to use and distribute */
/* this software and its documentation without restriction, including */
/* without limitation the rights to use, copy, modify, merge, publish, */
/* distribute, sublicense, and/or sell copies of this work, and to */
/* permit persons to whom this work is furnished to do so, subject to */
/* the following conditions: */
/* 1. The code must retain the above copyright notice, this list of */
/* conditions and the following disclaimer. */
/* 2. Any modifications must be clearly marked as such. */
/* 3. Original authors' names are not deleted. */
/* 4. The authors' names are not used to endorse or promote products */
/* derived from this software without specific prior written */
/* permission. */
/* */
/* CARNEGIE MELLON UNIVERSITY AND THE CONTRIBUTORS TO THIS WORK */
/* DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING */
/* ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT */
/* SHALL CARNEGIE MELLON UNIVERSITY NOR THE CONTRIBUTORS BE LIABLE */
/* FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES */
/* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN */
/* AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, */
/* ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF */
/* THIS SOFTWARE. */
/* */
/*************************************************************************/
/* Author: Alan W Black (awb@cs.cmu.edu) */
/* Date: October 2000 */
/*************************************************************************/
/* */
/* General Socket code */
/* */
/*************************************************************************/
#ifndef _CST_SOCKET_H__
#define _CST_SOCKET_H__
int cst_socket_open(const char *host, int port);
int cst_socket_close(int socket);
int cst_socket_server(const char *name, int port,
int (process_client)(int name, int fd));
#endif

View File

@ -0,0 +1,58 @@
/*************************************************************************/
/* */
/* Language Technologies Institute */
/* Carnegie Mellon University */
/* Copyright (c) 2001 */
/* All Rights Reserved. */
/* */
/* Permission is hereby granted, free of charge, to use and distribute */
/* this software and its documentation without restriction, including */
/* without limitation the rights to use, copy, modify, merge, publish, */
/* distribute, sublicense, and/or sell copies of this work, and to */
/* permit persons to whom this work is furnished to do so, subject to */
/* the following conditions: */
/* 1. The code must retain the above copyright notice, this list of */
/* conditions and the following disclaimer. */
/* 2. Any modifications must be clearly marked as such. */
/* 3. Original authors' names are not deleted. */
/* 4. The authors' names are not used to endorse or promote products */
/* derived from this software without specific prior written */
/* permission. */
/* */
/* CARNEGIE MELLON UNIVERSITY AND THE CONTRIBUTORS TO THIS WORK */
/* DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING */
/* ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT */
/* SHALL CARNEGIE MELLON UNIVERSITY NOR THE CONTRIBUTORS BE LIABLE */
/* FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES */
/* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN */
/* AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, */
/* ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF */
/* THIS SOFTWARE. */
/* */
/*************************************************************************/
/* Author: Alan W Black (awb@cs.cmu.edu) */
/* Date: November 2001 */
/*************************************************************************/
/* */
/* sufficient statitsics */
/* */
/*************************************************************************/
#ifndef _CST_SS_H__
#define _CST_SS_H__
typedef struct cst_ss_struct {
double num_samples;
double sum;
double sumx;
} cst_ss;
cst_ss *new_ss();
void delete_ss(cst_ss *ss);
void ss_reset(cst_ss *ss);
double ss_mean(cst_ss *ss);
double ss_variance(cst_ss *ss);
double ss_stddev(cst_ss *ss);
void ss_cummulate(cst_ss *ss,double a);
void ss_cummulate_n(cst_ss *ss,double a, double count);
#endif

View File

@ -0,0 +1,72 @@
/*************************************************************************/
/* */
/* Language Technologies Institute */
/* Carnegie Mellon University */
/* Copyright (c) 1999 */
/* All Rights Reserved. */
/* */
/* Permission is hereby granted, free of charge, to use and distribute */
/* this software and its documentation without restriction, including */
/* without limitation the rights to use, copy, modify, merge, publish, */
/* distribute, sublicense, and/or sell copies of this work, and to */
/* permit persons to whom this work is furnished to do so, subject to */
/* the following conditions: */
/* 1. The code must retain the above copyright notice, this list of */
/* conditions and the following disclaimer. */
/* 2. Any modifications must be clearly marked as such. */
/* 3. Original authors' names are not deleted. */
/* 4. The authors' names are not used to endorse or promote products */
/* derived from this software without specific prior written */
/* permission. */
/* */
/* CARNEGIE MELLON UNIVERSITY AND THE CONTRIBUTORS TO THIS WORK */
/* DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING */
/* ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT */
/* SHALL CARNEGIE MELLON UNIVERSITY NOR THE CONTRIBUTORS BE LIABLE */
/* FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES */
/* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN */
/* AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, */
/* ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF */
/* THIS SOFTWARE. */
/* */
/*************************************************************************/
/* Author: Alan W Black (awb@cs.cmu.edu) */
/* Date: December 1999 */
/*************************************************************************/
/* */
/* String manipulation functions */
/* */
/*************************************************************************/
#ifndef __CST_STRING_H__
#define __CST_STRING_H__
#include <string.h>
#if defined(UNDER_CE) && (UNDER_CE < 300)
#define isalnum(a) iswalnum((wint_t)(a))
#define isupper(a) iswupper((wint_t)(a))
#define islower(a) iswlower((wint_t)(a))
#endif
/* typedef unsigned char cst_string; */
typedef char cst_string;
double cst_atof(const char *str);
cst_string *cst_strdup(const cst_string *s);
cst_string *cst_strchr(const cst_string *s, int c);
cst_string *cst_strrchr(const cst_string *str, int c);
#define cst_strstr(h,n) \
((cst_string *)strstr((const char *)h,(const char *)n))
#define cst_strlen(s) (strlen((const char *)s))
#define cst_streq(A,B) (strcmp(A,B) == 0)
#define cst_streqn(A,B,N) (strncmp(A,B,N) == 0)
int cst_member_string(const char *str, const char * const *slist);
char *cst_substr(const char *str,int start, int length);
char *cst_string_before(const char *s,const char *c);
cst_string *cst_downcase(const cst_string *str);
cst_string *cst_upcase(const cst_string *str);
#endif

View File

@ -0,0 +1,127 @@
/*************************************************************************/
/* */
/* Language Technologies Institute */
/* Carnegie Mellon University */
/* Copyright (c) 2001 */
/* All Rights Reserved. */
/* */
/* Permission is hereby granted, free of charge, to use and distribute */
/* this software and its documentation without restriction, including */
/* without limitation the rights to use, copy, modify, merge, publish, */
/* distribute, sublicense, and/or sell copies of this work, and to */
/* permit persons to whom this work is furnished to do so, subject to */
/* the following conditions: */
/* 1. The code must retain the above copyright notice, this list of */
/* conditions and the following disclaimer. */
/* 2. Any modifications must be clearly marked as such. */
/* 3. Original authors' names are not deleted. */
/* 4. The authors' names are not used to endorse or promote products */
/* derived from this software without specific prior written */
/* permission. */
/* */
/* CARNEGIE MELLON UNIVERSITY AND THE CONTRIBUTORS TO THIS WORK */
/* DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING */
/* ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT */
/* SHALL CARNEGIE MELLON UNIVERSITY NOR THE CONTRIBUTORS BE LIABLE */
/* FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES */
/* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN */
/* AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, */
/* ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF */
/* THIS SOFTWARE. */
/* */
/*************************************************************************/
/* Author: Alan W Black (awb@cs.cmu.edu) */
/* Date: January 2001 */
/*************************************************************************/
/* */
/* Short term signals */
/* */
/*************************************************************************/
#ifndef _CST_STS_H__
#define _CST_STS_H__
/* Need some lower level functions in case we are doing streaming */
#include "cst_wave.h"
#include "cst_audio.h"
/* The short term signal (sts) structure is the basic unit data info */
/* it may be diphones or general units. Indexes and names are held */
/* else where, this information plus the indexes in the Unit relation */
/* allow reconstruction of the signal itself */
struct cst_sts_struct {
const unsigned short *frame;
const int size; /* in samples */
const unsigned char *residual;
};
typedef struct cst_sts_struct cst_sts;
/* Because many C compilers can't compile when there are 100Ks of symbols */
/* We store the sts in pages. Each page of stss gets compiled into an */
/* array in separate files thus reducing the number of symbols -- but */
/* introducing an extra dereference */
struct cst_sts_paged_struct {
const unsigned short frame_offset;
const unsigned short res_size;
const unsigned int res_offset;
const unsigned short *frame_page;
const unsigned char *res_page;
};
typedef struct cst_sts_paged_struct cst_sts_paged;
/* This represents a database of short-term signals. */
struct cst_sts_list_struct {
/* If the sts are compiled in, this will point to them. */
const cst_sts *sts;
/* Or if the data is paged in different structures */
const cst_sts_paged *sts_paged;
/* Or we could have these set (or set later) */
const unsigned short *frames;
const unsigned char *residuals;
const unsigned int *resoffs;
int num_sts; /* But I don't think you need that number */
int num_channels; /* typically lpc order */
int sample_rate;
float coeff_min; /* used for decoding the short representation */
float coeff_range; /* for coefficients */
};
typedef struct cst_sts_list_struct cst_sts_list;
/* This is used to represent a newly constructed waveform to be synthed */
struct cst_lpcres_struct {
const unsigned short **frames;
int *times;
int num_frames;
int num_channels;
float lpc_min;
float lpc_range;
int num_samples;
int sample_rate;
int *sizes;
unsigned char *residual;
/* Optional call back function */
cst_audio_streaming_info *asi;
};
typedef struct cst_lpcres_struct cst_lpcres;
cst_lpcres *new_lpcres();
void delete_lpcres(cst_lpcres *l);
float lpcres_frame_shift(cst_lpcres *t, int frame);
void lpcres_resize_frames(cst_lpcres *l,int num_frames);
void lpcres_resize_samples(cst_lpcres *l,int num_samples);
cst_sts_list *new_sts_list();
void delete_sts_list(cst_sts_list *l);
const unsigned short * get_sts_frame(const cst_sts_list *sts_list, int frame);
const unsigned char * get_sts_residual(const cst_sts_list *sts_list, int frame);
const unsigned char * get_sts_residual_fixed(const cst_sts_list *sts_list, int frame);
int get_frame_size(const cst_sts_list *sts_list, int frame);
int get_unit_size(const cst_sts_list *s,int start, int end);
CST_VAL_USER_TYPE_DCLS(lpcres,cst_lpcres)
CST_VAL_USER_TYPE_DCLS(sts_list,cst_sts_list)
#endif

View File

@ -0,0 +1,93 @@
/*************************************************************************/
/* */
/* Language Technologies Institute */
/* Carnegie Mellon University */
/* Copyright (c) 2000 */
/* All Rights Reserved. */
/* */
/* Permission is hereby granted, free of charge, to use and distribute */
/* this software and its documentation without restriction, including */
/* without limitation the rights to use, copy, modify, merge, publish, */
/* distribute, sublicense, and/or sell copies of this work, and to */
/* permit persons to whom this work is furnished to do so, subject to */
/* the following conditions: */
/* 1. The code must retain the above copyright notice, this list of */
/* conditions and the following disclaimer. */
/* 2. Any modifications must be clearly marked as such. */
/* 3. Original authors' names are not deleted. */
/* 4. The authors' names are not used to endorse or promote products */
/* derived from this software without specific prior written */
/* permission. */
/* */
/* CARNEGIE MELLON UNIVERSITY AND THE CONTRIBUTORS TO THIS WORK */
/* DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING */
/* ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT */
/* SHALL CARNEGIE MELLON UNIVERSITY NOR THE CONTRIBUTORS BE LIABLE */
/* FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES */
/* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN */
/* AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, */
/* ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF */
/* THIS SOFTWARE. */
/* */
/*************************************************************************/
/* Author: Alan W Black (awb@cs.cmu.edu) */
/* Date: September 2000 */
/*************************************************************************/
/* */
/* General synth functions */
/* */
/*************************************************************************/
#ifndef _SYNTH_H__
#define _SYNTH_H__
#include "cst_hrg.h"
#include "cst_tokenstream.h"
#include "cst_voice.h"
typedef int (*cst_breakfunc)(cst_tokenstream *ts,
const char *token,
cst_relation *tokens);
CST_VAL_USER_FUNCPTR_DCLS(breakfunc,cst_breakfunc)
int default_utt_break(cst_tokenstream *ts,
const char *token, cst_relation *tokens);
/* You must call utt_init before any of the others. */
cst_utterance *utt_init(cst_utterance *u, cst_voice *vox);
cst_utterance *utt_synth(cst_utterance *u);
cst_utterance *utt_synth_phones(cst_utterance *u);
cst_utterance *utt_synth_tokens(cst_utterance *u);
typedef struct cst_dur_stats_struct {
char *phone;
float mean;
float stddev;
} dur_stat;
typedef dur_stat *dur_stats; /* only one star, due to funky cst_val magic */
CST_VAL_USER_TYPE_DCLS(dur_stats,dur_stats)
cst_utterance *default_segmentanalysis(cst_utterance *u);
cst_utterance *default_tokenization(cst_utterance *u);
cst_utterance *default_textanalysis(cst_utterance *u);
cst_val *default_tokentowords(cst_item *i);
cst_utterance *default_phrasing(cst_utterance *u);
cst_utterance *default_pos_tagger(cst_utterance *u);
cst_utterance *default_lexical_insertion(cst_utterance *u);
cst_utterance *default_pause_insertion(cst_utterance *u);
cst_utterance *cart_intonation(cst_utterance *u);
cst_utterance *cart_duration(cst_utterance *u);
cst_utterance *flat_prosody(cst_utterance *u);
typedef struct cst_synth_module_struct {
const char *hookname;
cst_uttfunc defhook;
} cst_synth_module;
cst_utterance *apply_synth_module(cst_utterance *u,
const cst_synth_module *mod);
cst_utterance *apply_synth_method(cst_utterance *u,
const cst_synth_module meth[]);
#endif

View File

@ -0,0 +1,120 @@
/*************************************************************************/
/* */
/* Language Technologies Institute */
/* Carnegie Mellon University */
/* Copyright (c) 1999 */
/* All Rights Reserved. */
/* */
/* Permission is hereby granted, free of charge, to use and distribute */
/* this software and its documentation without restriction, including */
/* without limitation the rights to use, copy, modify, merge, publish, */
/* distribute, sublicense, and/or sell copies of this work, and to */
/* permit persons to whom this work is furnished to do so, subject to */
/* the following conditions: */
/* 1. The code must retain the above copyright notice, this list of */
/* conditions and the following disclaimer. */
/* 2. Any modifications must be clearly marked as such. */
/* 3. Original authors' names are not deleted. */
/* 4. The authors' names are not used to endorse or promote products */
/* derived from this software without specific prior written */
/* permission. */
/* */
/* CARNEGIE MELLON UNIVERSITY AND THE CONTRIBUTORS TO THIS WORK */
/* DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING */
/* ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT */
/* SHALL CARNEGIE MELLON UNIVERSITY NOR THE CONTRIBUTORS BE LIABLE */
/* FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES */
/* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN */
/* AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, */
/* ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF */
/* THIS SOFTWARE. */
/* */
/*************************************************************************/
/* Author: Alan W Black (awb@cs.cmu.edu) */
/* Date: July 1999 */
/*************************************************************************/
/* */
/* Tokenizer for strings and files */
/* */
/*************************************************************************/
#ifndef _CST_TOKENSTREAM_H__
#define _CST_TOKENSTREAM_H__
#include "cst_alloc.h"
#include "cst_string.h"
#include "cst_file.h"
typedef struct cst_tokenstream_struct {
cst_file fd;
int file_pos;
int line_number;
cst_string *string_buffer;
int current_char;
int token_pos;
int ws_max;
cst_string *whitespace;
int prep_max;
cst_string *prepunctuation;
int token_max;
cst_string *token;
int postp_max;
cst_string *postpunctuation;
/* Should only be set through set_charclasses as charclass table needs */
/* to be updated when you reset these */
const cst_string *p_whitespacesymbols;
const cst_string *p_singlecharsymbols;
const cst_string *p_prepunctuationsymbols;
const cst_string *p_postpunctuationsymbols;
cst_string charclass[256];
} cst_tokenstream;
#define TS_CHARCLASS_NONE 0
#define TS_CHARCLASS_WHITESPACE 2
#define TS_CHARCLASS_SINGLECHAR 4
#define TS_CHARCLASS_PREPUNCT 8
#define TS_CHARCLASS_POSTPUNCT 16
#define TS_CHARCLASS_QUOTE 32
#define ts_charclass(C,CLASS,TS) ((TS)->charclass[(unsigned char)C] & CLASS)
extern const cst_string * const cst_ts_default_whitespacesymbols;
extern const cst_string * const cst_ts_default_prepunctuationsymbols;
extern const cst_string * const cst_ts_default_postpunctuationsymbols;
extern const cst_string * const cst_ts_default_singlecharsymbols;
/* Public functions for tokenstream manipulation */
cst_tokenstream *ts_open(const char *filename,
const cst_string *whitespacesymbols,
const cst_string *singlecharsymbols,
const cst_string *prepunctsymbols,
const cst_string *postpunctsymbols);
cst_tokenstream *ts_open_string(const cst_string *string,
const cst_string *whitespacesymbols,
const cst_string *singlecharsymbols,
const cst_string *prepunctsymbols,
const cst_string *postpunctsymbols);
void ts_close(cst_tokenstream *ts);
int ts_eof(cst_tokenstream *ts);
const cst_string *ts_get(cst_tokenstream *ts);
const cst_string *ts_get_quoted_token(cst_tokenstream *ts,
char quote,
char escape);
void set_charclasses(cst_tokenstream *ts,
const cst_string *whitespace,
const cst_string *singlecharsymbols,
const cst_string *prepunctuation,
const cst_string *postpunctuation);
int ts_read(void *buff, int size, int num, cst_tokenstream *ts);
int ts_set_stream_pos(cst_tokenstream *ts,int pos);
int ts_get_stream_pos(cst_tokenstream *ts);
#endif

View File

@ -0,0 +1,70 @@
/*************************************************************************/
/* */
/* Language Technologies Institute */
/* Carnegie Mellon University */
/* Copyright (c) 1999 */
/* All Rights Reserved. */
/* */
/* Permission is hereby granted, free of charge, to use and distribute */
/* this software and its documentation without restriction, including */
/* without limitation the rights to use, copy, modify, merge, publish, */
/* distribute, sublicense, and/or sell copies of this work, and to */
/* permit persons to whom this work is furnished to do so, subject to */
/* the following conditions: */
/* 1. The code must retain the above copyright notice, this list of */
/* conditions and the following disclaimer. */
/* 2. Any modifications must be clearly marked as such. */
/* 3. Original authors' names are not deleted. */
/* 4. The authors' names are not used to endorse or promote products */
/* derived from this software without specific prior written */
/* permission. */
/* */
/* CARNEGIE MELLON UNIVERSITY AND THE CONTRIBUTORS TO THIS WORK */
/* DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING */
/* ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT */
/* SHALL CARNEGIE MELLON UNIVERSITY NOR THE CONTRIBUTORS BE LIABLE */
/* FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES */
/* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN */
/* AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, */
/* ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF */
/* THIS SOFTWARE. */
/* */
/*************************************************************************/
/* Author: Alan W Black (awb@cs.cmu.edu) */
/* Date: August 2000 */
/*************************************************************************/
/* */
/* Waveforms */
/* */
/*************************************************************************/
#ifndef _CST_TRACK_H__
#define _CST_TRACK_H__
#include "cst_file.h"
#include "cst_error.h"
#include "cst_alloc.h"
#include "cst_endian.h"
#include "cst_file.h"
#include "cst_val.h"
typedef struct cst_track_struct {
const char *type;
int num_frames;
int num_channels;
float *times;
float **frames;
} cst_track;
cst_track *new_track();
void delete_track(cst_track *val);
float track_frame_shift(cst_track *t, int frame);
void cst_track_resize(cst_track *t,int num_frames, int num_channels);
int cst_track_save_est(cst_track *t, const char *filename);
int cst_track_save_est_binary(cst_track *t, const char *filename);
int cst_track_load_est(cst_track *t, const char *filename);
CST_VAL_USER_TYPE_DCLS(track,cst_track)
#endif

View File

@ -0,0 +1,62 @@
/*************************************************************************/
/* */
/* Language Technologies Institute */
/* Carnegie Mellon University */
/* Copyright (c) 2001 */
/* All Rights Reserved. */
/* */
/* Permission is hereby granted, free of charge, to use and distribute */
/* this software and its documentation without restriction, including */
/* without limitation the rights to use, copy, modify, merge, publish, */
/* distribute, sublicense, and/or sell copies of this work, and to */
/* permit persons to whom this work is furnished to do so, subject to */
/* the following conditions: */
/* 1. The code must retain the above copyright notice, this list of */
/* conditions and the following disclaimer. */
/* 2. Any modifications must be clearly marked as such. */
/* 3. Original authors' names are not deleted. */
/* 4. The authors' names are not used to endorse or promote products */
/* derived from this software without specific prior written */
/* permission. */
/* */
/* CARNEGIE MELLON UNIVERSITY AND THE CONTRIBUTORS TO THIS WORK */
/* DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING */
/* ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT */
/* SHALL CARNEGIE MELLON UNIVERSITY NOR THE CONTRIBUTORS BE LIABLE */
/* FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES */
/* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN */
/* AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, */
/* ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF */
/* THIS SOFTWARE. */
/* */
/*************************************************************************/
/* Author: Alan W Black (awb@cs.cmu.edu) */
/* Date: January 2001 */
/*************************************************************************/
/* */
/* Unit databases */
/* */
/*************************************************************************/
#ifndef _CST_UNITS_H__
#define _CST_UNITS_H__
#include "cst_file.h"
#include "cst_hrg.h"
#include "cst_sts.h"
cst_utterance *join_units(cst_utterance *utt);
cst_utterance *join_units_windowed(cst_utterance *utt);
cst_utterance *join_units_simple(cst_utterance *utt);
cst_utterance *join_units_modified_lpc(cst_utterance *utt);
cst_utterance *asis_to_pm(cst_utterance *utt);
cst_utterance *f0_targets_to_pm(cst_utterance *utt);
cst_utterance *concat_units(cst_utterance *utt);
void add_residual(int targ_size, unsigned char *targ_residual,
int unit_size, const unsigned char *unit_residual);
void add_residual_pulse(int targ_size, unsigned char *targ_residual,
int unit_size, const unsigned char *unit_residual);
#endif

View File

@ -0,0 +1,64 @@
/*************************************************************************/
/* */
/* Language Technologies Institute */
/* Carnegie Mellon University */
/* Copyright (c) 1999 */
/* All Rights Reserved. */
/* */
/* Permission is hereby granted, free of charge, to use and distribute */
/* this software and its documentation without restriction, including */
/* without limitation the rights to use, copy, modify, merge, publish, */
/* distribute, sublicense, and/or sell copies of this work, and to */
/* permit persons to whom this work is furnished to do so, subject to */
/* the following conditions: */
/* 1. The code must retain the above copyright notice, this list of */
/* conditions and the following disclaimer. */
/* 2. Any modifications must be clearly marked as such. */
/* 3. Original authors' names are not deleted. */
/* 4. The authors' names are not used to endorse or promote products */
/* derived from this software without specific prior written */
/* permission. */
/* */
/* CARNEGIE MELLON UNIVERSITY AND THE CONTRIBUTORS TO THIS WORK */
/* DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING */
/* ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT */
/* SHALL CARNEGIE MELLON UNIVERSITY NOR THE CONTRIBUTORS BE LIABLE */
/* FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES */
/* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN */
/* AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, */
/* ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF */
/* THIS SOFTWARE. */
/* */
/*************************************************************************/
/* Author: Alan W Black (awb@cs.cmu.edu) */
/* Date: September 2000 */
/*************************************************************************/
/* */
/* Various utterance access/setting functions */
/* */
/*************************************************************************/
#ifndef _UTT_UTILS_H__
#define _UTT_UTILS_H__
#include "cst_hrg.h"
#include "cst_wave.h"
int utt_set_wave(cst_utterance *u, cst_wave *w);
cst_wave *utt_wave(cst_utterance *u);
const char *utt_input_text(cst_utterance *u);
int utt_set_input_text(cst_utterance *u,const char *text);
#define utt_feat_string(U,F) (feat_string((U)->features,F))
#define utt_feat_int(U,F) (feat_int((U)->features,F))
#define utt_feat_float(U,F) (feat_float((U)->features,F))
#define utt_feat_val(U,F) (feat_val((U)->features,F))
#define utt_set_feat_string(U,F,V) (feat_set_string((U)->features,F,V))
#define utt_set_feat_int(U,F,V) (feat_set_int((U)->features,F,V))
#define utt_set_feat_float(U,F,V) (feat_set_float((U)->features,F,V))
#define utt_set_feat(U,F,V) (feat_set((U)->features,F,V))
#define utt_rel_head(U,R) (relation_head(utt_relation((U),R)))
#endif

View File

@ -0,0 +1,74 @@
/*************************************************************************/
/* */
/* Language Technologies Institute */
/* Carnegie Mellon University */
/* Copyright (c) 1999 */
/* All Rights Reserved. */
/* */
/* Permission is hereby granted, free of charge, to use and distribute */
/* this software and its documentation without restriction, including */
/* without limitation the rights to use, copy, modify, merge, publish, */
/* distribute, sublicense, and/or sell copies of this work, and to */
/* permit persons to whom this work is furnished to do so, subject to */
/* the following conditions: */
/* 1. The code must retain the above copyright notice, this list of */
/* conditions and the following disclaimer. */
/* 2. Any modifications must be clearly marked as such. */
/* 3. Original authors' names are not deleted. */
/* 4. The authors' names are not used to endorse or promote products */
/* derived from this software without specific prior written */
/* permission. */
/* */
/* CARNEGIE MELLON UNIVERSITY AND THE CONTRIBUTORS TO THIS WORK */
/* DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING */
/* ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT */
/* SHALL CARNEGIE MELLON UNIVERSITY NOR THE CONTRIBUTORS BE LIABLE */
/* FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES */
/* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN */
/* AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, */
/* ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF */
/* THIS SOFTWARE. */
/* */
/*************************************************************************/
/* Author: Alan W Black (awb@cs.cmu.edu) */
/* Date: December 1999 */
/*************************************************************************/
/* */
/* Utterances */
/* */
/*************************************************************************/
#ifndef _CST_UTTERANCE_H__
#define _CST_UTTERANCE_H__
#include "cst_file.h"
#include "cst_val.h"
#include "cst_features.h"
#include "cst_item.h"
#include "cst_relation.h"
#include "cst_alloc.h"
struct cst_utterance_struct {
cst_features *features;
cst_features *ffunctions;
cst_features *relations;
cst_alloc_context ctx;
};
/* Constructor functions */
cst_utterance *new_utterance();
void delete_utterance(cst_utterance *u);
cst_relation *utt_relation(cst_utterance *u,const char *name);
cst_relation *utt_relation_create(cst_utterance *u,const char *name);
int utt_relation_delete(cst_utterance *u,const char *name);
int utt_relation_present(cst_utterance *u,const char *name);
typedef cst_utterance *(*cst_uttfunc)(cst_utterance *i);
CST_VAL_USER_FUNCPTR_DCLS(uttfunc,cst_uttfunc)
/* Allocate memory "locally" to an utterance, on platforms that
support/require this (currently only WinCE) */
#define cst_utt_alloc(UTT,TYPE,SIZE) ((TYPE *)cst_local_alloc((UTT)->ctx,sizeof(TYPE)*(SIZE)))
#define cst_utt_free(UTT,PTR) cst_local_free((UTT)->ctx,(PTR))
#endif

View File

@ -0,0 +1,155 @@
/*************************************************************************/
/* */
/* Language Technologies Institute */
/* Carnegie Mellon University */
/* Copyright (c) 1999 */
/* All Rights Reserved. */
/* */
/* Permission is hereby granted, free of charge, to use and distribute */
/* this software and its documentation without restriction, including */
/* without limitation the rights to use, copy, modify, merge, publish, */
/* distribute, sublicense, and/or sell copies of this work, and to */
/* permit persons to whom this work is furnished to do so, subject to */
/* the following conditions: */
/* 1. The code must retain the above copyright notice, this list of */
/* conditions and the following disclaimer. */
/* 2. Any modifications must be clearly marked as such. */
/* 3. Original authors' names are not deleted. */
/* 4. The authors' names are not used to endorse or promote products */
/* derived from this software without specific prior written */
/* permission. */
/* */
/* CARNEGIE MELLON UNIVERSITY AND THE CONTRIBUTORS TO THIS WORK */
/* DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING */
/* ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT */
/* SHALL CARNEGIE MELLON UNIVERSITY NOR THE CONTRIBUTORS BE LIABLE */
/* FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES */
/* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN */
/* AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, */
/* ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF */
/* THIS SOFTWARE. */
/* */
/*************************************************************************/
/* Author: Alan W Black (awb@cs.cmu.edu) */
/* Date: December 1999 */
/*************************************************************************/
/* */
/* Vals, typed objects */
/* */
/*************************************************************************/
#ifndef _CST_VAL_H__
#define _CST_VAL_H__
#include "cst_file.h"
#include "cst_string.h"
#include "cst_error.h"
#include "cst_alloc.h"
#include "cst_val_defs.h"
/* Only CONS can be an even number */
#define CST_VAL_TYPE_CONS 0
#define CST_VAL_TYPE_INT 1
#define CST_VAL_TYPE_FLOAT 3
#define CST_VAL_TYPE_STRING 5
#define CST_VAL_TYPE_FIRST_FREE 7
#define CST_VAL_TYPE_MAX 54
typedef struct cst_val_cons_struct {
struct cst_val_struct *car;
struct cst_val_struct *cdr;
} cst_val_cons;
typedef struct cst_val_atom_struct {
#ifdef WORDS_BIGENDIAN
short ref_count;
short type; /* order is here important */
#else
short type; /* order is here important */
short ref_count;
#endif
union
{
float fval;
int ival;
void *vval;
} v;
} cst_val_atom;
typedef struct cst_val_struct {
union
{
cst_val_cons cc;
cst_val_atom a;
} c;
} cst_val;
typedef struct cst_val_def_struct {
const char *name;
void (*delete_function)(void *);
} cst_val_def;
/* Constructor functions */
cst_val *int_val(int i);
cst_val *float_val(float f);
cst_val *string_val(const char *s);
cst_val *val_new_typed(int type, void *vv);
cst_val *cons_val(const cst_val *a, const cst_val *b);
/* Derefence and delete val if no other references */
void delete_val(cst_val *val);
void delete_val_list(cst_val *val);
/* Accessor functions */
int val_int(const cst_val *v);
float val_float(const cst_val *v);
const char *val_string(const cst_val *v);
void *val_void(const cst_val *v);
void *val_generic(const cst_val *v, int type, const char *stype);
const cst_val *val_car(const cst_val *v);
const cst_val *val_cdr(const cst_val *v);
const cst_val *set_cdr(cst_val *v1, const cst_val *v2);
const cst_val *set_car(cst_val *v1, const cst_val *v2);
int cst_val_consp(const cst_val *v);
/* Unsafe accessor function -- for the brave and foolish */
#define CST_VAL_STRING_LVAL(X) ((X)->c.a.v.vval)
#define CST_VAL_TYPE(X) ((X)->c.a.type)
#define CST_VAL_INT(X) ((X)->c.a.v.ival)
#define CST_VAL_FLOAT(X) ((X)->c.a.v.fval)
#define CST_VAL_STRING(X) ((const char *)(CST_VAL_STRING_LVAL(X)))
#define CST_VAL_VOID(X) ((X)->c.a.v.vval)
#define CST_VAL_CAR(X) ((X)->c.cc.car)
#define CST_VAL_CDR(X) ((X)->c.cc.cdr)
#define CST_VAL_REFCOUNT(X) ((X)->c.a.ref_count)
/* Some standard function */
int val_equal(const cst_val *a, const cst_val *b);
int val_less(const cst_val *a, const cst_val *b);
int val_greater(const cst_val *a, const cst_val *b);
int val_member(const cst_val *a, const cst_val *b);
int val_member_string (const char *a, const cst_val *b);
int val_stringp(const cst_val *a);
const cst_val *val_assoc_string(const char *v1,const cst_val *al);
void val_print(cst_file fd,const cst_val *v);
cst_val *val_reverse(cst_val *v);
cst_val *val_append(cst_val *a,cst_val *b);
int val_length(const cst_val *l);
cst_val *cst_utf8_explode(const cst_string *utf8string);
cst_string *cst_implode(const cst_val *string_list);
/* make sure you know what you are doing before you call these */
int val_dec_refcount(const cst_val *b);
cst_val *val_inc_refcount(const cst_val *b);
#include "cst_val_const.h"
extern const cst_val_def cst_val_defs[];
/* Generic pointer vals */
typedef void cst_userdata;
CST_VAL_USER_TYPE_DCLS(userdata,cst_userdata)
#endif

View File

@ -0,0 +1,328 @@
/*************************************************************************/
/* */
/* Language Technologies Institute */
/* Carnegie Mellon University */
/* Copyright (c) 2001 */
/* All Rights Reserved. */
/* */
/* Permission is hereby granted, free of charge, to use and distribute */
/* this software and its documentation without restriction, including */
/* without limitation the rights to use, copy, modify, merge, publish, */
/* distribute, sublicense, and/or sell copies of this work, and to */
/* permit persons to whom this work is furnished to do so, subject to */
/* the following conditions: */
/* 1. The code must retain the above copyright notice, this list of */
/* conditions and the following disclaimer. */
/* 2. Any modifications must be clearly marked as such. */
/* 3. Original authors' names are not deleted. */
/* 4. The authors' names are not used to endorse or promote products */
/* derived from this software without specific prior written */
/* permission. */
/* */
/* CARNEGIE MELLON UNIVERSITY AND THE CONTRIBUTORS TO THIS WORK */
/* DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING */
/* ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT */
/* SHALL CARNEGIE MELLON UNIVERSITY NOR THE CONTRIBUTORS BE LIABLE */
/* FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES */
/* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN */
/* AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, */
/* ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF */
/* THIS SOFTWARE. */
/* */
/*************************************************************************/
/* Author: Alan W Black (awb@cs.cmu.edu) */
/* Date: January 2001 */
/*************************************************************************/
/* */
/* Const Vals, and macros to define them */
/* */
/* Before you give up in disgust bear with me on this. Every single */
/* line in this file has been *very* carefully decided on after much */
/* thought, experimentation and reading more specs of the C language */
/* than most people even thought existed. However inspite of that, the */
/* result is still unsatisfying from an elegance point of view but the */
/* given all the constraints this is probably the best compromise. */
/* */
/* This file offers macros for defining const cst_vals. I know many */
/* are already laughing at me for wanting runtime types on objects and */
/* will use this code as exemplars of why this should be done in C++, I */
/* say good luck to them with their 4M footprint while I go for my */
/* 50K footprint. But I *will* do cst_vals in 8 bytes and I *will* */
/* have them defined const so they are in the text segment */
/* */
/* The problem here is that there is not yet a standard way to do */
/* initialization of unions. There is one in the C99 standard and GCC */
/* already supports it, but other compilers do not so I can't use that */
/* */
/* So I need a way to make an object that will have the right 8 bytes */
/* for ints, floats, strings and cons cells that will work on any C */
/* compiler and will be of type const cst_val. That unfortunately */
/* isn't trivial. */
/* */
/* For the time being ignoring byte order, and address size, which */
/* will be ignored in the particular discuss (though dealt with below) */
/* I'd like to do something like */
/* */
/* const cst_val fredi = { CST_VAL_TYPE_INT,-1, 42 }; */
/* const cst_val fredf = { CST_VAL_TYPE_FLOAT,-1, 4.2 }; */
/* const cst_val freds = { CST_VAL_TYPE_STRING,-1, "42" }; */
/* */
/* Even if you accept warnings this isn't going to work, if you add */
/* extra {} you can get rid of some warnings but the fval/ival/ *vval */
/* part isn't going to work, the compiler *may* try to take the value */
/* and assign it using the type of the first field defined in the */
/* union. This could be made to work for ints and void* as pointers */
/* can be used as ints (even of 64 bit architectures) but the float */
/* isn't going to work. Casting will cause the float to be changed to */
/* an int by CPP which isn't what you want, what you want is that the */
/* four byte region gets filled with the four bytes that represent the */
/* float itself. Now you could get the four byte represention of the */
/* float and pretend that is an int (0xbfff9a4 for 4.2 on intel), that */
/* would work but that doesn't seem satifying and I'd need to have a */
/* preprocessor that could convert that. You could make atoms always */
/* have a pointer to another piece of memory, but that would take up */
/* another 4 bytes not just for these constants but all other cst_vals */
/* create */
/* */
/* So you could do */
/* */
/* const cst_val_int fredi = { CST_VAL_TYPE_INT,-1, 42 }; */
/* const cst_val_float fredf = { CST_VAL_TYPE_FLOAT,-1, 4.2 }; */
/* const cst_val_string freds = { CST_VAL_TYPE_STRING,-1, "42" }; */
/* */
/* Though that's a slippery slope I don't want to have these explicit */
/* new types, the first short defines the type perfectly adequately */
/* and the whole point of runtime types is that there is one object */
/* type. */
/* */
/* Well just initialize them at runtime, but, that isn't thread safe, */
/* slows down startup, requires a instance implicitly in the code and */
/* on the heap. As these are const, they should go in ROM. */
/* */
/* At this moment, I think the second version is the least problematic */
/* though it makes defining val_consts more unpleasant than they should */
/* be and forces changes elsewhere in the code even when the compiler */
/* does support initialization of unions */
/* */
/* */
/*************************************************************************/
#ifndef _CST_VAL_CONSTS_H__
#define _CST_VAL_CONSTS_H__
#include "cst_val_defs.h"
/* There is built-in int to string conversions here for numbers */
/* up to 20, note if you make this bigger you have to hand change */
/* other things too */
#define CST_CONST_INT_MAX 19
#ifndef NO_UNION_INITIALIZATION
/* This is the simple way when initialization of unions is supported */
#define DEF_CONST_VAL_INT(N,V) const cst_val N = {{.a={.type=CST_VAL_TYPE_INT,.ref_count=-1,.v={.ival=V}}}}
#define DEF_CONST_VAL_STRING(N,S) const cst_val N = {{.a={.type=CST_VAL_TYPE_STRING,.ref_count=-1,.v={.vval= (void *)S}}}}
#define DEF_CONST_VAL_FLOAT(N,F) const cst_val N = {{.a={.type=CST_VAL_TYPE_FLOAT,.ref_count=-1,.v={.fval=F}}}}
#define DEF_CONST_VAL_CONS(N,A,D) const cst_val N = {{.cc={.car=A,.cdr=D }}}
extern const cst_val val_int_0;
extern const cst_val val_int_1;
extern const cst_val val_int_2;
extern const cst_val val_int_3;
extern const cst_val val_int_4;
extern const cst_val val_int_5;
extern const cst_val val_int_6;
extern const cst_val val_int_7;
extern const cst_val val_int_8;
extern const cst_val val_int_9;
extern const cst_val val_int_10;
extern const cst_val val_int_11;
extern const cst_val val_int_12;
extern const cst_val val_int_13;
extern const cst_val val_int_14;
extern const cst_val val_int_15;
extern const cst_val val_int_16;
extern const cst_val val_int_17;
extern const cst_val val_int_18;
extern const cst_val val_int_19;
extern const cst_val val_string_0;
extern const cst_val val_string_1;
extern const cst_val val_string_2;
extern const cst_val val_string_3;
extern const cst_val val_string_4;
extern const cst_val val_string_5;
extern const cst_val val_string_6;
extern const cst_val val_string_7;
extern const cst_val val_string_8;
extern const cst_val val_string_9;
extern const cst_val val_string_10;
extern const cst_val val_string_11;
extern const cst_val val_string_12;
extern const cst_val val_string_13;
extern const cst_val val_string_14;
extern const cst_val val_string_15;
extern const cst_val val_string_16;
extern const cst_val val_string_17;
extern const cst_val val_string_18;
extern const cst_val val_string_19;
#else
/* Only GCC seems to currently support the C99 standard for giving */
/* explicit names for fields for initializing unions, because we want */
/* things to be const, and to be small structures this is really useful */
/* thus for compilers not supporting no_union_initization we use other */
/* structure that we know (hope ?) are the same size and use agressive */
/* casting. The goal here is wholly justified by the method here isn't */
/* pretty */
/* These structures are defined *solely* to get round initialization */
/* problems if you need to use these in any code you are using your are */
/* unquestionably doing the wrong thing */
typedef struct cst_val_atom_struct_float {
#ifdef WORDS_BIGENDIAN
short ref_count;
short type; /* order is here important */
#else
short type; /* order is here important */
short ref_count;
#endif
float fval;
} cst_val_float;
typedef struct cst_val_atom_struct_int {
#ifdef WORDS_BIGENDIAN
short ref_count;
short type; /* order is here important (and unintuitive) */
#else
short type; /* order is here important */
short ref_count;
#endif
int ival;
} cst_val_int;
typedef struct cst_val_atom_struct_void {
#ifdef WORDS_BIGENDIAN
short ref_count;
short type; /* order is here important */
#else
short type; /* order is here important */
short ref_count;
#endif
void *vval;
} cst_val_void;
#ifdef WORDS_BIGENDIAN
#define DEF_CONST_VAL_INT(N,V) const cst_val_int N={-1, CST_VAL_TYPE_INT, V}
#define DEF_CONST_VAL_STRING(N,S) const cst_val_void N={-1,CST_VAL_TYPE_STRING,(void *)S}
#define DEF_CONST_VAL_FLOAT(N,F) const cst_val_float N={-1,CST_VAL_TYPE_FLOAT,(float)F}
#else
#define DEF_CONST_VAL_INT(N,V) const cst_val_int N={CST_VAL_TYPE_INT,-1,V}
#define DEF_CONST_VAL_STRING(N,S) const cst_val_void N={CST_VAL_TYPE_STRING,-1,(void *)S}
#define DEF_CONST_VAL_FLOAT(N,F) const cst_val_float N={CST_VAL_TYPE_FLOAT,-1,(float)F}
#endif
#define DEF_CONST_VAL_CONS(N,A,D) const cst_val_cons N={A,D}
/* in the non-union intialization version we these consts have to be */
/* more typed than need, we'll cast the back later */
extern const cst_val_int val_int_0;
extern const cst_val_int val_int_1;
extern const cst_val_int val_int_2;
extern const cst_val_int val_int_3;
extern const cst_val_int val_int_4;
extern const cst_val_int val_int_5;
extern const cst_val_int val_int_6;
extern const cst_val_int val_int_7;
extern const cst_val_int val_int_8;
extern const cst_val_int val_int_9;
extern const cst_val_int val_int_10;
extern const cst_val_int val_int_11;
extern const cst_val_int val_int_12;
extern const cst_val_int val_int_13;
extern const cst_val_int val_int_14;
extern const cst_val_int val_int_15;
extern const cst_val_int val_int_16;
extern const cst_val_int val_int_17;
extern const cst_val_int val_int_18;
extern const cst_val_int val_int_19;
extern const cst_val_void val_string_0;
extern const cst_val_void val_string_1;
extern const cst_val_void val_string_2;
extern const cst_val_void val_string_3;
extern const cst_val_void val_string_4;
extern const cst_val_void val_string_5;
extern const cst_val_void val_string_6;
extern const cst_val_void val_string_7;
extern const cst_val_void val_string_8;
extern const cst_val_void val_string_9;
extern const cst_val_void val_string_10;
extern const cst_val_void val_string_11;
extern const cst_val_void val_string_12;
extern const cst_val_void val_string_13;
extern const cst_val_void val_string_14;
extern const cst_val_void val_string_15;
extern const cst_val_void val_string_16;
extern const cst_val_void val_string_17;
extern const cst_val_void val_string_18;
extern const cst_val_void val_string_19;
#endif
#define DEF_STATIC_CONST_VAL_INT(N,V) static DEF_CONST_VAL_INT(N,V)
#define DEF_STATIC_CONST_VAL_STRING(N,S) static DEF_CONST_VAL_STRING(N,S)
#define DEF_STATIC_CONST_VAL_FLOAT(N,F) static DEF_CONST_VAL_FLOAT(N,F)
#define DEF_STATIC_CONST_VAL_CONS(N,A,D) static DEF_CONST_VAL_CONS(N,A,D)
/* Some actual val consts */
/* The have casts as in the non-union intialize case the casts are necessary */
/* but in the union initial case these casts are harmless */
#define VAL_INT_0 (cst_val *)&val_int_0
#define VAL_INT_1 (cst_val *)&val_int_1
#define VAL_INT_2 (cst_val *)&val_int_2
#define VAL_INT_3 (cst_val *)&val_int_3
#define VAL_INT_4 (cst_val *)&val_int_4
#define VAL_INT_5 (cst_val *)&val_int_5
#define VAL_INT_6 (cst_val *)&val_int_6
#define VAL_INT_7 (cst_val *)&val_int_7
#define VAL_INT_8 (cst_val *)&val_int_8
#define VAL_INT_9 (cst_val *)&val_int_9
#define VAL_INT_10 (cst_val *)&val_int_10
#define VAL_INT_11 (cst_val *)&val_int_11
#define VAL_INT_12 (cst_val *)&val_int_12
#define VAL_INT_13 (cst_val *)&val_int_13
#define VAL_INT_14 (cst_val *)&val_int_14
#define VAL_INT_15 (cst_val *)&val_int_15
#define VAL_INT_16 (cst_val *)&val_int_16
#define VAL_INT_17 (cst_val *)&val_int_17
#define VAL_INT_18 (cst_val *)&val_int_18
#define VAL_INT_19 (cst_val *)&val_int_19
const cst_val *val_int_n(int n);
#define VAL_STRING_0 (cst_val *)&val_string_0
#define VAL_STRING_1 (cst_val *)&val_string_1
#define VAL_STRING_2 (cst_val *)&val_string_2
#define VAL_STRING_3 (cst_val *)&val_string_3
#define VAL_STRING_4 (cst_val *)&val_string_4
#define VAL_STRING_5 (cst_val *)&val_string_5
#define VAL_STRING_6 (cst_val *)&val_string_6
#define VAL_STRING_7 (cst_val *)&val_string_7
#define VAL_STRING_8 (cst_val *)&val_string_8
#define VAL_STRING_9 (cst_val *)&val_string_9
#define VAL_STRING_10 (cst_val *)&val_string_10
#define VAL_STRING_11 (cst_val *)&val_string_11
#define VAL_STRING_12 (cst_val *)&val_string_12
#define VAL_STRING_13 (cst_val *)&val_string_13
#define VAL_STRING_14 (cst_val *)&val_string_14
#define VAL_STRING_15 (cst_val *)&val_string_15
#define VAL_STRING_16 (cst_val *)&val_string_16
#define VAL_STRING_17 (cst_val *)&val_string_17
#define VAL_STRING_18 (cst_val *)&val_string_18
#define VAL_STRING_19 (cst_val *)&val_string_19
const cst_val *val_string_n(int n);
#endif

View File

@ -0,0 +1,112 @@
/*************************************************************************/
/* */
/* Language Technologies Institute */
/* Carnegie Mellon University */
/* Copyright (c) 1999 */
/* All Rights Reserved. */
/* */
/* Permission is hereby granted, free of charge, to use and distribute */
/* this software and its documentation without restriction, including */
/* without limitation the rights to use, copy, modify, merge, publish, */
/* distribute, sublicense, and/or sell copies of this work, and to */
/* permit persons to whom this work is furnished to do so, subject to */
/* the following conditions: */
/* 1. The code must retain the above copyright notice, this list of */
/* conditions and the following disclaimer. */
/* 2. Any modifications must be clearly marked as such. */
/* 3. Original authors' names are not deleted. */
/* 4. The authors' names are not used to endorse or promote products */
/* derived from this software without specific prior written */
/* permission. */
/* */
/* CARNEGIE MELLON UNIVERSITY AND THE CONTRIBUTORS TO THIS WORK */
/* DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING */
/* ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT */
/* SHALL CARNEGIE MELLON UNIVERSITY NOR THE CONTRIBUTORS BE LIABLE */
/* FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES */
/* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN */
/* AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, */
/* ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF */
/* THIS SOFTWARE. */
/* */
/*************************************************************************/
/* Author: Alan W Black (awb@cs.cmu.edu) */
/* Date: December 1999 */
/*************************************************************************/
/* */
/* Macros for user defined type objects */
/* */
/*************************************************************************/
#ifndef _CST_VAL_DEFS_H__
#define _CST_VAL_DEFS_H__
#include <stdlib.h>
/* Macro for defining new user structs as vals */
#define CST_VAL_USER_TYPE_DCLS(NAME,TYPE) \
extern const int cst_val_type_##NAME; \
TYPE *val_##NAME(const cst_val *v); \
cst_val *NAME##_val(const TYPE *v);
#define CST_VAL_USER_FUNCPTR_DCLS(NAME,TYPE) \
extern const int cst_val_type_##NAME; \
TYPE val_##NAME(const cst_val *v); \
cst_val *NAME##_val(const TYPE v);
#define CST_VAL_REGISTER_TYPE(NAME,TYPE) \
TYPE *val_##NAME(const cst_val *v) \
{ \
return (TYPE *)val_generic(v,cst_val_type_##NAME,#NAME); \
} \
void val_delete_##NAME(void *v) \
{ \
delete_##NAME((TYPE *)v); \
} \
\
cst_val *NAME##_val(const TYPE *v) \
{ \
return val_new_typed(cst_val_type_##NAME, \
(void *)v); \
} \
#define CST_VAL_REG_TD_TYPE(NAME,TYPE,NUM) \
extern const int cst_val_type_##NAME; \
const int cst_val_type_##NAME=NUM; \
void val_delete_##NAME(void *v); \
/* When objects of this type can never be owned by vals */
#define CST_VAL_REGISTER_TYPE_NODEL(NAME,TYPE) \
TYPE *val_##NAME(const cst_val *v) \
{ \
return (TYPE *)val_generic(v,cst_val_type_##NAME,#NAME); \
} \
\
cst_val *NAME##_val(const TYPE *v) \
{ \
return val_new_typed(cst_val_type_##NAME, \
(void *)v); \
} \
#define CST_VAL_REG_TD_TYPE_NODEL(NAME,TYPE,NUM) \
extern const int cst_val_type_##NAME; \
const int cst_val_type_##NAME=NUM; \
void val_delete_##NAME(void *v) { (void)v; } \
#define CST_VAL_REGISTER_FUNCPTR(NAME,TYPE) \
TYPE val_##NAME(const cst_val *v) \
{ \
return (TYPE)val_generic(v,cst_val_type_##NAME,#NAME); \
} \
\
cst_val *NAME##_val(const TYPE v) \
{ \
return val_new_typed(cst_val_type_##NAME, \
(void *)v); \
} \
#define CST_VAL_REG_TD_FUNCPTR(NAME,TYPE,NUM) \
extern const int cst_val_type_##NAME; \
const int cst_val_type_##NAME=NUM; \
void val_delete_##NAME(void *v) { (void)v; } \
#endif

View File

@ -0,0 +1,113 @@
/*************************************************************************/
/* */
/* Language Technologies Institute */
/* Carnegie Mellon University */
/* Copyright (c) 2000 */
/* All Rights Reserved. */
/* */
/* Permission is hereby granted, free of charge, to use and distribute */
/* this software and its documentation without restriction, including */
/* without limitation the rights to use, copy, modify, merge, publish, */
/* distribute, sublicense, and/or sell copies of this work, and to */
/* permit persons to whom this work is furnished to do so, subject to */
/* the following conditions: */
/* 1. The code must retain the above copyright notice, this list of */
/* conditions and the following disclaimer. */
/* 2. Any modifications must be clearly marked as such. */
/* 3. Original authors' names are not deleted. */
/* 4. The authors' names are not used to endorse or promote products */
/* derived from this software without specific prior written */
/* permission. */
/* */
/* CARNEGIE MELLON UNIVERSITY AND THE CONTRIBUTORS TO THIS WORK */
/* DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING */
/* ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT */
/* SHALL CARNEGIE MELLON UNIVERSITY NOR THE CONTRIBUTORS BE LIABLE */
/* FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES */
/* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN */
/* AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, */
/* ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF */
/* THIS SOFTWARE. */
/* */
/*************************************************************************/
/* Author: Alan W Black (awb@cs.cmu.edu) */
/* Date: August 2000 */
/*************************************************************************/
/* */
/* Viterbi support */
/* */
/*************************************************************************/
#ifndef _CST_VITERBI_H__
#define _CST_VITERBI_H__
#include "cst_file.h"
#include "cst_math.h"
#include "cst_utterance.h"
typedef struct cst_vit_cand_struct {
int score;
cst_val *val;
int ival, pos;
cst_item *item;
struct cst_vit_cand_struct *next;
} cst_vit_cand;
cst_vit_cand *new_vit_cand();
void vit_cand_set(cst_vit_cand *vc, cst_val *val);
void vit_cand_set_int(cst_vit_cand *vc, int ival);
void delete_vit_cand(cst_vit_cand *vc);
typedef struct cst_vit_path_struct {
int score;
int state;
cst_vit_cand *cand;
cst_features *f;
struct cst_vit_path_struct *from;
struct cst_vit_path_struct *next;
} cst_vit_path;
cst_vit_path *new_vit_path();
void delete_vit_path(cst_vit_path *vp);
typedef struct cst_vit_point_struct {
cst_item *item;
int num_states;
int num_paths;
cst_vit_cand *cands;
cst_vit_path *paths;
cst_vit_path **state_paths;
struct cst_vit_point_struct *next;
} cst_vit_point;
cst_vit_point *new_vit_point();
void delete_vit_point(cst_vit_point *vp);
struct cst_viterbi_struct;
/* Functions for user call back, to find candiates at a point, and
to join (and score) paths */
typedef cst_vit_cand *(cst_vit_cand_f_t)(cst_item *s,
struct cst_viterbi_struct *vd);
typedef cst_vit_path *(cst_vit_path_f_t)(cst_vit_path *p,
cst_vit_cand *c,
struct cst_viterbi_struct *vd);
typedef struct cst_viterbi_struct {
int num_states;
cst_vit_cand_f_t *cand_func;
cst_vit_path_f_t *path_func;
int big_is_good;
cst_vit_point *timeline;
cst_vit_point *last_point;
cst_features *f;
} cst_viterbi;
cst_viterbi *new_viterbi(cst_vit_cand_f_t *cand_func,
cst_vit_path_f_t *path_func);
void delete_viterbi(cst_viterbi *vd);
void viterbi_initialise(cst_viterbi *vd,cst_relation *r);
void viterbi_decode(cst_viterbi *vd);
int viterbi_result(cst_viterbi *vd, const char *n);
void viterbi_copy_feature(cst_viterbi *vd,const char *featname);
#endif

View File

@ -0,0 +1,69 @@
/*************************************************************************/
/* */
/* Language Technologies Institute */
/* Carnegie Mellon University */
/* Copyright (c) 1999 */
/* All Rights Reserved. */
/* */
/* Permission is hereby granted, free of charge, to use and distribute */
/* this software and its documentation without restriction, including */
/* without limitation the rights to use, copy, modify, merge, publish, */
/* distribute, sublicense, and/or sell copies of this work, and to */
/* permit persons to whom this work is furnished to do so, subject to */
/* the following conditions: */
/* 1. The code must retain the above copyright notice, this list of */
/* conditions and the following disclaimer. */
/* 2. Any modifications must be clearly marked as such. */
/* 3. Original authors' names are not deleted. */
/* 4. The authors' names are not used to endorse or promote products */
/* derived from this software without specific prior written */
/* permission. */
/* */
/* CARNEGIE MELLON UNIVERSITY AND THE CONTRIBUTORS TO THIS WORK */
/* DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING */
/* ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT */
/* SHALL CARNEGIE MELLON UNIVERSITY NOR THE CONTRIBUTORS BE LIABLE */
/* FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES */
/* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN */
/* AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, */
/* ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF */
/* THIS SOFTWARE. */
/* */
/*************************************************************************/
/* Author: Alan W Black (awb@cs.cmu.edu) */
/* Date: December 2000 */
/*************************************************************************/
/* */
/* Voice functions */
/* */
/*************************************************************************/
#ifndef _CST_VOICE_H__
#define _CST_VOICE_H__
#include "cst_file.h"
#include "cst_val.h"
#include "cst_features.h"
#include "cst_utterance.h"
#include "cst_relation.h"
struct cst_voice_struct {
const char *name;
cst_features *features;
cst_features *ffunctions;
/* This hook is called (from utt_init()) after the input text (if
any) has been set and voice features have been copied in, but
before synthesis. */
cst_utterance *(*utt_init)(cst_utterance *u,
struct cst_voice_struct *v);
};
typedef struct cst_voice_struct cst_voice;
/* Constructor functions */
cst_voice *new_voice();
void delete_voice(cst_voice *u);
CST_VAL_USER_TYPE_DCLS(voice,cst_voice)
#endif

View File

@ -0,0 +1,158 @@
/*************************************************************************/
/* */
/* Language Technologies Institute */
/* Carnegie Mellon University */
/* Copyright (c) 1999 */
/* All Rights Reserved. */
/* */
/* Permission is hereby granted, free of charge, to use and distribute */
/* this software and its documentation without restriction, including */
/* without limitation the rights to use, copy, modify, merge, publish, */
/* distribute, sublicense, and/or sell copies of this work, and to */
/* permit persons to whom this work is furnished to do so, subject to */
/* the following conditions: */
/* 1. The code must retain the above copyright notice, this list of */
/* conditions and the following disclaimer. */
/* 2. Any modifications must be clearly marked as such. */
/* 3. Original authors' names are not deleted. */
/* 4. The authors' names are not used to endorse or promote products */
/* derived from this software without specific prior written */
/* permission. */
/* */
/* CARNEGIE MELLON UNIVERSITY AND THE CONTRIBUTORS TO THIS WORK */
/* DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING */
/* ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT */
/* SHALL CARNEGIE MELLON UNIVERSITY NOR THE CONTRIBUTORS BE LIABLE */
/* FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES */
/* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN */
/* AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, */
/* ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF */
/* THIS SOFTWARE. */
/* */
/*************************************************************************/
/* Author: Alan W Black (awb@cs.cmu.edu) */
/* Date: August 2000 */
/*************************************************************************/
/* */
/* Waveforms */
/* */
/*************************************************************************/
#ifndef _CST_WAVE_H__
#define _CST_WAVE_H__
#include "cst_file.h"
#include "cst_error.h"
#include "cst_alloc.h"
#include "cst_endian.h"
#include "cst_file.h"
#include "cst_val.h"
typedef struct cst_wave_struct {
const char *type;
int sample_rate;
int num_samples;
int num_channels;
short *samples;
} cst_wave;
typedef struct cst_wave_header_struct {
const char *type;
int hsize;
int num_bytes;
int sample_rate;
int num_samples;
int num_channels;
} cst_wave_header;
cst_wave *new_wave();
cst_wave *copy_wave(const cst_wave *w);
void delete_wave(cst_wave *val);
cst_wave *concat_wave(cst_wave *dest, const cst_wave *src);
#define cst_wave_num_samples(w) (w?w->num_samples:0)
#define cst_wave_num_channels(w) (w?w->num_channels:0)
#define cst_wave_sample_rate(w) (w?w->sample_rate:0)
#define cst_wave_samples(w) (w->samples)
#define cst_wave_set_num_samples(w,s) w->num_samples=s
#define cst_wave_set_num_channels(w,s) w->num_channels=s
#define cst_wave_set_sample_rate(w,s) w->sample_rate=s
int cst_wave_save(cst_wave *w, const char *filename, const char *type);
int cst_wave_save_riff(cst_wave *w, const char *filename);
int cst_wave_save_raw(cst_wave *w, const char *filename);
int cst_wave_append_riff(cst_wave *w,const char *filename);
int cst_wave_save_riff_fd(cst_wave *w, cst_file fd);
int cst_wave_save_raw_fd(cst_wave *w, cst_file fd);
int cst_wave_load(cst_wave *w, const char *filename, const char *type);
int cst_wave_load_riff(cst_wave *w, const char *filename);
int cst_wave_load_raw(cst_wave *w, const char *filename,
const char *bo, int sample_rate);
int cst_wave_load_riff_header(cst_wave_header *header,cst_file fd);
int cst_wave_load_riff_fd(cst_wave *w, cst_file fd);
int cst_wave_load_raw_fd (cst_wave *w, cst_file fd,
const char *bo, int sample_rate);
void cst_wave_resize(cst_wave *w,int samples, int num_channels);
void cst_wave_resample(cst_wave *w, int sample_rate);
void cst_wave_rescale(cst_wave *w, int factor);
/* Resampling code */
typedef struct cst_rateconv_struct {
int channels; /* what do you think? */
int up, down; /* up/down sampling ratio */
double gain; /* output gain */
int lag; /* lag time (in samples) */
int *sin, *sout, *coep; /* filter buffers, coefficients */
/* n.b. outsize is the minimum buffer size for
cst_rateconv_out() when streaming */
int insize, outsize; /* size of filter buffers */
int incount; /* amount of input data */
int len; /* size of filter */
/* internal foo coefficients */
double fsin, fgk, fgg;
/* internal counters */
int inbaseidx, inoffset, cycctr, outidx;
} cst_rateconv;
cst_rateconv * new_rateconv(int up, int down, int channels);
void delete_rateconv(cst_rateconv *filt);
int cst_rateconv_in(cst_rateconv *filt, const short *inptr, int max);
int cst_rateconv_leadout(cst_rateconv *filt);
int cst_rateconv_out(cst_rateconv *filt, short *outptr, int max);
/* File format cruft. */
#define RIFF_FORMAT_PCM 0x0001
#define RIFF_FORMAT_ADPCM 0x0002
#define RIFF_FORMAT_MULAW 0x0006
#define RIFF_FORMAT_ALAW 0x0007
/* Sun/Next header, short and sweet, note its always BIG_ENDIAN though */
typedef struct {
unsigned int magic; /* magic number */
unsigned int hdr_size; /* size of this header */
int data_size; /* length of data (optional) */
unsigned int encoding; /* data encoding format */
unsigned int sample_rate; /* samples per second */
unsigned int channels; /* number of interleaved channels */
} snd_header;
#define CST_SND_MAGIC (unsigned int)0x2e736e64
#define CST_SND_ULAW 1
#define CST_SND_UCHAR 2
#define CST_SND_SHORT 3
/* Convertion functions */
unsigned char cst_short_to_ulaw(short sample);
short cst_ulaw_to_short(unsigned char ulawbyte);
CST_VAL_USER_TYPE_DCLS(wave,cst_wave)
#endif

View File

@ -0,0 +1,50 @@
/*************************************************************************/
/* */
/* Language Technologies Institute */
/* Carnegie Mellon University */
/* Copyright (c) 2008 */
/* All Rights Reserved. */
/* */
/* Permission is hereby granted, free of charge, to use and distribute */
/* this software and its documentation without restriction, including */
/* without limitation the rights to use, copy, modify, merge, publish, */
/* distribute, sublicense, and/or sell copies of this work, and to */
/* permit persons to whom this work is furnished to do so, subject to */
/* the following conditions: */
/* 1. The code must retain the above copyright notice, this list of */
/* conditions and the following disclaimer. */
/* 2. Any modifications must be clearly marked as such. */
/* 3. Original authors' names are not deleted. */
/* 4. The authors' names are not used to endorse or promote products */
/* derived from this software without specific prior written */
/* permission. */
/* */
/* CARNEGIE MELLON UNIVERSITY AND THE CONTRIBUTORS TO THIS WORK */
/* DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING */
/* ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT */
/* SHALL CARNEGIE MELLON UNIVERSITY NOR THE CONTRIBUTORS BE LIABLE */
/* FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES */
/* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN */
/* AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, */
/* ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF */
/* THIS SOFTWARE. */
/* */
/*************************************************************************/
/* Author: Alan W Black (awb@cs.cmu.edu) */
/* Date: June 2008 */
/*************************************************************************/
/* */
/* WCHAR functions */
/* */
/*************************************************************************/
#ifndef __CST_WCHAR_H__
#define __CST_WCHAR_H__
#include <wchar.h>
wchar_t *cst_cstr2wstr(const char *s);
char *cst_wstr2cstr(const wchar_t *s);
#define cst_wstrlen(X) wcslen(X)
#endif

View File

@ -0,0 +1,123 @@
/*************************************************************************/
/* */
/* Language Technologies Institute */
/* Carnegie Mellon University */
/* Copyright (c) 1999 */
/* All Rights Reserved. */
/* */
/* Permission is hereby granted, free of charge, to use and distribute */
/* this software and its documentation without restriction, including */
/* without limitation the rights to use, copy, modify, merge, publish, */
/* distribute, sublicense, and/or sell copies of this work, and to */
/* permit persons to whom this work is furnished to do so, subject to */
/* the following conditions: */
/* 1. The code must retain the above copyright notice, this list of */
/* conditions and the following disclaimer. */
/* 2. Any modifications must be clearly marked as such. */
/* 3. Original authors' names are not deleted. */
/* 4. The authors' names are not used to endorse or promote products */
/* derived from this software without specific prior written */
/* permission. */
/* */
/* CARNEGIE MELLON UNIVERSITY AND THE CONTRIBUTORS TO THIS WORK */
/* DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING */
/* ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT */
/* SHALL CARNEGIE MELLON UNIVERSITY NOR THE CONTRIBUTORS BE LIABLE */
/* FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES */
/* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN */
/* AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, */
/* ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF */
/* THIS SOFTWARE. */
/* */
/*************************************************************************/
/* Author: Alan W Black (awb@cs.cmu.edu) */
/* Date: December 1999 */
/*************************************************************************/
/* */
/* Light weight run-time speech synthesis system, public API */
/* */
/*************************************************************************/
#ifndef _FLITE_H__
#define _FLITE_H__
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
#include "cst_string.h"
#include "cst_regex.h"
#include "cst_val.h"
#include "cst_features.h"
#include "cst_item.h"
#include "cst_relation.h"
#include "cst_utterance.h"
#include "cst_wave.h"
#include "cst_track.h"
#include "cst_cart.h"
#include "cst_phoneset.h"
#include "cst_voice.h"
#include "cst_audio.h"
#include "cst_utt_utils.h"
#include "cst_lexicon.h"
#include "cst_synth.h"
#include "cst_units.h"
#include "cst_tokenstream.h"
extern cst_val *flite_voice_list;
/* Public functions */
int flite_init();
/* General top level functions */
cst_voice *flite_voice_select(const char *name);
float flite_file_to_speech(const char *filename,
cst_voice *voice,
const char *outtype);
float flite_text_to_speech(const char *text,
cst_voice *voice,
const char *outtype);
float flite_phones_to_speech(const char *text,
cst_voice *voice,
const char *outtype);
float flite_ssml_to_speech(const char *filename,
cst_voice *voice,
const char *outtype);
int flite_voice_add_lex_addenda(cst_voice *v, const cst_string *lexfile);
/* Lower lever user functions */
cst_wave *flite_text_to_wave(const char *text,cst_voice *voice);
cst_utterance *flite_synth_text(const char *text,cst_voice *voice);
cst_utterance *flite_synth_phones(const char *phones,cst_voice *voice);
cst_utterance *flite_do_synth(cst_utterance *u,
cst_voice *voice,
cst_uttfunc synth);
float flite_process_output(cst_utterance *u,
const char *outtype,
int append);
/* flite public export wrappers for features access */
int flite_get_param_int(const cst_features *f, const char *name,int def);
float flite_get_param_float(const cst_features *f, const char *name, float def);
const char *flite_get_param_string(const cst_features *f, const char *name, const char *def);
const cst_val *flite_get_param_val(const cst_features *f, const char *name, cst_val *def);
void flite_feat_set_int(cst_features *f, const char *name, int v);
void flite_feat_set_float(cst_features *f, const char *name, float v);
void flite_feat_set_string(cst_features *f, const char *name, const char *v);
void flite_feat_set(cst_features *f, const char *name,const cst_val *v);
int flite_feat_remove(cst_features *f, const char *name);
const char *flite_ffeature_string(const cst_item *item,const char *featpath);
int flite_ffeature_int(const cst_item *item,const char *featpath);
float flite_ffeature_float(const cst_item *item,const char *featpath);
const cst_val *flite_ffeature(const cst_item *item,const char *featpath);
cst_item* flite_path_to_item(const cst_item *item,const char *featpath);
#ifdef __cplusplus
} /* extern "C" */
#endif /* __cplusplus */
#endif

251
lib/flite-1.4/install-sh Normal file
View File

@ -0,0 +1,251 @@
#!/bin/sh
#
# install - install a program, script, or datafile
# This comes from X11R5 (mit/util/scripts/install.sh).
#
# Copyright 1991 by the Massachusetts Institute of Technology
#
# Permission to use, copy, modify, distribute, and sell this software and its
# documentation for any purpose is hereby granted without fee, provided that
# the above copyright notice appear in all copies and that both that
# copyright notice and this permission notice appear in supporting
# documentation, and that the name of M.I.T. not be used in advertising or
# publicity pertaining to distribution of the software without specific,
# written prior permission. M.I.T. makes no representations about the
# suitability of this software for any purpose. It is provided "as is"
# without express or implied warranty.
#
# Calling this script install-sh is preferred over install.sh, to prevent
# `make' implicit rules from creating a file called install from it
# when there is no Makefile.
#
# This script is compatible with the BSD install script, but was written
# from scratch. It can only install one file at a time, a restriction
# shared with many OS's install programs.
# set DOITPROG to echo to test this script
# Don't use :- since 4.3BSD and earlier shells don't like it.
doit="${DOITPROG-}"
# put in absolute paths if you don't have them in your path; or use env. vars.
mvprog="${MVPROG-mv}"
cpprog="${CPPROG-cp}"
chmodprog="${CHMODPROG-chmod}"
chownprog="${CHOWNPROG-chown}"
chgrpprog="${CHGRPPROG-chgrp}"
stripprog="${STRIPPROG-strip}"
rmprog="${RMPROG-rm}"
mkdirprog="${MKDIRPROG-mkdir}"
transformbasename=""
transform_arg=""
instcmd="$mvprog"
chmodcmd="$chmodprog 0755"
chowncmd=""
chgrpcmd=""
stripcmd=""
rmcmd="$rmprog -f"
mvcmd="$mvprog"
src=""
dst=""
dir_arg=""
while [ x"$1" != x ]; do
case $1 in
-c) instcmd="$cpprog"
shift
continue;;
-d) dir_arg=true
shift
continue;;
-m) chmodcmd="$chmodprog $2"
shift
shift
continue;;
-o) chowncmd="$chownprog $2"
shift
shift
continue;;
-g) chgrpcmd="$chgrpprog $2"
shift
shift
continue;;
-s) stripcmd="$stripprog"
shift
continue;;
-t=*) transformarg=`echo $1 | sed 's/-t=//'`
shift
continue;;
-b=*) transformbasename=`echo $1 | sed 's/-b=//'`
shift
continue;;
*) if [ x"$src" = x ]
then
src=$1
else
# this colon is to work around a 386BSD /bin/sh bug
:
dst=$1
fi
shift
continue;;
esac
done
if [ x"$src" = x ]
then
echo "install: no input file specified"
exit 1
else
true
fi
if [ x"$dir_arg" != x ]; then
dst=$src
src=""
if [ -d $dst ]; then
instcmd=:
chmodcmd=""
else
instcmd=mkdir
fi
else
# Waiting for this to be detected by the "$instcmd $src $dsttmp" command
# might cause directories to be created, which would be especially bad
# if $src (and thus $dsttmp) contains '*'.
if [ -f $src -o -d $src ]
then
true
else
echo "install: $src does not exist"
exit 1
fi
if [ x"$dst" = x ]
then
echo "install: no destination specified"
exit 1
else
true
fi
# If destination is a directory, append the input filename; if your system
# does not like double slashes in filenames, you may need to add some logic
if [ -d $dst ]
then
dst="$dst"/`basename $src`
else
true
fi
fi
## this sed command emulates the dirname command
dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
# Make sure that the destination directory exists.
# this part is taken from Noah Friedman's mkinstalldirs script
# Skip lots of stat calls in the usual case.
if [ ! -d "$dstdir" ]; then
defaultIFS='
'
IFS="${IFS-${defaultIFS}}"
oIFS="${IFS}"
# Some sh's can't handle IFS=/ for some reason.
IFS='%'
set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'`
IFS="${oIFS}"
pathcomp=''
while [ $# -ne 0 ] ; do
pathcomp="${pathcomp}${1}"
shift
if [ ! -d "${pathcomp}" ] ;
then
$mkdirprog "${pathcomp}"
else
true
fi
pathcomp="${pathcomp}/"
done
fi
if [ x"$dir_arg" != x ]
then
$doit $instcmd $dst &&
if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else true ; fi &&
if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else true ; fi &&
if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else true ; fi &&
if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else true ; fi
else
# If we're going to rename the final executable, determine the name now.
if [ x"$transformarg" = x ]
then
dstfile=`basename $dst`
else
dstfile=`basename $dst $transformbasename |
sed $transformarg`$transformbasename
fi
# don't allow the sed command to completely eliminate the filename
if [ x"$dstfile" = x ]
then
dstfile=`basename $dst`
else
true
fi
# Make a temp file name in the proper directory.
dsttmp=$dstdir/#inst.$$#
# Move or copy the file name to the temp name
$doit $instcmd $src $dsttmp &&
trap "rm -f ${dsttmp}" 0 &&
# and set any options; do chmod last to preserve setuid bits
# If any of these fail, we abort the whole thing. If we want to
# ignore errors from any of these, just make sure not to ignore
# errors from the above "$doit $instcmd $src $dsttmp" command.
if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else true;fi &&
if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else true;fi &&
if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else true;fi &&
if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else true;fi &&
# Now rename the file to the real destination.
$doit $rmcmd -f $dstdir/$dstfile &&
$doit $mvcmd $dsttmp $dstdir/$dstfile
fi &&
exit 0

View File

@ -0,0 +1,47 @@
###########################################################################
## ##
## Language Technologies Institute ##
## Carnegie Mellon University ##
## Copyright (c) 2000 ##
## All Rights Reserved. ##
## ##
## Permission is hereby granted, free of charge, to use and distribute ##
## this software and its documentation without restriction, including ##
## without limitation the rights to use, copy, modify, merge, publish, ##
## distribute, sublicense, and/or sell copies of this work, and to ##
## permit persons to whom this work is furnished to do so, subject to ##
## the following conditions: ##
## 1. The code must retain the above copyright notice, this list of ##
## conditions and the following disclaimer. ##
## 2. Any modifications must be clearly marked as such. ##
## 3. Original authors' names are not deleted. ##
## 4. The authors' names are not used to endorse or promote products ##
## derived from this software without specific prior written ##
## permission. ##
## ##
## CARNEGIE MELLON UNIVERSITY AND THE CONTRIBUTORS TO THIS WORK ##
## DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ##
## ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT ##
## SHALL CARNEGIE MELLON UNIVERSITY NOR THE CONTRIBUTORS BE LIABLE ##
## FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES ##
## WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN ##
## AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ##
## ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF ##
## THIS SOFTWARE. ##
## ##
###########################################################################
## ##
## Language/Lex/Voice specific models/functions ##
## ##
###########################################################################
TOP=..
DIRNAME=lang
# But only the build the ones we are interested in in this configuration
BUILD_DIRS = $(LEXES) $(LANGS) $(VOXES)
ALL_DIRS= $(BUILD_DIRS)
FILES = Makefile $(SCM) $(SRCS)
ALL = $(BUILD_DIRS)
include $(TOP)/config/common_make_rules

View File

@ -0,0 +1,60 @@
###########################################################################
## ##
## Language Technologies Institute ##
## Carnegie Mellon University ##
## Copyright (c) 2000 ##
## All Rights Reserved. ##
## ##
## Permission is hereby granted, free of charge, to use and distribute ##
## this software and its documentation without restriction, including ##
## without limitation the rights to use, copy, modify, merge, publish, ##
## distribute, sublicense, and/or sell copies of this work, and to ##
## permit persons to whom this work is furnished to do so, subject to ##
## the following conditions: ##
## 1. The code must retain the above copyright notice, this list of ##
## conditions and the following disclaimer. ##
## 2. Any modifications must be clearly marked as such. ##
## 3. Original authors' names are not deleted. ##
## 4. The authors' names are not used to endorse or promote products ##
## derived from this software without specific prior written ##
## permission. ##
## ##
## CARNEGIE MELLON UNIVERSITY AND THE CONTRIBUTORS TO THIS WORK ##
## DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ##
## ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT ##
## SHALL CARNEGIE MELLON UNIVERSITY NOR THE CONTRIBUTORS BE LIABLE ##
## FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES ##
## WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN ##
## AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ##
## ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF ##
## THIS SOFTWARE. ##
## ##
###########################################################################
## ##
## CMULEX ##
## ##
###########################################################################
TOP=../..
DIRNAME=lang/cmulex
BUILD_DIRS =
ALL_DIRS=
H = cmu_lts_model.h cmu_lex.h
SRCS = cmu_lts_rules.c cmu_lts_model.c \
cmu_lex.c cmu_lex_entries.c cmu_lex_data.c cmu_postlex.c
LEX_DATA_INCLUDES = cmu_lex_data_raw.c cmu_lex_num_bytes.c \
cmu_lex_phones_huff_table.c cmu_lex_entries_huff_table.c \
OBJS = $(SRCS:.c=.o)
SCRIPTS=make_cmulex
SCM=
WINDOWS = libflite-cmulex.vcproj
FILES = Makefile $(SCM) $(SRCS) $(H) $(SCRIPTS) $(LEX_DATA_INCLUDES) $(WINDOWS)
LIBNAME = flite_cmulex
LOCAL_INCLUDES = $(LEXDEFS)
ALL =
include $(TOP)/config/common_make_rules

View File

@ -0,0 +1,374 @@
/*************************************************************************/
/* */
/* Language Technologies Institute */
/* Carnegie Mellon University */
/* Copyright (c) 2001 */
/* All Rights Reserved. */
/* */
/* Permission is hereby granted, free of charge, to use and distribute */
/* this software and its documentation without restriction, including */
/* without limitation the rights to use, copy, modify, merge, publish, */
/* distribute, sublicense, and/or sell copies of this work, and to */
/* permit persons to whom this work is furnished to do so, subject to */
/* the following conditions: */
/* 1. The code must retain the above copyright notice, this list of */
/* conditions and the following disclaimer. */
/* 2. Any modifications must be clearly marked as such. */
/* 3. Original authors' names are not deleted. */
/* 4. The authors' names are not used to endorse or promote products */
/* derived from this software without specific prior written */
/* permission. */
/* */
/* CARNEGIE MELLON UNIVERSITY AND THE CONTRIBUTORS TO THIS WORK */
/* DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING */
/* ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT */
/* SHALL CARNEGIE MELLON UNIVERSITY NOR THE CONTRIBUTORS BE LIABLE */
/* FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES */
/* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN */
/* AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, */
/* ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF */
/* THIS SOFTWARE. */
/* */
/*************************************************************************/
/* Author: Alan W Black (awb@cs.cmu.edu) */
/* Date: January 2001 */
/*************************************************************************/
/* */
/* CMU Lexicon definition */
/* */
/*************************************************************************/
#include "flite.h"
#include "cmu_lex.h"
extern const int cmu_lex_entry[];
extern const unsigned char cmu_lex_data[];
extern const int cmu_lex_num_entries;
extern const int cmu_lex_num_bytes;
extern const char * const cmu_lex_phone_table[54];
extern const char * const cmu_lex_phones_huff_table[];
extern const char * const cmu_lex_entries_huff_table[];
static int cmu_is_vowel(const char *p);
static int cmu_is_silence(const char *p);
static int cmu_has_vowel_in_list(const cst_val *v);
static int cmu_has_vowel_in_syl(const cst_item *i);
static int cmu_sonority(const char *p);
static const char * const addenda0[] = { "p,", NULL };
static const char * const addenda1[] = { "p.", NULL };
static const char * const addenda2[] = { "p(", NULL };
static const char * const addenda3[] = { "p)", NULL };
static const char * const addenda4[] = { "p[", NULL };
static const char * const addenda5[] = { "p]", NULL };
static const char * const addenda6[] = { "p{", NULL };
static const char * const addenda7[] = { "p}", NULL };
static const char * const addenda8[] = { "p:", NULL };
static const char * const addenda9[] = { "p;", NULL };
static const char * const addenda10[] = { "p?", NULL};
static const char * const addenda11[] = { "p!", NULL };
static const char * const addenda12[] = { "n@", "ae1", "t", NULL };
static const char * const addenda13[] = { "n#", "hh", "ae1","sh", NULL };
static const char * const addenda14[] = { "n$", "d", "aa1", "l", "er", NULL };
static const char * const addenda15[] = { "n%", "p", "er", "s", "eh1", "n", "t", NULL };
static const char * const addenda16[] = { "n^", "k", "eh1", "r", "eh1", "t", NULL };
static const char * const addenda17[] = { "n&","ae1","m","p","er","s","ae1","n","d", NULL };
static const char * const addenda18[] = { "n*","ae1","s","t","er","ih1","s","k",NULL };
static const char * const addenda19[] = { "n|","b","aa1","r",NULL };
static const char * const addenda20[] = { "n\\","b","ae1","k","s","l","ae1","sh",NULL };
static const char * const addenda21[] = { "n=","iy1","k","w","ax","l","z",NULL};
static const char * const addenda22[] = { "n+","p","l","ah1","s",NULL};
static const char * const addenda23[] = { "n~","t","ih1","l","d","ax",NULL};
static const char * const addenda24[] = { "p'",NULL};
static const char * const addenda25[] = { "p`",NULL};
static const char * const addenda26[] = { "p\"",NULL};
static const char * const addenda27[] = { "p-",NULL};
static const char * const addenda28[] = { "p<",NULL};
static const char * const addenda29[] = { "p>",NULL};
static const char * const addenda30[] = { "n_","ah1","n","d","er","s","k","ao1","r",NULL};
static const char * const addenda31[] = { "s's","z",NULL};
static const char * const addenda32[] = { "nim","ay1","m",NULL};
static const char * const addenda33[] = { "vdoesnt","d","ah1","z","n","t",NULL};
static const char * const addenda34[] = { "vyoull","y","uw1","l",NULL};
static const char * const addenda35[] = { "n/","s","l","ae1","sh",NULL};
static const char * const addenda36[] = { "nin","ih","n",NULL};
static const char * const addenda37[] = { "nto","t","ax",NULL};
static const char * const addenda38[] = { "n_a","ey",NULL};
static const char * const addenda39[] = { "vhavent","hh","ae1","v","ax","n","t",NULL};
static const char * const * const addenda[] = {
addenda0,
addenda1,
addenda2,
addenda3,
addenda4,
addenda5,
addenda6,
addenda7,
addenda8,
addenda9,
addenda10,
addenda11,
addenda12,
addenda13,
addenda14,
addenda15,
addenda16,
addenda17,
addenda18,
addenda19,
addenda20,
addenda21,
addenda22,
addenda23,
addenda24,
addenda25,
addenda26,
addenda27,
addenda28,
addenda29,
addenda30,
addenda31,
addenda32,
addenda33,
addenda34,
addenda35,
addenda36,
addenda37,
addenda38,
addenda39,
NULL };
static int cmu_is_silence(const char *p)
{
if (cst_streq(p,"pau"))
return TRUE;
else
return FALSE;
}
static int cmu_has_vowel_in_list(const cst_val *v)
{
const cst_val *t;
for (t=v; t; t=val_cdr(t))
if (cmu_is_vowel(val_string(val_car(t))))
return TRUE;
return FALSE;
}
static int cmu_has_vowel_in_syl(const cst_item *i)
{
const cst_item *n;
for (n=i; n; n=item_prev(n))
if (cmu_is_vowel(item_feat_string(n,"name")))
return TRUE;
return FALSE;
}
static int cmu_is_vowel(const char *p)
{
/* this happens to work for US English phoneset */
if (strchr("aeiou",p[0]) == NULL)
return FALSE;
else
return TRUE;
}
static int cmu_sonority(const char *p)
{
/* A bunch of hacks for US English phoneset */
if (cmu_is_vowel(p) || (cmu_is_silence(p)))
return 5;
else if (strchr("wylr",p[0]) != NULL)
return 4; /* glides/liquids */
else if (strchr("nm",p[0]) != NULL)
return 3; /* nasals */
else if (strchr("bdgjlmnnnrvwyz",p[0]) != NULL)
return 2; /* voiced obstruents */
else
return 1;
}
int cmu_syl_boundary(const cst_item *i,const cst_val *rest)
{
/* Returns TRUE if this should be a syllable boundary */
/* This is of course phone set dependent */
int p, n, nn;
if (rest == NULL)
return TRUE;
else if (cmu_is_silence(val_string(val_car(rest))))
return TRUE;
else if (!cmu_has_vowel_in_list(rest)) /* no more vowels so rest *all* coda */
return FALSE;
else if (!cmu_has_vowel_in_syl(i)) /* need a vowel */
return FALSE;
else if (cmu_is_vowel(val_string(val_car(rest))))
return TRUE;
else if (val_cdr(rest) == NULL)
return FALSE;
else
{ /* so there is following vowel, and multiple phones left */
p = cmu_sonority(item_feat_string(i,"name"));
n = cmu_sonority(val_string(val_car(rest)));
nn = cmu_sonority(val_string(val_car(val_cdr(rest))));
if ((p <= n) && (n <= nn))
return TRUE;
else
return FALSE;
}
}
static int cmulex_dist_to_vowel(const cst_val *rest)
{
if (rest == 0)
return 0; /* shouldn't get here */
else if (cmu_is_vowel(val_string(val_car(rest))))
return 0;
else
return 1+cmulex_dist_to_vowel(val_cdr(rest));
}
static const char * const cmulex_onset_trigrams[] = {
"str", "spy", "spr", "spl", "sky", "skw", "skr", "skl", NULL
};
static const char * const cmulex_onset_bigrams[] = {
"zw", "zl",
"vy", "vr", "vl",
"thw", "thr",
"ty", "tw",
"tr", /* "ts", */
"shw", "shr", "shn", "shm", "shl",
"sw", "sv", "st", "sr", "sp", "sn", "sm", "sl", "sk", "sf",
"py", "pw", "pr", "pl",
"ny",
"my", "mr",
"ly",
"ky", "kw", "kr", "kl",
"hhy", "hhw", "hhr", "hhl",
"gy", "gw", "gr", "gl",
"fy", "fr", "fl",
"dy", "dw", "dr",
"by", "bw", "br", "bl",
NULL
};
static int cmulex_onset_bigram(const cst_val *rest)
{
char x[10];
int i;
cst_sprintf(x,"%s%s",val_string(val_car(rest)),
val_string(val_car(val_cdr(rest))));
for (i=0; cmulex_onset_bigrams[i]; i++)
if (cst_streq(x,cmulex_onset_bigrams[i]))
return TRUE;
return FALSE;
}
static int cmulex_onset_trigram(const cst_val *rest)
{
char x[15];
int i;
cst_sprintf(x,"%s%s%s",val_string(val_car(rest)),
val_string(val_car(val_cdr(rest))),
val_string(val_car(val_cdr(val_cdr(rest)))));
for (i=0; cmulex_onset_trigrams[i]; i++)
if (cst_streq(x,cmulex_onset_trigrams[i]))
return TRUE;
return FALSE;
}
int cmu_syl_boundary_mo(const cst_item *i,const cst_val *rest)
{
/* syl boundary maximal onset */
int d2v;
if (rest == NULL)
return TRUE;
else if (cmu_is_silence(val_string(val_car(rest))))
return TRUE;
else if (!cmu_has_vowel_in_list(rest))
/* no more vowels so rest *all* coda */
return FALSE;
else if (!cmu_has_vowel_in_syl(i)) /* need a vowel */
/* no vowel yet in syl so keep copying */
return FALSE;
else if (cmu_is_vowel(val_string(val_car(rest))))
/* next is a vowel, syl has vowel, so this is a break */
return TRUE;
else if (cst_streq("ng",val_string(val_car(rest))))
/* next is "ng" which can't start a word internal syl */
return FALSE;
else
{
/* want to know if from rest to the next vowel is a valid onset */
d2v = cmulex_dist_to_vowel(rest);
if (d2v < 2)
return TRUE;
else if (d2v > 3)
return FALSE;
else if (d2v == 2)
return cmulex_onset_bigram(rest);
else /* if (d2v == 3) */
return cmulex_onset_trigram(rest);
return TRUE;
}
}
cst_lexicon cmu_lex;
cst_lts_rules cmu_lts_rules;
extern const char * const cmu_lts_phone_table[];
extern const char * const cmu_lts_letter_table[];
extern const cst_lts_addr cmu_lts_letter_index[];
extern const cst_lts_model cmu_lts_model[];
cst_lexicon *cmu_lex_init()
{
/* I'd like to do this as a const but it needs everything in this */
/* file and already the bits are too big for some compilers */
if (cmu_lts_rules.name)
return &cmu_lex; /* Already initialized */
cmu_lts_rules.name = "cmu";
cmu_lts_rules.letter_index = cmu_lts_letter_index;
#ifdef CST_NO_STATIC_LTS_MODEL
/* cmu_lts_rules.models will be set elsewhere */
#else
cmu_lts_rules.models = cmu_lts_model;
#endif
cmu_lts_rules.phone_table = cmu_lts_phone_table;
cmu_lts_rules.context_window_size = 4;
cmu_lts_rules.context_extra_feats = 1;
cmu_lts_rules.letter_table = 0 /* cmu_lts_letter_table */;
cmu_lex.name = "cmu";
cmu_lex.num_entries = cmu_lex_num_entries;
#ifdef CST_NO_STATIC_LEX
/* cmu_lex.data will be set elsewhere */
#else
cmu_lex.data = cmu_lex_data;
#endif
cmu_lex.num_bytes = cmu_lex_num_bytes;
cmu_lex.phone_table = (char **) cmu_lex_phone_table;
cmu_lex.syl_boundary = cmu_syl_boundary_mo;
cmu_lex.addenda = (char ***) addenda;
cmu_lex.lts_rule_set = (cst_lts_rules *) &cmu_lts_rules;
cmu_lex.phone_hufftable = cmu_lex_phones_huff_table;
cmu_lex.entry_hufftable = cmu_lex_entries_huff_table;
cmu_lex.postlex = cmu_postlex;
return &cmu_lex;
}

View File

@ -0,0 +1,55 @@
/*************************************************************************/
/* */
/* Language Technologies Institute */
/* Carnegie Mellon University */
/* Copyright (c) 2001-2008 */
/* All Rights Reserved. */
/* */
/* Permission is hereby granted, free of charge, to use and distribute */
/* this software and its documentation without restriction, including */
/* without limitation the rights to use, copy, modify, merge, publish, */
/* distribute, sublicense, and/or sell copies of this work, and to */
/* permit persons to whom this work is furnished to do so, subject to */
/* the following conditions: */
/* 1. The code must retain the above copyright notice, this list of */
/* conditions and the following disclaimer. */
/* 2. Any modifications must be clearly marked as such. */
/* 3. Original authors' names are not deleted. */
/* 4. The authors' names are not used to endorse or promote products */
/* derived from this software without specific prior written */
/* permission. */
/* */
/* CARNEGIE MELLON UNIVERSITY AND THE CONTRIBUTORS TO THIS WORK */
/* DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING */
/* ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT */
/* SHALL CARNEGIE MELLON UNIVERSITY NOR THE CONTRIBUTORS BE LIABLE */
/* FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES */
/* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN */
/* AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, */
/* ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF */
/* THIS SOFTWARE. */
/* */
/*************************************************************************/
/* Author: Alan W Black (awb@cs.cmu.edu) */
/* Date: August 2008 */
/*************************************************************************/
/* CMU Lexicon public functions */
/*************************************************************************/
#ifndef _CMU_LEX_H_
#define _CMU_LEX_H_
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
#include "cst_lexicon.h"
cst_lexicon *cmu_lex_init(void);
cst_utterance *cmu_postlex(cst_utterance *u);
#ifdef __cplusplus
} /* extern "C" */
#endif /* __cplusplus */
#endif

View File

@ -0,0 +1,10 @@
/*******************************************************/
/** generated lexicon data file from cmu */
/*******************************************************/
const unsigned char cmu_lex_data[] =
{
0,
#include "cmu_lex_data_raw.c"
};

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,88 @@
/*******************************************************/
/** generated lexicon entry file from cmu */
/*******************************************************/
#include "cst_string.h"
#include "cst_lexicon.h"
const int cmu_lex_num_bytes =
#include "cmu_lex_num_bytes.c"
;
const int cmu_lex_num_entries = 36963;
const char * const cmu_lex_phone_table[57] =
{
"_epsilon_",
"ax0",
"ey1",
"l",
"p",
"ih1",
"r",
"t",
"g",
"er0",
"b",
"aa1",
"n",
"k",
"th",
"eh0",
"s",
"m",
"ao1",
"eh1",
"d",
"aa0",
"ae1",
"ow1",
"ih0",
"iy0",
"ow0",
"ey0",
"uw1",
"v",
"iy1",
"z",
"uw0",
"ng",
"sh",
"ae0",
"ah1",
"ao0",
"f",
"hh",
"ay1",
"jh",
"aw1",
"aw0",
"ch",
"zh",
"y",
"uh1",
"dh",
"w",
"er1",
"oy1",
"ay0",
"oy0",
"uh0",
"ah0",
NULL
};
const char * const cmu_lex_phones_huff_table[257] =
{
NULL, /* reserved */
#include "cmu_lex_phones_huff_table.c"
NULL
};
const char * const cmu_lex_entries_huff_table[257] =
{
NULL, /* reserved */
#include "cmu_lex_entries_huff_table.c"
NULL
};

View File

@ -0,0 +1,254 @@
"q" , /* 0.000147 */
"ment" , /* 0.000733 */
"ors" , /* 0.000733 */
"0del" , /* 0.000739 */
"gr" , /* 0.000739 */
"iss" , /* 0.000739 */
"ano" , /* 0.000750 */
"enb" , /* 0.000750 */
"ette" , /* 0.000750 */
"ult" , /* 0.000750 */
"0im" , /* 0.000762 */
"ug" , /* 0.000762 */
"0ab" , /* 0.000768 */
"0th" , /* 0.000774 */
"orn" , /* 0.000774 */
"ost" , /* 0.000780 */
"pl" , /* 0.000780 */
"0ac" , /* 0.000785 */
"eb" , /* 0.000791 */
"ern" , /* 0.000791 */
"ord" , /* 0.000791 */
"let" , /* 0.000803 */
"owski" , /* 0.000815 */
"pr" , /* 0.000821 */
"ind" , /* 0.000826 */
"ann" , /* 0.000832 */
"iel" , /* 0.000832 */
"ina" , /* 0.000838 */
"0el" , /* 0.000850 */
"ted" , /* 0.000850 */
"ish" , /* 0.000856 */
"0fr" , /* 0.000862 */
"ok" , /* 0.000867 */
"ally" , /* 0.000873 */
"oll" , /* 0.000873 */
"ons" , /* 0.000879 */
"ge" , /* 0.000885 */
"ial" , /* 0.000885 */
"af" , /* 0.000891 */
"ath" , /* 0.000897 */
"ick" , /* 0.000920 */
"0dis" , /* 0.000926 */
"0pro" , /* 0.000938 */
"ont" , /* 0.000938 */
"0car" , /* 0.000950 */
"ins" , /* 0.000950 */
"able" , /* 0.000955 */
"0sp" , /* 0.000996 */
"ph" , /* 0.001002 */
"ino" , /* 0.001008 */
"ast" , /* 0.001043 */
"enc" , /* 0.001067 */
"ore" , /* 0.001067 */
"0y" , /* 0.001078 */
"her" , /* 0.001084 */
"our" , /* 0.001084 */
"0gr" , /* 0.001090 */
"ki" , /* 0.001090 */
"one" , /* 0.001090 */
"ler" , /* 0.001102 */
"ev" , /* 0.001114 */
"0br" , /* 0.001120 */
"0ad" , /* 0.001131 */
"az" , /* 0.001131 */
"ett" , /* 0.001172 */
"0am" , /* 0.001178 */
"0ex" , /* 0.001196 */
"ik" , /* 0.001207 */
"err" , /* 0.001225 */
"ew" , /* 0.001225 */
"co" , /* 0.001243 */
"if" , /* 0.001248 */
"eg" , /* 0.001254 */
"man" , /* 0.001272 */
"aw" , /* 0.001284 */
"0sh" , /* 0.001295 */
"ek" , /* 0.001295 */
"up" , /* 0.001295 */
"0com" , /* 0.001301 */
"0pr" , /* 0.001307 */
"ne" , /* 0.001313 */
"ans" , /* 0.001319 */
"gh" , /* 0.001348 */
"anc" , /* 0.001354 */
"ated" , /* 0.001360 */
"ous" , /* 0.001372 */
"ud" , /* 0.001372 */
"0tr" , /* 0.001377 */
"ob" , /* 0.001389 */
"ort" , /* 0.001389 */
"ski" , /* 0.001389 */
"0mar" , /* 0.001407 */
"st" , /* 0.001413 */
"ach" , /* 0.001418 */
"ies" , /* 0.001430 */
"he" , /* 0.001436 */
"ass" , /* 0.001489 */
"ah" , /* 0.001495 */
"uc" , /* 0.001495 */
"0ar" , /* 0.001501 */
"ub" , /* 0.001506 */
"end" , /* 0.001524 */
"ert" , /* 0.001559 */
"0z" , /* 0.001571 */
"ich" , /* 0.001577 */
"ens" , /* 0.001583 */
"ly" , /* 0.001583 */
"ang" , /* 0.001629 */
"ier" , /* 0.001629 */
"op" , /* 0.001635 */
"0st" , /* 0.001641 */
"0le" , /* 0.001670 */
"ity" , /* 0.001670 */
"arr" , /* 0.001682 */
"ip" , /* 0.001735 */
"ate" , /* 0.001770 */
"ou" , /* 0.001782 */
"iz" , /* 0.001788 */
"ie" , /* 0.001817 */
"ib" , /* 0.001823 */
"0mc" , /* 0.001835 */
"ak" , /* 0.001852 */
"ov" , /* 0.001870 */
"ey" , /* 0.001876 */
"0sch" , /* 0.001893 */
"art" , /* 0.001893 */
"ay" , /* 0.001969 */
"ter" , /* 0.002005 */
"io" , /* 0.002040 */
"0de" , /* 0.002134 */
"ff" , /* 0.002186 */
"oc" , /* 0.002192 */
"0e" , /* 0.002198 */
"ion" , /* 0.002216 */
"od" , /* 0.002227 */
"0con" , /* 0.002268 */
"0al" , /* 0.002286 */
"ard" , /* 0.002298 */
"ine" , /* 0.002327 */
"um" , /* 0.002339 */
"est" , /* 0.002374 */
"0un" , /* 0.002391 */
"ian" , /* 0.002415 */
"ill" , /* 0.002450 */
"all" , /* 0.002462 */
"og" , /* 0.002468 */
"ess" , /* 0.002479 */
"av" , /* 0.002520 */
"ap" , /* 0.002538 */
"ow" , /* 0.002556 */
"te" , /* 0.002591 */
"0j" , /* 0.002614 */
"0ch" , /* 0.002685 */
"tr" , /* 0.002708 */
"j" , /* 0.002731 */
"au" , /* 0.002767 */
"0o" , /* 0.002796 */
"ant" , /* 0.002813 */
"ation" , /* 0.002854 */
"ia" , /* 0.002866 */
"ers" , /* 0.002907 */
"qu" , /* 0.002931 */
"iv" , /* 0.002989 */
"ab" , /* 0.002995 */
"0re" , /* 0.003030 */
"and" , /* 0.003171 */
"ist" , /* 0.003212 */
"x" , /* 0.003212 */
"im" , /* 0.003253 */
"un" , /* 0.003318 */
"ir" , /* 0.003505 */
"ul" , /* 0.003570 */
"ot" , /* 0.003646 */
"ut" , /* 0.003792 */
"ig" , /* 0.003804 */
"0in" , /* 0.003822 */
"ell" , /* 0.003851 */
"id" , /* 0.003956 */
"0a" , /* 0.004033 */
"om" , /* 0.004203 */
"ent" , /* 0.004261 */
"ec" , /* 0.004308 */
"ad" , /* 0.004384 */
"0w" , /* 0.004460 */
"em" , /* 0.004496 */
"ag" , /* 0.004572 */
"0n" , /* 0.004589 */
"w" , /* 0.004672 */
"0v" , /* 0.004841 */
"re" , /* 0.004853 */
"ro" , /* 0.005029 */
"ac" , /* 0.005252 */
"ch" , /* 0.005357 */
"il" , /* 0.005398 */
"us" , /* 0.005451 */
"0t" , /* 0.005697 */
"0f" , /* 0.005814 */
"am" , /* 0.005855 */
"le" , /* 0.005855 */
"et" , /* 0.006119 */
"0k" , /* 0.006207 */
"f" , /* 0.006248 */
"ur" , /* 0.006283 */
"os" , /* 0.006700 */
"z" , /* 0.006764 */
"as" , /* 0.006916 */
"is" , /* 0.007250 */
"0l" , /* 0.007315 */
"0g" , /* 0.007678 */
"ol" , /* 0.007708 */
"ing" , /* 0.007725 */
"0h" , /* 0.007889 */
"v" , /* 0.008270 */
"0r" , /* 0.008329 */
"it" , /* 0.008511 */
"at" , /* 0.008657 */
"g" , /* 0.008681 */
"0d" , /* 0.008827 */
"el" , /* 0.008827 */
"b" , /* 0.009015 */
"or" , /* 0.009073 */
"m" , /* 0.009173 */
"k" , /* 0.009226 */
"d" , /* 0.009449 */
"ic" , /* 0.009484 */
"u" , /* 0.009654 */
"ed" , /* 0.009771 */
"an" , /* 0.010498 */
"p" , /* 0.010591 */
"l" , /* 0.010890 */
"n" , /* 0.010896 */
"0p" , /* 0.011230 */
"c" , /* 0.011295 */
"en" , /* 0.011365 */
"0c" , /* 0.011670 */
"in" , /* 0.011693 */
"r" , /* 0.011793 */
"t" , /* 0.012086 */
"al" , /* 0.012139 */
"on" , /* 0.012350 */
"ar" , /* 0.012473 */
"0s" , /* 0.012549 */
"0b" , /* 0.012825 */
"es" , /* 0.013206 */
"h" , /* 0.013616 */
"0m" , /* 0.014132 */
"0" , /* 0.014489 */
"y" , /* 0.014900 */
"i" , /* 0.016986 */
"s" , /* 0.017185 */
"o" , /* 0.018803 */
"er" , /* 0.019331 */
"a" , /* 0.021816 */
"e" , /* 0.027378 */

View File

@ -0,0 +1 @@
410522

View File

@ -0,0 +1,254 @@
"\067" , /* 0.000024 */
"\065" , /* 0.000380 */
"\021\013\006" , /* 0.000771 */
"\002\007\001\024" , /* 0.000777 */
"\013\007" , /* 0.000783 */
"\021\026\014" , /* 0.000783 */
"\001\004" , /* 0.000789 */
"\046\031" , /* 0.000789 */
"\003\036" , /* 0.000801 */
"\010\011" , /* 0.000801 */
"\013\006\024" , /* 0.000801 */
"\015\001\003" , /* 0.000801 */
"\026\024" , /* 0.000813 */
"\036\014\001" , /* 0.000813 */
"\004\001\003" , /* 0.000819 */
"\001\012\001\003" , /* 0.000825 */
"\005\021" , /* 0.000825 */
"\022\006\001" , /* 0.000831 */
"\050\006" , /* 0.000831 */
"\012\026" , /* 0.000837 */
"\030\007\031" , /* 0.000837 */
"\044\003" , /* 0.000843 */
"\017\020" , /* 0.000849 */
"\032\014" , /* 0.000849 */
"\013\020" , /* 0.000855 */
"\004\026" , /* 0.000874 */
"\036\037" , /* 0.000874 */
"\050\024" , /* 0.000874 */
"\001\014\024" , /* 0.000916 */
"\005\010" , /* 0.000916 */
"\012\003" , /* 0.000928 */
"\046\003" , /* 0.000928 */
"\001\003\031" , /* 0.000934 */
"\001\014\037" , /* 0.000934 */
"\013\014\032" , /* 0.000934 */
"\020\011" , /* 0.000934 */
"\066" , /* 0.000934 */
"\005\003\001" , /* 0.000940 */
"\012\062" , /* 0.000940 */
"\030\051" , /* 0.000940 */
"\013\010" , /* 0.000946 */
"\050\007" , /* 0.000952 */
"\012\031" , /* 0.000958 */
"\005\037" , /* 0.000964 */
"\022\014" , /* 0.000964 */
"\023\014\007" , /* 0.000964 */
"\015\001\021" , /* 0.000970 */
"\032\003" , /* 0.000976 */
"\036\003" , /* 0.000982 */
"\036\014\032" , /* 0.000982 */
"\005\020\007" , /* 0.000994 */
"\020\001\003" , /* 0.000994 */
"\023\024" , /* 0.000994 */
"\043\015" , /* 0.000994 */
"\060" , /* 0.000994 */
"\025\021" , /* 0.001000 */
"\051\031" , /* 0.001012 */
"\054\031" , /* 0.001018 */
"\015\011" , /* 0.001024 */
"\007\001\024" , /* 0.001030 */
"\023\003\001" , /* 0.001036 */
"\023\021" , /* 0.001036 */
"\053" , /* 0.001042 */
"\013\003\001" , /* 0.001054 */
"\037\031" , /* 0.001078 */
"\022\006\031" , /* 0.001084 */
"\023\020\007" , /* 0.001084 */
"\001\020\007" , /* 0.001090 */
"\015\027" , /* 0.001109 */
"\026\014\024" , /* 0.001109 */
"\023\020" , /* 0.001115 */
"\003\026" , /* 0.001127 */
"\001\014\020" , /* 0.001133 */
"\024\036" , /* 0.001133 */
"\006\027" , /* 0.001151 */
"\057\006" , /* 0.001157 */
"\036\014\031" , /* 0.001163 */
"\022\046" , /* 0.001193 */
"\021\011" , /* 0.001199 */
"\005\007" , /* 0.001223 */
"\027\014\031" , /* 0.001223 */
"\005\020" , /* 0.001247 */
"\006\023" , /* 0.001259 */
"\035\031" , /* 0.001277 */
"\002\003" , /* 0.001289 */
"\046\011" , /* 0.001289 */
"\050\037" , /* 0.001289 */
"\024\032" , /* 0.001295 */
"\017\015" , /* 0.001313 */
"\007\001\014" , /* 0.001319 */
"\041\015" , /* 0.001319 */
"\020\036" , /* 0.001325 */
"\063" , /* 0.001325 */
"\030\010" , /* 0.001331 */
"\012\001\003" , /* 0.001362 */
"\021\026" , /* 0.001374 */
"\024\006" , /* 0.001380 */
"\055" , /* 0.001392 */
"\004\011" , /* 0.001398 */
"\030\020\007" , /* 0.001416 */
"\030\021" , /* 0.001422 */
"\013\021" , /* 0.001458 */
"\017\003" , /* 0.001464 */
"\046\006" , /* 0.001488 */
"\004\003" , /* 0.001494 */
"\056\040" , /* 0.001494 */
"\015\001" , /* 0.001506 */
"\023\006\031" , /* 0.001512 */
"\015\061" , /* 0.001536 */
"\015\026" , /* 0.001542 */
"\020\001" , /* 0.001548 */
"\024\023" , /* 0.001572 */
"\007\032" , /* 0.001590 */
"\015\003" , /* 0.001603 */
"\015\013\014" , /* 0.001603 */
"\043\014" , /* 0.001603 */
"\011\037" , /* 0.001627 */
"\041\010" , /* 0.001663 */
"\001\014\007" , /* 0.001681 */
"\025\003" , /* 0.001681 */
"\020\007\006" , /* 0.001711 */
"\005\015" , /* 0.001741 */
"\023\006\001" , /* 0.001765 */
"\045" , /* 0.001771 */
"\030\035" , /* 0.001783 */
"\017\014" , /* 0.001789 */
"\021\004" , /* 0.001789 */
"\022\003" , /* 0.001795 */
"\002\014" , /* 0.001801 */
"\021\001\015" , /* 0.001819 */
"\027\014" , /* 0.001819 */
"\021\001" , /* 0.001874 */
"\035\011" , /* 0.001886 */
"\015\032" , /* 0.001898 */
"\042\001\014" , /* 0.001952 */
"\024\001" , /* 0.001970 */
"\006\036" , /* 0.002018 */
"\001\012" , /* 0.002060 */
"\005\006" , /* 0.002060 */
"\044\014" , /* 0.002072 */
"\013\015" , /* 0.002121 */
"\020\001\014" , /* 0.002139 */
"\024\011" , /* 0.002175 */
"\057" , /* 0.002181 */
"\015\001\014" , /* 0.002193 */
"\013\003" , /* 0.002229 */
"\026\021" , /* 0.002241 */
"\050\014" , /* 0.002253 */
"\030\007" , /* 0.002283 */
"\002\007" , /* 0.002289 */
"\030\037" , /* 0.002295 */
"\027\003" , /* 0.002313 */
"\023\007" , /* 0.002325 */
"\024\031" , /* 0.002332 */
"\012\011" , /* 0.002416 */
"\015\006" , /* 0.002434 */
"\020\031" , /* 0.002458 */
"\024\030" , /* 0.002470 */
"\041" , /* 0.002470 */
"\020\004" , /* 0.002494 */
"\043" , /* 0.002506 */
"\036\014" , /* 0.002603 */
"\001\024" , /* 0.002609 */
"\005\003" , /* 0.002663 */
"\012\006" , /* 0.002669 */
"\045\006" , /* 0.002693 */
"\010\006" , /* 0.002729 */
"\015\013" , /* 0.002735 */
"\007\001" , /* 0.002741 */
"\002\042\001\014" , /* 0.002850 */
"\025\014" , /* 0.002862 */
"\026\003" , /* 0.002886 */
"\001\037" , /* 0.002910 */
"\030\024" , /* 0.003054 */
"\026\015" , /* 0.003109 */
"\030\003" , /* 0.003175 */
"\064" , /* 0.003175 */
"\007\031" , /* 0.003217 */
"\007\011" , /* 0.003271 */
"\001\015" , /* 0.003368 */
"\021\001\014" , /* 0.003434 */
"\020\015\031" , /* 0.003458 */
"\033" , /* 0.003579 */
"\004\006" , /* 0.003705 */
"\056\034" , /* 0.003723 */
"\023\015" , /* 0.003946 */
"\007\006" , /* 0.004018 */
"\022" , /* 0.004157 */
"\052" , /* 0.004163 */
"\017" , /* 0.004193 */
"\030\020" , /* 0.004290 */
"\020\015" , /* 0.004368 */
"\023\003" , /* 0.004368 */
"\040" , /* 0.004434 */
"\023\006" , /* 0.004446 */
"\025\006" , /* 0.004488 */
"\007\020" , /* 0.004573 */
"\001\021" , /* 0.004735 */
"\003\001" , /* 0.004814 */
"\016" , /* 0.005109 */
"\013\014" , /* 0.005332 */
"\001\007" , /* 0.005621 */
"\006\031" , /* 0.005675 */
"\013\006" , /* 0.005711 */
"\023\014" , /* 0.005729 */
"\044" , /* 0.005850 */
"\026\014" , /* 0.005970 */
"\005\014" , /* 0.006055 */
"\056" , /* 0.006151 */
"\001\020" , /* 0.006169 */
"\022\006" , /* 0.006266 */
"\062" , /* 0.006404 */
"\003\031" , /* 0.006513 */
"\006\001" , /* 0.006567 */
"\030\041" , /* 0.006711 */
"\030" , /* 0.006910 */
"\025" , /* 0.006958 */
"\050" , /* 0.008127 */
"\030\015" , /* 0.008145 */
"\054" , /* 0.008212 */
"\020\007" , /* 0.008778 */
"\023" , /* 0.008832 */
"\030\014" , /* 0.008922 */
"\042" , /* 0.009826 */
"\051" , /* 0.009941 */
"\034" , /* 0.010182 */
"\026" , /* 0.010242 */
"\005" , /* 0.010645 */
"\061" , /* 0.011073 */
"\031" , /* 0.011314 */
"\013" , /* 0.011567 */
"\036" , /* 0.011652 */
"\027" , /* 0.011941 */
"\002" , /* 0.011947 */
"\001\003" , /* 0.013007 */
"\006" , /* 0.013110 */
"\001\014" , /* 0.013429 */
"\032" , /* 0.013664 */
"\047" , /* 0.013796 */
"\001" , /* 0.013839 */
"\011" , /* 0.014351 */
"\010" , /* 0.015345 */
"\046" , /* 0.015857 */
"\035" , /* 0.016556 */
"\014" , /* 0.016718 */
"\004" , /* 0.018056 */
"\003" , /* 0.018104 */
"\015" , /* 0.019514 */
"\012" , /* 0.021170 */
"\037" , /* 0.022357 */
"\021" , /* 0.025177 */
"\007" , /* 0.026273 */
"\024" , /* 0.026581 */
"\020" , /* 0.029376 */

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,154 @@
/*******************************************************/
/** Autogenerated lts rules (regex) for cmu */
/** from wfst/ */
/*******************************************************/
#include "cst_string.h"
#include "cst_lts.h"
#include "cst_lexicon.h"
const char * const cmu_lts_phone_table[76] =
{
"epsilon",
"eh1",
"aa1",
"ey1",
"aw1",
"ax0",
"ao1",
"ay0",
"aa0",
"ey0",
"ae1",
"ih1",
"aw0",
"ow0",
"ao0",
"ow1",
"eh0",
"ih0",
"w-ey1",
"w-ax0",
"y-ax0",
"ae0",
"ay1",
"ah0",
"ah1",
"b",
"ch",
"k",
"s",
"t-s",
"sh",
"d",
"t",
"jh",
"iy1",
"iy0",
"uw1",
"y-uw1",
"oy1",
"y-uw0",
"uw0",
"oy0",
"f",
"g",
"zh",
"hh",
"y",
"l",
"ax0-l",
"m",
"ax0-m",
"m-ae1",
"m-ax0",
"ng",
"n",
"n-y",
"uh1",
"uh0",
"w",
"w-ah1",
"er1",
"p",
"r",
"er0",
"z",
"th",
"dh",
"y-er0",
"y-uh1",
"y-er1",
"v",
"k-s",
"g-zh",
"k-sh",
"g-z",
NULL
};
const char * const cmu_lts_letter_table[30] =
{
"nothing",
"#",
"0",
"a",
"b",
"c",
"d",
"e",
"f",
"g",
"h",
"i",
"j",
"k",
"l",
"m",
"n",
"o",
"p",
"q",
"r",
"s",
"t",
"u",
"v",
"w",
"x",
"y",
"z",
NULL
};
const cst_lts_addr cmu_lts_letter_index[27] =
{
0, /* a */
5371, /* b */
5414, /* c */
6048, /* d */
6256, /* e */
10649, /* f */
10666, /* g */
11293, /* h */
11522, /* i */
15403, /* j */
15514, /* k */
15533, /* l */
15900, /* m */
15942, /* n */
16176, /* o */
19793, /* p */
19830, /* q */
19831, /* r */
21775, /* s */
22667, /* t */
22957, /* u */
24709, /* v */
24719, /* w */
24877, /* x */
24923, /* y */
25377, /* z */
0
};

View File

@ -0,0 +1,110 @@
/*************************************************************************/
/* */
/* Language Technologies Institute */
/* Carnegie Mellon University */
/* Copyright (c) 2001-2008 */
/* All Rights Reserved. */
/* */
/* Permission is hereby granted, free of charge, to use and distribute */
/* this software and its documentation without restriction, including */
/* without limitation the rights to use, copy, modify, merge, publish, */
/* distribute, sublicense, and/or sell copies of this work, and to */
/* permit persons to whom this work is furnished to do so, subject to */
/* the following conditions: */
/* 1. The code must retain the above copyright notice, this list of */
/* conditions and the following disclaimer. */
/* 2. Any modifications must be clearly marked as such. */
/* 3. Original authors' names are not deleted. */
/* 4. The authors' names are not used to endorse or promote products */
/* derived from this software without specific prior written */
/* permission. */
/* */
/* CARNEGIE MELLON UNIVERSITY AND THE CONTRIBUTORS TO THIS WORK */
/* DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING */
/* ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT */
/* SHALL CARNEGIE MELLON UNIVERSITY NOR THE CONTRIBUTORS BE LIABLE */
/* FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES */
/* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN */
/* AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, */
/* ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF */
/* THIS SOFTWARE. */
/* */
/*************************************************************************/
/* Author: Alan W Black (awb@cs.cmu.edu) */
/* Date: August 2008 */
/*************************************************************************/
/* Moved the CMU lexicon specific postlexical rules into cmulex itself */
/*************************************************************************/
#include "flite.h"
static void apostrophe_s(cst_utterance *u)
{
cst_item *s;
cst_item *schwa;
cst_phoneset *ps=0;
const char *pname, *word;
ps = val_phoneset(feat_val(u->features,"phoneset"));
for (s=item_next(relation_head(utt_relation(u,"Segment")));
s; s=item_next(s))
{
word = val_string(ffeature(s, "R:SylStructure.parent.parent.name"));
if (cst_streq("'s", word))
{
pname = item_feat_string(item_prev(s),"name");
if ((strchr("fa",*phone_feature_string(ps,pname,"ctype")) != NULL)
&& (strchr("dbg",
*phone_feature_string(ps,pname,"cplace")) == NULL))
/* needs a schwa */
{
schwa = item_prepend(s,NULL);
item_set_string(schwa,"name","ax");
item_prepend(item_as(s,"SylStructure"),schwa);
}
else if (cst_streq("-",phone_feature_string(ps,pname,"cvox")))
item_set_string(s,"name","s");
}
else if (cst_streq("'ve", word)
|| cst_streq("'ll", word)
|| cst_streq("'d", word))
{
if (cst_streq("-",ffeature_string(s,"p.ph_vc")))
{
schwa = item_prepend(s,NULL);
item_set_string(schwa,"name","ax");
item_prepend(item_as(s,"SylStructure"),schwa);
}
}
}
}
static void the_iy_ax(cst_utterance *u)
{
const cst_item *i;
const char *word;
for (i = relation_head(utt_relation(u, "Segment")); i; i = item_next(i))
{
if (cst_streq("ax", item_name(i)))
{
word = ffeature_string(i,"R:SylStructure.parent.parent.name");
if (cst_streq("the", word)
&& cst_streq("+", ffeature_string(i,"n.ph_vc")))
item_set_string(i, "name", "iy");
}
}
}
cst_utterance *cmu_postlex(cst_utterance *u)
{
/* Post lexical rules */
apostrophe_s(u);
the_iy_ax(u);
return u;
}

View File

@ -0,0 +1,214 @@
<?xml version="1.0" encoding="UTF-8"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="8.00"
Name="libflite-cmulex"
ProjectGUID="{78B2092A-F5B1-456F-BAB1-A172AF5D84E4}"
RootNamespace="libflite-cmulex"
Keyword="Win32Proj"
>
<Platforms>
<Platform
Name="Win32"
/>
</Platforms>
<ToolFiles>
</ToolFiles>
<Configurations>
<Configuration
Name="Debug|Win32"
OutputDirectory="..\..\lib"
IntermediateDirectory="..\..\windows\build\Debug\cmulex"
ConfigurationType="4"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="..\..\include"
PreprocessorDefinitions="WIN32;_DEBUG;_LIB;"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
UsePrecompiledHeader="0"
WarningLevel="3"
Detect64BitPortabilityProblems="true"
DebugInformationFormat="4"
CompileAs="1"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLibrarianTool"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Release|Win32"
OutputDirectory="..\..\lib"
IntermediateDirectory="..\..\windows\build\Release\cmulex"
ConfigurationType="4"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories="..\..\include"
PreprocessorDefinitions="WIN32;NDEBUG;_LIB;"
RuntimeLibrary="2"
UsePrecompiledHeader="0"
WarningLevel="3"
Detect64BitPortabilityProblems="true"
DebugInformationFormat="3"
CompileAs="1"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLibrarianTool"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
</Configurations>
<References>
</References>
<Files>
<Filter
Name="Header Files"
Filter="h;hpp;hxx;hm;inl;inc;xsd"
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
>
<File
RelativePath=".\cmu_lex.h"
>
</File>
<File
RelativePath=".\cmu_lts_model.h"
>
</File>
</Filter>
<Filter
Name="Resource Files"
Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
>
</Filter>
<Filter
Name="Source Files"
Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
>
<File
RelativePath=".\cmu_lex.c"
>
</File>
<File
RelativePath=".\cmu_lex_data.c"
>
</File>
<File
RelativePath=".\cmu_lex_data_raw.c"
>
</File>
<File
RelativePath=".\cmu_lex_entries.c"
>
</File>
<File
RelativePath=".\cmu_lex_entries_huff_table.c"
>
</File>
<File
RelativePath=".\cmu_lex_num_bytes.c"
>
</File>
<File
RelativePath=".\cmu_lex_phones_huff_table.c"
>
</File>
<File
RelativePath=".\cmu_lts_model.c"
>
</File>
<File
RelativePath=".\cmu_lts_rules.c"
>
</File>
<File
RelativePath=".\cmu_postlex.c"
>
</File>
</Filter>
</Files>
<Globals>
</Globals>
</VisualStudioProject>

View File

@ -0,0 +1,178 @@
#!/bin/sh
###########################################################################
## ##
## Language Technologies Institute ##
## Carnegie Mellon University ##
## Copyright (c) 2004 ##
## All Rights Reserved. ##
## ##
## Permission is hereby granted, free of charge, to use and distribute ##
## this software and its documentation without restriction, including ##
## without limitation the rights to use, copy, modify, merge, publish, ##
## distribute, sublicense, and/or sell copies of this work, and to ##
## permit persons to whom this work is furnished to do so, subject to ##
## the following conditions: ##
## 1. The code must retain the above copyright notice, this list of ##
## conditions and the following disclaimer. ##
## 2. Any modifications must be clearly marked as such. ##
## 3. Original authors' names are not deleted. ##
## 4. The authors' names are not used to endorse or promote products ##
## derived from this software without specific prior written ##
## permission. ##
## ##
## CARNEGIE MELLON UNIVERSITY AND THE CONTRIBUTORS TO THIS WORK ##
## DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ##
## ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT ##
## SHALL CARNEGIE MELLON UNIVERSITY NOR THE CONTRIBUTORS BE LIABLE ##
## FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES ##
## WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN ##
## AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ##
## ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF ##
## THIS SOFTWARE. ##
## ##
###########################################################################
## ##
## Make the files from the Festival Released version ##
## ##
###########################################################################
if [ "x$FLITEDIR" == "x" ]
then
FLITEDIR=`pwd`/../..
fi
if [ $# = 0 ]
then
$0 setup
$0 lts
$0 lex
$0 compresslex
$0 install
exit
fi
if [ "$1" = "setup" ]
then
tar zxvf festlex_CMU.tar.gz
cp -p $FESTVOXDIR/src/lts/build_lts festival/lib/dicts/cmu
cp -p $FESTVOXDIR/src/lts/build_lts_rules festival/lib/dicts/cmu
mkdir festival/lib/dicts/cmu/c
mkdir festival/lib/dicts/cmu/wfst
mkdir festival/lib/dicts/cmu/lts_scratch
fi
if [ "$1" = "lts" ]
then
(cd festival/lib/dicts/cmu;
festival --heap 10000000 -b allowables.scm '(dump-flat-entries-all "cmudict-0.4.out" "lts_scratch/lex_entries.out")'
./build_lts cummulate
./build_lts align
./build_lts build
./build_lts merge
./build_lts test
festival --heap 10000000 -b $FLITEDIR/tools/make_lts_wfst.scm lts_scratch/lex_lts_rules.scm '(lts_to_rg_to_wfst lex_lts_rules "wfst/")';
festival --heap 10000000 -b $FLITEDIR/tools/make_lts.scm lts_scratch/lex_lts_rules.scm '(ltsregextoC "cmu" lex_lts_rules "wfst/" "c")';
)
fi
if [ "$1" = "lex" ]
then
( cd festival/lib/dicts/cmu;
# Find the words to prune from the built lexicon
# We will prune words that aren't homographs and the LTS gets correct
# Use the lts_test.log to find the failed entries and only
# include them in the list
festival -b cmulex.scm ~/projects/flite/tools/make_lex.scm '(remove_predictable_entries "cmudict-0.4.out" "pruned_lex.scm" "lex_lts_rules.scm")'
festival --heap 10000000 -b '(lex.compile "pruned_lex.scm" "pruned_lex.out")'
festival --heap 10000000 -b $FLITEDIR/tools/make_lex.scm '(lextoC "cmu" "pruned_lex.out" "c")' ;
)
fi
if [ "$1" = "lex2" ]
then
# experiment: put Letter_Phone(s) together as things to compress
# does give much smaller result, though needs to be less than 256 symbols
# not fully implemented
( cd festival/lib/dicts/cmu;
# Use the lts_test.log to find the failed entries and only
# include them in the list
# this needs festival-1.96 or later to get the pos from the lts_test.log
grep "^failed " lts_test.log |
sed 's/(/( /g;s/)/ )/g' |
awk '{printf("( \"");
for (i=3; $i != ")"; i++)
printf("%s",$i);
i++;
printf("\" %s ( ",$i);
i++; i++
for ( ; $i != ")"; i++)
if ($i != "#")
printf("%s ",$i);
printf("))\n");
}' |
tr -d '()"' |
awk '{if ($2 == "nil")
printf("0_start ");
else
printf("%s_start ",$2);
for (i=1; i<=length($1); i++)
printf("%s_%s ",substr($1,i,1),$(i+2));
printf("\n");}' >pruned_lex2.data
# festival --heap 10000000 -b $FLITEDIR/tools/make_lex.scm '(lextoC "cmu" "pruned_lex.out" "c")' ;
)
fi
if [ "$1" = "compresslex" ]
then
# Compress the entries and phone strings by finding best ngrams
( cd festival/lib/dicts/cmu/c;
$FLITEDIR/tools/huff_table phones cmu_lex_data cmu_lex_phones_huff_table.c
$FLITEDIR/tools/huff_table entries cmu_lex_data cmu_lex_entries_huff_table.c
paste huff.entries.compressed huff.phones.compressed huff.tmp.corpus |
tr -d " " |
awk 'BEGIN {pcount = 1;
printf("/* index to compressed data */\n");
}
function unenoctal(x)
{
y = ((substr(x,1,1)+0)*64) + ((substr(x,2,1)+0)*8) + (substr(x,3,1)+0);
return y;
}
{printf(" ");
for (i=length($2)-3; i>0; i-=4)
{
printf("%d,",unenoctal(substr($2,i+1,3)));
pcount++;
}
pcount++;
printf(" 255, /* %d %s */ ",pcount,$3);
for (i=1; i<length($1); i+=4)
{
printf("%d,",unenoctal(substr($1,i+1,3)));
pcount++;
}
printf("0,\n");
pcount++;
}
END { printf("/* num_bytes = %d */\n",pcount);}' >cmu_lex_data_compressed.c
grep "num_bytes = " cmu_lex_data_compressed.c |
awk '{print $4}' >cmu_lex_num_bytes_compressed.c
)
fi
if [ "$1" = "install" ]
then
cp -p festival/lib/dicts/cmu/c/cmu_lex_data.c .
cp -p festival/lib/dicts/cmu/c/cmu_lex_data_compressed.c cmu_lex_data_raw.c
cp -p festival/lib/dicts/cmu/c/cmu_lex_phones_huff_table.c .
cp -p festival/lib/dicts/cmu/c/cmu_lex_entries_huff_table.c .
cp -p festival/lib/dicts/cmu/c/cmu_lex_entries.c .
cp -p festival/lib/dicts/cmu/c/cmu_lex_num_bytes_compressed.c cmu_lex_num_bytes.c
cp -p festival/lib/dicts/cmu/c/cmu_lts_model.c .
cp -p festival/lib/dicts/cmu/c/cmu_lts_model.h .
cp -p festival/lib/dicts/cmu/c/cmu_lts_rules.c .
fi

View File

@ -0,0 +1,66 @@
###########################################################################
## ##
## Language Technologies Institute ##
## Carnegie Mellon University ##
## Copyright (c) 2000 ##
## All Rights Reserved. ##
## ##
## Permission is hereby granted, free of charge, to use and distribute ##
## this software and its documentation without restriction, including ##
## without limitation the rights to use, copy, modify, merge, publish, ##
## distribute, sublicense, and/or sell copies of this work, and to ##
## permit persons to whom this work is furnished to do so, subject to ##
## the following conditions: ##
## 1. The code must retain the above copyright notice, this list of ##
## conditions and the following disclaimer. ##
## 2. Any modifications must be clearly marked as such. ##
## 3. Original authors' names are not deleted. ##
## 4. The authors' names are not used to endorse or promote products ##
## derived from this software without specific prior written ##
## permission. ##
## ##
## CARNEGIE MELLON UNIVERSITY AND THE CONTRIBUTORS TO THIS WORK ##
## DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ##
## ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT ##
## SHALL CARNEGIE MELLON UNIVERSITY NOR THE CONTRIBUTORS BE LIABLE ##
## FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES ##
## WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN ##
## AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ##
## ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF ##
## THIS SOFTWARE. ##
## ##
###########################################################################
## ##
## US English general functions/models ##
## ##
###########################################################################
TOP=../..
DIRNAME=lang/usenglish
BUILD_DIRS =
ALL_DIRS=
H = usenglish.h us_int_accent_cart.h us_int_tone_cart.h us_durz_cart.h \
us_ffeatures.h us_phrasing_cart.h us_text.h us_f0.h us_nums_cart.h \
us_regexes.h us_pos_cart.h
SRCS = us_int_accent_cart.c us_int_tone_cart.c us_f0_model.c \
us_dur_stats.c us_durz_cart.c us_f0lr.c \
us_phoneset.c us_ffeatures.c us_phrasing_cart.c \
us_gpos.c us_text.c us_expand.c \
us_nums_cart.c us_aswd.c usenglish.c us_pos_cart.c
SCRIPTS = make_us_regexes us_pos.tree
OBJS = $(SRCS:.c=.o)
SCM=
WINDOWS = libflite-usenglish.vcproj
FILES = Makefile $(SCM) $(SRCS) $(H) $(SCRIPTS) $(WINDOWS)
LIBNAME = flite_usenglish
LOCAL_INCLUDES =
ALL =
include $(TOP)/config/common_make_rules
regexes:
./make_us_regexes $(BINDIR) >us_regexes.h
us_pos_cart.c: us_pos.tree
$(ESTDIR)/../festival/bin/festival -b $(FLITEDIR)/tools/make_cart.scm $(FLITEDIR)/tools/make_pos.scm

View File

@ -0,0 +1,274 @@
<?xml version="1.0" encoding="UTF-8"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="8.00"
Name="libflite-usenglish"
ProjectGUID="{95BB879F-9B63-488D-B8D7-B16FE92203E9}"
RootNamespace="libflite-usenglish"
Keyword="Win32Proj"
>
<Platforms>
<Platform
Name="Win32"
/>
</Platforms>
<ToolFiles>
</ToolFiles>
<Configurations>
<Configuration
Name="Debug|Win32"
OutputDirectory="..\..\lib"
IntermediateDirectory="..\..\windows\build\Debug\usenglish"
ConfigurationType="4"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="..\..\include"
PreprocessorDefinitions="WIN32;_DEBUG;_LIB;NO_UNION_INITIALIZATION"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
UsePrecompiledHeader="0"
WarningLevel="3"
Detect64BitPortabilityProblems="true"
DebugInformationFormat="4"
CompileAs="1"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLibrarianTool"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Release|Win32"
OutputDirectory="..\..\lib"
IntermediateDirectory="..\..\windows\build\Release\usenglish"
ConfigurationType="4"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories="..\..\include"
PreprocessorDefinitions="WIN32;NDEBUG;_LIB;NO_UNION_INITIALIZATION"
RuntimeLibrary="2"
UsePrecompiledHeader="0"
WarningLevel="3"
Detect64BitPortabilityProblems="true"
DebugInformationFormat="3"
CompileAs="1"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLibrarianTool"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
</Configurations>
<References>
</References>
<Files>
<Filter
Name="Header Files"
Filter="h;hpp;hxx;hm;inl;inc;xsd"
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
>
<File
RelativePath=".\us_durz_cart.h"
>
</File>
<File
RelativePath=".\us_f0.h"
>
</File>
<File
RelativePath=".\us_ffeatures.h"
>
</File>
<File
RelativePath=".\us_int_accent_cart.h"
>
</File>
<File
RelativePath=".\us_int_tone_cart.h"
>
</File>
<File
RelativePath=".\us_nums_cart.h"
>
</File>
<File
RelativePath=".\us_phrasing_cart.h"
>
</File>
<File
RelativePath=".\us_pos_cart.h"
>
</File>
<File
RelativePath=".\us_regexes.h"
>
</File>
<File
RelativePath=".\us_text.h"
>
</File>
<File
RelativePath=".\usenglish.h"
>
</File>
</Filter>
<Filter
Name="Resource Files"
Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
>
</Filter>
<Filter
Name="Source Files"
Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
>
<File
RelativePath=".\us_aswd.c"
>
</File>
<File
RelativePath=".\us_dur_stats.c"
>
</File>
<File
RelativePath=".\us_durz_cart.c"
>
</File>
<File
RelativePath=".\us_expand.c"
>
</File>
<File
RelativePath=".\us_f0_model.c"
>
</File>
<File
RelativePath=".\us_f0lr.c"
>
</File>
<File
RelativePath=".\us_ffeatures.c"
>
</File>
<File
RelativePath=".\us_gpos.c"
>
</File>
<File
RelativePath=".\us_int_accent_cart.c"
>
</File>
<File
RelativePath=".\us_int_tone_cart.c"
>
</File>
<File
RelativePath=".\us_nums_cart.c"
>
</File>
<File
RelativePath=".\us_phoneset.c"
>
</File>
<File
RelativePath=".\us_phrasing_cart.c"
>
</File>
<File
RelativePath=".\us_pos_cart.c"
>
</File>
<File
RelativePath=".\us_text.c"
>
</File>
<File
RelativePath=".\usenglish.c"
>
</File>
</Filter>
</Files>
<Globals>
</Globals>
</VisualStudioProject>

View File

@ -0,0 +1,61 @@
#!/bin/sh
###########################################################################
## ##
## Language Technologies Institute ##
## Carnegie Mellon University ##
## Copyright (c) 2008 ##
## All Rights Reserved. ##
## ##
## Permission is hereby granted, free of charge, to use and distribute ##
## this software and its documentation without restriction, including ##
## without limitation the rights to use, copy, modify, merge, publish, ##
## distribute, sublicense, and/or sell copies of this work, and to ##
## permit persons to whom this work is furnished to do so, subject to ##
## the following conditions: ##
## 1. The code must retain the above copyright notice, this list of ##
## conditions and the following disclaimer. ##
## 2. Any modifications must be clearly marked as such. ##
## 3. Original authors' names are not deleted. ##
## 4. The authors' names are not used to endorse or promote products ##
## derived from this software without specific prior written ##
## permission. ##
## ##
## CARNEGIE MELLON UNIVERSITY AND THE CONTRIBUTORS TO THIS WORK ##
## DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ##
## ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT ##
## SHALL CARNEGIE MELLON UNIVERSITY NOR THE CONTRIBUTORS BE LIABLE ##
## FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES ##
## WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN ##
## AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ##
## ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF ##
## THIS SOFTWARE. ##
## ##
###########################################################################
## ##
## Make regexes into compiled form ##
## ##
###########################################################################
COMPILE_REGEX=$1/compile_regexes
echo "/* Autogenerated from make_us_regexes */"
$COMPILE_REGEX ordinal_number "[0-9][0-9,]*\\(th\\|TH\\|st\\|ST\\|nd\\|ND\\|rd\\|RD\\)"
$COMPILE_REGEX hasvowel ".*[aeiouAEIOU].*"
$COMPILE_REGEX usmoney "\\\$[0-9,]+\\(\\.[0-9]+\\)?"
$COMPILE_REGEX illion ".*illion"
$COMPILE_REGEX romannums "\\(II?I?\\|IV\\|VI?I?I?\\|IX\\|X[VIX]*\\)"
$COMPILE_REGEX drst "\\([dD][Rr]\\|[Ss][tT]\\)"
$COMPILE_REGEX numess "[0-9]+s"
$COMPILE_REGEX sevenphonenumber "[0-9][0-9][0-9]-[0-9][0-9][0-9][0-9]"
$COMPILE_REGEX fourdigits "[0-9][0-9][0-9][0-9]"
$COMPILE_REGEX threedigits "[0-9][0-9][0-9]"
$COMPILE_REGEX numbertime "[0-9]?[0-9]:[0-5][0-9]"
$COMPILE_REGEX numbertimexm "[0-9]?[0-9][:\\.][0-5][0-9][ap]m"
$COMPILE_REGEX dottedabbrevs "\\([A-Za-z]\\.\\)+[A-Za-z]\\.?"
$COMPILE_REGEX digitsslashdigits "[0-9]+/[0-9]+"
$COMPILE_REGEX digits2dash "\\([0-9]+-.\\)+[0-9]+"
$COMPILE_REGEX wandm "[0-9,]*[0-9]+\\(lb\\|LB\\|lbs\\|LBS\\|ft\\|FT\\|kg\\|km\\|oz\\|hz\\|Hz\\|HZ\\|KHz\\|MHz\\|GHz\\)"
exit 0

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,128 @@
/*************************************************************************/
/* */
/* Language Technologies Institute */
/* Carnegie Mellon University */
/* Copyright (c) 2001 */
/* All Rights Reserved. */
/* */
/* Permission is hereby granted, free of charge, to use and distribute */
/* this software and its documentation without restriction, including */
/* without limitation the rights to use, copy, modify, merge, publish, */
/* distribute, sublicense, and/or sell copies of this work, and to */
/* permit persons to whom this work is furnished to do so, subject to */
/* the following conditions: */
/* 1. The code must retain the above copyright notice, this list of */
/* conditions and the following disclaimer. */
/* 2. Any modifications must be clearly marked as such. */
/* 3. Original authors' names are not deleted. */
/* 4. The authors' names are not used to endorse or promote products */
/* derived from this software without specific prior written */
/* permission. */
/* */
/* CARNEGIE MELLON UNIVERSITY AND THE CONTRIBUTORS TO THIS WORK */
/* DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING */
/* ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT */
/* SHALL CARNEGIE MELLON UNIVERSITY NOR THE CONTRIBUTORS BE LIABLE */
/* FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES */
/* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN */
/* AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, */
/* ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF */
/* THIS SOFTWARE. */
/* */
/*************************************************************************/
/* Author: Alan W Black (awb@cs.cmu.edu) */
/* Date: January 2001 */
/*************************************************************************/
/* duration stats (means, stddev) from cmu_com_kal */
/*************************************************************************/
#include "cst_synth.h"
static const dur_stat dur_stat_pau = { "pau", 0.2, 0.1 };
static const dur_stat dur_stat_zh = { "zh", 0.152593, 0.092321 };
static const dur_stat dur_stat_oy = { "oy", 0.160374, 0.077629 };
static const dur_stat dur_stat_aw = { "aw", 0.159485, 0.064687 };
static const dur_stat dur_stat_ch = { "ch", 0.135828, 0.043586 };
static const dur_stat dur_stat_th = { "th", 0.116027, 0.054892 };
static const dur_stat dur_stat_uh = { "uh", 0.061596, 0.023654 };
static const dur_stat dur_stat_g = { "g", 0.077797, 0.027193 };
static const dur_stat dur_stat_ae = { "ae", 0.115669, 0.047921 };
static const dur_stat dur_stat_sh = { "sh", 0.126018, 0.023275 };
static const dur_stat dur_stat_v = { "v", 0.045676, 0.017954 };
static const dur_stat dur_stat_eh = { "eh", 0.109237, 0.046925 };
static const dur_stat dur_stat_w = { "w", 0.052598, 0.024618 };
static const dur_stat dur_stat_ey = { "ey", 0.165883, 0.0757 };
static const dur_stat dur_stat_dh = { "dh", 0.035688, 0.021493 };
static const dur_stat dur_stat_ng = { "ng", 0.065651, 0.022119 };
static const dur_stat dur_stat_uw = { "uw", 0.102018, 0.047394 };
static const dur_stat dur_stat_er = { "er", 0.100174, 0.044822 };
static const dur_stat dur_stat_b = { "b", 0.063457, 0.02702 };
static const dur_stat dur_stat_ah = { "ah", 0.062256, 0.029903 };
static const dur_stat dur_stat_n = { "n", 0.058944, 0.029727 };
static const dur_stat dur_stat_t = { "t", 0.074067, 0.037846 };
static const dur_stat dur_stat_jh = { "jh", 0.083748, 0.029496 };
static const dur_stat dur_stat_ih = { "ih", 0.062962, 0.030609 };
static const dur_stat dur_stat_d = { "d", 0.050917, 0.031666 };
static const dur_stat dur_stat_f = { "f", 0.096548, 0.028515 };
static const dur_stat dur_stat_ao = { "ao", 0.091841, 0.049984 };
static const dur_stat dur_stat_y = { "y", 0.056909, 0.02774 };
static const dur_stat dur_stat_k = { "k", 0.089048, 0.040764 };
static const dur_stat dur_stat_z = { "z", 0.088234, 0.03877 };
static const dur_stat dur_stat_p = { "p", 0.099085, 0.033806 };
static const dur_stat dur_stat_iy = { "iy", 0.126115, 0.063085 };
static const dur_stat dur_stat_r = { "r", 0.052082, 0.023499 };
static const dur_stat dur_stat_aa = { "aa", 0.10923, 0.045992 };
static const dur_stat dur_stat_s = { "s", 0.108565, 0.041973 };
static const dur_stat dur_stat_m = { "m", 0.074447, 0.044589 };
static const dur_stat dur_stat_ay = { "ay", 0.151095, 0.045892 };
static const dur_stat dur_stat_ow = { "ow", 0.146084, 0.052605 };
static const dur_stat dur_stat_l = { "l", 0.065292, 0.033114 };
static const dur_stat dur_stat_ax = { "ax", 0.053852, 0.033216 };
static const dur_stat dur_stat_hh = { "hh", 0.067775, 0.021633 };
const dur_stat * const us_dur_stats[] = {
&dur_stat_uh,
&dur_stat_hh,
&dur_stat_ao,
&dur_stat_v,
&dur_stat_ih,
&dur_stat_ey,
&dur_stat_jh,
&dur_stat_w,
&dur_stat_uw,
&dur_stat_ae,
&dur_stat_k,
&dur_stat_y,
&dur_stat_l,
&dur_stat_ng,
&dur_stat_zh,
&dur_stat_z,
&dur_stat_m,
&dur_stat_iy,
&dur_stat_n,
&dur_stat_ah,
&dur_stat_er,
&dur_stat_b,
&dur_stat_pau,
&dur_stat_aw,
&dur_stat_p,
&dur_stat_ch,
&dur_stat_ow,
&dur_stat_dh,
&dur_stat_d,
&dur_stat_ax,
&dur_stat_r,
&dur_stat_eh,
&dur_stat_ay,
&dur_stat_oy,
&dur_stat_f,
&dur_stat_sh,
&dur_stat_s,
&dur_stat_g,
&dur_stat_th,
&dur_stat_aa,
&dur_stat_t,
NULL
} ;

View File

@ -0,0 +1,971 @@
/*************************************************************************/
/* */
/* Carnegie Mellon University and */
/* Centre for Speech Technology Research */
/* University of Edinburgh, UK */
/* Copyright (c) 1998-2001 */
/* All Rights Reserved. */
/* */
/* Permission is hereby granted, free of charge, to use and distribute */
/* this software and its documentation without restriction, including */
/* without limitation the rights to use, copy, modify, merge, publish, */
/* distribute, sublicense, and/or sell copies of this work, and to */
/* permit persons to whom this work is furnished to do so, subject to */
/* the following conditions: */
/* 1. The code must retain the above copyright notice, this list of */
/* conditions and the following disclaimer. */
/* 2. Any modifications must be clearly marked as such. */
/* 3. Original authors' names are not deleted. */
/* 4. The authors' names are not used to endorse or promote products */
/* derived from this software without specific prior written */
/* permission. */
/* */
/* THE UNIVERSITY OF EDINBURGH, CARNEGIE MELLON UNIVERSITY AND THE */
/* CONTRIBUTORS TO THIS WORK DISCLAIM ALL WARRANTIES WITH REGARD TO */
/* THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY */
/* AND FITNESS, IN NO EVENT SHALL THE UNIVERSITY OF EDINBURGH, CARNEGIE */
/* MELLON UNIVERSITY NOR THE CONTRIBUTORS BE LIABLE FOR ANY SPECIAL, */
/* INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER */
/* RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION */
/* OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF */
/* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */
/* */
/*************************************************************************/
/* Author: Alan W Black (awb@cs.cmu.edu) */
/* Date: January 2001 */
/*************************************************************************/
/* */
/* Derived directly from the duration model cart tree in University of */
/* Edinburgh's Festival Speech Synthesis Systems */
/* file: festival/lib/f2bdurtreeZ.scm */
/* which was in turn was trained from Boston University FM Radio Data */
/* Corpus */
/* */
/*************************************************************************/
/*******************************************************/
/** Autogenerated cart trees for us_durz */
/*******************************************************/
#include "cst_string.h"
#include "cst_cart.h"
#include "cst_regex.h"
#include "us_durz_cart.h"
extern const cst_cart us_durz_cart;
static const cst_cart_node us_durz_cart_nodes[] = {
{ 0, CST_CART_OP_IS, CTNODE_NO_0000, (cst_val *)&val_0000},
{ 1, CST_CART_OP_IS, CTNODE_NO_0001, (cst_val *)&val_0001},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0002 },
{ 2, CST_CART_OP_IS, CTNODE_NO_0003, (cst_val *)&val_0003},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0004 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0005 },
{ 3, CST_CART_OP_IS, CTNODE_NO_0006, (cst_val *)&val_0006},
{ 4, CST_CART_OP_IS, CTNODE_NO_0007, (cst_val *)&val_0006},
{ 5, CST_CART_OP_IS, CTNODE_NO_0008, (cst_val *)&val_0006},
{ 6, CST_CART_OP_LESS, CTNODE_NO_0009, (cst_val *)&val_0007},
{ 7, CST_CART_OP_IS, CTNODE_NO_0010, (cst_val *)&val_0008},
{ 8, CST_CART_OP_IS, CTNODE_NO_0011, (cst_val *)&val_0009},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0010 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0011 },
{ 8, CST_CART_OP_IS, CTNODE_NO_0014, (cst_val *)&val_0012},
{ 9, CST_CART_OP_IS, CTNODE_NO_0015, (cst_val *)&val_0013},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0014 },
{ 10, CST_CART_OP_LESS, CTNODE_NO_0017, (cst_val *)&val_0015},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0016 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0017 },
{ 11, CST_CART_OP_IS, CTNODE_NO_0020, (cst_val *)&val_0018},
{ 12, CST_CART_OP_IS, CTNODE_NO_0021, (cst_val *)&val_0019},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0020 },
{ 9, CST_CART_OP_IS, CTNODE_NO_0023, (cst_val *)&val_0019},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0021 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0022 },
{ 7, CST_CART_OP_IS, CTNODE_NO_0026, (cst_val *)&val_0012},
{ 13, CST_CART_OP_IS, CTNODE_NO_0027, (cst_val *)&val_0023},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0024 },
{ 8, CST_CART_OP_IS, CTNODE_NO_0029, (cst_val *)&val_0009},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0025 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0026 },
{ 14, CST_CART_OP_IS, CTNODE_NO_0032, (cst_val *)&val_0027},
{ 15, CST_CART_OP_LESS, CTNODE_NO_0033, (cst_val *)&val_0028},
{ 16, CST_CART_OP_LESS, CTNODE_NO_0034, (cst_val *)&val_0029},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0030 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0031 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0032 },
{ 8, CST_CART_OP_IS, CTNODE_NO_0038, (cst_val *)&val_0033},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0034 },
{ 10, CST_CART_OP_LESS, CTNODE_NO_0040, (cst_val *)&val_0029},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0035 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0036 },
{ 17, CST_CART_OP_LESS, CTNODE_NO_0043, (cst_val *)&val_0037},
{ 18, CST_CART_OP_IS, CTNODE_NO_0044, (cst_val *)&val_0013},
{ 19, CST_CART_OP_LESS, CTNODE_NO_0045, (cst_val *)&val_0038},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0039 },
{ 16, CST_CART_OP_LESS, CTNODE_NO_0047, (cst_val *)&val_0040},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0041 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0042 },
{ 20, CST_CART_OP_IS, CTNODE_NO_0050, (cst_val *)&val_0006},
{ 21, CST_CART_OP_IS, CTNODE_NO_0051, (cst_val *)&val_0043},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0044 },
{ 22, CST_CART_OP_LESS, CTNODE_NO_0053, (cst_val *)&val_0045},
{ 23, CST_CART_OP_IS, CTNODE_NO_0054, (cst_val *)&val_0046},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0047 },
{ 8, CST_CART_OP_IS, CTNODE_NO_0056, (cst_val *)&val_0009},
{ 16, CST_CART_OP_LESS, CTNODE_NO_0057, (cst_val *)&val_0048},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0049 },
{ 22, CST_CART_OP_LESS, CTNODE_NO_0059, (cst_val *)&val_0050},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0051 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0052 },
{ 22, CST_CART_OP_LESS, CTNODE_NO_0062, (cst_val *)&val_0053},
{ 22, CST_CART_OP_LESS, CTNODE_NO_0063, (cst_val *)&val_0054},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0055 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0056 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0057 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0058 },
{ 14, CST_CART_OP_IS, CTNODE_NO_0068, (cst_val *)&val_0059},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0060 },
{ 12, CST_CART_OP_IS, CTNODE_NO_0070, (cst_val *)&val_0019},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0061 },
{ 10, CST_CART_OP_LESS, CTNODE_NO_0072, (cst_val *)&val_0054},
{ 16, CST_CART_OP_LESS, CTNODE_NO_0073, (cst_val *)&val_0062},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0063 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0064 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0065 },
{ 8, CST_CART_OP_IS, CTNODE_NO_0077, (cst_val *)&val_0012},
{ 9, CST_CART_OP_IS, CTNODE_NO_0078, (cst_val *)&val_0006},
{ 18, CST_CART_OP_IS, CTNODE_NO_0079, (cst_val *)&val_0019},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0066 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0067 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0068 },
{ 9, CST_CART_OP_IS, CTNODE_NO_0083, (cst_val *)&val_0006},
{ 7, CST_CART_OP_IS, CTNODE_NO_0084, (cst_val *)&val_0012},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0069 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0070 },
{ 17, CST_CART_OP_LESS, CTNODE_NO_0087, (cst_val *)&val_0071},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0072 },
{ 7, CST_CART_OP_IS, CTNODE_NO_0089, (cst_val *)&val_0012},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0073 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0074 },
{ 9, CST_CART_OP_IS, CTNODE_NO_0092, (cst_val *)&val_0006},
{ 8, CST_CART_OP_IS, CTNODE_NO_0093, (cst_val *)&val_0008},
{ 21, CST_CART_OP_IS, CTNODE_NO_0094, (cst_val *)&val_0075},
{ 17, CST_CART_OP_LESS, CTNODE_NO_0095, (cst_val *)&val_0054},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0076 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0077 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0078 },
{ 22, CST_CART_OP_LESS, CTNODE_NO_0099, (cst_val *)&val_0079},
{ 22, CST_CART_OP_LESS, CTNODE_NO_0100, (cst_val *)&val_0080},
{ 21, CST_CART_OP_IS, CTNODE_NO_0101, (cst_val *)&val_0075},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0081 },
{ 16, CST_CART_OP_LESS, CTNODE_NO_0103, (cst_val *)&val_0053},
{ 8, CST_CART_OP_IS, CTNODE_NO_0104, (cst_val *)&val_0012},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0082 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0083 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0084 },
{ 13, CST_CART_OP_IS, CTNODE_NO_0108, (cst_val *)&val_0023},
{ 5, CST_CART_OP_IS, CTNODE_NO_0109, (cst_val *)&val_0046},
{ 15, CST_CART_OP_LESS, CTNODE_NO_0110, (cst_val *)&val_0085},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0086 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0087 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0088 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0089 },
{ 8, CST_CART_OP_IS, CTNODE_NO_0115, (cst_val *)&val_0033},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0090 },
{ 15, CST_CART_OP_LESS, CTNODE_NO_0117, (cst_val *)&val_0037},
{ 21, CST_CART_OP_IS, CTNODE_NO_0118, (cst_val *)&val_0075},
{ 24, CST_CART_OP_LESS, CTNODE_NO_0119, (cst_val *)&val_0050},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0091 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0092 },
{ 8, CST_CART_OP_IS, CTNODE_NO_0122, (cst_val *)&val_0012},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0093 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0094 },
{ 25, CST_CART_OP_IS, CTNODE_NO_0125, (cst_val *)&val_0006},
{ 5, CST_CART_OP_IS, CTNODE_NO_0126, (cst_val *)&val_0046},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0095 },
{ 16, CST_CART_OP_LESS, CTNODE_NO_0128, (cst_val *)&val_0080},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0096 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0097 },
{ 15, CST_CART_OP_LESS, CTNODE_NO_0131, (cst_val *)&val_0048},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0098 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0099 },
{ 17, CST_CART_OP_LESS, CTNODE_NO_0134, (cst_val *)&val_0028},
{ 18, CST_CART_OP_IS, CTNODE_NO_0135, (cst_val *)&val_0013},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0100 },
{ 8, CST_CART_OP_IS, CTNODE_NO_0137, (cst_val *)&val_0012},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0101 },
{ 16, CST_CART_OP_LESS, CTNODE_NO_0139, (cst_val *)&val_0102},
{ 16, CST_CART_OP_LESS, CTNODE_NO_0140, (cst_val *)&val_0028},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0103 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0104 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0105 },
{ 8, CST_CART_OP_IS, CTNODE_NO_0144, (cst_val *)&val_0012},
{ 5, CST_CART_OP_IS, CTNODE_NO_0145, (cst_val *)&val_0012},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0106 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0107 },
{ 8, CST_CART_OP_IS, CTNODE_NO_0148, (cst_val *)&val_0008},
{ 10, CST_CART_OP_LESS, CTNODE_NO_0149, (cst_val *)&val_0054},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0108 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0109 },
{ 25, CST_CART_OP_IS, CTNODE_NO_0152, (cst_val *)&val_0006},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0110 },
{ 17, CST_CART_OP_LESS, CTNODE_NO_0154, (cst_val *)&val_0054},
{ 22, CST_CART_OP_LESS, CTNODE_NO_0155, (cst_val *)&val_0111},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0112 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0113 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0114 },
{ 4, CST_CART_OP_IS, CTNODE_NO_0159, (cst_val *)&val_0009},
{ 17, CST_CART_OP_LESS, CTNODE_NO_0160, (cst_val *)&val_0007},
{ 18, CST_CART_OP_IS, CTNODE_NO_0161, (cst_val *)&val_0013},
{ 17, CST_CART_OP_LESS, CTNODE_NO_0162, (cst_val *)&val_0115},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0116 },
{ 21, CST_CART_OP_IS, CTNODE_NO_0164, (cst_val *)&val_0075},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0117 },
{ 26, CST_CART_OP_IS, CTNODE_NO_0166, (cst_val *)&val_0006},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0118 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0119 },
{ 8, CST_CART_OP_IS, CTNODE_NO_0169, (cst_val *)&val_0033},
{ 7, CST_CART_OP_IS, CTNODE_NO_0170, (cst_val *)&val_0012},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0120 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0121 },
{ 11, CST_CART_OP_IS, CTNODE_NO_0173, (cst_val *)&val_0046},
{ 7, CST_CART_OP_IS, CTNODE_NO_0174, (cst_val *)&val_0033},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0122 },
{ 14, CST_CART_OP_IS, CTNODE_NO_0176, (cst_val *)&val_0123},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0124 },
{ 26, CST_CART_OP_IS, CTNODE_NO_0178, (cst_val *)&val_0006},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0125 },
{ 16, CST_CART_OP_LESS, CTNODE_NO_0180, (cst_val *)&val_0126},
{ 12, CST_CART_OP_IS, CTNODE_NO_0181, (cst_val *)&val_0006},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0127 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0128 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0129 },
{ 8, CST_CART_OP_IS, CTNODE_NO_0185, (cst_val *)&val_0008},
{ 9, CST_CART_OP_IS, CTNODE_NO_0186, (cst_val *)&val_0019},
{ 27, CST_CART_OP_IS, CTNODE_NO_0187, (cst_val *)&val_0013},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0130 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0131 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0132 },
{ 7, CST_CART_OP_IS, CTNODE_NO_0191, (cst_val *)&val_0008},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0133 },
{ 7, CST_CART_OP_IS, CTNODE_NO_0193, (cst_val *)&val_0033},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0134 },
{ 6, CST_CART_OP_LESS, CTNODE_NO_0195, (cst_val *)&val_0048},
{ 16, CST_CART_OP_LESS, CTNODE_NO_0196, (cst_val *)&val_0126},
{ 7, CST_CART_OP_IS, CTNODE_NO_0197, (cst_val *)&val_0012},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0135 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0136 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0137 },
{ 28, CST_CART_OP_IS, CTNODE_NO_0201, (cst_val *)&val_0019},
{ 26, CST_CART_OP_IS, CTNODE_NO_0202, (cst_val *)&val_0006},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0138 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0139 },
{ 19, CST_CART_OP_LESS, CTNODE_NO_0205, (cst_val *)&val_0028},
{ 10, CST_CART_OP_LESS, CTNODE_NO_0206, (cst_val *)&val_0007},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0140 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0141 },
{ 5, CST_CART_OP_IS, CTNODE_NO_0209, (cst_val *)&val_0046},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0142 },
{ 14, CST_CART_OP_IS, CTNODE_NO_0211, (cst_val *)&val_0143},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0144 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0145 },
{ 8, CST_CART_OP_IS, CTNODE_NO_0214, (cst_val *)&val_0008},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0146 },
{ 5, CST_CART_OP_IS, CTNODE_NO_0216, (cst_val *)&val_0012},
{ 25, CST_CART_OP_IS, CTNODE_NO_0217, (cst_val *)&val_0006},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0147 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0148 },
{ 8, CST_CART_OP_IS, CTNODE_NO_0220, (cst_val *)&val_0009},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0149 },
{ 8, CST_CART_OP_IS, CTNODE_NO_0222, (cst_val *)&val_0012},
{ 18, CST_CART_OP_IS, CTNODE_NO_0223, (cst_val *)&val_0006},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0150 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0151 },
{ 9, CST_CART_OP_IS, CTNODE_NO_0226, (cst_val *)&val_0019},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0152 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0153 },
{ 5, CST_CART_OP_IS, CTNODE_NO_0229, (cst_val *)&val_0006},
{ 7, CST_CART_OP_IS, CTNODE_NO_0230, (cst_val *)&val_0033},
{ 11, CST_CART_OP_IS, CTNODE_NO_0231, (cst_val *)&val_0006},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0154 },
{ 16, CST_CART_OP_LESS, CTNODE_NO_0233, (cst_val *)&val_0007},
{ 11, CST_CART_OP_IS, CTNODE_NO_0234, (cst_val *)&val_0012},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0155 },
{ 4, CST_CART_OP_IS, CTNODE_NO_0236, (cst_val *)&val_0012},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0156 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0157 },
{ 26, CST_CART_OP_IS, CTNODE_NO_0239, (cst_val *)&val_0006},
{ 28, CST_CART_OP_IS, CTNODE_NO_0240, (cst_val *)&val_0013},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0158 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0159 },
{ 28, CST_CART_OP_IS, CTNODE_NO_0243, (cst_val *)&val_0019},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0160 },
{ 17, CST_CART_OP_LESS, CTNODE_NO_0245, (cst_val *)&val_0028},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0161 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0162 },
{ 11, CST_CART_OP_IS, CTNODE_NO_0248, (cst_val *)&val_0046},
{ 8, CST_CART_OP_IS, CTNODE_NO_0249, (cst_val *)&val_0006},
{ 4, CST_CART_OP_IS, CTNODE_NO_0250, (cst_val *)&val_0012},
{ 7, CST_CART_OP_IS, CTNODE_NO_0251, (cst_val *)&val_0009},
{ 19, CST_CART_OP_LESS, CTNODE_NO_0252, (cst_val *)&val_0038},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0163 },
{ 17, CST_CART_OP_LESS, CTNODE_NO_0254, (cst_val *)&val_0115},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0164 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0165 },
{ 7, CST_CART_OP_IS, CTNODE_NO_0257, (cst_val *)&val_0012},
{ 19, CST_CART_OP_LESS, CTNODE_NO_0258, (cst_val *)&val_0038},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0166 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0167 },
{ 16, CST_CART_OP_LESS, CTNODE_NO_0261, (cst_val *)&val_0071},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0168 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0169 },
{ 20, CST_CART_OP_IS, CTNODE_NO_0264, (cst_val *)&val_0006},
{ 18, CST_CART_OP_IS, CTNODE_NO_0265, (cst_val *)&val_0006},
{ 12, CST_CART_OP_IS, CTNODE_NO_0266, (cst_val *)&val_0019},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0170 },
{ 22, CST_CART_OP_LESS, CTNODE_NO_0268, (cst_val *)&val_0053},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0171 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0172 },
{ 9, CST_CART_OP_IS, CTNODE_NO_0271, (cst_val *)&val_0019},
{ 16, CST_CART_OP_LESS, CTNODE_NO_0272, (cst_val *)&val_0062},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0173 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0174 },
{ 15, CST_CART_OP_LESS, CTNODE_NO_0275, (cst_val *)&val_0028},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0175 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0176 },
{ 21, CST_CART_OP_IS, CTNODE_NO_0278, (cst_val *)&val_0075},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0177 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0178 },
{ 21, CST_CART_OP_IS, CTNODE_NO_0281, (cst_val *)&val_0179},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0180 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0181 },
{ 8, CST_CART_OP_IS, CTNODE_NO_0284, (cst_val *)&val_0012},
{ 17, CST_CART_OP_LESS, CTNODE_NO_0285, (cst_val *)&val_0054},
{ 19, CST_CART_OP_LESS, CTNODE_NO_0286, (cst_val *)&val_0038},
{ 12, CST_CART_OP_IS, CTNODE_NO_0287, (cst_val *)&val_0019},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0182 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0183 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0184 },
{ 12, CST_CART_OP_IS, CTNODE_NO_0291, (cst_val *)&val_0019},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0185 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0186 },
{ 11, CST_CART_OP_IS, CTNODE_NO_0294, (cst_val *)&val_0012},
{ 4, CST_CART_OP_IS, CTNODE_NO_0295, (cst_val *)&val_0012},
{ 14, CST_CART_OP_IS, CTNODE_NO_0296, (cst_val *)&val_0143},
{ 21, CST_CART_OP_IS, CTNODE_NO_0297, (cst_val *)&val_0187},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0188 },
{ 24, CST_CART_OP_LESS, CTNODE_NO_0299, (cst_val *)&val_0189},
{ 16, CST_CART_OP_LESS, CTNODE_NO_0300, (cst_val *)&val_0004},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0190 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0191 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0192 },
{ 28, CST_CART_OP_IS, CTNODE_NO_0304, (cst_val *)&val_0193},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0194 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0195 },
{ 14, CST_CART_OP_IS, CTNODE_NO_0307, (cst_val *)&val_0123},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0196 },
{ 18, CST_CART_OP_IS, CTNODE_NO_0309, (cst_val *)&val_0013},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0197 },
{ 14, CST_CART_OP_IS, CTNODE_NO_0311, (cst_val *)&val_0143},
{ 18, CST_CART_OP_IS, CTNODE_NO_0312, (cst_val *)&val_0019},
{ 4, CST_CART_OP_IS, CTNODE_NO_0313, (cst_val *)&val_0008},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0198 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0199 },
{ 24, CST_CART_OP_LESS, CTNODE_NO_0316, (cst_val *)&val_0126},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0200 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0201 },
{ 16, CST_CART_OP_LESS, CTNODE_NO_0319, (cst_val *)&val_0202},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0203 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0204 },
{ 18, CST_CART_OP_IS, CTNODE_NO_0322, (cst_val *)&val_0006},
{ 7, CST_CART_OP_IS, CTNODE_NO_0323, (cst_val *)&val_0009},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0205 },
{ 26, CST_CART_OP_IS, CTNODE_NO_0325, (cst_val *)&val_0019},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0206 },
{ 11, CST_CART_OP_IS, CTNODE_NO_0327, (cst_val *)&val_0018},
{ 21, CST_CART_OP_IS, CTNODE_NO_0328, (cst_val *)&val_0179},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0207 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0208 },
{ 6, CST_CART_OP_LESS, CTNODE_NO_0331, (cst_val *)&val_0126},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0209 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0210 },
{ 23, CST_CART_OP_IS, CTNODE_NO_0334, (cst_val *)&val_0012},
{ 8, CST_CART_OP_IS, CTNODE_NO_0335, (cst_val *)&val_0009},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0211 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0212 },
{ 7, CST_CART_OP_IS, CTNODE_NO_0338, (cst_val *)&val_0009},
{ 14, CST_CART_OP_IS, CTNODE_NO_0339, (cst_val *)&val_0123},
{ 18, CST_CART_OP_IS, CTNODE_NO_0340, (cst_val *)&val_0019},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0213 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0214 },
{ 22, CST_CART_OP_LESS, CTNODE_NO_0343, (cst_val *)&val_0215},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0216 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0217 },
{ 9, CST_CART_OP_IS, CTNODE_NO_0346, (cst_val *)&val_0019},
{ 14, CST_CART_OP_IS, CTNODE_NO_0347, (cst_val *)&val_0218},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0219 },
{ 11, CST_CART_OP_IS, CTNODE_NO_0349, (cst_val *)&val_0018},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0220 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0221 },
{ 22, CST_CART_OP_LESS, CTNODE_NO_0352, (cst_val *)&val_0053},
{ 21, CST_CART_OP_IS, CTNODE_NO_0353, (cst_val *)&val_0075},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0222 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0223 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0224 },
{ 4, CST_CART_OP_IS, CTNODE_NO_0357, (cst_val *)&val_0033},
{ 21, CST_CART_OP_IS, CTNODE_NO_0358, (cst_val *)&val_0075},
{ 5, CST_CART_OP_IS, CTNODE_NO_0359, (cst_val *)&val_0046},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0225 },
{ 8, CST_CART_OP_IS, CTNODE_NO_0361, (cst_val *)&val_0012},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0226 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0227 },
{ 16, CST_CART_OP_LESS, CTNODE_NO_0364, (cst_val *)&val_0080},
{ 22, CST_CART_OP_LESS, CTNODE_NO_0365, (cst_val *)&val_0102},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0228 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0229 },
{ 27, CST_CART_OP_IS, CTNODE_NO_0368, (cst_val *)&val_0019},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0230 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0231 },
{ 12, CST_CART_OP_IS, CTNODE_NO_0371, (cst_val *)&val_0006},
{ 8, CST_CART_OP_IS, CTNODE_NO_0372, (cst_val *)&val_0009},
{ 4, CST_CART_OP_IS, CTNODE_NO_0373, (cst_val *)&val_0012},
{ 14, CST_CART_OP_IS, CTNODE_NO_0374, (cst_val *)&val_0143},
{ 18, CST_CART_OP_IS, CTNODE_NO_0375, (cst_val *)&val_0006},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0232 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0233 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0234 },
{ 5, CST_CART_OP_IS, CTNODE_NO_0379, (cst_val *)&val_0012},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0235 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0236 },
{ 11, CST_CART_OP_IS, CTNODE_NO_0382, (cst_val *)&val_0012},
{ 28, CST_CART_OP_IS, CTNODE_NO_0383, (cst_val *)&val_0019},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0237 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0238 },
{ 19, CST_CART_OP_LESS, CTNODE_NO_0386, (cst_val *)&val_0054},
{ 17, CST_CART_OP_LESS, CTNODE_NO_0387, (cst_val *)&val_0054},
{ 18, CST_CART_OP_IS, CTNODE_NO_0388, (cst_val *)&val_0013},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0239 },
{ 18, CST_CART_OP_IS, CTNODE_NO_0390, (cst_val *)&val_0019},
{ 28, CST_CART_OP_IS, CTNODE_NO_0391, (cst_val *)&val_0013},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0240 },
{ 21, CST_CART_OP_IS, CTNODE_NO_0393, (cst_val *)&val_0075},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0241 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0242 },
{ 22, CST_CART_OP_LESS, CTNODE_NO_0396, (cst_val *)&val_0243},
{ 4, CST_CART_OP_IS, CTNODE_NO_0397, (cst_val *)&val_0012},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0244 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0245 },
{ 6, CST_CART_OP_LESS, CTNODE_NO_0400, (cst_val *)&val_0126},
{ 21, CST_CART_OP_IS, CTNODE_NO_0401, (cst_val *)&val_0179},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0246 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0247 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0248 },
{ 8, CST_CART_OP_IS, CTNODE_NO_0405, (cst_val *)&val_0012},
{ 4, CST_CART_OP_IS, CTNODE_NO_0406, (cst_val *)&val_0012},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0249 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0250 },
{ 18, CST_CART_OP_IS, CTNODE_NO_0409, (cst_val *)&val_0019},
{ 16, CST_CART_OP_LESS, CTNODE_NO_0410, (cst_val *)&val_0251},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0252 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0253 },
{ 8, CST_CART_OP_IS, CTNODE_NO_0413, (cst_val *)&val_0033},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0254 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0255 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0256 },
{ 21, CST_CART_OP_IS, CTNODE_NO_0417, (cst_val *)&val_0179},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0257 },
{ 22, CST_CART_OP_LESS, CTNODE_NO_0419, (cst_val *)&val_0258},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0259 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0260 },
{ 22, CST_CART_OP_LESS, CTNODE_NO_0422, (cst_val *)&val_0050},
{ 22, CST_CART_OP_LESS, CTNODE_NO_0423, (cst_val *)&val_0038},
{ 13, CST_CART_OP_IS, CTNODE_NO_0424, (cst_val *)&val_0023},
{ 8, CST_CART_OP_IS, CTNODE_NO_0425, (cst_val *)&val_0012},
{ 9, CST_CART_OP_IS, CTNODE_NO_0426, (cst_val *)&val_0261},
{ 23, CST_CART_OP_IS, CTNODE_NO_0427, (cst_val *)&val_0006},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0262 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0263 },
{ 4, CST_CART_OP_IS, CTNODE_NO_0430, (cst_val *)&val_0006},
{ 9, CST_CART_OP_IS, CTNODE_NO_0431, (cst_val *)&val_0013},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0264 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0265 },
{ 12, CST_CART_OP_IS, CTNODE_NO_0434, (cst_val *)&val_0006},
{ 25, CST_CART_OP_IS, CTNODE_NO_0435, (cst_val *)&val_0006},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0266 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0267 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0268 },
{ 4, CST_CART_OP_IS, CTNODE_NO_0439, (cst_val *)&val_0009},
{ 8, CST_CART_OP_IS, CTNODE_NO_0440, (cst_val *)&val_0009},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0269 },
{ 11, CST_CART_OP_IS, CTNODE_NO_0442, (cst_val *)&val_0270},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0271 },
{ 8, CST_CART_OP_IS, CTNODE_NO_0444, (cst_val *)&val_0006},
{ 10, CST_CART_OP_LESS, CTNODE_NO_0445, (cst_val *)&val_0054},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0272 },
{ 28, CST_CART_OP_IS, CTNODE_NO_0447, (cst_val *)&val_0019},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0273 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0274 },
{ 16, CST_CART_OP_LESS, CTNODE_NO_0450, (cst_val *)&val_0080},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0275 },
{ 9, CST_CART_OP_IS, CTNODE_NO_0452, (cst_val *)&val_0013},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0276 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0277 },
{ 4, CST_CART_OP_IS, CTNODE_NO_0455, (cst_val *)&val_0006},
{ 8, CST_CART_OP_IS, CTNODE_NO_0456, (cst_val *)&val_0008},
{ 9, CST_CART_OP_IS, CTNODE_NO_0457, (cst_val *)&val_0013},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0278 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0279 },
{ 9, CST_CART_OP_IS, CTNODE_NO_0460, (cst_val *)&val_0261},
{ 21, CST_CART_OP_IS, CTNODE_NO_0461, (cst_val *)&val_0179},
{ 8, CST_CART_OP_IS, CTNODE_NO_0462, (cst_val *)&val_0009},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0280 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0281 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0282 },
{ 8, CST_CART_OP_IS, CTNODE_NO_0466, (cst_val *)&val_0006},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0283 },
{ 27, CST_CART_OP_IS, CTNODE_NO_0468, (cst_val *)&val_0019},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0284 },
{ 19, CST_CART_OP_LESS, CTNODE_NO_0470, (cst_val *)&val_0038},
{ 26, CST_CART_OP_IS, CTNODE_NO_0471, (cst_val *)&val_0006},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0285 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0286 },
{ 7, CST_CART_OP_IS, CTNODE_NO_0474, (cst_val *)&val_0006},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0287 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0288 },
{ 8, CST_CART_OP_IS, CTNODE_NO_0477, (cst_val *)&val_0009},
{ 7, CST_CART_OP_IS, CTNODE_NO_0478, (cst_val *)&val_0006},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0289 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0290 },
{ 21, CST_CART_OP_IS, CTNODE_NO_0481, (cst_val *)&val_0179},
{ 4, CST_CART_OP_IS, CTNODE_NO_0482, (cst_val *)&val_0008},
{ 15, CST_CART_OP_LESS, CTNODE_NO_0483, (cst_val *)&val_0037},
{ 16, CST_CART_OP_LESS, CTNODE_NO_0484, (cst_val *)&val_0215},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0291 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0292 },
{ 24, CST_CART_OP_LESS, CTNODE_NO_0487, (cst_val *)&val_0050},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0293 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0294 },
{ 6, CST_CART_OP_LESS, CTNODE_NO_0490, (cst_val *)&val_0126},
{ 7, CST_CART_OP_IS, CTNODE_NO_0491, (cst_val *)&val_0006},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0295 },
{ 9, CST_CART_OP_IS, CTNODE_NO_0493, (cst_val *)&val_0013},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0296 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0297 },
{ 25, CST_CART_OP_IS, CTNODE_NO_0496, (cst_val *)&val_0006},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0298 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0299 },
{ 11, CST_CART_OP_IS, CTNODE_NO_0499, (cst_val *)&val_0012},
{ 9, CST_CART_OP_IS, CTNODE_NO_0500, (cst_val *)&val_0013},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0300 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0301 },
{ 8, CST_CART_OP_IS, CTNODE_NO_0503, (cst_val *)&val_0006},
{ 7, CST_CART_OP_IS, CTNODE_NO_0504, (cst_val *)&val_0033},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0302 },
{ 9, CST_CART_OP_IS, CTNODE_NO_0506, (cst_val *)&val_0013},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0303 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0304 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0305 },
{ 5, CST_CART_OP_IS, CTNODE_NO_0510, (cst_val *)&val_0006},
{ 17, CST_CART_OP_LESS, CTNODE_NO_0511, (cst_val *)&val_0015},
{ 21, CST_CART_OP_IS, CTNODE_NO_0512, (cst_val *)&val_0179},
{ 8, CST_CART_OP_IS, CTNODE_NO_0513, (cst_val *)&val_0033},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0306 },
{ 8, CST_CART_OP_IS, CTNODE_NO_0515, (cst_val *)&val_0012},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0307 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0308 },
{ 8, CST_CART_OP_IS, CTNODE_NO_0518, (cst_val *)&val_0012},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0309 },
{ 7, CST_CART_OP_IS, CTNODE_NO_0520, (cst_val *)&val_0009},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0310 },
{ 15, CST_CART_OP_LESS, CTNODE_NO_0522, (cst_val *)&val_0028},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0311 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0312 },
{ 7, CST_CART_OP_IS, CTNODE_NO_0525, (cst_val *)&val_0009},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0313 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0314 },
{ 8, CST_CART_OP_IS, CTNODE_NO_0528, (cst_val *)&val_0012},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0315 },
{ 15, CST_CART_OP_LESS, CTNODE_NO_0530, (cst_val *)&val_0054},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0316 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0317 },
{ 17, CST_CART_OP_LESS, CTNODE_NO_0533, (cst_val *)&val_0048},
{ 9, CST_CART_OP_IS, CTNODE_NO_0534, (cst_val *)&val_0006},
{ 17, CST_CART_OP_LESS, CTNODE_NO_0535, (cst_val *)&val_0115},
{ 21, CST_CART_OP_IS, CTNODE_NO_0536, (cst_val *)&val_0075},
{ 7, CST_CART_OP_IS, CTNODE_NO_0537, (cst_val *)&val_0008},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0318 },
{ 8, CST_CART_OP_IS, CTNODE_NO_0539, (cst_val *)&val_0012},
{ 4, CST_CART_OP_IS, CTNODE_NO_0540, (cst_val *)&val_0033},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0319 },
{ 5, CST_CART_OP_IS, CTNODE_NO_0542, (cst_val *)&val_0006},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0320 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0321 },
{ 5, CST_CART_OP_IS, CTNODE_NO_0545, (cst_val *)&val_0006},
{ 13, CST_CART_OP_IS, CTNODE_NO_0546, (cst_val *)&val_0023},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0322 },
{ 7, CST_CART_OP_IS, CTNODE_NO_0548, (cst_val *)&val_0009},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0323 },
{ 8, CST_CART_OP_IS, CTNODE_NO_0550, (cst_val *)&val_0009},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0324 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0325 },
{ 22, CST_CART_OP_LESS, CTNODE_NO_0553, (cst_val *)&val_0080},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0326 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0327 },
{ 28, CST_CART_OP_IS, CTNODE_NO_0556, (cst_val *)&val_0019},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0328 },
{ 10, CST_CART_OP_LESS, CTNODE_NO_0558, (cst_val *)&val_0329},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0330 },
{ 7, CST_CART_OP_IS, CTNODE_NO_0560, (cst_val *)&val_0012},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0331 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0332 },
{ 28, CST_CART_OP_IS, CTNODE_NO_0563, (cst_val *)&val_0193},
{ 7, CST_CART_OP_IS, CTNODE_NO_0564, (cst_val *)&val_0012},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0333 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0334 },
{ 13, CST_CART_OP_IS, CTNODE_NO_0567, (cst_val *)&val_0023},
{ 4, CST_CART_OP_IS, CTNODE_NO_0568, (cst_val *)&val_0006},
{ 24, CST_CART_OP_LESS, CTNODE_NO_0569, (cst_val *)&val_0111},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0335 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0336 },
{ 25, CST_CART_OP_IS, CTNODE_NO_0572, (cst_val *)&val_0006},
{ 24, CST_CART_OP_LESS, CTNODE_NO_0573, (cst_val *)&val_0050},
{ 28, CST_CART_OP_IS, CTNODE_NO_0574, (cst_val *)&val_0019},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0337 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0338 },
{ 27, CST_CART_OP_IS, CTNODE_NO_0577, (cst_val *)&val_0013},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0339 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0340 },
{ 5, CST_CART_OP_IS, CTNODE_NO_0580, (cst_val *)&val_0006},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0341 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0342 },
{ 8, CST_CART_OP_IS, CTNODE_NO_0583, (cst_val *)&val_0033},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0343 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0344 },
{ 4, CST_CART_OP_IS, CTNODE_NO_0586, (cst_val *)&val_0009},
{ 11, CST_CART_OP_IS, CTNODE_NO_0587, (cst_val *)&val_0006},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0345 },
{ 6, CST_CART_OP_LESS, CTNODE_NO_0589, (cst_val *)&val_0048},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0346 },
{ 23, CST_CART_OP_IS, CTNODE_NO_0591, (cst_val *)&val_0006},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0347 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0348 },
{ 5, CST_CART_OP_IS, CTNODE_NO_0594, (cst_val *)&val_0018},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0349 },
{ 5, CST_CART_OP_IS, CTNODE_NO_0596, (cst_val *)&val_0046},
{ 21, CST_CART_OP_IS, CTNODE_NO_0597, (cst_val *)&val_0179},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0350 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0351 },
{ 11, CST_CART_OP_IS, CTNODE_NO_0600, (cst_val *)&val_0006},
{ 17, CST_CART_OP_LESS, CTNODE_NO_0601, (cst_val *)&val_0115},
{ 21, CST_CART_OP_IS, CTNODE_NO_0602, (cst_val *)&val_0179},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0352 },
{ 26, CST_CART_OP_IS, CTNODE_NO_0604, (cst_val *)&val_0006},
{ 7, CST_CART_OP_IS, CTNODE_NO_0605, (cst_val *)&val_0009},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0353 },
{ 22, CST_CART_OP_LESS, CTNODE_NO_0607, (cst_val *)&val_0080},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0354 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0355 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0356 },
{ 21, CST_CART_OP_IS, CTNODE_NO_0611, (cst_val *)&val_0179},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0357 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0358 },
{ 4, CST_CART_OP_IS, CTNODE_NO_0614, (cst_val *)&val_0006},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0359 },
{ 11, CST_CART_OP_IS, CTNODE_NO_0616, (cst_val *)&val_0012},
{ 10, CST_CART_OP_LESS, CTNODE_NO_0617, (cst_val *)&val_0071},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0360 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0361 },
{ 22, CST_CART_OP_LESS, CTNODE_NO_0620, (cst_val *)&val_0080},
{ 21, CST_CART_OP_IS, CTNODE_NO_0621, (cst_val *)&val_0179},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0362 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0363 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0364 },
{ 8, CST_CART_OP_IS, CTNODE_NO_0625, (cst_val *)&val_0012},
{ 4, CST_CART_OP_IS, CTNODE_NO_0626, (cst_val *)&val_0012},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0365 },
{ 7, CST_CART_OP_IS, CTNODE_NO_0628, (cst_val *)&val_0008},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0366 },
{ 4, CST_CART_OP_IS, CTNODE_NO_0630, (cst_val *)&val_0033},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0367 },
{ 4, CST_CART_OP_IS, CTNODE_NO_0632, (cst_val *)&val_0006},
{ 21, CST_CART_OP_IS, CTNODE_NO_0633, (cst_val *)&val_0075},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0368 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0369 },
{ 16, CST_CART_OP_LESS, CTNODE_NO_0636, (cst_val *)&val_0071},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0370 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0371 },
{ 8, CST_CART_OP_IS, CTNODE_NO_0639, (cst_val *)&val_0009},
{ 6, CST_CART_OP_LESS, CTNODE_NO_0640, (cst_val *)&val_0126},
{ 19, CST_CART_OP_LESS, CTNODE_NO_0641, (cst_val *)&val_0038},
{ 22, CST_CART_OP_LESS, CTNODE_NO_0642, (cst_val *)&val_0080},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0372 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0373 },
{ 27, CST_CART_OP_IS, CTNODE_NO_0645, (cst_val *)&val_0013},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0374 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0375 },
{ 22, CST_CART_OP_LESS, CTNODE_NO_0648, (cst_val *)&val_0080},
{ 7, CST_CART_OP_IS, CTNODE_NO_0649, (cst_val *)&val_0012},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0376 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0377 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0378 },
{ 7, CST_CART_OP_IS, CTNODE_NO_0653, (cst_val *)&val_0033},
{ 22, CST_CART_OP_LESS, CTNODE_NO_0654, (cst_val *)&val_0080},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0379 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0380 },
{ 6, CST_CART_OP_LESS, CTNODE_NO_0657, (cst_val *)&val_0126},
{ 8, CST_CART_OP_IS, CTNODE_NO_0658, (cst_val *)&val_0018},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0381 },
{ 21, CST_CART_OP_IS, CTNODE_NO_0660, (cst_val *)&val_0075},
{ 8, CST_CART_OP_IS, CTNODE_NO_0661, (cst_val *)&val_0008},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0382 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0383 },
{ 7, CST_CART_OP_IS, CTNODE_NO_0664, (cst_val *)&val_0006},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0384 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0385 },
{ 9, CST_CART_OP_IS, CTNODE_NO_0667, (cst_val *)&val_0006},
{ 8, CST_CART_OP_IS, CTNODE_NO_0668, (cst_val *)&val_0008},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0386 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0387 },
{ 4, CST_CART_OP_IS, CTNODE_NO_0671, (cst_val *)&val_0012},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0388 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0389 },
{ 17, CST_CART_OP_LESS, CTNODE_NO_0674, (cst_val *)&val_0015},
{ 5, CST_CART_OP_IS, CTNODE_NO_0675, (cst_val *)&val_0006},
{ 21, CST_CART_OP_IS, CTNODE_NO_0676, (cst_val *)&val_0043},
{ 8, CST_CART_OP_IS, CTNODE_NO_0677, (cst_val *)&val_0006},
{ 28, CST_CART_OP_IS, CTNODE_NO_0678, (cst_val *)&val_0013},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0390 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0391 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0392 },
{ 8, CST_CART_OP_IS, CTNODE_NO_0682, (cst_val *)&val_0012},
{ 18, CST_CART_OP_IS, CTNODE_NO_0683, (cst_val *)&val_0013},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0393 },
{ 21, CST_CART_OP_IS, CTNODE_NO_0685, (cst_val *)&val_0187},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0394 },
{ 22, CST_CART_OP_LESS, CTNODE_NO_0687, (cst_val *)&val_0395},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0396 },
{ 10, CST_CART_OP_LESS, CTNODE_NO_0689, (cst_val *)&val_0085},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0397 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0398 },
{ 4, CST_CART_OP_IS, CTNODE_NO_0692, (cst_val *)&val_0008},
{ 15, CST_CART_OP_LESS, CTNODE_NO_0693, (cst_val *)&val_0399},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0400 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0401 },
{ 13, CST_CART_OP_IS, CTNODE_NO_0696, (cst_val *)&val_0023},
{ 27, CST_CART_OP_IS, CTNODE_NO_0697, (cst_val *)&val_0013},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0402 },
{ 4, CST_CART_OP_IS, CTNODE_NO_0699, (cst_val *)&val_0009},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0403 },
{ 22, CST_CART_OP_LESS, CTNODE_NO_0701, (cst_val *)&val_0404},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0405 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0406 },
{ 21, CST_CART_OP_IS, CTNODE_NO_0704, (cst_val *)&val_0179},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0407 },
{ 16, CST_CART_OP_LESS, CTNODE_NO_0706, (cst_val *)&val_0215},
{ 18, CST_CART_OP_IS, CTNODE_NO_0707, (cst_val *)&val_0013},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0408 },
{ 8, CST_CART_OP_IS, CTNODE_NO_0709, (cst_val *)&val_0008},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0409 },
{ 10, CST_CART_OP_LESS, CTNODE_NO_0711, (cst_val *)&val_0054},
{ 8, CST_CART_OP_IS, CTNODE_NO_0712, (cst_val *)&val_0009},
{ 15, CST_CART_OP_LESS, CTNODE_NO_0713, (cst_val *)&val_0037},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0410 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0411 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0412 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0413 },
{ 21, CST_CART_OP_IS, CTNODE_NO_0718, (cst_val *)&val_0075},
{ 8, CST_CART_OP_IS, CTNODE_NO_0719, (cst_val *)&val_0009},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0414 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0415 },
{ 8, CST_CART_OP_IS, CTNODE_NO_0722, (cst_val *)&val_0009},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0416 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0417 },
{ 28, CST_CART_OP_IS, CTNODE_NO_0725, (cst_val *)&val_0006},
{ 5, CST_CART_OP_IS, CTNODE_NO_0726, (cst_val *)&val_0012},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0418 },
{ 4, CST_CART_OP_IS, CTNODE_NO_0728, (cst_val *)&val_0033},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0419 },
{ 4, CST_CART_OP_IS, CTNODE_NO_0730, (cst_val *)&val_0006},
{ 18, CST_CART_OP_IS, CTNODE_NO_0731, (cst_val *)&val_0019},
{ 16, CST_CART_OP_LESS, CTNODE_NO_0732, (cst_val *)&val_0420},
{ 25, CST_CART_OP_IS, CTNODE_NO_0733, (cst_val *)&val_0006},
{ 5, CST_CART_OP_IS, CTNODE_NO_0734, (cst_val *)&val_0018},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0421 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0422 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0423 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0424 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0425 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0426 },
{ 28, CST_CART_OP_IS, CTNODE_NO_0741, (cst_val *)&val_0013},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0427 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0428 },
{ 4, CST_CART_OP_IS, CTNODE_NO_0744, (cst_val *)&val_0009},
{ 8, CST_CART_OP_IS, CTNODE_NO_0745, (cst_val *)&val_0012},
{ 5, CST_CART_OP_IS, CTNODE_NO_0746, (cst_val *)&val_0006},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0429 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0430 },
{ 8, CST_CART_OP_IS, CTNODE_NO_0749, (cst_val *)&val_0009},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0431 },
{ 9, CST_CART_OP_IS, CTNODE_NO_0751, (cst_val *)&val_0006},
{ 7, CST_CART_OP_IS, CTNODE_NO_0752, (cst_val *)&val_0012},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0432 },
{ 7, CST_CART_OP_IS, CTNODE_NO_0754, (cst_val *)&val_0033},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0433 },
{ 16, CST_CART_OP_LESS, CTNODE_NO_0756, (cst_val *)&val_0062},
{ 8, CST_CART_OP_IS, CTNODE_NO_0757, (cst_val *)&val_0006},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0434 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0435 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0436 },
{ 11, CST_CART_OP_IS, CTNODE_NO_0761, (cst_val *)&val_0012},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0437 },
{ 8, CST_CART_OP_IS, CTNODE_NO_0763, (cst_val *)&val_0008},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0438 },
{ 16, CST_CART_OP_LESS, CTNODE_NO_0765, (cst_val *)&val_0126},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0439 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0440 },
{ 6, CST_CART_OP_LESS, CTNODE_NO_0768, (cst_val *)&val_0071},
{ 19, CST_CART_OP_LESS, CTNODE_NO_0769, (cst_val *)&val_0028},
{ 21, CST_CART_OP_IS, CTNODE_NO_0770, (cst_val *)&val_0075},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0441 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0442 },
{ 17, CST_CART_OP_LESS, CTNODE_NO_0773, (cst_val *)&val_0054},
{ 18, CST_CART_OP_IS, CTNODE_NO_0774, (cst_val *)&val_0019},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0443 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0444 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0445 },
{ 17, CST_CART_OP_LESS, CTNODE_NO_0778, (cst_val *)&val_0111},
{ 13, CST_CART_OP_IS, CTNODE_NO_0779, (cst_val *)&val_0023},
{ 8, CST_CART_OP_IS, CTNODE_NO_0780, (cst_val *)&val_0033},
{ 4, CST_CART_OP_IS, CTNODE_NO_0781, (cst_val *)&val_0012},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0446 },
{ 7, CST_CART_OP_IS, CTNODE_NO_0783, (cst_val *)&val_0006},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0447 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0448 },
{ 8, CST_CART_OP_IS, CTNODE_NO_0786, (cst_val *)&val_0018},
{ 4, CST_CART_OP_IS, CTNODE_NO_0787, (cst_val *)&val_0006},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0449 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0450 },
{ 28, CST_CART_OP_IS, CTNODE_NO_0790, (cst_val *)&val_0193},
{ 11, CST_CART_OP_IS, CTNODE_NO_0791, (cst_val *)&val_0270},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0451 },
{ 4, CST_CART_OP_IS, CTNODE_NO_0793, (cst_val *)&val_0033},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0452 },
{ 21, CST_CART_OP_IS, CTNODE_NO_0795, (cst_val *)&val_0075},
{ 24, CST_CART_OP_LESS, CTNODE_NO_0796, (cst_val *)&val_0050},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0453 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0454 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0455 },
{ 4, CST_CART_OP_IS, CTNODE_NO_0800, (cst_val *)&val_0033},
{ 7, CST_CART_OP_IS, CTNODE_NO_0801, (cst_val *)&val_0006},
{ 17, CST_CART_OP_LESS, CTNODE_NO_0802, (cst_val *)&val_0054},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0456 },
{ 26, CST_CART_OP_IS, CTNODE_NO_0804, (cst_val *)&val_0006},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0457 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0458 },
{ 19, CST_CART_OP_LESS, CTNODE_NO_0807, (cst_val *)&val_0038},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0459 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0460 },
{ 27, CST_CART_OP_IS, CTNODE_NO_0810, (cst_val *)&val_0013},
{ 8, CST_CART_OP_IS, CTNODE_NO_0811, (cst_val *)&val_0012},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0461 },
{ 4, CST_CART_OP_IS, CTNODE_NO_0813, (cst_val *)&val_0012},
{ 11, CST_CART_OP_IS, CTNODE_NO_0814, (cst_val *)&val_0006},
{ 16, CST_CART_OP_LESS, CTNODE_NO_0815, (cst_val *)&val_0050},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0462 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0463 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0464 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0465 },
{ 5, CST_CART_OP_IS, CTNODE_NO_0820, (cst_val *)&val_0046},
{ 7, CST_CART_OP_IS, CTNODE_NO_0821, (cst_val *)&val_0006},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0466 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0467 },
{ 7, CST_CART_OP_IS, CTNODE_NO_0824, (cst_val *)&val_0033},
{ 9, CST_CART_OP_IS, CTNODE_NO_0825, (cst_val *)&val_0006},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0468 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0469 },
{ 11, CST_CART_OP_IS, CTNODE_NO_0828, (cst_val *)&val_0006},
{ 19, CST_CART_OP_LESS, CTNODE_NO_0829, (cst_val *)&val_0038},
{ 20, CST_CART_OP_IS, CTNODE_NO_0830, (cst_val *)&val_0006},
{ 9, CST_CART_OP_IS, CTNODE_NO_0831, (cst_val *)&val_0006},
{ 5, CST_CART_OP_IS, CTNODE_NO_0832, (cst_val *)&val_0270},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0470 },
{ 8, CST_CART_OP_IS, CTNODE_NO_0834, (cst_val *)&val_0012},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0471 },
{ 8, CST_CART_OP_IS, CTNODE_NO_0836, (cst_val *)&val_0009},
{ 5, CST_CART_OP_IS, CTNODE_NO_0837, (cst_val *)&val_0012},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0472 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0473 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0474 },
{ 8, CST_CART_OP_IS, CTNODE_NO_0841, (cst_val *)&val_0012},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0475 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0476 },
{ 22, CST_CART_OP_LESS, CTNODE_NO_0844, (cst_val *)&val_0395},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0477 },
{ 8, CST_CART_OP_IS, CTNODE_NO_0846, (cst_val *)&val_0012},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0478 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0479 },
{ 18, CST_CART_OP_IS, CTNODE_NO_0849, (cst_val *)&val_0013},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0480 },
{ 8, CST_CART_OP_IS, CTNODE_NO_0851, (cst_val *)&val_0008},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0481 },
{ 9, CST_CART_OP_IS, CTNODE_NO_0853, (cst_val *)&val_0006},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0482 },
{ 6, CST_CART_OP_LESS, CTNODE_NO_0855, (cst_val *)&val_0126},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0483 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0484 },
{ 17, CST_CART_OP_LESS, CTNODE_NO_0858, (cst_val *)&val_0054},
{ 9, CST_CART_OP_IS, CTNODE_NO_0859, (cst_val *)&val_0006},
{ 4, CST_CART_OP_IS, CTNODE_NO_0860, (cst_val *)&val_0008},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0485 },
{ 22, CST_CART_OP_LESS, CTNODE_NO_0862, (cst_val *)&val_0395},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0486 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0487 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0488 },
{ 20, CST_CART_OP_IS, CTNODE_NO_0866, (cst_val *)&val_0006},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0489 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0490 },
{ 8, CST_CART_OP_IS, CTNODE_NO_0869, (cst_val *)&val_0033},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0491 },
{ 19, CST_CART_OP_LESS, CTNODE_NO_0871, (cst_val *)&val_0038},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0492 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0493 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0494 },
{ 255, CST_CART_OP_NONE, 0, 0}};
static const char * const us_durz_feat_table[] = {
"name",
"emph_sil",
"p.R:SylStructure.parent.parent.pbreak",
"R:SylStructure.parent.accented",
"n.ph_ctype",
"p.ph_vlng",
"R:SylStructure.parent.syl_codasize",
"p.ph_ctype",
"ph_ctype",
"R:SylStructure.parent.syl_break",
"R:SylStructure.parent.asyl_in",
"ph_vlng",
"p.p.ph_vfront",
"seg_onsetcoda",
"R:SylStructure.parent.parent.gpos",
"R:SylStructure.parent.last_accent",
"R:SylStructure.parent.sub_phrases",
"pos_in_syl",
"R:SylStructure.parent.R:Syllable.p.syl_break",
"R:SylStructure.parent.R:Syllable.n.syl_onsetsize",
"seg_onset_stop",
"R:SylStructure.parent.position_type",
"R:SylStructure.parent.syl_out",
"p.p.ph_vlng",
"R:SylStructure.parent.parent.word_numsyls",
"seg_coda_fric",
"n.n.ph_vheight",
"n.n.ph_vfront",
"ph_vheight",
NULL };
const cst_cart us_durz_cart = {
us_durz_cart_nodes,
us_durz_feat_table
};

View File

@ -0,0 +1,973 @@
/*************************************************************************/
/* */
/* Carnegie Mellon University and */
/* Centre for Speech Technology Research */
/* University of Edinburgh, UK */
/* Copyright (c) 1998-2001 */
/* All Rights Reserved. */
/* */
/* Permission is hereby granted, free of charge, to use and distribute */
/* this software and its documentation without restriction, including */
/* without limitation the rights to use, copy, modify, merge, publish, */
/* distribute, sublicense, and/or sell copies of this work, and to */
/* permit persons to whom this work is furnished to do so, subject to */
/* the following conditions: */
/* 1. The code must retain the above copyright notice, this list of */
/* conditions and the following disclaimer. */
/* 2. Any modifications must be clearly marked as such. */
/* 3. Original authors' names are not deleted. */
/* 4. The authors' names are not used to endorse or promote products */
/* derived from this software without specific prior written */
/* permission. */
/* */
/* THE UNIVERSITY OF EDINBURGH, CARNEGIE MELLON UNIVERSITY AND THE */
/* CONTRIBUTORS TO THIS WORK DISCLAIM ALL WARRANTIES WITH REGARD TO */
/* THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY */
/* AND FITNESS, IN NO EVENT SHALL THE UNIVERSITY OF EDINBURGH, CARNEGIE */
/* MELLON UNIVERSITY NOR THE CONTRIBUTORS BE LIABLE FOR ANY SPECIAL, */
/* INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER */
/* RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION */
/* OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF */
/* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */
/* */
/*************************************************************************/
/* Author: Alan W Black (awb@cs.cmu.edu) */
/* Date: January 2001 */
/*************************************************************************/
/*******************************************************/
/** Autogenerated cart tree for us_durz */
/** from . */
/*******************************************************/
DEF_STATIC_CONST_VAL_STRING(val_0000,"pau");
DEF_STATIC_CONST_VAL_STRING(val_0001,"+");
DEF_STATIC_CONST_VAL_FLOAT(val_0002,-0.500000);
#define CTNODE_NO_0001 3
DEF_STATIC_CONST_VAL_STRING(val_0003,"BB");
DEF_STATIC_CONST_VAL_FLOAT(val_0004,2.000000);
#define CTNODE_NO_0003 5
DEF_STATIC_CONST_VAL_FLOAT(val_0005,0.000000);
#define CTNODE_NO_0000 6
DEF_STATIC_CONST_VAL_STRING(val_0006,"0");
DEF_STATIC_CONST_VAL_FLOAT(val_0007,1.500000);
DEF_STATIC_CONST_VAL_STRING(val_0008,"n");
DEF_STATIC_CONST_VAL_STRING(val_0009,"f");
DEF_STATIC_CONST_VAL_FLOAT(val_0010,-0.783163);
#define CTNODE_NO_0011 13
DEF_STATIC_CONST_VAL_FLOAT(val_0011,-0.222704);
#define CTNODE_NO_0010 14
DEF_STATIC_CONST_VAL_STRING(val_0012,"s");
DEF_STATIC_CONST_VAL_STRING(val_0013,"2");
DEF_STATIC_CONST_VAL_FLOAT(val_0014,0.764459);
#define CTNODE_NO_0015 17
DEF_STATIC_CONST_VAL_FLOAT(val_0015,0.700000);
DEF_STATIC_CONST_VAL_FLOAT(val_0016,0.567944);
#define CTNODE_NO_0017 19
DEF_STATIC_CONST_VAL_FLOAT(val_0017,0.053027);
#define CTNODE_NO_0014 20
DEF_STATIC_CONST_VAL_STRING(val_0018,"l");
DEF_STATIC_CONST_VAL_STRING(val_0019,"1");
DEF_STATIC_CONST_VAL_FLOAT(val_0020,0.766486);
#define CTNODE_NO_0021 23
DEF_STATIC_CONST_VAL_FLOAT(val_0021,0.279248);
#define CTNODE_NO_0023 25
DEF_STATIC_CONST_VAL_FLOAT(val_0022,0.056777);
#define CTNODE_NO_0020 26
DEF_STATIC_CONST_VAL_STRING(val_0023,"coda");
DEF_STATIC_CONST_VAL_FLOAT(val_0024,-0.038356);
#define CTNODE_NO_0027 29
DEF_STATIC_CONST_VAL_FLOAT(val_0025,-0.545853);
#define CTNODE_NO_0029 31
DEF_STATIC_CONST_VAL_FLOAT(val_0026,-0.765994);
#define CTNODE_NO_0026 32
DEF_STATIC_CONST_VAL_STRING(val_0027,"det");
DEF_STATIC_CONST_VAL_FLOAT(val_0028,0.300000);
DEF_STATIC_CONST_VAL_FLOAT(val_0029,1.000000);
DEF_STATIC_CONST_VAL_FLOAT(val_0030,0.160195);
#define CTNODE_NO_0034 36
DEF_STATIC_CONST_VAL_FLOAT(val_0031,0.713958);
#define CTNODE_NO_0033 37
DEF_STATIC_CONST_VAL_FLOAT(val_0032,-0.215472);
#define CTNODE_NO_0032 38
DEF_STATIC_CONST_VAL_STRING(val_0033,"r");
DEF_STATIC_CONST_VAL_FLOAT(val_0034,0.092772);
#define CTNODE_NO_0038 40
DEF_STATIC_CONST_VAL_FLOAT(val_0035,0.001328);
#define CTNODE_NO_0040 42
DEF_STATIC_CONST_VAL_FLOAT(val_0036,-0.334898);
#define CTNODE_NO_0009 43
DEF_STATIC_CONST_VAL_FLOAT(val_0037,0.500000);
DEF_STATIC_CONST_VAL_FLOAT(val_0038,0.200000);
DEF_STATIC_CONST_VAL_FLOAT(val_0039,-0.041618);
#define CTNODE_NO_0045 47
DEF_STATIC_CONST_VAL_FLOAT(val_0040,2.300000);
DEF_STATIC_CONST_VAL_FLOAT(val_0041,0.262952);
#define CTNODE_NO_0047 49
DEF_STATIC_CONST_VAL_FLOAT(val_0042,0.594794);
#define CTNODE_NO_0044 50
DEF_STATIC_CONST_VAL_STRING(val_0043,"mid");
DEF_STATIC_CONST_VAL_FLOAT(val_0044,-0.760444);
#define CTNODE_NO_0051 53
DEF_STATIC_CONST_VAL_FLOAT(val_0045,6.800000);
DEF_STATIC_CONST_VAL_STRING(val_0046,"a");
DEF_STATIC_CONST_VAL_FLOAT(val_0047,-0.450449);
#define CTNODE_NO_0054 56
DEF_STATIC_CONST_VAL_FLOAT(val_0048,1.300000);
DEF_STATIC_CONST_VAL_FLOAT(val_0049,-0.296956);
#define CTNODE_NO_0057 59
DEF_STATIC_CONST_VAL_FLOAT(val_0050,2.400000);
DEF_STATIC_CONST_VAL_FLOAT(val_0051,0.042287);
#define CTNODE_NO_0059 61
DEF_STATIC_CONST_VAL_FLOAT(val_0052,-0.154465);
#define CTNODE_NO_0056 62
DEF_STATIC_CONST_VAL_FLOAT(val_0053,3.600000);
DEF_STATIC_CONST_VAL_FLOAT(val_0054,1.200000);
DEF_STATIC_CONST_VAL_FLOAT(val_0055,-0.264199);
#define CTNODE_NO_0063 65
DEF_STATIC_CONST_VAL_FLOAT(val_0056,-0.541738);
#define CTNODE_NO_0062 66
DEF_STATIC_CONST_VAL_FLOAT(val_0057,-0.166623);
#define CTNODE_NO_0053 67
DEF_STATIC_CONST_VAL_FLOAT(val_0058,-0.571730);
#define CTNODE_NO_0050 68
DEF_STATIC_CONST_VAL_STRING(val_0059,"cc");
DEF_STATIC_CONST_VAL_FLOAT(val_0060,0.313289);
#define CTNODE_NO_0068 70
DEF_STATIC_CONST_VAL_FLOAT(val_0061,0.069582);
#define CTNODE_NO_0070 72
DEF_STATIC_CONST_VAL_FLOAT(val_0062,2.700000);
DEF_STATIC_CONST_VAL_FLOAT(val_0063,-0.367088);
#define CTNODE_NO_0073 75
DEF_STATIC_CONST_VAL_FLOAT(val_0064,-0.194887);
#define CTNODE_NO_0072 76
DEF_STATIC_CONST_VAL_FLOAT(val_0065,-0.063749);
#define CTNODE_NO_0043 77
DEF_STATIC_CONST_VAL_FLOAT(val_0066,-0.333421);
#define CTNODE_NO_0079 81
DEF_STATIC_CONST_VAL_FLOAT(val_0067,-0.165383);
#define CTNODE_NO_0078 82
DEF_STATIC_CONST_VAL_FLOAT(val_0068,-0.516332);
#define CTNODE_NO_0077 83
DEF_STATIC_CONST_VAL_FLOAT(val_0069,-0.779112);
#define CTNODE_NO_0084 86
DEF_STATIC_CONST_VAL_FLOAT(val_0070,-0.337611);
#define CTNODE_NO_0083 87
DEF_STATIC_CONST_VAL_FLOAT(val_0071,1.400000);
DEF_STATIC_CONST_VAL_FLOAT(val_0072,-0.745807);
#define CTNODE_NO_0087 89
DEF_STATIC_CONST_VAL_FLOAT(val_0073,-1.049070);
#define CTNODE_NO_0089 91
DEF_STATIC_CONST_VAL_FLOAT(val_0074,-0.914974);
#define CTNODE_NO_0008 92
DEF_STATIC_CONST_VAL_STRING(val_0075,"initial");
DEF_STATIC_CONST_VAL_FLOAT(val_0076,0.172658);
#define CTNODE_NO_0095 97
DEF_STATIC_CONST_VAL_FLOAT(val_0077,-0.101423);
#define CTNODE_NO_0094 98
DEF_STATIC_CONST_VAL_FLOAT(val_0078,-0.360092);
#define CTNODE_NO_0093 99
DEF_STATIC_CONST_VAL_FLOAT(val_0079,2.900000);
DEF_STATIC_CONST_VAL_FLOAT(val_0080,1.100000);
DEF_STATIC_CONST_VAL_FLOAT(val_0081,0.764189);
#define CTNODE_NO_0101 103
DEF_STATIC_CONST_VAL_FLOAT(val_0082,0.555132);
#define CTNODE_NO_0104 106
DEF_STATIC_CONST_VAL_FLOAT(val_0083,0.369882);
#define CTNODE_NO_0103 107
DEF_STATIC_CONST_VAL_FLOAT(val_0084,0.666966);
#define CTNODE_NO_0100 108
DEF_STATIC_CONST_VAL_FLOAT(val_0085,0.400000);
DEF_STATIC_CONST_VAL_FLOAT(val_0086,0.240634);
#define CTNODE_NO_0110 112
DEF_STATIC_CONST_VAL_FLOAT(val_0087,0.486176);
#define CTNODE_NO_0109 113
DEF_STATIC_CONST_VAL_FLOAT(val_0088,0.573811);
#define CTNODE_NO_0108 114
DEF_STATIC_CONST_VAL_FLOAT(val_0089,0.194468);
#define CTNODE_NO_0099 115
DEF_STATIC_CONST_VAL_FLOAT(val_0090,0.499383);
#define CTNODE_NO_0115 117
DEF_STATIC_CONST_VAL_FLOAT(val_0091,0.073732);
#define CTNODE_NO_0119 121
DEF_STATIC_CONST_VAL_FLOAT(val_0092,0.331014);
#define CTNODE_NO_0118 122
DEF_STATIC_CONST_VAL_FLOAT(val_0093,0.092930);
#define CTNODE_NO_0122 124
DEF_STATIC_CONST_VAL_FLOAT(val_0094,-0.044327);
#define CTNODE_NO_0117 125
DEF_STATIC_CONST_VAL_FLOAT(val_0095,0.517681);
#define CTNODE_NO_0126 128
DEF_STATIC_CONST_VAL_FLOAT(val_0096,0.128316);
#define CTNODE_NO_0128 130
DEF_STATIC_CONST_VAL_FLOAT(val_0097,0.361383);
#define CTNODE_NO_0125 131
DEF_STATIC_CONST_VAL_FLOAT(val_0098,0.054136);
#define CTNODE_NO_0131 133
DEF_STATIC_CONST_VAL_FLOAT(val_0099,0.246742);
#define CTNODE_NO_0092 134
DEF_STATIC_CONST_VAL_FLOAT(val_0100,0.621547);
#define CTNODE_NO_0135 137
DEF_STATIC_CONST_VAL_FLOAT(val_0101,0.501679);
#define CTNODE_NO_0137 139
DEF_STATIC_CONST_VAL_FLOAT(val_0102,3.300000);
DEF_STATIC_CONST_VAL_FLOAT(val_0103,-0.042049);
#define CTNODE_NO_0140 142
DEF_STATIC_CONST_VAL_FLOAT(val_0104,0.183226);
#define CTNODE_NO_0139 143
DEF_STATIC_CONST_VAL_FLOAT(val_0105,0.284799);
#define CTNODE_NO_0134 144
DEF_STATIC_CONST_VAL_FLOAT(val_0106,-0.820934);
#define CTNODE_NO_0145 147
DEF_STATIC_CONST_VAL_FLOAT(val_0107,-0.348735);
#define CTNODE_NO_0144 148
DEF_STATIC_CONST_VAL_FLOAT(val_0108,-0.400920);
#define CTNODE_NO_0149 151
DEF_STATIC_CONST_VAL_FLOAT(val_0109,-0.639366);
#define CTNODE_NO_0148 152
DEF_STATIC_CONST_VAL_FLOAT(val_0110,0.364857);
#define CTNODE_NO_0152 154
DEF_STATIC_CONST_VAL_FLOAT(val_0111,3.400000);
DEF_STATIC_CONST_VAL_FLOAT(val_0112,-0.007686);
#define CTNODE_NO_0155 157
DEF_STATIC_CONST_VAL_FLOAT(val_0113,-0.197753);
#define CTNODE_NO_0154 158
DEF_STATIC_CONST_VAL_FLOAT(val_0114,-0.394632);
#define CTNODE_NO_0007 159
DEF_STATIC_CONST_VAL_FLOAT(val_0115,0.100000);
DEF_STATIC_CONST_VAL_FLOAT(val_0116,0.938841);
#define CTNODE_NO_0162 164
DEF_STATIC_CONST_VAL_FLOAT(val_0117,-0.079664);
#define CTNODE_NO_0164 166
DEF_STATIC_CONST_VAL_FLOAT(val_0118,0.480026);
#define CTNODE_NO_0166 168
DEF_STATIC_CONST_VAL_FLOAT(val_0119,0.127175);
#define CTNODE_NO_0161 169
DEF_STATIC_CONST_VAL_FLOAT(val_0120,-0.708767);
#define CTNODE_NO_0170 172
DEF_STATIC_CONST_VAL_FLOAT(val_0121,-0.236212);
#define CTNODE_NO_0169 173
DEF_STATIC_CONST_VAL_FLOAT(val_0122,-0.273389);
#define CTNODE_NO_0174 176
DEF_STATIC_CONST_VAL_STRING(val_0123,"in");
DEF_STATIC_CONST_VAL_FLOAT(val_0124,0.058134);
#define CTNODE_NO_0176 178
DEF_STATIC_CONST_VAL_FLOAT(val_0125,0.721904);
#define CTNODE_NO_0178 180
DEF_STATIC_CONST_VAL_FLOAT(val_0126,2.200000);
DEF_STATIC_CONST_VAL_FLOAT(val_0127,0.016121);
#define CTNODE_NO_0181 183
DEF_STATIC_CONST_VAL_FLOAT(val_0128,0.227372);
#define CTNODE_NO_0180 184
DEF_STATIC_CONST_VAL_FLOAT(val_0129,0.445569);
#define CTNODE_NO_0173 185
DEF_STATIC_CONST_VAL_FLOAT(val_0130,-0.120097);
#define CTNODE_NO_0187 189
DEF_STATIC_CONST_VAL_FLOAT(val_0131,0.219042);
#define CTNODE_NO_0186 190
DEF_STATIC_CONST_VAL_FLOAT(val_0132,0.321245);
#define CTNODE_NO_0185 191
DEF_STATIC_CONST_VAL_FLOAT(val_0133,0.134075);
#define CTNODE_NO_0191 193
DEF_STATIC_CONST_VAL_FLOAT(val_0134,-0.466418);
#define CTNODE_NO_0193 195
DEF_STATIC_CONST_VAL_FLOAT(val_0135,-0.425925);
#define CTNODE_NO_0197 199
DEF_STATIC_CONST_VAL_FLOAT(val_0136,-0.542809);
#define CTNODE_NO_0196 200
DEF_STATIC_CONST_VAL_FLOAT(val_0137,-0.201899);
#define CTNODE_NO_0195 201
DEF_STATIC_CONST_VAL_FLOAT(val_0138,0.209018);
#define CTNODE_NO_0202 204
DEF_STATIC_CONST_VAL_FLOAT(val_0139,-0.178136);
#define CTNODE_NO_0201 205
DEF_STATIC_CONST_VAL_FLOAT(val_0140,-0.235593);
#define CTNODE_NO_0206 208
DEF_STATIC_CONST_VAL_FLOAT(val_0141,0.126118);
#define CTNODE_NO_0205 209
DEF_STATIC_CONST_VAL_FLOAT(val_0142,-0.174812);
#define CTNODE_NO_0209 211
DEF_STATIC_CONST_VAL_STRING(val_0143,"content");
DEF_STATIC_CONST_VAL_FLOAT(val_0144,-0.231509);
#define CTNODE_NO_0211 213
DEF_STATIC_CONST_VAL_FLOAT(val_0145,-0.536405);
#define CTNODE_NO_0160 214
DEF_STATIC_CONST_VAL_FLOAT(val_0146,0.163343);
#define CTNODE_NO_0214 216
DEF_STATIC_CONST_VAL_FLOAT(val_0147,-0.455280);
#define CTNODE_NO_0217 219
DEF_STATIC_CONST_VAL_FLOAT(val_0148,-0.099803);
#define CTNODE_NO_0216 220
DEF_STATIC_CONST_VAL_FLOAT(val_0149,-0.930547);
#define CTNODE_NO_0220 222
DEF_STATIC_CONST_VAL_FLOAT(val_0150,-0.634119);
#define CTNODE_NO_0223 225
DEF_STATIC_CONST_VAL_FLOAT(val_0151,-0.760176);
#define CTNODE_NO_0222 226
DEF_STATIC_CONST_VAL_FLOAT(val_0152,-0.121355);
#define CTNODE_NO_0226 228
DEF_STATIC_CONST_VAL_FLOAT(val_0153,-0.557509);
#define CTNODE_NO_0159 229
DEF_STATIC_CONST_VAL_FLOAT(val_0154,-0.402734);
#define CTNODE_NO_0231 233
DEF_STATIC_CONST_VAL_FLOAT(val_0155,-0.988478);
#define CTNODE_NO_0234 236
DEF_STATIC_CONST_VAL_FLOAT(val_0156,-0.802536);
#define CTNODE_NO_0236 238
DEF_STATIC_CONST_VAL_FLOAT(val_0157,-0.900628);
#define CTNODE_NO_0233 239
DEF_STATIC_CONST_VAL_FLOAT(val_0158,-0.768992);
#define CTNODE_NO_0240 242
DEF_STATIC_CONST_VAL_FLOAT(val_0159,-0.574918);
#define CTNODE_NO_0239 243
DEF_STATIC_CONST_VAL_FLOAT(val_0160,-0.756359);
#define CTNODE_NO_0243 245
DEF_STATIC_CONST_VAL_FLOAT(val_0161,-0.808937);
#define CTNODE_NO_0245 247
DEF_STATIC_CONST_VAL_FLOAT(val_0162,-0.933150);
#define CTNODE_NO_0230 248
DEF_STATIC_CONST_VAL_FLOAT(val_0163,-0.428493);
#define CTNODE_NO_0252 254
DEF_STATIC_CONST_VAL_FLOAT(val_0164,0.021107);
#define CTNODE_NO_0254 256
DEF_STATIC_CONST_VAL_FLOAT(val_0165,-0.254485);
#define CTNODE_NO_0251 257
DEF_STATIC_CONST_VAL_FLOAT(val_0166,-0.389966);
#define CTNODE_NO_0258 260
DEF_STATIC_CONST_VAL_FLOAT(val_0167,0.185781);
#define CTNODE_NO_0257 261
DEF_STATIC_CONST_VAL_FLOAT(val_0168,0.422551);
#define CTNODE_NO_0261 263
DEF_STATIC_CONST_VAL_FLOAT(val_0169,0.145576);
#define CTNODE_NO_0250 264
DEF_STATIC_CONST_VAL_FLOAT(val_0170,-0.623190);
#define CTNODE_NO_0266 268
DEF_STATIC_CONST_VAL_FLOAT(val_0171,-0.317324);
#define CTNODE_NO_0268 270
DEF_STATIC_CONST_VAL_FLOAT(val_0172,-0.591051);
#define CTNODE_NO_0265 271
DEF_STATIC_CONST_VAL_FLOAT(val_0173,-0.405607);
#define CTNODE_NO_0272 274
DEF_STATIC_CONST_VAL_FLOAT(val_0174,-0.313148);
#define CTNODE_NO_0271 275
DEF_STATIC_CONST_VAL_FLOAT(val_0175,0.159416);
#define CTNODE_NO_0275 277
DEF_STATIC_CONST_VAL_FLOAT(val_0176,-0.254651);
#define CTNODE_NO_0264 278
DEF_STATIC_CONST_VAL_FLOAT(val_0177,-0.799896);
#define CTNODE_NO_0278 280
DEF_STATIC_CONST_VAL_FLOAT(val_0178,-0.551309);
#define CTNODE_NO_0249 281
DEF_STATIC_CONST_VAL_STRING(val_0179,"final");
DEF_STATIC_CONST_VAL_FLOAT(val_0180,-0.707084);
#define CTNODE_NO_0281 283
DEF_STATIC_CONST_VAL_FLOAT(val_0181,-0.901874);
#define CTNODE_NO_0248 284
DEF_STATIC_CONST_VAL_FLOAT(val_0182,0.196466);
#define CTNODE_NO_0287 289
DEF_STATIC_CONST_VAL_FLOAT(val_0183,0.003824);
#define CTNODE_NO_0286 290
DEF_STATIC_CONST_VAL_FLOAT(val_0184,-0.128590);
#define CTNODE_NO_0285 291
DEF_STATIC_CONST_VAL_FLOAT(val_0185,-0.219339);
#define CTNODE_NO_0291 293
DEF_STATIC_CONST_VAL_FLOAT(val_0186,-0.516734);
#define CTNODE_NO_0284 294
DEF_STATIC_CONST_VAL_STRING(val_0187,"single");
DEF_STATIC_CONST_VAL_FLOAT(val_0188,0.159445);
#define CTNODE_NO_0297 299
DEF_STATIC_CONST_VAL_FLOAT(val_0189,3.500000);
DEF_STATIC_CONST_VAL_FLOAT(val_0190,-0.419103);
#define CTNODE_NO_0300 302
DEF_STATIC_CONST_VAL_FLOAT(val_0191,-0.092856);
#define CTNODE_NO_0299 303
DEF_STATIC_CONST_VAL_FLOAT(val_0192,-0.576116);
#define CTNODE_NO_0296 304
DEF_STATIC_CONST_VAL_STRING(val_0193,"3");
DEF_STATIC_CONST_VAL_FLOAT(val_0194,-0.645830);
#define CTNODE_NO_0304 306
DEF_STATIC_CONST_VAL_FLOAT(val_0195,-0.466500);
#define CTNODE_NO_0295 307
DEF_STATIC_CONST_VAL_FLOAT(val_0196,-0.217292);
#define CTNODE_NO_0307 309
DEF_STATIC_CONST_VAL_FLOAT(val_0197,-0.304382);
#define CTNODE_NO_0309 311
DEF_STATIC_CONST_VAL_FLOAT(val_0198,-0.572203);
#define CTNODE_NO_0313 315
DEF_STATIC_CONST_VAL_FLOAT(val_0199,-0.240338);
#define CTNODE_NO_0312 316
DEF_STATIC_CONST_VAL_FLOAT(val_0200,-0.588171);
#define CTNODE_NO_0316 318
DEF_STATIC_CONST_VAL_FLOAT(val_0201,-0.957970);
#define CTNODE_NO_0311 319
DEF_STATIC_CONST_VAL_FLOAT(val_0202,3.900000);
DEF_STATIC_CONST_VAL_FLOAT(val_0203,-0.959427);
#define CTNODE_NO_0319 321
DEF_STATIC_CONST_VAL_FLOAT(val_0204,-0.845747);
#define CTNODE_NO_0294 322
DEF_STATIC_CONST_VAL_FLOAT(val_0205,-0.482247);
#define CTNODE_NO_0323 325
DEF_STATIC_CONST_VAL_FLOAT(val_0206,-0.632362);
#define CTNODE_NO_0325 327
DEF_STATIC_CONST_VAL_FLOAT(val_0207,-0.713117);
#define CTNODE_NO_0328 330
DEF_STATIC_CONST_VAL_FLOAT(val_0208,-0.924308);
#define CTNODE_NO_0327 331
DEF_STATIC_CONST_VAL_FLOAT(val_0209,-0.891342);
#define CTNODE_NO_0331 333
DEF_STATIC_CONST_VAL_FLOAT(val_0210,-1.152520);
#define CTNODE_NO_0322 334
DEF_STATIC_CONST_VAL_FLOAT(val_0211,-0.599624);
#define CTNODE_NO_0335 337
DEF_STATIC_CONST_VAL_FLOAT(val_0212,-0.077191);
#define CTNODE_NO_0334 338
DEF_STATIC_CONST_VAL_FLOAT(val_0213,-1.032420);
#define CTNODE_NO_0340 342
DEF_STATIC_CONST_VAL_FLOAT(val_0214,-0.542799);
#define CTNODE_NO_0339 343
DEF_STATIC_CONST_VAL_FLOAT(val_0215,2.800000);
DEF_STATIC_CONST_VAL_FLOAT(val_0216,-0.423979);
#define CTNODE_NO_0343 345
DEF_STATIC_CONST_VAL_FLOAT(val_0217,-0.766379);
#define CTNODE_NO_0338 346
DEF_STATIC_CONST_VAL_STRING(val_0218,"to");
DEF_STATIC_CONST_VAL_FLOAT(val_0219,-0.792895);
#define CTNODE_NO_0347 349
DEF_STATIC_CONST_VAL_FLOAT(val_0220,-0.276816);
#define CTNODE_NO_0349 351
DEF_STATIC_CONST_VAL_FLOAT(val_0221,-0.523721);
#define CTNODE_NO_0346 352
DEF_STATIC_CONST_VAL_FLOAT(val_0222,-0.488102);
#define CTNODE_NO_0353 355
DEF_STATIC_CONST_VAL_FLOAT(val_0223,-0.731758);
#define CTNODE_NO_0352 356
DEF_STATIC_CONST_VAL_FLOAT(val_0224,-0.822229);
#define CTNODE_NO_0229 357
DEF_STATIC_CONST_VAL_FLOAT(val_0225,1.023340);
#define CTNODE_NO_0359 361
DEF_STATIC_CONST_VAL_FLOAT(val_0226,0.536277);
#define CTNODE_NO_0361 363
DEF_STATIC_CONST_VAL_FLOAT(val_0227,0.138201);
#define CTNODE_NO_0358 364
DEF_STATIC_CONST_VAL_FLOAT(val_0228,-0.234710);
#define CTNODE_NO_0365 367
DEF_STATIC_CONST_VAL_FLOAT(val_0229,-0.525292);
#define CTNODE_NO_0364 368
DEF_STATIC_CONST_VAL_FLOAT(val_0230,0.417485);
#define CTNODE_NO_0368 370
DEF_STATIC_CONST_VAL_FLOAT(val_0231,-0.078200);
#define CTNODE_NO_0357 371
DEF_STATIC_CONST_VAL_FLOAT(val_0232,-0.569410);
#define CTNODE_NO_0375 377
DEF_STATIC_CONST_VAL_FLOAT(val_0233,-0.289362);
#define CTNODE_NO_0374 378
DEF_STATIC_CONST_VAL_FLOAT(val_0234,-0.092104);
#define CTNODE_NO_0373 379
DEF_STATIC_CONST_VAL_FLOAT(val_0235,0.139463);
#define CTNODE_NO_0379 381
DEF_STATIC_CONST_VAL_FLOAT(val_0236,-0.070872);
#define CTNODE_NO_0372 382
DEF_STATIC_CONST_VAL_FLOAT(val_0237,-0.618971);
#define CTNODE_NO_0383 385
DEF_STATIC_CONST_VAL_FLOAT(val_0238,-0.840495);
#define CTNODE_NO_0382 386
DEF_STATIC_CONST_VAL_FLOAT(val_0239,0.009134);
#define CTNODE_NO_0388 390
DEF_STATIC_CONST_VAL_FLOAT(val_0240,-0.512523);
#define CTNODE_NO_0391 393
DEF_STATIC_CONST_VAL_FLOAT(val_0241,0.121704);
#define CTNODE_NO_0393 395
DEF_STATIC_CONST_VAL_FLOAT(val_0242,-0.256370);
#define CTNODE_NO_0390 396
DEF_STATIC_CONST_VAL_FLOAT(val_0243,3.100000);
DEF_STATIC_CONST_VAL_FLOAT(val_0244,-0.474522);
#define CTNODE_NO_0397 399
DEF_STATIC_CONST_VAL_FLOAT(val_0245,-0.247206);
#define CTNODE_NO_0396 400
DEF_STATIC_CONST_VAL_FLOAT(val_0246,-0.597866);
#define CTNODE_NO_0401 403
DEF_STATIC_CONST_VAL_FLOAT(val_0247,-0.407765);
#define CTNODE_NO_0400 404
DEF_STATIC_CONST_VAL_FLOAT(val_0248,-0.741256);
#define CTNODE_NO_0387 405
DEF_STATIC_CONST_VAL_FLOAT(val_0249,-1.084260);
#define CTNODE_NO_0406 408
DEF_STATIC_CONST_VAL_FLOAT(val_0250,-0.397890);
#define CTNODE_NO_0405 409
DEF_STATIC_CONST_VAL_FLOAT(val_0251,2.600000);
DEF_STATIC_CONST_VAL_FLOAT(val_0252,-0.666011);
#define CTNODE_NO_0410 412
DEF_STATIC_CONST_VAL_FLOAT(val_0253,-0.499492);
#define CTNODE_NO_0409 413
DEF_STATIC_CONST_VAL_FLOAT(val_0254,-0.253186);
#define CTNODE_NO_0413 415
DEF_STATIC_CONST_VAL_FLOAT(val_0255,-0.372832);
#define CTNODE_NO_0386 416
DEF_STATIC_CONST_VAL_FLOAT(val_0256,-0.093649);
#define CTNODE_NO_0371 417
DEF_STATIC_CONST_VAL_FLOAT(val_0257,-0.249982);
#define CTNODE_NO_0417 419
DEF_STATIC_CONST_VAL_FLOAT(val_0258,3.200000);
DEF_STATIC_CONST_VAL_FLOAT(val_0259,0.180860);
#define CTNODE_NO_0419 421
DEF_STATIC_CONST_VAL_FLOAT(val_0260,-0.040291);
#define CTNODE_NO_0006 422
DEF_STATIC_CONST_VAL_STRING(val_0261,"4");
DEF_STATIC_CONST_VAL_FLOAT(val_0262,1.632030);
#define CTNODE_NO_0427 429
DEF_STATIC_CONST_VAL_FLOAT(val_0263,0.994933);
#define CTNODE_NO_0426 430
DEF_STATIC_CONST_VAL_FLOAT(val_0264,0.214457);
#define CTNODE_NO_0431 433
DEF_STATIC_CONST_VAL_FLOAT(val_0265,0.730381);
#define CTNODE_NO_0430 434
DEF_STATIC_CONST_VAL_FLOAT(val_0266,-0.336221);
#define CTNODE_NO_0435 437
DEF_STATIC_CONST_VAL_FLOAT(val_0267,0.468302);
#define CTNODE_NO_0434 438
DEF_STATIC_CONST_VAL_FLOAT(val_0268,-0.799121);
#define CTNODE_NO_0425 439
DEF_STATIC_CONST_VAL_FLOAT(val_0269,0.030061);
#define CTNODE_NO_0440 442
DEF_STATIC_CONST_VAL_STRING(val_0270,"d");
DEF_STATIC_CONST_VAL_FLOAT(val_0271,1.164900);
#define CTNODE_NO_0442 444
DEF_STATIC_CONST_VAL_FLOAT(val_0272,2.266800);
#define CTNODE_NO_0445 447
DEF_STATIC_CONST_VAL_FLOAT(val_0273,1.503750);
#define CTNODE_NO_0447 449
DEF_STATIC_CONST_VAL_FLOAT(val_0274,2.079270);
#define CTNODE_NO_0444 450
DEF_STATIC_CONST_VAL_FLOAT(val_0275,1.102430);
#define CTNODE_NO_0450 452
DEF_STATIC_CONST_VAL_FLOAT(val_0276,1.843200);
#define CTNODE_NO_0452 454
DEF_STATIC_CONST_VAL_FLOAT(val_0277,1.598530);
#define CTNODE_NO_0439 455
DEF_STATIC_CONST_VAL_FLOAT(val_0278,1.129270);
#define CTNODE_NO_0457 459
DEF_STATIC_CONST_VAL_FLOAT(val_0279,0.442376);
#define CTNODE_NO_0456 460
DEF_STATIC_CONST_VAL_FLOAT(val_0280,1.765080);
#define CTNODE_NO_0462 464
DEF_STATIC_CONST_VAL_FLOAT(val_0281,0.748600);
#define CTNODE_NO_0461 465
DEF_STATIC_CONST_VAL_FLOAT(val_0282,2.308260);
#define CTNODE_NO_0460 466
DEF_STATIC_CONST_VAL_FLOAT(val_0283,1.699170);
#define CTNODE_NO_0466 468
DEF_STATIC_CONST_VAL_FLOAT(val_0284,1.311280);
#define CTNODE_NO_0468 470
DEF_STATIC_CONST_VAL_FLOAT(val_0285,0.212421);
#define CTNODE_NO_0471 473
DEF_STATIC_CONST_VAL_FLOAT(val_0286,0.653094);
#define CTNODE_NO_0470 474
DEF_STATIC_CONST_VAL_FLOAT(val_0287,1.258020);
#define CTNODE_NO_0474 476
DEF_STATIC_CONST_VAL_FLOAT(val_0288,0.777568);
#define CTNODE_NO_0455 477
DEF_STATIC_CONST_VAL_FLOAT(val_0289,0.163941);
#define CTNODE_NO_0478 480
DEF_STATIC_CONST_VAL_FLOAT(val_0290,-0.167063);
#define CTNODE_NO_0477 481
DEF_STATIC_CONST_VAL_FLOAT(val_0291,-0.000859);
#define CTNODE_NO_0484 486
DEF_STATIC_CONST_VAL_FLOAT(val_0292,0.273433);
#define CTNODE_NO_0483 487
DEF_STATIC_CONST_VAL_FLOAT(val_0293,1.056940);
#define CTNODE_NO_0487 489
DEF_STATIC_CONST_VAL_FLOAT(val_0294,0.244916);
#define CTNODE_NO_0482 490
DEF_STATIC_CONST_VAL_FLOAT(val_0295,1.211870);
#define CTNODE_NO_0491 493
DEF_STATIC_CONST_VAL_FLOAT(val_0296,0.598650);
#define CTNODE_NO_0493 495
DEF_STATIC_CONST_VAL_FLOAT(val_0297,1.163400);
#define CTNODE_NO_0490 496
DEF_STATIC_CONST_VAL_FLOAT(val_0298,0.292935);
#define CTNODE_NO_0496 498
DEF_STATIC_CONST_VAL_FLOAT(val_0299,0.925740);
#define CTNODE_NO_0481 499
DEF_STATIC_CONST_VAL_FLOAT(val_0300,1.234840);
#define CTNODE_NO_0500 502
DEF_STATIC_CONST_VAL_FLOAT(val_0301,2.020080);
#define CTNODE_NO_0499 503
DEF_STATIC_CONST_VAL_FLOAT(val_0302,0.697089);
#define CTNODE_NO_0504 506
DEF_STATIC_CONST_VAL_FLOAT(val_0303,0.992197);
#define CTNODE_NO_0506 508
DEF_STATIC_CONST_VAL_FLOAT(val_0304,1.510930);
#define CTNODE_NO_0503 509
DEF_STATIC_CONST_VAL_FLOAT(val_0305,0.520952);
#define CTNODE_NO_0424 510
DEF_STATIC_CONST_VAL_FLOAT(val_0306,0.185827);
#define CTNODE_NO_0513 515
DEF_STATIC_CONST_VAL_FLOAT(val_0307,0.033230);
#define CTNODE_NO_0515 517
DEF_STATIC_CONST_VAL_FLOAT(val_0308,-0.534917);
#define CTNODE_NO_0512 518
DEF_STATIC_CONST_VAL_FLOAT(val_0309,0.575107);
#define CTNODE_NO_0518 520
DEF_STATIC_CONST_VAL_FLOAT(val_0310,-0.111275);
#define CTNODE_NO_0520 522
DEF_STATIC_CONST_VAL_FLOAT(val_0311,0.094470);
#define CTNODE_NO_0522 524
DEF_STATIC_CONST_VAL_FLOAT(val_0312,0.381947);
#define CTNODE_NO_0511 525
DEF_STATIC_CONST_VAL_FLOAT(val_0313,-0.490108);
#define CTNODE_NO_0525 527
DEF_STATIC_CONST_VAL_FLOAT(val_0314,-0.201268);
#define CTNODE_NO_0510 528
DEF_STATIC_CONST_VAL_FLOAT(val_0315,1.203970);
#define CTNODE_NO_0528 530
DEF_STATIC_CONST_VAL_FLOAT(val_0316,0.636568);
#define CTNODE_NO_0530 532
DEF_STATIC_CONST_VAL_FLOAT(val_0317,1.077630);
#define CTNODE_NO_0423 533
DEF_STATIC_CONST_VAL_FLOAT(val_0318,-0.016336);
#define CTNODE_NO_0537 539
DEF_STATIC_CONST_VAL_FLOAT(val_0319,1.072530);
#define CTNODE_NO_0540 542
DEF_STATIC_CONST_VAL_FLOAT(val_0320,0.525806);
#define CTNODE_NO_0542 544
DEF_STATIC_CONST_VAL_FLOAT(val_0321,0.952792);
#define CTNODE_NO_0539 545
DEF_STATIC_CONST_VAL_FLOAT(val_0322,0.469117);
#define CTNODE_NO_0546 548
DEF_STATIC_CONST_VAL_FLOAT(val_0323,-0.071645);
#define CTNODE_NO_0548 550
DEF_STATIC_CONST_VAL_FLOAT(val_0324,0.457137);
#define CTNODE_NO_0550 552
DEF_STATIC_CONST_VAL_FLOAT(val_0325,0.102492);
#define CTNODE_NO_0545 553
DEF_STATIC_CONST_VAL_FLOAT(val_0326,0.697337);
#define CTNODE_NO_0553 555
DEF_STATIC_CONST_VAL_FLOAT(val_0327,0.375114);
#define CTNODE_NO_0536 556
DEF_STATIC_CONST_VAL_FLOAT(val_0328,0.410671);
#define CTNODE_NO_0556 558
DEF_STATIC_CONST_VAL_FLOAT(val_0329,0.800000);
DEF_STATIC_CONST_VAL_FLOAT(val_0330,-0.331055);
#define CTNODE_NO_0558 560
DEF_STATIC_CONST_VAL_FLOAT(val_0331,-0.240616);
#define CTNODE_NO_0560 562
DEF_STATIC_CONST_VAL_FLOAT(val_0332,-0.019127);
#define CTNODE_NO_0535 563
DEF_STATIC_CONST_VAL_FLOAT(val_0333,0.556537);
#define CTNODE_NO_0564 566
DEF_STATIC_CONST_VAL_FLOAT(val_0334,0.153892);
#define CTNODE_NO_0563 567
DEF_STATIC_CONST_VAL_FLOAT(val_0335,0.123242);
#define CTNODE_NO_0569 571
DEF_STATIC_CONST_VAL_FLOAT(val_0336,0.295753);
#define CTNODE_NO_0568 572
DEF_STATIC_CONST_VAL_FLOAT(val_0337,-0.341018);
#define CTNODE_NO_0574 576
DEF_STATIC_CONST_VAL_FLOAT(val_0338,-0.008931);
#define CTNODE_NO_0573 577
DEF_STATIC_CONST_VAL_FLOAT(val_0339,-0.744625);
#define CTNODE_NO_0577 579
DEF_STATIC_CONST_VAL_FLOAT(val_0340,-0.302803);
#define CTNODE_NO_0572 580
DEF_STATIC_CONST_VAL_FLOAT(val_0341,0.113815);
#define CTNODE_NO_0580 582
DEF_STATIC_CONST_VAL_FLOAT(val_0342,-0.128733);
#define CTNODE_NO_0567 583
DEF_STATIC_CONST_VAL_FLOAT(val_0343,-0.854509);
#define CTNODE_NO_0583 585
DEF_STATIC_CONST_VAL_FLOAT(val_0344,-0.216179);
#define CTNODE_NO_0534 586
DEF_STATIC_CONST_VAL_FLOAT(val_0345,0.461950);
#define CTNODE_NO_0587 589
DEF_STATIC_CONST_VAL_FLOAT(val_0346,0.657169);
#define CTNODE_NO_0589 591
DEF_STATIC_CONST_VAL_FLOAT(val_0347,1.082220);
#define CTNODE_NO_0591 593
DEF_STATIC_CONST_VAL_FLOAT(val_0348,1.462570);
#define CTNODE_NO_0586 594
DEF_STATIC_CONST_VAL_FLOAT(val_0349,0.785204);
#define CTNODE_NO_0594 596
DEF_STATIC_CONST_VAL_FLOAT(val_0350,0.321168);
#define CTNODE_NO_0597 599
DEF_STATIC_CONST_VAL_FLOAT(val_0351,0.950834);
#define CTNODE_NO_0596 600
DEF_STATIC_CONST_VAL_FLOAT(val_0352,-0.167374);
#define CTNODE_NO_0602 604
DEF_STATIC_CONST_VAL_FLOAT(val_0353,-0.003744);
#define CTNODE_NO_0605 607
DEF_STATIC_CONST_VAL_FLOAT(val_0354,0.228448);
#define CTNODE_NO_0607 609
DEF_STATIC_CONST_VAL_FLOAT(val_0355,0.504252);
#define CTNODE_NO_0604 610
DEF_STATIC_CONST_VAL_FLOAT(val_0356,0.736476);
#define CTNODE_NO_0601 611
DEF_STATIC_CONST_VAL_FLOAT(val_0357,0.059097);
#define CTNODE_NO_0611 613
DEF_STATIC_CONST_VAL_FLOAT(val_0358,-0.431535);
#define CTNODE_NO_0600 614
DEF_STATIC_CONST_VAL_FLOAT(val_0359,1.006420);
#define CTNODE_NO_0614 616
DEF_STATIC_CONST_VAL_FLOAT(val_0360,0.481652);
#define CTNODE_NO_0617 619
DEF_STATIC_CONST_VAL_FLOAT(val_0361,0.749861);
#define CTNODE_NO_0616 620
DEF_STATIC_CONST_VAL_FLOAT(val_0362,0.069631);
#define CTNODE_NO_0621 623
DEF_STATIC_CONST_VAL_FLOAT(val_0363,0.552212);
#define CTNODE_NO_0620 624
DEF_STATIC_CONST_VAL_FLOAT(val_0364,-0.047922);
#define CTNODE_NO_0533 625
DEF_STATIC_CONST_VAL_FLOAT(val_0365,-1.060900);
#define CTNODE_NO_0626 628
DEF_STATIC_CONST_VAL_FLOAT(val_0366,-0.599330);
#define CTNODE_NO_0628 630
DEF_STATIC_CONST_VAL_FLOAT(val_0367,0.006987);
#define CTNODE_NO_0630 632
DEF_STATIC_CONST_VAL_FLOAT(val_0368,-0.064904);
#define CTNODE_NO_0633 635
DEF_STATIC_CONST_VAL_FLOAT(val_0369,-0.248899);
#define CTNODE_NO_0632 636
DEF_STATIC_CONST_VAL_FLOAT(val_0370,-0.601987);
#define CTNODE_NO_0636 638
DEF_STATIC_CONST_VAL_FLOAT(val_0371,-0.302401);
#define CTNODE_NO_0625 639
DEF_STATIC_CONST_VAL_FLOAT(val_0372,0.164636);
#define CTNODE_NO_0642 644
DEF_STATIC_CONST_VAL_FLOAT(val_0373,-0.098905);
#define CTNODE_NO_0641 645
DEF_STATIC_CONST_VAL_FLOAT(val_0374,-0.316836);
#define CTNODE_NO_0645 647
DEF_STATIC_CONST_VAL_FLOAT(val_0375,-0.096119);
#define CTNODE_NO_0640 648
DEF_STATIC_CONST_VAL_FLOAT(val_0376,-0.429437);
#define CTNODE_NO_0649 651
DEF_STATIC_CONST_VAL_FLOAT(val_0377,-0.065274);
#define CTNODE_NO_0648 652
DEF_STATIC_CONST_VAL_FLOAT(val_0378,-0.635089);
#define CTNODE_NO_0639 653
DEF_STATIC_CONST_VAL_FLOAT(val_0379,0.013936);
#define CTNODE_NO_0654 656
DEF_STATIC_CONST_VAL_FLOAT(val_0380,-0.454845);
#define CTNODE_NO_0653 657
DEF_STATIC_CONST_VAL_FLOAT(val_0381,0.809091);
#define CTNODE_NO_0658 660
DEF_STATIC_CONST_VAL_FLOAT(val_0382,-0.277092);
#define CTNODE_NO_0661 663
DEF_STATIC_CONST_VAL_FLOAT(val_0383,0.281001);
#define CTNODE_NO_0660 664
DEF_STATIC_CONST_VAL_FLOAT(val_0384,0.699145);
#define CTNODE_NO_0664 666
DEF_STATIC_CONST_VAL_FLOAT(val_0385,0.241873);
#define CTNODE_NO_0657 667
DEF_STATIC_CONST_VAL_FLOAT(val_0386,-0.470784);
#define CTNODE_NO_0668 670
DEF_STATIC_CONST_VAL_FLOAT(val_0387,-0.072112);
#define CTNODE_NO_0667 671
DEF_STATIC_CONST_VAL_FLOAT(val_0388,0.073349);
#define CTNODE_NO_0671 673
DEF_STATIC_CONST_VAL_FLOAT(val_0389,0.608371);
#define CTNODE_NO_0422 674
DEF_STATIC_CONST_VAL_FLOAT(val_0390,-0.293282);
#define CTNODE_NO_0678 680
DEF_STATIC_CONST_VAL_FLOAT(val_0391,-0.081611);
#define CTNODE_NO_0677 681
DEF_STATIC_CONST_VAL_FLOAT(val_0392,-0.504024);
#define CTNODE_NO_0676 682
DEF_STATIC_CONST_VAL_FLOAT(val_0393,0.983950);
#define CTNODE_NO_0683 685
DEF_STATIC_CONST_VAL_FLOAT(val_0394,0.634789);
#define CTNODE_NO_0685 687
DEF_STATIC_CONST_VAL_FLOAT(val_0395,4.400000);
DEF_STATIC_CONST_VAL_FLOAT(val_0396,0.479029);
#define CTNODE_NO_0687 689
DEF_STATIC_CONST_VAL_FLOAT(val_0397,0.143214);
#define CTNODE_NO_0689 691
DEF_STATIC_CONST_VAL_FLOAT(val_0398,0.406834);
#define CTNODE_NO_0682 692
DEF_STATIC_CONST_VAL_FLOAT(val_0399,0.600000);
DEF_STATIC_CONST_VAL_FLOAT(val_0400,-0.415599);
#define CTNODE_NO_0693 695
DEF_STATIC_CONST_VAL_FLOAT(val_0401,0.110288);
#define CTNODE_NO_0692 696
DEF_STATIC_CONST_VAL_FLOAT(val_0402,0.031419);
#define CTNODE_NO_0697 699
DEF_STATIC_CONST_VAL_FLOAT(val_0403,0.693893);
#define CTNODE_NO_0699 701
DEF_STATIC_CONST_VAL_FLOAT(val_0404,6.000000);
DEF_STATIC_CONST_VAL_FLOAT(val_0405,0.215675);
#define CTNODE_NO_0701 703
DEF_STATIC_CONST_VAL_FLOAT(val_0406,0.574068);
#define CTNODE_NO_0696 704
DEF_STATIC_CONST_VAL_FLOAT(val_0407,-0.458142);
#define CTNODE_NO_0704 706
DEF_STATIC_CONST_VAL_FLOAT(val_0408,0.304628);
#define CTNODE_NO_0707 709
DEF_STATIC_CONST_VAL_FLOAT(val_0409,-0.230940);
#define CTNODE_NO_0709 711
DEF_STATIC_CONST_VAL_FLOAT(val_0410,0.326954);
#define CTNODE_NO_0713 715
DEF_STATIC_CONST_VAL_FLOAT(val_0411,-0.100616);
#define CTNODE_NO_0712 716
DEF_STATIC_CONST_VAL_FLOAT(val_0412,-0.091913);
#define CTNODE_NO_0711 717
DEF_STATIC_CONST_VAL_FLOAT(val_0413,0.219053);
#define CTNODE_NO_0706 718
DEF_STATIC_CONST_VAL_FLOAT(val_0414,0.216118);
#define CTNODE_NO_0719 721
DEF_STATIC_CONST_VAL_FLOAT(val_0415,-0.008341);
#define CTNODE_NO_0718 722
DEF_STATIC_CONST_VAL_FLOAT(val_0416,0.761763);
#define CTNODE_NO_0722 724
DEF_STATIC_CONST_VAL_FLOAT(val_0417,0.332721);
#define CTNODE_NO_0675 725
DEF_STATIC_CONST_VAL_FLOAT(val_0418,0.217178);
#define CTNODE_NO_0726 728
DEF_STATIC_CONST_VAL_FLOAT(val_0419,1.294510);
#define CTNODE_NO_0728 730
DEF_STATIC_CONST_VAL_FLOAT(val_0420,4.000000);
DEF_STATIC_CONST_VAL_FLOAT(val_0421,0.945261);
#define CTNODE_NO_0734 736
DEF_STATIC_CONST_VAL_FLOAT(val_0422,0.687498);
#define CTNODE_NO_0733 737
DEF_STATIC_CONST_VAL_FLOAT(val_0423,0.403076);
#define CTNODE_NO_0732 738
DEF_STATIC_CONST_VAL_FLOAT(val_0424,1.002550);
#define CTNODE_NO_0731 739
DEF_STATIC_CONST_VAL_FLOAT(val_0425,1.091130);
#define CTNODE_NO_0730 740
DEF_STATIC_CONST_VAL_FLOAT(val_0426,0.209045);
#define CTNODE_NO_0725 741
DEF_STATIC_CONST_VAL_FLOAT(val_0427,-0.054407);
#define CTNODE_NO_0741 743
DEF_STATIC_CONST_VAL_FLOAT(val_0428,0.256045);
#define CTNODE_NO_0674 744
DEF_STATIC_CONST_VAL_FLOAT(val_0429,-0.967300);
#define CTNODE_NO_0746 748
DEF_STATIC_CONST_VAL_FLOAT(val_0430,-0.351397);
#define CTNODE_NO_0745 749
DEF_STATIC_CONST_VAL_FLOAT(val_0431,-0.623300);
#define CTNODE_NO_0749 751
DEF_STATIC_CONST_VAL_FLOAT(val_0432,0.266234);
#define CTNODE_NO_0752 754
DEF_STATIC_CONST_VAL_FLOAT(val_0433,-0.302281);
#define CTNODE_NO_0754 756
DEF_STATIC_CONST_VAL_FLOAT(val_0434,-0.010244);
#define CTNODE_NO_0757 759
DEF_STATIC_CONST_VAL_FLOAT(val_0435,-0.274514);
#define CTNODE_NO_0756 760
DEF_STATIC_CONST_VAL_FLOAT(val_0436,0.048218);
#define CTNODE_NO_0751 761
DEF_STATIC_CONST_VAL_FLOAT(val_0437,0.888495);
#define CTNODE_NO_0761 763
DEF_STATIC_CONST_VAL_FLOAT(val_0438,0.653018);
#define CTNODE_NO_0763 765
DEF_STATIC_CONST_VAL_FLOAT(val_0439,0.061289);
#define CTNODE_NO_0765 767
DEF_STATIC_CONST_VAL_FLOAT(val_0440,0.346637);
#define CTNODE_NO_0744 768
DEF_STATIC_CONST_VAL_FLOAT(val_0441,0.041181);
#define CTNODE_NO_0770 772
DEF_STATIC_CONST_VAL_FLOAT(val_0442,0.613305);
#define CTNODE_NO_0769 773
DEF_STATIC_CONST_VAL_FLOAT(val_0443,0.175467);
#define CTNODE_NO_0774 776
DEF_STATIC_CONST_VAL_FLOAT(val_0444,-0.276407);
#define CTNODE_NO_0773 777
DEF_STATIC_CONST_VAL_FLOAT(val_0445,-0.550878);
#define CTNODE_NO_0768 778
DEF_STATIC_CONST_VAL_FLOAT(val_0446,-0.240328);
#define CTNODE_NO_0781 783
DEF_STATIC_CONST_VAL_FLOAT(val_0447,0.330352);
#define CTNODE_NO_0783 785
DEF_STATIC_CONST_VAL_FLOAT(val_0448,-0.081668);
#define CTNODE_NO_0780 786
DEF_STATIC_CONST_VAL_FLOAT(val_0449,0.383533);
#define CTNODE_NO_0787 789
DEF_STATIC_CONST_VAL_FLOAT(val_0450,-0.324515);
#define CTNODE_NO_0786 790
DEF_STATIC_CONST_VAL_FLOAT(val_0451,-0.624870);
#define CTNODE_NO_0791 793
DEF_STATIC_CONST_VAL_FLOAT(val_0452,-0.513869);
#define CTNODE_NO_0793 795
DEF_STATIC_CONST_VAL_FLOAT(val_0453,0.207874);
#define CTNODE_NO_0796 798
DEF_STATIC_CONST_VAL_FLOAT(val_0454,-0.020471);
#define CTNODE_NO_0795 799
DEF_STATIC_CONST_VAL_FLOAT(val_0455,0.397372);
#define CTNODE_NO_0790 800
DEF_STATIC_CONST_VAL_FLOAT(val_0456,0.271734);
#define CTNODE_NO_0802 804
DEF_STATIC_CONST_VAL_FLOAT(val_0457,-0.261466);
#define CTNODE_NO_0804 806
DEF_STATIC_CONST_VAL_FLOAT(val_0458,-0.009566);
#define CTNODE_NO_0801 807
DEF_STATIC_CONST_VAL_FLOAT(val_0459,-0.381895);
#define CTNODE_NO_0807 809
DEF_STATIC_CONST_VAL_FLOAT(val_0460,-0.089877);
#define CTNODE_NO_0800 810
DEF_STATIC_CONST_VAL_FLOAT(val_0461,-1.126260);
#define CTNODE_NO_0811 813
DEF_STATIC_CONST_VAL_FLOAT(val_0462,-0.906926);
#define CTNODE_NO_0815 817
DEF_STATIC_CONST_VAL_FLOAT(val_0463,-0.625651);
#define CTNODE_NO_0814 818
DEF_STATIC_CONST_VAL_FLOAT(val_0464,-0.385089);
#define CTNODE_NO_0813 819
DEF_STATIC_CONST_VAL_FLOAT(val_0465,-0.359702);
#define CTNODE_NO_0810 820
DEF_STATIC_CONST_VAL_FLOAT(val_0466,0.216904);
#define CTNODE_NO_0821 823
DEF_STATIC_CONST_VAL_FLOAT(val_0467,-0.394349);
#define CTNODE_NO_0820 824
DEF_STATIC_CONST_VAL_FLOAT(val_0468,-0.860573);
#define CTNODE_NO_0825 827
DEF_STATIC_CONST_VAL_FLOAT(val_0469,-0.510488);
#define CTNODE_NO_0824 828
DEF_STATIC_CONST_VAL_FLOAT(val_0470,0.010843);
#define CTNODE_NO_0832 834
DEF_STATIC_CONST_VAL_FLOAT(val_0471,-0.035054);
#define CTNODE_NO_0834 836
DEF_STATIC_CONST_VAL_FLOAT(val_0472,-0.179727);
#define CTNODE_NO_0837 839
DEF_STATIC_CONST_VAL_FLOAT(val_0473,-0.297341);
#define CTNODE_NO_0836 840
DEF_STATIC_CONST_VAL_FLOAT(val_0474,-0.542602);
#define CTNODE_NO_0831 841
DEF_STATIC_CONST_VAL_FLOAT(val_0475,-0.604960);
#define CTNODE_NO_0841 843
DEF_STATIC_CONST_VAL_FLOAT(val_0476,-0.432058);
#define CTNODE_NO_0830 844
DEF_STATIC_CONST_VAL_FLOAT(val_0477,-0.389079);
#define CTNODE_NO_0844 846
DEF_STATIC_CONST_VAL_FLOAT(val_0478,-0.735640);
#define CTNODE_NO_0846 848
DEF_STATIC_CONST_VAL_FLOAT(val_0479,-0.605444);
#define CTNODE_NO_0829 849
DEF_STATIC_CONST_VAL_FLOAT(val_0480,-0.827377);
#define CTNODE_NO_0849 851
DEF_STATIC_CONST_VAL_FLOAT(val_0481,-0.275338);
#define CTNODE_NO_0851 853
DEF_STATIC_CONST_VAL_FLOAT(val_0482,-0.802801);
#define CTNODE_NO_0853 855
DEF_STATIC_CONST_VAL_FLOAT(val_0483,-0.371234);
#define CTNODE_NO_0855 857
DEF_STATIC_CONST_VAL_FLOAT(val_0484,-0.772883);
#define CTNODE_NO_0828 858
DEF_STATIC_CONST_VAL_FLOAT(val_0485,-0.655006);
#define CTNODE_NO_0860 862
DEF_STATIC_CONST_VAL_FLOAT(val_0486,-0.303751);
#define CTNODE_NO_0862 864
DEF_STATIC_CONST_VAL_FLOAT(val_0487,-0.456882);
#define CTNODE_NO_0859 865
DEF_STATIC_CONST_VAL_FLOAT(val_0488,-0.133182);
#define CTNODE_NO_0858 866
DEF_STATIC_CONST_VAL_FLOAT(val_0489,0.114442);
#define CTNODE_NO_0866 868
DEF_STATIC_CONST_VAL_FLOAT(val_0490,-0.167545);
#define CTNODE_NO_0779 869
DEF_STATIC_CONST_VAL_FLOAT(val_0491,-0.876950);
#define CTNODE_NO_0869 871
DEF_STATIC_CONST_VAL_FLOAT(val_0492,-0.640572);
#define CTNODE_NO_0871 873
DEF_STATIC_CONST_VAL_FLOAT(val_0493,-0.321322);
#define CTNODE_NO_0778 874
DEF_STATIC_CONST_VAL_FLOAT(val_0494,-0.925472);

View File

@ -0,0 +1,410 @@
/*************************************************************************/
/* */
/* Language Technologies Institute */
/* Carnegie Mellon University */
/* Copyright (c) 2001 */
/* All Rights Reserved. */
/* */
/* Permission is hereby granted, free of charge, to use and distribute */
/* this software and its documentation without restriction, including */
/* without limitation the rights to use, copy, modify, merge, publish, */
/* distribute, sublicense, and/or sell copies of this work, and to */
/* permit persons to whom this work is furnished to do so, subject to */
/* the following conditions: */
/* 1. The code must retain the above copyright notice, this list of */
/* conditions and the following disclaimer. */
/* 2. Any modifications must be clearly marked as such. */
/* 3. Original authors' names are not deleted. */
/* 4. The authors' names are not used to endorse or promote products */
/* derived from this software without specific prior written */
/* permission. */
/* */
/* CARNEGIE MELLON UNIVERSITY AND THE CONTRIBUTORS TO THIS WORK */
/* DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING */
/* ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT */
/* SHALL CARNEGIE MELLON UNIVERSITY NOR THE CONTRIBUTORS BE LIABLE */
/* FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES */
/* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN */
/* AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, */
/* ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF */
/* THIS SOFTWARE. */
/* */
/*************************************************************************/
/* Author: Alan W Black (awb@cs.cmu.edu) */
/* Date: January 2001 */
/*************************************************************************/
/* */
/* English text expanders */
/* */
/* numbers, digits, ids (years), money */
/* */
/*************************************************************************/
#include <ctype.h>
#include "us_text.h"
static const char * const digit2num[] = {
"zero",
"one",
"two",
"three",
"four",
"five",
"six",
"seven",
"eight",
"nine" };
static const char * const digit2teen[] = {
"ten", /* shouldn't get called */
"eleven",
"twelve",
"thirteen",
"fourteen",
"fifteen",
"sixteen",
"seventeen",
"eighteen",
"nineteen" };
static const char * const digit2enty[] = {
"zero", /* shouldn't get called */
"ten",
"twenty",
"thirty",
"forty",
"fifty",
"sixty",
"seventy",
"eighty",
"ninety" };
static const char * const ord2num[] = {
"zeroth",
"first",
"second",
"third",
"fourth",
"fifth",
"sixth",
"seventh",
"eighth",
"ninth" };
static const char * const ord2teen[] = {
"tenth", /* shouldn't get called */
"eleventh",
"twelfth",
"thirteenth",
"fourteenth",
"fifteenth",
"sixteenth",
"seventeenth",
"eighteenth",
"nineteenth" };
static const char * const ord2enty[] = {
"zeroth", /* shouldn't get called */
"tenth",
"twentieth",
"thirtieth",
"fortieth",
"fiftieth",
"sixtieth",
"seventieth",
"eightieth",
"ninetieth" };
cst_val *en_exp_number(const char *numstring)
{
/* Expand given token to list of words pronouncing it as a number */
int num_digits = cst_strlen(numstring);
char part[4];
cst_val *p;
int i;
if (num_digits == 0)
return NULL;
else if (num_digits == 1)
return en_exp_digits(numstring);
else if (num_digits == 2)
{
if (numstring[0] == '0')
{
if (numstring[1] == '0')
return 0;
else
return cons_val(string_val(digit2num[numstring[1]-'0']),0);
}
else if (numstring[1] == '0')
return cons_val(string_val(digit2enty[numstring[0]-'0']),0);
else if (numstring[0] == '1')
return cons_val(string_val(digit2teen[numstring[1]-'0']),0);
else
return cons_val(string_val(digit2enty[numstring[0]-'0']),
en_exp_digits(numstring+1));
}
else if (num_digits == 3)
{
if (numstring[0] == '0')
return en_exp_number(numstring+1);
else
return cons_val(string_val(digit2num[numstring[0]-'0']),
cons_val(string_val("hundred"),
en_exp_number(numstring+1)));
}
else if (num_digits < 7)
{
for (i=0; i < num_digits-3; i++)
part[i] = numstring[i];
part[i]='\0';
p = en_exp_number(part);
if (p == 0) /* no thousands */
return en_exp_number(numstring+i);
else
return val_append(p,cons_val(string_val("thousand"),
en_exp_number(numstring+i)));
}
else if (num_digits < 10)
{
for (i=0; i < num_digits-6; i++)
part[i] = numstring[i];
part[i]='\0';
p = en_exp_number(part);
if (p == 0) /* no millions */
return en_exp_number(numstring+i);
else
return val_append(p,cons_val(string_val("million"),
en_exp_number(numstring+i)));
}
else if (num_digits < 13)
{ /* If there are pedantic brits out there, tough!, 10^9 is a billion */
for (i=0; i < num_digits-9; i++)
part[i] = numstring[i];
part[i]='\0';
p = en_exp_number(part);
if (p == 0) /* no billions */
return en_exp_number(numstring+i);
else
return val_append(p,cons_val(string_val("billion"),
en_exp_number(numstring+i)));
}
else /* Way too many digits here, to be a number */
{
return en_exp_digits(numstring);
}
}
cst_val *en_exp_ordinal(const char *rawnumstring)
{
/* return ordinal for digit string */
cst_val *card, *o;
const cst_val *t;
const char *l;
const char *ord;
char *numstring;
int i,j;
numstring = cst_strdup(rawnumstring);
for (j=i=0; i < cst_strlen(rawnumstring); i++)
if (rawnumstring[i] != ',')
{
numstring[j] = rawnumstring[i];
j++;
}
numstring[j] = '\0';
card = val_reverse(en_exp_number(numstring));
cst_free(numstring);
l = val_string(val_car(card));
ord = 0;
for (i=0; i<10; i++)
if (cst_streq(l,digit2num[i]))
ord = ord2num[i];
if (!ord)
for (i=0; i<10; i++)
if (cst_streq(l,digit2teen[i]))
ord = ord2teen[i];
if (!ord)
for (i=0; i<10; i++)
if (cst_streq(l,digit2enty[i]))
ord = ord2enty[i];
if (cst_streq(l,"hundred"))
ord = "hundredth";
if (cst_streq(l,"thousand"))
ord = "thousandth";
if (cst_streq(l,"billion"))
ord = "billtionth";
if (!ord) /* dunno, so don't convert anything */
return card;
o = cons_val(string_val(ord),0);
for (t=val_cdr(card); t; t=val_cdr(t))
o = cons_val(val_car(t),o);
delete_val(card);
return o;
}
cst_val *en_exp_id(const char *numstring)
{
/* Expand numstring as pairs as in years or ids */
char aaa[3];
if ((cst_strlen(numstring) == 4) &&
(numstring[2] == '0') &&
(numstring[3] == '0'))
{
if (numstring[1] == '0')
return en_exp_number(numstring); /* 2000, 3000 */
else
{
aaa[0] = numstring[0];
aaa[1] = numstring[1];
aaa[2] = '\0';
return val_append(en_exp_number(aaa),
cons_val(string_val("hundred"),0));
}
}
else if ((cst_strlen(numstring) == 3) &&
(numstring[0] != '0') &&
(numstring[1] == '0') &&
(numstring[2] == '0'))
{
return cons_val(string_val(digit2num[numstring[0]-'0']),
cons_val(string_val("hundred"),0));
}
else if ((cst_strlen(numstring) == 2) && (numstring[0] == '0')
&& (numstring[1] == '0'))
return cons_val(string_val("zero"),
cons_val(string_val("zero"),NULL));
else if ((cst_strlen(numstring) == 2) && (numstring[0] == '0'))
return cons_val(string_val("oh"),
en_exp_digits(&numstring[1]));
else if (((cst_strlen(numstring) == 4) &&
((numstring[1] == '0'))) ||
(cst_strlen(numstring) < 3))
return en_exp_number(numstring);
else if (cst_strlen(numstring)%2 == 1)
{
return cons_val(string_val(digit2num[numstring[0]-'0']),
en_exp_id(&numstring[1]));
}
else
{
aaa[0] = numstring[0];
aaa[1] = numstring[1];
aaa[2] = '\0';
return val_append(en_exp_number(aaa),en_exp_id(&numstring[2]));
}
}
cst_val *en_exp_real(const char *numstring)
{
char *aaa, *p;
cst_val *r;
if (numstring && (numstring[0] == '-'))
r = cons_val(string_val("minus"),
en_exp_real(&numstring[1]));
else if (numstring && (numstring[0] == '+'))
r = cons_val(string_val("plus"),
en_exp_real(&numstring[1]));
else if (((p=strchr(numstring,'e')) != 0) ||
((p=strchr(numstring,'E')) != 0))
{
aaa = cst_strdup(numstring);
aaa[cst_strlen(numstring)-cst_strlen(p)] = '\0';
r = val_append(en_exp_real(aaa),
cons_val(string_val("e"),
en_exp_real(p+1)));
cst_free(aaa);
}
else if ((p=strchr(numstring,'.')) != 0)
{
aaa = cst_strdup(numstring);
aaa[cst_strlen(numstring)-cst_strlen(p)] = '\0';
r = val_append(en_exp_number(aaa),
cons_val(string_val("point"),
en_exp_digits(p+1)));
cst_free(aaa);
}
else
r = en_exp_number(numstring); /* I don't think you can get here */
return r;
}
cst_val *en_exp_digits(const char *numstring)
{
/* Expand given token to list of words pronouncing it as digits */
cst_val *d = 0;
const char *p;
for (p=numstring; *p; p++)
{
if ((*p >= '0') && (*p <= '9'))
d = cons_val(string_val(digit2num[*p-'0']),d);
else
d = cons_val(string_val("umpty"),d);
}
return val_reverse(d);
}
cst_val *en_exp_letters(const char *lets)
{
/* returns these as list of single char symbols */
char *aaa;
cst_val *r;
int i;
aaa = cst_alloc(char,2);
aaa[1] = '\0';
for (r=0,i=0; lets[i] != '\0'; i++)
{
aaa[0] = lets[i];
if (isupper((int)aaa[0]))
aaa[0] = tolower((int)aaa[0]);
if (strchr("0123456789",aaa[0]))
r = cons_val(string_val(digit2num[aaa[0]-'0']),r);
else if (cst_streq(aaa,"a"))
r = cons_val(string_val("_a"),r);
else
r = cons_val(string_val(aaa),r);
}
cst_free(aaa);
return val_reverse(r);
}
int en_exp_roman(const char *roman)
{
int val;
const char *p;
val = 0;
for (p=roman; *p != 0; p++)
{
if (*p == 'X')
val += 10;
else if (*p == 'V')
val += 5;
else if (*p == 'I')
{
if (p[1] == 'V')
{
val += 4;
p++;
}
else if (p[1] == 'X')
{
val += 9;
p++;
}
else
val += 1;
}
}
return val;
}

View File

@ -0,0 +1,59 @@
/*************************************************************************/
/* */
/* Language Technologies Institute */
/* Carnegie Mellon University */
/* Copyright (c) 2001 */
/* All Rights Reserved. */
/* */
/* Permission is hereby granted, free of charge, to use and distribute */
/* this software and its documentation without restriction, including */
/* without limitation the rights to use, copy, modify, merge, publish, */
/* distribute, sublicense, and/or sell copies of this work, and to */
/* permit persons to whom this work is furnished to do so, subject to */
/* the following conditions: */
/* 1. The code must retain the above copyright notice, this list of */
/* conditions and the following disclaimer. */
/* 2. Any modifications must be clearly marked as such. */
/* 3. Original authors' names are not deleted. */
/* 4. The authors' names are not used to endorse or promote products */
/* derived from this software without specific prior written */
/* permission. */
/* */
/* CARNEGIE MELLON UNIVERSITY AND THE CONTRIBUTORS TO THIS WORK */
/* DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING */
/* ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT */
/* SHALL CARNEGIE MELLON UNIVERSITY NOR THE CONTRIBUTORS BE LIABLE */
/* FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES */
/* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN */
/* AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, */
/* ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF */
/* THIS SOFTWARE. */
/* */
/*************************************************************************/
/* Author: Alan W Black (awb@cs.cmu.edu) */
/* Date: January 2001 */
/*************************************************************************/
/* */
/* US F0 model */
/* */
/*************************************************************************/
#ifndef _US_F0_H__
#define _US_F0_H__
#include "cst_utterance.h"
struct us_f0_lr_term_struct {
const char *feature;
const float start;
const float mid;
const float end;
const char *type;
};
typedef struct us_f0_lr_term_struct us_f0_lr_term;
extern const us_f0_lr_term f0_lr_terms[];
cst_utterance *us_f0_model(cst_utterance *u);
#endif

View File

@ -0,0 +1,225 @@
/*************************************************************************/
/* */
/* Language Technologies Institute */
/* Carnegie Mellon University */
/* Copyright (c) 2001 */
/* All Rights Reserved. */
/* */
/* Permission is hereby granted, free of charge, to use and distribute */
/* this software and its documentation without restriction, including */
/* without limitation the rights to use, copy, modify, merge, publish, */
/* distribute, sublicense, and/or sell copies of this work, and to */
/* permit persons to whom this work is furnished to do so, subject to */
/* the following conditions: */
/* 1. The code must retain the above copyright notice, this list of */
/* conditions and the following disclaimer. */
/* 2. Any modifications must be clearly marked as such. */
/* 3. Original authors' names are not deleted. */
/* 4. The authors' names are not used to endorse or promote products */
/* derived from this software without specific prior written */
/* permission. */
/* */
/* CARNEGIE MELLON UNIVERSITY AND THE CONTRIBUTORS TO THIS WORK */
/* DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING */
/* ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT */
/* SHALL CARNEGIE MELLON UNIVERSITY NOR THE CONTRIBUTORS BE LIABLE */
/* FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES */
/* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN */
/* AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, */
/* ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF */
/* THIS SOFTWARE. */
/* */
/*************************************************************************/
/* Author: Alan W Black (awb@cs.cmu.edu) */
/* Date: January 2001 */
/*************************************************************************/
/* */
/* An F0 model */
/* This is derived fromthe f2b model freely distributed in Festival */
/* */
/*************************************************************************/
#include "cst_hrg.h"
#include "cst_phoneset.h"
#include "us_f0.h"
static void apply_lr_model(cst_item *s,
const us_f0_lr_term *f0_lr_terms,
float *start,
float *mid,
float *end)
{
int i;
const cst_val *v=0;
float fv;
/* Interceptors */
*start = f0_lr_terms[0].start;
*mid = f0_lr_terms[0].mid;
*end = f0_lr_terms[0].end;
for (i=1; f0_lr_terms[i].feature; i++)
{
if (!cst_streq(f0_lr_terms[i].feature,f0_lr_terms[i-1].feature))
v = ffeature(s,f0_lr_terms[i].feature);
if (f0_lr_terms[i].type)
{
if (cst_streq(val_string(v),f0_lr_terms[i].type))
fv = 1.0;
else
fv = 0.0;
}
else
fv = val_float(v);
(*start) += fv*f0_lr_terms[i].start;
(*mid) += fv*f0_lr_terms[i].mid;
(*end) += fv*f0_lr_terms[i].end;
/* printf("f %s start %f mid %f end %f\n",
f0_lr_terms[i].feature,
*start,*mid,*end); */
}
}
static void add_target_point(cst_relation *targ,float pos, float f0)
{
cst_item *t;
/* printf("target %f at %f\n",f0,pos); */
t = relation_append(targ,NULL);
item_set_float(t,"pos",pos);
/* them there can sometimes do silly things, so guard for that */
if (f0 > 500.0)
item_set_float(t,"f0",500.0);
else if (f0 < 50.0)
item_set_float(t,"f0",50.0);
else
item_set_float(t,"f0",f0);
}
/* model mean and stddev take from f2b/kal_diphone */
#define model_mean 170.0
#define model_stddev 34
#define map_f0(v,m,s) ((((v-model_mean)/model_stddev)*s)+m)
static int post_break(cst_item *syl)
{
if ((item_prev(syl) == 0) ||
(cst_streq("pau",
ffeature_string(syl,
"R:SylStructure.daughter.R:Segment.p.name"))))
return TRUE;
else
return FALSE;
}
static int pre_break(cst_item *syl)
{
if ((item_next(syl) == 0) ||
(cst_streq("pau",
ffeature_string(syl,
"R:SylStructure.daughtern.R:Segment.n.name"))))
return TRUE;
else
return FALSE;
}
static float vowel_mid(cst_item *syl)
{
/* return time point mid way in vowel in this syl */
cst_item *s;
cst_item *ts;
const cst_phoneset *ps = item_phoneset(syl);
ts = item_daughter(item_as(syl,"SylStructure"));
for (s=ts; s; s = item_next(s))
{
if (cst_streq("+", phone_feature_string(ps,item_feat_string(s,"name"),
"vc")))
{
return (item_feat_float(s,"end")+
ffeature_float(s,"R:Segment.p.end"))/2.0;
}
}
/* no segments, shouldn't happen */
if (ts == 0)
return 0;
/* no vowel in syllable, shouldn't happen */
return (item_feat_float(ts,"end")+
ffeature_float(ts,"R:Segment.p.end"))/2.0;
}
cst_utterance *us_f0_model(cst_utterance *u)
{
/* F0 target model: Black and Hunt ICSLP96, three points per syl */
cst_item *syl, *t, *nt;
cst_relation *targ_rel;
float mean, stddev, local_mean, local_stddev;
float start, mid, end, lend;
float seg_end;
if (feat_present(u->features,"no_f0_target_model"))
return u;
targ_rel = utt_relation_create(u,"Target");
mean = get_param_float(u->features,"int_f0_target_mean", 100.0);
mean *= get_param_float(u->features,"f0_shift", 1.0);
stddev = get_param_float(u->features,"int_f0_target_stddev", 12.0);
lend = 0;
for (syl=relation_head(utt_relation(u,"Syllable"));
syl;
syl = item_next(syl))
{
/* printf("word %s, accent %s endtone %s\n",
ffeature_string(syl,"R:SylStructure.parent.name"),
ffeature_string(syl,"accent"),
ffeature_string(syl,"endtone")); */
if (!item_daughter(item_as(syl,"SylStructure")))
continue; /* no segs in syl */
local_mean = ffeature_float(syl,"R:SylStructure.parent.R:Token.parent.local_f0_shift");
if (local_mean)
local_mean *= mean;
else
local_mean = mean;
local_stddev = ffeature_float(syl,"R:SylStructure.parent.R:Token.parent.local_f0_range");
if (local_stddev == 0.0)
local_stddev = stddev;
apply_lr_model(syl,f0_lr_terms,&start,&mid,&end);
if (post_break(syl))
lend = map_f0(start,local_mean,local_stddev);
add_target_point(targ_rel,
ffeature_float(syl,
"R:SylStructure.daughter.R:Segment.p.end"),
map_f0((start+lend)/2.0,local_mean,local_stddev));
add_target_point(targ_rel,
vowel_mid(syl),
map_f0(mid,local_mean,local_stddev));
lend = map_f0(end,local_mean,local_stddev);
if (pre_break(syl))
add_target_point(targ_rel,
ffeature_float(syl,"R:SylStructure.daughtern.end"),
map_f0(end,local_mean,local_stddev));
}
/* Guarantee targets go from start to end of utterance */
t = relation_head(targ_rel);
if (t == 0)
add_target_point(targ_rel,0,mean);
else if (item_feat_float(t,"pos") > 0)
{
nt = item_prepend(t,NULL);
item_set_float(nt,"pos",0.0);
item_set_float(nt,"f0",item_feat_float(t,"f0"));
}
t = relation_tail(targ_rel);
seg_end = item_feat_float(relation_tail(utt_relation(u,"Segment")),"end");
if (item_feat_float(t,"pos") < seg_end)
add_target_point(targ_rel,seg_end,item_feat_float(t,"f0"));
return u;
}

View File

@ -0,0 +1,106 @@
/*************************************************************************/
/* */
/* Carnegie Mellon University and */
/* Centre for Speech Technology Research */
/* University of Edinburgh, UK */
/* Copyright (c) 1998-2001 */
/* All Rights Reserved. */
/* */
/* Permission is hereby granted, free of charge, to use and distribute */
/* this software and its documentation without restriction, including */
/* without limitation the rights to use, copy, modify, merge, publish, */
/* distribute, sublicense, and/or sell copies of this work, and to */
/* permit persons to whom this work is furnished to do so, subject to */
/* the following conditions: */
/* 1. The code must retain the above copyright notice, this list of */
/* conditions and the following disclaimer. */
/* 2. Any modifications must be clearly marked as such. */
/* 3. Original authors' names are not deleted. */
/* 4. The authors' names are not used to endorse or promote products */
/* derived from this software without specific prior written */
/* permission. */
/* */
/* THE UNIVERSITY OF EDINBURGH, CARNEGIE MELLON UNIVERSITY AND THE */
/* CONTRIBUTORS TO THIS WORK DISCLAIM ALL WARRANTIES WITH REGARD TO */
/* THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY */
/* AND FITNESS, IN NO EVENT SHALL THE UNIVERSITY OF EDINBURGH, CARNEGIE */
/* MELLON UNIVERSITY NOR THE CONTRIBUTORS BE LIABLE FOR ANY SPECIAL, */
/* INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER */
/* RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION */
/* OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF */
/* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */
/* */
/*************************************************************************/
/* Author: Alan W Black (awb@cs.cmu.edu) */
/* Date: January 2001 */
/*************************************************************************/
/* */
/* US F0 model LR features */
/* */
/* Derived directly from the F0 LR model in University of Edinburgh's */
/* Festival Speech Synthesis Systems festival/lib/f2bf0lr.scm which in */
/* turn was trained from Boston University FM Radio Data Corpus */
/* */
/*************************************************************************/
#include "us_f0.h"
const us_f0_lr_term f0_lr_terms[] = {
{ "Intercept", 160.584961, 169.183380, 169.570374, 0 },
{ "p.p.accent", 10.081770, 4.923247, 3.594771, "H*" },
{ "p.p.accent", 3.358613, 0.955474, 0.432519, "!H*" },
{ "p.p.accent", 4.144342, 1.193597, 0.235664, "L+H*" },
{ "p.accent", 32.081028, 16.603350, 11.214208, "H*" },
{ "p.accent", 18.090033, 11.665814, 9.619350, "!H*" },
{ "p.accent", 23.255280, 13.063298, 9.084690, "L+H*" },
{ "accent", 5.221081, 34.517868, 25.217588, "H*" },
{ "accent", 10.159194, 22.349655, 13.759851, "!H*" },
{ "accent", 3.645511, 23.551548, 17.635193, "L+H*" },
{ "n.accent", -5.691933, -1.914945, 4.944848, "H*" },
{ "n.accent", 8.265606, 5.249441, 7.398383, "!H*" },
{ "n.accent", 0.861427, -1.929947, 1.683011, "L+H*" },
{ "n.n.accent", -3.785701, -6.147251, -4.335797, "H*" },
{ "n.n.accent", 7.013446, 8.408949, 5.656462, "!H*" },
{ "n.n.accent", 2.637494, 3.193500, 0.263288, "L+H*" },
{ "p.p.endtone", -3.531153, 4.255273, 10.274958, "L-L%" },
{ "p.p.endtone", 8.258756, 6.989573, 10.446935, "L-H%" },
{ "p.p.endtone", 5.836487, 2.598854, 6.104384, "H-" },
{ "p.p.endtone", 11.213440, 12.178307, 14.182688, "H-H%" },
{ "R:Syllable.p.endtone", -28.081360, -4.397973, 1.767454, "L-L%" },
{ "R:Syllable.p.endtone", -6.585836, 6.938086, 8.750018, "L-H%" },
{ "R:Syllable.p.endtone", 8.537044, 6.162763, 5.000340, "H-" },
{ "R:Syllable.p.endtone", 4.243342, 8.035727, 10.913437, "H-H%" },
{ "endtone", -9.333926, -19.357903, -12.637935, "L-L%" },
{ "endtone", -0.937483, -7.328882, 8.747483, "L-H%" },
{ "endtone", 9.472265, 12.694193, 15.165833, "H-" },
{ "endtone", 14.256898, 30.923397, 50.190327, "H-H%" },
{ "n.endtone", -13.084253, -17.727785, -16.965780, "L-L%" },
{ "n.endtone", -5.471592, -8.701685, -7.833168, "L-H%" },
{ "n.endtone", -0.095669, -1.006439, 4.701087, "H-" },
{ "n.endtone", 4.933708, 6.834498, 10.349902, "H-H%" },
{ "n.n.endtone", -14.993470, -15.407530, -15.369483, "L-L%" },
{ "n.n.endtone", -11.352400, -7.621437, -7.052374, "L-H%" },
{ "n.n.endtone", -5.551627, -0.458837, 2.207854, "H-" },
{ "n.n.endtone", -0.661581, 3.170632, 5.271546, "H-H%" },
{ "p.p.old_syl_break", -3.367677, -4.196950, -4.745862, 0 },
{ "p.old_syl_break", 0.641755, -5.176929, -5.685178, 0 },
{ "old_syl_break", -0.659002, 0.047922, -2.633291, 0 },
{ "n.old_syl_break", 1.217358, 2.153968, 1.678340, 0 },
{ "n.n.old_syl_break", 2.974502, 2.577074, 2.274729, 0 },
{ "p.p.stress", 1.588098, -2.368192, -2.747198, 0 },
{ "p.stress", 3.693430, 1.080493, 0.306724, 0 },
{ "stress", 2.009843, 1.135556, -0.565613, 0 },
{ "n.stress", 1.645560, 2.447219, 2.838327, 0 },
{ "n.n.stress", 1.926870, 1.318122, 1.285244, 0 },
{ "syl_in", 1.048362, 0.291663, 0.169955, 0 },
{ "syl_out", 0.315553, -0.411814, -1.045661, 0 },
{ "ssyl_in", -2.096079, -1.643456, -1.487774, 0 },
{ "ssyl_out", 0.303531, 0.580589, 0.752405, 0 },
{ "asyl_in", -4.257915, -5.649243, -5.081677, 0 },
{ "asyl_out", -2.422424, 0.489823, 3.016218, 0 },
{ "last_accent", -0.397647, 0.216634, 0.312900, 0 },
{ "next_accent", -0.418613, 0.244134, 0.837992, 0 },
{ "sub_phrases", -5.472055, -5.758156, -5.397805, 0 },
{ 0, 0, 0, 0, 0 }
};

View File

@ -0,0 +1,173 @@
/*************************************************************************/
/* */
/* Language Technologies Institute */
/* Carnegie Mellon University */
/* Copyright (c) 2001 */
/* All Rights Reserved. */
/* */
/* Permission is hereby granted, free of charge, to use and distribute */
/* this software and its documentation without restriction, including */
/* without limitation the rights to use, copy, modify, merge, publish, */
/* distribute, sublicense, and/or sell copies of this work, and to */
/* permit persons to whom this work is furnished to do so, subject to */
/* the following conditions: */
/* 1. The code must retain the above copyright notice, this list of */
/* conditions and the following disclaimer. */
/* 2. Any modifications must be clearly marked as such. */
/* 3. Original authors' names are not deleted. */
/* 4. The authors' names are not used to endorse or promote products */
/* derived from this software without specific prior written */
/* permission. */
/* */
/* CARNEGIE MELLON UNIVERSITY AND THE CONTRIBUTORS TO THIS WORK */
/* DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING */
/* ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT */
/* SHALL CARNEGIE MELLON UNIVERSITY NOR THE CONTRIBUTORS BE LIABLE */
/* FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES */
/* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN */
/* AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, */
/* ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF */
/* THIS SOFTWARE. */
/* */
/*************************************************************************/
/* Author: Alan W Black (awb@cs.cmu.edu) */
/* Date: January 2001 */
/*************************************************************************/
/* Feature functions used by various cart trees etc */
/* These have been create as needed, and as some of the trees are */
/* from University of Edinburgh's Festival system their names and */
/* semantics follow them */
/*************************************************************************/
#include "cst_hrg.h"
#include "cst_phoneset.h"
#include "cst_regex.h"
#include "cst_ffeatures.h"
#include "us_ffeatures.h"
static const cst_val *gpos(const cst_item *word);
DEF_STATIC_CONST_VAL_STRING(val_string_numeric,"numeric");
DEF_STATIC_CONST_VAL_STRING(val_string_number,"number");
DEF_STATIC_CONST_VAL_STRING(val_string_month,"month");
DEF_STATIC_CONST_VAL_STRING(val_string_day,"day");
DEF_STATIC_CONST_VAL_STRING(val_string_other,"_other_");
DEF_STATIC_CONST_VAL_STRING(val_string_a,"a");
DEF_STATIC_CONST_VAL_STRING(val_string_flight,"flight");
DEF_STATIC_CONST_VAL_STRING(val_string_to,"to");
DEF_STATIC_CONST_VAL_STRING(val_string_content,"content");
static const cst_val *gpos(const cst_item *word)
{
/* Guess at part of speech (function/content) */
const char *w;
int s,t;
w = item_feat_string(word,"name");
for (s=0; us_gpos[s]; s++)
{
for (t=1; us_gpos[s][t]; t++)
if (cst_streq(w,val_string(us_gpos[s][t])))
return us_gpos[s][0];
}
return (cst_val *)&val_string_content;
}
static const cst_val *num_digits(const cst_item *token)
{
const char *name = item_feat_string(token,"name");
return val_int_n(cst_strlen(name));
}
static const cst_val *month_range(const cst_item *token)
{
int v = item_feat_int(token,"name");
if ((v > 0) && ( v < 32))
return VAL_STRING_1;
else
return VAL_STRING_0;
}
static const cst_val *token_pos_guess(const cst_item *token)
{
const char *name = item_feat_string(token,"name");
char *dc = cst_downcase(name);
const cst_val *r;
if (cst_regex_match(cst_rx_digits,dc))
r = &val_string_numeric;
else if ((cst_regex_match(cst_rx_double,dc)) ||
(cst_regex_match(cst_rx_double,dc)))
r = &val_string_number;
else if (cst_streq(dc,"jan") ||
cst_streq(dc,"january") ||
cst_streq(dc,"feb") ||
cst_streq(dc,"february") ||
cst_streq(dc,"mar") ||
cst_streq(dc,"march") ||
cst_streq(dc,"apr") ||
cst_streq(dc,"april") ||
cst_streq(dc,"may") ||
cst_streq(dc,"jun") ||
cst_streq(dc,"june") ||
cst_streq(dc,"jul") ||
cst_streq(dc,"july") ||
cst_streq(dc,"aug") ||
cst_streq(dc,"august") ||
cst_streq(dc,"sep") ||
cst_streq(dc,"sept") ||
cst_streq(dc,"september") ||
cst_streq(dc,"oct") ||
cst_streq(dc,"october") ||
cst_streq(dc,"nov") ||
cst_streq(dc,"november") ||
cst_streq(dc,"dec") ||
cst_streq(dc,"december"))
r = &val_string_month;
else if (cst_streq(dc,"sun") ||
cst_streq(dc,"sunday") ||
cst_streq(dc,"mon") ||
cst_streq(dc,"monday") ||
cst_streq(dc,"tue") ||
cst_streq(dc,"tues") ||
cst_streq(dc,"tuesday") ||
cst_streq(dc,"wed") ||
cst_streq(dc,"wednesday") ||
cst_streq(dc,"thu") ||
cst_streq(dc,"thurs") ||
cst_streq(dc,"thursday") ||
cst_streq(dc,"fri") ||
cst_streq(dc,"friday") ||
cst_streq(dc,"sat") ||
cst_streq(dc,"saturday"))
r = &val_string_day;
/* ignoring the "token_most_common" condition, does get used */
else if (cst_streq(dc,"a"))
r = &val_string_a;
else if (cst_streq(dc,"flight"))
r = &val_string_flight;
else if (cst_streq(dc,"to"))
r = &val_string_to;
else
r = &val_string_other;
cst_free(dc);
return r;
}
void us_ff_register(cst_features *ffunctions)
{
/* The language independent ones */
basic_ff_register(ffunctions);
ff_register(ffunctions, "gpos",gpos);
ff_register(ffunctions, "num_digits",num_digits);
ff_register(ffunctions, "month_range",month_range);
ff_register(ffunctions, "token_pos_guess",token_pos_guess);
}

View File

@ -0,0 +1,49 @@
/*************************************************************************/
/* */
/* Language Technologies Institute */
/* Carnegie Mellon University */
/* Copyright (c) 2001 */
/* All Rights Reserved. */
/* */
/* Permission is hereby granted, free of charge, to use and distribute */
/* this software and its documentation without restriction, including */
/* without limitation the rights to use, copy, modify, merge, publish, */
/* distribute, sublicense, and/or sell copies of this work, and to */
/* permit persons to whom this work is furnished to do so, subject to */
/* the following conditions: */
/* 1. The code must retain the above copyright notice, this list of */
/* conditions and the following disclaimer. */
/* 2. Any modifications must be clearly marked as such. */
/* 3. Original authors' names are not deleted. */
/* 4. The authors' names are not used to endorse or promote products */
/* derived from this software without specific prior written */
/* permission. */
/* */
/* CARNEGIE MELLON UNIVERSITY AND THE CONTRIBUTORS TO THIS WORK */
/* DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING */
/* ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT */
/* SHALL CARNEGIE MELLON UNIVERSITY NOR THE CONTRIBUTORS BE LIABLE */
/* FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES */
/* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN */
/* AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, */
/* ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF */
/* THIS SOFTWARE. */
/* */
/*************************************************************************/
/* Author: Alan W Black (awb@cs.cmu.edu) */
/* Date: January 2001 */
/*************************************************************************/
/* Feature functions used by various cart trees etc */
/* These have been create as needed, and as some of the trees are */
/* from University of Edinburgh's Festival system their names and */
/* semantics follow them */
/*************************************************************************/
#ifndef _US_FFEATURES_H
#define _US_FFEATURES_H
void us_ff_register(cst_features *ffunctions);
extern const cst_val * const * const us_gpos[];
#endif /* _US_FFEATURES_H */

View File

@ -0,0 +1,290 @@
/*************************************************************************/
/* */
/* Language Technologies Institute */
/* Carnegie Mellon University */
/* Copyright (c) 2001 */
/* All Rights Reserved. */
/* */
/* Permission is hereby granted, free of charge, to use and distribute */
/* this software and its documentation without restriction, including */
/* without limitation the rights to use, copy, modify, merge, publish, */
/* distribute, sublicense, and/or sell copies of this work, and to */
/* permit persons to whom this work is furnished to do so, subject to */
/* the following conditions: */
/* 1. The code must retain the above copyright notice, this list of */
/* conditions and the following disclaimer. */
/* 2. Any modifications must be clearly marked as such. */
/* 3. Original authors' names are not deleted. */
/* 4. The authors' names are not used to endorse or promote products */
/* derived from this software without specific prior written */
/* permission. */
/* */
/* CARNEGIE MELLON UNIVERSITY AND THE CONTRIBUTORS TO THIS WORK */
/* DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING */
/* ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT */
/* SHALL CARNEGIE MELLON UNIVERSITY NOR THE CONTRIBUTORS BE LIABLE */
/* FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES */
/* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN */
/* AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, */
/* ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF */
/* THIS SOFTWARE. */
/* */
/*************************************************************************/
/* Author: Alan W Black (awb@cs.cmu.edu) */
/* Date: January 2001 */
/*************************************************************************/
/* Poor mans part of speech tagger */
/*************************************************************************/
#include "cst_val.h"
DEF_STATIC_CONST_VAL_STRING(gpos_in,"in");
DEF_STATIC_CONST_VAL_STRING(gpos_of,"of");
DEF_STATIC_CONST_VAL_STRING(gpos_for,"for");
DEF_STATIC_CONST_VAL_STRING(gpos_on,"on");
DEF_STATIC_CONST_VAL_STRING(gpos_that,"that");
DEF_STATIC_CONST_VAL_STRING(gpos_with,"with");
DEF_STATIC_CONST_VAL_STRING(gpos_by,"by");
DEF_STATIC_CONST_VAL_STRING(gpos_at,"at");
DEF_STATIC_CONST_VAL_STRING(gpos_from,"from");
DEF_STATIC_CONST_VAL_STRING(gpos_as,"as");
DEF_STATIC_CONST_VAL_STRING(gpos_if,"if");
DEF_STATIC_CONST_VAL_STRING(gpos_against,"against");
DEF_STATIC_CONST_VAL_STRING(gpos_about,"about");
DEF_STATIC_CONST_VAL_STRING(gpos_before,"before");
DEF_STATIC_CONST_VAL_STRING(gpos_because,"because");
DEF_STATIC_CONST_VAL_STRING(gpos_under,"under");
DEF_STATIC_CONST_VAL_STRING(gpos_after,"after");
DEF_STATIC_CONST_VAL_STRING(gpos_over,"over");
DEF_STATIC_CONST_VAL_STRING(gpos_into,"into");
DEF_STATIC_CONST_VAL_STRING(gpos_while,"while");
DEF_STATIC_CONST_VAL_STRING(gpos_without,"without");
DEF_STATIC_CONST_VAL_STRING(gpos_through,"through");
DEF_STATIC_CONST_VAL_STRING(gpos_new,"new"); /* ??? */
DEF_STATIC_CONST_VAL_STRING(gpos_between,"between");
DEF_STATIC_CONST_VAL_STRING(gpos_among,"among");
DEF_STATIC_CONST_VAL_STRING(gpos_until,"until");
DEF_STATIC_CONST_VAL_STRING(gpos_per,"per");
DEF_STATIC_CONST_VAL_STRING(gpos_up,"up");
DEF_STATIC_CONST_VAL_STRING(gpos_down,"down");
static const cst_val * const gpos_in_list[] = {
(cst_val *)&gpos_in,
(cst_val *)&gpos_of,
(cst_val *)&gpos_for,
(cst_val *)&gpos_in,
(cst_val *)&gpos_on,
(cst_val *)&gpos_that,
(cst_val *)&gpos_with,
(cst_val *)&gpos_by,
(cst_val *)&gpos_at,
(cst_val *)&gpos_from,
(cst_val *)&gpos_as,
(cst_val *)&gpos_if,
(cst_val *)&gpos_that,
(cst_val *)&gpos_against,
(cst_val *)&gpos_about,
(cst_val *)&gpos_before,
(cst_val *)&gpos_because,
(cst_val *)&gpos_under,
(cst_val *)&gpos_after,
(cst_val *)&gpos_over,
(cst_val *)&gpos_into,
(cst_val *)&gpos_while,
(cst_val *)&gpos_without,
(cst_val *)&gpos_through,
(cst_val *)&gpos_new,
(cst_val *)&gpos_between,
(cst_val *)&gpos_among,
(cst_val *)&gpos_until,
(cst_val *)&gpos_per,
(cst_val *)&gpos_up,
(cst_val *)&gpos_down,
0 };
DEF_STATIC_CONST_VAL_STRING(gpos_to,"to");
static const cst_val * const gpos_to_list[] = {
(cst_val *)&gpos_to,
(cst_val *)&gpos_to,
0 };
DEF_STATIC_CONST_VAL_STRING(gpos_det,"det");
DEF_STATIC_CONST_VAL_STRING(gpos_the,"the");
DEF_STATIC_CONST_VAL_STRING(gpos_a,"a");
DEF_STATIC_CONST_VAL_STRING(gpos_an,"an");
DEF_STATIC_CONST_VAL_STRING(gpos_some,"some");
DEF_STATIC_CONST_VAL_STRING(gpos_this,"this");
DEF_STATIC_CONST_VAL_STRING(gpos_each,"each");
DEF_STATIC_CONST_VAL_STRING(gpos_another,"another");
DEF_STATIC_CONST_VAL_STRING(gpos_those,"those");
DEF_STATIC_CONST_VAL_STRING(gpos_every,"every");
DEF_STATIC_CONST_VAL_STRING(gpos_all,"all");
DEF_STATIC_CONST_VAL_STRING(gpos_any,"any");
DEF_STATIC_CONST_VAL_STRING(gpos_these,"these");
DEF_STATIC_CONST_VAL_STRING(gpos_both,"both");
DEF_STATIC_CONST_VAL_STRING(gpos_neither,"neither");
DEF_STATIC_CONST_VAL_STRING(gpos_no,"no");
DEF_STATIC_CONST_VAL_STRING(gpos_many,"many");
static const cst_val * const gpos_det_list[] = {
(cst_val *)&gpos_det,
(cst_val *)&gpos_the,
(cst_val *)&gpos_a,
(cst_val *)&gpos_an,
(cst_val *)&gpos_no,
(cst_val *)&gpos_some,
(cst_val *)&gpos_this,
(cst_val *)&gpos_each,
(cst_val *)&gpos_another,
(cst_val *)&gpos_those,
(cst_val *)&gpos_every,
(cst_val *)&gpos_all,
(cst_val *)&gpos_any,
(cst_val *)&gpos_these,
(cst_val *)&gpos_both,
(cst_val *)&gpos_neither,
(cst_val *)&gpos_no,
(cst_val *)&gpos_many,
0 };
DEF_STATIC_CONST_VAL_STRING(gpos_md,"md");
DEF_STATIC_CONST_VAL_STRING(gpos_will,"will");
DEF_STATIC_CONST_VAL_STRING(gpos_may,"may");
DEF_STATIC_CONST_VAL_STRING(gpos_would,"would");
DEF_STATIC_CONST_VAL_STRING(gpos_can,"can");
DEF_STATIC_CONST_VAL_STRING(gpos_could,"could");
DEF_STATIC_CONST_VAL_STRING(gpos_should,"should");
DEF_STATIC_CONST_VAL_STRING(gpos_must,"must");
DEF_STATIC_CONST_VAL_STRING(gpos_ought,"ought");
DEF_STATIC_CONST_VAL_STRING(gpos_might,"might");
static const cst_val * const gpos_md_list[] = {
(cst_val *)&gpos_md,
(cst_val *)&gpos_will,
(cst_val *)&gpos_may,
(cst_val *)&gpos_would,
(cst_val *)&gpos_can,
(cst_val *)&gpos_could,
(cst_val *)&gpos_should,
(cst_val *)&gpos_must,
(cst_val *)&gpos_ought,
(cst_val *)&gpos_might,
0 };
DEF_STATIC_CONST_VAL_STRING(gpos_cc,"cc");
DEF_STATIC_CONST_VAL_STRING(gpos_and,"and");
DEF_STATIC_CONST_VAL_STRING(gpos_but,"but");
DEF_STATIC_CONST_VAL_STRING(gpos_or,"or");
DEF_STATIC_CONST_VAL_STRING(gpos_plus,"plus");
DEF_STATIC_CONST_VAL_STRING(gpos_yet,"yet");
DEF_STATIC_CONST_VAL_STRING(gpos_nor,"nor");
static const cst_val * const gpos_cc_list[] = {
(cst_val *)&gpos_cc,
(cst_val *)&gpos_and,
(cst_val *)&gpos_but,
(cst_val *)&gpos_or,
(cst_val *)&gpos_plus,
(cst_val *)&gpos_yet,
(cst_val *)&gpos_nor,
0 };
DEF_STATIC_CONST_VAL_STRING(gpos_wp,"wp");
DEF_STATIC_CONST_VAL_STRING(gpos_who,"who");
DEF_STATIC_CONST_VAL_STRING(gpos_what,"what");
DEF_STATIC_CONST_VAL_STRING(gpos_where,"where");
DEF_STATIC_CONST_VAL_STRING(gpos_how,"how");
DEF_STATIC_CONST_VAL_STRING(gpos_when,"when");
static const cst_val * const gpos_wp_list[] = {
(cst_val *)&gpos_wp,
(cst_val *)&gpos_who,
(cst_val *)&gpos_what,
(cst_val *)&gpos_where,
(cst_val *)&gpos_how,
(cst_val *)&gpos_when,
0 };
DEF_STATIC_CONST_VAL_STRING(gpos_pps,"pps");
DEF_STATIC_CONST_VAL_STRING(gpos_her,"her");
DEF_STATIC_CONST_VAL_STRING(gpos_his,"his");
DEF_STATIC_CONST_VAL_STRING(gpos_their,"their");
DEF_STATIC_CONST_VAL_STRING(gpos_its,"its");
DEF_STATIC_CONST_VAL_STRING(gpos_our,"our");
DEF_STATIC_CONST_VAL_STRING(gpos_mine,"mine");
static const cst_val * const gpos_pps_list[] = {
(cst_val *)&gpos_pps,
(cst_val *)&gpos_her,
(cst_val *)&gpos_his,
(cst_val *)&gpos_their,
(cst_val *)&gpos_its,
(cst_val *)&gpos_our,
(cst_val *)&gpos_mine,
0 };
DEF_STATIC_CONST_VAL_STRING(gpos_aux,"aux");
DEF_STATIC_CONST_VAL_STRING(gpos_is,"is");
DEF_STATIC_CONST_VAL_STRING(gpos_am,"am");
DEF_STATIC_CONST_VAL_STRING(gpos_are,"are");
DEF_STATIC_CONST_VAL_STRING(gpos_was,"was");
DEF_STATIC_CONST_VAL_STRING(gpos_were,"were");
DEF_STATIC_CONST_VAL_STRING(gpos_has,"has");
DEF_STATIC_CONST_VAL_STRING(gpos_have,"have");
DEF_STATIC_CONST_VAL_STRING(gpos_had,"had");
DEF_STATIC_CONST_VAL_STRING(gpos_be,"be");
static const cst_val * const gpos_aux_list[] = {
(cst_val *)&gpos_aux,
(cst_val *)&gpos_is,
(cst_val *)&gpos_am,
(cst_val *)&gpos_are,
(cst_val *)&gpos_was,
(cst_val *)&gpos_were,
(cst_val *)&gpos_has,
(cst_val *)&gpos_have,
(cst_val *)&gpos_had,
(cst_val *)&gpos_be,
0 };
DEF_STATIC_CONST_VAL_STRING(gpos_punc,"punc");
DEF_STATIC_CONST_VAL_STRING(gpos_dot,".");
DEF_STATIC_CONST_VAL_STRING(gpos_comma,",");
DEF_STATIC_CONST_VAL_STRING(gpos_colon,":");
DEF_STATIC_CONST_VAL_STRING(gpos_semicolon,";");
DEF_STATIC_CONST_VAL_STRING(gpos_dquote,"\"");
DEF_STATIC_CONST_VAL_STRING(gpos_squote,"'");
DEF_STATIC_CONST_VAL_STRING(gpos_leftparen,"(");
DEF_STATIC_CONST_VAL_STRING(gpos_qmark,"?");
DEF_STATIC_CONST_VAL_STRING(gpos_rightparen,")");
DEF_STATIC_CONST_VAL_STRING(gpos_emark,"!");
static const cst_val * const gpos_punc_list[] = {
(cst_val *)&gpos_punc,
(cst_val *)&gpos_dot,
(cst_val *)&gpos_comma,
(cst_val *)&gpos_colon,
(cst_val *)&gpos_semicolon,
(cst_val *)&gpos_dquote,
(cst_val *)&gpos_squote,
(cst_val *)&gpos_leftparen,
(cst_val *)&gpos_qmark,
(cst_val *)&gpos_rightparen,
(cst_val *)&gpos_emark,
0 };
const cst_val * const * const us_gpos[] = {
gpos_in_list,
gpos_to_list,
gpos_det_list,
gpos_md_list,
gpos_cc_list,
gpos_wp_list,
gpos_pps_list,
gpos_aux_list,
gpos_punc_list,
0 };

View File

@ -0,0 +1,234 @@
/*************************************************************************/
/* */
/* Carnegie Mellon University and */
/* Centre for Speech Technology Research */
/* University of Edinburgh, UK */
/* Copyright (c) 1998-2001 */
/* All Rights Reserved. */
/* */
/* Permission is hereby granted, free of charge, to use and distribute */
/* this software and its documentation without restriction, including */
/* without limitation the rights to use, copy, modify, merge, publish, */
/* distribute, sublicense, and/or sell copies of this work, and to */
/* permit persons to whom this work is furnished to do so, subject to */
/* the following conditions: */
/* 1. The code must retain the above copyright notice, this list of */
/* conditions and the following disclaimer. */
/* 2. Any modifications must be clearly marked as such. */
/* 3. Original authors' names are not deleted. */
/* 4. The authors' names are not used to endorse or promote products */
/* derived from this software without specific prior written */
/* permission. */
/* */
/* THE UNIVERSITY OF EDINBURGH, CARNEGIE MELLON UNIVERSITY AND THE */
/* CONTRIBUTORS TO THIS WORK DISCLAIM ALL WARRANTIES WITH REGARD TO */
/* THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY */
/* AND FITNESS, IN NO EVENT SHALL THE UNIVERSITY OF EDINBURGH, CARNEGIE */
/* MELLON UNIVERSITY NOR THE CONTRIBUTORS BE LIABLE FOR ANY SPECIAL, */
/* INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER */
/* RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION */
/* OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF */
/* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */
/* */
/*************************************************************************/
/* Author: Alan W Black (awb@cs.cmu.edu) */
/* Date: January 2001 */
/*************************************************************************/
/* */
/* Derived directly from the accent model cart tree in University of */
/* Edinburgh's Festival Speech Synthesis Systems */
/* file: festival/lib/tobi.scm:f2b_int_accent_cart_tree */
/* which was in turn was trained from Boston University FM Radio Data */
/* Corpus */
/* */
/*************************************************************************/
/*******************************************************/
/** Autogenerated cart trees for us_int_accent */
/*******************************************************/
#include "cst_string.h"
#include "cst_cart.h"
#include "cst_regex.h"
#include "us_int_accent_cart.h"
extern const cst_cart us_int_accent_cart;
static const cst_cart_node us_int_accent_cart_nodes[] = {
{ 0, CST_CART_OP_IS, CTNODE_NO_0000, (cst_val *)&val_0000},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0001 },
{ 1, CST_CART_OP_IS, CTNODE_NO_0002, (cst_val *)&val_0000},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0002 },
{ 2, CST_CART_OP_IS, CTNODE_NO_0004, (cst_val *)&val_0000},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0002 },
{ 3, CST_CART_OP_IS, CTNODE_NO_0006, (cst_val *)&val_0003},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0002 },
{ 4, CST_CART_OP_IS, CTNODE_NO_0008, (cst_val *)&val_0004},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0002 },
{ 4, CST_CART_OP_IS, CTNODE_NO_0010, (cst_val *)&val_0005},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0002 },
{ 5, CST_CART_OP_IS, CTNODE_NO_0012, (cst_val *)&val_0003},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0002 },
{ 4, CST_CART_OP_IS, CTNODE_NO_0014, (cst_val *)&val_0006},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0002 },
{ 4, CST_CART_OP_IS, CTNODE_NO_0016, (cst_val *)&val_0007},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0002 },
{ 4, CST_CART_OP_IS, CTNODE_NO_0018, (cst_val *)&val_0008},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0002 },
{ 4, CST_CART_OP_IS, CTNODE_NO_0020, (cst_val *)&val_0009},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0002 },
{ 6, CST_CART_OP_IS, CTNODE_NO_0022, (cst_val *)&val_0010},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0002 },
{ 7, CST_CART_OP_IS, CTNODE_NO_0024, (cst_val *)&val_0010},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0001 },
{ 4, CST_CART_OP_IS, CTNODE_NO_0026, (cst_val *)&val_0011},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0002 },
{ 8, CST_CART_OP_IS, CTNODE_NO_0028, (cst_val *)&val_0012},
{ 9, CST_CART_OP_IS, CTNODE_NO_0029, (cst_val *)&val_0000},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0002 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0001 },
{ 10, CST_CART_OP_IS, CTNODE_NO_0032, (cst_val *)&val_0013},
{ 11, CST_CART_OP_IS, CTNODE_NO_0033, (cst_val *)&val_0006},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0001 },
{ 12, CST_CART_OP_IS, CTNODE_NO_0035, (cst_val *)&val_0010},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0001 },
{ 13, CST_CART_OP_IS, CTNODE_NO_0037, (cst_val *)&val_0006},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0001 },
{ 9, CST_CART_OP_IS, CTNODE_NO_0039, (cst_val *)&val_0010},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0001 },
{ 14, CST_CART_OP_IS, CTNODE_NO_0041, (cst_val *)&val_0010},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0001 },
{ 8, CST_CART_OP_IS, CTNODE_NO_0043, (cst_val *)&val_0010},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0002 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0001 },
{ 3, CST_CART_OP_IS, CTNODE_NO_0046, (cst_val *)&val_0010},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0001 },
{ 5, CST_CART_OP_IS, CTNODE_NO_0048, (cst_val *)&val_0013},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0002 },
{ 10, CST_CART_OP_IS, CTNODE_NO_0050, (cst_val *)&val_0012},
{ 7, CST_CART_OP_IS, CTNODE_NO_0051, (cst_val *)&val_0014},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0002 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0001 },
{ 15, CST_CART_OP_IS, CTNODE_NO_0054, (cst_val *)&val_0015},
{ 14, CST_CART_OP_IS, CTNODE_NO_0055, (cst_val *)&val_0010},
{ 7, CST_CART_OP_IS, CTNODE_NO_0056, (cst_val *)&val_0006},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0001 },
{ 12, CST_CART_OP_IS, CTNODE_NO_0058, (cst_val *)&val_0015},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0001 },
{ 7, CST_CART_OP_IS, CTNODE_NO_0060, (cst_val *)&val_0014},
{ 12, CST_CART_OP_IS, CTNODE_NO_0061, (cst_val *)&val_0013},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0002 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0001 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0001 },
{ 16, CST_CART_OP_IS, CTNODE_NO_0065, (cst_val *)&val_0010},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0002 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0001 },
{ 13, CST_CART_OP_IS, CTNODE_NO_0068, (cst_val *)&val_0010},
{ 9, CST_CART_OP_IS, CTNODE_NO_0069, (cst_val *)&val_0010},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0016 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0002 },
{ 9, CST_CART_OP_IS, CTNODE_NO_0072, (cst_val *)&val_0000},
{ 3, CST_CART_OP_IS, CTNODE_NO_0073, (cst_val *)&val_0012},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0002 },
{ 8, CST_CART_OP_IS, CTNODE_NO_0075, (cst_val *)&val_0010},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0002 },
{ 14, CST_CART_OP_IS, CTNODE_NO_0077, (cst_val *)&val_0010},
{ 10, CST_CART_OP_IS, CTNODE_NO_0078, (cst_val *)&val_0010},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0002 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0001 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0002 },
{ 12, CST_CART_OP_IS, CTNODE_NO_0082, (cst_val *)&val_0013},
{ 17, CST_CART_OP_IS, CTNODE_NO_0083, (cst_val *)&val_0010},
{ 10, CST_CART_OP_IS, CTNODE_NO_0084, (cst_val *)&val_0010},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0002 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0016 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0001 },
{ 12, CST_CART_OP_IS, CTNODE_NO_0088, (cst_val *)&val_0017},
{ 7, CST_CART_OP_IS, CTNODE_NO_0089, (cst_val *)&val_0014},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0002 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0001 },
{ 11, CST_CART_OP_IS, CTNODE_NO_0092, (cst_val *)&val_0006},
{ 15, CST_CART_OP_IS, CTNODE_NO_0093, (cst_val *)&val_0013},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0001 },
{ 15, CST_CART_OP_IS, CTNODE_NO_0095, (cst_val *)&val_0012},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0001 },
{ 10, CST_CART_OP_IS, CTNODE_NO_0097, (cst_val *)&val_0010},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0002 },
{ 7, CST_CART_OP_IS, CTNODE_NO_0099, (cst_val *)&val_0014},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0001 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0018 },
{ 5, CST_CART_OP_IS, CTNODE_NO_0102, (cst_val *)&val_0015},
{ 8, CST_CART_OP_IS, CTNODE_NO_0103, (cst_val *)&val_0010},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0002 },
{ 10, CST_CART_OP_IS, CTNODE_NO_0105, (cst_val *)&val_0010},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0002 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0016 },
{ 11, CST_CART_OP_IS, CTNODE_NO_0108, (cst_val *)&val_0004},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0001 },
{ 9, CST_CART_OP_IS, CTNODE_NO_0110, (cst_val *)&val_0012},
{ 10, CST_CART_OP_IS, CTNODE_NO_0111, (cst_val *)&val_0010},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0002 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0001 },
{ 15, CST_CART_OP_IS, CTNODE_NO_0114, (cst_val *)&val_0019},
{ 14, CST_CART_OP_IS, CTNODE_NO_0115, (cst_val *)&val_0010},
{ 13, CST_CART_OP_IS, CTNODE_NO_0116, (cst_val *)&val_0014},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0018 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0002 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0002 },
{ 13, CST_CART_OP_IS, CTNODE_NO_0120, (cst_val *)&val_0005},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0002 },
{ 17, CST_CART_OP_IS, CTNODE_NO_0122, (cst_val *)&val_0012},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0001 },
{ 3, CST_CART_OP_IS, CTNODE_NO_0124, (cst_val *)&val_0013},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0002 },
{ 8, CST_CART_OP_IS, CTNODE_NO_0126, (cst_val *)&val_0010},
{ 16, CST_CART_OP_IS, CTNODE_NO_0127, (cst_val *)&val_0000},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0002 },
{ 3, CST_CART_OP_IS, CTNODE_NO_0129, (cst_val *)&val_0012},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0002 },
{ 10, CST_CART_OP_IS, CTNODE_NO_0131, (cst_val *)&val_0010},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0002 },
{ 3, CST_CART_OP_IS, CTNODE_NO_0133, (cst_val *)&val_0000},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0001 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0002 },
{ 7, CST_CART_OP_IS, CTNODE_NO_0136, (cst_val *)&val_0006},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0016 },
{ 15, CST_CART_OP_IS, CTNODE_NO_0138, (cst_val *)&val_0020},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0018 },
{ 12, CST_CART_OP_IS, CTNODE_NO_0140, (cst_val *)&val_0015},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0001 },
{ 15, CST_CART_OP_IS, CTNODE_NO_0142, (cst_val *)&val_0013},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0018 },
{ 14, CST_CART_OP_IS, CTNODE_NO_0144, (cst_val *)&val_0010},
{ 15, CST_CART_OP_IS, CTNODE_NO_0145, (cst_val *)&val_0012},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0001 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0002 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0002 },
{ 255, CST_CART_OP_NONE, 0, 0}};
static const char * const us_int_accent_feat_table[] = {
"R:SylStructure.parent.R:Token.parent.EMPH",
"n.R:SylStructure.parent.R:Token.parent.EMPH",
"p.R:SylStructure.parent.R:Token.parent.EMPH",
"ssyl_in",
"R:SylStructure.parent.gpos",
"ssyl_out",
"stress",
"R:SylStructure.parent.R:Word.p.gpos",
"p.syl_break",
"syl_break",
"p.p.syl_break",
"R:SylStructure.parent.R:Word.p.p.gpos",
"syl_out",
"R:SylStructure.parent.R:Word.n.gpos",
"n.stress",
"syl_in",
"n.syl_break",
"n.n.syl_break",
NULL };
const cst_cart us_int_accent_cart = {
us_int_accent_cart_nodes,
us_int_accent_feat_table
};

View File

@ -0,0 +1,144 @@
/*************************************************************************/
/* */
/* Carnegie Mellon University and */
/* Centre for Speech Technology Research */
/* University of Edinburgh, UK */
/* Copyright (c) 1998-2001 */
/* All Rights Reserved. */
/* */
/* Permission is hereby granted, free of charge, to use and distribute */
/* this software and its documentation without restriction, including */
/* without limitation the rights to use, copy, modify, merge, publish, */
/* distribute, sublicense, and/or sell copies of this work, and to */
/* permit persons to whom this work is furnished to do so, subject to */
/* the following conditions: */
/* 1. The code must retain the above copyright notice, this list of */
/* conditions and the following disclaimer. */
/* 2. Any modifications must be clearly marked as such. */
/* 3. Original authors' names are not deleted. */
/* 4. The authors' names are not used to endorse or promote products */
/* derived from this software without specific prior written */
/* permission. */
/* */
/* THE UNIVERSITY OF EDINBURGH, CARNEGIE MELLON UNIVERSITY AND THE */
/* CONTRIBUTORS TO THIS WORK DISCLAIM ALL WARRANTIES WITH REGARD TO */
/* THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY */
/* AND FITNESS, IN NO EVENT SHALL THE UNIVERSITY OF EDINBURGH, CARNEGIE */
/* MELLON UNIVERSITY NOR THE CONTRIBUTORS BE LIABLE FOR ANY SPECIAL, */
/* INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER */
/* RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION */
/* OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF */
/* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */
/* */
/*************************************************************************/
/* Author: Alan W Black (awb@cs.cmu.edu) */
/* Date: January 2001 */
/*************************************************************************/
/* */
/* Derived directly from the accent model cart tree in University of */
/* Edinburgh's Festival Speech Synthesis Systems */
/* file: festival/lib/tobi.scm:f2b_int_accent_cart_tree */
/* which was in turn was trained from Boston University FM Radio Data */
/* Corpus */
/* */
/*************************************************************************/
/*******************************************************/
/** Autogenerated cart tree for us_int_accent */
/** from . */
/*******************************************************/
DEF_STATIC_CONST_VAL_STRING(val_0000,"1");
DEF_STATIC_CONST_VAL_STRING(val_0001,"H*");
#define CTNODE_NO_0000 2
DEF_STATIC_CONST_VAL_STRING(val_0002,"NONE");
#define CTNODE_NO_0002 4
#define CTNODE_NO_0004 6
DEF_STATIC_CONST_VAL_STRING(val_0003,"10");
#define CTNODE_NO_0006 8
DEF_STATIC_CONST_VAL_STRING(val_0004,"to");
#define CTNODE_NO_0008 10
DEF_STATIC_CONST_VAL_STRING(val_0005,"cc");
#define CTNODE_NO_0010 12
#define CTNODE_NO_0012 14
DEF_STATIC_CONST_VAL_STRING(val_0006,"in");
#define CTNODE_NO_0014 16
DEF_STATIC_CONST_VAL_STRING(val_0007,"wp");
#define CTNODE_NO_0016 18
DEF_STATIC_CONST_VAL_STRING(val_0008,"aux");
#define CTNODE_NO_0018 20
DEF_STATIC_CONST_VAL_STRING(val_0009,"det");
#define CTNODE_NO_0020 22
DEF_STATIC_CONST_VAL_STRING(val_0010,"0");
#define CTNODE_NO_0022 24
#define CTNODE_NO_0024 26
DEF_STATIC_CONST_VAL_STRING(val_0011,"md");
#define CTNODE_NO_0026 28
DEF_STATIC_CONST_VAL_STRING(val_0012,"3");
#define CTNODE_NO_0029 31
#define CTNODE_NO_0028 32
DEF_STATIC_CONST_VAL_STRING(val_0013,"4");
#define CTNODE_NO_0033 35
#define CTNODE_NO_0035 37
#define CTNODE_NO_0037 39
#define CTNODE_NO_0039 41
#define CTNODE_NO_0041 43
#define CTNODE_NO_0043 45
#define CTNODE_NO_0032 46
#define CTNODE_NO_0046 48
#define CTNODE_NO_0048 50
DEF_STATIC_CONST_VAL_STRING(val_0014,"content");
#define CTNODE_NO_0051 53
#define CTNODE_NO_0050 54
DEF_STATIC_CONST_VAL_STRING(val_0015,"2");
#define CTNODE_NO_0056 58
#define CTNODE_NO_0058 60
#define CTNODE_NO_0061 63
#define CTNODE_NO_0060 64
#define CTNODE_NO_0055 65
#define CTNODE_NO_0065 67
#define CTNODE_NO_0054 68
DEF_STATIC_CONST_VAL_STRING(val_0016,"L+H*");
#define CTNODE_NO_0069 71
#define CTNODE_NO_0068 72
#define CTNODE_NO_0073 75
#define CTNODE_NO_0075 77
#define CTNODE_NO_0078 80
#define CTNODE_NO_0077 81
#define CTNODE_NO_0072 82
#define CTNODE_NO_0084 86
#define CTNODE_NO_0083 87
#define CTNODE_NO_0082 88
DEF_STATIC_CONST_VAL_STRING(val_0017,"5");
#define CTNODE_NO_0089 91
#define CTNODE_NO_0088 92
#define CTNODE_NO_0093 95
#define CTNODE_NO_0095 97
#define CTNODE_NO_0097 99
#define CTNODE_NO_0099 101
DEF_STATIC_CONST_VAL_STRING(val_0018,"!H*");
#define CTNODE_NO_0092 102
#define CTNODE_NO_0103 105
#define CTNODE_NO_0105 107
#define CTNODE_NO_0102 108
#define CTNODE_NO_0108 110
#define CTNODE_NO_0111 113
#define CTNODE_NO_0110 114
DEF_STATIC_CONST_VAL_STRING(val_0019,"7");
#define CTNODE_NO_0116 118
#define CTNODE_NO_0115 119
#define CTNODE_NO_0114 120
#define CTNODE_NO_0120 122
#define CTNODE_NO_0122 124
#define CTNODE_NO_0124 126
#define CTNODE_NO_0127 129
#define CTNODE_NO_0129 131
#define CTNODE_NO_0131 133
#define CTNODE_NO_0133 135
#define CTNODE_NO_0126 136
#define CTNODE_NO_0136 138
DEF_STATIC_CONST_VAL_STRING(val_0020,"6");
#define CTNODE_NO_0138 140
#define CTNODE_NO_0140 142
#define CTNODE_NO_0142 144
#define CTNODE_NO_0145 147
#define CTNODE_NO_0144 148

View File

@ -0,0 +1,177 @@
/*************************************************************************/
/* */
/* Carnegie Mellon University and */
/* Centre for Speech Technology Research */
/* University of Edinburgh, UK */
/* Copyright (c) 1998-2001 */
/* All Rights Reserved. */
/* */
/* Permission is hereby granted, free of charge, to use and distribute */
/* this software and its documentation without restriction, including */
/* without limitation the rights to use, copy, modify, merge, publish, */
/* distribute, sublicense, and/or sell copies of this work, and to */
/* permit persons to whom this work is furnished to do so, subject to */
/* the following conditions: */
/* 1. The code must retain the above copyright notice, this list of */
/* conditions and the following disclaimer. */
/* 2. Any modifications must be clearly marked as such. */
/* 3. Original authors' names are not deleted. */
/* 4. The authors' names are not used to endorse or promote products */
/* derived from this software without specific prior written */
/* permission. */
/* */
/* THE UNIVERSITY OF EDINBURGH, CARNEGIE MELLON UNIVERSITY AND THE */
/* CONTRIBUTORS TO THIS WORK DISCLAIM ALL WARRANTIES WITH REGARD TO */
/* THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY */
/* AND FITNESS, IN NO EVENT SHALL THE UNIVERSITY OF EDINBURGH, CARNEGIE */
/* MELLON UNIVERSITY NOR THE CONTRIBUTORS BE LIABLE FOR ANY SPECIAL, */
/* INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER */
/* RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION */
/* OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF */
/* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */
/* */
/*************************************************************************/
/* Author: Alan W Black (awb@cs.cmu.edu) */
/* Date: January 2001 */
/*************************************************************************/
/* */
/* Derived directly from the tone model cart tree in University of */
/* Edinburgh's Festival Speech Synthesis Systems */
/* file: festival/lib/tobi.scm:f2b_int_tone_cart_tree */
/* which was in turn was trained from Boston University FM Radio Data */
/* Corpus */
/* */
/*************************************************************************/
/*******************************************************/
/** Autogenerated cart trees for us_int_tone */
/*******************************************************/
#include "cst_string.h"
#include "cst_cart.h"
#include "cst_regex.h"
#include "us_int_tone_cart.h"
extern const cst_cart us_int_tone_cart;
static const cst_cart_node us_int_tone_cart_nodes[] = {
{ 0, CST_CART_OP_IS, CTNODE_NO_0000, (cst_val *)&val_0000},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0001 },
{ 1, CST_CART_OP_IS, CTNODE_NO_0002, (cst_val *)&val_0002},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0003 },
{ 2, CST_CART_OP_IS, CTNODE_NO_0004, (cst_val *)&val_0004},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0003 },
{ 1, CST_CART_OP_IS, CTNODE_NO_0006, (cst_val *)&val_0005},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0003 },
{ 3, CST_CART_OP_IS, CTNODE_NO_0008, (cst_val *)&val_0006},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0003 },
{ 1, CST_CART_OP_IS, CTNODE_NO_0010, (cst_val *)&val_0007},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0003 },
{ 4, CST_CART_OP_IS, CTNODE_NO_0012, (cst_val *)&val_0008},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0003 },
{ 4, CST_CART_OP_IS, CTNODE_NO_0014, (cst_val *)&val_0006},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0003 },
{ 1, CST_CART_OP_IS, CTNODE_NO_0016, (cst_val *)&val_0009},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0003 },
{ 5, CST_CART_OP_IS, CTNODE_NO_0018, (cst_val *)&val_0006},
{ 6, CST_CART_OP_IS, CTNODE_NO_0019, (cst_val *)&val_0010},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0011 },
{ 7, CST_CART_OP_IS, CTNODE_NO_0021, (cst_val *)&val_0012},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0011 },
{ 6, CST_CART_OP_IS, CTNODE_NO_0023, (cst_val *)&val_0007},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0011 },
{ 2, CST_CART_OP_IS, CTNODE_NO_0025, (cst_val *)&val_0006},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0011 },
{ 8, CST_CART_OP_IS, CTNODE_NO_0027, (cst_val *)&val_0013},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0011 },
{ 6, CST_CART_OP_IS, CTNODE_NO_0029, (cst_val *)&val_0012},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0014 },
{ 8, CST_CART_OP_IS, CTNODE_NO_0031, (cst_val *)&val_0015},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0011 },
{ 9, CST_CART_OP_IS, CTNODE_NO_0033, (cst_val *)&val_0016},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0011 },
{ 7, CST_CART_OP_IS, CTNODE_NO_0035, (cst_val *)&val_0007},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0011 },
{ 9, CST_CART_OP_IS, CTNODE_NO_0037, (cst_val *)&val_0010},
{ 6, CST_CART_OP_IS, CTNODE_NO_0038, (cst_val *)&val_0009},
{ 4, CST_CART_OP_IS, CTNODE_NO_0039, (cst_val *)&val_0010},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0011 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0014 },
{ 10, CST_CART_OP_IS, CTNODE_NO_0042, (cst_val *)&val_0010},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0011 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0014 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0011 },
{ 1, CST_CART_OP_IS, CTNODE_NO_0046, (cst_val *)&val_0017},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0003 },
{ 8, CST_CART_OP_IS, CTNODE_NO_0048, (cst_val *)&val_0010},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0003 },
{ 1, CST_CART_OP_IS, CTNODE_NO_0050, (cst_val *)&val_0018},
{ 11, CST_CART_OP_IS, CTNODE_NO_0051, (cst_val *)&val_0010},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0003 },
{ 12, CST_CART_OP_IS, CTNODE_NO_0053, (cst_val *)&val_0006},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0003 },
{ 8, CST_CART_OP_IS, CTNODE_NO_0055, (cst_val *)&val_0000},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0003 },
{ 13, CST_CART_OP_IS, CTNODE_NO_0057, (cst_val *)&val_0006},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0003 },
{ 11, CST_CART_OP_IS, CTNODE_NO_0059, (cst_val *)&val_0009},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0003 },
{ 7, CST_CART_OP_IS, CTNODE_NO_0061, (cst_val *)&val_0002},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0003 },
{ 13, CST_CART_OP_IS, CTNODE_NO_0063, (cst_val *)&val_0008},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0003 },
{ 11, CST_CART_OP_IS, CTNODE_NO_0065, (cst_val *)&val_0002},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0003 },
{ 2, CST_CART_OP_IS, CTNODE_NO_0067, (cst_val *)&val_0010},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0003 },
{ 11, CST_CART_OP_IS, CTNODE_NO_0069, (cst_val *)&val_0019},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0003 },
{ 14, CST_CART_OP_IS, CTNODE_NO_0071, (cst_val *)&val_0019},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0003 },
{ 7, CST_CART_OP_IS, CTNODE_NO_0073, (cst_val *)&val_0009},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0003 },
{ 14, CST_CART_OP_IS, CTNODE_NO_0075, (cst_val *)&val_0009},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0003 },
{ 8, CST_CART_OP_IS, CTNODE_NO_0077, (cst_val *)&val_0016},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0003 },
{ 11, CST_CART_OP_IS, CTNODE_NO_0079, (cst_val *)&val_0012},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0003 },
{ 9, CST_CART_OP_IS, CTNODE_NO_0081, (cst_val *)&val_0000},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0003 },
{ 14, CST_CART_OP_IS, CTNODE_NO_0083, (cst_val *)&val_0007},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0003 },
{ 2, CST_CART_OP_IS, CTNODE_NO_0085, (cst_val *)&val_0006},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0003 },
{ 4, CST_CART_OP_IS, CTNODE_NO_0087, (cst_val *)&val_0010},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0003 },
{ 6, CST_CART_OP_IS, CTNODE_NO_0089, (cst_val *)&val_0018},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0003 },
{ 5, CST_CART_OP_IS, CTNODE_NO_0091, (cst_val *)&val_0008},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0020 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0003 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0003 },
{ 255, CST_CART_OP_NONE, 0, 0}};
static const char * const us_int_tone_feat_table[] = {
"lisp_syl_yn_question",
"R:SylStructure.parent.gpos",
"ssyl_in",
"p.old_syl_break",
"n.old_syl_break",
"old_syl_break",
"R:SylStructure.parent.R:Word.n.gpos",
"R:SylStructure.parent.R:Word.p.gpos",
"syl_in",
"sub_phrases",
"n.stress",
"R:SylStructure.parent.R:Word.n.n.gpos",
"p.p.old_syl_break",
"n.n.old_syl_break",
"R:SylStructure.parent.R:Word.p.p.gpos",
NULL };
const cst_cart us_int_tone_cart = {
us_int_tone_cart_nodes,
us_int_tone_feat_table
};

Some files were not shown because too many files have changed in this diff Show More