Add hts_engine 1.08 and flite_hts 1.05 code.
- Not compiled by default, nor hooked up to anything yet. - Both libraries licensed under modified BSD license. - Added top-level CMake file for both, to create a plain static library for each.
This commit is contained in:
parent
dac3b45892
commit
7b2d710cd0
169 changed files with 151343 additions and 0 deletions
5
3rdparty/CMakeLists.txt
vendored
5
3rdparty/CMakeLists.txt
vendored
|
@ -9,3 +9,8 @@ endif()
|
|||
|
||||
add_subdirectory(mongoose)
|
||||
add_subdirectory(cjson)
|
||||
|
||||
if (ENABLE_FLITE)
|
||||
add_subdirectory(hts_engine_API)
|
||||
add_subdirectory(flite_hts_engine)
|
||||
endif()
|
||||
|
|
12
3rdparty/flite_hts_engine/AUTHORS
vendored
Normal file
12
3rdparty/flite_hts_engine/AUTHORS
vendored
Normal file
|
@ -0,0 +1,12 @@
|
|||
The Flite+hts_engine is an English TTS System. This software is released under
|
||||
the Modified BSD license. See the COPYING file in the same directory as this
|
||||
file for the license.
|
||||
|
||||
The flite+hts_engine has been developed by several members of HTS working group
|
||||
and some graduate students in Nagoya Institute of Technology:
|
||||
|
||||
Keiichi Tokuda http://www.sp.nitech.ac.jp/~tokuda/
|
||||
(Produce and Design)
|
||||
Keiichiro Oura http://www.sp.nitech.ac.jp/~uratec/
|
||||
(Design and Development, Main Maintainer)
|
||||
Tomoki Toda http://spalab.naist.jp/~tomoki/index_e.html
|
70
3rdparty/flite_hts_engine/CMakeLists.txt
vendored
Normal file
70
3rdparty/flite_hts_engine/CMakeLists.txt
vendored
Normal file
|
@ -0,0 +1,70 @@
|
|||
|
||||
include_directories(${PROJECT_SOURCE_DIR}/3rdparty/hts_engine_API/include)
|
||||
include_directories(${PROJECT_SOURCE_DIR}/3rdparty/flite_hts_engine/include)
|
||||
include_directories(${PROJECT_SOURCE_DIR}/3rdparty/flite_hts_engine/flite/include)
|
||||
include_directories(${PROJECT_SOURCE_DIR}/3rdparty/flite_hts_engine/flite/lang/cmulex)
|
||||
include_directories(${PROJECT_SOURCE_DIR}/3rdparty/flite_hts_engine/flite/lang/usenglish)
|
||||
|
||||
set(FLITE_SOURCES
|
||||
flite/src/hrg/cst_ffeature.c
|
||||
flite/src/hrg/cst_item.c
|
||||
flite/src/hrg/cst_relation.c
|
||||
flite/src/hrg/cst_utterance.c
|
||||
|
||||
flite/src/lexicon/cst_lexicon.c
|
||||
flite/src/lexicon/cst_lts.c
|
||||
|
||||
flite/src/regex/cst_regex.c
|
||||
flite/src/regex/regexp.c
|
||||
|
||||
flite/src/stats/cst_cart.c
|
||||
|
||||
flite/src/synth/cst_ffeatures.c
|
||||
flite/src/synth/cst_phoneset.c
|
||||
flite/src/synth/cst_synth.c
|
||||
flite/src/synth/cst_utt_utils.c
|
||||
flite/src/synth/cst_voice.c
|
||||
flite/src/synth/flite.c
|
||||
|
||||
flite/src/utils/cst_alloc.c
|
||||
flite/src/utils/cst_error.c
|
||||
flite/src/utils/cst_features.c
|
||||
flite/src/utils/cst_string.c
|
||||
flite/src/utils/cst_tokenstream.c
|
||||
flite/src/utils/cst_val.c
|
||||
flite/src/utils/cst_val_const.c
|
||||
flite/src/utils/cst_val_user.c
|
||||
)
|
||||
|
||||
set(FLITE_LANG_SOURCES
|
||||
flite/lang/cmu_us_kal/cmu_us_kal.c
|
||||
|
||||
flite/lang/cmulex/cmu_lex.c
|
||||
flite/lang/cmulex/cmu_lex_data.c
|
||||
flite/lang/cmulex/cmu_lex_entries.c
|
||||
flite/lang/cmulex/cmu_lts_model.c
|
||||
flite/lang/cmulex/cmu_lts_rules.c
|
||||
flite/lang/cmulex/cmu_postlex.c
|
||||
|
||||
flite/lang/usenglish/us_aswd.c
|
||||
flite/lang/usenglish/us_expand.c
|
||||
flite/lang/usenglish/us_ffeatures.c
|
||||
flite/lang/usenglish/us_gpos.c
|
||||
flite/lang/usenglish/us_int_accent_cart.c
|
||||
flite/lang/usenglish/us_int_tone_cart.c
|
||||
flite/lang/usenglish/us_nums_cart.c
|
||||
flite/lang/usenglish/us_phoneset.c
|
||||
flite/lang/usenglish/us_phrasing_cart.c
|
||||
flite/lang/usenglish/us_pos_cart.c
|
||||
flite/lang/usenglish/us_text.c
|
||||
flite/lang/usenglish/usenglish.c
|
||||
)
|
||||
|
||||
add_definitions(-DFLITE_PLUS_HTS_ENGINE)
|
||||
|
||||
add_library(flite_hts STATIC
|
||||
${FLITE_SOURCES}
|
||||
${FLITE_LANG_SOURCES}
|
||||
lib/flite_hts_engine.c
|
||||
)
|
||||
|
43
3rdparty/flite_hts_engine/COPYING
vendored
Normal file
43
3rdparty/flite_hts_engine/COPYING
vendored
Normal file
|
@ -0,0 +1,43 @@
|
|||
/* ----------------------------------------------------------------- */
|
||||
/* The English TTS System "Flite+hts_engine" */
|
||||
/* developed by HTS Working Group */
|
||||
/* http://hts-engine.sourceforge.net/ */
|
||||
/* ----------------------------------------------------------------- */
|
||||
/* */
|
||||
/* Copyright (c) 2005-2013 Nagoya Institute of Technology */
|
||||
/* Department of Computer Science */
|
||||
/* */
|
||||
/* 2005-2008 Tokyo Institute of Technology */
|
||||
/* Interdisciplinary Graduate School of */
|
||||
/* Science and Engineering */
|
||||
/* */
|
||||
/* All rights reserved. */
|
||||
/* */
|
||||
/* Redistribution and use in source and binary forms, with or */
|
||||
/* without modification, are permitted provided that the following */
|
||||
/* conditions are met: */
|
||||
/* */
|
||||
/* - Redistributions of source code must retain the above copyright */
|
||||
/* notice, this list of conditions and the following disclaimer. */
|
||||
/* - 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. */
|
||||
/* - Neither the name of the HTS working group 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 COPYRIGHT HOLDERS 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 COPYRIGHT OWNER 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. */
|
||||
/* ----------------------------------------------------------------- */
|
474
3rdparty/flite_hts_engine/ChangeLog
vendored
Normal file
474
3rdparty/flite_hts_engine/ChangeLog
vendored
Normal file
|
@ -0,0 +1,474 @@
|
|||
2013-12-23 17:01 uratec
|
||||
|
||||
* configure.ac: Modify comments
|
||||
|
||||
2013-12-11 12:15 uratec
|
||||
|
||||
* COPYING, NEWS, README, configure.ac, bin/flite_hts_engine.c,
|
||||
flite/COPYING, flite/include/cst_file.h, flite/include/flite.h,
|
||||
flite/lang/usenglish/us_ffeatures.c,
|
||||
flite/lang/usenglish/usenglish.c,
|
||||
flite/lang/usenglish/usenglish.h,
|
||||
flite/src/lexicon/cst_lexicon.c, flite/src/lexicon/cst_lts.c,
|
||||
flite/src/regex/cst_regex.c, flite/src/stats/cst_cart.c,
|
||||
flite/src/synth/cst_ffeatures.c, flite/src/synth/cst_phoneset.c,
|
||||
flite/src/synth/cst_synth.c, flite/src/synth/cst_utt_utils.c,
|
||||
flite/src/synth/flite.c, flite/src/utils/cst_features.c,
|
||||
flite/src/utils/cst_tokenstream.c, flite/src/utils/cst_val.c,
|
||||
flite/src/utils/cst_val_user.c, include/flite_hts_engine.h:
|
||||
update documents for version 1.05.
|
||||
|
||||
2013-12-11 12:00 uratec
|
||||
|
||||
* configure.ac, flite/include/cst_val.h,
|
||||
flite/include/cst_val_const.h: support 64-bit machine.
|
||||
|
||||
2013-12-11 11:55 uratec
|
||||
|
||||
* flite/lang/cmu_us_kal/cmu_us_kal.c: Remove fix_ah().
|
||||
|
||||
2013-12-11 11:50 uratec
|
||||
|
||||
* lib/flite_hts_engine.c: Fix memory leak in text analysis.
|
||||
|
||||
2012-12-23 21:21 uratec
|
||||
|
||||
* bin/flite_hts_engine.c: Fix a small bug: engine was not
|
||||
initialized.
|
||||
|
||||
2012-12-20 17:52 uratec
|
||||
|
||||
* NEWS: Update documents for 1.04
|
||||
|
||||
2012-12-20 17:36 uratec
|
||||
|
||||
* bin/flite_hts_engine.c, include/flite_hts_engine.h,
|
||||
lib/flite_hts_engine.c: Add options for changing speed option and
|
||||
audio buffer size.
|
||||
|
||||
2012-12-20 17:21 uratec
|
||||
|
||||
* COPYING, NEWS, README, configure.ac, flite/COPYING,
|
||||
flite/include/cst_file.h, flite/include/flite.h,
|
||||
flite/lang/cmu_us_kal/cmu_us_kal.c,
|
||||
flite/lang/usenglish/us_ffeatures.c,
|
||||
flite/lang/usenglish/usenglish.c,
|
||||
flite/lang/usenglish/usenglish.h,
|
||||
flite/src/lexicon/cst_lexicon.c, flite/src/lexicon/cst_lts.c,
|
||||
flite/src/regex/cst_regex.c, flite/src/stats/cst_cart.c,
|
||||
flite/src/synth/cst_ffeatures.c, flite/src/synth/cst_phoneset.c,
|
||||
flite/src/synth/cst_synth.c, flite/src/synth/cst_utt_utils.c,
|
||||
flite/src/synth/flite.c, flite/src/utils/cst_features.c,
|
||||
flite/src/utils/cst_tokenstream.c, flite/src/utils/cst_val.c,
|
||||
flite/src/utils/cst_val_user.c: Update all documents for 1.04
|
||||
|
||||
2012-12-20 17:18 uratec
|
||||
|
||||
* bin/flite_hts_engine.c, include/flite_hts_engine.h,
|
||||
lib/flite_hts_engine.c: Support new HTS voice format.
|
||||
|
||||
2012-12-20 17:17 uratec
|
||||
|
||||
* ChangeLog: Remove ChangeLog from CVS.
|
||||
|
||||
2011-12-20 23:55 uratec
|
||||
|
||||
* AUTHORS, ChangeLog, NEWS, README, configure.ac: Update documents
|
||||
|
||||
2011-12-20 23:53 uratec
|
||||
|
||||
* bin/flite_hts_engine.c, include/flite_hts_engine.h,
|
||||
lib/flite_hts_engine.c: Modify source format. Add functions for
|
||||
front-end use.
|
||||
|
||||
2011-12-20 23:52 uratec
|
||||
|
||||
* flite/include/cst_file.h, flite/src/utils/cst_file_stdio.c,
|
||||
lib/Makefile.am, lib/Makefile.mak: Remove cst_file_stdio.c.
|
||||
|
||||
2011-07-07 09:37 uratec
|
||||
|
||||
* ChangeLog, include/flite_hts_engine.h: update documents.
|
||||
|
||||
2011-07-07 08:58 uratec
|
||||
|
||||
* ChangeLog, flite/COPYING: update documents.
|
||||
|
||||
2011-07-07 08:50 uratec
|
||||
|
||||
* COPYING, ChangeLog, NEWS, README, configure.ac,
|
||||
bin/flite_hts_engine.c, flite/COPYING, flite/include/flite.h,
|
||||
flite/lang/cmu_us_kal/cmu_us_kal.c,
|
||||
flite/lang/usenglish/us_ffeatures.c,
|
||||
flite/lang/usenglish/usenglish.c,
|
||||
flite/lang/usenglish/usenglish.h,
|
||||
flite/src/lexicon/cst_lexicon.c, flite/src/lexicon/cst_lts.c,
|
||||
flite/src/regex/cst_regex.c, flite/src/stats/cst_cart.c,
|
||||
flite/src/synth/cst_ffeatures.c, flite/src/synth/cst_phoneset.c,
|
||||
flite/src/synth/cst_synth.c, flite/src/synth/cst_utt_utils.c,
|
||||
flite/src/synth/flite.c, flite/src/utils/cst_features.c,
|
||||
flite/src/utils/cst_file_stdio.c,
|
||||
flite/src/utils/cst_tokenstream.c, flite/src/utils/cst_val.c,
|
||||
flite/src/utils/cst_val_user.c, lib/flite_hts_engine.c: Update
|
||||
all documents to 1.02
|
||||
|
||||
2011-04-18 12:14 uratec
|
||||
|
||||
* ChangeLog, lib/flite_hts_engine.c: Fix a bug: wrong context is
|
||||
generated when endtone cannot be estimated.
|
||||
|
||||
2011-01-24 19:13 uratec
|
||||
|
||||
* ChangeLog, lib/flite_hts_engine.c: update
|
||||
|
||||
2010-12-18 16:30 uratec
|
||||
|
||||
* ChangeLog, README: add spaces in readme.
|
||||
|
||||
2010-12-13 23:22 uratec
|
||||
|
||||
* ChangeLog, README: Update README.
|
||||
|
||||
2010-12-12 21:51 uratec
|
||||
|
||||
* AUTHORS, COPYING, ChangeLog, README, bin/flite_hts_engine.c,
|
||||
flite/include/flite.h, flite/lang/cmu_us_kal/cmu_us_kal.c,
|
||||
flite/lang/usenglish/us_ffeatures.c,
|
||||
flite/lang/usenglish/usenglish.c,
|
||||
flite/lang/usenglish/usenglish.h,
|
||||
flite/src/lexicon/cst_lexicon.c, flite/src/lexicon/cst_lts.c,
|
||||
flite/src/regex/cst_regex.c, flite/src/stats/cst_cart.c,
|
||||
flite/src/synth/cst_ffeatures.c, flite/src/synth/cst_phoneset.c,
|
||||
flite/src/synth/cst_synth.c, flite/src/synth/cst_utt_utils.c,
|
||||
flite/src/synth/flite.c, flite/src/utils/cst_features.c,
|
||||
flite/src/utils/cst_file_stdio.c,
|
||||
flite/src/utils/cst_tokenstream.c, flite/src/utils/cst_val.c,
|
||||
flite/src/utils/cst_val_user.c, include/flite_hts_engine.h,
|
||||
lib/flite_hts_engine.c: Update all documents.
|
||||
|
||||
2010-12-12 17:41 uratec
|
||||
|
||||
* AUTHORS, COPYING, ChangeLog, README: update
|
||||
|
||||
2010-12-12 17:13 uratec
|
||||
|
||||
* COPYING, ChangeLog: Update year from 2009 to 2010 in COPYRIGHT.
|
||||
|
||||
2010-12-09 21:13 uratec
|
||||
|
||||
* ChangeLog, NEWS, bin/flite_hts_engine.c,
|
||||
include/flite_hts_engine.h, lib/flite_hts_engine.c: Add low-pass
|
||||
filter stream.
|
||||
|
||||
2010-11-02 12:32 uratec
|
||||
|
||||
* .cvsignore, ChangeLog, config/.cvsignore, lib/.cvsignore: update
|
||||
cvsignore list.
|
||||
|
||||
2010-11-02 11:24 uratec
|
||||
|
||||
* ChangeLog, NEWS, README, configure.ac, bin/flite_hts_engine.c,
|
||||
flite/COPYING, flite/include/cst_alloc.h,
|
||||
flite/include/cst_audio.h, flite/include/cst_error.h,
|
||||
flite/include/cst_ffeatures.h, flite/include/cst_file.h,
|
||||
flite/include/cst_lexicon.h, flite/include/cst_lts.h,
|
||||
flite/include/cst_math.h, flite/include/cst_regex.h,
|
||||
flite/include/cst_string.h, flite/include/cst_sts.h,
|
||||
flite/include/cst_synth.h, flite/include/cst_tokenstream.h,
|
||||
flite/include/cst_track.h, flite/include/cst_utt_utils.h,
|
||||
flite/include/cst_val.h, flite/include/cst_val_defs.h,
|
||||
flite/include/cst_voice.h, flite/include/cst_wave.h,
|
||||
flite/include/flite.h, flite/include/flite_version.h,
|
||||
flite/lang/cmu_us_kal/cmu_us_kal.c, flite/lang/cmulex/cmu_lex.c,
|
||||
flite/lang/cmulex/cmu_lex.h,
|
||||
flite/lang/cmulex/cmu_lex_data_raw.c,
|
||||
flite/lang/cmulex/cmu_lex_entries.c,
|
||||
flite/lang/cmulex/cmu_lex_entries_huff_table.c,
|
||||
flite/lang/cmulex/cmu_lex_num_bytes.c,
|
||||
flite/lang/cmulex/cmu_lex_phones_huff_table.c,
|
||||
flite/lang/cmulex/cmu_lts_model.c,
|
||||
flite/lang/cmulex/cmu_lts_model.h,
|
||||
flite/lang/cmulex/cmu_lts_rules.c,
|
||||
flite/lang/cmulex/cmu_postlex.c, flite/lang/cmulex/cmulex.h,
|
||||
flite/lang/usenglish/us_aswd.c, flite/lang/usenglish/us_expand.c,
|
||||
flite/lang/usenglish/us_ffeatures.c,
|
||||
flite/lang/usenglish/us_pos_cart.c,
|
||||
flite/lang/usenglish/us_pos_cart.h,
|
||||
flite/lang/usenglish/us_postlex.c,
|
||||
flite/lang/usenglish/us_regexes.h,
|
||||
flite/lang/usenglish/us_text.c, flite/lang/usenglish/us_text.h,
|
||||
flite/lang/usenglish/usenglish.c,
|
||||
flite/lang/usenglish/usenglish.h, flite/src/hrg/cst_ffeature.c,
|
||||
flite/src/hrg/cst_item.c, flite/src/lexicon/cst_lexicon.c,
|
||||
flite/src/lexicon/cst_lts.c, flite/src/regex/cst_regex.c,
|
||||
flite/src/regex/cst_regex_defs.h, flite/src/regex/regexp.c,
|
||||
flite/src/stats/cst_cart.c, flite/src/synth/cst_ffeatures.c,
|
||||
flite/src/synth/cst_phoneset.c, flite/src/synth/cst_synth.c,
|
||||
flite/src/synth/cst_utt_utils.c, flite/src/synth/cst_voice.c,
|
||||
flite/src/synth/flite.c, flite/src/utils/cst_error.c,
|
||||
flite/src/utils/cst_features.c, flite/src/utils/cst_file_stdio.c,
|
||||
flite/src/utils/cst_string.c, flite/src/utils/cst_tokenstream.c,
|
||||
flite/src/utils/cst_val.c, flite/src/utils/cst_val_const.c,
|
||||
flite/src/utils/cst_val_user.c, include/flite_hts_engine.h,
|
||||
lib/Makefile.am, lib/flite_hts_engine.c: Based on flite-1.4.
|
||||
|
||||
2009-12-17 00:23 uratec
|
||||
|
||||
* ChangeLog, NEWS, README, configure.ac, bin/flite_hts_engine.c:
|
||||
update all documents to 1.00. fix a typo in help message.
|
||||
|
||||
2009-12-02 01:37 uratec
|
||||
|
||||
* ChangeLog, bin/flite_hts_engine.c: Fix a typo.
|
||||
|
||||
2009-12-02 01:29 uratec
|
||||
|
||||
* ChangeLog, bin/flite_hts_engine.c, include/flite_hts_engine.h,
|
||||
lib/flite_hts_engine.c: Add function of context-dependent GV
|
||||
without silent and pause phoneme.
|
||||
|
||||
2009-12-01 22:45 uratec
|
||||
|
||||
* ACKNOWLEDGEMENTS, AUTHORS, COPYING, ChangeLog, INSTALL,
|
||||
Makefile.am, NEWS, README, configure.ac, bin/Makefile.mak,
|
||||
bin/flite_hts_engine.c, flite/COPYING, flite/include/cst_file.h,
|
||||
flite/include/flite.h, flite/lang/cmu_us_kal/cmu_us_kal.c,
|
||||
flite/lang/usenglish/us_ffeatures.c,
|
||||
flite/lang/usenglish/usenglish.c,
|
||||
flite/lang/usenglish/usenglish.h,
|
||||
flite/src/lexicon/cst_lexicon.c, flite/src/lexicon/cst_lts.c,
|
||||
flite/src/regex/cst_regex.c, flite/src/regex/regexp.c,
|
||||
flite/src/stats/cst_cart.c, flite/src/synth/cst_phoneset.c,
|
||||
flite/src/synth/cst_synth.c, flite/src/synth/cst_utt_utils.c,
|
||||
flite/src/synth/flite.c, flite/src/utils/cst_features.c,
|
||||
flite/src/utils/cst_file_stdio.c,
|
||||
flite/src/utils/cst_tokenstream.c, flite/src/utils/cst_val.c,
|
||||
flite/src/utils/cst_val_user.c, include/flite_hts_engine.h,
|
||||
lib/Makefile.mak, lib/flite_hts_engine.c: Update all
|
||||
documentations and copyrights. Add coopyrights to source files.
|
||||
|
||||
2009-02-26 20:20 uratec
|
||||
|
||||
* Makefile.mak: Remove description of version from Makefile.mak.
|
||||
|
||||
2009-02-04 19:58 uratec
|
||||
|
||||
* configure.ac: Fix a small bug.
|
||||
|
||||
2009-02-04 19:41 uratec
|
||||
|
||||
* Makefile.am, bin/flite_hts_engine.c, include/flite_hts_engine.h,
|
||||
lib/Makefile.am, lib/flite_hts_engine.c: Remove cst_*.h from
|
||||
install dir.
|
||||
|
||||
2009-02-03 18:23 uratec
|
||||
|
||||
* Makefile.am, configure.ac, bin/Makefile.am,
|
||||
bin/flite_hts_engine.c, flite/include/cst_file.h,
|
||||
include/flite_hts_engine.h, lib/Makefile.am,
|
||||
lib/flite_hts_engine.c: Add feature function for making label.
|
||||
Remove '--enable-audio-win32' and '--enable-audio-wince' options.
|
||||
Add compiler checker (WIN32/WINCE/CYGWIN/MIGW) for using audio
|
||||
device in win32/wince.
|
||||
|
||||
2009-02-03 18:22 uratec
|
||||
|
||||
* Makefile.mak, bin/Makefile.mak, lib/Makefile.mak: ***
|
||||
キーワード置換変更 ***
|
||||
|
||||
2009-02-03 18:21 uratec
|
||||
|
||||
* Makefile.mak, bin/Makefile.mak, lib/Makefile.mak: Add
|
||||
Makefile.mak for 'nmake' in Visual C++.
|
||||
|
||||
2008-11-21 20:03 uratec
|
||||
|
||||
* flite/lang/usenglish/us_ffeatures.c, include/flite_hts_engine.h,
|
||||
lib/flite_hts_engine.c: Add functions for flite's features used
|
||||
in hts_engine. (Codes are wrote by Tomoki Toda.)
|
||||
|
||||
2008-10-06 13:27 uratec
|
||||
|
||||
* ChangeLog: reduce waste.
|
||||
|
||||
2008-10-06 13:18 uratec
|
||||
|
||||
* configure.ac, bin/flite_hts_engine.c,
|
||||
flite/lang/cmu_us_kal/cmu_us_kal.c,
|
||||
flite/src/lexicon/cst_lexicon.c, flite/src/lexicon/cst_lts.c,
|
||||
flite/src/regex/cst_regex.c, flite/src/regex/regexp.c,
|
||||
flite/src/regex/regsub.c, flite/src/speech/cst_lpcres.c,
|
||||
flite/src/speech/cst_track.c, flite/src/speech/rateconv.c,
|
||||
flite/src/stats/cst_cart.c, flite/src/stats/cst_ss.c,
|
||||
flite/src/stats/cst_viterbi.c, flite/src/synth/cst_phoneset.c,
|
||||
flite/src/synth/cst_synth.c, flite/src/synth/flite.c,
|
||||
flite/src/utils/cst_args.c, flite/src/utils/cst_endian.c,
|
||||
flite/src/utils/cst_socket.c, flite/src/utils/cst_tokenstream.c,
|
||||
flite/src/utils/cst_val_user.c, lib/Makefile.am: reduce waste.
|
||||
|
||||
2008-09-26 16:52 uratec
|
||||
|
||||
* flite/src/lexicon/cst_lts_rewrites.c,
|
||||
flite/src/utils/cst_mmap_none.c,
|
||||
flite/src/utils/cst_tokenstream.c, include/flite_hts_engine.h,
|
||||
lib/Makefile.am, lib/flite_hts_engine.c, ChangeLog: reduce waste.
|
||||
|
||||
2008-09-26 16:49 uratec
|
||||
|
||||
* ChangeLog: bug fix.
|
||||
|
||||
2008-09-26 16:32 uratec
|
||||
|
||||
* bin/flite_hts_engine.c: bug fix.
|
||||
|
||||
2008-08-29 14:28 uratec
|
||||
|
||||
* .cvsignore, ChangeLog: Fix suggested by Pieter Scholtz: replace
|
||||
`pos_in_syl' by `R:SylStructure.pos_in_syl'.
|
||||
|
||||
2008-08-29 14:19 uratec
|
||||
|
||||
* lib/flite_hts_engine.c: Fix suggested by Pieter Scholtz: replace
|
||||
`pos_in_syl' by `R:SylStructure.pos_in_syl'.
|
||||
|
||||
2008-07-30 16:45 uratec
|
||||
|
||||
* INSTALL, Makefile.am, flite/lang/cmu_us_kal/voxdefs.h,
|
||||
lib/Makefile.am, include/flite_hts_engine.h: bug fix.
|
||||
|
||||
2008-07-25 14:38 uratec
|
||||
|
||||
* flite/src/wavesynth/.cvsignore: [no log message]
|
||||
|
||||
2008-07-25 14:27 uratec
|
||||
|
||||
* flite/src/utils/cst_file_palmos.c,
|
||||
flite/src/utils/cst_file_wince.c,
|
||||
flite/src/utils/cst_mmap_posix.c,
|
||||
flite/src/utils/cst_mmap_win32.c, flite/src/utils/cst_val_user.c,
|
||||
flite/src/wavesynth/cst_reflpc.c, bin/flite_hts_engine.c,
|
||||
flite/include/cst_clunits.h, flite/include/cst_diphone.h,
|
||||
flite/lang/cmu_us_kal/cmu_us_kal.c,
|
||||
flite/lang/usenglish/us_dur_stats.c,
|
||||
flite/lang/usenglish/us_durz_cart.c,
|
||||
flite/lang/usenglish/us_durz_cart.h,
|
||||
flite/lang/usenglish/us_f0.h, flite/lang/usenglish/us_f0_model.c,
|
||||
flite/lang/usenglish/us_f0lr.c, flite/lang/usenglish/usenglish.c,
|
||||
flite/lang/usenglish/usenglish.h,
|
||||
flite/src/speech/cst_track_io.c, flite/src/speech/cst_wave.c,
|
||||
flite/src/speech/cst_wave_io.c,
|
||||
flite/src/speech/cst_wave_utils.c, flite/src/synth/cst_synth.c,
|
||||
flite/src/synth/cst_utt_utils.c,
|
||||
flite/src/wavesynth/cst_clunits.c,
|
||||
flite/src/wavesynth/cst_diphone.c,
|
||||
flite/src/wavesynth/cst_sigpr.c,
|
||||
flite/src/wavesynth/cst_sigprFP.c, flite/src/wavesynth/cst_sts.c,
|
||||
lib/Makefile.am, lib/flite_hts_engine.c, Makefile.am,
|
||||
flite/src/hrg/cst_rel_io.c: remove lang/usenglish/us_dur_stats.c
|
||||
lang/usenglish/us_durz_cart.c lang/usenglish/us_f0_models.c
|
||||
lang/usenglish/us_f0.h lang/usenglish/us_f0lr.c
|
||||
src/hrg/cst_rel_io.c src/speech/cst_wave_utils.c
|
||||
src/speech/cst_track_io.c src/speech/cst_wave_io.c
|
||||
src/speech/cst_wave_utils.c src/speech/cst_wave.c
|
||||
src/utils/cst_file_palmos.c src/utils/cst_file_wince.c
|
||||
src/utils/cst_mmap_posix.c src/utils/cst_mmap_win32.c
|
||||
src/wavesynth/cst_clunits.c src/wavesynth/cst_diphone.c
|
||||
src/wavesynth/cst_reflpc.c src/wavesynth/cst_sigpr.c
|
||||
src/wavesynth/cst_sigprFP.c src/wavesynth/cst_sts.c
|
||||
include/cst_clunits.h include/cst_diphone.h
|
||||
|
||||
2008-07-24 13:56 uratec
|
||||
|
||||
* ACKNOWLEDGEMENTS, AUTHORS, COPYING, INSTALL, Makefile.am, NEWS,
|
||||
README, bin/Makefile.am, lib/Makefile.am: *** キーワード置換変更
|
||||
***
|
||||
|
||||
2008-07-24 13:55 uratec
|
||||
|
||||
* flite/src/utils/cst_args.c, flite/src/utils/cst_file_palmos.c,
|
||||
flite/src/utils/cst_file_stdio.c,
|
||||
flite/src/utils/cst_file_wince.c,
|
||||
flite/src/utils/cst_mmap_none.c,
|
||||
flite/src/utils/cst_mmap_win32.c, flite/src/utils/cst_socket.c,
|
||||
flite/src/utils/cst_string.c, flite/src/utils/cst_val.c,
|
||||
flite/src/utils/cst_val_const.c, flite/src/utils/cst_val_user.c,
|
||||
flite/include/cst_audio.h, flite/include/cst_cart.h,
|
||||
flite/include/cst_diphone.h, flite/include/cst_endian.h,
|
||||
flite/include/cst_file.h, flite/include/cst_hrg.h,
|
||||
flite/include/cst_item.h, flite/include/cst_socket.h,
|
||||
flite/include/cst_ss.h, flite/include/cst_utterance.h,
|
||||
flite/include/cst_val_const.h, flite/include/cst_wave.h,
|
||||
flite/include/flite.h, flite/src/utils/cst_alloc.c,
|
||||
flite/src/utils/cst_endian.c, flite/src/utils/cst_error.c,
|
||||
flite/src/utils/cst_features.c, flite/src/utils/cst_mmap_posix.c,
|
||||
flite/src/utils/cst_tokenstream.c, flite/include/cst_alloc.h,
|
||||
flite/include/cst_args.h, flite/include/cst_clunits.h,
|
||||
flite/include/cst_error.h, flite/include/cst_features.h,
|
||||
flite/include/cst_lexicon.h, flite/include/cst_lts_rewrites.h,
|
||||
flite/include/cst_math.h, flite/include/cst_phoneset.h,
|
||||
flite/include/cst_regex.h, flite/include/cst_relation.h,
|
||||
flite/include/cst_sigpr.h, flite/include/cst_string.h,
|
||||
flite/include/cst_synth.h, flite/include/cst_tokenstream.h,
|
||||
flite/include/cst_track.h, flite/include/cst_utt_utils.h,
|
||||
flite/include/cst_val.h, flite/include/cst_val_defs.h,
|
||||
flite/include/cst_voice.h, flite/include/flite_version.h,
|
||||
flite/include/cst_lts.h, flite/include/cst_sts.h,
|
||||
flite/include/cst_viterbi.h, flite/lang/cmulex/cmu_lex.c,
|
||||
flite/lang/cmulex/cmu_lex_data.c,
|
||||
flite/lang/cmulex/cmu_lex_data_raw.c,
|
||||
flite/lang/cmulex/cmu_lex_entries.c,
|
||||
flite/lang/cmulex/cmu_lex_entries_huff_table.c,
|
||||
flite/lang/cmulex/cmu_lex_num_bytes.c,
|
||||
flite/lang/cmulex/cmu_lex_phones_huff_table.c,
|
||||
flite/lang/cmulex/cmu_lts_model.c,
|
||||
flite/lang/cmulex/cmu_lts_model.h,
|
||||
flite/lang/cmulex/cmu_lts_rules.c, flite/lang/cmulex/cmulex.h,
|
||||
flite/lang/usenglish/us_dur_stats.c,
|
||||
flite/lang/usenglish/us_expand.c, flite/lang/usenglish/us_f0.h,
|
||||
flite/lang/usenglish/us_f0_model.c,
|
||||
flite/lang/usenglish/us_f0lr.c,
|
||||
flite/lang/usenglish/us_int_tone_cart.c,
|
||||
flite/lang/usenglish/us_int_tone_cart.h,
|
||||
flite/lang/usenglish/us_phoneset.c,
|
||||
flite/lang/usenglish/us_text.c, flite/lang/usenglish/us_text.h,
|
||||
flite/lang/usenglish/us_aswd.c,
|
||||
flite/lang/usenglish/us_durz_cart.c,
|
||||
flite/lang/usenglish/us_durz_cart.h,
|
||||
flite/lang/usenglish/us_ffeatures.c,
|
||||
flite/lang/usenglish/us_ffeatures.h,
|
||||
flite/lang/usenglish/us_gpos.c,
|
||||
flite/lang/usenglish/us_int_accent_cart.c,
|
||||
flite/lang/usenglish/us_int_accent_cart.h,
|
||||
flite/lang/usenglish/us_nums_cart.c,
|
||||
flite/lang/usenglish/us_nums_cart.h,
|
||||
flite/lang/usenglish/us_phrasing_cart.c,
|
||||
flite/lang/usenglish/us_phrasing_cart.h,
|
||||
flite/lang/usenglish/us_postlex.c,
|
||||
flite/lang/usenglish/usenglish.c,
|
||||
flite/lang/usenglish/usenglish.h, flite/src/speech/cst_lpcres.c,
|
||||
flite/src/speech/cst_track.c, flite/src/speech/cst_track_io.c,
|
||||
flite/src/speech/cst_wave_io.c, config/.cvsignore,
|
||||
flite/lang/cmu_us_kal/cmu_us_kal.c,
|
||||
flite/lang/cmu_us_kal/voxdefs.h, flite/src/regex/cst_regex.c,
|
||||
flite/src/regex/regexp.c, flite/src/regex/regsub.c,
|
||||
flite/src/speech/cst_wave.c, flite/src/speech/cst_wave_utils.c,
|
||||
flite/src/speech/rateconv.c, flite/src/stats/cst_viterbi.c,
|
||||
flite/src/wavesynth/cst_clunits.c,
|
||||
flite/src/wavesynth/cst_diphone.c,
|
||||
flite/src/wavesynth/cst_reflpc.c,
|
||||
flite/src/wavesynth/cst_sigpr.c,
|
||||
flite/src/wavesynth/cst_sigprFP.c, flite/src/wavesynth/cst_sts.c,
|
||||
.cvsignore, ACKNOWLEDGEMENTS, AUTHORS, COPYING, INSTALL,
|
||||
Makefile.am, NEWS, README, configure.ac,
|
||||
flite/src/stats/cst_cart.c, flite/src/stats/cst_ss.c,
|
||||
flite/src/synth/cst_phoneset.c, flite/src/synth/cst_synth.c,
|
||||
flite/src/synth/cst_utt_utils.c, flite/src/synth/cst_voice.c,
|
||||
flite/src/synth/flite.c, flite/src/hrg/cst_ffeature.c,
|
||||
flite/src/hrg/cst_item.c, flite/src/hrg/cst_rel_io.c,
|
||||
flite/src/hrg/cst_relation.c, flite/src/hrg/cst_utterance.c,
|
||||
flite/src/lexicon/cst_lexicon.c, flite/src/lexicon/cst_lts.c,
|
||||
flite/src/lexicon/cst_lts_rewrites.c, lib/.cvsignore,
|
||||
lib/Makefile.am, lib/flite_hts_engine.c, bin/.cvsignore,
|
||||
bin/Makefile.am, bin/flite_hts_engine.c,
|
||||
include/flite_hts_engine.h: initialize flite+hts_engine
|
||||
|
22
3rdparty/flite_hts_engine/INSTALL
vendored
Normal file
22
3rdparty/flite_hts_engine/INSTALL
vendored
Normal file
|
@ -0,0 +1,22 @@
|
|||
Installation Instructions
|
||||
*************************
|
||||
|
||||
1. After unpacking the tar.gz file, cd to the flite+hts_engine directory.
|
||||
|
||||
2. Run configure script with appropriate options.
|
||||
|
||||
% ./configure \
|
||||
--with-hts-engine-header-path=/usr/local/hts_engine_API/include \
|
||||
--with-hts-engine-library-path=/usr/local/hts_engine_API/lib
|
||||
|
||||
For detail, please see.
|
||||
|
||||
% ./configure --help
|
||||
|
||||
3. Run make.
|
||||
|
||||
% make
|
||||
|
||||
4. Install library and binary.
|
||||
|
||||
% make install
|
17
3rdparty/flite_hts_engine/Makefile.am
vendored
Normal file
17
3rdparty/flite_hts_engine/Makefile.am
vendored
Normal file
|
@ -0,0 +1,17 @@
|
|||
|
||||
EXTRA_DIST = AUTHORS COPYING ChangeLog INSTALL NEWS README Makefile.mak \
|
||||
flite/COPYING \
|
||||
flite/lang/cmulex/cmu_lex_data_raw.c \
|
||||
flite/lang/cmulex/cmu_lex_num_bytes.c \
|
||||
flite/lang/cmulex/cmu_lex_phones_huff_table.c \
|
||||
flite/lang/cmulex/cmu_lex_entries_huff_table.c
|
||||
|
||||
SUBDIRS = lib bin
|
||||
|
||||
include_HEADERS = $(top_srcdir)/include/flite_hts_engine.h
|
||||
|
||||
DISTCLEANFILES = *.log *.out *~ config/*~ include/*~ flite/*~ flite/*/*~ flite/*/*/*~
|
||||
|
||||
MAINTAINERCLEANFILES = aclocal.m4 configure Makefile.in config/compile \
|
||||
config/config.guess config/config.sub config/depcomp \
|
||||
config/install-sh config/missing
|
640
3rdparty/flite_hts_engine/Makefile.in
vendored
Normal file
640
3rdparty/flite_hts_engine/Makefile.in
vendored
Normal file
|
@ -0,0 +1,640 @@
|
|||
# Makefile.in generated by automake 1.10.2 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
||||
# 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
@SET_MAKE@
|
||||
|
||||
VPATH = @srcdir@
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||
install_sh_DATA = $(install_sh) -c -m 644
|
||||
install_sh_PROGRAM = $(install_sh) -c
|
||||
install_sh_SCRIPT = $(install_sh) -c
|
||||
INSTALL_HEADER = $(INSTALL_DATA)
|
||||
transform = $(program_transform_name)
|
||||
NORMAL_INSTALL = :
|
||||
PRE_INSTALL = :
|
||||
POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
build_triplet = @build@
|
||||
host_triplet = @host@
|
||||
subdir = .
|
||||
DIST_COMMON = README $(am__configure_deps) $(include_HEADERS) \
|
||||
$(srcdir)/Makefile.am $(srcdir)/Makefile.in \
|
||||
$(top_srcdir)/configure AUTHORS COPYING ChangeLog INSTALL NEWS \
|
||||
config/compile config/config.guess config/config.sub \
|
||||
config/depcomp config/install-sh config/missing
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/configure.ac
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
|
||||
configure.lineno config.status.lineno
|
||||
mkinstalldirs = $(install_sh) -d
|
||||
CONFIG_CLEAN_FILES =
|
||||
SOURCES =
|
||||
DIST_SOURCES =
|
||||
RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
|
||||
html-recursive info-recursive install-data-recursive \
|
||||
install-dvi-recursive install-exec-recursive \
|
||||
install-html-recursive install-info-recursive \
|
||||
install-pdf-recursive install-ps-recursive install-recursive \
|
||||
installcheck-recursive installdirs-recursive pdf-recursive \
|
||||
ps-recursive uninstall-recursive
|
||||
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
|
||||
am__vpath_adj = case $$p in \
|
||||
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
|
||||
*) f=$$p;; \
|
||||
esac;
|
||||
am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
|
||||
am__installdirs = "$(DESTDIR)$(includedir)"
|
||||
includeHEADERS_INSTALL = $(INSTALL_HEADER)
|
||||
HEADERS = $(include_HEADERS)
|
||||
RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
|
||||
distclean-recursive maintainer-clean-recursive
|
||||
ETAGS = etags
|
||||
CTAGS = ctags
|
||||
DIST_SUBDIRS = $(SUBDIRS)
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
distdir = $(PACKAGE)-$(VERSION)
|
||||
top_distdir = $(distdir)
|
||||
am__remove_distdir = \
|
||||
{ test ! -d $(distdir) \
|
||||
|| { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \
|
||||
&& rm -fr $(distdir); }; }
|
||||
DIST_ARCHIVES = $(distdir).tar.gz
|
||||
GZIP_ENV = --best
|
||||
distuninstallcheck_listfiles = find . -type f -print
|
||||
distcleancheck_listfiles = find . -type f -print
|
||||
ACLOCAL = @ACLOCAL@
|
||||
AMTAR = @AMTAR@
|
||||
AR = @AR@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AWK = @AWK@
|
||||
CC = @CC@
|
||||
CCDEPMODE = @CCDEPMODE@
|
||||
CFLAGS = @CFLAGS@
|
||||
CPP = @CPP@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
CYGPATH_W = @CYGPATH_W@
|
||||
DEFS = @DEFS@
|
||||
DEPDIR = @DEPDIR@
|
||||
ECHO_C = @ECHO_C@
|
||||
ECHO_N = @ECHO_N@
|
||||
ECHO_T = @ECHO_T@
|
||||
EGREP = @EGREP@
|
||||
EXEEXT = @EXEEXT@
|
||||
GREP = @GREP@
|
||||
HTS_ENGINE_HEADER = @HTS_ENGINE_HEADER@
|
||||
HTS_ENGINE_HEADER_DIR = @HTS_ENGINE_HEADER_DIR@
|
||||
HTS_ENGINE_LIBRARY = @HTS_ENGINE_LIBRARY@
|
||||
HTS_ENGINE_LIBRARY_DIR = @HTS_ENGINE_LIBRARY_DIR@
|
||||
INSTALL = @INSTALL@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
LIBS = @LIBS@
|
||||
LTLIBOBJS = @LTLIBOBJS@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
MKDIR_P = @MKDIR_P@
|
||||
OBJEXT = @OBJEXT@
|
||||
PACKAGE = @PACKAGE@
|
||||
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||
PACKAGE_NAME = @PACKAGE_NAME@
|
||||
PACKAGE_STRING = @PACKAGE_STRING@
|
||||
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
RANLIB = @RANLIB@
|
||||
SET_MAKE = @SET_MAKE@
|
||||
SHELL = @SHELL@
|
||||
STRIP = @STRIP@
|
||||
VERSION = @VERSION@
|
||||
abs_builddir = @abs_builddir@
|
||||
abs_srcdir = @abs_srcdir@
|
||||
abs_top_builddir = @abs_top_builddir@
|
||||
abs_top_srcdir = @abs_top_srcdir@
|
||||
ac_ct_CC = @ac_ct_CC@
|
||||
am__include = @am__include@
|
||||
am__leading_dot = @am__leading_dot@
|
||||
am__quote = @am__quote@
|
||||
am__tar = @am__tar@
|
||||
am__untar = @am__untar@
|
||||
bindir = @bindir@
|
||||
build = @build@
|
||||
build_alias = @build_alias@
|
||||
build_cpu = @build_cpu@
|
||||
build_os = @build_os@
|
||||
build_vendor = @build_vendor@
|
||||
builddir = @builddir@
|
||||
datadir = @datadir@
|
||||
datarootdir = @datarootdir@
|
||||
docdir = @docdir@
|
||||
dvidir = @dvidir@
|
||||
exec_prefix = @exec_prefix@
|
||||
host = @host@
|
||||
host_alias = @host_alias@
|
||||
host_cpu = @host_cpu@
|
||||
host_os = @host_os@
|
||||
host_vendor = @host_vendor@
|
||||
htmldir = @htmldir@
|
||||
includedir = @includedir@
|
||||
infodir = @infodir@
|
||||
install_sh = @install_sh@
|
||||
libdir = @libdir@
|
||||
libexecdir = @libexecdir@
|
||||
localedir = @localedir@
|
||||
localstatedir = @localstatedir@
|
||||
mandir = @mandir@
|
||||
mkdir_p = @mkdir_p@
|
||||
oldincludedir = @oldincludedir@
|
||||
pdfdir = @pdfdir@
|
||||
prefix = @prefix@
|
||||
program_transform_name = @program_transform_name@
|
||||
psdir = @psdir@
|
||||
sbindir = @sbindir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
srcdir = @srcdir@
|
||||
sysconfdir = @sysconfdir@
|
||||
target_alias = @target_alias@
|
||||
top_build_prefix = @top_build_prefix@
|
||||
top_builddir = @top_builddir@
|
||||
top_srcdir = @top_srcdir@
|
||||
EXTRA_DIST = AUTHORS COPYING ChangeLog INSTALL NEWS README Makefile.mak \
|
||||
flite/COPYING \
|
||||
flite/lang/cmulex/cmu_lex_data_raw.c \
|
||||
flite/lang/cmulex/cmu_lex_num_bytes.c \
|
||||
flite/lang/cmulex/cmu_lex_phones_huff_table.c \
|
||||
flite/lang/cmulex/cmu_lex_entries_huff_table.c
|
||||
|
||||
SUBDIRS = lib bin
|
||||
include_HEADERS = $(top_srcdir)/include/flite_hts_engine.h
|
||||
DISTCLEANFILES = *.log *.out *~ config/*~ include/*~ flite/*~ flite/*/*~ flite/*/*/*~
|
||||
MAINTAINERCLEANFILES = aclocal.m4 configure Makefile.in config/compile \
|
||||
config/config.guess config/config.sub config/depcomp \
|
||||
config/install-sh config/missing
|
||||
|
||||
all: all-recursive
|
||||
|
||||
.SUFFIXES:
|
||||
am--refresh:
|
||||
@:
|
||||
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
|
||||
@for dep in $?; do \
|
||||
case '$(am__configure_deps)' in \
|
||||
*$$dep*) \
|
||||
echo ' cd $(srcdir) && $(AUTOMAKE) --gnu '; \
|
||||
cd $(srcdir) && $(AUTOMAKE) --gnu \
|
||||
&& exit 0; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
done; \
|
||||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \
|
||||
cd $(top_srcdir) && \
|
||||
$(AUTOMAKE) --gnu Makefile
|
||||
.PRECIOUS: Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
@case '$?' in \
|
||||
*config.status*) \
|
||||
echo ' $(SHELL) ./config.status'; \
|
||||
$(SHELL) ./config.status;; \
|
||||
*) \
|
||||
echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \
|
||||
esac;
|
||||
|
||||
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||
$(SHELL) ./config.status --recheck
|
||||
|
||||
$(top_srcdir)/configure: $(am__configure_deps)
|
||||
cd $(srcdir) && $(AUTOCONF)
|
||||
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
|
||||
cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
|
||||
install-includeHEADERS: $(include_HEADERS)
|
||||
@$(NORMAL_INSTALL)
|
||||
test -z "$(includedir)" || $(MKDIR_P) "$(DESTDIR)$(includedir)"
|
||||
@list='$(include_HEADERS)'; for p in $$list; do \
|
||||
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
|
||||
f=$(am__strip_dir) \
|
||||
echo " $(includeHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(includedir)/$$f'"; \
|
||||
$(includeHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(includedir)/$$f"; \
|
||||
done
|
||||
|
||||
uninstall-includeHEADERS:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
@list='$(include_HEADERS)'; for p in $$list; do \
|
||||
f=$(am__strip_dir) \
|
||||
echo " rm -f '$(DESTDIR)$(includedir)/$$f'"; \
|
||||
rm -f "$(DESTDIR)$(includedir)/$$f"; \
|
||||
done
|
||||
|
||||
# This directory's subdirectories are mostly independent; you can cd
|
||||
# into them and run `make' without going through this Makefile.
|
||||
# To change the values of `make' variables: instead of editing Makefiles,
|
||||
# (1) if the variable is set in `config.status', edit `config.status'
|
||||
# (which will cause the Makefiles to be regenerated when you run `make');
|
||||
# (2) otherwise, pass the desired values on the `make' command line.
|
||||
$(RECURSIVE_TARGETS):
|
||||
@failcom='exit 1'; \
|
||||
for f in x $$MAKEFLAGS; do \
|
||||
case $$f in \
|
||||
*=* | --[!k]*);; \
|
||||
*k*) failcom='fail=yes';; \
|
||||
esac; \
|
||||
done; \
|
||||
dot_seen=no; \
|
||||
target=`echo $@ | sed s/-recursive//`; \
|
||||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
echo "Making $$target in $$subdir"; \
|
||||
if test "$$subdir" = "."; then \
|
||||
dot_seen=yes; \
|
||||
local_target="$$target-am"; \
|
||||
else \
|
||||
local_target="$$target"; \
|
||||
fi; \
|
||||
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|
||||
|| eval $$failcom; \
|
||||
done; \
|
||||
if test "$$dot_seen" = "no"; then \
|
||||
$(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
|
||||
fi; test -z "$$fail"
|
||||
|
||||
$(RECURSIVE_CLEAN_TARGETS):
|
||||
@failcom='exit 1'; \
|
||||
for f in x $$MAKEFLAGS; do \
|
||||
case $$f in \
|
||||
*=* | --[!k]*);; \
|
||||
*k*) failcom='fail=yes';; \
|
||||
esac; \
|
||||
done; \
|
||||
dot_seen=no; \
|
||||
case "$@" in \
|
||||
distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
|
||||
*) list='$(SUBDIRS)' ;; \
|
||||
esac; \
|
||||
rev=''; for subdir in $$list; do \
|
||||
if test "$$subdir" = "."; then :; else \
|
||||
rev="$$subdir $$rev"; \
|
||||
fi; \
|
||||
done; \
|
||||
rev="$$rev ."; \
|
||||
target=`echo $@ | sed s/-recursive//`; \
|
||||
for subdir in $$rev; do \
|
||||
echo "Making $$target in $$subdir"; \
|
||||
if test "$$subdir" = "."; then \
|
||||
local_target="$$target-am"; \
|
||||
else \
|
||||
local_target="$$target"; \
|
||||
fi; \
|
||||
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|
||||
|| eval $$failcom; \
|
||||
done && test -z "$$fail"
|
||||
tags-recursive:
|
||||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
|
||||
done
|
||||
ctags-recursive:
|
||||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
|
||||
done
|
||||
|
||||
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
|
||||
END { if (nonempty) { for (i in files) print i; }; }'`; \
|
||||
mkid -fID $$unique
|
||||
tags: TAGS
|
||||
|
||||
TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
tags=; \
|
||||
here=`pwd`; \
|
||||
if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
|
||||
include_option=--etags-include; \
|
||||
empty_fix=.; \
|
||||
else \
|
||||
include_option=--include; \
|
||||
empty_fix=; \
|
||||
fi; \
|
||||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
if test "$$subdir" = .; then :; else \
|
||||
test ! -f $$subdir/TAGS || \
|
||||
tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \
|
||||
fi; \
|
||||
done; \
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
|
||||
END { if (nonempty) { for (i in files) print i; }; }'`; \
|
||||
if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
|
||||
test -n "$$unique" || unique=$$empty_fix; \
|
||||
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||
$$tags $$unique; \
|
||||
fi
|
||||
ctags: CTAGS
|
||||
CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
tags=; \
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
|
||||
END { if (nonempty) { for (i in files) print i; }; }'`; \
|
||||
test -z "$(CTAGS_ARGS)$$tags$$unique" \
|
||||
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
|
||||
$$tags $$unique
|
||||
|
||||
GTAGS:
|
||||
here=`$(am__cd) $(top_builddir) && pwd` \
|
||||
&& cd $(top_srcdir) \
|
||||
&& gtags -i $(GTAGS_ARGS) $$here
|
||||
|
||||
distclean-tags:
|
||||
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
$(am__remove_distdir)
|
||||
test -d $(distdir) || mkdir $(distdir)
|
||||
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||
list='$(DISTFILES)'; \
|
||||
dist_files=`for file in $$list; do echo $$file; done | \
|
||||
sed -e "s|^$$srcdirstrip/||;t" \
|
||||
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
|
||||
case $$dist_files in \
|
||||
*/*) $(MKDIR_P) `echo "$$dist_files" | \
|
||||
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
|
||||
sort -u` ;; \
|
||||
esac; \
|
||||
for file in $$dist_files; do \
|
||||
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
||||
if test -d $$d/$$file; then \
|
||||
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
||||
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
|
||||
fi; \
|
||||
cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
|
||||
else \
|
||||
test -f $(distdir)/$$file \
|
||||
|| cp -p $$d/$$file $(distdir)/$$file \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
|
||||
if test "$$subdir" = .; then :; else \
|
||||
test -d "$(distdir)/$$subdir" \
|
||||
|| $(MKDIR_P) "$(distdir)/$$subdir" \
|
||||
|| exit 1; \
|
||||
distdir=`$(am__cd) $(distdir) && pwd`; \
|
||||
top_distdir=`$(am__cd) $(top_distdir) && pwd`; \
|
||||
(cd $$subdir && \
|
||||
$(MAKE) $(AM_MAKEFLAGS) \
|
||||
top_distdir="$$top_distdir" \
|
||||
distdir="$$distdir/$$subdir" \
|
||||
am__remove_distdir=: \
|
||||
am__skip_length_check=: \
|
||||
distdir) \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
-find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \
|
||||
! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
|
||||
! -type d ! -perm -400 -exec chmod a+r {} \; -o \
|
||||
! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \
|
||||
|| chmod -R a+r $(distdir)
|
||||
dist-gzip: distdir
|
||||
tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
|
||||
$(am__remove_distdir)
|
||||
|
||||
dist-bzip2: distdir
|
||||
tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2
|
||||
$(am__remove_distdir)
|
||||
|
||||
dist-lzma: distdir
|
||||
tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma
|
||||
$(am__remove_distdir)
|
||||
|
||||
dist-tarZ: distdir
|
||||
tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
|
||||
$(am__remove_distdir)
|
||||
|
||||
dist-shar: distdir
|
||||
shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
|
||||
$(am__remove_distdir)
|
||||
|
||||
dist-zip: distdir
|
||||
-rm -f $(distdir).zip
|
||||
zip -rq $(distdir).zip $(distdir)
|
||||
$(am__remove_distdir)
|
||||
|
||||
dist dist-all: distdir
|
||||
tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
|
||||
$(am__remove_distdir)
|
||||
|
||||
# This target untars the dist file and tries a VPATH configuration. Then
|
||||
# it guarantees that the distribution is self-contained by making another
|
||||
# tarfile.
|
||||
distcheck: dist
|
||||
case '$(DIST_ARCHIVES)' in \
|
||||
*.tar.gz*) \
|
||||
GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\
|
||||
*.tar.bz2*) \
|
||||
bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\
|
||||
*.tar.lzma*) \
|
||||
unlzma -c $(distdir).tar.lzma | $(am__untar) ;;\
|
||||
*.tar.Z*) \
|
||||
uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
|
||||
*.shar.gz*) \
|
||||
GZIP=$(GZIP_ENV) gunzip -c $(distdir).shar.gz | unshar ;;\
|
||||
*.zip*) \
|
||||
unzip $(distdir).zip ;;\
|
||||
esac
|
||||
chmod -R a-w $(distdir); chmod a+w $(distdir)
|
||||
mkdir $(distdir)/_build
|
||||
mkdir $(distdir)/_inst
|
||||
chmod a-w $(distdir)
|
||||
dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
|
||||
&& dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
|
||||
&& cd $(distdir)/_build \
|
||||
&& ../configure --srcdir=.. --prefix="$$dc_install_base" \
|
||||
$(DISTCHECK_CONFIGURE_FLAGS) \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) dvi \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) check \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) install \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) installcheck \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) uninstall \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \
|
||||
distuninstallcheck \
|
||||
&& chmod -R a-w "$$dc_install_base" \
|
||||
&& ({ \
|
||||
(cd ../.. && umask 077 && mkdir "$$dc_destdir") \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \
|
||||
distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \
|
||||
} || { rm -rf "$$dc_destdir"; exit 1; }) \
|
||||
&& rm -rf "$$dc_destdir" \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) dist \
|
||||
&& rm -rf $(DIST_ARCHIVES) \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) distcleancheck
|
||||
$(am__remove_distdir)
|
||||
@(echo "$(distdir) archives ready for distribution: "; \
|
||||
list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
|
||||
sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x'
|
||||
distuninstallcheck:
|
||||
@cd $(distuninstallcheck_dir) \
|
||||
&& test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \
|
||||
|| { echo "ERROR: files left after uninstall:" ; \
|
||||
if test -n "$(DESTDIR)"; then \
|
||||
echo " (check DESTDIR support)"; \
|
||||
fi ; \
|
||||
$(distuninstallcheck_listfiles) ; \
|
||||
exit 1; } >&2
|
||||
distcleancheck: distclean
|
||||
@if test '$(srcdir)' = . ; then \
|
||||
echo "ERROR: distcleancheck can only run from a VPATH build" ; \
|
||||
exit 1 ; \
|
||||
fi
|
||||
@test `$(distcleancheck_listfiles) | wc -l` -eq 0 \
|
||||
|| { echo "ERROR: files left in build directory after distclean:" ; \
|
||||
$(distcleancheck_listfiles) ; \
|
||||
exit 1; } >&2
|
||||
check-am: all-am
|
||||
check: check-recursive
|
||||
all-am: Makefile $(HEADERS)
|
||||
installdirs: installdirs-recursive
|
||||
installdirs-am:
|
||||
for dir in "$(DESTDIR)$(includedir)"; do \
|
||||
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
|
||||
done
|
||||
install: install-recursive
|
||||
install-exec: install-exec-recursive
|
||||
install-data: install-data-recursive
|
||||
uninstall: uninstall-recursive
|
||||
|
||||
install-am: all-am
|
||||
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||
|
||||
installcheck: installcheck-recursive
|
||||
install-strip:
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
`test -z '$(STRIP)' || \
|
||||
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
|
||||
mostlyclean-generic:
|
||||
|
||||
clean-generic:
|
||||
|
||||
distclean-generic:
|
||||
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
||||
-test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
|
||||
|
||||
maintainer-clean-generic:
|
||||
@echo "This command is intended for maintainers to use"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
-test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
|
||||
clean: clean-recursive
|
||||
|
||||
clean-am: clean-generic mostlyclean-am
|
||||
|
||||
distclean: distclean-recursive
|
||||
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
|
||||
-rm -f Makefile
|
||||
distclean-am: clean-am distclean-generic distclean-tags
|
||||
|
||||
dvi: dvi-recursive
|
||||
|
||||
dvi-am:
|
||||
|
||||
html: html-recursive
|
||||
|
||||
info: info-recursive
|
||||
|
||||
info-am:
|
||||
|
||||
install-data-am: install-includeHEADERS
|
||||
|
||||
install-dvi: install-dvi-recursive
|
||||
|
||||
install-exec-am:
|
||||
|
||||
install-html: install-html-recursive
|
||||
|
||||
install-info: install-info-recursive
|
||||
|
||||
install-man:
|
||||
|
||||
install-pdf: install-pdf-recursive
|
||||
|
||||
install-ps: install-ps-recursive
|
||||
|
||||
installcheck-am:
|
||||
|
||||
maintainer-clean: maintainer-clean-recursive
|
||||
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
|
||||
-rm -rf $(top_srcdir)/autom4te.cache
|
||||
-rm -f Makefile
|
||||
maintainer-clean-am: distclean-am maintainer-clean-generic
|
||||
|
||||
mostlyclean: mostlyclean-recursive
|
||||
|
||||
mostlyclean-am: mostlyclean-generic
|
||||
|
||||
pdf: pdf-recursive
|
||||
|
||||
pdf-am:
|
||||
|
||||
ps: ps-recursive
|
||||
|
||||
ps-am:
|
||||
|
||||
uninstall-am: uninstall-includeHEADERS
|
||||
|
||||
.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) install-am \
|
||||
install-strip
|
||||
|
||||
.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
|
||||
all all-am am--refresh check check-am clean clean-generic \
|
||||
ctags ctags-recursive dist dist-all dist-bzip2 dist-gzip \
|
||||
dist-lzma dist-shar dist-tarZ dist-zip distcheck distclean \
|
||||
distclean-generic distclean-tags distcleancheck distdir \
|
||||
distuninstallcheck dvi dvi-am html html-am info info-am \
|
||||
install install-am install-data install-data-am install-dvi \
|
||||
install-dvi-am install-exec install-exec-am install-html \
|
||||
install-html-am install-includeHEADERS install-info \
|
||||
install-info-am install-man install-pdf install-pdf-am \
|
||||
install-ps install-ps-am install-strip installcheck \
|
||||
installcheck-am installdirs installdirs-am maintainer-clean \
|
||||
maintainer-clean-generic mostlyclean mostlyclean-generic pdf \
|
||||
pdf-am ps ps-am tags tags-recursive uninstall uninstall-am \
|
||||
uninstall-includeHEADERS
|
||||
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
32
3rdparty/flite_hts_engine/Makefile.mak
vendored
Normal file
32
3rdparty/flite_hts_engine/Makefile.mak
vendored
Normal file
|
@ -0,0 +1,32 @@
|
|||
|
||||
INSTALLDIR = C:\flite_hts_engine
|
||||
|
||||
all:
|
||||
cd lib
|
||||
nmake /f Makefile.mak
|
||||
cd ..
|
||||
cd bin
|
||||
nmake /f Makefile.mak
|
||||
cd ..
|
||||
|
||||
clean:
|
||||
cd lib
|
||||
nmake /f Makefile.mak clean
|
||||
cd ..
|
||||
cd bin
|
||||
nmake /f Makefile.mak clean
|
||||
cd ..
|
||||
|
||||
install::
|
||||
@if not exist "$(INSTALLDIR)\lib" mkdir "$(INSTALLDIR)\lib"
|
||||
cd lib
|
||||
copy *.lib $(INSTALLDIR)\lib
|
||||
cd ..
|
||||
@if not exist "$(INSTALLDIR)\bin" mkdir "$(INSTALLDIR)\bin"
|
||||
cd bin
|
||||
copy *.exe $(INSTALLDIR)\bin
|
||||
cd ..
|
||||
@if not exist "$(INSTALLDIR)\include" mkdir "$(INSTALLDIR)\include"
|
||||
cd include
|
||||
copy *.h $(INSTALLDIR)\include
|
||||
cd ..
|
29
3rdparty/flite_hts_engine/NEWS
vendored
Normal file
29
3rdparty/flite_hts_engine/NEWS
vendored
Normal file
|
@ -0,0 +1,29 @@
|
|||
Version 1.05:
|
||||
* support 64-bit machine.
|
||||
* bug fixes.
|
||||
|
||||
Version 1.04:
|
||||
* support new HTS voice format.
|
||||
* add options for changing speech speed and audio buffer size.
|
||||
|
||||
Version 1.03:
|
||||
* make sources simple.
|
||||
* add functions for front-end use.
|
||||
* change source format.
|
||||
|
||||
Verison 1.02:
|
||||
* fix a serious bug.
|
||||
|
||||
Version 1.01:
|
||||
* based on flite-1.4.
|
||||
* add low-pass filter stream.
|
||||
|
||||
Version 1.00:
|
||||
* first stable-version release.
|
||||
* context-dependent GV without silent and pause phoneme.
|
||||
* makefiles for nmake of VC.
|
||||
* save detail information.
|
||||
* bug fixes.
|
||||
|
||||
Version 0.91:
|
||||
* first beta-version release.
|
119
3rdparty/flite_hts_engine/README
vendored
Normal file
119
3rdparty/flite_hts_engine/README
vendored
Normal file
|
@ -0,0 +1,119 @@
|
|||
===============================================================================
|
||||
The English TTS System "Flite+hts_engine" version 1.05
|
||||
release December 25, 2013
|
||||
|
||||
|
||||
The Flite+hts_engine is an English TTS System. It has been being developed by
|
||||
the HTS working group (see "Who we are" below) and some graduate students in
|
||||
Nagoya Institute of Technology (see "AUTHORS" in the same directory).
|
||||
|
||||
*******************************************************************************
|
||||
Copying
|
||||
*******************************************************************************
|
||||
|
||||
The Flite+hts_engine is released under the Modified BSD license (see
|
||||
http://www.opensource.org/). Using and distributing this software is free
|
||||
(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 conditions in the following license:
|
||||
|
||||
/* ----------------------------------------------------------------- */
|
||||
/* The English TTS System "Flite+hts_engine" */
|
||||
/* developed by HTS Working Group */
|
||||
/* http://hts-engine.sourceforge.net/ */
|
||||
/* ----------------------------------------------------------------- */
|
||||
/* */
|
||||
/* Copyright (c) 2005-2013 Nagoya Institute of Technology */
|
||||
/* Department of Computer Science */
|
||||
/* */
|
||||
/* 2005-2008 Tokyo Institute of Technology */
|
||||
/* Interdisciplinary Graduate School of */
|
||||
/* Science and Engineering */
|
||||
/* */
|
||||
/* All rights reserved. */
|
||||
/* */
|
||||
/* Redistribution and use in source and binary forms, with or */
|
||||
/* without modification, are permitted provided that the following */
|
||||
/* conditions are met: */
|
||||
/* */
|
||||
/* - Redistributions of source code must retain the above copyright */
|
||||
/* notice, this list of conditions and the following disclaimer. */
|
||||
/* - 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. */
|
||||
/* - Neither the name of the HTS working group 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 COPYRIGHT HOLDERS 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 COPYRIGHT OWNER 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. */
|
||||
/* ----------------------------------------------------------------- */
|
||||
|
||||
Although this software is free, we still offer no warranties and no
|
||||
maintenance. We will continue to endeavor to fix bugs and answer queries when
|
||||
can, but are not in a position to guarantee it. We will consider consultancy if
|
||||
desired, please contacts us for details.
|
||||
|
||||
If you are using the Flite+hts_engine in commercial environments, even though
|
||||
no license is required, we would be grateful if you let us know as it helps
|
||||
justify ourselves to our various sponsors. We also strongly encourage you to
|
||||
|
||||
* refer to the use of Flite+hts_engine in any publications that use this
|
||||
software
|
||||
* report bugs, where possible with bug fixes, that are found
|
||||
|
||||
See also two "COPYING" files in "flite" directory and the current directory for
|
||||
details.
|
||||
|
||||
*******************************************************************************
|
||||
Installation
|
||||
*******************************************************************************
|
||||
|
||||
See "INSTALL" in the same directory for details.
|
||||
|
||||
*******************************************************************************
|
||||
Acknowledgements
|
||||
*******************************************************************************
|
||||
|
||||
Keiichi Tokuda
|
||||
Keiichiro Oura
|
||||
Tomoki Toda
|
||||
|
||||
*******************************************************************************
|
||||
Who we are
|
||||
*******************************************************************************
|
||||
|
||||
The HTS working group is a voluntary group for developing the HMM-Based Speech
|
||||
Synthesis System. Current members are
|
||||
|
||||
Keiichi Tokuda http://www.sp.nitech.ac.jp/~tokuda/
|
||||
(Produce and Design)
|
||||
Keiichiro Oura http://www.sp.nitech.ac.jp/~uratec/
|
||||
(Design and Development, Main Maintainer)
|
||||
Kei Hashimoto http://www.sp.nitech.ac.jp/~bonanza/
|
||||
Sayaka Shiota http://www.sp.nitech.ac.jp/~sayaka/
|
||||
Shinji Takaki http://www.sp.nitech.ac.jp/~k-prr44/
|
||||
Heiga Zen
|
||||
Junichi Yamagishi http://homepages.inf.ed.ac.uk/jyamagis/
|
||||
Tomoki Toda http://spalab.naist.jp/~tomoki/index_e.html
|
||||
Takashi Nose
|
||||
Shinji Sako http://www.mmsp.nitech.ac.jp/~sako/
|
||||
Alan W. Black http://www.cs.cmu.edu/~awb/
|
||||
|
||||
and the members are dynamically changing. The current formal contact address of
|
||||
HTS working group and a mailing list for HTS users can be found at
|
||||
http://hts.sp.nitech.ac.jp/
|
||||
===============================================================================
|
912
3rdparty/flite_hts_engine/aclocal.m4
vendored
Normal file
912
3rdparty/flite_hts_engine/aclocal.m4
vendored
Normal file
|
@ -0,0 +1,912 @@
|
|||
# generated automatically by aclocal 1.10.2 -*- Autoconf -*-
|
||||
|
||||
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
|
||||
# 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
m4_ifndef([AC_AUTOCONF_VERSION],
|
||||
[m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
|
||||
m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.63],,
|
||||
[m4_warning([this file was generated for autoconf 2.63.
|
||||
You have another version of autoconf. It may work, but is not guaranteed to.
|
||||
If you have problems, you may need to regenerate the build system entirely.
|
||||
To do so, use the procedure documented by the package, typically `autoreconf'.])])
|
||||
|
||||
# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# AM_AUTOMAKE_VERSION(VERSION)
|
||||
# ----------------------------
|
||||
# Automake X.Y traces this macro to ensure aclocal.m4 has been
|
||||
# generated from the m4 files accompanying Automake X.Y.
|
||||
# (This private macro should not be called outside this file.)
|
||||
AC_DEFUN([AM_AUTOMAKE_VERSION],
|
||||
[am__api_version='1.10'
|
||||
dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
|
||||
dnl require some minimum version. Point them to the right macro.
|
||||
m4_if([$1], [1.10.2], [],
|
||||
[AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
|
||||
])
|
||||
|
||||
# _AM_AUTOCONF_VERSION(VERSION)
|
||||
# -----------------------------
|
||||
# aclocal traces this macro to find the Autoconf version.
|
||||
# This is a private macro too. Using m4_define simplifies
|
||||
# the logic in aclocal, which can simply ignore this definition.
|
||||
m4_define([_AM_AUTOCONF_VERSION], [])
|
||||
|
||||
# AM_SET_CURRENT_AUTOMAKE_VERSION
|
||||
# -------------------------------
|
||||
# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
|
||||
# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
|
||||
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
|
||||
[AM_AUTOMAKE_VERSION([1.10.2])dnl
|
||||
m4_ifndef([AC_AUTOCONF_VERSION],
|
||||
[m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
|
||||
_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
|
||||
|
||||
# AM_AUX_DIR_EXPAND -*- Autoconf -*-
|
||||
|
||||
# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
|
||||
# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
|
||||
# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
|
||||
#
|
||||
# Of course, Automake must honor this variable whenever it calls a
|
||||
# tool from the auxiliary directory. The problem is that $srcdir (and
|
||||
# therefore $ac_aux_dir as well) can be either absolute or relative,
|
||||
# depending on how configure is run. This is pretty annoying, since
|
||||
# it makes $ac_aux_dir quite unusable in subdirectories: in the top
|
||||
# source directory, any form will work fine, but in subdirectories a
|
||||
# relative path needs to be adjusted first.
|
||||
#
|
||||
# $ac_aux_dir/missing
|
||||
# fails when called from a subdirectory if $ac_aux_dir is relative
|
||||
# $top_srcdir/$ac_aux_dir/missing
|
||||
# fails if $ac_aux_dir is absolute,
|
||||
# fails when called from a subdirectory in a VPATH build with
|
||||
# a relative $ac_aux_dir
|
||||
#
|
||||
# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
|
||||
# are both prefixed by $srcdir. In an in-source build this is usually
|
||||
# harmless because $srcdir is `.', but things will broke when you
|
||||
# start a VPATH build or use an absolute $srcdir.
|
||||
#
|
||||
# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
|
||||
# iff we strip the leading $srcdir from $ac_aux_dir. That would be:
|
||||
# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
|
||||
# and then we would define $MISSING as
|
||||
# MISSING="\${SHELL} $am_aux_dir/missing"
|
||||
# This will work as long as MISSING is not called from configure, because
|
||||
# unfortunately $(top_srcdir) has no meaning in configure.
|
||||
# However there are other variables, like CC, which are often used in
|
||||
# configure, and could therefore not use this "fixed" $ac_aux_dir.
|
||||
#
|
||||
# Another solution, used here, is to always expand $ac_aux_dir to an
|
||||
# absolute PATH. The drawback is that using absolute paths prevent a
|
||||
# configured tree to be moved without reconfiguration.
|
||||
|
||||
AC_DEFUN([AM_AUX_DIR_EXPAND],
|
||||
[dnl Rely on autoconf to set up CDPATH properly.
|
||||
AC_PREREQ([2.50])dnl
|
||||
# expand $ac_aux_dir to an absolute path
|
||||
am_aux_dir=`cd $ac_aux_dir && pwd`
|
||||
])
|
||||
|
||||
# AM_CONDITIONAL -*- Autoconf -*-
|
||||
|
||||
# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006
|
||||
# Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# serial 8
|
||||
|
||||
# AM_CONDITIONAL(NAME, SHELL-CONDITION)
|
||||
# -------------------------------------
|
||||
# Define a conditional.
|
||||
AC_DEFUN([AM_CONDITIONAL],
|
||||
[AC_PREREQ(2.52)dnl
|
||||
ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
|
||||
[$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
|
||||
AC_SUBST([$1_TRUE])dnl
|
||||
AC_SUBST([$1_FALSE])dnl
|
||||
_AM_SUBST_NOTMAKE([$1_TRUE])dnl
|
||||
_AM_SUBST_NOTMAKE([$1_FALSE])dnl
|
||||
if $2; then
|
||||
$1_TRUE=
|
||||
$1_FALSE='#'
|
||||
else
|
||||
$1_TRUE='#'
|
||||
$1_FALSE=
|
||||
fi
|
||||
AC_CONFIG_COMMANDS_PRE(
|
||||
[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
|
||||
AC_MSG_ERROR([[conditional "$1" was never defined.
|
||||
Usually this means the macro was only invoked conditionally.]])
|
||||
fi])])
|
||||
|
||||
# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006
|
||||
# Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# serial 9
|
||||
|
||||
# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
|
||||
# written in clear, in which case automake, when reading aclocal.m4,
|
||||
# will think it sees a *use*, and therefore will trigger all it's
|
||||
# C support machinery. Also note that it means that autoscan, seeing
|
||||
# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
|
||||
|
||||
|
||||
# _AM_DEPENDENCIES(NAME)
|
||||
# ----------------------
|
||||
# See how the compiler implements dependency checking.
|
||||
# NAME is "CC", "CXX", "GCJ", or "OBJC".
|
||||
# We try a few techniques and use that to set a single cache variable.
|
||||
#
|
||||
# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
|
||||
# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
|
||||
# dependency, and given that the user is not expected to run this macro,
|
||||
# just rely on AC_PROG_CC.
|
||||
AC_DEFUN([_AM_DEPENDENCIES],
|
||||
[AC_REQUIRE([AM_SET_DEPDIR])dnl
|
||||
AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
|
||||
AC_REQUIRE([AM_MAKE_INCLUDE])dnl
|
||||
AC_REQUIRE([AM_DEP_TRACK])dnl
|
||||
|
||||
ifelse([$1], CC, [depcc="$CC" am_compiler_list=],
|
||||
[$1], CXX, [depcc="$CXX" am_compiler_list=],
|
||||
[$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
|
||||
[$1], UPC, [depcc="$UPC" am_compiler_list=],
|
||||
[$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
|
||||
[depcc="$$1" am_compiler_list=])
|
||||
|
||||
AC_CACHE_CHECK([dependency style of $depcc],
|
||||
[am_cv_$1_dependencies_compiler_type],
|
||||
[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
|
||||
# We make a subdir and do the tests there. Otherwise we can end up
|
||||
# making bogus files that we don't know about and never remove. For
|
||||
# instance it was reported that on HP-UX the gcc test will end up
|
||||
# making a dummy file named `D' -- because `-MD' means `put the output
|
||||
# in D'.
|
||||
mkdir conftest.dir
|
||||
# Copy depcomp to subdir because otherwise we won't find it if we're
|
||||
# using a relative directory.
|
||||
cp "$am_depcomp" conftest.dir
|
||||
cd conftest.dir
|
||||
# We will build objects and dependencies in a subdirectory because
|
||||
# it helps to detect inapplicable dependency modes. For instance
|
||||
# both Tru64's cc and ICC support -MD to output dependencies as a
|
||||
# side effect of compilation, but ICC will put the dependencies in
|
||||
# the current directory while Tru64 will put them in the object
|
||||
# directory.
|
||||
mkdir sub
|
||||
|
||||
am_cv_$1_dependencies_compiler_type=none
|
||||
if test "$am_compiler_list" = ""; then
|
||||
am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
|
||||
fi
|
||||
for depmode in $am_compiler_list; do
|
||||
# Setup a source with many dependencies, because some compilers
|
||||
# like to wrap large dependency lists on column 80 (with \), and
|
||||
# we should not choose a depcomp mode which is confused by this.
|
||||
#
|
||||
# We need to recreate these files for each test, as the compiler may
|
||||
# overwrite some of them when testing with obscure command lines.
|
||||
# This happens at least with the AIX C compiler.
|
||||
: > sub/conftest.c
|
||||
for i in 1 2 3 4 5 6; do
|
||||
echo '#include "conftst'$i'.h"' >> sub/conftest.c
|
||||
# Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
|
||||
# Solaris 8's {/usr,}/bin/sh.
|
||||
touch sub/conftst$i.h
|
||||
done
|
||||
echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
|
||||
|
||||
case $depmode in
|
||||
nosideeffect)
|
||||
# after this tag, mechanisms are not by side-effect, so they'll
|
||||
# only be used when explicitly requested
|
||||
if test "x$enable_dependency_tracking" = xyes; then
|
||||
continue
|
||||
else
|
||||
break
|
||||
fi
|
||||
;;
|
||||
none) break ;;
|
||||
esac
|
||||
# We check with `-c' and `-o' for the sake of the "dashmstdout"
|
||||
# mode. It turns out that the SunPro C++ compiler does not properly
|
||||
# handle `-M -o', and we need to detect this.
|
||||
if depmode=$depmode \
|
||||
source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
|
||||
depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
|
||||
$SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
|
||||
>/dev/null 2>conftest.err &&
|
||||
grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
|
||||
grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
|
||||
grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
|
||||
${MAKE-make} -s -f confmf > /dev/null 2>&1; then
|
||||
# icc doesn't choke on unknown options, it will just issue warnings
|
||||
# or remarks (even with -Werror). So we grep stderr for any message
|
||||
# that says an option was ignored or not supported.
|
||||
# When given -MP, icc 7.0 and 7.1 complain thusly:
|
||||
# icc: Command line warning: ignoring option '-M'; no argument required
|
||||
# The diagnosis changed in icc 8.0:
|
||||
# icc: Command line remark: option '-MP' not supported
|
||||
if (grep 'ignoring option' conftest.err ||
|
||||
grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
|
||||
am_cv_$1_dependencies_compiler_type=$depmode
|
||||
break
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
||||
cd ..
|
||||
rm -rf conftest.dir
|
||||
else
|
||||
am_cv_$1_dependencies_compiler_type=none
|
||||
fi
|
||||
])
|
||||
AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
|
||||
AM_CONDITIONAL([am__fastdep$1], [
|
||||
test "x$enable_dependency_tracking" != xno \
|
||||
&& test "$am_cv_$1_dependencies_compiler_type" = gcc3])
|
||||
])
|
||||
|
||||
|
||||
# AM_SET_DEPDIR
|
||||
# -------------
|
||||
# Choose a directory name for dependency files.
|
||||
# This macro is AC_REQUIREd in _AM_DEPENDENCIES
|
||||
AC_DEFUN([AM_SET_DEPDIR],
|
||||
[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
|
||||
AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
|
||||
])
|
||||
|
||||
|
||||
# AM_DEP_TRACK
|
||||
# ------------
|
||||
AC_DEFUN([AM_DEP_TRACK],
|
||||
[AC_ARG_ENABLE(dependency-tracking,
|
||||
[ --disable-dependency-tracking speeds up one-time build
|
||||
--enable-dependency-tracking do not reject slow dependency extractors])
|
||||
if test "x$enable_dependency_tracking" != xno; then
|
||||
am_depcomp="$ac_aux_dir/depcomp"
|
||||
AMDEPBACKSLASH='\'
|
||||
fi
|
||||
AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
|
||||
AC_SUBST([AMDEPBACKSLASH])dnl
|
||||
_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
|
||||
])
|
||||
|
||||
# Generate code to set up dependency tracking. -*- Autoconf -*-
|
||||
|
||||
# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008
|
||||
# Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
#serial 4
|
||||
|
||||
# _AM_OUTPUT_DEPENDENCY_COMMANDS
|
||||
# ------------------------------
|
||||
AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
|
||||
[# Autoconf 2.62 quotes --file arguments for eval, but not when files
|
||||
# are listed without --file. Let's play safe and only enable the eval
|
||||
# if we detect the quoting.
|
||||
case $CONFIG_FILES in
|
||||
*\'*) eval set x "$CONFIG_FILES" ;;
|
||||
*) set x $CONFIG_FILES ;;
|
||||
esac
|
||||
shift
|
||||
for mf
|
||||
do
|
||||
# Strip MF so we end up with the name of the file.
|
||||
mf=`echo "$mf" | sed -e 's/:.*$//'`
|
||||
# Check whether this is an Automake generated Makefile or not.
|
||||
# We used to match only the files named `Makefile.in', but
|
||||
# some people rename them; so instead we look at the file content.
|
||||
# Grep'ing the first line is not enough: some people post-process
|
||||
# each Makefile.in and add a new line on top of each file to say so.
|
||||
# Grep'ing the whole file is not good either: AIX grep has a line
|
||||
# limit of 2048, but all sed's we know have understand at least 4000.
|
||||
if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
|
||||
dirpart=`AS_DIRNAME("$mf")`
|
||||
else
|
||||
continue
|
||||
fi
|
||||
# Extract the definition of DEPDIR, am__include, and am__quote
|
||||
# from the Makefile without running `make'.
|
||||
DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
|
||||
test -z "$DEPDIR" && continue
|
||||
am__include=`sed -n 's/^am__include = //p' < "$mf"`
|
||||
test -z "am__include" && continue
|
||||
am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
|
||||
# When using ansi2knr, U may be empty or an underscore; expand it
|
||||
U=`sed -n 's/^U = //p' < "$mf"`
|
||||
# Find all dependency output files, they are included files with
|
||||
# $(DEPDIR) in their names. We invoke sed twice because it is the
|
||||
# simplest approach to changing $(DEPDIR) to its actual value in the
|
||||
# expansion.
|
||||
for file in `sed -n "
|
||||
s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
|
||||
sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
|
||||
# Make sure the directory exists.
|
||||
test -f "$dirpart/$file" && continue
|
||||
fdir=`AS_DIRNAME(["$file"])`
|
||||
AS_MKDIR_P([$dirpart/$fdir])
|
||||
# echo "creating $dirpart/$file"
|
||||
echo '# dummy' > "$dirpart/$file"
|
||||
done
|
||||
done
|
||||
])# _AM_OUTPUT_DEPENDENCY_COMMANDS
|
||||
|
||||
|
||||
# AM_OUTPUT_DEPENDENCY_COMMANDS
|
||||
# -----------------------------
|
||||
# This macro should only be invoked once -- use via AC_REQUIRE.
|
||||
#
|
||||
# This code is only required when automatic dependency tracking
|
||||
# is enabled. FIXME. This creates each `.P' file that we will
|
||||
# need in order to bootstrap the dependency handling code.
|
||||
AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
|
||||
[AC_CONFIG_COMMANDS([depfiles],
|
||||
[test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
|
||||
[AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
|
||||
])
|
||||
|
||||
# Do all the work for Automake. -*- Autoconf -*-
|
||||
|
||||
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
|
||||
# 2005, 2006, 2008 Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# serial 13
|
||||
|
||||
# This macro actually does too much. Some checks are only needed if
|
||||
# your package does certain things. But this isn't really a big deal.
|
||||
|
||||
# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
|
||||
# AM_INIT_AUTOMAKE([OPTIONS])
|
||||
# -----------------------------------------------
|
||||
# The call with PACKAGE and VERSION arguments is the old style
|
||||
# call (pre autoconf-2.50), which is being phased out. PACKAGE
|
||||
# and VERSION should now be passed to AC_INIT and removed from
|
||||
# the call to AM_INIT_AUTOMAKE.
|
||||
# We support both call styles for the transition. After
|
||||
# the next Automake release, Autoconf can make the AC_INIT
|
||||
# arguments mandatory, and then we can depend on a new Autoconf
|
||||
# release and drop the old call support.
|
||||
AC_DEFUN([AM_INIT_AUTOMAKE],
|
||||
[AC_PREREQ([2.60])dnl
|
||||
dnl Autoconf wants to disallow AM_ names. We explicitly allow
|
||||
dnl the ones we care about.
|
||||
m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
|
||||
AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
|
||||
AC_REQUIRE([AC_PROG_INSTALL])dnl
|
||||
if test "`cd $srcdir && pwd`" != "`pwd`"; then
|
||||
# Use -I$(srcdir) only when $(srcdir) != ., so that make's output
|
||||
# is not polluted with repeated "-I."
|
||||
AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
|
||||
# test to see if srcdir already configured
|
||||
if test -f $srcdir/config.status; then
|
||||
AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
|
||||
fi
|
||||
fi
|
||||
|
||||
# test whether we have cygpath
|
||||
if test -z "$CYGPATH_W"; then
|
||||
if (cygpath --version) >/dev/null 2>/dev/null; then
|
||||
CYGPATH_W='cygpath -w'
|
||||
else
|
||||
CYGPATH_W=echo
|
||||
fi
|
||||
fi
|
||||
AC_SUBST([CYGPATH_W])
|
||||
|
||||
# Define the identity of the package.
|
||||
dnl Distinguish between old-style and new-style calls.
|
||||
m4_ifval([$2],
|
||||
[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
|
||||
AC_SUBST([PACKAGE], [$1])dnl
|
||||
AC_SUBST([VERSION], [$2])],
|
||||
[_AM_SET_OPTIONS([$1])dnl
|
||||
dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
|
||||
m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
|
||||
[m4_fatal([AC_INIT should be called with package and version arguments])])dnl
|
||||
AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
|
||||
AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
|
||||
|
||||
_AM_IF_OPTION([no-define],,
|
||||
[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
|
||||
AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
|
||||
|
||||
# Some tools Automake needs.
|
||||
AC_REQUIRE([AM_SANITY_CHECK])dnl
|
||||
AC_REQUIRE([AC_ARG_PROGRAM])dnl
|
||||
AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
|
||||
AM_MISSING_PROG(AUTOCONF, autoconf)
|
||||
AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
|
||||
AM_MISSING_PROG(AUTOHEADER, autoheader)
|
||||
AM_MISSING_PROG(MAKEINFO, makeinfo)
|
||||
AM_PROG_INSTALL_SH
|
||||
AM_PROG_INSTALL_STRIP
|
||||
AC_REQUIRE([AM_PROG_MKDIR_P])dnl
|
||||
# We need awk for the "check" target. The system "awk" is bad on
|
||||
# some platforms.
|
||||
AC_REQUIRE([AC_PROG_AWK])dnl
|
||||
AC_REQUIRE([AC_PROG_MAKE_SET])dnl
|
||||
AC_REQUIRE([AM_SET_LEADING_DOT])dnl
|
||||
_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
|
||||
[_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
|
||||
[_AM_PROG_TAR([v7])])])
|
||||
_AM_IF_OPTION([no-dependencies],,
|
||||
[AC_PROVIDE_IFELSE([AC_PROG_CC],
|
||||
[_AM_DEPENDENCIES(CC)],
|
||||
[define([AC_PROG_CC],
|
||||
defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
|
||||
AC_PROVIDE_IFELSE([AC_PROG_CXX],
|
||||
[_AM_DEPENDENCIES(CXX)],
|
||||
[define([AC_PROG_CXX],
|
||||
defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
|
||||
AC_PROVIDE_IFELSE([AC_PROG_OBJC],
|
||||
[_AM_DEPENDENCIES(OBJC)],
|
||||
[define([AC_PROG_OBJC],
|
||||
defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
|
||||
])
|
||||
])
|
||||
|
||||
|
||||
# When config.status generates a header, we must update the stamp-h file.
|
||||
# This file resides in the same directory as the config header
|
||||
# that is generated. The stamp files are numbered to have different names.
|
||||
|
||||
# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
|
||||
# loop where config.status creates the headers, so we can generate
|
||||
# our stamp files there.
|
||||
AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
|
||||
[# Compute $1's index in $config_headers.
|
||||
_am_arg=$1
|
||||
_am_stamp_count=1
|
||||
for _am_header in $config_headers :; do
|
||||
case $_am_header in
|
||||
$_am_arg | $_am_arg:* )
|
||||
break ;;
|
||||
* )
|
||||
_am_stamp_count=`expr $_am_stamp_count + 1` ;;
|
||||
esac
|
||||
done
|
||||
echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
|
||||
|
||||
# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# AM_PROG_INSTALL_SH
|
||||
# ------------------
|
||||
# Define $install_sh.
|
||||
AC_DEFUN([AM_PROG_INSTALL_SH],
|
||||
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
|
||||
install_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"}
|
||||
AC_SUBST(install_sh)])
|
||||
|
||||
# Copyright (C) 2003, 2005 Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# serial 2
|
||||
|
||||
# Check whether the underlying file-system supports filenames
|
||||
# with a leading dot. For instance MS-DOS doesn't.
|
||||
AC_DEFUN([AM_SET_LEADING_DOT],
|
||||
[rm -rf .tst 2>/dev/null
|
||||
mkdir .tst 2>/dev/null
|
||||
if test -d .tst; then
|
||||
am__leading_dot=.
|
||||
else
|
||||
am__leading_dot=_
|
||||
fi
|
||||
rmdir .tst 2>/dev/null
|
||||
AC_SUBST([am__leading_dot])])
|
||||
|
||||
# Check to see how 'make' treats includes. -*- Autoconf -*-
|
||||
|
||||
# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# serial 3
|
||||
|
||||
# AM_MAKE_INCLUDE()
|
||||
# -----------------
|
||||
# Check to see how make treats includes.
|
||||
AC_DEFUN([AM_MAKE_INCLUDE],
|
||||
[am_make=${MAKE-make}
|
||||
cat > confinc << 'END'
|
||||
am__doit:
|
||||
@echo done
|
||||
.PHONY: am__doit
|
||||
END
|
||||
# If we don't find an include directive, just comment out the code.
|
||||
AC_MSG_CHECKING([for style of include used by $am_make])
|
||||
am__include="#"
|
||||
am__quote=
|
||||
_am_result=none
|
||||
# First try GNU make style include.
|
||||
echo "include confinc" > confmf
|
||||
# We grep out `Entering directory' and `Leaving directory'
|
||||
# messages which can occur if `w' ends up in MAKEFLAGS.
|
||||
# In particular we don't look at `^make:' because GNU make might
|
||||
# be invoked under some other name (usually "gmake"), in which
|
||||
# case it prints its new name instead of `make'.
|
||||
if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
|
||||
am__include=include
|
||||
am__quote=
|
||||
_am_result=GNU
|
||||
fi
|
||||
# Now try BSD make style include.
|
||||
if test "$am__include" = "#"; then
|
||||
echo '.include "confinc"' > confmf
|
||||
if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
|
||||
am__include=.include
|
||||
am__quote="\""
|
||||
_am_result=BSD
|
||||
fi
|
||||
fi
|
||||
AC_SUBST([am__include])
|
||||
AC_SUBST([am__quote])
|
||||
AC_MSG_RESULT([$_am_result])
|
||||
rm -f confinc confmf
|
||||
])
|
||||
|
||||
# Copyright (C) 1999, 2000, 2001, 2003, 2004, 2005, 2008
|
||||
# Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# serial 6
|
||||
|
||||
# AM_PROG_CC_C_O
|
||||
# --------------
|
||||
# Like AC_PROG_CC_C_O, but changed for automake.
|
||||
AC_DEFUN([AM_PROG_CC_C_O],
|
||||
[AC_REQUIRE([AC_PROG_CC_C_O])dnl
|
||||
AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
|
||||
AC_REQUIRE_AUX_FILE([compile])dnl
|
||||
# FIXME: we rely on the cache variable name because
|
||||
# there is no other way.
|
||||
set dummy $CC
|
||||
am_cc=`echo $[2] | sed ['s/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/']`
|
||||
eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o
|
||||
if test "$am_t" != yes; then
|
||||
# Losing compiler, so override with the script.
|
||||
# FIXME: It is wrong to rewrite CC.
|
||||
# But if we don't then we get into trouble of one sort or another.
|
||||
# A longer-term fix would be to have automake use am__CC in this case,
|
||||
# and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
|
||||
CC="$am_aux_dir/compile $CC"
|
||||
fi
|
||||
dnl Make sure AC_PROG_CC is never called again, or it will override our
|
||||
dnl setting of CC.
|
||||
m4_define([AC_PROG_CC],
|
||||
[m4_fatal([AC_PROG_CC cannot be called after AM_PROG_CC_C_O])])
|
||||
])
|
||||
|
||||
# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
|
||||
|
||||
# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005
|
||||
# Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# serial 5
|
||||
|
||||
# AM_MISSING_PROG(NAME, PROGRAM)
|
||||
# ------------------------------
|
||||
AC_DEFUN([AM_MISSING_PROG],
|
||||
[AC_REQUIRE([AM_MISSING_HAS_RUN])
|
||||
$1=${$1-"${am_missing_run}$2"}
|
||||
AC_SUBST($1)])
|
||||
|
||||
|
||||
# AM_MISSING_HAS_RUN
|
||||
# ------------------
|
||||
# Define MISSING if not defined so far and test if it supports --run.
|
||||
# If it does, set am_missing_run to use it, otherwise, to nothing.
|
||||
AC_DEFUN([AM_MISSING_HAS_RUN],
|
||||
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
|
||||
AC_REQUIRE_AUX_FILE([missing])dnl
|
||||
test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
|
||||
# Use eval to expand $SHELL
|
||||
if eval "$MISSING --run true"; then
|
||||
am_missing_run="$MISSING --run "
|
||||
else
|
||||
am_missing_run=
|
||||
AC_MSG_WARN([`missing' script is too old or missing])
|
||||
fi
|
||||
])
|
||||
|
||||
# Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# AM_PROG_MKDIR_P
|
||||
# ---------------
|
||||
# Check for `mkdir -p'.
|
||||
AC_DEFUN([AM_PROG_MKDIR_P],
|
||||
[AC_PREREQ([2.60])dnl
|
||||
AC_REQUIRE([AC_PROG_MKDIR_P])dnl
|
||||
dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P,
|
||||
dnl while keeping a definition of mkdir_p for backward compatibility.
|
||||
dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
|
||||
dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
|
||||
dnl Makefile.ins that do not define MKDIR_P, so we do our own
|
||||
dnl adjustment using top_builddir (which is defined more often than
|
||||
dnl MKDIR_P).
|
||||
AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
|
||||
case $mkdir_p in
|
||||
[[\\/$]]* | ?:[[\\/]]*) ;;
|
||||
*/*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
|
||||
esac
|
||||
])
|
||||
|
||||
# Helper functions for option handling. -*- Autoconf -*-
|
||||
|
||||
# Copyright (C) 2001, 2002, 2003, 2005, 2008 Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# serial 4
|
||||
|
||||
# _AM_MANGLE_OPTION(NAME)
|
||||
# -----------------------
|
||||
AC_DEFUN([_AM_MANGLE_OPTION],
|
||||
[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
|
||||
|
||||
# _AM_SET_OPTION(NAME)
|
||||
# ------------------------------
|
||||
# Set option NAME. Presently that only means defining a flag for this option.
|
||||
AC_DEFUN([_AM_SET_OPTION],
|
||||
[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
|
||||
|
||||
# _AM_SET_OPTIONS(OPTIONS)
|
||||
# ----------------------------------
|
||||
# OPTIONS is a space-separated list of Automake options.
|
||||
AC_DEFUN([_AM_SET_OPTIONS],
|
||||
[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
|
||||
|
||||
# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
|
||||
# -------------------------------------------
|
||||
# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
|
||||
AC_DEFUN([_AM_IF_OPTION],
|
||||
[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
|
||||
|
||||
# Check to make sure that the build environment is sane. -*- Autoconf -*-
|
||||
|
||||
# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
|
||||
# Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# serial 4
|
||||
|
||||
# AM_SANITY_CHECK
|
||||
# ---------------
|
||||
AC_DEFUN([AM_SANITY_CHECK],
|
||||
[AC_MSG_CHECKING([whether build environment is sane])
|
||||
# Just in case
|
||||
sleep 1
|
||||
echo timestamp > conftest.file
|
||||
# Do `set' in a subshell so we don't clobber the current shell's
|
||||
# arguments. Must try -L first in case configure is actually a
|
||||
# symlink; some systems play weird games with the mod time of symlinks
|
||||
# (eg FreeBSD returns the mod time of the symlink's containing
|
||||
# directory).
|
||||
if (
|
||||
set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
|
||||
if test "$[*]" = "X"; then
|
||||
# -L didn't work.
|
||||
set X `ls -t $srcdir/configure conftest.file`
|
||||
fi
|
||||
rm -f conftest.file
|
||||
if test "$[*]" != "X $srcdir/configure conftest.file" \
|
||||
&& test "$[*]" != "X conftest.file $srcdir/configure"; then
|
||||
|
||||
# If neither matched, then we have a broken ls. This can happen
|
||||
# if, for instance, CONFIG_SHELL is bash and it inherits a
|
||||
# broken ls alias from the environment. This has actually
|
||||
# happened. Such a system could not be considered "sane".
|
||||
AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
|
||||
alias in your environment])
|
||||
fi
|
||||
|
||||
test "$[2]" = conftest.file
|
||||
)
|
||||
then
|
||||
# Ok.
|
||||
:
|
||||
else
|
||||
AC_MSG_ERROR([newly created file is older than distributed files!
|
||||
Check your system clock])
|
||||
fi
|
||||
AC_MSG_RESULT(yes)])
|
||||
|
||||
# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# AM_PROG_INSTALL_STRIP
|
||||
# ---------------------
|
||||
# One issue with vendor `install' (even GNU) is that you can't
|
||||
# specify the program used to strip binaries. This is especially
|
||||
# annoying in cross-compiling environments, where the build's strip
|
||||
# is unlikely to handle the host's binaries.
|
||||
# Fortunately install-sh will honor a STRIPPROG variable, so we
|
||||
# always use install-sh in `make install-strip', and initialize
|
||||
# STRIPPROG with the value of the STRIP variable (set by the user).
|
||||
AC_DEFUN([AM_PROG_INSTALL_STRIP],
|
||||
[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
|
||||
# Installed binaries are usually stripped using `strip' when the user
|
||||
# run `make install-strip'. However `strip' might not be the right
|
||||
# tool to use in cross-compilation environments, therefore Automake
|
||||
# will honor the `STRIP' environment variable to overrule this program.
|
||||
dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
|
||||
if test "$cross_compiling" != no; then
|
||||
AC_CHECK_TOOL([STRIP], [strip], :)
|
||||
fi
|
||||
INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
|
||||
AC_SUBST([INSTALL_STRIP_PROGRAM])])
|
||||
|
||||
# Copyright (C) 2006 Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# _AM_SUBST_NOTMAKE(VARIABLE)
|
||||
# ---------------------------
|
||||
# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
|
||||
# This macro is traced by Automake.
|
||||
AC_DEFUN([_AM_SUBST_NOTMAKE])
|
||||
|
||||
# Check how to create a tarball. -*- Autoconf -*-
|
||||
|
||||
# Copyright (C) 2004, 2005 Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# serial 2
|
||||
|
||||
# _AM_PROG_TAR(FORMAT)
|
||||
# --------------------
|
||||
# Check how to create a tarball in format FORMAT.
|
||||
# FORMAT should be one of `v7', `ustar', or `pax'.
|
||||
#
|
||||
# Substitute a variable $(am__tar) that is a command
|
||||
# writing to stdout a FORMAT-tarball containing the directory
|
||||
# $tardir.
|
||||
# tardir=directory && $(am__tar) > result.tar
|
||||
#
|
||||
# Substitute a variable $(am__untar) that extract such
|
||||
# a tarball read from stdin.
|
||||
# $(am__untar) < result.tar
|
||||
AC_DEFUN([_AM_PROG_TAR],
|
||||
[# Always define AMTAR for backward compatibility.
|
||||
AM_MISSING_PROG([AMTAR], [tar])
|
||||
m4_if([$1], [v7],
|
||||
[am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
|
||||
[m4_case([$1], [ustar],, [pax],,
|
||||
[m4_fatal([Unknown tar format])])
|
||||
AC_MSG_CHECKING([how to create a $1 tar archive])
|
||||
# Loop over all known methods to create a tar archive until one works.
|
||||
_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
|
||||
_am_tools=${am_cv_prog_tar_$1-$_am_tools}
|
||||
# Do not fold the above two line into one, because Tru64 sh and
|
||||
# Solaris sh will not grok spaces in the rhs of `-'.
|
||||
for _am_tool in $_am_tools
|
||||
do
|
||||
case $_am_tool in
|
||||
gnutar)
|
||||
for _am_tar in tar gnutar gtar;
|
||||
do
|
||||
AM_RUN_LOG([$_am_tar --version]) && break
|
||||
done
|
||||
am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
|
||||
am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
|
||||
am__untar="$_am_tar -xf -"
|
||||
;;
|
||||
plaintar)
|
||||
# Must skip GNU tar: if it does not support --format= it doesn't create
|
||||
# ustar tarball either.
|
||||
(tar --version) >/dev/null 2>&1 && continue
|
||||
am__tar='tar chf - "$$tardir"'
|
||||
am__tar_='tar chf - "$tardir"'
|
||||
am__untar='tar xf -'
|
||||
;;
|
||||
pax)
|
||||
am__tar='pax -L -x $1 -w "$$tardir"'
|
||||
am__tar_='pax -L -x $1 -w "$tardir"'
|
||||
am__untar='pax -r'
|
||||
;;
|
||||
cpio)
|
||||
am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
|
||||
am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
|
||||
am__untar='cpio -i -H $1 -d'
|
||||
;;
|
||||
none)
|
||||
am__tar=false
|
||||
am__tar_=false
|
||||
am__untar=false
|
||||
;;
|
||||
esac
|
||||
|
||||
# If the value was cached, stop now. We just wanted to have am__tar
|
||||
# and am__untar set.
|
||||
test -n "${am_cv_prog_tar_$1}" && break
|
||||
|
||||
# tar/untar a dummy directory, and stop if the command works
|
||||
rm -rf conftest.dir
|
||||
mkdir conftest.dir
|
||||
echo GrepMe > conftest.dir/file
|
||||
AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
|
||||
rm -rf conftest.dir
|
||||
if test -s conftest.tar; then
|
||||
AM_RUN_LOG([$am__untar <conftest.tar])
|
||||
grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
|
||||
fi
|
||||
done
|
||||
rm -rf conftest.dir
|
||||
|
||||
AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
|
||||
AC_MSG_RESULT([$am_cv_prog_tar_$1])])
|
||||
AC_SUBST([am__tar])
|
||||
AC_SUBST([am__untar])
|
||||
]) # _AM_PROG_TAR
|
||||
|
17
3rdparty/flite_hts_engine/bin/Makefile.am
vendored
Normal file
17
3rdparty/flite_hts_engine/bin/Makefile.am
vendored
Normal file
|
@ -0,0 +1,17 @@
|
|||
|
||||
EXTRA_DIST = Makefile.mak
|
||||
|
||||
INCLUDES = -I$(top_srcdir)/include \
|
||||
-I$(top_srcdir)/flite/include \
|
||||
-I$(top_srcdir)/flite/lang/cmu_us_kal \
|
||||
-I$(top_srcdir)/flite/lang/cmulex \
|
||||
-I$(top_srcdir)/flite/lang/usenglish \
|
||||
-I$(HTS_ENGINE_HEADER_DIR)
|
||||
|
||||
bin_PROGRAMS = flite_hts_engine
|
||||
|
||||
flite_hts_engine_SOURCES = flite_hts_engine.c
|
||||
|
||||
flite_hts_engine_LDADD = $(top_srcdir)/lib/libflhtse.a $(HTS_ENGINE_LIBRARY)
|
||||
|
||||
DISTCLEANFILES = *.log *.out *~
|
435
3rdparty/flite_hts_engine/bin/Makefile.in
vendored
Normal file
435
3rdparty/flite_hts_engine/bin/Makefile.in
vendored
Normal file
|
@ -0,0 +1,435 @@
|
|||
# Makefile.in generated by automake 1.10.2 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
||||
# 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
@SET_MAKE@
|
||||
|
||||
VPATH = @srcdir@
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||
install_sh_DATA = $(install_sh) -c -m 644
|
||||
install_sh_PROGRAM = $(install_sh) -c
|
||||
install_sh_SCRIPT = $(install_sh) -c
|
||||
INSTALL_HEADER = $(INSTALL_DATA)
|
||||
transform = $(program_transform_name)
|
||||
NORMAL_INSTALL = :
|
||||
PRE_INSTALL = :
|
||||
POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
build_triplet = @build@
|
||||
host_triplet = @host@
|
||||
bin_PROGRAMS = flite_hts_engine$(EXEEXT)
|
||||
subdir = bin
|
||||
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/configure.ac
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
mkinstalldirs = $(install_sh) -d
|
||||
CONFIG_CLEAN_FILES =
|
||||
am__installdirs = "$(DESTDIR)$(bindir)"
|
||||
binPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
|
||||
PROGRAMS = $(bin_PROGRAMS)
|
||||
am_flite_hts_engine_OBJECTS = flite_hts_engine.$(OBJEXT)
|
||||
flite_hts_engine_OBJECTS = $(am_flite_hts_engine_OBJECTS)
|
||||
am__DEPENDENCIES_1 =
|
||||
flite_hts_engine_DEPENDENCIES = $(top_srcdir)/lib/libflhtse.a \
|
||||
$(am__DEPENDENCIES_1)
|
||||
DEFAULT_INCLUDES = -I.@am__isrc@
|
||||
depcomp = $(SHELL) $(top_srcdir)/config/depcomp
|
||||
am__depfiles_maybe = depfiles
|
||||
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
|
||||
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
|
||||
CCLD = $(CC)
|
||||
LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
|
||||
SOURCES = $(flite_hts_engine_SOURCES)
|
||||
DIST_SOURCES = $(flite_hts_engine_SOURCES)
|
||||
ETAGS = etags
|
||||
CTAGS = ctags
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
ACLOCAL = @ACLOCAL@
|
||||
AMTAR = @AMTAR@
|
||||
AR = @AR@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AWK = @AWK@
|
||||
CC = @CC@
|
||||
CCDEPMODE = @CCDEPMODE@
|
||||
CFLAGS = @CFLAGS@
|
||||
CPP = @CPP@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
CYGPATH_W = @CYGPATH_W@
|
||||
DEFS = @DEFS@
|
||||
DEPDIR = @DEPDIR@
|
||||
ECHO_C = @ECHO_C@
|
||||
ECHO_N = @ECHO_N@
|
||||
ECHO_T = @ECHO_T@
|
||||
EGREP = @EGREP@
|
||||
EXEEXT = @EXEEXT@
|
||||
GREP = @GREP@
|
||||
HTS_ENGINE_HEADER = @HTS_ENGINE_HEADER@
|
||||
HTS_ENGINE_HEADER_DIR = @HTS_ENGINE_HEADER_DIR@
|
||||
HTS_ENGINE_LIBRARY = @HTS_ENGINE_LIBRARY@
|
||||
HTS_ENGINE_LIBRARY_DIR = @HTS_ENGINE_LIBRARY_DIR@
|
||||
INSTALL = @INSTALL@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
LIBS = @LIBS@
|
||||
LTLIBOBJS = @LTLIBOBJS@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
MKDIR_P = @MKDIR_P@
|
||||
OBJEXT = @OBJEXT@
|
||||
PACKAGE = @PACKAGE@
|
||||
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||
PACKAGE_NAME = @PACKAGE_NAME@
|
||||
PACKAGE_STRING = @PACKAGE_STRING@
|
||||
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
RANLIB = @RANLIB@
|
||||
SET_MAKE = @SET_MAKE@
|
||||
SHELL = @SHELL@
|
||||
STRIP = @STRIP@
|
||||
VERSION = @VERSION@
|
||||
abs_builddir = @abs_builddir@
|
||||
abs_srcdir = @abs_srcdir@
|
||||
abs_top_builddir = @abs_top_builddir@
|
||||
abs_top_srcdir = @abs_top_srcdir@
|
||||
ac_ct_CC = @ac_ct_CC@
|
||||
am__include = @am__include@
|
||||
am__leading_dot = @am__leading_dot@
|
||||
am__quote = @am__quote@
|
||||
am__tar = @am__tar@
|
||||
am__untar = @am__untar@
|
||||
bindir = @bindir@
|
||||
build = @build@
|
||||
build_alias = @build_alias@
|
||||
build_cpu = @build_cpu@
|
||||
build_os = @build_os@
|
||||
build_vendor = @build_vendor@
|
||||
builddir = @builddir@
|
||||
datadir = @datadir@
|
||||
datarootdir = @datarootdir@
|
||||
docdir = @docdir@
|
||||
dvidir = @dvidir@
|
||||
exec_prefix = @exec_prefix@
|
||||
host = @host@
|
||||
host_alias = @host_alias@
|
||||
host_cpu = @host_cpu@
|
||||
host_os = @host_os@
|
||||
host_vendor = @host_vendor@
|
||||
htmldir = @htmldir@
|
||||
includedir = @includedir@
|
||||
infodir = @infodir@
|
||||
install_sh = @install_sh@
|
||||
libdir = @libdir@
|
||||
libexecdir = @libexecdir@
|
||||
localedir = @localedir@
|
||||
localstatedir = @localstatedir@
|
||||
mandir = @mandir@
|
||||
mkdir_p = @mkdir_p@
|
||||
oldincludedir = @oldincludedir@
|
||||
pdfdir = @pdfdir@
|
||||
prefix = @prefix@
|
||||
program_transform_name = @program_transform_name@
|
||||
psdir = @psdir@
|
||||
sbindir = @sbindir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
srcdir = @srcdir@
|
||||
sysconfdir = @sysconfdir@
|
||||
target_alias = @target_alias@
|
||||
top_build_prefix = @top_build_prefix@
|
||||
top_builddir = @top_builddir@
|
||||
top_srcdir = @top_srcdir@
|
||||
EXTRA_DIST = Makefile.mak
|
||||
INCLUDES = -I$(top_srcdir)/include \
|
||||
-I$(top_srcdir)/flite/include \
|
||||
-I$(top_srcdir)/flite/lang/cmu_us_kal \
|
||||
-I$(top_srcdir)/flite/lang/cmulex \
|
||||
-I$(top_srcdir)/flite/lang/usenglish \
|
||||
-I$(HTS_ENGINE_HEADER_DIR)
|
||||
|
||||
flite_hts_engine_SOURCES = flite_hts_engine.c
|
||||
flite_hts_engine_LDADD = $(top_srcdir)/lib/libflhtse.a $(HTS_ENGINE_LIBRARY)
|
||||
DISTCLEANFILES = *.log *.out *~
|
||||
all: all-am
|
||||
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .c .o .obj
|
||||
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
|
||||
@for dep in $?; do \
|
||||
case '$(am__configure_deps)' in \
|
||||
*$$dep*) \
|
||||
( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
|
||||
&& { if test -f $@; then exit 0; else break; fi; }; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
done; \
|
||||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu bin/Makefile'; \
|
||||
cd $(top_srcdir) && \
|
||||
$(AUTOMAKE) --gnu bin/Makefile
|
||||
.PRECIOUS: Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
@case '$?' in \
|
||||
*config.status*) \
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
|
||||
*) \
|
||||
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
|
||||
esac;
|
||||
|
||||
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
|
||||
$(top_srcdir)/configure: $(am__configure_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
install-binPROGRAMS: $(bin_PROGRAMS)
|
||||
@$(NORMAL_INSTALL)
|
||||
test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)"
|
||||
@list='$(bin_PROGRAMS)'; for p in $$list; do \
|
||||
p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
|
||||
if test -f $$p \
|
||||
; then \
|
||||
f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \
|
||||
echo " $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \
|
||||
$(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \
|
||||
else :; fi; \
|
||||
done
|
||||
|
||||
uninstall-binPROGRAMS:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
@list='$(bin_PROGRAMS)'; for p in $$list; do \
|
||||
f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \
|
||||
echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \
|
||||
rm -f "$(DESTDIR)$(bindir)/$$f"; \
|
||||
done
|
||||
|
||||
clean-binPROGRAMS:
|
||||
-test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS)
|
||||
flite_hts_engine$(EXEEXT): $(flite_hts_engine_OBJECTS) $(flite_hts_engine_DEPENDENCIES)
|
||||
@rm -f flite_hts_engine$(EXEEXT)
|
||||
$(LINK) $(flite_hts_engine_OBJECTS) $(flite_hts_engine_LDADD) $(LIBS)
|
||||
|
||||
mostlyclean-compile:
|
||||
-rm -f *.$(OBJEXT)
|
||||
|
||||
distclean-compile:
|
||||
-rm -f *.tab.c
|
||||
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/flite_hts_engine.Po@am__quote@
|
||||
|
||||
.c.o:
|
||||
@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
|
||||
@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(COMPILE) -c $<
|
||||
|
||||
.c.obj:
|
||||
@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
|
||||
@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
|
||||
|
||||
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
|
||||
END { if (nonempty) { for (i in files) print i; }; }'`; \
|
||||
mkid -fID $$unique
|
||||
tags: TAGS
|
||||
|
||||
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
tags=; \
|
||||
here=`pwd`; \
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
|
||||
END { if (nonempty) { for (i in files) print i; }; }'`; \
|
||||
if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
|
||||
test -n "$$unique" || unique=$$empty_fix; \
|
||||
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||
$$tags $$unique; \
|
||||
fi
|
||||
ctags: CTAGS
|
||||
CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
tags=; \
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
|
||||
END { if (nonempty) { for (i in files) print i; }; }'`; \
|
||||
test -z "$(CTAGS_ARGS)$$tags$$unique" \
|
||||
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
|
||||
$$tags $$unique
|
||||
|
||||
GTAGS:
|
||||
here=`$(am__cd) $(top_builddir) && pwd` \
|
||||
&& cd $(top_srcdir) \
|
||||
&& gtags -i $(GTAGS_ARGS) $$here
|
||||
|
||||
distclean-tags:
|
||||
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||
list='$(DISTFILES)'; \
|
||||
dist_files=`for file in $$list; do echo $$file; done | \
|
||||
sed -e "s|^$$srcdirstrip/||;t" \
|
||||
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
|
||||
case $$dist_files in \
|
||||
*/*) $(MKDIR_P) `echo "$$dist_files" | \
|
||||
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
|
||||
sort -u` ;; \
|
||||
esac; \
|
||||
for file in $$dist_files; do \
|
||||
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
||||
if test -d $$d/$$file; then \
|
||||
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
||||
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
|
||||
fi; \
|
||||
cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
|
||||
else \
|
||||
test -f $(distdir)/$$file \
|
||||
|| cp -p $$d/$$file $(distdir)/$$file \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
check-am: all-am
|
||||
check: check-am
|
||||
all-am: Makefile $(PROGRAMS)
|
||||
installdirs:
|
||||
for dir in "$(DESTDIR)$(bindir)"; do \
|
||||
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
|
||||
done
|
||||
install: install-am
|
||||
install-exec: install-exec-am
|
||||
install-data: install-data-am
|
||||
uninstall: uninstall-am
|
||||
|
||||
install-am: all-am
|
||||
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||
|
||||
installcheck: installcheck-am
|
||||
install-strip:
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
`test -z '$(STRIP)' || \
|
||||
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
|
||||
mostlyclean-generic:
|
||||
|
||||
clean-generic:
|
||||
|
||||
distclean-generic:
|
||||
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
||||
-test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
|
||||
|
||||
maintainer-clean-generic:
|
||||
@echo "This command is intended for maintainers to use"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
clean: clean-am
|
||||
|
||||
clean-am: clean-binPROGRAMS clean-generic mostlyclean-am
|
||||
|
||||
distclean: distclean-am
|
||||
-rm -rf ./$(DEPDIR)
|
||||
-rm -f Makefile
|
||||
distclean-am: clean-am distclean-compile distclean-generic \
|
||||
distclean-tags
|
||||
|
||||
dvi: dvi-am
|
||||
|
||||
dvi-am:
|
||||
|
||||
html: html-am
|
||||
|
||||
info: info-am
|
||||
|
||||
info-am:
|
||||
|
||||
install-data-am:
|
||||
|
||||
install-dvi: install-dvi-am
|
||||
|
||||
install-exec-am: install-binPROGRAMS
|
||||
|
||||
install-html: install-html-am
|
||||
|
||||
install-info: install-info-am
|
||||
|
||||
install-man:
|
||||
|
||||
install-pdf: install-pdf-am
|
||||
|
||||
install-ps: install-ps-am
|
||||
|
||||
installcheck-am:
|
||||
|
||||
maintainer-clean: maintainer-clean-am
|
||||
-rm -rf ./$(DEPDIR)
|
||||
-rm -f Makefile
|
||||
maintainer-clean-am: distclean-am maintainer-clean-generic
|
||||
|
||||
mostlyclean: mostlyclean-am
|
||||
|
||||
mostlyclean-am: mostlyclean-compile mostlyclean-generic
|
||||
|
||||
pdf: pdf-am
|
||||
|
||||
pdf-am:
|
||||
|
||||
ps: ps-am
|
||||
|
||||
ps-am:
|
||||
|
||||
uninstall-am: uninstall-binPROGRAMS
|
||||
|
||||
.MAKE: install-am install-strip
|
||||
|
||||
.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \
|
||||
clean-generic ctags distclean distclean-compile \
|
||||
distclean-generic distclean-tags distdir dvi dvi-am html \
|
||||
html-am info info-am install install-am install-binPROGRAMS \
|
||||
install-data install-data-am install-dvi install-dvi-am \
|
||||
install-exec install-exec-am install-html install-html-am \
|
||||
install-info install-info-am install-man install-pdf \
|
||||
install-pdf-am install-ps install-ps-am install-strip \
|
||||
installcheck installcheck-am installdirs maintainer-clean \
|
||||
maintainer-clean-generic mostlyclean mostlyclean-compile \
|
||||
mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \
|
||||
uninstall-am uninstall-binPROGRAMS
|
||||
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
21
3rdparty/flite_hts_engine/bin/Makefile.mak
vendored
Normal file
21
3rdparty/flite_hts_engine/bin/Makefile.mak
vendored
Normal file
|
@ -0,0 +1,21 @@
|
|||
|
||||
CC = cl
|
||||
CL = link
|
||||
|
||||
CFLAGS = /I C:\hts_engine_API\include /I ..\include /I ..\flite\include \
|
||||
/I ..\flite\lang\cmu_us_kal /I ..\flite\lang\cmulex /I ..\flite\lang\usenglish \
|
||||
/D "FLITE_PLUS_HTS_ENGINE" /D "NO_UNION_INITIALIZATION" \
|
||||
/O2 /Ob2 /Oi /Ot /Oy /GT /TC /GL
|
||||
LFLAGS = /LTCG
|
||||
|
||||
LIBS = C:\hts_engine_API\lib\hts_engine_API.lib ..\lib\flite_hts_engine.lib winmm.lib
|
||||
|
||||
all: flite_hts_engine.exe
|
||||
|
||||
flite_hts_engine.exe : flite_hts_engine.obj
|
||||
$(CC) $(CFLAGS) /c $(@B).c
|
||||
$(CL) $(LFLAGS) /OUT:$@ $(LIBS) $(@B).obj
|
||||
|
||||
clean:
|
||||
del *.exe
|
||||
del *.obj
|
BIN
3rdparty/flite_hts_engine/bin/flite_hts_engine
vendored
Executable file
BIN
3rdparty/flite_hts_engine/bin/flite_hts_engine
vendored
Executable file
Binary file not shown.
220
3rdparty/flite_hts_engine/bin/flite_hts_engine.c
vendored
Normal file
220
3rdparty/flite_hts_engine/bin/flite_hts_engine.c
vendored
Normal file
|
@ -0,0 +1,220 @@
|
|||
/* ----------------------------------------------------------------- */
|
||||
/* The English TTS System "Flite+hts_engine" */
|
||||
/* developed by HTS Working Group */
|
||||
/* http://hts-engine.sourceforge.net/ */
|
||||
/* ----------------------------------------------------------------- */
|
||||
/* */
|
||||
/* Copyright (c) 2005-2013 Nagoya Institute of Technology */
|
||||
/* Department of Computer Science */
|
||||
/* */
|
||||
/* 2005-2008 Tokyo Institute of Technology */
|
||||
/* Interdisciplinary Graduate School of */
|
||||
/* Science and Engineering */
|
||||
/* */
|
||||
/* All rights reserved. */
|
||||
/* */
|
||||
/* Redistribution and use in source and binary forms, with or */
|
||||
/* without modification, are permitted provided that the following */
|
||||
/* conditions are met: */
|
||||
/* */
|
||||
/* - Redistributions of source code must retain the above copyright */
|
||||
/* notice, this list of conditions and the following disclaimer. */
|
||||
/* - 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. */
|
||||
/* - Neither the name of the HTS working group 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 COPYRIGHT HOLDERS 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 COPYRIGHT OWNER 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. */
|
||||
/* ----------------------------------------------------------------- */
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <stdarg.h>
|
||||
|
||||
#include "flite_hts_engine.h"
|
||||
|
||||
#define INPUT_BUFF_SIZE 1024
|
||||
|
||||
/* usage: output usage */
|
||||
static void usage(void)
|
||||
{
|
||||
fprintf(stderr, "The English TTS System \"Flite+hts_engine\"\n");
|
||||
fprintf(stderr, "Version 1.05 (http://hts-engine.sourceforge.net/)\n");
|
||||
fprintf(stderr, "Copyright (C) 2005-2013 Nagoya Institute of Technology\n");
|
||||
fprintf(stderr, " 2005-2008 Tokyo Institute of Technology\n");
|
||||
fprintf(stderr, "All rights reserved.\n");
|
||||
fprintf(stderr, "\n%s\n", HTS_COPYRIGHT);
|
||||
fprintf(stderr, "CMU Flite\n");
|
||||
fprintf(stderr, "Version 1.4 (http://www.speech.cs.cmu.edu/flite/)\n");
|
||||
fprintf(stderr, "Copyright (C) 1999-2009 Carnegie Mellon University\n");
|
||||
fprintf(stderr, "All rights reserved.\n");
|
||||
fprintf(stderr, "\n");
|
||||
fprintf(stderr, "flite_hts_engine - The English TTS system \"Flite+hts_engine\"\n");
|
||||
fprintf(stderr, "\n");
|
||||
fprintf(stderr, " usage:\n");
|
||||
fprintf(stderr, " flite_hts_engine [ options ] [ infile ] \n");
|
||||
fprintf(stderr, " options: [ def][ min-- max]\n");
|
||||
fprintf(stderr, " -m htsvoice : HTS voice [ N/A]\n");
|
||||
fprintf(stderr, " -o wav : filename of output wav audio (generated speech) [ N/A]\n");
|
||||
fprintf(stderr, " -s i : sampling frequency [ auto][ 1-- ]\n");
|
||||
fprintf(stderr, " -p i : frame period (point) [ auto][ 1-- ]\n");
|
||||
fprintf(stderr, " -a f : all-pass constant [ auto][ 0.0-- 1.0]\n");
|
||||
fprintf(stderr, " -b f : postfiltering coefficient [ 0.0][ 0.0-- 1.0]\n");
|
||||
fprintf(stderr, " -r f : speech speed rate [ 1.0][ 0.0-- ]\n");
|
||||
fprintf(stderr, " -fm : additional half-tone [ 0.0][ -- ]\n");
|
||||
fprintf(stderr, " -u f : voiced/unvoiced threshold [ 0.5][ 0.0-- 1.0]\n");
|
||||
fprintf(stderr, " -jm f : weight of GV for spectrum [ 1.0][ 0.0-- ]\n");
|
||||
fprintf(stderr, " -jf f : weight of GV for Log F0 [ 1.0][ 0.0-- ]\n");
|
||||
fprintf(stderr, " -z i : audio buffer size (if i==0, turn off) [ 0][ 0-- ]\n");
|
||||
fprintf(stderr, " infile:\n");
|
||||
fprintf(stderr, " text file [stdin]\n");
|
||||
fprintf(stderr, "\n");
|
||||
|
||||
exit(0);
|
||||
}
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
size_t i;
|
||||
char buff[INPUT_BUFF_SIZE];
|
||||
FILE *fp_txt = stdin;
|
||||
char *fn_txt = NULL;
|
||||
char *fn_wav = NULL;
|
||||
char *fn_voice = NULL;
|
||||
|
||||
/* Flite+hts_engine */
|
||||
Flite_HTS_Engine engine;
|
||||
|
||||
/* parse command line */
|
||||
if (argc == 1)
|
||||
usage();
|
||||
|
||||
/* initialize engine */
|
||||
Flite_HTS_Engine_initialize(&engine);
|
||||
|
||||
/* get HTS voice file name */
|
||||
for (i = 0; i < argc; i++) {
|
||||
if (argv[i][0] == '-' && argv[i][1] == 'm')
|
||||
fn_voice = argv[++i];
|
||||
if (argv[i][0] == '-' && argv[i][1] == 'h')
|
||||
usage();
|
||||
}
|
||||
if (fn_voice == NULL) {
|
||||
fprintf(stderr, "flite_hts_engine: HTS voice must be specified.\n");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
/* load HTS voice */
|
||||
if (Flite_HTS_Engine_load(&engine, fn_voice) != TRUE) {
|
||||
fprintf(stderr, "flite_hts_engine: HTS voice cannot be loaded.\n");
|
||||
Flite_HTS_Engine_clear(&engine);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
/* read command */
|
||||
while (--argc) {
|
||||
if (**++argv == '-') {
|
||||
switch (*(*argv + 1)) {
|
||||
case 'm': /* HTS voice was already loaded */
|
||||
++argv;
|
||||
--argc;
|
||||
break;
|
||||
case 'o':
|
||||
fn_wav = *++argv;
|
||||
--argc;
|
||||
break;
|
||||
case 'h':
|
||||
usage();
|
||||
break;
|
||||
case 's':
|
||||
Flite_HTS_Engine_set_sampling_frequency(&engine, (size_t) atoi(*++argv));
|
||||
--argc;
|
||||
break;
|
||||
case 'p':
|
||||
Flite_HTS_Engine_set_fperiod(&engine, (size_t) atoi(*++argv));
|
||||
--argc;
|
||||
break;
|
||||
case 'a':
|
||||
Flite_HTS_Engine_set_alpha(&engine, atof(*++argv));
|
||||
--argc;
|
||||
break;
|
||||
case 'b':
|
||||
Flite_HTS_Engine_set_beta(&engine, atof(*++argv));
|
||||
--argc;
|
||||
break;
|
||||
case 'r':
|
||||
Flite_HTS_Engine_set_speed(&engine, atof(*++argv));
|
||||
--argc;
|
||||
break;
|
||||
case 'f':
|
||||
switch (*(*argv + 2)) {
|
||||
case 'm':
|
||||
Flite_HTS_Engine_add_half_tone(&engine, atof(*++argv));
|
||||
break;
|
||||
default:
|
||||
fprintf(stderr, "flite_hts_engine: Invalid option '-f%c'.\n", *(*argv + 2));
|
||||
exit(1);
|
||||
}
|
||||
--argc;
|
||||
break;
|
||||
case 'u':
|
||||
Flite_HTS_Engine_set_msd_threshold(&engine, 1, atof(*++argv));
|
||||
--argc;
|
||||
break;
|
||||
case 'j':
|
||||
switch (*(*argv + 2)) {
|
||||
case 'm':
|
||||
Flite_HTS_Engine_set_gv_weight(&engine, 0, atof(*++argv));
|
||||
break;
|
||||
case 'f':
|
||||
case 'p':
|
||||
Flite_HTS_Engine_set_gv_weight(&engine, 1, atof(*++argv));
|
||||
break;
|
||||
default:
|
||||
fprintf(stderr, "flite_hts_engine: Invalid option '-j%c'.\n", *(*argv + 2));
|
||||
exit(1);
|
||||
}
|
||||
--argc;
|
||||
break;
|
||||
case 'z':
|
||||
Flite_HTS_Engine_set_audio_buff_size(&engine, atoi(*++argv));
|
||||
--argc;
|
||||
break;
|
||||
default:
|
||||
fprintf(stderr, "flite_hts_engine: Invalid option '-%c'.\n", *(*argv + 1));
|
||||
exit(1);
|
||||
}
|
||||
} else {
|
||||
fn_txt = *argv;
|
||||
}
|
||||
}
|
||||
|
||||
/* synthesis */
|
||||
if (fn_txt != NULL)
|
||||
fp_txt = fopen(fn_txt, "r");
|
||||
if (fgets(buff, INPUT_BUFF_SIZE, fp_txt) != NULL && strlen(buff) > 0)
|
||||
Flite_HTS_Engine_synthesize(&engine, buff, fn_wav);
|
||||
if (fn_txt != NULL)
|
||||
fclose(fp_txt);
|
||||
|
||||
/* free */
|
||||
Flite_HTS_Engine_clear(&engine);
|
||||
|
||||
return 0;
|
||||
}
|
719
3rdparty/flite_hts_engine/config.log
vendored
Normal file
719
3rdparty/flite_hts_engine/config.log
vendored
Normal file
|
@ -0,0 +1,719 @@
|
|||
This file contains any messages produced by compilers while
|
||||
running configure, to aid debugging if configure makes a mistake.
|
||||
|
||||
It was created by flite+hts_engine configure 1.05, which was
|
||||
generated by GNU Autoconf 2.63. Invocation command line was
|
||||
|
||||
$ ./configure --prefix=/Users/jmt/FGFS/Festival/dist --with-hts-engine-header-path=/Users/jmt/FGFS/Festival/dist/include --with-hts-engine-library-path=/Users/jmt/FGFS/Festival/dist/lib
|
||||
|
||||
## --------- ##
|
||||
## Platform. ##
|
||||
## --------- ##
|
||||
|
||||
hostname = Bishop.local
|
||||
uname -m = x86_64
|
||||
uname -r = 13.1.0
|
||||
uname -s = Darwin
|
||||
uname -v = Darwin Kernel Version 13.1.0: Thu Jan 16 19:40:37 PST 2014; root:xnu-2422.90.20~2/RELEASE_X86_64
|
||||
|
||||
/usr/bin/uname -p = i386
|
||||
/bin/uname -X = unknown
|
||||
|
||||
/bin/arch = unknown
|
||||
/usr/bin/arch -k = unknown
|
||||
/usr/convex/getsysinfo = unknown
|
||||
/usr/bin/hostinfo = Mach kernel version:
|
||||
Darwin Kernel Version 13.1.0: Thu Jan 16 19:40:37 PST 2014; root:xnu-2422.90.20~2/RELEASE_X86_64
|
||||
Kernel configured for up to 8 processors.
|
||||
4 processors are physically available.
|
||||
8 processors are logically available.
|
||||
Processor type: i486 (Intel 80486)
|
||||
Processors active: 0 1 2 3 4 5 6 7
|
||||
Primary memory available: 16.00 gigabytes
|
||||
Default processor set: 222 tasks, 907 threads, 8 processors
|
||||
Load average: 2.75, Mach factor: 5.24
|
||||
/bin/machine = unknown
|
||||
/usr/bin/oslevel = unknown
|
||||
/bin/universe = unknown
|
||||
|
||||
PATH: /usr/bin
|
||||
PATH: /bin
|
||||
PATH: /usr/sbin
|
||||
PATH: /sbin
|
||||
PATH: /usr/local/bin
|
||||
PATH: /opt/X11/bin
|
||||
|
||||
|
||||
## ----------- ##
|
||||
## Core tests. ##
|
||||
## ----------- ##
|
||||
|
||||
configure:1921: checking for a BSD-compatible install
|
||||
configure:1989: result: /usr/bin/install -c
|
||||
configure:2000: checking whether build environment is sane
|
||||
configure:2043: result: yes
|
||||
configure:2068: checking for a thread-safe mkdir -p
|
||||
configure:2107: result: config/install-sh -c -d
|
||||
configure:2120: checking for gawk
|
||||
configure:2150: result: no
|
||||
configure:2120: checking for mawk
|
||||
configure:2150: result: no
|
||||
configure:2120: checking for nawk
|
||||
configure:2150: result: no
|
||||
configure:2120: checking for awk
|
||||
configure:2136: found /usr/bin/awk
|
||||
configure:2147: result: awk
|
||||
configure:2158: checking whether make sets $(MAKE)
|
||||
configure:2180: result: yes
|
||||
configure:2405: checking for gcc
|
||||
configure:2421: found /usr/bin/gcc
|
||||
configure:2432: result: gcc
|
||||
configure:2664: checking for C compiler version
|
||||
configure:2672: gcc --version >&5
|
||||
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
|
||||
Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
|
||||
Target: x86_64-apple-darwin13.1.0
|
||||
Thread model: posix
|
||||
configure:2676: $? = 0
|
||||
configure:2683: gcc -v >&5
|
||||
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
|
||||
Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
|
||||
Target: x86_64-apple-darwin13.1.0
|
||||
Thread model: posix
|
||||
configure:2687: $? = 0
|
||||
configure:2694: gcc -V >&5
|
||||
clang: error: argument to '-V' is missing (expected 1 value)
|
||||
clang: error: no input files
|
||||
configure:2698: $? = 1
|
||||
configure:2721: checking for C compiler default output file name
|
||||
configure:2743: gcc conftest.c >&5
|
||||
configure:2747: $? = 0
|
||||
configure:2785: result: a.out
|
||||
configure:2804: checking whether the C compiler works
|
||||
configure:2814: ./a.out
|
||||
configure:2818: $? = 0
|
||||
configure:2837: result: yes
|
||||
configure:2844: checking whether we are cross compiling
|
||||
configure:2846: result: no
|
||||
configure:2849: checking for suffix of executables
|
||||
configure:2856: gcc -o conftest conftest.c >&5
|
||||
configure:2860: $? = 0
|
||||
configure:2886: result:
|
||||
configure:2892: checking for suffix of object files
|
||||
configure:2918: gcc -c conftest.c >&5
|
||||
configure:2922: $? = 0
|
||||
configure:2947: result: o
|
||||
configure:2951: checking whether we are using the GNU C compiler
|
||||
configure:2980: gcc -c conftest.c >&5
|
||||
configure:2987: $? = 0
|
||||
configure:3004: result: yes
|
||||
configure:3013: checking whether gcc accepts -g
|
||||
configure:3043: gcc -c -g conftest.c >&5
|
||||
configure:3050: $? = 0
|
||||
configure:3151: result: yes
|
||||
configure:3168: checking for gcc option to accept ISO C89
|
||||
configure:3242: gcc -c -g -O2 conftest.c >&5
|
||||
configure:3249: $? = 0
|
||||
configure:3272: result: none needed
|
||||
configure:3301: checking for style of include used by make
|
||||
configure:3329: result: GNU
|
||||
configure:3354: checking dependency style of gcc
|
||||
configure:3445: result: gcc3
|
||||
configure:3461: checking whether gcc and cc understand -c and -o together
|
||||
configure:3496: gcc -c conftest.c -o conftest2.o >&5
|
||||
configure:3500: $? = 0
|
||||
configure:3506: gcc -c conftest.c -o conftest2.o >&5
|
||||
configure:3510: $? = 0
|
||||
configure:3521: cc -c conftest.c >&5
|
||||
configure:3525: $? = 0
|
||||
configure:3533: cc -c conftest.c -o conftest2.o >&5
|
||||
configure:3537: $? = 0
|
||||
configure:3543: cc -c conftest.c -o conftest2.o >&5
|
||||
configure:3547: $? = 0
|
||||
configure:3565: result: yes
|
||||
configure:3606: checking for a BSD-compatible install
|
||||
configure:3674: result: /usr/bin/install -c
|
||||
configure:3728: checking for ranlib
|
||||
configure:3744: found /usr/bin/ranlib
|
||||
configure:3755: result: ranlib
|
||||
configure:3823: checking for ar
|
||||
configure:3839: found /usr/bin/ar
|
||||
configure:3850: result: ar
|
||||
configure:3877: checking for log in -lm
|
||||
configure:3912: gcc -o conftest -g -O2 conftest.c -lm >&5
|
||||
conftest.c:15:6: warning: incompatible redeclaration of library function 'log' [-Wincompatible-library-redeclaration]
|
||||
char log ();
|
||||
^
|
||||
conftest.c:15:6: note: 'log' is a builtin with type 'double (double)'
|
||||
1 warning generated.
|
||||
configure:3919: $? = 0
|
||||
configure:3940: result: yes
|
||||
configure:3959: checking how to run the C preprocessor
|
||||
configure:3999: gcc -E conftest.c
|
||||
configure:4006: $? = 0
|
||||
configure:4037: gcc -E conftest.c
|
||||
conftest.c:9:10: fatal error: 'ac_nonexistent.h' file not found
|
||||
#include <ac_nonexistent.h>
|
||||
^
|
||||
1 error generated.
|
||||
configure:4044: $? = 1
|
||||
configure: failed program was:
|
||||
| /* confdefs.h. */
|
||||
| #define PACKAGE_NAME "flite+hts_engine"
|
||||
| #define PACKAGE_TARNAME "flite-hts_engine"
|
||||
| #define PACKAGE_VERSION "1.05"
|
||||
| #define PACKAGE_STRING "flite+hts_engine 1.05"
|
||||
| #define PACKAGE_BUGREPORT "hts-engine-users@lists.sourceforge.net"
|
||||
| #define HAVE_LIBM 1
|
||||
| /* end confdefs.h. */
|
||||
| #include <ac_nonexistent.h>
|
||||
configure:4077: result: gcc -E
|
||||
configure:4106: gcc -E conftest.c
|
||||
configure:4113: $? = 0
|
||||
configure:4144: gcc -E conftest.c
|
||||
conftest.c:9:10: fatal error: 'ac_nonexistent.h' file not found
|
||||
#include <ac_nonexistent.h>
|
||||
^
|
||||
1 error generated.
|
||||
configure:4151: $? = 1
|
||||
configure: failed program was:
|
||||
| /* confdefs.h. */
|
||||
| #define PACKAGE_NAME "flite+hts_engine"
|
||||
| #define PACKAGE_TARNAME "flite-hts_engine"
|
||||
| #define PACKAGE_VERSION "1.05"
|
||||
| #define PACKAGE_STRING "flite+hts_engine 1.05"
|
||||
| #define PACKAGE_BUGREPORT "hts-engine-users@lists.sourceforge.net"
|
||||
| #define HAVE_LIBM 1
|
||||
| /* end confdefs.h. */
|
||||
| #include <ac_nonexistent.h>
|
||||
configure:4191: checking for grep that handles long lines and -e
|
||||
configure:4251: result: /usr/bin/grep
|
||||
configure:4256: checking for egrep
|
||||
configure:4320: result: /usr/bin/grep -E
|
||||
configure:4325: checking for ANSI C header files
|
||||
configure:4355: gcc -c -g -O2 conftest.c >&5
|
||||
configure:4362: $? = 0
|
||||
configure:4461: gcc -o conftest -g -O2 conftest.c -lm >&5
|
||||
configure:4465: $? = 0
|
||||
configure:4471: ./conftest
|
||||
configure:4475: $? = 0
|
||||
configure:4493: result: yes
|
||||
configure:4517: checking for sys/types.h
|
||||
configure:4538: gcc -c -g -O2 conftest.c >&5
|
||||
configure:4545: $? = 0
|
||||
configure:4562: result: yes
|
||||
configure:4517: checking for sys/stat.h
|
||||
configure:4538: gcc -c -g -O2 conftest.c >&5
|
||||
configure:4545: $? = 0
|
||||
configure:4562: result: yes
|
||||
configure:4517: checking for stdlib.h
|
||||
configure:4538: gcc -c -g -O2 conftest.c >&5
|
||||
configure:4545: $? = 0
|
||||
configure:4562: result: yes
|
||||
configure:4517: checking for string.h
|
||||
configure:4538: gcc -c -g -O2 conftest.c >&5
|
||||
configure:4545: $? = 0
|
||||
configure:4562: result: yes
|
||||
configure:4517: checking for memory.h
|
||||
configure:4538: gcc -c -g -O2 conftest.c >&5
|
||||
configure:4545: $? = 0
|
||||
configure:4562: result: yes
|
||||
configure:4517: checking for strings.h
|
||||
configure:4538: gcc -c -g -O2 conftest.c >&5
|
||||
configure:4545: $? = 0
|
||||
configure:4562: result: yes
|
||||
configure:4517: checking for inttypes.h
|
||||
configure:4538: gcc -c -g -O2 conftest.c >&5
|
||||
configure:4545: $? = 0
|
||||
configure:4562: result: yes
|
||||
configure:4517: checking for stdint.h
|
||||
configure:4538: gcc -c -g -O2 conftest.c >&5
|
||||
configure:4545: $? = 0
|
||||
configure:4562: result: yes
|
||||
configure:4517: checking for unistd.h
|
||||
configure:4538: gcc -c -g -O2 conftest.c >&5
|
||||
configure:4545: $? = 0
|
||||
configure:4562: result: yes
|
||||
configure:4582: checking for stdlib.h
|
||||
configure:4589: result: yes
|
||||
configure:4582: checking for string.h
|
||||
configure:4589: result: yes
|
||||
configure:4730: checking for an ANSI C-conforming const
|
||||
configure:4805: gcc -c -g -O2 conftest.c >&5
|
||||
configure:4812: $? = 0
|
||||
configure:4827: result: yes
|
||||
configure:4837: checking for size_t
|
||||
configure:4865: gcc -c -g -O2 conftest.c >&5
|
||||
configure:4872: $? = 0
|
||||
configure:4899: gcc -c -g -O2 conftest.c >&5
|
||||
conftest.c:57:21: error: expected expression
|
||||
if (sizeof ((size_t)))
|
||||
^
|
||||
1 error generated.
|
||||
configure:4906: $? = 1
|
||||
configure: failed program was:
|
||||
| /* confdefs.h. */
|
||||
| #define PACKAGE_NAME "flite+hts_engine"
|
||||
| #define PACKAGE_TARNAME "flite-hts_engine"
|
||||
| #define PACKAGE_VERSION "1.05"
|
||||
| #define PACKAGE_STRING "flite+hts_engine 1.05"
|
||||
| #define PACKAGE_BUGREPORT "hts-engine-users@lists.sourceforge.net"
|
||||
| #define HAVE_LIBM 1
|
||||
| #define STDC_HEADERS 1
|
||||
| #define HAVE_SYS_TYPES_H 1
|
||||
| #define HAVE_SYS_STAT_H 1
|
||||
| #define HAVE_STDLIB_H 1
|
||||
| #define HAVE_STRING_H 1
|
||||
| #define HAVE_MEMORY_H 1
|
||||
| #define HAVE_STRINGS_H 1
|
||||
| #define HAVE_INTTYPES_H 1
|
||||
| #define HAVE_STDINT_H 1
|
||||
| #define HAVE_UNISTD_H 1
|
||||
| #define HAVE_STDLIB_H 1
|
||||
| #define HAVE_STRING_H 1
|
||||
| /* end confdefs.h. */
|
||||
| #include <stdio.h>
|
||||
| #ifdef HAVE_SYS_TYPES_H
|
||||
| # include <sys/types.h>
|
||||
| #endif
|
||||
| #ifdef HAVE_SYS_STAT_H
|
||||
| # include <sys/stat.h>
|
||||
| #endif
|
||||
| #ifdef STDC_HEADERS
|
||||
| # include <stdlib.h>
|
||||
| # include <stddef.h>
|
||||
| #else
|
||||
| # ifdef HAVE_STDLIB_H
|
||||
| # include <stdlib.h>
|
||||
| # endif
|
||||
| #endif
|
||||
| #ifdef HAVE_STRING_H
|
||||
| # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
|
||||
| # include <memory.h>
|
||||
| # endif
|
||||
| # include <string.h>
|
||||
| #endif
|
||||
| #ifdef HAVE_STRINGS_H
|
||||
| # include <strings.h>
|
||||
| #endif
|
||||
| #ifdef HAVE_INTTYPES_H
|
||||
| # include <inttypes.h>
|
||||
| #endif
|
||||
| #ifdef HAVE_STDINT_H
|
||||
| # include <stdint.h>
|
||||
| #endif
|
||||
| #ifdef HAVE_UNISTD_H
|
||||
| # include <unistd.h>
|
||||
| #endif
|
||||
| int
|
||||
| main ()
|
||||
| {
|
||||
| if (sizeof ((size_t)))
|
||||
| return 0;
|
||||
| ;
|
||||
| return 0;
|
||||
| }
|
||||
configure:4929: result: yes
|
||||
configure:4947: checking for vprintf
|
||||
configure:5003: gcc -o conftest -g -O2 conftest.c -lm >&5
|
||||
conftest.c:44:6: warning: incompatible redeclaration of library function 'vprintf' [-Wincompatible-library-redeclaration]
|
||||
char vprintf ();
|
||||
^
|
||||
conftest.c:44:6: note: 'vprintf' is a builtin with type 'int (const char *, __va_list_tag *)'
|
||||
1 warning generated.
|
||||
configure:5010: $? = 0
|
||||
configure:5032: result: yes
|
||||
configure:5041: checking for _doprnt
|
||||
configure:5097: gcc -o conftest -g -O2 conftest.c -lm >&5
|
||||
Undefined symbols for architecture x86_64:
|
||||
"__doprnt", referenced from:
|
||||
_main in conftest-jpGB0q.o
|
||||
ld: symbol(s) not found for architecture x86_64
|
||||
clang: error: linker command failed with exit code 1 (use -v to see invocation)
|
||||
configure:5104: $? = 1
|
||||
configure: failed program was:
|
||||
| /* confdefs.h. */
|
||||
| #define PACKAGE_NAME "flite+hts_engine"
|
||||
| #define PACKAGE_TARNAME "flite-hts_engine"
|
||||
| #define PACKAGE_VERSION "1.05"
|
||||
| #define PACKAGE_STRING "flite+hts_engine 1.05"
|
||||
| #define PACKAGE_BUGREPORT "hts-engine-users@lists.sourceforge.net"
|
||||
| #define HAVE_LIBM 1
|
||||
| #define STDC_HEADERS 1
|
||||
| #define HAVE_SYS_TYPES_H 1
|
||||
| #define HAVE_SYS_STAT_H 1
|
||||
| #define HAVE_STDLIB_H 1
|
||||
| #define HAVE_STRING_H 1
|
||||
| #define HAVE_MEMORY_H 1
|
||||
| #define HAVE_STRINGS_H 1
|
||||
| #define HAVE_INTTYPES_H 1
|
||||
| #define HAVE_STDINT_H 1
|
||||
| #define HAVE_UNISTD_H 1
|
||||
| #define HAVE_STDLIB_H 1
|
||||
| #define HAVE_STRING_H 1
|
||||
| #define HAVE_VPRINTF 1
|
||||
| /* end confdefs.h. */
|
||||
| /* Define _doprnt to an innocuous variant, in case <limits.h> declares _doprnt.
|
||||
| For example, HP-UX 11i <limits.h> declares gettimeofday. */
|
||||
| #define _doprnt innocuous__doprnt
|
||||
|
|
||||
| /* System header to define __stub macros and hopefully few prototypes,
|
||||
| which can conflict with char _doprnt (); below.
|
||||
| Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
|
||||
| <limits.h> exists even on freestanding compilers. */
|
||||
|
|
||||
| #ifdef __STDC__
|
||||
| # include <limits.h>
|
||||
| #else
|
||||
| # include <assert.h>
|
||||
| #endif
|
||||
|
|
||||
| #undef _doprnt
|
||||
|
|
||||
| /* Override any GCC internal prototype to avoid an error.
|
||||
| Use char because int might match the return type of a GCC
|
||||
| builtin and then its argument prototype would still apply. */
|
||||
| #ifdef __cplusplus
|
||||
| extern "C"
|
||||
| #endif
|
||||
| char _doprnt ();
|
||||
| /* The GNU C library defines this for functions which it implements
|
||||
| to always fail with ENOSYS. Some functions are actually named
|
||||
| something starting with __ and the normal name is an alias. */
|
||||
| #if defined __stub__doprnt || defined __stub____doprnt
|
||||
| choke me
|
||||
| #endif
|
||||
|
|
||||
| int
|
||||
| main ()
|
||||
| {
|
||||
| return _doprnt ();
|
||||
| ;
|
||||
| return 0;
|
||||
| }
|
||||
configure:5124: result: no
|
||||
configure:5145: checking for sqrt
|
||||
configure:5201: gcc -o conftest -g -O2 conftest.c -lm >&5
|
||||
conftest.c:45:6: warning: incompatible redeclaration of library function 'sqrt' [-Wincompatible-library-redeclaration]
|
||||
char sqrt ();
|
||||
^
|
||||
conftest.c:45:6: note: 'sqrt' is a builtin with type 'double (double)'
|
||||
1 warning generated.
|
||||
configure:5208: $? = 0
|
||||
configure:5230: result: yes
|
||||
configure:5145: checking for strchr
|
||||
configure:5201: gcc -o conftest -g -O2 conftest.c -lm >&5
|
||||
conftest.c:46:6: warning: incompatible redeclaration of library function 'strchr' [-Wincompatible-library-redeclaration]
|
||||
char strchr ();
|
||||
^
|
||||
conftest.c:46:6: note: 'strchr' is a builtin with type 'char *(const char *, int)'
|
||||
1 warning generated.
|
||||
configure:5208: $? = 0
|
||||
configure:5230: result: yes
|
||||
configure:5145: checking for strrchr
|
||||
configure:5201: gcc -o conftest -g -O2 conftest.c -lm >&5
|
||||
conftest.c:47:6: warning: incompatible redeclaration of library function 'strrchr' [-Wincompatible-library-redeclaration]
|
||||
char strrchr ();
|
||||
^
|
||||
conftest.c:47:6: note: 'strrchr' is a builtin with type 'char *(const char *, int)'
|
||||
1 warning generated.
|
||||
configure:5208: $? = 0
|
||||
configure:5230: result: yes
|
||||
configure:5145: checking for strstr
|
||||
configure:5201: gcc -o conftest -g -O2 conftest.c -lm >&5
|
||||
conftest.c:48:6: warning: incompatible redeclaration of library function 'strstr' [-Wincompatible-library-redeclaration]
|
||||
char strstr ();
|
||||
^
|
||||
conftest.c:48:6: note: 'strstr' is a builtin with type 'char *(const char *, const char *)'
|
||||
1 warning generated.
|
||||
configure:5208: $? = 0
|
||||
configure:5230: result: yes
|
||||
configure:5250: checking build system type
|
||||
configure:5268: result: i386-apple-darwin13.1.0
|
||||
configure:5290: checking host system type
|
||||
configure:5305: result: i386-apple-darwin13.1.0
|
||||
configure:5328: checking whether byte ordering is bigendian
|
||||
configure:5353: gcc -c -g -O2 conftest.c >&5
|
||||
configure:5360: $? = 0
|
||||
configure:5410: gcc -c -g -O2 conftest.c >&5
|
||||
configure:5417: $? = 0
|
||||
configure:5449: gcc -c -g -O2 conftest.c >&5
|
||||
conftest.c:33:4: error: use of undeclared identifier 'not'
|
||||
not big endian
|
||||
^
|
||||
1 error generated.
|
||||
configure:5456: $? = 1
|
||||
configure: failed program was:
|
||||
| /* confdefs.h. */
|
||||
| #define PACKAGE_NAME "flite+hts_engine"
|
||||
| #define PACKAGE_TARNAME "flite-hts_engine"
|
||||
| #define PACKAGE_VERSION "1.05"
|
||||
| #define PACKAGE_STRING "flite+hts_engine 1.05"
|
||||
| #define PACKAGE_BUGREPORT "hts-engine-users@lists.sourceforge.net"
|
||||
| #define HAVE_LIBM 1
|
||||
| #define STDC_HEADERS 1
|
||||
| #define HAVE_SYS_TYPES_H 1
|
||||
| #define HAVE_SYS_STAT_H 1
|
||||
| #define HAVE_STDLIB_H 1
|
||||
| #define HAVE_STRING_H 1
|
||||
| #define HAVE_MEMORY_H 1
|
||||
| #define HAVE_STRINGS_H 1
|
||||
| #define HAVE_INTTYPES_H 1
|
||||
| #define HAVE_STDINT_H 1
|
||||
| #define HAVE_UNISTD_H 1
|
||||
| #define HAVE_STDLIB_H 1
|
||||
| #define HAVE_STRING_H 1
|
||||
| #define HAVE_VPRINTF 1
|
||||
| #define HAVE_SQRT 1
|
||||
| #define HAVE_STRCHR 1
|
||||
| #define HAVE_STRRCHR 1
|
||||
| #define HAVE_STRSTR 1
|
||||
| /* end confdefs.h. */
|
||||
| #include <sys/types.h>
|
||||
| #include <sys/param.h>
|
||||
|
|
||||
| int
|
||||
| main ()
|
||||
| {
|
||||
| #if BYTE_ORDER != BIG_ENDIAN
|
||||
| not big endian
|
||||
| #endif
|
||||
|
|
||||
| ;
|
||||
| return 0;
|
||||
| }
|
||||
configure:5708: result: no
|
||||
configure:5737: checking size of void *
|
||||
configure:6042: gcc -o conftest -g -O2 conftest.c -lm >&5
|
||||
configure:6046: $? = 0
|
||||
configure:6052: ./conftest
|
||||
configure:6056: $? = 0
|
||||
configure:6082: result: 8
|
||||
configure:6188: checking whether to enable compiling for embedded devices
|
||||
configure:6198: result: no
|
||||
configure:6216: checking for HTS_engine.h
|
||||
configure:6218: result: /Users/jmt/FGFS/Festival/dist/include/HTS_engine.h
|
||||
configure:6241: checking for libHTSEngine.a
|
||||
configure:6243: result: /Users/jmt/FGFS/Festival/dist/lib/libHTSEngine.a
|
||||
configure:6412: creating ./config.status
|
||||
|
||||
## ---------------------- ##
|
||||
## Running config.status. ##
|
||||
## ---------------------- ##
|
||||
|
||||
This file was extended by flite+hts_engine config.status 1.05, which was
|
||||
generated by GNU Autoconf 2.63. Invocation command line was
|
||||
|
||||
CONFIG_FILES =
|
||||
CONFIG_HEADERS =
|
||||
CONFIG_LINKS =
|
||||
CONFIG_COMMANDS =
|
||||
$ ./config.status
|
||||
|
||||
on Bishop.local
|
||||
|
||||
config.status:708: creating Makefile
|
||||
config.status:708: creating bin/Makefile
|
||||
config.status:708: creating lib/Makefile
|
||||
config.status:919: executing depfiles commands
|
||||
|
||||
## ---------------- ##
|
||||
## Cache variables. ##
|
||||
## ---------------- ##
|
||||
|
||||
ac_cv_build=i386-apple-darwin13.1.0
|
||||
ac_cv_c_bigendian=no
|
||||
ac_cv_c_compiler_gnu=yes
|
||||
ac_cv_c_const=yes
|
||||
ac_cv_env_CC_set=
|
||||
ac_cv_env_CC_value=
|
||||
ac_cv_env_CFLAGS_set=
|
||||
ac_cv_env_CFLAGS_value=
|
||||
ac_cv_env_CPPFLAGS_set=
|
||||
ac_cv_env_CPPFLAGS_value=
|
||||
ac_cv_env_CPP_set=
|
||||
ac_cv_env_CPP_value=
|
||||
ac_cv_env_HTS_ENGINE_HEADER_DIR_set=
|
||||
ac_cv_env_HTS_ENGINE_HEADER_DIR_value=
|
||||
ac_cv_env_HTS_ENGINE_HEADER_set=
|
||||
ac_cv_env_HTS_ENGINE_HEADER_value=
|
||||
ac_cv_env_HTS_ENGINE_LIBRARY_DIR_set=
|
||||
ac_cv_env_HTS_ENGINE_LIBRARY_DIR_value=
|
||||
ac_cv_env_HTS_ENGINE_LIBRARY_set=
|
||||
ac_cv_env_HTS_ENGINE_LIBRARY_value=
|
||||
ac_cv_env_LDFLAGS_set=
|
||||
ac_cv_env_LDFLAGS_value=
|
||||
ac_cv_env_LIBS_set=
|
||||
ac_cv_env_LIBS_value=
|
||||
ac_cv_env_build_alias_set=
|
||||
ac_cv_env_build_alias_value=
|
||||
ac_cv_env_host_alias_set=
|
||||
ac_cv_env_host_alias_value=
|
||||
ac_cv_env_target_alias_set=
|
||||
ac_cv_env_target_alias_value=
|
||||
ac_cv_func__doprnt=no
|
||||
ac_cv_func_sqrt=yes
|
||||
ac_cv_func_strchr=yes
|
||||
ac_cv_func_strrchr=yes
|
||||
ac_cv_func_strstr=yes
|
||||
ac_cv_func_vprintf=yes
|
||||
ac_cv_header_inttypes_h=yes
|
||||
ac_cv_header_memory_h=yes
|
||||
ac_cv_header_stdc=yes
|
||||
ac_cv_header_stdint_h=yes
|
||||
ac_cv_header_stdlib_h=yes
|
||||
ac_cv_header_string_h=yes
|
||||
ac_cv_header_strings_h=yes
|
||||
ac_cv_header_sys_stat_h=yes
|
||||
ac_cv_header_sys_types_h=yes
|
||||
ac_cv_header_unistd_h=yes
|
||||
ac_cv_host=i386-apple-darwin13.1.0
|
||||
ac_cv_lib_m_log=yes
|
||||
ac_cv_objext=o
|
||||
ac_cv_path_EGREP='/usr/bin/grep -E'
|
||||
ac_cv_path_GREP=/usr/bin/grep
|
||||
ac_cv_path_install='/usr/bin/install -c'
|
||||
ac_cv_prog_AWK=awk
|
||||
ac_cv_prog_CPP='gcc -E'
|
||||
ac_cv_prog_ac_ct_AR=ar
|
||||
ac_cv_prog_ac_ct_CC=gcc
|
||||
ac_cv_prog_ac_ct_RANLIB=ranlib
|
||||
ac_cv_prog_cc_c89=
|
||||
ac_cv_prog_cc_g=yes
|
||||
ac_cv_prog_cc_gcc_c_o=yes
|
||||
ac_cv_prog_make_make_set=yes
|
||||
ac_cv_sizeof_void_p=8
|
||||
ac_cv_type_size_t=yes
|
||||
am_cv_CC_dependencies_compiler_type=gcc3
|
||||
|
||||
## ----------------- ##
|
||||
## Output variables. ##
|
||||
## ----------------- ##
|
||||
|
||||
ACLOCAL='${SHELL} /Users/jmt/FGFS/Festival/flite+hts_engine-1.05/config/missing --run aclocal-1.10'
|
||||
AMDEPBACKSLASH='\'
|
||||
AMDEP_FALSE='#'
|
||||
AMDEP_TRUE=''
|
||||
AMTAR='${SHELL} /Users/jmt/FGFS/Festival/flite+hts_engine-1.05/config/missing --run tar'
|
||||
AR='ar'
|
||||
AUTOCONF='${SHELL} /Users/jmt/FGFS/Festival/flite+hts_engine-1.05/config/missing --run autoconf'
|
||||
AUTOHEADER='${SHELL} /Users/jmt/FGFS/Festival/flite+hts_engine-1.05/config/missing --run autoheader'
|
||||
AUTOMAKE='${SHELL} /Users/jmt/FGFS/Festival/flite+hts_engine-1.05/config/missing --run automake-1.10'
|
||||
AWK='awk'
|
||||
CC='gcc'
|
||||
CCDEPMODE='depmode=gcc3'
|
||||
CFLAGS='-g -O2'
|
||||
CPP='gcc -E'
|
||||
CPPFLAGS=''
|
||||
CYGPATH_W='echo'
|
||||
DEFS='-DPACKAGE_NAME=\"flite+hts_engine\" -DPACKAGE_TARNAME=\"flite-hts_engine\" -DPACKAGE_VERSION=\"1.05\" -DPACKAGE_STRING=\"flite+hts_engine\ 1.05\" -DPACKAGE_BUGREPORT=\"hts-engine-users@lists.sourceforge.net\" -DHAVE_LIBM=1 -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_VPRINTF=1 -DHAVE_SQRT=1 -DHAVE_STRCHR=1 -DHAVE_STRRCHR=1 -DHAVE_STRSTR=1 -DSIZEOF_VOID_P=8 -DFLITE_PLUS_HTS_ENGINE=1'
|
||||
DEPDIR='.deps'
|
||||
ECHO_C='\c'
|
||||
ECHO_N=''
|
||||
ECHO_T=''
|
||||
EGREP='/usr/bin/grep -E'
|
||||
EXEEXT=''
|
||||
GREP='/usr/bin/grep'
|
||||
HTS_ENGINE_HEADER='/Users/jmt/FGFS/Festival/dist/include/HTS_engine.h'
|
||||
HTS_ENGINE_HEADER_DIR='/Users/jmt/FGFS/Festival/dist/include'
|
||||
HTS_ENGINE_LIBRARY='/Users/jmt/FGFS/Festival/dist/lib/libHTSEngine.a'
|
||||
HTS_ENGINE_LIBRARY_DIR='/Users/jmt/FGFS/Festival/dist/lib'
|
||||
INSTALL_DATA='${INSTALL} -m 644'
|
||||
INSTALL_PROGRAM='${INSTALL}'
|
||||
INSTALL_SCRIPT='${INSTALL}'
|
||||
INSTALL_STRIP_PROGRAM='$(install_sh) -c -s'
|
||||
LDFLAGS=''
|
||||
LIBOBJS=''
|
||||
LIBS='-lm '
|
||||
LTLIBOBJS=''
|
||||
MAKEINFO='${SHELL} /Users/jmt/FGFS/Festival/flite+hts_engine-1.05/config/missing --run makeinfo'
|
||||
MKDIR_P='config/install-sh -c -d'
|
||||
OBJEXT='o'
|
||||
PACKAGE='flite+hts_engine'
|
||||
PACKAGE_BUGREPORT='hts-engine-users@lists.sourceforge.net'
|
||||
PACKAGE_NAME='flite+hts_engine'
|
||||
PACKAGE_STRING='flite+hts_engine 1.05'
|
||||
PACKAGE_TARNAME='flite-hts_engine'
|
||||
PACKAGE_VERSION='1.05'
|
||||
PATH_SEPARATOR=':'
|
||||
RANLIB='ranlib'
|
||||
SET_MAKE=''
|
||||
SHELL='/bin/sh'
|
||||
STRIP=''
|
||||
VERSION='1.05'
|
||||
ac_ct_CC='gcc'
|
||||
am__fastdepCC_FALSE='#'
|
||||
am__fastdepCC_TRUE=''
|
||||
am__include='include'
|
||||
am__isrc=''
|
||||
am__leading_dot='.'
|
||||
am__quote=''
|
||||
am__tar='${AMTAR} chof - "$$tardir"'
|
||||
am__untar='${AMTAR} xf -'
|
||||
bindir='${exec_prefix}/bin'
|
||||
build='i386-apple-darwin13.1.0'
|
||||
build_alias=''
|
||||
build_cpu='i386'
|
||||
build_os='darwin13.1.0'
|
||||
build_vendor='apple'
|
||||
datadir='${datarootdir}'
|
||||
datarootdir='${prefix}/share'
|
||||
docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
|
||||
dvidir='${docdir}'
|
||||
exec_prefix='${prefix}'
|
||||
host='i386-apple-darwin13.1.0'
|
||||
host_alias=''
|
||||
host_cpu='i386'
|
||||
host_os='darwin13.1.0'
|
||||
host_vendor='apple'
|
||||
htmldir='${docdir}'
|
||||
includedir='${prefix}/include'
|
||||
infodir='${datarootdir}/info'
|
||||
install_sh='$(SHELL) /Users/jmt/FGFS/Festival/flite+hts_engine-1.05/config/install-sh'
|
||||
libdir='${exec_prefix}/lib'
|
||||
libexecdir='${exec_prefix}/libexec'
|
||||
localedir='${datarootdir}/locale'
|
||||
localstatedir='${prefix}/var'
|
||||
mandir='${datarootdir}/man'
|
||||
mkdir_p='$(top_builddir)/config/install-sh -c -d'
|
||||
oldincludedir='/usr/include'
|
||||
pdfdir='${docdir}'
|
||||
prefix='/Users/jmt/FGFS/Festival/dist'
|
||||
program_transform_name='s,x,x,'
|
||||
psdir='${docdir}'
|
||||
sbindir='${exec_prefix}/sbin'
|
||||
sharedstatedir='${prefix}/com'
|
||||
sysconfdir='${prefix}/etc'
|
||||
target_alias=''
|
||||
|
||||
## ----------- ##
|
||||
## confdefs.h. ##
|
||||
## ----------- ##
|
||||
|
||||
#define PACKAGE_NAME "flite+hts_engine"
|
||||
#define PACKAGE_TARNAME "flite-hts_engine"
|
||||
#define PACKAGE_VERSION "1.05"
|
||||
#define PACKAGE_STRING "flite+hts_engine 1.05"
|
||||
#define PACKAGE_BUGREPORT "hts-engine-users@lists.sourceforge.net"
|
||||
#define HAVE_LIBM 1
|
||||
#define STDC_HEADERS 1
|
||||
#define HAVE_SYS_TYPES_H 1
|
||||
#define HAVE_SYS_STAT_H 1
|
||||
#define HAVE_STDLIB_H 1
|
||||
#define HAVE_STRING_H 1
|
||||
#define HAVE_MEMORY_H 1
|
||||
#define HAVE_STRINGS_H 1
|
||||
#define HAVE_INTTYPES_H 1
|
||||
#define HAVE_STDINT_H 1
|
||||
#define HAVE_UNISTD_H 1
|
||||
#define HAVE_STDLIB_H 1
|
||||
#define HAVE_STRING_H 1
|
||||
#define HAVE_VPRINTF 1
|
||||
#define HAVE_SQRT 1
|
||||
#define HAVE_STRCHR 1
|
||||
#define HAVE_STRRCHR 1
|
||||
#define HAVE_STRSTR 1
|
||||
#define SIZEOF_VOID_P 8
|
||||
#define FLITE_PLUS_HTS_ENGINE 1
|
||||
|
||||
configure: exit 0
|
1064
3rdparty/flite_hts_engine/config.status
vendored
Executable file
1064
3rdparty/flite_hts_engine/config.status
vendored
Executable file
File diff suppressed because it is too large
Load diff
142
3rdparty/flite_hts_engine/config/compile
vendored
Executable file
142
3rdparty/flite_hts_engine/config/compile
vendored
Executable file
|
@ -0,0 +1,142 @@
|
|||
#! /bin/sh
|
||||
# Wrapper for compilers which do not understand `-c -o'.
|
||||
|
||||
scriptversion=2005-05-14.22
|
||||
|
||||
# Copyright (C) 1999, 2000, 2003, 2004, 2005 Free Software Foundation, Inc.
|
||||
# Written by Tom Tromey <tromey@cygnus.com>.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2, or (at your option)
|
||||
# any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
|
||||
# As a special exception to the GNU General Public License, if you
|
||||
# distribute this file as part of a program that contains a
|
||||
# configuration script generated by Autoconf, you may include it under
|
||||
# the same distribution terms that you use for the rest of that program.
|
||||
|
||||
# This file is maintained in Automake, please report
|
||||
# bugs to <bug-automake@gnu.org> or send patches to
|
||||
# <automake-patches@gnu.org>.
|
||||
|
||||
case $1 in
|
||||
'')
|
||||
echo "$0: No command. Try \`$0 --help' for more information." 1>&2
|
||||
exit 1;
|
||||
;;
|
||||
-h | --h*)
|
||||
cat <<\EOF
|
||||
Usage: compile [--help] [--version] PROGRAM [ARGS]
|
||||
|
||||
Wrapper for compilers which do not understand `-c -o'.
|
||||
Remove `-o dest.o' from ARGS, run PROGRAM with the remaining
|
||||
arguments, and rename the output as expected.
|
||||
|
||||
If you are trying to build a whole package this is not the
|
||||
right script to run: please start by reading the file `INSTALL'.
|
||||
|
||||
Report bugs to <bug-automake@gnu.org>.
|
||||
EOF
|
||||
exit $?
|
||||
;;
|
||||
-v | --v*)
|
||||
echo "compile $scriptversion"
|
||||
exit $?
|
||||
;;
|
||||
esac
|
||||
|
||||
ofile=
|
||||
cfile=
|
||||
eat=
|
||||
|
||||
for arg
|
||||
do
|
||||
if test -n "$eat"; then
|
||||
eat=
|
||||
else
|
||||
case $1 in
|
||||
-o)
|
||||
# configure might choose to run compile as `compile cc -o foo foo.c'.
|
||||
# So we strip `-o arg' only if arg is an object.
|
||||
eat=1
|
||||
case $2 in
|
||||
*.o | *.obj)
|
||||
ofile=$2
|
||||
;;
|
||||
*)
|
||||
set x "$@" -o "$2"
|
||||
shift
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
*.c)
|
||||
cfile=$1
|
||||
set x "$@" "$1"
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
set x "$@" "$1"
|
||||
shift
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
shift
|
||||
done
|
||||
|
||||
if test -z "$ofile" || test -z "$cfile"; then
|
||||
# If no `-o' option was seen then we might have been invoked from a
|
||||
# pattern rule where we don't need one. That is ok -- this is a
|
||||
# normal compilation that the losing compiler can handle. If no
|
||||
# `.c' file was seen then we are probably linking. That is also
|
||||
# ok.
|
||||
exec "$@"
|
||||
fi
|
||||
|
||||
# Name of file we expect compiler to create.
|
||||
cofile=`echo "$cfile" | sed -e 's|^.*/||' -e 's/\.c$/.o/'`
|
||||
|
||||
# Create the lock directory.
|
||||
# Note: use `[/.-]' here to ensure that we don't use the same name
|
||||
# that we are using for the .o file. Also, base the name on the expected
|
||||
# object file name, since that is what matters with a parallel build.
|
||||
lockdir=`echo "$cofile" | sed -e 's|[/.-]|_|g'`.d
|
||||
while true; do
|
||||
if mkdir "$lockdir" >/dev/null 2>&1; then
|
||||
break
|
||||
fi
|
||||
sleep 1
|
||||
done
|
||||
# FIXME: race condition here if user kills between mkdir and trap.
|
||||
trap "rmdir '$lockdir'; exit 1" 1 2 15
|
||||
|
||||
# Run the compile.
|
||||
"$@"
|
||||
ret=$?
|
||||
|
||||
if test -f "$cofile"; then
|
||||
mv "$cofile" "$ofile"
|
||||
elif test -f "${cofile}bj"; then
|
||||
mv "${cofile}bj" "$ofile"
|
||||
fi
|
||||
|
||||
rmdir "$lockdir"
|
||||
exit $ret
|
||||
|
||||
# Local Variables:
|
||||
# mode: shell-script
|
||||
# sh-indentation: 2
|
||||
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
||||
# time-stamp-start: "scriptversion="
|
||||
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
||||
# time-stamp-end: "$"
|
||||
# End:
|
1542
3rdparty/flite_hts_engine/config/config.guess
vendored
Executable file
1542
3rdparty/flite_hts_engine/config/config.guess
vendored
Executable file
File diff suppressed because it is too large
Load diff
1677
3rdparty/flite_hts_engine/config/config.sub
vendored
Executable file
1677
3rdparty/flite_hts_engine/config/config.sub
vendored
Executable file
File diff suppressed because it is too large
Load diff
589
3rdparty/flite_hts_engine/config/depcomp
vendored
Executable file
589
3rdparty/flite_hts_engine/config/depcomp
vendored
Executable file
|
@ -0,0 +1,589 @@
|
|||
#! /bin/sh
|
||||
# depcomp - compile a program generating dependencies as side-effects
|
||||
|
||||
scriptversion=2007-03-29.01
|
||||
|
||||
# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007 Free Software
|
||||
# Foundation, Inc.
|
||||
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2, or (at your option)
|
||||
# any later version.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
# 02110-1301, USA.
|
||||
|
||||
# As a special exception to the GNU General Public License, if you
|
||||
# distribute this file as part of a program that contains a
|
||||
# configuration script generated by Autoconf, you may include it under
|
||||
# the same distribution terms that you use for the rest of that program.
|
||||
|
||||
# Originally written by Alexandre Oliva <oliva@dcc.unicamp.br>.
|
||||
|
||||
case $1 in
|
||||
'')
|
||||
echo "$0: No command. Try \`$0 --help' for more information." 1>&2
|
||||
exit 1;
|
||||
;;
|
||||
-h | --h*)
|
||||
cat <<\EOF
|
||||
Usage: depcomp [--help] [--version] PROGRAM [ARGS]
|
||||
|
||||
Run PROGRAMS ARGS to compile a file, generating dependencies
|
||||
as side-effects.
|
||||
|
||||
Environment variables:
|
||||
depmode Dependency tracking mode.
|
||||
source Source file read by `PROGRAMS ARGS'.
|
||||
object Object file output by `PROGRAMS ARGS'.
|
||||
DEPDIR directory where to store dependencies.
|
||||
depfile Dependency file to output.
|
||||
tmpdepfile Temporary file to use when outputing dependencies.
|
||||
libtool Whether libtool is used (yes/no).
|
||||
|
||||
Report bugs to <bug-automake@gnu.org>.
|
||||
EOF
|
||||
exit $?
|
||||
;;
|
||||
-v | --v*)
|
||||
echo "depcomp $scriptversion"
|
||||
exit $?
|
||||
;;
|
||||
esac
|
||||
|
||||
if test -z "$depmode" || test -z "$source" || test -z "$object"; then
|
||||
echo "depcomp: Variables source, object and depmode must be set" 1>&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po.
|
||||
depfile=${depfile-`echo "$object" |
|
||||
sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`}
|
||||
tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`}
|
||||
|
||||
rm -f "$tmpdepfile"
|
||||
|
||||
# Some modes work just like other modes, but use different flags. We
|
||||
# parameterize here, but still list the modes in the big case below,
|
||||
# to make depend.m4 easier to write. Note that we *cannot* use a case
|
||||
# here, because this file can only contain one case statement.
|
||||
if test "$depmode" = hp; then
|
||||
# HP compiler uses -M and no extra arg.
|
||||
gccflag=-M
|
||||
depmode=gcc
|
||||
fi
|
||||
|
||||
if test "$depmode" = dashXmstdout; then
|
||||
# This is just like dashmstdout with a different argument.
|
||||
dashmflag=-xM
|
||||
depmode=dashmstdout
|
||||
fi
|
||||
|
||||
case "$depmode" in
|
||||
gcc3)
|
||||
## gcc 3 implements dependency tracking that does exactly what
|
||||
## we want. Yay! Note: for some reason libtool 1.4 doesn't like
|
||||
## it if -MD -MP comes after the -MF stuff. Hmm.
|
||||
## Unfortunately, FreeBSD c89 acceptance of flags depends upon
|
||||
## the command line argument order; so add the flags where they
|
||||
## appear in depend2.am. Note that the slowdown incurred here
|
||||
## affects only configure: in makefiles, %FASTDEP% shortcuts this.
|
||||
for arg
|
||||
do
|
||||
case $arg in
|
||||
-c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;;
|
||||
*) set fnord "$@" "$arg" ;;
|
||||
esac
|
||||
shift # fnord
|
||||
shift # $arg
|
||||
done
|
||||
"$@"
|
||||
stat=$?
|
||||
if test $stat -eq 0; then :
|
||||
else
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
mv "$tmpdepfile" "$depfile"
|
||||
;;
|
||||
|
||||
gcc)
|
||||
## There are various ways to get dependency output from gcc. Here's
|
||||
## why we pick this rather obscure method:
|
||||
## - Don't want to use -MD because we'd like the dependencies to end
|
||||
## up in a subdir. Having to rename by hand is ugly.
|
||||
## (We might end up doing this anyway to support other compilers.)
|
||||
## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like
|
||||
## -MM, not -M (despite what the docs say).
|
||||
## - Using -M directly means running the compiler twice (even worse
|
||||
## than renaming).
|
||||
if test -z "$gccflag"; then
|
||||
gccflag=-MD,
|
||||
fi
|
||||
"$@" -Wp,"$gccflag$tmpdepfile"
|
||||
stat=$?
|
||||
if test $stat -eq 0; then :
|
||||
else
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
rm -f "$depfile"
|
||||
echo "$object : \\" > "$depfile"
|
||||
alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz
|
||||
## The second -e expression handles DOS-style file names with drive letters.
|
||||
sed -e 's/^[^:]*: / /' \
|
||||
-e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile"
|
||||
## This next piece of magic avoids the `deleted header file' problem.
|
||||
## The problem is that when a header file which appears in a .P file
|
||||
## is deleted, the dependency causes make to die (because there is
|
||||
## typically no way to rebuild the header). We avoid this by adding
|
||||
## dummy dependencies for each header file. Too bad gcc doesn't do
|
||||
## this for us directly.
|
||||
tr ' ' '
|
||||
' < "$tmpdepfile" |
|
||||
## Some versions of gcc put a space before the `:'. On the theory
|
||||
## that the space means something, we add a space to the output as
|
||||
## well.
|
||||
## Some versions of the HPUX 10.20 sed can't process this invocation
|
||||
## correctly. Breaking it into two sed invocations is a workaround.
|
||||
sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
hp)
|
||||
# This case exists only to let depend.m4 do its work. It works by
|
||||
# looking at the text of this script. This case will never be run,
|
||||
# since it is checked for above.
|
||||
exit 1
|
||||
;;
|
||||
|
||||
sgi)
|
||||
if test "$libtool" = yes; then
|
||||
"$@" "-Wp,-MDupdate,$tmpdepfile"
|
||||
else
|
||||
"$@" -MDupdate "$tmpdepfile"
|
||||
fi
|
||||
stat=$?
|
||||
if test $stat -eq 0; then :
|
||||
else
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
rm -f "$depfile"
|
||||
|
||||
if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files
|
||||
echo "$object : \\" > "$depfile"
|
||||
|
||||
# Clip off the initial element (the dependent). Don't try to be
|
||||
# clever and replace this with sed code, as IRIX sed won't handle
|
||||
# lines with more than a fixed number of characters (4096 in
|
||||
# IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines;
|
||||
# the IRIX cc adds comments like `#:fec' to the end of the
|
||||
# dependency line.
|
||||
tr ' ' '
|
||||
' < "$tmpdepfile" \
|
||||
| sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \
|
||||
tr '
|
||||
' ' ' >> $depfile
|
||||
echo >> $depfile
|
||||
|
||||
# The second pass generates a dummy entry for each header file.
|
||||
tr ' ' '
|
||||
' < "$tmpdepfile" \
|
||||
| sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
|
||||
>> $depfile
|
||||
else
|
||||
# The sourcefile does not contain any dependencies, so just
|
||||
# store a dummy comment line, to avoid errors with the Makefile
|
||||
# "include basename.Plo" scheme.
|
||||
echo "#dummy" > "$depfile"
|
||||
fi
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
aix)
|
||||
# The C for AIX Compiler uses -M and outputs the dependencies
|
||||
# in a .u file. In older versions, this file always lives in the
|
||||
# current directory. Also, the AIX compiler puts `$object:' at the
|
||||
# start of each line; $object doesn't have directory information.
|
||||
# Version 6 uses the directory in both cases.
|
||||
dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
|
||||
test "x$dir" = "x$object" && dir=
|
||||
base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
|
||||
if test "$libtool" = yes; then
|
||||
tmpdepfile1=$dir$base.u
|
||||
tmpdepfile2=$base.u
|
||||
tmpdepfile3=$dir.libs/$base.u
|
||||
"$@" -Wc,-M
|
||||
else
|
||||
tmpdepfile1=$dir$base.u
|
||||
tmpdepfile2=$dir$base.u
|
||||
tmpdepfile3=$dir$base.u
|
||||
"$@" -M
|
||||
fi
|
||||
stat=$?
|
||||
|
||||
if test $stat -eq 0; then :
|
||||
else
|
||||
rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
|
||||
exit $stat
|
||||
fi
|
||||
|
||||
for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
|
||||
do
|
||||
test -f "$tmpdepfile" && break
|
||||
done
|
||||
if test -f "$tmpdepfile"; then
|
||||
# Each line is of the form `foo.o: dependent.h'.
|
||||
# Do two passes, one to just change these to
|
||||
# `$object: dependent.h' and one to simply `dependent.h:'.
|
||||
sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
|
||||
# That's a tab and a space in the [].
|
||||
sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
|
||||
else
|
||||
# The sourcefile does not contain any dependencies, so just
|
||||
# store a dummy comment line, to avoid errors with the Makefile
|
||||
# "include basename.Plo" scheme.
|
||||
echo "#dummy" > "$depfile"
|
||||
fi
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
icc)
|
||||
# Intel's C compiler understands `-MD -MF file'. However on
|
||||
# icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c
|
||||
# ICC 7.0 will fill foo.d with something like
|
||||
# foo.o: sub/foo.c
|
||||
# foo.o: sub/foo.h
|
||||
# which is wrong. We want:
|
||||
# sub/foo.o: sub/foo.c
|
||||
# sub/foo.o: sub/foo.h
|
||||
# sub/foo.c:
|
||||
# sub/foo.h:
|
||||
# ICC 7.1 will output
|
||||
# foo.o: sub/foo.c sub/foo.h
|
||||
# and will wrap long lines using \ :
|
||||
# foo.o: sub/foo.c ... \
|
||||
# sub/foo.h ... \
|
||||
# ...
|
||||
|
||||
"$@" -MD -MF "$tmpdepfile"
|
||||
stat=$?
|
||||
if test $stat -eq 0; then :
|
||||
else
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
rm -f "$depfile"
|
||||
# Each line is of the form `foo.o: dependent.h',
|
||||
# or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'.
|
||||
# Do two passes, one to just change these to
|
||||
# `$object: dependent.h' and one to simply `dependent.h:'.
|
||||
sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile"
|
||||
# Some versions of the HPUX 10.20 sed can't process this invocation
|
||||
# correctly. Breaking it into two sed invocations is a workaround.
|
||||
sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" |
|
||||
sed -e 's/$/ :/' >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
hp2)
|
||||
# The "hp" stanza above does not work with aCC (C++) and HP's ia64
|
||||
# compilers, which have integrated preprocessors. The correct option
|
||||
# to use with these is +Maked; it writes dependencies to a file named
|
||||
# 'foo.d', which lands next to the object file, wherever that
|
||||
# happens to be.
|
||||
# Much of this is similar to the tru64 case; see comments there.
|
||||
dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
|
||||
test "x$dir" = "x$object" && dir=
|
||||
base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
|
||||
if test "$libtool" = yes; then
|
||||
tmpdepfile1=$dir$base.d
|
||||
tmpdepfile2=$dir.libs/$base.d
|
||||
"$@" -Wc,+Maked
|
||||
else
|
||||
tmpdepfile1=$dir$base.d
|
||||
tmpdepfile2=$dir$base.d
|
||||
"$@" +Maked
|
||||
fi
|
||||
stat=$?
|
||||
if test $stat -eq 0; then :
|
||||
else
|
||||
rm -f "$tmpdepfile1" "$tmpdepfile2"
|
||||
exit $stat
|
||||
fi
|
||||
|
||||
for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2"
|
||||
do
|
||||
test -f "$tmpdepfile" && break
|
||||
done
|
||||
if test -f "$tmpdepfile"; then
|
||||
sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile"
|
||||
# Add `dependent.h:' lines.
|
||||
sed -ne '2,${; s/^ *//; s/ \\*$//; s/$/:/; p;}' "$tmpdepfile" >> "$depfile"
|
||||
else
|
||||
echo "#dummy" > "$depfile"
|
||||
fi
|
||||
rm -f "$tmpdepfile" "$tmpdepfile2"
|
||||
;;
|
||||
|
||||
tru64)
|
||||
# The Tru64 compiler uses -MD to generate dependencies as a side
|
||||
# effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'.
|
||||
# At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put
|
||||
# dependencies in `foo.d' instead, so we check for that too.
|
||||
# Subdirectories are respected.
|
||||
dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
|
||||
test "x$dir" = "x$object" && dir=
|
||||
base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
|
||||
|
||||
if test "$libtool" = yes; then
|
||||
# With Tru64 cc, shared objects can also be used to make a
|
||||
# static library. This mechanism is used in libtool 1.4 series to
|
||||
# handle both shared and static libraries in a single compilation.
|
||||
# With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d.
|
||||
#
|
||||
# With libtool 1.5 this exception was removed, and libtool now
|
||||
# generates 2 separate objects for the 2 libraries. These two
|
||||
# compilations output dependencies in $dir.libs/$base.o.d and
|
||||
# in $dir$base.o.d. We have to check for both files, because
|
||||
# one of the two compilations can be disabled. We should prefer
|
||||
# $dir$base.o.d over $dir.libs/$base.o.d because the latter is
|
||||
# automatically cleaned when .libs/ is deleted, while ignoring
|
||||
# the former would cause a distcleancheck panic.
|
||||
tmpdepfile1=$dir.libs/$base.lo.d # libtool 1.4
|
||||
tmpdepfile2=$dir$base.o.d # libtool 1.5
|
||||
tmpdepfile3=$dir.libs/$base.o.d # libtool 1.5
|
||||
tmpdepfile4=$dir.libs/$base.d # Compaq CCC V6.2-504
|
||||
"$@" -Wc,-MD
|
||||
else
|
||||
tmpdepfile1=$dir$base.o.d
|
||||
tmpdepfile2=$dir$base.d
|
||||
tmpdepfile3=$dir$base.d
|
||||
tmpdepfile4=$dir$base.d
|
||||
"$@" -MD
|
||||
fi
|
||||
|
||||
stat=$?
|
||||
if test $stat -eq 0; then :
|
||||
else
|
||||
rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
|
||||
exit $stat
|
||||
fi
|
||||
|
||||
for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
|
||||
do
|
||||
test -f "$tmpdepfile" && break
|
||||
done
|
||||
if test -f "$tmpdepfile"; then
|
||||
sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
|
||||
# That's a tab and a space in the [].
|
||||
sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
|
||||
else
|
||||
echo "#dummy" > "$depfile"
|
||||
fi
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
#nosideeffect)
|
||||
# This comment above is used by automake to tell side-effect
|
||||
# dependency tracking mechanisms from slower ones.
|
||||
|
||||
dashmstdout)
|
||||
# Important note: in order to support this mode, a compiler *must*
|
||||
# always write the preprocessed file to stdout, regardless of -o.
|
||||
"$@" || exit $?
|
||||
|
||||
# Remove the call to Libtool.
|
||||
if test "$libtool" = yes; then
|
||||
while test $1 != '--mode=compile'; do
|
||||
shift
|
||||
done
|
||||
shift
|
||||
fi
|
||||
|
||||
# Remove `-o $object'.
|
||||
IFS=" "
|
||||
for arg
|
||||
do
|
||||
case $arg in
|
||||
-o)
|
||||
shift
|
||||
;;
|
||||
$object)
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
set fnord "$@" "$arg"
|
||||
shift # fnord
|
||||
shift # $arg
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
test -z "$dashmflag" && dashmflag=-M
|
||||
# Require at least two characters before searching for `:'
|
||||
# in the target name. This is to cope with DOS-style filenames:
|
||||
# a dependency such as `c:/foo/bar' could be seen as target `c' otherwise.
|
||||
"$@" $dashmflag |
|
||||
sed 's:^[ ]*[^: ][^:][^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile"
|
||||
rm -f "$depfile"
|
||||
cat < "$tmpdepfile" > "$depfile"
|
||||
tr ' ' '
|
||||
' < "$tmpdepfile" | \
|
||||
## Some versions of the HPUX 10.20 sed can't process this invocation
|
||||
## correctly. Breaking it into two sed invocations is a workaround.
|
||||
sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
dashXmstdout)
|
||||
# This case only exists to satisfy depend.m4. It is never actually
|
||||
# run, as this mode is specially recognized in the preamble.
|
||||
exit 1
|
||||
;;
|
||||
|
||||
makedepend)
|
||||
"$@" || exit $?
|
||||
# Remove any Libtool call
|
||||
if test "$libtool" = yes; then
|
||||
while test $1 != '--mode=compile'; do
|
||||
shift
|
||||
done
|
||||
shift
|
||||
fi
|
||||
# X makedepend
|
||||
shift
|
||||
cleared=no
|
||||
for arg in "$@"; do
|
||||
case $cleared in
|
||||
no)
|
||||
set ""; shift
|
||||
cleared=yes ;;
|
||||
esac
|
||||
case "$arg" in
|
||||
-D*|-I*)
|
||||
set fnord "$@" "$arg"; shift ;;
|
||||
# Strip any option that makedepend may not understand. Remove
|
||||
# the object too, otherwise makedepend will parse it as a source file.
|
||||
-*|$object)
|
||||
;;
|
||||
*)
|
||||
set fnord "$@" "$arg"; shift ;;
|
||||
esac
|
||||
done
|
||||
obj_suffix="`echo $object | sed 's/^.*\././'`"
|
||||
touch "$tmpdepfile"
|
||||
${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@"
|
||||
rm -f "$depfile"
|
||||
cat < "$tmpdepfile" > "$depfile"
|
||||
sed '1,2d' "$tmpdepfile" | tr ' ' '
|
||||
' | \
|
||||
## Some versions of the HPUX 10.20 sed can't process this invocation
|
||||
## correctly. Breaking it into two sed invocations is a workaround.
|
||||
sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
|
||||
rm -f "$tmpdepfile" "$tmpdepfile".bak
|
||||
;;
|
||||
|
||||
cpp)
|
||||
# Important note: in order to support this mode, a compiler *must*
|
||||
# always write the preprocessed file to stdout.
|
||||
"$@" || exit $?
|
||||
|
||||
# Remove the call to Libtool.
|
||||
if test "$libtool" = yes; then
|
||||
while test $1 != '--mode=compile'; do
|
||||
shift
|
||||
done
|
||||
shift
|
||||
fi
|
||||
|
||||
# Remove `-o $object'.
|
||||
IFS=" "
|
||||
for arg
|
||||
do
|
||||
case $arg in
|
||||
-o)
|
||||
shift
|
||||
;;
|
||||
$object)
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
set fnord "$@" "$arg"
|
||||
shift # fnord
|
||||
shift # $arg
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
"$@" -E |
|
||||
sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \
|
||||
-e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' |
|
||||
sed '$ s: \\$::' > "$tmpdepfile"
|
||||
rm -f "$depfile"
|
||||
echo "$object : \\" > "$depfile"
|
||||
cat < "$tmpdepfile" >> "$depfile"
|
||||
sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
msvisualcpp)
|
||||
# Important note: in order to support this mode, a compiler *must*
|
||||
# always write the preprocessed file to stdout, regardless of -o,
|
||||
# because we must use -o when running libtool.
|
||||
"$@" || exit $?
|
||||
IFS=" "
|
||||
for arg
|
||||
do
|
||||
case "$arg" in
|
||||
"-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI")
|
||||
set fnord "$@"
|
||||
shift
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
set fnord "$@" "$arg"
|
||||
shift
|
||||
shift
|
||||
;;
|
||||
esac
|
||||
done
|
||||
"$@" -E |
|
||||
sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile"
|
||||
rm -f "$depfile"
|
||||
echo "$object : \\" > "$depfile"
|
||||
. "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile"
|
||||
echo " " >> "$depfile"
|
||||
. "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::\1\::p' >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
none)
|
||||
exec "$@"
|
||||
;;
|
||||
|
||||
*)
|
||||
echo "Unknown depmode $depmode" 1>&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
exit 0
|
||||
|
||||
# Local Variables:
|
||||
# mode: shell-script
|
||||
# sh-indentation: 2
|
||||
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
||||
# time-stamp-start: "scriptversion="
|
||||
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
||||
# time-stamp-end: "$"
|
||||
# End:
|
519
3rdparty/flite_hts_engine/config/install-sh
vendored
Executable file
519
3rdparty/flite_hts_engine/config/install-sh
vendored
Executable file
|
@ -0,0 +1,519 @@
|
|||
#!/bin/sh
|
||||
# install - install a program, script, or datafile
|
||||
|
||||
scriptversion=2006-12-25.00
|
||||
|
||||
# This originates from X11R5 (mit/util/scripts/install.sh), which was
|
||||
# later released in X11R6 (xc/config/util/install.sh) with the
|
||||
# following copyright and license.
|
||||
#
|
||||
# Copyright (C) 1994 X Consortium
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
# of this software and associated documentation files (the "Software"), to
|
||||
# deal in the Software without restriction, including without limitation the
|
||||
# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
||||
# sell copies of the Software, and to permit persons to whom the Software is
|
||||
# furnished to do so, subject to the following conditions:
|
||||
#
|
||||
# The above copyright notice and this permission notice shall be included in
|
||||
# all copies or substantial portions of the Software.
|
||||
#
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
|
||||
# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC-
|
||||
# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
#
|
||||
# Except as contained in this notice, the name of the X Consortium shall not
|
||||
# be used in advertising or otherwise to promote the sale, use or other deal-
|
||||
# ings in this Software without prior written authorization from the X Consor-
|
||||
# tium.
|
||||
#
|
||||
#
|
||||
# FSF changes to this file are in the public domain.
|
||||
#
|
||||
# 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.
|
||||
|
||||
nl='
|
||||
'
|
||||
IFS=" "" $nl"
|
||||
|
||||
# set DOITPROG to echo to test this script
|
||||
|
||||
# Don't use :- since 4.3BSD and earlier shells don't like it.
|
||||
doit=${DOITPROG-}
|
||||
if test -z "$doit"; then
|
||||
doit_exec=exec
|
||||
else
|
||||
doit_exec=$doit
|
||||
fi
|
||||
|
||||
# Put in absolute file names if you don't have them in your path;
|
||||
# or use environment vars.
|
||||
|
||||
chgrpprog=${CHGRPPROG-chgrp}
|
||||
chmodprog=${CHMODPROG-chmod}
|
||||
chownprog=${CHOWNPROG-chown}
|
||||
cmpprog=${CMPPROG-cmp}
|
||||
cpprog=${CPPROG-cp}
|
||||
mkdirprog=${MKDIRPROG-mkdir}
|
||||
mvprog=${MVPROG-mv}
|
||||
rmprog=${RMPROG-rm}
|
||||
stripprog=${STRIPPROG-strip}
|
||||
|
||||
posix_glob='?'
|
||||
initialize_posix_glob='
|
||||
test "$posix_glob" != "?" || {
|
||||
if (set -f) 2>/dev/null; then
|
||||
posix_glob=
|
||||
else
|
||||
posix_glob=:
|
||||
fi
|
||||
}
|
||||
'
|
||||
|
||||
posix_mkdir=
|
||||
|
||||
# Desired mode of installed file.
|
||||
mode=0755
|
||||
|
||||
chgrpcmd=
|
||||
chmodcmd=$chmodprog
|
||||
chowncmd=
|
||||
mvcmd=$mvprog
|
||||
rmcmd="$rmprog -f"
|
||||
stripcmd=
|
||||
|
||||
src=
|
||||
dst=
|
||||
dir_arg=
|
||||
dst_arg=
|
||||
|
||||
copy_on_change=false
|
||||
no_target_directory=
|
||||
|
||||
usage="\
|
||||
Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
|
||||
or: $0 [OPTION]... SRCFILES... DIRECTORY
|
||||
or: $0 [OPTION]... -t DIRECTORY SRCFILES...
|
||||
or: $0 [OPTION]... -d DIRECTORIES...
|
||||
|
||||
In the 1st form, copy SRCFILE to DSTFILE.
|
||||
In the 2nd and 3rd, copy all SRCFILES to DIRECTORY.
|
||||
In the 4th, create DIRECTORIES.
|
||||
|
||||
Options:
|
||||
--help display this help and exit.
|
||||
--version display version info and exit.
|
||||
|
||||
-c (ignored)
|
||||
-C install only if different (preserve the last data modification time)
|
||||
-d create directories instead of installing files.
|
||||
-g GROUP $chgrpprog installed files to GROUP.
|
||||
-m MODE $chmodprog installed files to MODE.
|
||||
-o USER $chownprog installed files to USER.
|
||||
-s $stripprog installed files.
|
||||
-t DIRECTORY install into DIRECTORY.
|
||||
-T report an error if DSTFILE is a directory.
|
||||
|
||||
Environment variables override the default commands:
|
||||
CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG
|
||||
RMPROG STRIPPROG
|
||||
"
|
||||
|
||||
while test $# -ne 0; do
|
||||
case $1 in
|
||||
-c) ;;
|
||||
|
||||
-C) copy_on_change=true;;
|
||||
|
||||
-d) dir_arg=true;;
|
||||
|
||||
-g) chgrpcmd="$chgrpprog $2"
|
||||
shift;;
|
||||
|
||||
--help) echo "$usage"; exit $?;;
|
||||
|
||||
-m) mode=$2
|
||||
case $mode in
|
||||
*' '* | *' '* | *'
|
||||
'* | *'*'* | *'?'* | *'['*)
|
||||
echo "$0: invalid mode: $mode" >&2
|
||||
exit 1;;
|
||||
esac
|
||||
shift;;
|
||||
|
||||
-o) chowncmd="$chownprog $2"
|
||||
shift;;
|
||||
|
||||
-s) stripcmd=$stripprog;;
|
||||
|
||||
-t) dst_arg=$2
|
||||
shift;;
|
||||
|
||||
-T) no_target_directory=true;;
|
||||
|
||||
--version) echo "$0 $scriptversion"; exit $?;;
|
||||
|
||||
--) shift
|
||||
break;;
|
||||
|
||||
-*) echo "$0: invalid option: $1" >&2
|
||||
exit 1;;
|
||||
|
||||
*) break;;
|
||||
esac
|
||||
shift
|
||||
done
|
||||
|
||||
if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then
|
||||
# When -d is used, all remaining arguments are directories to create.
|
||||
# When -t is used, the destination is already specified.
|
||||
# Otherwise, the last argument is the destination. Remove it from $@.
|
||||
for arg
|
||||
do
|
||||
if test -n "$dst_arg"; then
|
||||
# $@ is not empty: it contains at least $arg.
|
||||
set fnord "$@" "$dst_arg"
|
||||
shift # fnord
|
||||
fi
|
||||
shift # arg
|
||||
dst_arg=$arg
|
||||
done
|
||||
fi
|
||||
|
||||
if test $# -eq 0; then
|
||||
if test -z "$dir_arg"; then
|
||||
echo "$0: no input file specified." >&2
|
||||
exit 1
|
||||
fi
|
||||
# It's OK to call `install-sh -d' without argument.
|
||||
# This can happen when creating conditional directories.
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if test -z "$dir_arg"; then
|
||||
trap '(exit $?); exit' 1 2 13 15
|
||||
|
||||
# Set umask so as not to create temps with too-generous modes.
|
||||
# However, 'strip' requires both read and write access to temps.
|
||||
case $mode in
|
||||
# Optimize common cases.
|
||||
*644) cp_umask=133;;
|
||||
*755) cp_umask=22;;
|
||||
|
||||
*[0-7])
|
||||
if test -z "$stripcmd"; then
|
||||
u_plus_rw=
|
||||
else
|
||||
u_plus_rw='% 200'
|
||||
fi
|
||||
cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;;
|
||||
*)
|
||||
if test -z "$stripcmd"; then
|
||||
u_plus_rw=
|
||||
else
|
||||
u_plus_rw=,u+rw
|
||||
fi
|
||||
cp_umask=$mode$u_plus_rw;;
|
||||
esac
|
||||
fi
|
||||
|
||||
for src
|
||||
do
|
||||
# Protect names starting with `-'.
|
||||
case $src in
|
||||
-*) src=./$src;;
|
||||
esac
|
||||
|
||||
if test -n "$dir_arg"; then
|
||||
dst=$src
|
||||
dstdir=$dst
|
||||
test -d "$dstdir"
|
||||
dstdir_status=$?
|
||||
else
|
||||
|
||||
# Waiting for this to be detected by the "$cpprog $src $dsttmp" command
|
||||
# might cause directories to be created, which would be especially bad
|
||||
# if $src (and thus $dsttmp) contains '*'.
|
||||
if test ! -f "$src" && test ! -d "$src"; then
|
||||
echo "$0: $src does not exist." >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if test -z "$dst_arg"; then
|
||||
echo "$0: no destination specified." >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
dst=$dst_arg
|
||||
# Protect names starting with `-'.
|
||||
case $dst in
|
||||
-*) dst=./$dst;;
|
||||
esac
|
||||
|
||||
# If destination is a directory, append the input filename; won't work
|
||||
# if double slashes aren't ignored.
|
||||
if test -d "$dst"; then
|
||||
if test -n "$no_target_directory"; then
|
||||
echo "$0: $dst_arg: Is a directory" >&2
|
||||
exit 1
|
||||
fi
|
||||
dstdir=$dst
|
||||
dst=$dstdir/`basename "$src"`
|
||||
dstdir_status=0
|
||||
else
|
||||
# Prefer dirname, but fall back on a substitute if dirname fails.
|
||||
dstdir=`
|
||||
(dirname "$dst") 2>/dev/null ||
|
||||
expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
|
||||
X"$dst" : 'X\(//\)[^/]' \| \
|
||||
X"$dst" : 'X\(//\)$' \| \
|
||||
X"$dst" : 'X\(/\)' \| . 2>/dev/null ||
|
||||
echo X"$dst" |
|
||||
sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
|
||||
s//\1/
|
||||
q
|
||||
}
|
||||
/^X\(\/\/\)[^/].*/{
|
||||
s//\1/
|
||||
q
|
||||
}
|
||||
/^X\(\/\/\)$/{
|
||||
s//\1/
|
||||
q
|
||||
}
|
||||
/^X\(\/\).*/{
|
||||
s//\1/
|
||||
q
|
||||
}
|
||||
s/.*/./; q'
|
||||
`
|
||||
|
||||
test -d "$dstdir"
|
||||
dstdir_status=$?
|
||||
fi
|
||||
fi
|
||||
|
||||
obsolete_mkdir_used=false
|
||||
|
||||
if test $dstdir_status != 0; then
|
||||
case $posix_mkdir in
|
||||
'')
|
||||
# Create intermediate dirs using mode 755 as modified by the umask.
|
||||
# This is like FreeBSD 'install' as of 1997-10-28.
|
||||
umask=`umask`
|
||||
case $stripcmd.$umask in
|
||||
# Optimize common cases.
|
||||
*[2367][2367]) mkdir_umask=$umask;;
|
||||
.*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;;
|
||||
|
||||
*[0-7])
|
||||
mkdir_umask=`expr $umask + 22 \
|
||||
- $umask % 100 % 40 + $umask % 20 \
|
||||
- $umask % 10 % 4 + $umask % 2
|
||||
`;;
|
||||
*) mkdir_umask=$umask,go-w;;
|
||||
esac
|
||||
|
||||
# With -d, create the new directory with the user-specified mode.
|
||||
# Otherwise, rely on $mkdir_umask.
|
||||
if test -n "$dir_arg"; then
|
||||
mkdir_mode=-m$mode
|
||||
else
|
||||
mkdir_mode=
|
||||
fi
|
||||
|
||||
posix_mkdir=false
|
||||
case $umask in
|
||||
*[123567][0-7][0-7])
|
||||
# POSIX mkdir -p sets u+wx bits regardless of umask, which
|
||||
# is incompatible with FreeBSD 'install' when (umask & 300) != 0.
|
||||
;;
|
||||
*)
|
||||
tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
|
||||
trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0
|
||||
|
||||
if (umask $mkdir_umask &&
|
||||
exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1
|
||||
then
|
||||
if test -z "$dir_arg" || {
|
||||
# Check for POSIX incompatibilities with -m.
|
||||
# HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
|
||||
# other-writeable bit of parent directory when it shouldn't.
|
||||
# FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
|
||||
ls_ld_tmpdir=`ls -ld "$tmpdir"`
|
||||
case $ls_ld_tmpdir in
|
||||
d????-?r-*) different_mode=700;;
|
||||
d????-?--*) different_mode=755;;
|
||||
*) false;;
|
||||
esac &&
|
||||
$mkdirprog -m$different_mode -p -- "$tmpdir" && {
|
||||
ls_ld_tmpdir_1=`ls -ld "$tmpdir"`
|
||||
test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
|
||||
}
|
||||
}
|
||||
then posix_mkdir=:
|
||||
fi
|
||||
rmdir "$tmpdir/d" "$tmpdir"
|
||||
else
|
||||
# Remove any dirs left behind by ancient mkdir implementations.
|
||||
rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null
|
||||
fi
|
||||
trap '' 0;;
|
||||
esac;;
|
||||
esac
|
||||
|
||||
if
|
||||
$posix_mkdir && (
|
||||
umask $mkdir_umask &&
|
||||
$doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
|
||||
)
|
||||
then :
|
||||
else
|
||||
|
||||
# The umask is ridiculous, or mkdir does not conform to POSIX,
|
||||
# or it failed possibly due to a race condition. Create the
|
||||
# directory the slow way, step by step, checking for races as we go.
|
||||
|
||||
case $dstdir in
|
||||
/*) prefix='/';;
|
||||
-*) prefix='./';;
|
||||
*) prefix='';;
|
||||
esac
|
||||
|
||||
eval "$initialize_posix_glob"
|
||||
|
||||
oIFS=$IFS
|
||||
IFS=/
|
||||
$posix_glob set -f
|
||||
set fnord $dstdir
|
||||
shift
|
||||
$posix_glob set +f
|
||||
IFS=$oIFS
|
||||
|
||||
prefixes=
|
||||
|
||||
for d
|
||||
do
|
||||
test -z "$d" && continue
|
||||
|
||||
prefix=$prefix$d
|
||||
if test -d "$prefix"; then
|
||||
prefixes=
|
||||
else
|
||||
if $posix_mkdir; then
|
||||
(umask=$mkdir_umask &&
|
||||
$doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
|
||||
# Don't fail if two instances are running concurrently.
|
||||
test -d "$prefix" || exit 1
|
||||
else
|
||||
case $prefix in
|
||||
*\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
|
||||
*) qprefix=$prefix;;
|
||||
esac
|
||||
prefixes="$prefixes '$qprefix'"
|
||||
fi
|
||||
fi
|
||||
prefix=$prefix/
|
||||
done
|
||||
|
||||
if test -n "$prefixes"; then
|
||||
# Don't fail if two instances are running concurrently.
|
||||
(umask $mkdir_umask &&
|
||||
eval "\$doit_exec \$mkdirprog $prefixes") ||
|
||||
test -d "$dstdir" || exit 1
|
||||
obsolete_mkdir_used=true
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
if test -n "$dir_arg"; then
|
||||
{ test -z "$chowncmd" || $doit $chowncmd "$dst"; } &&
|
||||
{ test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } &&
|
||||
{ test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false ||
|
||||
test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1
|
||||
else
|
||||
|
||||
# Make a couple of temp file names in the proper directory.
|
||||
dsttmp=$dstdir/_inst.$$_
|
||||
rmtmp=$dstdir/_rm.$$_
|
||||
|
||||
# Trap to clean up those temp files at exit.
|
||||
trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
|
||||
|
||||
# Copy the file name to the temp name.
|
||||
(umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") &&
|
||||
|
||||
# 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 $cpprog $src $dsttmp" command.
|
||||
#
|
||||
{ test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } &&
|
||||
{ test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } &&
|
||||
{ test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } &&
|
||||
{ test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } &&
|
||||
|
||||
# If -C, don't bother to copy if it wouldn't change the file.
|
||||
if $copy_on_change &&
|
||||
old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` &&
|
||||
new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` &&
|
||||
|
||||
eval "$initialize_posix_glob" &&
|
||||
$posix_glob set -f &&
|
||||
set X $old && old=:$2:$4:$5:$6 &&
|
||||
set X $new && new=:$2:$4:$5:$6 &&
|
||||
$posix_glob set +f &&
|
||||
|
||||
test "$old" = "$new" &&
|
||||
$cmpprog "$dst" "$dsttmp" >/dev/null 2>&1
|
||||
then
|
||||
rm -f "$dsttmp"
|
||||
else
|
||||
# Rename the file to the real destination.
|
||||
$doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null ||
|
||||
|
||||
# The rename failed, perhaps because mv can't rename something else
|
||||
# to itself, or perhaps because mv is so ancient that it does not
|
||||
# support -f.
|
||||
{
|
||||
# Now remove or move aside any old file at destination location.
|
||||
# We try this two ways since rm can't unlink itself on some
|
||||
# systems and the destination file might be busy for other
|
||||
# reasons. In this case, the final cleanup might fail but the new
|
||||
# file should still install successfully.
|
||||
{
|
||||
test ! -f "$dst" ||
|
||||
$doit $rmcmd -f "$dst" 2>/dev/null ||
|
||||
{ $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
|
||||
{ $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }
|
||||
} ||
|
||||
{ echo "$0: cannot unlink or rename $dst" >&2
|
||||
(exit 1); exit 1
|
||||
}
|
||||
} &&
|
||||
|
||||
# Now rename the file to the real destination.
|
||||
$doit $mvcmd "$dsttmp" "$dst"
|
||||
}
|
||||
fi || exit 1
|
||||
|
||||
trap '' 0
|
||||
fi
|
||||
done
|
||||
|
||||
# Local variables:
|
||||
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
||||
# time-stamp-start: "scriptversion="
|
||||
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
||||
# time-stamp-end: "$"
|
||||
# End:
|
367
3rdparty/flite_hts_engine/config/missing
vendored
Executable file
367
3rdparty/flite_hts_engine/config/missing
vendored
Executable file
|
@ -0,0 +1,367 @@
|
|||
#! /bin/sh
|
||||
# Common stub for a few missing GNU programs while installing.
|
||||
|
||||
scriptversion=2006-05-10.23
|
||||
|
||||
# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006
|
||||
# Free Software Foundation, Inc.
|
||||
# Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
|
||||
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2, or (at your option)
|
||||
# any later version.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
# 02110-1301, USA.
|
||||
|
||||
# As a special exception to the GNU General Public License, if you
|
||||
# distribute this file as part of a program that contains a
|
||||
# configuration script generated by Autoconf, you may include it under
|
||||
# the same distribution terms that you use for the rest of that program.
|
||||
|
||||
if test $# -eq 0; then
|
||||
echo 1>&2 "Try \`$0 --help' for more information"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
run=:
|
||||
sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p'
|
||||
sed_minuso='s/.* -o \([^ ]*\).*/\1/p'
|
||||
|
||||
# In the cases where this matters, `missing' is being run in the
|
||||
# srcdir already.
|
||||
if test -f configure.ac; then
|
||||
configure_ac=configure.ac
|
||||
else
|
||||
configure_ac=configure.in
|
||||
fi
|
||||
|
||||
msg="missing on your system"
|
||||
|
||||
case $1 in
|
||||
--run)
|
||||
# Try to run requested program, and just exit if it succeeds.
|
||||
run=
|
||||
shift
|
||||
"$@" && exit 0
|
||||
# Exit code 63 means version mismatch. This often happens
|
||||
# when the user try to use an ancient version of a tool on
|
||||
# a file that requires a minimum version. In this case we
|
||||
# we should proceed has if the program had been absent, or
|
||||
# if --run hadn't been passed.
|
||||
if test $? = 63; then
|
||||
run=:
|
||||
msg="probably too old"
|
||||
fi
|
||||
;;
|
||||
|
||||
-h|--h|--he|--hel|--help)
|
||||
echo "\
|
||||
$0 [OPTION]... PROGRAM [ARGUMENT]...
|
||||
|
||||
Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an
|
||||
error status if there is no known handling for PROGRAM.
|
||||
|
||||
Options:
|
||||
-h, --help display this help and exit
|
||||
-v, --version output version information and exit
|
||||
--run try to run the given command, and emulate it if it fails
|
||||
|
||||
Supported PROGRAM values:
|
||||
aclocal touch file \`aclocal.m4'
|
||||
autoconf touch file \`configure'
|
||||
autoheader touch file \`config.h.in'
|
||||
autom4te touch the output file, or create a stub one
|
||||
automake touch all \`Makefile.in' files
|
||||
bison create \`y.tab.[ch]', if possible, from existing .[ch]
|
||||
flex create \`lex.yy.c', if possible, from existing .c
|
||||
help2man touch the output file
|
||||
lex create \`lex.yy.c', if possible, from existing .c
|
||||
makeinfo touch the output file
|
||||
tar try tar, gnutar, gtar, then tar without non-portable flags
|
||||
yacc create \`y.tab.[ch]', if possible, from existing .[ch]
|
||||
|
||||
Send bug reports to <bug-automake@gnu.org>."
|
||||
exit $?
|
||||
;;
|
||||
|
||||
-v|--v|--ve|--ver|--vers|--versi|--versio|--version)
|
||||
echo "missing $scriptversion (GNU Automake)"
|
||||
exit $?
|
||||
;;
|
||||
|
||||
-*)
|
||||
echo 1>&2 "$0: Unknown \`$1' option"
|
||||
echo 1>&2 "Try \`$0 --help' for more information"
|
||||
exit 1
|
||||
;;
|
||||
|
||||
esac
|
||||
|
||||
# Now exit if we have it, but it failed. Also exit now if we
|
||||
# don't have it and --version was passed (most likely to detect
|
||||
# the program).
|
||||
case $1 in
|
||||
lex|yacc)
|
||||
# Not GNU programs, they don't have --version.
|
||||
;;
|
||||
|
||||
tar)
|
||||
if test -n "$run"; then
|
||||
echo 1>&2 "ERROR: \`tar' requires --run"
|
||||
exit 1
|
||||
elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
|
||||
exit 1
|
||||
fi
|
||||
;;
|
||||
|
||||
*)
|
||||
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
|
||||
# We have it, but it failed.
|
||||
exit 1
|
||||
elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
|
||||
# Could not run --version or --help. This is probably someone
|
||||
# running `$TOOL --version' or `$TOOL --help' to check whether
|
||||
# $TOOL exists and not knowing $TOOL uses missing.
|
||||
exit 1
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
# If it does not exist, or fails to run (possibly an outdated version),
|
||||
# try to emulate it.
|
||||
case $1 in
|
||||
aclocal*)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is $msg. You should only need it if
|
||||
you modified \`acinclude.m4' or \`${configure_ac}'. You might want
|
||||
to install the \`Automake' and \`Perl' packages. Grab them from
|
||||
any GNU archive site."
|
||||
touch aclocal.m4
|
||||
;;
|
||||
|
||||
autoconf)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is $msg. You should only need it if
|
||||
you modified \`${configure_ac}'. You might want to install the
|
||||
\`Autoconf' and \`GNU m4' packages. Grab them from any GNU
|
||||
archive site."
|
||||
touch configure
|
||||
;;
|
||||
|
||||
autoheader)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is $msg. You should only need it if
|
||||
you modified \`acconfig.h' or \`${configure_ac}'. You might want
|
||||
to install the \`Autoconf' and \`GNU m4' packages. Grab them
|
||||
from any GNU archive site."
|
||||
files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}`
|
||||
test -z "$files" && files="config.h"
|
||||
touch_files=
|
||||
for f in $files; do
|
||||
case $f in
|
||||
*:*) touch_files="$touch_files "`echo "$f" |
|
||||
sed -e 's/^[^:]*://' -e 's/:.*//'`;;
|
||||
*) touch_files="$touch_files $f.in";;
|
||||
esac
|
||||
done
|
||||
touch $touch_files
|
||||
;;
|
||||
|
||||
automake*)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is $msg. You should only need it if
|
||||
you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'.
|
||||
You might want to install the \`Automake' and \`Perl' packages.
|
||||
Grab them from any GNU archive site."
|
||||
find . -type f -name Makefile.am -print |
|
||||
sed 's/\.am$/.in/' |
|
||||
while read f; do touch "$f"; done
|
||||
;;
|
||||
|
||||
autom4te)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is needed, but is $msg.
|
||||
You might have modified some files without having the
|
||||
proper tools for further handling them.
|
||||
You can get \`$1' as part of \`Autoconf' from any GNU
|
||||
archive site."
|
||||
|
||||
file=`echo "$*" | sed -n "$sed_output"`
|
||||
test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
|
||||
if test -f "$file"; then
|
||||
touch $file
|
||||
else
|
||||
test -z "$file" || exec >$file
|
||||
echo "#! /bin/sh"
|
||||
echo "# Created by GNU Automake missing as a replacement of"
|
||||
echo "# $ $@"
|
||||
echo "exit 0"
|
||||
chmod +x $file
|
||||
exit 1
|
||||
fi
|
||||
;;
|
||||
|
||||
bison|yacc)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' $msg. You should only need it if
|
||||
you modified a \`.y' file. You may need the \`Bison' package
|
||||
in order for those modifications to take effect. You can get
|
||||
\`Bison' from any GNU archive site."
|
||||
rm -f y.tab.c y.tab.h
|
||||
if test $# -ne 1; then
|
||||
eval LASTARG="\${$#}"
|
||||
case $LASTARG in
|
||||
*.y)
|
||||
SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
|
||||
if test -f "$SRCFILE"; then
|
||||
cp "$SRCFILE" y.tab.c
|
||||
fi
|
||||
SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
|
||||
if test -f "$SRCFILE"; then
|
||||
cp "$SRCFILE" y.tab.h
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
if test ! -f y.tab.h; then
|
||||
echo >y.tab.h
|
||||
fi
|
||||
if test ! -f y.tab.c; then
|
||||
echo 'main() { return 0; }' >y.tab.c
|
||||
fi
|
||||
;;
|
||||
|
||||
lex|flex)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is $msg. You should only need it if
|
||||
you modified a \`.l' file. You may need the \`Flex' package
|
||||
in order for those modifications to take effect. You can get
|
||||
\`Flex' from any GNU archive site."
|
||||
rm -f lex.yy.c
|
||||
if test $# -ne 1; then
|
||||
eval LASTARG="\${$#}"
|
||||
case $LASTARG in
|
||||
*.l)
|
||||
SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
|
||||
if test -f "$SRCFILE"; then
|
||||
cp "$SRCFILE" lex.yy.c
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
if test ! -f lex.yy.c; then
|
||||
echo 'main() { return 0; }' >lex.yy.c
|
||||
fi
|
||||
;;
|
||||
|
||||
help2man)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is $msg. You should only need it if
|
||||
you modified a dependency of a manual page. You may need the
|
||||
\`Help2man' package in order for those modifications to take
|
||||
effect. You can get \`Help2man' from any GNU archive site."
|
||||
|
||||
file=`echo "$*" | sed -n "$sed_output"`
|
||||
test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
|
||||
if test -f "$file"; then
|
||||
touch $file
|
||||
else
|
||||
test -z "$file" || exec >$file
|
||||
echo ".ab help2man is required to generate this page"
|
||||
exit 1
|
||||
fi
|
||||
;;
|
||||
|
||||
makeinfo)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is $msg. You should only need it if
|
||||
you modified a \`.texi' or \`.texinfo' file, or any other file
|
||||
indirectly affecting the aspect of the manual. The spurious
|
||||
call might also be the consequence of using a buggy \`make' (AIX,
|
||||
DU, IRIX). You might want to install the \`Texinfo' package or
|
||||
the \`GNU make' package. Grab either from any GNU archive site."
|
||||
# The file to touch is that specified with -o ...
|
||||
file=`echo "$*" | sed -n "$sed_output"`
|
||||
test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
|
||||
if test -z "$file"; then
|
||||
# ... or it is the one specified with @setfilename ...
|
||||
infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
|
||||
file=`sed -n '
|
||||
/^@setfilename/{
|
||||
s/.* \([^ ]*\) *$/\1/
|
||||
p
|
||||
q
|
||||
}' $infile`
|
||||
# ... or it is derived from the source name (dir/f.texi becomes f.info)
|
||||
test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info
|
||||
fi
|
||||
# If the file does not exist, the user really needs makeinfo;
|
||||
# let's fail without touching anything.
|
||||
test -f $file || exit 1
|
||||
touch $file
|
||||
;;
|
||||
|
||||
tar)
|
||||
shift
|
||||
|
||||
# We have already tried tar in the generic part.
|
||||
# Look for gnutar/gtar before invocation to avoid ugly error
|
||||
# messages.
|
||||
if (gnutar --version > /dev/null 2>&1); then
|
||||
gnutar "$@" && exit 0
|
||||
fi
|
||||
if (gtar --version > /dev/null 2>&1); then
|
||||
gtar "$@" && exit 0
|
||||
fi
|
||||
firstarg="$1"
|
||||
if shift; then
|
||||
case $firstarg in
|
||||
*o*)
|
||||
firstarg=`echo "$firstarg" | sed s/o//`
|
||||
tar "$firstarg" "$@" && exit 0
|
||||
;;
|
||||
esac
|
||||
case $firstarg in
|
||||
*h*)
|
||||
firstarg=`echo "$firstarg" | sed s/h//`
|
||||
tar "$firstarg" "$@" && exit 0
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
echo 1>&2 "\
|
||||
WARNING: I can't seem to be able to run \`tar' with the given arguments.
|
||||
You may want to install GNU tar or Free paxutils, or check the
|
||||
command line arguments."
|
||||
exit 1
|
||||
;;
|
||||
|
||||
*)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is needed, and is $msg.
|
||||
You might have modified some files without having the
|
||||
proper tools for further handling them. Check the \`README' file,
|
||||
it often tells you about the needed prerequisites for installing
|
||||
this package. You may also peek at any GNU archive site, in case
|
||||
some other package would contain this missing \`$1' program."
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
exit 0
|
||||
|
||||
# Local variables:
|
||||
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
||||
# time-stamp-start: "scriptversion="
|
||||
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
||||
# time-stamp-end: "$"
|
||||
# End:
|
7550
3rdparty/flite_hts_engine/configure
vendored
Executable file
7550
3rdparty/flite_hts_engine/configure
vendored
Executable file
File diff suppressed because it is too large
Load diff
106
3rdparty/flite_hts_engine/configure.ac
vendored
Normal file
106
3rdparty/flite_hts_engine/configure.ac
vendored
Normal file
|
@ -0,0 +1,106 @@
|
|||
# -*- Autoconf -*-
|
||||
# Process this file with autoconf to produce a configure script.
|
||||
|
||||
AC_PREREQ(2.59)
|
||||
AC_INIT(flite+hts_engine, 1.05, hts-engine-users@lists.sourceforge.net)
|
||||
AC_CONFIG_AUX_DIR([config])
|
||||
AC_COPYRIGHT(Copyright 2005-2013 Nagoya Institute of Technology)
|
||||
AC_COPYRIGHT(Copyright 2005-2008 Tokyo Institute of Technology)
|
||||
AM_INIT_AUTOMAKE(flite+hts_engine, 1.05, nostdinc no-installinfo no-installman)
|
||||
|
||||
# Checks for C compiler
|
||||
AC_PROG_CC
|
||||
AM_PROG_CC_C_O
|
||||
AC_PROG_INSTALL
|
||||
AC_PROG_RANLIB
|
||||
AN_MAKEVAR([AR], [AC_PROG_AR])
|
||||
AN_PROGRAM([ar], [AC_PROG_AR])
|
||||
AC_DEFUN([AC_PROG_AR], [AC_CHECK_TOOL(AR, ar, :)])
|
||||
AC_PROG_AR
|
||||
|
||||
|
||||
# Checks for libraries.
|
||||
AC_CHECK_LIB([m], [log])
|
||||
|
||||
|
||||
# Checks for header files.
|
||||
AC_HEADER_STDC
|
||||
AC_CHECK_HEADERS([stdlib.h string.h])
|
||||
|
||||
# Checks for typedefs, structures, and compiler characteristics.
|
||||
AC_C_CONST
|
||||
AC_TYPE_SIZE_T
|
||||
|
||||
# Checks for library functions.
|
||||
AC_FUNC_VPRINTF
|
||||
AC_CHECK_FUNCS([sqrt strchr strrchr strstr])
|
||||
|
||||
|
||||
AC_CANONICAL_HOST
|
||||
AC_C_BIGENDIAN
|
||||
AC_CHECK_SIZEOF([void *])
|
||||
|
||||
# Checks library for windows audio devices
|
||||
case "$host_os" in
|
||||
*win32* | *wince* | *cygwin* | *mingw* )
|
||||
AC_HAVE_LIBRARY([winmm],,AC_MSG_ERROR(No winmm))
|
||||
;;
|
||||
*)
|
||||
;;
|
||||
esac
|
||||
|
||||
|
||||
AC_CONFIG_FILES([Makefile bin/Makefile lib/Makefile])
|
||||
|
||||
|
||||
# Checks for embedded device compile
|
||||
AC_ARG_ENABLE(embedded, [ --enable-embedded turn on compiling for embedded devices (default=no)],
|
||||
,enable_embedded=no)
|
||||
AC_MSG_CHECKING(whether to enable compiling for embedded devices)
|
||||
if test x$enable_embedded = xyes; then
|
||||
AC_MSG_RESULT(yes)
|
||||
AC_DEFINE(HTS_EMBEDDED)
|
||||
else
|
||||
AC_MSG_RESULT(no)
|
||||
fi
|
||||
|
||||
# Define HTS_ENGINE_HEADER
|
||||
AC_ARG_WITH(hts-engine-header-path,
|
||||
AS_HELP_STRING([--with-hts-engine-header-path],[specify the hts_engine_API header path]),
|
||||
[hts_engine_header_path=$withval],
|
||||
[hts_engine_header_path=/usr/local/include])
|
||||
if test ! -f "${hts_engine_header_path}/HTS_engine.h"; then
|
||||
AC_MSG_ERROR(Cannot find HTS_engine.h)
|
||||
fi
|
||||
AC_MSG_CHECKING(for HTS_engine.h)
|
||||
AC_MSG_RESULT($hts_engine_header_path/HTS_engine.h)
|
||||
AC_ARG_VAR([HTS_ENGINE_HEADER],[])
|
||||
HTS_ENGINE_HEADER=${hts_engine_header_path}/HTS_engine.h
|
||||
|
||||
# Define HTS_ENGINE_HEADER_DIR
|
||||
AC_ARG_VAR([HTS_ENGINE_HEADER_DIR],[])
|
||||
HTS_ENGINE_HEADER_DIR=${hts_engine_header_path}
|
||||
|
||||
# Define HTS_ENGINE_LIBRARY
|
||||
AC_ARG_WITH(hts-engine-library-path,
|
||||
AS_HELP_STRING([--with-hts-engine-library-path],[specify the hts_engine_API library path]),
|
||||
[hts_engine_library_path=$withval],
|
||||
[hts_engine_library_path=/usr/local/lib])
|
||||
if test ! -f "${hts_engine_library_path}/libHTSEngine.a"; then
|
||||
AC_MSG_ERROR(Cannot find libHTSEngine.a)
|
||||
fi
|
||||
AC_MSG_CHECKING(for libHTSEngine.a)
|
||||
AC_MSG_RESULT($hts_engine_library_path/libHTSEngine.a)
|
||||
AC_ARG_VAR([HTS_ENGINE_LIBRARY],[])
|
||||
HTS_ENGINE_LIBRARY=${hts_engine_library_path}/libHTSEngine.a
|
||||
|
||||
# Define HTS_ENGINE_LIBRARY_DIR
|
||||
AC_ARG_VAR([HTS_ENGINE_LIBRARY_DIR],[])
|
||||
HTS_ENGINE_LIBRARY_DIR=${hts_engine_library_path}
|
||||
|
||||
# Define compile option
|
||||
AC_DEFINE(FLITE_PLUS_HTS_ENGINE)
|
||||
|
||||
|
||||
AC_OUTPUT
|
||||
|
256
3rdparty/flite_hts_engine/flite/COPYING
vendored
Normal file
256
3rdparty/flite_hts_engine/flite/COPYING
vendored
Normal file
|
@ -0,0 +1,256 @@
|
|||
/* ----------------------------------------------------------------- */
|
||||
/* The English TTS System "Flite+hts_engine" */
|
||||
/* developed by HTS Working Group */
|
||||
/* http://hts-engine.sourceforge.net/ */
|
||||
/* ----------------------------------------------------------------- */
|
||||
/* */
|
||||
/* Copyright (c) 2005-2013 Nagoya Institute of Technology */
|
||||
/* Department of Computer Science */
|
||||
/* */
|
||||
/* 2005-2008 Tokyo Institute of Technology */
|
||||
/* Interdisciplinary Graduate School of */
|
||||
/* Science and Engineering */
|
||||
/* */
|
||||
/* All rights reserved. */
|
||||
/* */
|
||||
/* Redistribution and use in source and binary forms, with or */
|
||||
/* without modification, are permitted provided that the following */
|
||||
/* conditions are met: */
|
||||
/* */
|
||||
/* - Redistributions of source code must retain the above copyright */
|
||||
/* notice, this list of conditions and the following disclaimer. */
|
||||
/* - 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. */
|
||||
/* - Neither the name of the HTS working group 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 COPYRIGHT HOLDERS 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 COPYRIGHT OWNER 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. */
|
||||
/* ----------------------------------------------------------------- */
|
||||
|
||||
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.
|
||||
* ====================================================
|
82
3rdparty/flite_hts_engine/flite/include/cst_alloc.h
vendored
Normal file
82
3rdparty/flite_hts_engine/flite/include/cst_alloc.h
vendored
Normal 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
|
49
3rdparty/flite_hts_engine/flite/include/cst_args.h
vendored
Normal file
49
3rdparty/flite_hts_engine/flite/include/cst_args.h
vendored
Normal 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
|
118
3rdparty/flite_hts_engine/flite/include/cst_audio.h
vendored
Normal file
118
3rdparty/flite_hts_engine/flite/include/cst_audio.h
vendored
Normal 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
|
77
3rdparty/flite_hts_engine/flite/include/cst_cart.h
vendored
Normal file
77
3rdparty/flite_hts_engine/flite/include/cst_cart.h
vendored
Normal 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
|
70
3rdparty/flite_hts_engine/flite/include/cst_endian.h
vendored
Normal file
70
3rdparty/flite_hts_engine/flite/include/cst_endian.h
vendored
Normal 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
|
78
3rdparty/flite_hts_engine/flite/include/cst_error.h
vendored
Normal file
78
3rdparty/flite_hts_engine/flite/include/cst_error.h
vendored
Normal 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
|
89
3rdparty/flite_hts_engine/flite/include/cst_features.h
vendored
Normal file
89
3rdparty/flite_hts_engine/flite/include/cst_features.h
vendored
Normal 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
|
65
3rdparty/flite_hts_engine/flite/include/cst_ffeatures.h
vendored
Normal file
65
3rdparty/flite_hts_engine/flite/include/cst_ffeatures.h
vendored
Normal 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 */
|
170
3rdparty/flite_hts_engine/flite/include/cst_file.h
vendored
Normal file
170
3rdparty/flite_hts_engine/flite/include/cst_file.h
vendored
Normal file
|
@ -0,0 +1,170 @@
|
|||
/*************************************************************************/
|
||||
/* */
|
||||
/* 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 */
|
||||
/* */
|
||||
/*************************************************************************/
|
||||
|
||||
/* ----------------------------------------------------------------- */
|
||||
/* The English TTS System "Flite+hts_engine" */
|
||||
/* developed by HTS Working Group */
|
||||
/* http://hts-engine.sourceforge.net/ */
|
||||
/* ----------------------------------------------------------------- */
|
||||
/* */
|
||||
/* Copyright (c) 2005-2013 Nagoya Institute of Technology */
|
||||
/* Department of Computer Science */
|
||||
/* */
|
||||
/* 2005-2008 Tokyo Institute of Technology */
|
||||
/* Interdisciplinary Graduate School of */
|
||||
/* Science and Engineering */
|
||||
/* */
|
||||
/* All rights reserved. */
|
||||
/* */
|
||||
/* Redistribution and use in source and binary forms, with or */
|
||||
/* without modification, are permitted provided that the following */
|
||||
/* conditions are met: */
|
||||
/* */
|
||||
/* - Redistributions of source code must retain the above copyright */
|
||||
/* notice, this list of conditions and the following disclaimer. */
|
||||
/* - 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. */
|
||||
/* - Neither the name of the HTS working group 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 COPYRIGHT HOLDERS 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 COPYRIGHT OWNER 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. */
|
||||
/* ----------------------------------------------------------------- */
|
||||
|
||||
#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, ...);
|
||||
#ifdef FLITE_PLUS_HTS_ENGINE
|
||||
#define cst_sprintf sprintf
|
||||
#else
|
||||
int cst_sprintf(char *s, const char *fmt, ...);
|
||||
#endif /* FLITE_PLUS_HTS_ENGINE */
|
||||
#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
|
50
3rdparty/flite_hts_engine/flite/include/cst_hrg.h
vendored
Normal file
50
3rdparty/flite_hts_engine/flite/include/cst_hrg.h
vendored
Normal 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
|
135
3rdparty/flite_hts_engine/flite/include/cst_item.h
vendored
Normal file
135
3rdparty/flite_hts_engine/flite/include/cst_item.h
vendored
Normal 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
|
87
3rdparty/flite_hts_engine/flite/include/cst_lexicon.h
vendored
Normal file
87
3rdparty/flite_hts_engine/flite/include/cst_lexicon.h
vendored
Normal 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
|
78
3rdparty/flite_hts_engine/flite/include/cst_lts.h
vendored
Normal file
78
3rdparty/flite_hts_engine/flite/include/cst_lts.h
vendored
Normal 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
|
||||
|
55
3rdparty/flite_hts_engine/flite/include/cst_lts_rewrites.h
vendored
Normal file
55
3rdparty/flite_hts_engine/flite/include/cst_lts_rewrites.h
vendored
Normal 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
|
||||
|
51
3rdparty/flite_hts_engine/flite/include/cst_math.h
vendored
Normal file
51
3rdparty/flite_hts_engine/flite/include/cst_math.h
vendored
Normal 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
|
76
3rdparty/flite_hts_engine/flite/include/cst_phoneset.h
vendored
Normal file
76
3rdparty/flite_hts_engine/flite/include/cst_phoneset.h
vendored
Normal 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
|
160
3rdparty/flite_hts_engine/flite/include/cst_regex.h
vendored
Normal file
160
3rdparty/flite_hts_engine/flite/include/cst_regex.h
vendored
Normal 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
|
72
3rdparty/flite_hts_engine/flite/include/cst_relation.h
vendored
Normal file
72
3rdparty/flite_hts_engine/flite/include/cst_relation.h
vendored
Normal 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
|
51
3rdparty/flite_hts_engine/flite/include/cst_sigpr.h
vendored
Normal file
51
3rdparty/flite_hts_engine/flite/include/cst_sigpr.h
vendored
Normal 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
|
49
3rdparty/flite_hts_engine/flite/include/cst_socket.h
vendored
Normal file
49
3rdparty/flite_hts_engine/flite/include/cst_socket.h
vendored
Normal 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
|
58
3rdparty/flite_hts_engine/flite/include/cst_ss.h
vendored
Normal file
58
3rdparty/flite_hts_engine/flite/include/cst_ss.h
vendored
Normal 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
|
72
3rdparty/flite_hts_engine/flite/include/cst_string.h
vendored
Normal file
72
3rdparty/flite_hts_engine/flite/include/cst_string.h
vendored
Normal 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
|
127
3rdparty/flite_hts_engine/flite/include/cst_sts.h
vendored
Normal file
127
3rdparty/flite_hts_engine/flite/include/cst_sts.h
vendored
Normal 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
|
93
3rdparty/flite_hts_engine/flite/include/cst_synth.h
vendored
Normal file
93
3rdparty/flite_hts_engine/flite/include/cst_synth.h
vendored
Normal 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
|
||||
|
120
3rdparty/flite_hts_engine/flite/include/cst_tokenstream.h
vendored
Normal file
120
3rdparty/flite_hts_engine/flite/include/cst_tokenstream.h
vendored
Normal 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
|
70
3rdparty/flite_hts_engine/flite/include/cst_track.h
vendored
Normal file
70
3rdparty/flite_hts_engine/flite/include/cst_track.h
vendored
Normal 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
|
64
3rdparty/flite_hts_engine/flite/include/cst_utt_utils.h
vendored
Normal file
64
3rdparty/flite_hts_engine/flite/include/cst_utt_utils.h
vendored
Normal 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
|
74
3rdparty/flite_hts_engine/flite/include/cst_utterance.h
vendored
Normal file
74
3rdparty/flite_hts_engine/flite/include/cst_utterance.h
vendored
Normal 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
|
210
3rdparty/flite_hts_engine/flite/include/cst_val.h
vendored
Normal file
210
3rdparty/flite_hts_engine/flite/include/cst_val.h
vendored
Normal file
|
@ -0,0 +1,210 @@
|
|||
/*************************************************************************/
|
||||
/* */
|
||||
/* 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 */
|
||||
/* */
|
||||
/*************************************************************************/
|
||||
|
||||
/* ----------------------------------------------------------------- */
|
||||
/* The English TTS System "Flite+hts_engine" */
|
||||
/* developed by HTS Working Group */
|
||||
/* http://hts-engine.sourceforge.net/ */
|
||||
/* ----------------------------------------------------------------- */
|
||||
/* */
|
||||
/* Copyright (c) 2005-2013 Nagoya Institute of Technology */
|
||||
/* Department of Computer Science */
|
||||
/* */
|
||||
/* 2005-2008 Tokyo Institute of Technology */
|
||||
/* Interdisciplinary Graduate School of */
|
||||
/* Science and Engineering */
|
||||
/* */
|
||||
/* All rights reserved. */
|
||||
/* */
|
||||
/* Redistribution and use in source and binary forms, with or */
|
||||
/* without modification, are permitted provided that the following */
|
||||
/* conditions are met: */
|
||||
/* */
|
||||
/* - Redistributions of source code must retain the above copyright */
|
||||
/* notice, this list of conditions and the following disclaimer. */
|
||||
/* - 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. */
|
||||
/* - Neither the name of the HTS working group 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 COPYRIGHT HOLDERS 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 COPYRIGHT OWNER 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. */
|
||||
/* ----------------------------------------------------------------- */
|
||||
|
||||
#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
|
||||
#if defined(SIZEOF_VOID_P) && SIZEOF_VOID_P == 8
|
||||
int ref_count;
|
||||
int type;
|
||||
#else
|
||||
short ref_count;
|
||||
short type; /* order is here important */
|
||||
#endif
|
||||
#else
|
||||
#if defined(SIZEOF_VOID_P) && SIZEOF_VOID_P == 8
|
||||
int type;
|
||||
int ref_count;
|
||||
#else
|
||||
short type; /* order is here important */
|
||||
short ref_count;
|
||||
#endif
|
||||
#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
|
403
3rdparty/flite_hts_engine/flite/include/cst_val_const.h
vendored
Normal file
403
3rdparty/flite_hts_engine/flite/include/cst_val_const.h
vendored
Normal file
|
@ -0,0 +1,403 @@
|
|||
/*************************************************************************/
|
||||
/* */
|
||||
/* 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 */
|
||||
/* */
|
||||
/* */
|
||||
/*************************************************************************/
|
||||
|
||||
/* ----------------------------------------------------------------- */
|
||||
/* The English TTS System "Flite+hts_engine" */
|
||||
/* developed by HTS Working Group */
|
||||
/* http://hts-engine.sourceforge.net/ */
|
||||
/* ----------------------------------------------------------------- */
|
||||
/* */
|
||||
/* Copyright (c) 2005-2013 Nagoya Institute of Technology */
|
||||
/* Department of Computer Science */
|
||||
/* */
|
||||
/* 2005-2008 Tokyo Institute of Technology */
|
||||
/* Interdisciplinary Graduate School of */
|
||||
/* Science and Engineering */
|
||||
/* */
|
||||
/* All rights reserved. */
|
||||
/* */
|
||||
/* Redistribution and use in source and binary forms, with or */
|
||||
/* without modification, are permitted provided that the following */
|
||||
/* conditions are met: */
|
||||
/* */
|
||||
/* - Redistributions of source code must retain the above copyright */
|
||||
/* notice, this list of conditions and the following disclaimer. */
|
||||
/* - 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. */
|
||||
/* - Neither the name of the HTS working group 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 COPYRIGHT HOLDERS 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 COPYRIGHT OWNER 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. */
|
||||
/* ----------------------------------------------------------------- */
|
||||
|
||||
#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
|
||||
#if defined(SIZEOF_VOID_P) && SIZEOF_VOID_P == 8
|
||||
int ref_count;
|
||||
int type;
|
||||
#else
|
||||
short ref_count;
|
||||
short type; /* order is here important */
|
||||
#endif
|
||||
#else
|
||||
#if defined(SIZEOF_VOID_P) && SIZEOF_VOID_P == 8
|
||||
int type;
|
||||
int ref_count;
|
||||
#else
|
||||
short type; /* order is here important */
|
||||
short ref_count;
|
||||
#endif
|
||||
#endif
|
||||
float fval;
|
||||
} cst_val_float;
|
||||
|
||||
typedef struct cst_val_atom_struct_int {
|
||||
#ifdef WORDS_BIGENDIAN
|
||||
#if defined(SIZEOF_VOID_P) && SIZEOF_VOID_P == 8
|
||||
int ref_count;
|
||||
int type;
|
||||
#else
|
||||
short ref_count;
|
||||
short type; /* order is here important (and unintuitive) */
|
||||
#endif
|
||||
#else
|
||||
#if defined(SIZEOF_VOID_P) && SIZEOF_VOID_P == 8
|
||||
int type;
|
||||
int ref_count;
|
||||
#else
|
||||
short type; /* order is here important */
|
||||
short ref_count;
|
||||
#endif
|
||||
#endif
|
||||
int ival;
|
||||
} cst_val_int;
|
||||
|
||||
typedef struct cst_val_atom_struct_void {
|
||||
#ifdef WORDS_BIGENDIAN
|
||||
#if defined(SIZEOF_VOID_P) && SIZEOF_VOID_P == 8
|
||||
int ref_count;
|
||||
int type;
|
||||
#else
|
||||
short ref_count;
|
||||
short type; /* order is here important */
|
||||
#endif
|
||||
#else
|
||||
#if defined(SIZEOF_VOID_P) && SIZEOF_VOID_P == 8
|
||||
int type;
|
||||
int ref_count;
|
||||
#else
|
||||
short type; /* order is here important */
|
||||
short ref_count;
|
||||
#endif
|
||||
#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
|
112
3rdparty/flite_hts_engine/flite/include/cst_val_defs.h
vendored
Normal file
112
3rdparty/flite_hts_engine/flite/include/cst_val_defs.h
vendored
Normal 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
|
113
3rdparty/flite_hts_engine/flite/include/cst_viterbi.h
vendored
Normal file
113
3rdparty/flite_hts_engine/flite/include/cst_viterbi.h
vendored
Normal 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
|
69
3rdparty/flite_hts_engine/flite/include/cst_voice.h
vendored
Normal file
69
3rdparty/flite_hts_engine/flite/include/cst_voice.h
vendored
Normal 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
|
158
3rdparty/flite_hts_engine/flite/include/cst_wave.h
vendored
Normal file
158
3rdparty/flite_hts_engine/flite/include/cst_wave.h
vendored
Normal 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
|
170
3rdparty/flite_hts_engine/flite/include/flite.h
vendored
Normal file
170
3rdparty/flite_hts_engine/flite/include/flite.h
vendored
Normal file
|
@ -0,0 +1,170 @@
|
|||
/*************************************************************************/
|
||||
/* */
|
||||
/* 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 */
|
||||
/* */
|
||||
/*************************************************************************/
|
||||
|
||||
/* ----------------------------------------------------------------- */
|
||||
/* The English TTS System "Flite+hts_engine" */
|
||||
/* developed by HTS Working Group */
|
||||
/* http://hts-engine.sourceforge.net/ */
|
||||
/* ----------------------------------------------------------------- */
|
||||
/* */
|
||||
/* Copyright (c) 2005-2013 Nagoya Institute of Technology */
|
||||
/* Department of Computer Science */
|
||||
/* */
|
||||
/* 2005-2008 Tokyo Institute of Technology */
|
||||
/* Interdisciplinary Graduate School of */
|
||||
/* Science and Engineering */
|
||||
/* */
|
||||
/* All rights reserved. */
|
||||
/* */
|
||||
/* Redistribution and use in source and binary forms, with or */
|
||||
/* without modification, are permitted provided that the following */
|
||||
/* conditions are met: */
|
||||
/* */
|
||||
/* - Redistributions of source code must retain the above copyright */
|
||||
/* notice, this list of conditions and the following disclaimer. */
|
||||
/* - 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. */
|
||||
/* - Neither the name of the HTS working group 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 COPYRIGHT HOLDERS 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 COPYRIGHT OWNER 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. */
|
||||
/* ----------------------------------------------------------------- */
|
||||
|
||||
#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"
|
||||
#ifndef FLITE_PLUS_HTS_ENGINE
|
||||
#include "cst_units.h"
|
||||
#endif /* !FLITE_PLUS_HTS_ENGINE */
|
||||
#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
|
173
3rdparty/flite_hts_engine/flite/lang/cmu_us_kal/cmu_us_kal.c
vendored
Normal file
173
3rdparty/flite_hts_engine/flite/lang/cmu_us_kal/cmu_us_kal.c
vendored
Normal file
|
@ -0,0 +1,173 @@
|
|||
/*************************************************************************/
|
||||
/* */
|
||||
/* Language Technologies Institute */
|
||||
/* Carnegie Mellon University */
|
||||
/* Copyright (c) 1999-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: December 2000 */
|
||||
/*************************************************************************/
|
||||
/* */
|
||||
/* A simple voice defintion */
|
||||
/* */
|
||||
/*************************************************************************/
|
||||
|
||||
/* ----------------------------------------------------------------- */
|
||||
/* The English TTS System "Flite+hts_engine" */
|
||||
/* developed by HTS Working Group */
|
||||
/* http://hts-engine.sourceforge.net/ */
|
||||
/* ----------------------------------------------------------------- */
|
||||
/* */
|
||||
/* Copyright (c) 2005-2013 Nagoya Institute of Technology */
|
||||
/* Department of Computer Science */
|
||||
/* */
|
||||
/* 2005-2008 Tokyo Institute of Technology */
|
||||
/* Interdisciplinary Graduate School of */
|
||||
/* Science and Engineering */
|
||||
/* */
|
||||
/* All rights reserved. */
|
||||
/* */
|
||||
/* Redistribution and use in source and binary forms, with or */
|
||||
/* without modification, are permitted provided that the following */
|
||||
/* conditions are met: */
|
||||
/* */
|
||||
/* - Redistributions of source code must retain the above copyright */
|
||||
/* notice, this list of conditions and the following disclaimer. */
|
||||
/* - 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. */
|
||||
/* - Neither the name of the HTS working group 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 COPYRIGHT HOLDERS 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 COPYRIGHT OWNER 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. */
|
||||
/* ----------------------------------------------------------------- */
|
||||
|
||||
#include "flite.h"
|
||||
#ifndef FLITE_PLUS_HTS_ENGINE
|
||||
#include "cst_diphone.h"
|
||||
#endif /* !FLITE_PLUS_HTS_ENGINE */
|
||||
#include "usenglish.h"
|
||||
#include "cmu_lex.h"
|
||||
|
||||
static cst_utterance *cmu_us_kal_postlex(cst_utterance *u);
|
||||
#ifndef FLITE_PLUS_HTS_ENGINE
|
||||
extern cst_diphone_db cmu_us_kal_db;
|
||||
#endif /* !FLITE_PLUS_HTS_ENGINE */
|
||||
|
||||
cst_voice *cmu_us_kal_diphone = NULL;
|
||||
|
||||
cst_voice *register_cmu_us_kal(const char *voxdir)
|
||||
{
|
||||
cst_voice *v;
|
||||
cst_lexicon *lex;
|
||||
|
||||
if (cmu_us_kal_diphone)
|
||||
return cmu_us_kal_diphone; /* Already registered */
|
||||
|
||||
v = new_voice();
|
||||
v->name = "kal";
|
||||
|
||||
/* Set up basic values for synthesizing with this voice */
|
||||
usenglish_init(v);
|
||||
#ifndef FLITE_PLUS_HTS_ENGINE
|
||||
flite_feat_set_string(v->features,"name","cmu_us_kal_diphone");
|
||||
#endif /* !FLITE_PLUS_HTS_ENGINE */
|
||||
|
||||
/* Lexicon */
|
||||
lex = cmu_lex_init();
|
||||
flite_feat_set(v->features,"lexicon",lexicon_val(lex));
|
||||
|
||||
#ifndef FLITE_PLUS_HTS_ENGINE
|
||||
/* Intonation */
|
||||
flite_feat_set_float(v->features,"int_f0_target_mean",95.0);
|
||||
flite_feat_set_float(v->features,"int_f0_target_stddev",11.0);
|
||||
|
||||
flite_feat_set_float(v->features,"duration_stretch",1.1);
|
||||
#endif /* !FLITE_PLUS_HTS_ENGINE */
|
||||
|
||||
/* Post lexical rules */
|
||||
flite_feat_set(v->features,"postlex_func",uttfunc_val(&cmu_us_kal_postlex));
|
||||
|
||||
#ifndef FLITE_PLUS_HTS_ENGINE
|
||||
/* Waveform synthesis: diphone_synth */
|
||||
flite_feat_set(v->features,"wave_synth_func",uttfunc_val(&diphone_synth));
|
||||
flite_feat_set(v->features,"diphone_db",diphone_db_val(&cmu_us_kal_db));
|
||||
flite_feat_set_int(v->features,"sample_rate",cmu_us_kal_db.sts->sample_rate);
|
||||
flite_feat_set_string(v->features,"resynth_type","fixed");
|
||||
flite_feat_set_string(v->features,"join_type","modified_lpc");
|
||||
#endif /* !FLITE_PLUS_HTS_ENGINE */
|
||||
|
||||
cmu_us_kal_diphone = v;
|
||||
|
||||
return cmu_us_kal_diphone;
|
||||
}
|
||||
|
||||
void unregister_cmu_us_kal(cst_voice *v)
|
||||
{
|
||||
if (v != cmu_us_kal_diphone)
|
||||
return;
|
||||
delete_voice(v);
|
||||
cmu_us_kal_diphone = NULL;
|
||||
}
|
||||
|
||||
#ifndef FLITE_PLUS_HTS_ENGINE
|
||||
static void fix_ah(cst_utterance *u)
|
||||
{
|
||||
/* This should really be done in the index itself */
|
||||
const cst_item *s;
|
||||
|
||||
for (s=relation_head(utt_relation(u,"Segment")); s; s=item_next(s))
|
||||
if (cst_streq(item_feat_string(s,"name"),"ah"))
|
||||
item_set_string(s,"name","aa");
|
||||
}
|
||||
#endif /* !FLITE_PLUS_HTS_ENGINE */
|
||||
|
||||
static cst_utterance *cmu_us_kal_postlex(cst_utterance *u)
|
||||
{
|
||||
cmu_postlex(u);
|
||||
#ifndef FLITE_PLUS_HTS_ENGINE
|
||||
fix_ah(u);
|
||||
#endif /* !FLITE_PLUS_HTS_ENGINE */
|
||||
|
||||
return u;
|
||||
}
|
374
3rdparty/flite_hts_engine/flite/lang/cmulex/cmu_lex.c
vendored
Normal file
374
3rdparty/flite_hts_engine/flite/lang/cmulex/cmu_lex.c
vendored
Normal 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;
|
||||
|
||||
}
|
55
3rdparty/flite_hts_engine/flite/lang/cmulex/cmu_lex.h
vendored
Normal file
55
3rdparty/flite_hts_engine/flite/lang/cmulex/cmu_lex.h
vendored
Normal 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
|
||||
|
10
3rdparty/flite_hts_engine/flite/lang/cmulex/cmu_lex_data.c
vendored
Normal file
10
3rdparty/flite_hts_engine/flite/lang/cmulex/cmu_lex_data.c
vendored
Normal file
|
@ -0,0 +1,10 @@
|
|||
/*******************************************************/
|
||||
/** generated lexicon data file from cmu */
|
||||
/*******************************************************/
|
||||
|
||||
const unsigned char cmu_lex_data[] =
|
||||
{
|
||||
0,
|
||||
#include "cmu_lex_data_raw.c"
|
||||
};
|
||||
|
36965
3rdparty/flite_hts_engine/flite/lang/cmulex/cmu_lex_data_raw.c
vendored
Normal file
36965
3rdparty/flite_hts_engine/flite/lang/cmulex/cmu_lex_data_raw.c
vendored
Normal file
File diff suppressed because it is too large
Load diff
88
3rdparty/flite_hts_engine/flite/lang/cmulex/cmu_lex_entries.c
vendored
Normal file
88
3rdparty/flite_hts_engine/flite/lang/cmulex/cmu_lex_entries.c
vendored
Normal 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
|
||||
};
|
||||
|
254
3rdparty/flite_hts_engine/flite/lang/cmulex/cmu_lex_entries_huff_table.c
vendored
Normal file
254
3rdparty/flite_hts_engine/flite/lang/cmulex/cmu_lex_entries_huff_table.c
vendored
Normal 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 */
|
1
3rdparty/flite_hts_engine/flite/lang/cmulex/cmu_lex_num_bytes.c
vendored
Normal file
1
3rdparty/flite_hts_engine/flite/lang/cmulex/cmu_lex_num_bytes.c
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
410522
|
254
3rdparty/flite_hts_engine/flite/lang/cmulex/cmu_lex_phones_huff_table.c
vendored
Normal file
254
3rdparty/flite_hts_engine/flite/lang/cmulex/cmu_lex_phones_huff_table.c
vendored
Normal 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 */
|
25544
3rdparty/flite_hts_engine/flite/lang/cmulex/cmu_lts_model.c
vendored
Normal file
25544
3rdparty/flite_hts_engine/flite/lang/cmulex/cmu_lts_model.c
vendored
Normal file
File diff suppressed because it is too large
Load diff
25556
3rdparty/flite_hts_engine/flite/lang/cmulex/cmu_lts_model.h
vendored
Normal file
25556
3rdparty/flite_hts_engine/flite/lang/cmulex/cmu_lts_model.h
vendored
Normal file
File diff suppressed because it is too large
Load diff
154
3rdparty/flite_hts_engine/flite/lang/cmulex/cmu_lts_rules.c
vendored
Normal file
154
3rdparty/flite_hts_engine/flite/lang/cmulex/cmu_lts_rules.c
vendored
Normal 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
|
||||
};
|
||||
|
110
3rdparty/flite_hts_engine/flite/lang/cmulex/cmu_postlex.c
vendored
Normal file
110
3rdparty/flite_hts_engine/flite/lang/cmulex/cmu_postlex.c
vendored
Normal 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;
|
||||
}
|
1568
3rdparty/flite_hts_engine/flite/lang/usenglish/us_aswd.c
vendored
Normal file
1568
3rdparty/flite_hts_engine/flite/lang/usenglish/us_aswd.c
vendored
Normal file
File diff suppressed because it is too large
Load diff
410
3rdparty/flite_hts_engine/flite/lang/usenglish/us_expand.c
vendored
Normal file
410
3rdparty/flite_hts_engine/flite/lang/usenglish/us_expand.c
vendored
Normal 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;
|
||||
}
|
||||
|
||||
|
514
3rdparty/flite_hts_engine/flite/lang/usenglish/us_ffeatures.c
vendored
Normal file
514
3rdparty/flite_hts_engine/flite/lang/usenglish/us_ffeatures.c
vendored
Normal file
|
@ -0,0 +1,514 @@
|
|||
/*************************************************************************/
|
||||
/* */
|
||||
/* 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 */
|
||||
/*************************************************************************/
|
||||
|
||||
/* ----------------------------------------------------------------- */
|
||||
/* The English TTS System "Flite+hts_engine" */
|
||||
/* developed by HTS Working Group */
|
||||
/* http://hts-engine.sourceforge.net/ */
|
||||
/* ----------------------------------------------------------------- */
|
||||
/* */
|
||||
/* Copyright (c) 2005-2013 Nagoya Institute of Technology */
|
||||
/* Department of Computer Science */
|
||||
/* */
|
||||
/* 2005-2008 Tokyo Institute of Technology */
|
||||
/* Interdisciplinary Graduate School of */
|
||||
/* Science and Engineering */
|
||||
/* */
|
||||
/* All rights reserved. */
|
||||
/* */
|
||||
/* Redistribution and use in source and binary forms, with or */
|
||||
/* without modification, are permitted provided that the following */
|
||||
/* conditions are met: */
|
||||
/* */
|
||||
/* - Redistributions of source code must retain the above copyright */
|
||||
/* notice, this list of conditions and the following disclaimer. */
|
||||
/* - 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. */
|
||||
/* - Neither the name of the HTS working group 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 COPYRIGHT HOLDERS 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 COPYRIGHT OWNER 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. */
|
||||
/* ----------------------------------------------------------------- */
|
||||
|
||||
#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;
|
||||
}
|
||||
|
||||
#ifdef FLITE_PLUS_HTS_ENGINE
|
||||
|
||||
const cst_val *accented(const cst_item *p); /* defined in cst_ffeatures.c */
|
||||
|
||||
int item_after_length(const cst_item *n){
|
||||
int i = 0;
|
||||
if(n == NULL) return 0;
|
||||
for(;n;n=n->n,i++);
|
||||
return i;
|
||||
}
|
||||
|
||||
const cst_item *item_first(const cst_item *n){
|
||||
if(n == 0) return 0;
|
||||
for(;n->p != 0;n=n->p);
|
||||
return n;
|
||||
}
|
||||
|
||||
/* 11 12 13 53 54 */
|
||||
static const cst_val *syl_numphones(const cst_item *syl){
|
||||
return val_string_n(item_after_length(item_daughter(item_as(syl,"SylStructure"))));
|
||||
}
|
||||
|
||||
/* 14 */
|
||||
static const cst_val *pos_in_word(const cst_item *syl){
|
||||
const cst_item *ss,*p;
|
||||
int c = 0;
|
||||
|
||||
ss = item_as(syl,"SylStructure");
|
||||
for(p = item_daughter(item_parent(ss));p;p = item_next(p),c++){
|
||||
if(p == ss) return val_string_n(c);
|
||||
}
|
||||
return val_string_n(c);
|
||||
}
|
||||
|
||||
/* 21 by Toda-san */
|
||||
static const cst_val *lisp_distance_to_p_stress(const cst_item *syl){
|
||||
const cst_item *s, *fs;
|
||||
int c;
|
||||
|
||||
s=item_as(syl,"Syllable");
|
||||
fs = path_to_item(syl,"R:SylStructure.parent.R:Phrase.parent.daughter.R:SylStructure.daughter");
|
||||
if (item_equal(s,fs)) return val_string_n(0);
|
||||
s=item_prev(s);
|
||||
for (c=1; s && (!item_equal(s,fs)) && (c < CST_CONST_INT_MAX);
|
||||
s=item_prev(s),c++)
|
||||
if (strcmp("1", ffeature_string(s,"stress")) == 0) return val_string_n(c);
|
||||
if (strcmp("1", ffeature_string(s,"stress")) == 0) return val_string_n(c);
|
||||
else return val_string_n(0);
|
||||
}
|
||||
|
||||
/* 22 by Toda-san */
|
||||
static const cst_val *lisp_distance_to_n_stress(const cst_item *syl){
|
||||
const cst_item *s, *fs;
|
||||
int c;
|
||||
|
||||
s=item_as(syl,"Syllable");
|
||||
fs = path_to_item(syl,"R:SylStructure.parent.R:Phrase.parent.daughtern.R:SylStructure.daughtern");
|
||||
if (item_equal(s,fs)) return val_string_n(0);
|
||||
s=item_next(s);
|
||||
for (c=1; s && (!item_equal(s,fs)) && (c < CST_CONST_INT_MAX);
|
||||
s=item_next(s),c++)
|
||||
if (strcmp("1", ffeature_string(s,"stress")) == 0) return val_string_n(c);
|
||||
if (strcmp("1", ffeature_string(s,"stress")) == 0) return val_string_n(c);
|
||||
else return val_string_n(0);
|
||||
}
|
||||
|
||||
/* 23 by Toda-san */
|
||||
static const cst_val *lisp_distance_to_p_accent(const cst_item *syl){
|
||||
const cst_item *s, *fs;
|
||||
int c;
|
||||
|
||||
s=item_as(syl,"Syllable");
|
||||
fs = path_to_item(syl,"R:SylStructure.parent.R:Phrase.parent.daughter.R:SylStructure.daughter");
|
||||
if (item_equal(s,fs)) return val_string_n(0);
|
||||
s=item_prev(s);
|
||||
for (c=1; s && (!item_equal(s,fs)) && (c < CST_CONST_INT_MAX);
|
||||
s=item_prev(s),c++)
|
||||
if (val_int(accented(s))) return val_string_n(c);
|
||||
if (val_int(accented(s))) return val_string_n(c);
|
||||
else return val_string_n(0);
|
||||
}
|
||||
|
||||
/* 24 by Toda-san */
|
||||
static const cst_val *lisp_distance_to_n_accent(const cst_item *syl){
|
||||
const cst_item *s, *fs;
|
||||
int c;
|
||||
|
||||
s=item_as(syl,"Syllable");
|
||||
fs = path_to_item(syl,"R:SylStructure.parent.R:Phrase.parent.daughtern.R:SylStructure.daughtern");
|
||||
if (item_equal(s,fs)) return val_string_n(0);
|
||||
s=item_next(s);
|
||||
for (c=1; s && (!item_equal(s,fs)) && (c < CST_CONST_INT_MAX);
|
||||
s=item_next(s),c++)
|
||||
if (val_int(accented(s))) return val_string_n(c);
|
||||
if (val_int(accented(s))) return val_string_n(c);
|
||||
else return val_string_n(0);
|
||||
}
|
||||
|
||||
/* 25 */
|
||||
static char syl_vowel_str[16];
|
||||
static cst_val syl_vowel_val;
|
||||
static const cst_val *syl_vowel(const cst_item *syl){
|
||||
/* the vowel in the syllable */
|
||||
const cst_item *ss,*p;
|
||||
int size;
|
||||
|
||||
CST_VAL_TYPE(&syl_vowel_val) = CST_VAL_TYPE_STRING;
|
||||
ss = item_as(syl,"SylStructure");
|
||||
for(p = item_daughter(ss),size = 0;p;p = item_next(p),size++){
|
||||
if(strchr("aeiou",item_name(p)[0]) != NULL){
|
||||
strcpy(syl_vowel_str,item_name(p));
|
||||
CST_VAL_STRING_LVAL(&syl_vowel_val) = syl_vowel_str;
|
||||
return &syl_vowel_val;
|
||||
}
|
||||
}
|
||||
/* no vowel */
|
||||
strcpy(syl_vowel_str,"novowel");
|
||||
CST_VAL_STRING_LVAL(&syl_vowel_val) = syl_vowel_str;
|
||||
return &syl_vowel_val;
|
||||
}
|
||||
|
||||
/* 32 */
|
||||
static const cst_val *pos_in_phrase(const cst_item *syl){
|
||||
const cst_item *ss,*p;
|
||||
int c = 0;
|
||||
|
||||
ss = item_as(syl,"Phrase");
|
||||
for (p = item_first(ss);p;p=item_next(p),c++)
|
||||
if(p == ss) return val_string_n(c);
|
||||
return val_string_n(c);
|
||||
}
|
||||
|
||||
/* 33 */
|
||||
static const cst_val *words_out(const cst_item *syl){
|
||||
const cst_item *ss,*p;
|
||||
int c = 0;
|
||||
|
||||
ss = item_as(syl,"Phrase");
|
||||
for(p = ss;p;p=item_next(p),c++);
|
||||
return val_string_n(c);
|
||||
}
|
||||
|
||||
/* 34 by Toda-san */
|
||||
static const cst_val *content_words_in(const cst_item *word){
|
||||
const cst_item *ss,*p,*fs;
|
||||
int c;
|
||||
|
||||
ss = word;
|
||||
fs = path_to_item(word,"R:Phrase.parent.daughter");
|
||||
|
||||
for (c=0, p=ss; p && (!item_equal(p,fs)) && (c < CST_CONST_INT_MAX);
|
||||
p=item_prev(p))
|
||||
if (cst_streq("content", ffeature_string(p,"gpos"))) c++;
|
||||
|
||||
return val_string_n(c); /* its used randomly as int and float */
|
||||
}
|
||||
|
||||
/* 35 by Toda-san */
|
||||
static const cst_val *content_words_out(const cst_item *word){
|
||||
const cst_item *ss,*p,*fs;
|
||||
int c;
|
||||
|
||||
ss = word;
|
||||
fs = path_to_item(word,"R:Phrase.parent.daughtern");
|
||||
|
||||
for (c=0, p=ss; p && (!item_equal(p,fs)) && (c < CST_CONST_INT_MAX);
|
||||
p=item_next(p))
|
||||
if (cst_streq("content", ffeature_string(p,"gpos"))) c++;
|
||||
|
||||
return val_string_n(c); /* its used randomly as int and float */
|
||||
}
|
||||
|
||||
/* 36 */
|
||||
static const cst_val *lisp_distance_to_p_content(const cst_item *syl){
|
||||
const cst_item *p;
|
||||
int c = 0;
|
||||
|
||||
for(p=item_prev(item_as(syl,"Phrase"));p;p=item_prev(p)){
|
||||
c++;
|
||||
if(gpos(p)==(cst_val*)&val_string_content)
|
||||
break;
|
||||
}
|
||||
return val_string_n(c);
|
||||
}
|
||||
|
||||
/* 37 */
|
||||
static const cst_val *lisp_distance_to_n_content(const cst_item *syl){
|
||||
const cst_item *p;
|
||||
int c = 0;
|
||||
|
||||
for(p=item_next(item_as(syl,"Phrase"));p;p=item_next(p)){
|
||||
c++;
|
||||
if (gpos(p)==(cst_val*)&val_string_content)
|
||||
break;
|
||||
}
|
||||
return val_string_n(c);
|
||||
}
|
||||
|
||||
/* 38 39 40 59 60 by Toda-san */
|
||||
static const cst_val *lisp_num_syls_in_phrase(const cst_item *phrase){
|
||||
const cst_item *sw,*fw;
|
||||
int c;
|
||||
|
||||
sw = path_to_item(phrase,"daughter");
|
||||
fw = path_to_item(phrase,"daughtern");
|
||||
|
||||
for (c=0; sw && (!item_equal(sw,fw)) && (c < CST_CONST_INT_MAX);
|
||||
sw=item_next(sw)) c += ffeature_int(sw, "word_numsyls");
|
||||
c += ffeature_int(sw, "word_numsyls");
|
||||
|
||||
return val_string_n(c);
|
||||
}
|
||||
|
||||
/* 41 42 43 61 62 by Toda-san */
|
||||
static const cst_val *lisp_num_words_in_phrase(const cst_item *phrase){
|
||||
const cst_item *sw,*fw;
|
||||
int c;
|
||||
|
||||
sw = path_to_item(phrase,"daughter");
|
||||
fw = path_to_item(phrase,"daughtern");
|
||||
|
||||
for (c=1; sw && (!item_equal(sw,fw)) && (c < CST_CONST_INT_MAX);
|
||||
sw=item_next(sw)) c++;
|
||||
|
||||
return val_string_n(c);
|
||||
}
|
||||
|
||||
/* 46 by Toda-san */
|
||||
static const cst_val *lisp_total_syls(const cst_item *phrase){
|
||||
const cst_item *sp, *fp;
|
||||
int c;
|
||||
|
||||
sp = phrase;
|
||||
while (item_prev(sp) != NULL) sp = item_prev(sp);
|
||||
fp = phrase;
|
||||
while (item_next(fp) != NULL) fp = item_next(fp);
|
||||
|
||||
for (c = 0; sp && (!item_equal(sp, fp)) && (c < CST_CONST_INT_MAX);
|
||||
sp = item_next(sp)) c += ffeature_int(sp, "lisp_num_syls_in_phrase");
|
||||
c += ffeature_int(sp, "lisp_num_syls_in_phrase");
|
||||
return val_string_n(c);
|
||||
}
|
||||
|
||||
/* 47 by Toda-san */
|
||||
static const cst_val *lisp_total_words(const cst_item *phrase){
|
||||
const cst_item *sp, *fp;
|
||||
int c;
|
||||
|
||||
sp = phrase;
|
||||
while (item_prev(sp) != NULL) sp = item_prev(sp);
|
||||
fp = phrase;
|
||||
while (item_next(fp) != NULL) fp = item_next(fp);
|
||||
|
||||
for (c = 0; sp && (!item_equal(sp, fp)) && (c < CST_CONST_INT_MAX);
|
||||
sp = item_next(sp)) c += ffeature_int(sp, "lisp_num_words_in_phrase");
|
||||
c += ffeature_int(sp, "lisp_num_words_in_phrase");
|
||||
return val_string_n(c);
|
||||
}
|
||||
|
||||
/* 48 by Toda-san */
|
||||
static const cst_val *lisp_total_phrases(const cst_item *phrase){
|
||||
const cst_item *sp, *fp;
|
||||
int c;
|
||||
|
||||
sp = phrase;
|
||||
while (item_prev(sp) != NULL) sp = item_prev(sp);
|
||||
fp = phrase;
|
||||
while (item_next(fp) != NULL) fp = item_next(fp);
|
||||
|
||||
for (c = 1; sp && (!item_equal(sp, fp)) && (c < CST_CONST_INT_MAX);
|
||||
sp = item_next(sp)) c++;
|
||||
|
||||
return val_string_n(c);
|
||||
}
|
||||
|
||||
#endif /* FLITE_PLUS_HTS_ENGINE */
|
||||
|
||||
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);
|
||||
|
||||
#ifdef FLITE_PLUS_HTS_ENGINE
|
||||
ff_register(ffunctions, "syl_numphones",syl_numphones); /* 11 12 13 53 54 */
|
||||
ff_register(ffunctions, "pos_in_word",pos_in_word); /* 14 */
|
||||
ff_register(ffunctions, "lisp_distance_to_p_stress",lisp_distance_to_p_stress); /* 21 */
|
||||
ff_register(ffunctions, "lisp_distance_to_n_stress",lisp_distance_to_n_stress); /* 22 */
|
||||
ff_register(ffunctions, "lisp_distance_to_p_accent",lisp_distance_to_p_accent); /* 23 */
|
||||
ff_register(ffunctions, "lisp_distance_to_n_accent",lisp_distance_to_n_accent); /* 24 */
|
||||
ff_register(ffunctions, "syl_vowel",syl_vowel); /* 25 */
|
||||
ff_register(ffunctions, "pos_in_phrase",pos_in_phrase); /* 32 */
|
||||
ff_register(ffunctions, "words_out",words_out); /* 33 */
|
||||
ff_register(ffunctions, "content_words_in",content_words_in); /* 34 */
|
||||
ff_register(ffunctions, "content_words_out",content_words_out); /* 35 */
|
||||
ff_register(ffunctions, "lisp_distance_to_p_content",lisp_distance_to_p_content); /* 36 */
|
||||
ff_register(ffunctions, "lisp_distance_to_n_content",lisp_distance_to_n_content); /* 37 */
|
||||
ff_register(ffunctions, "lisp_num_syls_in_phrase",lisp_num_syls_in_phrase); /* 38 39 40 59 60 */
|
||||
ff_register(ffunctions, "lisp_num_words_in_phrase",lisp_num_words_in_phrase); /* 41 42 43 61 62 */
|
||||
ff_register(ffunctions, "lisp_total_syls",lisp_total_syls); /* 46 */
|
||||
ff_register(ffunctions, "lisp_total_words",lisp_total_words); /* 47 */
|
||||
ff_register(ffunctions, "lisp_total_phrases",lisp_total_phrases); /* 48 */
|
||||
#endif /* FLITE_PLUS_HTS_ENGINE */
|
||||
}
|
49
3rdparty/flite_hts_engine/flite/lang/usenglish/us_ffeatures.h
vendored
Normal file
49
3rdparty/flite_hts_engine/flite/lang/usenglish/us_ffeatures.h
vendored
Normal 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 */
|
290
3rdparty/flite_hts_engine/flite/lang/usenglish/us_gpos.c
vendored
Normal file
290
3rdparty/flite_hts_engine/flite/lang/usenglish/us_gpos.c
vendored
Normal 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 };
|
||||
|
||||
|
||||
|
234
3rdparty/flite_hts_engine/flite/lang/usenglish/us_int_accent_cart.c
vendored
Normal file
234
3rdparty/flite_hts_engine/flite/lang/usenglish/us_int_accent_cart.c
vendored
Normal 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
|
||||
};
|
144
3rdparty/flite_hts_engine/flite/lang/usenglish/us_int_accent_cart.h
vendored
Normal file
144
3rdparty/flite_hts_engine/flite/lang/usenglish/us_int_accent_cart.h
vendored
Normal 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
|
177
3rdparty/flite_hts_engine/flite/lang/usenglish/us_int_tone_cart.c
vendored
Normal file
177
3rdparty/flite_hts_engine/flite/lang/usenglish/us_int_tone_cart.c
vendored
Normal 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
|
||||
};
|
117
3rdparty/flite_hts_engine/flite/lang/usenglish/us_int_tone_cart.h
vendored
Normal file
117
3rdparty/flite_hts_engine/flite/lang/usenglish/us_int_tone_cart.h
vendored
Normal file
|
@ -0,0 +1,117 @@
|
|||
/*************************************************************************/
|
||||
/* */
|
||||
/* 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 tree for us_int_tone */
|
||||
/** from . */
|
||||
/*******************************************************/
|
||||
|
||||
DEF_STATIC_CONST_VAL_STRING(val_0000,"1");
|
||||
DEF_STATIC_CONST_VAL_STRING(val_0001,"H-H%");
|
||||
#define CTNODE_NO_0000 2
|
||||
DEF_STATIC_CONST_VAL_STRING(val_0002,"cc");
|
||||
DEF_STATIC_CONST_VAL_STRING(val_0003,"NONE");
|
||||
#define CTNODE_NO_0002 4
|
||||
DEF_STATIC_CONST_VAL_STRING(val_0004,"10");
|
||||
#define CTNODE_NO_0004 6
|
||||
DEF_STATIC_CONST_VAL_STRING(val_0005,"md");
|
||||
#define CTNODE_NO_0006 8
|
||||
DEF_STATIC_CONST_VAL_STRING(val_0006,"4");
|
||||
#define CTNODE_NO_0008 10
|
||||
DEF_STATIC_CONST_VAL_STRING(val_0007,"det");
|
||||
#define CTNODE_NO_0010 12
|
||||
DEF_STATIC_CONST_VAL_STRING(val_0008,"3");
|
||||
#define CTNODE_NO_0012 14
|
||||
#define CTNODE_NO_0014 16
|
||||
DEF_STATIC_CONST_VAL_STRING(val_0009,"in");
|
||||
#define CTNODE_NO_0016 18
|
||||
DEF_STATIC_CONST_VAL_STRING(val_0010,"0");
|
||||
DEF_STATIC_CONST_VAL_STRING(val_0011,"L-L%");
|
||||
#define CTNODE_NO_0019 21
|
||||
DEF_STATIC_CONST_VAL_STRING(val_0012,"aux");
|
||||
#define CTNODE_NO_0021 23
|
||||
#define CTNODE_NO_0023 25
|
||||
#define CTNODE_NO_0025 27
|
||||
DEF_STATIC_CONST_VAL_STRING(val_0013,"6");
|
||||
#define CTNODE_NO_0027 29
|
||||
DEF_STATIC_CONST_VAL_STRING(val_0014,"L-H%");
|
||||
#define CTNODE_NO_0029 31
|
||||
DEF_STATIC_CONST_VAL_STRING(val_0015,"5");
|
||||
#define CTNODE_NO_0031 33
|
||||
DEF_STATIC_CONST_VAL_STRING(val_0016,"2");
|
||||
#define CTNODE_NO_0033 35
|
||||
#define CTNODE_NO_0035 37
|
||||
#define CTNODE_NO_0039 41
|
||||
#define CTNODE_NO_0038 42
|
||||
#define CTNODE_NO_0042 44
|
||||
#define CTNODE_NO_0037 45
|
||||
#define CTNODE_NO_0018 46
|
||||
DEF_STATIC_CONST_VAL_STRING(val_0017,"pps");
|
||||
#define CTNODE_NO_0046 48
|
||||
#define CTNODE_NO_0048 50
|
||||
DEF_STATIC_CONST_VAL_STRING(val_0018,"content");
|
||||
#define CTNODE_NO_0051 53
|
||||
#define CTNODE_NO_0053 55
|
||||
#define CTNODE_NO_0055 57
|
||||
#define CTNODE_NO_0057 59
|
||||
#define CTNODE_NO_0059 61
|
||||
#define CTNODE_NO_0061 63
|
||||
#define CTNODE_NO_0063 65
|
||||
#define CTNODE_NO_0065 67
|
||||
#define CTNODE_NO_0067 69
|
||||
DEF_STATIC_CONST_VAL_STRING(val_0019,"to");
|
||||
#define CTNODE_NO_0069 71
|
||||
#define CTNODE_NO_0071 73
|
||||
#define CTNODE_NO_0073 75
|
||||
#define CTNODE_NO_0075 77
|
||||
#define CTNODE_NO_0077 79
|
||||
#define CTNODE_NO_0079 81
|
||||
#define CTNODE_NO_0081 83
|
||||
#define CTNODE_NO_0083 85
|
||||
#define CTNODE_NO_0085 87
|
||||
#define CTNODE_NO_0087 89
|
||||
#define CTNODE_NO_0089 91
|
||||
DEF_STATIC_CONST_VAL_STRING(val_0020,"H-");
|
||||
#define CTNODE_NO_0091 93
|
||||
#define CTNODE_NO_0050 94
|
127
3rdparty/flite_hts_engine/flite/lang/usenglish/us_nums_cart.c
vendored
Normal file
127
3rdparty/flite_hts_engine/flite/lang/usenglish/us_nums_cart.c
vendored
Normal file
|
@ -0,0 +1,127 @@
|
|||
/*******************************************************/
|
||||
/** Autogenerated cart trees for us_nums */
|
||||
/*******************************************************/
|
||||
|
||||
#include "cst_string.h"
|
||||
#include "cst_cart.h"
|
||||
#include "cst_regex.h"
|
||||
#include "us_nums_cart.h"
|
||||
extern const cst_cart us_nums_cart;
|
||||
|
||||
|
||||
static const cst_cart_node us_nums_cart_nodes[] = {
|
||||
{ 0, CST_CART_OP_LESS, CTNODE_us_nums_NO_0000, (cst_val *)&val_0000},
|
||||
{ 1, CST_CART_OP_IS, CTNODE_us_nums_NO_0001, (cst_val *)&val_0001},
|
||||
{ 2, CST_CART_OP_IS, CTNODE_us_nums_NO_0002, (cst_val *)&val_0002},
|
||||
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0003 },
|
||||
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0004 },
|
||||
{ 3, CST_CART_OP_IS, CTNODE_us_nums_NO_0005, (cst_val *)&val_0001},
|
||||
{ 2, CST_CART_OP_IS, CTNODE_us_nums_NO_0006, (cst_val *)&val_0002},
|
||||
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0005 },
|
||||
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0004 },
|
||||
{ 3, CST_CART_OP_IS, CTNODE_us_nums_NO_0009, (cst_val *)&val_0006},
|
||||
{ 0, CST_CART_OP_LESS, CTNODE_us_nums_NO_0010, (cst_val *)&val_0007},
|
||||
{ 1, CST_CART_OP_IS, CTNODE_us_nums_NO_0011, (cst_val *)&val_0006},
|
||||
{ 4, CST_CART_OP_IS, CTNODE_us_nums_NO_0012, (cst_val *)&val_0008},
|
||||
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0009 },
|
||||
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0005 },
|
||||
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0005 },
|
||||
{ 5, CST_CART_OP_IS, CTNODE_us_nums_NO_0016, (cst_val *)&val_0008},
|
||||
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0005 },
|
||||
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0009 },
|
||||
{ 0, CST_CART_OP_LESS, CTNODE_us_nums_NO_0019, (cst_val *)&val_0007},
|
||||
{ 5, CST_CART_OP_IS, CTNODE_us_nums_NO_0020, (cst_val *)&val_0006},
|
||||
{ 3, CST_CART_OP_IS, CTNODE_us_nums_NO_0021, (cst_val *)&val_0008},
|
||||
{ 2, CST_CART_OP_IS, CTNODE_us_nums_NO_0022, (cst_val *)&val_0002},
|
||||
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0009 },
|
||||
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0005 },
|
||||
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0005 },
|
||||
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0005 },
|
||||
{ 6, CST_CART_OP_LESS, CTNODE_us_nums_NO_0027, (cst_val *)&val_0010},
|
||||
{ 1, CST_CART_OP_IS, CTNODE_us_nums_NO_0028, (cst_val *)&val_0011},
|
||||
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0009 },
|
||||
{ 3, CST_CART_OP_IS, CTNODE_us_nums_NO_0030, (cst_val *)&val_0008},
|
||||
{ 1, CST_CART_OP_IS, CTNODE_us_nums_NO_0031, (cst_val *)&val_0008},
|
||||
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0009 },
|
||||
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0005 },
|
||||
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0005 },
|
||||
{ 1, CST_CART_OP_IS, CTNODE_us_nums_NO_0035, (cst_val *)&val_0012},
|
||||
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0009 },
|
||||
{ 3, CST_CART_OP_IS, CTNODE_us_nums_NO_0037, (cst_val *)&val_0008},
|
||||
{ 5, CST_CART_OP_IS, CTNODE_us_nums_NO_0038, (cst_val *)&val_0008},
|
||||
{ 6, CST_CART_OP_LESS, CTNODE_us_nums_NO_0039, (cst_val *)&val_0013},
|
||||
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0009 },
|
||||
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0005 },
|
||||
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0005 },
|
||||
{ 6, CST_CART_OP_LESS, CTNODE_us_nums_NO_0043, (cst_val *)&val_0014},
|
||||
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0005 },
|
||||
{ 6, CST_CART_OP_LESS, CTNODE_us_nums_NO_0045, (cst_val *)&val_0015},
|
||||
{ 6, CST_CART_OP_LESS, CTNODE_us_nums_NO_0046, (cst_val *)&val_0016},
|
||||
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0009 },
|
||||
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0005 },
|
||||
{ 6, CST_CART_OP_LESS, CTNODE_us_nums_NO_0049, (cst_val *)&val_0017},
|
||||
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0005 },
|
||||
{ 6, CST_CART_OP_LESS, CTNODE_us_nums_NO_0051, (cst_val *)&val_0018},
|
||||
{ 1, CST_CART_OP_IS, CTNODE_us_nums_NO_0052, (cst_val *)&val_0019},
|
||||
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0009 },
|
||||
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0005 },
|
||||
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0005 },
|
||||
{ 1, CST_CART_OP_IS, CTNODE_us_nums_NO_0056, (cst_val *)&val_0006},
|
||||
{ 4, CST_CART_OP_IS, CTNODE_us_nums_NO_0057, (cst_val *)&val_0001},
|
||||
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0003 },
|
||||
{ 5, CST_CART_OP_IS, CTNODE_us_nums_NO_0059, (cst_val *)&val_0006},
|
||||
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0005 },
|
||||
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0009 },
|
||||
{ 5, CST_CART_OP_IS, CTNODE_us_nums_NO_0062, (cst_val *)&val_0006},
|
||||
{ 3, CST_CART_OP_IS, CTNODE_us_nums_NO_0063, (cst_val *)&val_0001},
|
||||
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0005 },
|
||||
{ 3, CST_CART_OP_IS, CTNODE_us_nums_NO_0065, (cst_val *)&val_0006},
|
||||
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0009 },
|
||||
{ 1, CST_CART_OP_IS, CTNODE_us_nums_NO_0067, (cst_val *)&val_0019},
|
||||
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0005 },
|
||||
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0003 },
|
||||
{ 1, CST_CART_OP_IS, CTNODE_us_nums_NO_0070, (cst_val *)&val_0019},
|
||||
{ 0, CST_CART_OP_LESS, CTNODE_us_nums_NO_0071, (cst_val *)&val_0020},
|
||||
{ 6, CST_CART_OP_LESS, CTNODE_us_nums_NO_0072, (cst_val *)&val_0021},
|
||||
{ 6, CST_CART_OP_LESS, CTNODE_us_nums_NO_0073, (cst_val *)&val_0022},
|
||||
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0005 },
|
||||
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0003 },
|
||||
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0005 },
|
||||
{ 4, CST_CART_OP_IS, CTNODE_us_nums_NO_0077, (cst_val *)&val_0019},
|
||||
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0009 },
|
||||
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0005 },
|
||||
{ 3, CST_CART_OP_IS, CTNODE_us_nums_NO_0080, (cst_val *)&val_0023},
|
||||
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0003 },
|
||||
{ 1, CST_CART_OP_IS, CTNODE_us_nums_NO_0082, (cst_val *)&val_0008},
|
||||
{ 4, CST_CART_OP_IS, CTNODE_us_nums_NO_0083, (cst_val *)&val_0008},
|
||||
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0005 },
|
||||
{ 0, CST_CART_OP_LESS, CTNODE_us_nums_NO_0085, (cst_val *)&val_0024},
|
||||
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0003 },
|
||||
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0009 },
|
||||
{ 0, CST_CART_OP_LESS, CTNODE_us_nums_NO_0088, (cst_val *)&val_0025},
|
||||
{ 6, CST_CART_OP_LESS, CTNODE_us_nums_NO_0089, (cst_val *)&val_0026},
|
||||
{ 6, CST_CART_OP_LESS, CTNODE_us_nums_NO_0090, (cst_val *)&val_0027},
|
||||
{ 6, CST_CART_OP_LESS, CTNODE_us_nums_NO_0091, (cst_val *)&val_0028},
|
||||
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0005 },
|
||||
{ 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, (cst_val *)&val_0005 },
|
||||
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0005 },
|
||||
{ 255, CST_CART_OP_NONE, 0, 0}};
|
||||
|
||||
|
||||
|
||||
static const char * const us_nums_feat_table[] = {
|
||||
"num_digits",
|
||||
"p.token_pos_guess",
|
||||
"month_range",
|
||||
"n.token_pos_guess",
|
||||
"p.p.token_pos_guess",
|
||||
"n.n.token_pos_guess",
|
||||
"name",
|
||||
NULL };
|
||||
|
||||
const cst_cart us_nums_cart = {
|
||||
us_nums_cart_nodes,
|
||||
us_nums_feat_table
|
||||
};
|
82
3rdparty/flite_hts_engine/flite/lang/usenglish/us_nums_cart.h
vendored
Normal file
82
3rdparty/flite_hts_engine/flite/lang/usenglish/us_nums_cart.h
vendored
Normal file
|
@ -0,0 +1,82 @@
|
|||
/*******************************************************/
|
||||
/** Autogenerated cart tree for us_nums */
|
||||
/** from . */
|
||||
/*******************************************************/
|
||||
|
||||
DEF_STATIC_CONST_VAL_FLOAT(val_0000,3.800000);
|
||||
DEF_STATIC_CONST_VAL_STRING(val_0001,"month");
|
||||
DEF_STATIC_CONST_VAL_STRING(val_0002,"0");
|
||||
DEF_STATIC_CONST_VAL_STRING(val_0003,"year");
|
||||
#define CTNODE_us_nums_NO_0002 4
|
||||
DEF_STATIC_CONST_VAL_STRING(val_0004,"ordinal");
|
||||
#define CTNODE_us_nums_NO_0001 5
|
||||
DEF_STATIC_CONST_VAL_STRING(val_0005,"cardinal");
|
||||
#define CTNODE_us_nums_NO_0006 8
|
||||
#define CTNODE_us_nums_NO_0005 9
|
||||
DEF_STATIC_CONST_VAL_STRING(val_0006,"numeric");
|
||||
DEF_STATIC_CONST_VAL_FLOAT(val_0007,2.000000);
|
||||
DEF_STATIC_CONST_VAL_STRING(val_0008,"sym");
|
||||
DEF_STATIC_CONST_VAL_STRING(val_0009,"digits");
|
||||
#define CTNODE_us_nums_NO_0012 14
|
||||
#define CTNODE_us_nums_NO_0011 15
|
||||
#define CTNODE_us_nums_NO_0010 16
|
||||
#define CTNODE_us_nums_NO_0016 18
|
||||
#define CTNODE_us_nums_NO_0009 19
|
||||
#define CTNODE_us_nums_NO_0022 24
|
||||
#define CTNODE_us_nums_NO_0021 25
|
||||
#define CTNODE_us_nums_NO_0020 26
|
||||
#define CTNODE_us_nums_NO_0019 27
|
||||
DEF_STATIC_CONST_VAL_FLOAT(val_0010,302.299988);
|
||||
DEF_STATIC_CONST_VAL_STRING(val_0011,"flight");
|
||||
#define CTNODE_us_nums_NO_0028 30
|
||||
#define CTNODE_us_nums_NO_0031 33
|
||||
#define CTNODE_us_nums_NO_0030 34
|
||||
#define CTNODE_us_nums_NO_0027 35
|
||||
DEF_STATIC_CONST_VAL_STRING(val_0012,"a");
|
||||
#define CTNODE_us_nums_NO_0035 37
|
||||
DEF_STATIC_CONST_VAL_FLOAT(val_0013,669.200012);
|
||||
#define CTNODE_us_nums_NO_0039 41
|
||||
#define CTNODE_us_nums_NO_0038 42
|
||||
#define CTNODE_us_nums_NO_0037 43
|
||||
DEF_STATIC_CONST_VAL_FLOAT(val_0014,373.200012);
|
||||
#define CTNODE_us_nums_NO_0043 45
|
||||
DEF_STATIC_CONST_VAL_FLOAT(val_0015,436.200012);
|
||||
DEF_STATIC_CONST_VAL_FLOAT(val_0016,392.600006);
|
||||
#define CTNODE_us_nums_NO_0046 48
|
||||
#define CTNODE_us_nums_NO_0045 49
|
||||
DEF_STATIC_CONST_VAL_FLOAT(val_0017,716.500000);
|
||||
#define CTNODE_us_nums_NO_0049 51
|
||||
DEF_STATIC_CONST_VAL_FLOAT(val_0018,773.599976);
|
||||
DEF_STATIC_CONST_VAL_STRING(val_0019,"_other_");
|
||||
#define CTNODE_us_nums_NO_0052 54
|
||||
#define CTNODE_us_nums_NO_0051 55
|
||||
#define CTNODE_us_nums_NO_0000 56
|
||||
#define CTNODE_us_nums_NO_0057 59
|
||||
#define CTNODE_us_nums_NO_0059 61
|
||||
#define CTNODE_us_nums_NO_0056 62
|
||||
#define CTNODE_us_nums_NO_0063 65
|
||||
#define CTNODE_us_nums_NO_0065 67
|
||||
#define CTNODE_us_nums_NO_0067 69
|
||||
#define CTNODE_us_nums_NO_0062 70
|
||||
DEF_STATIC_CONST_VAL_FLOAT(val_0020,4.400000);
|
||||
DEF_STATIC_CONST_VAL_FLOAT(val_0021,2959.600098);
|
||||
DEF_STATIC_CONST_VAL_FLOAT(val_0022,1773.400024);
|
||||
#define CTNODE_us_nums_NO_0073 75
|
||||
#define CTNODE_us_nums_NO_0072 76
|
||||
#define CTNODE_us_nums_NO_0071 77
|
||||
#define CTNODE_us_nums_NO_0077 79
|
||||
#define CTNODE_us_nums_NO_0070 80
|
||||
DEF_STATIC_CONST_VAL_STRING(val_0023,"to");
|
||||
#define CTNODE_us_nums_NO_0080 82
|
||||
#define CTNODE_us_nums_NO_0083 85
|
||||
DEF_STATIC_CONST_VAL_FLOAT(val_0024,4.600000);
|
||||
#define CTNODE_us_nums_NO_0085 87
|
||||
#define CTNODE_us_nums_NO_0082 88
|
||||
DEF_STATIC_CONST_VAL_FLOAT(val_0025,4.800000);
|
||||
DEF_STATIC_CONST_VAL_FLOAT(val_0026,2880.000000);
|
||||
DEF_STATIC_CONST_VAL_FLOAT(val_0027,1633.199951);
|
||||
DEF_STATIC_CONST_VAL_FLOAT(val_0028,1306.400024);
|
||||
#define CTNODE_us_nums_NO_0091 93
|
||||
#define CTNODE_us_nums_NO_0090 94
|
||||
#define CTNODE_us_nums_NO_0089 95
|
||||
#define CTNODE_us_nums_NO_0088 96
|
257
3rdparty/flite_hts_engine/flite/lang/usenglish/us_phoneset.c
vendored
Normal file
257
3rdparty/flite_hts_engine/flite/lang/usenglish/us_phoneset.c
vendored
Normal file
|
@ -0,0 +1,257 @@
|
|||
/*************************************************************************/
|
||||
/* */
|
||||
/* 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. */
|
||||
/* */
|
||||
/*******************************************************/
|
||||
/** Autogenerated phoneset trees for us */
|
||||
/*******************************************************/
|
||||
|
||||
#include "cst_string.h"
|
||||
#include "cst_phoneset.h"
|
||||
|
||||
extern const cst_phoneset us_phoneset;
|
||||
|
||||
static const char * const us_featnames[] = {
|
||||
"vc",
|
||||
"vlng",
|
||||
"vheight",
|
||||
"vfront",
|
||||
"vrnd",
|
||||
"ctype",
|
||||
"cplace",
|
||||
"cvox",
|
||||
NULL };
|
||||
|
||||
static const char * const us_phonenames[] = {
|
||||
"aa",
|
||||
"ae",
|
||||
"ah",
|
||||
"ao",
|
||||
"aw",
|
||||
"ax",
|
||||
"axr",
|
||||
"ay",
|
||||
"b",
|
||||
"ch",
|
||||
"d",
|
||||
"dh",
|
||||
"dx",
|
||||
"eh",
|
||||
"el",
|
||||
"em",
|
||||
"en",
|
||||
"er",
|
||||
"ey",
|
||||
"f",
|
||||
"g",
|
||||
"hh",
|
||||
"hv",
|
||||
"ih",
|
||||
"iy",
|
||||
"jh",
|
||||
"k",
|
||||
"l",
|
||||
"m",
|
||||
"n",
|
||||
"nx",
|
||||
"ng",
|
||||
"ow",
|
||||
"oy",
|
||||
"p",
|
||||
"r",
|
||||
"s",
|
||||
"sh",
|
||||
"t",
|
||||
"th",
|
||||
"uh",
|
||||
"uw",
|
||||
"v",
|
||||
"w",
|
||||
"y",
|
||||
"z",
|
||||
"zh",
|
||||
"pau",
|
||||
"h#",
|
||||
"brth",
|
||||
NULL };
|
||||
|
||||
static const int us_fv_000[] = { 0, 1, 2, 2, 3, 4, 4, 4, -1 };
|
||||
static const int us_fv_001[] = { 0, 5, 2, 6, 3, 4, 4, 4, -1 };
|
||||
static const int us_fv_002[] = { 0, 5, 7, 7, 3, 4, 4, 4, -1 };
|
||||
static const int us_fv_003[] = { 0, 1, 2, 2, 0, 4, 4, 4, -1 };
|
||||
static const int us_fv_004[] = { 0, 8, 2, 7, 3, 4, 4, 4, -1 };
|
||||
static const int us_fv_005[] = { 0, 9, 7, 7, 3, 4, 4, 4, -1 };
|
||||
static const int us_fv_006[] = { 0, 9, 7, 7, 3, 10, 9, 0, -1 };
|
||||
static const int us_fv_007[] = { 0, 8, 2, 7, 3, 4, 4, 4, -1 };
|
||||
static const int us_fv_008[] = { 3, 4, 4, 4, 4, 5, 1, 0, -1 };
|
||||
static const int us_fv_009[] = { 3, 4, 4, 4, 4, 9, 11, 3, -1 };
|
||||
static const int us_fv_010[] = { 3, 4, 4, 4, 4, 5, 9, 0, -1 };
|
||||
static const int us_fv_011[] = { 3, 4, 4, 4, 4, 12, 8, 0, -1 };
|
||||
static const int us_fv_012[] = { 3, 9, 4, 4, 4, 5, 9, 0, -1 };
|
||||
static const int us_fv_013[] = { 0, 5, 7, 6, 3, 4, 4, 4, -1 };
|
||||
static const int us_fv_014[] = { 0, 5, 4, 4, 4, 1, 9, 0, -1 };
|
||||
static const int us_fv_015[] = { 0, 5, 4, 4, 4, 13, 1, 0, -1 };
|
||||
static const int us_fv_016[] = { 0, 5, 4, 4, 4, 13, 9, 0, -1 };
|
||||
static const int us_fv_017[] = { 0, 9, 7, 7, 3, 10, 4, 4, -1 };
|
||||
static const int us_fv_018[] = { 0, 8, 7, 6, 3, 4, 4, 4, -1 };
|
||||
static const int us_fv_019[] = { 3, 4, 4, 4, 4, 12, 14, 3, -1 };
|
||||
static const int us_fv_020[] = { 3, 4, 4, 4, 4, 5, 15, 0, -1 };
|
||||
static const int us_fv_021[] = { 3, 4, 4, 4, 4, 12, 16, 3, -1 };
|
||||
static const int us_fv_022[] = { 3, 4, 4, 4, 4, 12, 16, 0, -1 };
|
||||
static const int us_fv_023[] = { 0, 5, 6, 6, 3, 4, 4, 4, -1 };
|
||||
static const int us_fv_024[] = { 0, 1, 6, 6, 3, 4, 4, 4, -1 };
|
||||
static const int us_fv_025[] = { 3, 4, 4, 4, 4, 9, 11, 0, -1 };
|
||||
static const int us_fv_026[] = { 3, 4, 4, 4, 4, 5, 15, 3, -1 };
|
||||
static const int us_fv_027[] = { 3, 4, 4, 4, 4, 1, 9, 0, -1 };
|
||||
static const int us_fv_028[] = { 3, 4, 4, 4, 4, 13, 1, 0, -1 };
|
||||
static const int us_fv_029[] = { 3, 4, 4, 4, 4, 13, 9, 0, -1 };
|
||||
static const int us_fv_030[] = { 3, 4, 4, 4, 4, 13, 8, 0, -1 };
|
||||
static const int us_fv_031[] = { 3, 4, 4, 4, 4, 13, 15, 0, -1 };
|
||||
static const int us_fv_032[] = { 0, 8, 7, 2, 0, 4, 4, 4, -1 };
|
||||
static const int us_fv_033[] = { 0, 8, 7, 2, 0, 4, 4, 4, -1 };
|
||||
static const int us_fv_034[] = { 3, 4, 4, 4, 4, 5, 1, 3, -1 };
|
||||
static const int us_fv_035[] = { 3, 4, 4, 4, 4, 10, 9, 0, -1 };
|
||||
static const int us_fv_036[] = { 3, 4, 4, 4, 4, 12, 9, 3, -1 };
|
||||
static const int us_fv_037[] = { 3, 4, 4, 4, 4, 12, 11, 3, -1 };
|
||||
static const int us_fv_038[] = { 3, 4, 4, 4, 4, 5, 9, 3, -1 };
|
||||
static const int us_fv_039[] = { 3, 4, 4, 4, 4, 12, 8, 3, -1 };
|
||||
static const int us_fv_040[] = { 0, 5, 6, 2, 0, 4, 4, 4, -1 };
|
||||
static const int us_fv_041[] = { 0, 1, 6, 2, 0, 4, 4, 4, -1 };
|
||||
static const int us_fv_042[] = { 3, 4, 4, 4, 4, 12, 14, 0, -1 };
|
||||
static const int us_fv_043[] = { 3, 4, 4, 4, 4, 10, 1, 0, -1 };
|
||||
static const int us_fv_044[] = { 3, 4, 4, 4, 4, 10, 11, 0, -1 };
|
||||
static const int us_fv_045[] = { 3, 4, 4, 4, 4, 12, 9, 0, -1 };
|
||||
static const int us_fv_046[] = { 3, 4, 4, 4, 4, 12, 11, 0, -1 };
|
||||
static const int us_fv_047[] = { 3, 4, 4, 4, 4, 4, 4, 3, -1 };
|
||||
static const int us_fv_048[] = { 3, 4, 4, 4, 4, 4, 4, 3, -1 };
|
||||
static const int us_fv_049[] = { 3, 4, 4, 4, 4, 4, 4, 3, -1 };
|
||||
static const int us_fv_050[] = { 0 };
|
||||
|
||||
static const int * const us_fvtable[] = {
|
||||
us_fv_000,
|
||||
us_fv_001,
|
||||
us_fv_002,
|
||||
us_fv_003,
|
||||
us_fv_004,
|
||||
us_fv_005,
|
||||
us_fv_006,
|
||||
us_fv_007,
|
||||
us_fv_008,
|
||||
us_fv_009,
|
||||
us_fv_010,
|
||||
us_fv_011,
|
||||
us_fv_012,
|
||||
us_fv_013,
|
||||
us_fv_014,
|
||||
us_fv_015,
|
||||
us_fv_016,
|
||||
us_fv_017,
|
||||
us_fv_018,
|
||||
us_fv_019,
|
||||
us_fv_020,
|
||||
us_fv_021,
|
||||
us_fv_022,
|
||||
us_fv_023,
|
||||
us_fv_024,
|
||||
us_fv_025,
|
||||
us_fv_026,
|
||||
us_fv_027,
|
||||
us_fv_028,
|
||||
us_fv_029,
|
||||
us_fv_030,
|
||||
us_fv_031,
|
||||
us_fv_032,
|
||||
us_fv_033,
|
||||
us_fv_034,
|
||||
us_fv_035,
|
||||
us_fv_036,
|
||||
us_fv_037,
|
||||
us_fv_038,
|
||||
us_fv_039,
|
||||
us_fv_040,
|
||||
us_fv_041,
|
||||
us_fv_042,
|
||||
us_fv_043,
|
||||
us_fv_044,
|
||||
us_fv_045,
|
||||
us_fv_046,
|
||||
us_fv_047,
|
||||
us_fv_048,
|
||||
us_fv_049,
|
||||
us_fv_050 };
|
||||
|
||||
DEF_STATIC_CONST_VAL_STRING(featval_0,"+");
|
||||
DEF_STATIC_CONST_VAL_STRING(featval_1,"l");
|
||||
DEF_STATIC_CONST_VAL_STRING(featval_2,"3");
|
||||
DEF_STATIC_CONST_VAL_STRING(featval_3,"-");
|
||||
DEF_STATIC_CONST_VAL_STRING(featval_4,"0");
|
||||
DEF_STATIC_CONST_VAL_STRING(featval_5,"s");
|
||||
DEF_STATIC_CONST_VAL_STRING(featval_6,"1");
|
||||
DEF_STATIC_CONST_VAL_STRING(featval_7,"2");
|
||||
DEF_STATIC_CONST_VAL_STRING(featval_8,"d");
|
||||
DEF_STATIC_CONST_VAL_STRING(featval_9,"a");
|
||||
DEF_STATIC_CONST_VAL_STRING(featval_10,"r");
|
||||
DEF_STATIC_CONST_VAL_STRING(featval_11,"p");
|
||||
DEF_STATIC_CONST_VAL_STRING(featval_12,"f");
|
||||
DEF_STATIC_CONST_VAL_STRING(featval_13,"n");
|
||||
DEF_STATIC_CONST_VAL_STRING(featval_14,"b");
|
||||
DEF_STATIC_CONST_VAL_STRING(featval_15,"v");
|
||||
DEF_STATIC_CONST_VAL_STRING(featval_16,"g");
|
||||
|
||||
static const cst_val * const us_featvals[] = {
|
||||
(cst_val *)&featval_0,
|
||||
(cst_val *)&featval_1,
|
||||
(cst_val *)&featval_2,
|
||||
(cst_val *)&featval_3,
|
||||
(cst_val *)&featval_4,
|
||||
(cst_val *)&featval_5,
|
||||
(cst_val *)&featval_6,
|
||||
(cst_val *)&featval_7,
|
||||
(cst_val *)&featval_8,
|
||||
(cst_val *)&featval_9,
|
||||
(cst_val *)&featval_10,
|
||||
(cst_val *)&featval_11,
|
||||
(cst_val *)&featval_12,
|
||||
(cst_val *)&featval_13,
|
||||
(cst_val *)&featval_14,
|
||||
(cst_val *)&featval_15,
|
||||
(cst_val *)&featval_16,
|
||||
NULL };
|
||||
|
||||
const cst_phoneset us_phoneset = {
|
||||
"us",
|
||||
us_featnames,
|
||||
us_featvals,
|
||||
us_phonenames,
|
||||
"pau",
|
||||
50,
|
||||
us_fvtable
|
||||
};
|
44
3rdparty/flite_hts_engine/flite/lang/usenglish/us_phrasing_cart.c
vendored
Normal file
44
3rdparty/flite_hts_engine/flite/lang/usenglish/us_phrasing_cart.c
vendored
Normal file
|
@ -0,0 +1,44 @@
|
|||
/*******************************************************/
|
||||
/** Autogenerated cart trees for us_phrasing */
|
||||
/*******************************************************/
|
||||
|
||||
#include "cst_string.h"
|
||||
#include "cst_cart.h"
|
||||
#include "cst_regex.h"
|
||||
#include "us_phrasing_cart.h"
|
||||
extern const cst_cart us_phrasing_cart;
|
||||
|
||||
|
||||
static const cst_cart_node us_phrasing_cart_nodes[] = {
|
||||
{ 0, CST_CART_OP_IS, CTNODE_us_phrasing_NO_0000, (cst_val *)&val_0000},
|
||||
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0001 },
|
||||
{ 1, CST_CART_OP_IS, CTNODE_us_phrasing_NO_0002, (cst_val *)&val_0002},
|
||||
{ 2, CST_CART_OP_IS, CTNODE_us_phrasing_NO_0003, (cst_val *)&val_0003},
|
||||
{ 3, CST_CART_OP_IS, CTNODE_us_phrasing_NO_0004, (cst_val *)&val_0004},
|
||||
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0001 },
|
||||
{ 4, CST_CART_OP_IS, CTNODE_us_phrasing_NO_0006, (cst_val *)&val_0004},
|
||||
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0001 },
|
||||
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0005 },
|
||||
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0001 },
|
||||
{ 5, CST_CART_OP_IS, CTNODE_us_phrasing_NO_0010, (cst_val *)&val_0002},
|
||||
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0001 },
|
||||
{ 4, CST_CART_OP_IS, CTNODE_us_phrasing_NO_0012, (cst_val *)&val_0004},
|
||||
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0001 },
|
||||
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0005 },
|
||||
{ 255, CST_CART_OP_NONE, 0, 0}};
|
||||
|
||||
|
||||
|
||||
static const char * const us_phrasing_feat_table[] = {
|
||||
"R:Token.parent.n.name",
|
||||
"R:Token.n.name",
|
||||
"R:Token.parent.punc",
|
||||
"R:Token.parent.break",
|
||||
"break",
|
||||
"n.name",
|
||||
NULL };
|
||||
|
||||
const cst_cart us_phrasing_cart = {
|
||||
us_phrasing_cart_nodes,
|
||||
us_phrasing_feat_table
|
||||
};
|
18
3rdparty/flite_hts_engine/flite/lang/usenglish/us_phrasing_cart.h
vendored
Normal file
18
3rdparty/flite_hts_engine/flite/lang/usenglish/us_phrasing_cart.h
vendored
Normal file
|
@ -0,0 +1,18 @@
|
|||
/*******************************************************/
|
||||
/** Autogenerated cart tree for us_phrasing */
|
||||
/** from . */
|
||||
/*******************************************************/
|
||||
|
||||
DEF_STATIC_CONST_VAL_STRING(val_0000,"--");
|
||||
DEF_STATIC_CONST_VAL_STRING(val_0001,"BB");
|
||||
#define CTNODE_us_phrasing_NO_0000 2
|
||||
DEF_STATIC_CONST_VAL_STRING(val_0002,"0");
|
||||
DEF_STATIC_CONST_VAL_STRING(val_0003,"");
|
||||
DEF_STATIC_CONST_VAL_STRING(val_0004,"1");
|
||||
#define CTNODE_us_phrasing_NO_0004 6
|
||||
#define CTNODE_us_phrasing_NO_0006 8
|
||||
DEF_STATIC_CONST_VAL_STRING(val_0005,"NB");
|
||||
#define CTNODE_us_phrasing_NO_0003 9
|
||||
#define CTNODE_us_phrasing_NO_0002 10
|
||||
#define CTNODE_us_phrasing_NO_0010 12
|
||||
#define CTNODE_us_phrasing_NO_0012 14
|
397
3rdparty/flite_hts_engine/flite/lang/usenglish/us_pos_cart.c
vendored
Normal file
397
3rdparty/flite_hts_engine/flite/lang/usenglish/us_pos_cart.c
vendored
Normal file
|
@ -0,0 +1,397 @@
|
|||
/*******************************************************/
|
||||
/** Autogenerated cart trees for us_pos */
|
||||
/*******************************************************/
|
||||
|
||||
#include "cst_string.h"
|
||||
#include "cst_cart.h"
|
||||
#include "cst_regex.h"
|
||||
#include "us_pos_cart.h"
|
||||
|
||||
static const cst_cart_node us_pos_cart_nodes[] = {
|
||||
{ 0, CST_CART_OP_IS, CTNODE_us_pos_NO_0000, (cst_val *)&val_0000},
|
||||
{ 1, CST_CART_OP_IS, CTNODE_us_pos_NO_0001, (cst_val *)&val_0001},
|
||||
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0002 },
|
||||
{ 2, CST_CART_OP_IS, CTNODE_us_pos_NO_0003, (cst_val *)&val_0003},
|
||||
{ 1, CST_CART_OP_IS, CTNODE_us_pos_NO_0004, (cst_val *)&val_0004},
|
||||
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0002 },
|
||||
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0005 },
|
||||
{ 1, CST_CART_OP_IS, CTNODE_us_pos_NO_0007, (cst_val *)&val_0006},
|
||||
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0005 },
|
||||
{ 3, CST_CART_OP_IS, CTNODE_us_pos_NO_0009, (cst_val *)&val_0007},
|
||||
{ 4, CST_CART_OP_IS, CTNODE_us_pos_NO_0010, (cst_val *)&val_0007},
|
||||
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0002 },
|
||||
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0005 },
|
||||
{ 4, CST_CART_OP_IS, CTNODE_us_pos_NO_0013, (cst_val *)&val_0008},
|
||||
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0005 },
|
||||
{ 3, CST_CART_OP_IS, CTNODE_us_pos_NO_0015, (cst_val *)&val_0000},
|
||||
{ 4, CST_CART_OP_IS, CTNODE_us_pos_NO_0016, (cst_val *)&val_0007},
|
||||
{ 1, CST_CART_OP_IS, CTNODE_us_pos_NO_0017, (cst_val *)&val_0009},
|
||||
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0010 },
|
||||
{ 1, CST_CART_OP_IS, CTNODE_us_pos_NO_0019, (cst_val *)&val_0011},
|
||||
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0010 },
|
||||
{ 1, CST_CART_OP_IS, CTNODE_us_pos_NO_0021, (cst_val *)&val_0012},
|
||||
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0010 },
|
||||
{ 1, CST_CART_OP_IS, CTNODE_us_pos_NO_0023, (cst_val *)&val_0013},
|
||||
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0010 },
|
||||
{ 1, CST_CART_OP_IS, CTNODE_us_pos_NO_0025, (cst_val *)&val_0014},
|
||||
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0010 },
|
||||
{ 1, CST_CART_OP_IS, CTNODE_us_pos_NO_0027, (cst_val *)&val_0015},
|
||||
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0010 },
|
||||
{ 1, CST_CART_OP_IS, CTNODE_us_pos_NO_0029, (cst_val *)&val_0016},
|
||||
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0010 },
|
||||
{ 1, CST_CART_OP_IS, CTNODE_us_pos_NO_0031, (cst_val *)&val_0017},
|
||||
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0010 },
|
||||
{ 1, CST_CART_OP_IS, CTNODE_us_pos_NO_0033, (cst_val *)&val_0018},
|
||||
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0010 },
|
||||
{ 1, CST_CART_OP_IS, CTNODE_us_pos_NO_0035, (cst_val *)&val_0019},
|
||||
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0010 },
|
||||
{ 2, CST_CART_OP_IS, CTNODE_us_pos_NO_0037, (cst_val *)&val_0020},
|
||||
{ 5, CST_CART_OP_IS, CTNODE_us_pos_NO_0038, (cst_val *)&val_0021},
|
||||
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0010 },
|
||||
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0002 },
|
||||
{ 1, CST_CART_OP_IS, CTNODE_us_pos_NO_0041, (cst_val *)&val_0022},
|
||||
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0010 },
|
||||
{ 5, CST_CART_OP_IS, CTNODE_us_pos_NO_0043, (cst_val *)&val_0021},
|
||||
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0010 },
|
||||
{ 1, CST_CART_OP_IS, CTNODE_us_pos_NO_0045, (cst_val *)&val_0023},
|
||||
{ 6, CST_CART_OP_IS, CTNODE_us_pos_NO_0046, (cst_val *)&val_0000},
|
||||
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0010 },
|
||||
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0002 },
|
||||
{ 2, CST_CART_OP_IS, CTNODE_us_pos_NO_0049, (cst_val *)&val_0024},
|
||||
{ 7, CST_CART_OP_IS, CTNODE_us_pos_NO_0050, (cst_val *)&val_0000},
|
||||
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0002 },
|
||||
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0010 },
|
||||
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0002 },
|
||||
{ 1, CST_CART_OP_IS, CTNODE_us_pos_NO_0054, (cst_val *)&val_0004},
|
||||
{ 7, CST_CART_OP_IS, CTNODE_us_pos_NO_0055, (cst_val *)&val_0025},
|
||||
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0002 },
|
||||
{ 4, CST_CART_OP_IS, CTNODE_us_pos_NO_0057, (cst_val *)&val_0026},
|
||||
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0002 },
|
||||
{ 8, CST_CART_OP_IS, CTNODE_us_pos_NO_0059, (cst_val *)&val_0027},
|
||||
{ 9, CST_CART_OP_IS, CTNODE_us_pos_NO_0060, (cst_val *)&val_0028},
|
||||
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0002 },
|
||||
{ 5, CST_CART_OP_IS, CTNODE_us_pos_NO_0062, (cst_val *)&val_0029},
|
||||
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0005 },
|
||||
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0002 },
|
||||
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0002 },
|
||||
{ 1, CST_CART_OP_IS, CTNODE_us_pos_NO_0066, (cst_val *)&val_0013},
|
||||
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0010 },
|
||||
{ 1, CST_CART_OP_IS, CTNODE_us_pos_NO_0068, (cst_val *)&val_0009},
|
||||
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0010 },
|
||||
{ 1, CST_CART_OP_IS, CTNODE_us_pos_NO_0070, (cst_val *)&val_0030},
|
||||
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0005 },
|
||||
{ 1, CST_CART_OP_IS, CTNODE_us_pos_NO_0072, (cst_val *)&val_0011},
|
||||
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0010 },
|
||||
{ 1, CST_CART_OP_IS, CTNODE_us_pos_NO_0074, (cst_val *)&val_0017},
|
||||
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0010 },
|
||||
{ 1, CST_CART_OP_IS, CTNODE_us_pos_NO_0076, (cst_val *)&val_0016},
|
||||
{ 4, CST_CART_OP_IS, CTNODE_us_pos_NO_0077, (cst_val *)&val_0026},
|
||||
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0010 },
|
||||
{ 9, CST_CART_OP_IS, CTNODE_us_pos_NO_0079, (cst_val *)&val_0004},
|
||||
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0010 },
|
||||
{ 7, CST_CART_OP_IS, CTNODE_us_pos_NO_0081, (cst_val *)&val_0000},
|
||||
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0010 },
|
||||
{ 6, CST_CART_OP_IS, CTNODE_us_pos_NO_0083, (cst_val *)&val_0000},
|
||||
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0005 },
|
||||
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0010 },
|
||||
{ 1, CST_CART_OP_IS, CTNODE_us_pos_NO_0086, (cst_val *)&val_0031},
|
||||
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0010 },
|
||||
{ 1, CST_CART_OP_IS, CTNODE_us_pos_NO_0088, (cst_val *)&val_0014},
|
||||
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0010 },
|
||||
{ 1, CST_CART_OP_IS, CTNODE_us_pos_NO_0090, (cst_val *)&val_0032},
|
||||
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0005 },
|
||||
{ 1, CST_CART_OP_IS, CTNODE_us_pos_NO_0092, (cst_val *)&val_0033},
|
||||
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0005 },
|
||||
{ 1, CST_CART_OP_IS, CTNODE_us_pos_NO_0094, (cst_val *)&val_0034},
|
||||
{ 4, CST_CART_OP_IS, CTNODE_us_pos_NO_0095, (cst_val *)&val_0026},
|
||||
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0002 },
|
||||
{ 9, CST_CART_OP_IS, CTNODE_us_pos_NO_0097, (cst_val *)&val_0035},
|
||||
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0005 },
|
||||
{ 6, CST_CART_OP_IS, CTNODE_us_pos_NO_0099, (cst_val *)&val_0026},
|
||||
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0002 },
|
||||
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0005 },
|
||||
{ 1, CST_CART_OP_IS, CTNODE_us_pos_NO_0102, (cst_val *)&val_0036},
|
||||
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0005 },
|
||||
{ 1, CST_CART_OP_IS, CTNODE_us_pos_NO_0104, (cst_val *)&val_0037},
|
||||
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0005 },
|
||||
{ 1, CST_CART_OP_IS, CTNODE_us_pos_NO_0106, (cst_val *)&val_0038},
|
||||
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0005 },
|
||||
{ 1, CST_CART_OP_IS, CTNODE_us_pos_NO_0108, (cst_val *)&val_0012},
|
||||
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0010 },
|
||||
{ 1, CST_CART_OP_IS, CTNODE_us_pos_NO_0110, (cst_val *)&val_0018},
|
||||
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0010 },
|
||||
{ 1, CST_CART_OP_IS, CTNODE_us_pos_NO_0112, (cst_val *)&val_0015},
|
||||
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0010 },
|
||||
{ 1, CST_CART_OP_IS, CTNODE_us_pos_NO_0114, (cst_val *)&val_0039},
|
||||
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0010 },
|
||||
{ 1, CST_CART_OP_IS, CTNODE_us_pos_NO_0116, (cst_val *)&val_0040},
|
||||
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0010 },
|
||||
{ 1, CST_CART_OP_IS, CTNODE_us_pos_NO_0118, (cst_val *)&val_0041},
|
||||
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0005 },
|
||||
{ 1, CST_CART_OP_IS, CTNODE_us_pos_NO_0120, (cst_val *)&val_0022},
|
||||
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0010 },
|
||||
{ 1, CST_CART_OP_IS, CTNODE_us_pos_NO_0122, (cst_val *)&val_0019},
|
||||
{ 4, CST_CART_OP_IS, CTNODE_us_pos_NO_0123, (cst_val *)&val_0026},
|
||||
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0010 },
|
||||
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0002 },
|
||||
{ 1, CST_CART_OP_IS, CTNODE_us_pos_NO_0126, (cst_val *)&val_0042},
|
||||
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0005 },
|
||||
{ 1, CST_CART_OP_IS, CTNODE_us_pos_NO_0128, (cst_val *)&val_0043},
|
||||
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0005 },
|
||||
{ 1, CST_CART_OP_IS, CTNODE_us_pos_NO_0130, (cst_val *)&val_0044},
|
||||
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0010 },
|
||||
{ 1, CST_CART_OP_IS, CTNODE_us_pos_NO_0132, (cst_val *)&val_0045},
|
||||
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0005 },
|
||||
{ 1, CST_CART_OP_IS, CTNODE_us_pos_NO_0134, (cst_val *)&val_0046},
|
||||
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0005 },
|
||||
{ 1, CST_CART_OP_IS, CTNODE_us_pos_NO_0136, (cst_val *)&val_0047},
|
||||
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0005 },
|
||||
{ 1, CST_CART_OP_IS, CTNODE_us_pos_NO_0138, (cst_val *)&val_0048},
|
||||
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0002 },
|
||||
{ 1, CST_CART_OP_IS, CTNODE_us_pos_NO_0140, (cst_val *)&val_0049},
|
||||
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0005 },
|
||||
{ 1, CST_CART_OP_IS, CTNODE_us_pos_NO_0142, (cst_val *)&val_0023},
|
||||
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0002 },
|
||||
{ 1, CST_CART_OP_IS, CTNODE_us_pos_NO_0144, (cst_val *)&val_0050},
|
||||
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0002 },
|
||||
{ 1, CST_CART_OP_IS, CTNODE_us_pos_NO_0146, (cst_val *)&val_0051},
|
||||
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0010 },
|
||||
{ 1, CST_CART_OP_IS, CTNODE_us_pos_NO_0148, (cst_val *)&val_0052},
|
||||
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0005 },
|
||||
{ 1, CST_CART_OP_IS, CTNODE_us_pos_NO_0150, (cst_val *)&val_0053},
|
||||
{ 4, CST_CART_OP_IS, CTNODE_us_pos_NO_0151, (cst_val *)&val_0000},
|
||||
{ 6, CST_CART_OP_IS, CTNODE_us_pos_NO_0152, (cst_val *)&val_0000},
|
||||
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0005 },
|
||||
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0002 },
|
||||
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0005 },
|
||||
{ 2, CST_CART_OP_IS, CTNODE_us_pos_NO_0156, (cst_val *)&val_0054},
|
||||
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0005 },
|
||||
{ 2, CST_CART_OP_IS, CTNODE_us_pos_NO_0158, (cst_val *)&val_0055},
|
||||
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0005 },
|
||||
{ 1, CST_CART_OP_IS, CTNODE_us_pos_NO_0160, (cst_val *)&val_0056},
|
||||
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0005 },
|
||||
{ 1, CST_CART_OP_IS, CTNODE_us_pos_NO_0162, (cst_val *)&val_0000},
|
||||
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0010 },
|
||||
{ 1, CST_CART_OP_IS, CTNODE_us_pos_NO_0164, (cst_val *)&val_0057},
|
||||
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0005 },
|
||||
{ 9, CST_CART_OP_IS, CTNODE_us_pos_NO_0166, (cst_val *)&val_0035},
|
||||
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0005 },
|
||||
{ 2, CST_CART_OP_IS, CTNODE_us_pos_NO_0168, (cst_val *)&val_0058},
|
||||
{ 8, CST_CART_OP_IS, CTNODE_us_pos_NO_0169, (cst_val *)&val_0004},
|
||||
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0005 },
|
||||
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0002 },
|
||||
{ 4, CST_CART_OP_IS, CTNODE_us_pos_NO_0172, (cst_val *)&val_0026},
|
||||
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0002 },
|
||||
{ 1, CST_CART_OP_IS, CTNODE_us_pos_NO_0174, (cst_val *)&val_0059},
|
||||
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0002 },
|
||||
{ 1, CST_CART_OP_IS, CTNODE_us_pos_NO_0176, (cst_val *)&val_0060},
|
||||
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0002 },
|
||||
{ 1, CST_CART_OP_IS, CTNODE_us_pos_NO_0178, (cst_val *)&val_0061},
|
||||
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0002 },
|
||||
{ 1, CST_CART_OP_IS, CTNODE_us_pos_NO_0180, (cst_val *)&val_0062},
|
||||
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0002 },
|
||||
{ 1, CST_CART_OP_IS, CTNODE_us_pos_NO_0182, (cst_val *)&val_0063},
|
||||
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0002 },
|
||||
{ 1, CST_CART_OP_IS, CTNODE_us_pos_NO_0184, (cst_val *)&val_0064},
|
||||
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0002 },
|
||||
{ 1, CST_CART_OP_IS, CTNODE_us_pos_NO_0186, (cst_val *)&val_0065},
|
||||
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0002 },
|
||||
{ 4, CST_CART_OP_IS, CTNODE_us_pos_NO_0188, (cst_val *)&val_0000},
|
||||
{ 1, CST_CART_OP_IS, CTNODE_us_pos_NO_0189, (cst_val *)&val_0066},
|
||||
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0002 },
|
||||
{ 1, CST_CART_OP_IS, CTNODE_us_pos_NO_0191, (cst_val *)&val_0067},
|
||||
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0002 },
|
||||
{ 1, CST_CART_OP_IS, CTNODE_us_pos_NO_0193, (cst_val *)&val_0068},
|
||||
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0002 },
|
||||
{ 6, CST_CART_OP_IS, CTNODE_us_pos_NO_0195, (cst_val *)&val_0007},
|
||||
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0002 },
|
||||
{ 1, CST_CART_OP_IS, CTNODE_us_pos_NO_0197, (cst_val *)&val_0069},
|
||||
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0002 },
|
||||
{ 1, CST_CART_OP_IS, CTNODE_us_pos_NO_0199, (cst_val *)&val_0070},
|
||||
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0002 },
|
||||
{ 1, CST_CART_OP_IS, CTNODE_us_pos_NO_0201, (cst_val *)&val_0071},
|
||||
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0002 },
|
||||
{ 6, CST_CART_OP_IS, CTNODE_us_pos_NO_0203, (cst_val *)&val_0026},
|
||||
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0002 },
|
||||
{ 1, CST_CART_OP_IS, CTNODE_us_pos_NO_0205, (cst_val *)&val_0072},
|
||||
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0002 },
|
||||
{ 1, CST_CART_OP_IS, CTNODE_us_pos_NO_0207, (cst_val *)&val_0073},
|
||||
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0005 },
|
||||
{ 6, CST_CART_OP_IS, CTNODE_us_pos_NO_0209, (cst_val *)&val_0000},
|
||||
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0002 },
|
||||
{ 8, CST_CART_OP_IS, CTNODE_us_pos_NO_0211, (cst_val *)&val_0074},
|
||||
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0002 },
|
||||
{ 6, CST_CART_OP_IS, CTNODE_us_pos_NO_0213, (cst_val *)&val_0075},
|
||||
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0002 },
|
||||
{ 8, CST_CART_OP_IS, CTNODE_us_pos_NO_0215, (cst_val *)&val_0003},
|
||||
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0002 },
|
||||
{ 2, CST_CART_OP_IS, CTNODE_us_pos_NO_0217, (cst_val *)&val_0004},
|
||||
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0002 },
|
||||
{ 7, CST_CART_OP_IS, CTNODE_us_pos_NO_0219, (cst_val *)&val_0000},
|
||||
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0005 },
|
||||
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0002 },
|
||||
{ 1, CST_CART_OP_IS, CTNODE_us_pos_NO_0222, (cst_val *)&val_0076},
|
||||
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0005 },
|
||||
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0002 },
|
||||
{ 1, CST_CART_OP_IS, CTNODE_us_pos_NO_0225, (cst_val *)&val_0013},
|
||||
{ 4, CST_CART_OP_IS, CTNODE_us_pos_NO_0226, (cst_val *)&val_0007},
|
||||
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0002 },
|
||||
{ 2, CST_CART_OP_IS, CTNODE_us_pos_NO_0228, (cst_val *)&val_0077},
|
||||
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0078 },
|
||||
{ 4, CST_CART_OP_IS, CTNODE_us_pos_NO_0230, (cst_val *)&val_0079},
|
||||
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0010 },
|
||||
{ 6, CST_CART_OP_IS, CTNODE_us_pos_NO_0232, (cst_val *)&val_0079},
|
||||
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0005 },
|
||||
{ 4, CST_CART_OP_IS, CTNODE_us_pos_NO_0234, (cst_val *)&val_0026},
|
||||
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0002 },
|
||||
{ 2, CST_CART_OP_IS, CTNODE_us_pos_NO_0236, (cst_val *)&val_0080},
|
||||
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0078 },
|
||||
{ 3, CST_CART_OP_IS, CTNODE_us_pos_NO_0238, (cst_val *)&val_0026},
|
||||
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0078 },
|
||||
{ 5, CST_CART_OP_IS, CTNODE_us_pos_NO_0240, (cst_val *)&val_0004},
|
||||
{ 2, CST_CART_OP_IS, CTNODE_us_pos_NO_0241, (cst_val *)&val_0004},
|
||||
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0078 },
|
||||
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0010 },
|
||||
{ 5, CST_CART_OP_IS, CTNODE_us_pos_NO_0244, (cst_val *)&val_0020},
|
||||
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0078 },
|
||||
{ 8, CST_CART_OP_IS, CTNODE_us_pos_NO_0246, (cst_val *)&val_0004},
|
||||
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0078 },
|
||||
{ 2, CST_CART_OP_IS, CTNODE_us_pos_NO_0248, (cst_val *)&val_0004},
|
||||
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0002 },
|
||||
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0078 },
|
||||
{ 4, CST_CART_OP_IS, CTNODE_us_pos_NO_0251, (cst_val *)&val_0079},
|
||||
{ 1, CST_CART_OP_IS, CTNODE_us_pos_NO_0252, (cst_val *)&val_0036},
|
||||
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0005 },
|
||||
{ 1, CST_CART_OP_IS, CTNODE_us_pos_NO_0254, (cst_val *)&val_0033},
|
||||
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0005 },
|
||||
{ 1, CST_CART_OP_IS, CTNODE_us_pos_NO_0256, (cst_val *)&val_0081},
|
||||
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0005 },
|
||||
{ 1, CST_CART_OP_IS, CTNODE_us_pos_NO_0258, (cst_val *)&val_0032},
|
||||
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0005 },
|
||||
{ 9, CST_CART_OP_IS, CTNODE_us_pos_NO_0260, (cst_val *)&val_0003},
|
||||
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0010 },
|
||||
{ 1, CST_CART_OP_IS, CTNODE_us_pos_NO_0262, (cst_val *)&val_0014},
|
||||
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0010 },
|
||||
{ 1, CST_CART_OP_IS, CTNODE_us_pos_NO_0264, (cst_val *)&val_0015},
|
||||
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0010 },
|
||||
{ 1, CST_CART_OP_IS, CTNODE_us_pos_NO_0266, (cst_val *)&val_0012},
|
||||
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0010 },
|
||||
{ 9, CST_CART_OP_IS, CTNODE_us_pos_NO_0268, (cst_val *)&val_0004},
|
||||
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0010 },
|
||||
{ 7, CST_CART_OP_IS, CTNODE_us_pos_NO_0270, (cst_val *)&val_0000},
|
||||
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0005 },
|
||||
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0010 },
|
||||
{ 1, CST_CART_OP_IS, CTNODE_us_pos_NO_0273, (cst_val *)&val_0016},
|
||||
{ 7, CST_CART_OP_IS, CTNODE_us_pos_NO_0274, (cst_val *)&val_0025},
|
||||
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0002 },
|
||||
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0005 },
|
||||
{ 1, CST_CART_OP_IS, CTNODE_us_pos_NO_0277, (cst_val *)&val_0036},
|
||||
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0005 },
|
||||
{ 1, CST_CART_OP_IS, CTNODE_us_pos_NO_0279, (cst_val *)&val_0041},
|
||||
{ 4, CST_CART_OP_IS, CTNODE_us_pos_NO_0280, (cst_val *)&val_0007},
|
||||
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0010 },
|
||||
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0005 },
|
||||
{ 1, CST_CART_OP_IS, CTNODE_us_pos_NO_0283, (cst_val *)&val_0011},
|
||||
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0078 },
|
||||
{ 3, CST_CART_OP_IS, CTNODE_us_pos_NO_0285, (cst_val *)&val_0075},
|
||||
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0005 },
|
||||
{ 1, CST_CART_OP_IS, CTNODE_us_pos_NO_0287, (cst_val *)&val_0033},
|
||||
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0005 },
|
||||
{ 1, CST_CART_OP_IS, CTNODE_us_pos_NO_0289, (cst_val *)&val_0082},
|
||||
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0005 },
|
||||
{ 9, CST_CART_OP_IS, CTNODE_us_pos_NO_0291, (cst_val *)&val_0021},
|
||||
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0002 },
|
||||
{ 2, CST_CART_OP_IS, CTNODE_us_pos_NO_0293, (cst_val *)&val_0055},
|
||||
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0005 },
|
||||
{ 1, CST_CART_OP_IS, CTNODE_us_pos_NO_0295, (cst_val *)&val_0017},
|
||||
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0010 },
|
||||
{ 1, CST_CART_OP_IS, CTNODE_us_pos_NO_0297, (cst_val *)&val_0015},
|
||||
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0010 },
|
||||
{ 1, CST_CART_OP_IS, CTNODE_us_pos_NO_0299, (cst_val *)&val_0012},
|
||||
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0010 },
|
||||
{ 1, CST_CART_OP_IS, CTNODE_us_pos_NO_0301, (cst_val *)&val_0014},
|
||||
{ 4, CST_CART_OP_IS, CTNODE_us_pos_NO_0302, (cst_val *)&val_0007},
|
||||
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0002 },
|
||||
{ 2, CST_CART_OP_IS, CTNODE_us_pos_NO_0304, (cst_val *)&val_0083},
|
||||
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0002 },
|
||||
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0010 },
|
||||
{ 9, CST_CART_OP_IS, CTNODE_us_pos_NO_0307, (cst_val *)&val_0003},
|
||||
{ 1, CST_CART_OP_IS, CTNODE_us_pos_NO_0308, (cst_val *)&val_0084},
|
||||
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0005 },
|
||||
{ 1, CST_CART_OP_IS, CTNODE_us_pos_NO_0310, (cst_val *)&val_0085},
|
||||
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0010 },
|
||||
{ 1, CST_CART_OP_IS, CTNODE_us_pos_NO_0312, (cst_val *)&val_0051},
|
||||
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0010 },
|
||||
{ 1, CST_CART_OP_IS, CTNODE_us_pos_NO_0314, (cst_val *)&val_0018},
|
||||
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0005 },
|
||||
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0002 },
|
||||
{ 1, CST_CART_OP_IS, CTNODE_us_pos_NO_0317, (cst_val *)&val_0009},
|
||||
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0010 },
|
||||
{ 1, CST_CART_OP_IS, CTNODE_us_pos_NO_0319, (cst_val *)&val_0032},
|
||||
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0005 },
|
||||
{ 1, CST_CART_OP_IS, CTNODE_us_pos_NO_0321, (cst_val *)&val_0030},
|
||||
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0005 },
|
||||
{ 1, CST_CART_OP_IS, CTNODE_us_pos_NO_0323, (cst_val *)&val_0081},
|
||||
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0005 },
|
||||
{ 1, CST_CART_OP_IS, CTNODE_us_pos_NO_0325, (cst_val *)&val_0076},
|
||||
{ 3, CST_CART_OP_IS, CTNODE_us_pos_NO_0326, (cst_val *)&val_0026},
|
||||
{ 4, CST_CART_OP_IS, CTNODE_us_pos_NO_0327, (cst_val *)&val_0000},
|
||||
{ 2, CST_CART_OP_IS, CTNODE_us_pos_NO_0328, (cst_val *)&val_0004},
|
||||
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0002 },
|
||||
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0005 },
|
||||
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0002 },
|
||||
{ 4, CST_CART_OP_IS, CTNODE_us_pos_NO_0332, (cst_val *)&val_0075},
|
||||
{ 8, CST_CART_OP_IS, CTNODE_us_pos_NO_0333, (cst_val *)&val_0021},
|
||||
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0002 },
|
||||
{ 9, CST_CART_OP_IS, CTNODE_us_pos_NO_0335, (cst_val *)&val_0004},
|
||||
{ 6, CST_CART_OP_IS, CTNODE_us_pos_NO_0336, (cst_val *)&val_0026},
|
||||
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0005 },
|
||||
{ 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, (cst_val *)&val_0002 },
|
||||
{ 9, CST_CART_OP_IS, CTNODE_us_pos_NO_0341, (cst_val *)&val_0086},
|
||||
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0078 },
|
||||
{ 2, CST_CART_OP_IS, CTNODE_us_pos_NO_0343, (cst_val *)&val_0054},
|
||||
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0005 },
|
||||
{ 9, CST_CART_OP_IS, CTNODE_us_pos_NO_0345, (cst_val *)&val_0058},
|
||||
{ 1, CST_CART_OP_IS, CTNODE_us_pos_NO_0346, (cst_val *)&val_0087},
|
||||
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0005 },
|
||||
{ 1, CST_CART_OP_IS, CTNODE_us_pos_NO_0348, (cst_val *)&val_0088},
|
||||
{ 7, CST_CART_OP_IS, CTNODE_us_pos_NO_0349, (cst_val *)&val_0000},
|
||||
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0002 },
|
||||
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0005 },
|
||||
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0002 },
|
||||
{ 9, CST_CART_OP_IS, CTNODE_us_pos_NO_0353, (cst_val *)&val_0089},
|
||||
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0005 },
|
||||
{ 1, CST_CART_OP_IS, CTNODE_us_pos_NO_0355, (cst_val *)&val_0042},
|
||||
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0005 },
|
||||
{ 4, CST_CART_OP_IS, CTNODE_us_pos_NO_0357, (cst_val *)&val_0007},
|
||||
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0002 },
|
||||
{ 6, CST_CART_OP_IS, CTNODE_us_pos_NO_0359, (cst_val *)&val_0079},
|
||||
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0002 },
|
||||
{ 1, CST_CART_OP_IS, CTNODE_us_pos_NO_0361, (cst_val *)&val_0090},
|
||||
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0002 },
|
||||
{ 6, CST_CART_OP_IS, CTNODE_us_pos_NO_0363, (cst_val *)&val_0008},
|
||||
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0005 },
|
||||
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0002 },
|
||||
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0091 },
|
||||
{ 255, CST_CART_OP_NONE, 0, 0}};
|
||||
|
||||
|
||||
static const char * const us_pos_feat_table[] = {
|
||||
"gpos",
|
||||
"name",
|
||||
"p.name",
|
||||
"n.gpos",
|
||||
"p.gpos",
|
||||
"n.n.name",
|
||||
"p.p.gpos",
|
||||
"n.n.gpos",
|
||||
"p.p.name",
|
||||
"n.name",
|
||||
NULL };
|
||||
|
||||
const cst_cart us_pos_cart = {
|
||||
us_pos_cart_nodes,
|
||||
us_pos_feat_table
|
||||
};
|
280
3rdparty/flite_hts_engine/flite/lang/usenglish/us_pos_cart.h
vendored
Normal file
280
3rdparty/flite_hts_engine/flite/lang/usenglish/us_pos_cart.h
vendored
Normal file
|
@ -0,0 +1,280 @@
|
|||
/*******************************************************/
|
||||
/** Autogenerated cart tree for us_pos */
|
||||
/** from . */
|
||||
/*******************************************************/
|
||||
|
||||
DEF_STATIC_CONST_VAL_STRING(val_0000,"content");
|
||||
DEF_STATIC_CONST_VAL_STRING(val_0001,"house");
|
||||
DEF_STATIC_CONST_VAL_STRING(val_0002,"n");
|
||||
#define CTNODE_us_pos_NO_0001 3
|
||||
DEF_STATIC_CONST_VAL_STRING(val_0003,"to");
|
||||
DEF_STATIC_CONST_VAL_STRING(val_0004,"_other_");
|
||||
#define CTNODE_us_pos_NO_0004 6
|
||||
DEF_STATIC_CONST_VAL_STRING(val_0005,"v");
|
||||
#define CTNODE_us_pos_NO_0003 7
|
||||
DEF_STATIC_CONST_VAL_STRING(val_0006,"does");
|
||||
#define CTNODE_us_pos_NO_0007 9
|
||||
DEF_STATIC_CONST_VAL_STRING(val_0007,"det");
|
||||
#define CTNODE_us_pos_NO_0010 12
|
||||
#define CTNODE_us_pos_NO_0009 13
|
||||
DEF_STATIC_CONST_VAL_STRING(val_0008,"md");
|
||||
#define CTNODE_us_pos_NO_0013 15
|
||||
DEF_STATIC_CONST_VAL_STRING(val_0009,"separate");
|
||||
DEF_STATIC_CONST_VAL_STRING(val_0010,"j");
|
||||
#define CTNODE_us_pos_NO_0017 19
|
||||
DEF_STATIC_CONST_VAL_STRING(val_0011,"overall");
|
||||
#define CTNODE_us_pos_NO_0019 21
|
||||
DEF_STATIC_CONST_VAL_STRING(val_0012,"perfect");
|
||||
#define CTNODE_us_pos_NO_0021 23
|
||||
DEF_STATIC_CONST_VAL_STRING(val_0013,"close");
|
||||
#define CTNODE_us_pos_NO_0023 25
|
||||
DEF_STATIC_CONST_VAL_STRING(val_0014,"present");
|
||||
#define CTNODE_us_pos_NO_0025 27
|
||||
DEF_STATIC_CONST_VAL_STRING(val_0015,"appropriate");
|
||||
#define CTNODE_us_pos_NO_0027 29
|
||||
DEF_STATIC_CONST_VAL_STRING(val_0016,"live");
|
||||
#define CTNODE_us_pos_NO_0029 31
|
||||
DEF_STATIC_CONST_VAL_STRING(val_0017,"moderate");
|
||||
#define CTNODE_us_pos_NO_0031 33
|
||||
DEF_STATIC_CONST_VAL_STRING(val_0018,"lead");
|
||||
#define CTNODE_us_pos_NO_0033 35
|
||||
DEF_STATIC_CONST_VAL_STRING(val_0019,"rebel");
|
||||
#define CTNODE_us_pos_NO_0035 37
|
||||
DEF_STATIC_CONST_VAL_STRING(val_0020,"the");
|
||||
DEF_STATIC_CONST_VAL_STRING(val_0021,"of");
|
||||
#define CTNODE_us_pos_NO_0038 40
|
||||
#define CTNODE_us_pos_NO_0037 41
|
||||
DEF_STATIC_CONST_VAL_STRING(val_0022,"elaborate");
|
||||
#define CTNODE_us_pos_NO_0041 43
|
||||
#define CTNODE_us_pos_NO_0043 45
|
||||
DEF_STATIC_CONST_VAL_STRING(val_0023,"record");
|
||||
#define CTNODE_us_pos_NO_0046 48
|
||||
#define CTNODE_us_pos_NO_0045 49
|
||||
DEF_STATIC_CONST_VAL_STRING(val_0024,"an");
|
||||
#define CTNODE_us_pos_NO_0050 52
|
||||
#define CTNODE_us_pos_NO_0049 53
|
||||
#define CTNODE_us_pos_NO_0016 54
|
||||
DEF_STATIC_CONST_VAL_STRING(val_0025,"punc");
|
||||
#define CTNODE_us_pos_NO_0055 57
|
||||
DEF_STATIC_CONST_VAL_STRING(val_0026,"in");
|
||||
#define CTNODE_us_pos_NO_0057 59
|
||||
DEF_STATIC_CONST_VAL_STRING(val_0027,"adv");
|
||||
DEF_STATIC_CONST_VAL_STRING(val_0028,"nineteen");
|
||||
#define CTNODE_us_pos_NO_0060 62
|
||||
DEF_STATIC_CONST_VAL_STRING(val_0029,"six");
|
||||
#define CTNODE_us_pos_NO_0062 64
|
||||
#define CTNODE_us_pos_NO_0059 65
|
||||
#define CTNODE_us_pos_NO_0054 66
|
||||
#define CTNODE_us_pos_NO_0066 68
|
||||
#define CTNODE_us_pos_NO_0068 70
|
||||
DEF_STATIC_CONST_VAL_STRING(val_0030,"putting");
|
||||
#define CTNODE_us_pos_NO_0070 72
|
||||
#define CTNODE_us_pos_NO_0072 74
|
||||
#define CTNODE_us_pos_NO_0074 76
|
||||
#define CTNODE_us_pos_NO_0077 79
|
||||
#define CTNODE_us_pos_NO_0079 81
|
||||
#define CTNODE_us_pos_NO_0081 83
|
||||
#define CTNODE_us_pos_NO_0083 85
|
||||
#define CTNODE_us_pos_NO_0076 86
|
||||
DEF_STATIC_CONST_VAL_STRING(val_0031,"frequent");
|
||||
#define CTNODE_us_pos_NO_0086 88
|
||||
#define CTNODE_us_pos_NO_0088 90
|
||||
DEF_STATIC_CONST_VAL_STRING(val_0032,"bought");
|
||||
#define CTNODE_us_pos_NO_0090 92
|
||||
DEF_STATIC_CONST_VAL_STRING(val_0033,"read");
|
||||
#define CTNODE_us_pos_NO_0092 94
|
||||
DEF_STATIC_CONST_VAL_STRING(val_0034,"use");
|
||||
#define CTNODE_us_pos_NO_0095 97
|
||||
DEF_STATIC_CONST_VAL_STRING(val_0035,"it");
|
||||
#define CTNODE_us_pos_NO_0097 99
|
||||
#define CTNODE_us_pos_NO_0099 101
|
||||
#define CTNODE_us_pos_NO_0094 102
|
||||
DEF_STATIC_CONST_VAL_STRING(val_0036,"lived");
|
||||
#define CTNODE_us_pos_NO_0102 104
|
||||
DEF_STATIC_CONST_VAL_STRING(val_0037,"aged");
|
||||
#define CTNODE_us_pos_NO_0104 106
|
||||
DEF_STATIC_CONST_VAL_STRING(val_0038,"uses");
|
||||
#define CTNODE_us_pos_NO_0106 108
|
||||
#define CTNODE_us_pos_NO_0108 110
|
||||
#define CTNODE_us_pos_NO_0110 112
|
||||
#define CTNODE_us_pos_NO_0112 114
|
||||
DEF_STATIC_CONST_VAL_STRING(val_0039,"associate");
|
||||
#define CTNODE_us_pos_NO_0114 116
|
||||
DEF_STATIC_CONST_VAL_STRING(val_0040,"compact");
|
||||
#define CTNODE_us_pos_NO_0116 118
|
||||
DEF_STATIC_CONST_VAL_STRING(val_0041,"suspect");
|
||||
#define CTNODE_us_pos_NO_0118 120
|
||||
#define CTNODE_us_pos_NO_0120 122
|
||||
#define CTNODE_us_pos_NO_0123 125
|
||||
#define CTNODE_us_pos_NO_0122 126
|
||||
DEF_STATIC_CONST_VAL_STRING(val_0042,"produce");
|
||||
#define CTNODE_us_pos_NO_0126 128
|
||||
DEF_STATIC_CONST_VAL_STRING(val_0043,"produces");
|
||||
#define CTNODE_us_pos_NO_0128 130
|
||||
DEF_STATIC_CONST_VAL_STRING(val_0044,"excess");
|
||||
#define CTNODE_us_pos_NO_0130 132
|
||||
DEF_STATIC_CONST_VAL_STRING(val_0045,"combine");
|
||||
#define CTNODE_us_pos_NO_0132 134
|
||||
DEF_STATIC_CONST_VAL_STRING(val_0046,"tear");
|
||||
#define CTNODE_us_pos_NO_0134 136
|
||||
DEF_STATIC_CONST_VAL_STRING(val_0047,"presents");
|
||||
#define CTNODE_us_pos_NO_0136 138
|
||||
DEF_STATIC_CONST_VAL_STRING(val_0048,"minute");
|
||||
#define CTNODE_us_pos_NO_0138 140
|
||||
DEF_STATIC_CONST_VAL_STRING(val_0049,"rejects");
|
||||
#define CTNODE_us_pos_NO_0140 142
|
||||
#define CTNODE_us_pos_NO_0142 144
|
||||
DEF_STATIC_CONST_VAL_STRING(val_0050,"mrs");
|
||||
#define CTNODE_us_pos_NO_0144 146
|
||||
DEF_STATIC_CONST_VAL_STRING(val_0051,"subject");
|
||||
#define CTNODE_us_pos_NO_0146 148
|
||||
DEF_STATIC_CONST_VAL_STRING(val_0052,"permits");
|
||||
#define CTNODE_us_pos_NO_0148 150
|
||||
DEF_STATIC_CONST_VAL_STRING(val_0053,"reading");
|
||||
#define CTNODE_us_pos_NO_0152 154
|
||||
#define CTNODE_us_pos_NO_0151 155
|
||||
#define CTNODE_us_pos_NO_0150 156
|
||||
DEF_STATIC_CONST_VAL_STRING(val_0054,"not");
|
||||
#define CTNODE_us_pos_NO_0156 158
|
||||
DEF_STATIC_CONST_VAL_STRING(val_0055,"who");
|
||||
#define CTNODE_us_pos_NO_0158 160
|
||||
DEF_STATIC_CONST_VAL_STRING(val_0056,"collect");
|
||||
#define CTNODE_us_pos_NO_0160 162
|
||||
#define CTNODE_us_pos_NO_0162 164
|
||||
DEF_STATIC_CONST_VAL_STRING(val_0057,"permit");
|
||||
#define CTNODE_us_pos_NO_0164 166
|
||||
#define CTNODE_us_pos_NO_0166 168
|
||||
DEF_STATIC_CONST_VAL_STRING(val_0058,"that");
|
||||
#define CTNODE_us_pos_NO_0169 171
|
||||
#define CTNODE_us_pos_NO_0168 172
|
||||
#define CTNODE_us_pos_NO_0172 174
|
||||
DEF_STATIC_CONST_VAL_STRING(val_0059,"records");
|
||||
#define CTNODE_us_pos_NO_0174 176
|
||||
DEF_STATIC_CONST_VAL_STRING(val_0060,"survey");
|
||||
#define CTNODE_us_pos_NO_0176 178
|
||||
DEF_STATIC_CONST_VAL_STRING(val_0061,"allies");
|
||||
#define CTNODE_us_pos_NO_0178 180
|
||||
DEF_STATIC_CONST_VAL_STRING(val_0062,"abuse");
|
||||
#define CTNODE_us_pos_NO_0180 182
|
||||
DEF_STATIC_CONST_VAL_STRING(val_0063,"project");
|
||||
#define CTNODE_us_pos_NO_0182 184
|
||||
DEF_STATIC_CONST_VAL_STRING(val_0064,"contract");
|
||||
#define CTNODE_us_pos_NO_0184 186
|
||||
DEF_STATIC_CONST_VAL_STRING(val_0065,"nasa");
|
||||
#define CTNODE_us_pos_NO_0186 188
|
||||
DEF_STATIC_CONST_VAL_STRING(val_0066,"impact");
|
||||
#define CTNODE_us_pos_NO_0189 191
|
||||
DEF_STATIC_CONST_VAL_STRING(val_0067,"concert");
|
||||
#define CTNODE_us_pos_NO_0191 193
|
||||
DEF_STATIC_CONST_VAL_STRING(val_0068,"progress");
|
||||
#define CTNODE_us_pos_NO_0193 195
|
||||
#define CTNODE_us_pos_NO_0195 197
|
||||
DEF_STATIC_CONST_VAL_STRING(val_0069,"rebels");
|
||||
#define CTNODE_us_pos_NO_0197 199
|
||||
DEF_STATIC_CONST_VAL_STRING(val_0070,"associates");
|
||||
#define CTNODE_us_pos_NO_0199 201
|
||||
DEF_STATIC_CONST_VAL_STRING(val_0071,"graduate");
|
||||
#define CTNODE_us_pos_NO_0201 203
|
||||
#define CTNODE_us_pos_NO_0203 205
|
||||
DEF_STATIC_CONST_VAL_STRING(val_0072,"export");
|
||||
#define CTNODE_us_pos_NO_0205 207
|
||||
DEF_STATIC_CONST_VAL_STRING(val_0073,"increases");
|
||||
#define CTNODE_us_pos_NO_0207 209
|
||||
#define CTNODE_us_pos_NO_0209 211
|
||||
DEF_STATIC_CONST_VAL_STRING(val_0074,"and");
|
||||
#define CTNODE_us_pos_NO_0211 213
|
||||
DEF_STATIC_CONST_VAL_STRING(val_0075,"pps");
|
||||
#define CTNODE_us_pos_NO_0213 215
|
||||
#define CTNODE_us_pos_NO_0215 217
|
||||
#define CTNODE_us_pos_NO_0217 219
|
||||
#define CTNODE_us_pos_NO_0219 221
|
||||
#define CTNODE_us_pos_NO_0188 222
|
||||
DEF_STATIC_CONST_VAL_STRING(val_0076,"lives");
|
||||
#define CTNODE_us_pos_NO_0222 224
|
||||
#define CTNODE_us_pos_NO_0015 225
|
||||
#define CTNODE_us_pos_NO_0226 228
|
||||
DEF_STATIC_CONST_VAL_STRING(val_0077,"sources");
|
||||
DEF_STATIC_CONST_VAL_STRING(val_0078,"r");
|
||||
#define CTNODE_us_pos_NO_0228 230
|
||||
DEF_STATIC_CONST_VAL_STRING(val_0079,"aux");
|
||||
#define CTNODE_us_pos_NO_0230 232
|
||||
#define CTNODE_us_pos_NO_0232 234
|
||||
#define CTNODE_us_pos_NO_0234 236
|
||||
DEF_STATIC_CONST_VAL_STRING(val_0080,"source");
|
||||
#define CTNODE_us_pos_NO_0236 238
|
||||
#define CTNODE_us_pos_NO_0238 240
|
||||
#define CTNODE_us_pos_NO_0241 243
|
||||
#define CTNODE_us_pos_NO_0240 244
|
||||
#define CTNODE_us_pos_NO_0244 246
|
||||
#define CTNODE_us_pos_NO_0246 248
|
||||
#define CTNODE_us_pos_NO_0248 250
|
||||
#define CTNODE_us_pos_NO_0225 251
|
||||
#define CTNODE_us_pos_NO_0252 254
|
||||
#define CTNODE_us_pos_NO_0254 256
|
||||
DEF_STATIC_CONST_VAL_STRING(val_0081,"upset");
|
||||
#define CTNODE_us_pos_NO_0256 258
|
||||
#define CTNODE_us_pos_NO_0258 260
|
||||
#define CTNODE_us_pos_NO_0260 262
|
||||
#define CTNODE_us_pos_NO_0262 264
|
||||
#define CTNODE_us_pos_NO_0264 266
|
||||
#define CTNODE_us_pos_NO_0266 268
|
||||
#define CTNODE_us_pos_NO_0268 270
|
||||
#define CTNODE_us_pos_NO_0270 272
|
||||
#define CTNODE_us_pos_NO_0251 273
|
||||
#define CTNODE_us_pos_NO_0274 276
|
||||
#define CTNODE_us_pos_NO_0273 277
|
||||
#define CTNODE_us_pos_NO_0277 279
|
||||
#define CTNODE_us_pos_NO_0280 282
|
||||
#define CTNODE_us_pos_NO_0279 283
|
||||
#define CTNODE_us_pos_NO_0283 285
|
||||
#define CTNODE_us_pos_NO_0285 287
|
||||
#define CTNODE_us_pos_NO_0287 289
|
||||
DEF_STATIC_CONST_VAL_STRING(val_0082,"object");
|
||||
#define CTNODE_us_pos_NO_0289 291
|
||||
#define CTNODE_us_pos_NO_0291 293
|
||||
#define CTNODE_us_pos_NO_0293 295
|
||||
#define CTNODE_us_pos_NO_0295 297
|
||||
#define CTNODE_us_pos_NO_0297 299
|
||||
#define CTNODE_us_pos_NO_0299 301
|
||||
#define CTNODE_us_pos_NO_0302 304
|
||||
DEF_STATIC_CONST_VAL_STRING(val_0083,"at");
|
||||
#define CTNODE_us_pos_NO_0304 306
|
||||
#define CTNODE_us_pos_NO_0301 307
|
||||
DEF_STATIC_CONST_VAL_STRING(val_0084,"refuse");
|
||||
#define CTNODE_us_pos_NO_0308 310
|
||||
DEF_STATIC_CONST_VAL_STRING(val_0085,"contrary");
|
||||
#define CTNODE_us_pos_NO_0310 312
|
||||
#define CTNODE_us_pos_NO_0312 314
|
||||
#define CTNODE_us_pos_NO_0314 316
|
||||
#define CTNODE_us_pos_NO_0307 317
|
||||
#define CTNODE_us_pos_NO_0317 319
|
||||
#define CTNODE_us_pos_NO_0319 321
|
||||
#define CTNODE_us_pos_NO_0321 323
|
||||
#define CTNODE_us_pos_NO_0323 325
|
||||
#define CTNODE_us_pos_NO_0328 330
|
||||
#define CTNODE_us_pos_NO_0327 331
|
||||
#define CTNODE_us_pos_NO_0326 332
|
||||
#define CTNODE_us_pos_NO_0333 335
|
||||
#define CTNODE_us_pos_NO_0336 338
|
||||
#define CTNODE_us_pos_NO_0335 339
|
||||
#define CTNODE_us_pos_NO_0332 340
|
||||
#define CTNODE_us_pos_NO_0325 341
|
||||
DEF_STATIC_CONST_VAL_STRING(val_0086,"be");
|
||||
#define CTNODE_us_pos_NO_0341 343
|
||||
#define CTNODE_us_pos_NO_0343 345
|
||||
DEF_STATIC_CONST_VAL_STRING(val_0087,"estimate");
|
||||
#define CTNODE_us_pos_NO_0346 348
|
||||
DEF_STATIC_CONST_VAL_STRING(val_0088,"estimates");
|
||||
#define CTNODE_us_pos_NO_0349 351
|
||||
#define CTNODE_us_pos_NO_0348 352
|
||||
#define CTNODE_us_pos_NO_0345 353
|
||||
DEF_STATIC_CONST_VAL_STRING(val_0089,"up");
|
||||
#define CTNODE_us_pos_NO_0353 355
|
||||
#define CTNODE_us_pos_NO_0355 357
|
||||
#define CTNODE_us_pos_NO_0357 359
|
||||
#define CTNODE_us_pos_NO_0359 361
|
||||
DEF_STATIC_CONST_VAL_STRING(val_0090,"tears");
|
||||
#define CTNODE_us_pos_NO_0361 363
|
||||
#define CTNODE_us_pos_NO_0363 365
|
||||
#define CTNODE_us_pos_NO_0000 366
|
||||
DEF_STATIC_CONST_VAL_STRING(val_0091,"0");
|
224
3rdparty/flite_hts_engine/flite/lang/usenglish/us_regexes.h
vendored
Normal file
224
3rdparty/flite_hts_engine/flite/lang/usenglish/us_regexes.h
vendored
Normal file
|
@ -0,0 +1,224 @@
|
|||
/* Autogenerated from make_us_regexes */
|
||||
static const unsigned char ordinal_number_rxprog[] = {
|
||||
156, 6, 0, 119, 1, 0, 3, 4, 0, 14, 48, 49, 50, 51, 52, 53,
|
||||
54, 55, 56, 57, 0, 10, 0, 18, 4, 0, 0, 48, 49, 50, 51, 52,
|
||||
53, 54, 55, 56, 57, 44, 0, 21, 0, 3, 6, 0, 9, 8, 0, 69,
|
||||
116, 104, 0, 6, 0, 9, 8, 0, 60, 84, 72, 0, 6, 0, 9, 8,
|
||||
0, 51, 115, 116, 0, 6, 0, 9, 8, 0, 42, 83, 84, 0, 6, 0,
|
||||
9, 8, 0, 33, 110, 100, 0, 6, 0, 9, 8, 0, 24, 78, 68, 0,
|
||||
6, 0, 9, 8, 0, 15, 114, 100, 0, 6, 0, 9, 8, 0, 6, 82,
|
||||
68, 0, 31, 0, 3, 2, 0, 3, 0, 0, 0,
|
||||
};
|
||||
static const cst_regex ordinal_number_rx = {
|
||||
0, 1, NULL, 0, 123,
|
||||
(char *)ordinal_number_rxprog
|
||||
};
|
||||
const cst_regex * const ordinal_number = &ordinal_number_rx;
|
||||
|
||||
static const unsigned char hasvowel_rxprog[] = {
|
||||
156, 6, 0, 35, 1, 0, 3, 10, 0, 6, 3, 0, 0, 4, 0, 14,
|
||||
97, 101, 105, 111, 117, 65, 69, 73, 79, 85, 0, 10, 0, 6, 3, 0,
|
||||
0, 2, 0, 3, 0, 0, 0,
|
||||
};
|
||||
static const cst_regex hasvowel_rx = {
|
||||
0, 1, NULL, 0, 39,
|
||||
(char *)hasvowel_rxprog
|
||||
};
|
||||
const cst_regex * const hasvowel = &hasvowel_rx;
|
||||
|
||||
static const unsigned char usmoney_rxprog[] = {
|
||||
156, 6, 0, 72, 1, 0, 3, 8, 0, 5, 36, 0, 11, 0, 18, 4,
|
||||
0, 0, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 44, 0, 6, 0,
|
||||
34, 21, 0, 3, 6, 0, 25, 8, 0, 5, 46, 0, 11, 0, 17, 4,
|
||||
0, 0, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 0, 31, 0, 6,
|
||||
6, 0, 3, 9, 0, 3, 2, 0, 3, 0, 0, 0,
|
||||
};
|
||||
static const cst_regex usmoney_rx = {
|
||||
0, 1, NULL, 0, 76,
|
||||
(char *)usmoney_rxprog
|
||||
};
|
||||
const cst_regex * const usmoney = &usmoney_rx;
|
||||
|
||||
static const unsigned char illion_rxprog[] = {
|
||||
156, 6, 0, 25, 1, 0, 3, 10, 0, 6, 3, 0, 0, 8, 0, 10,
|
||||
105, 108, 108, 105, 111, 110, 0, 2, 0, 3, 0, 0, 0,
|
||||
};
|
||||
static const cst_regex illion_rx = {
|
||||
0, 1, NULL, 0, 29,
|
||||
(char *)illion_rxprog
|
||||
};
|
||||
const cst_regex * const illion = &illion_rx;
|
||||
|
||||
static const unsigned char romannums_rxprog[] = {
|
||||
156, 6, 0, 137, 1, 0, 3, 21, 0, 3, 6, 0, 36, 8, 0, 5,
|
||||
73, 0, 6, 0, 8, 8, 0, 8, 73, 0, 6, 0, 3, 9, 0, 3,
|
||||
6, 0, 8, 8, 0, 8, 73, 0, 6, 0, 3, 9, 0, 89, 6, 0,
|
||||
9, 8, 0, 83, 73, 86, 0, 6, 0, 50, 8, 0, 5, 86, 0, 6,
|
||||
0, 8, 8, 0, 8, 73, 0, 6, 0, 3, 9, 0, 3, 6, 0, 8,
|
||||
8, 0, 8, 73, 0, 6, 0, 3, 9, 0, 3, 6, 0, 8, 8, 0,
|
||||
8, 73, 0, 6, 0, 3, 9, 0, 30, 6, 0, 9, 8, 0, 24, 73,
|
||||
88, 0, 6, 0, 18, 8, 0, 5, 88, 0, 10, 0, 10, 4, 0, 0,
|
||||
86, 73, 88, 0, 31, 0, 3, 2, 0, 3, 0, 0, 0,
|
||||
};
|
||||
static const cst_regex romannums_rx = {
|
||||
0, 1, NULL, 0, 141,
|
||||
(char *)romannums_rxprog
|
||||
};
|
||||
const cst_regex * const romannums = &romannums_rx;
|
||||
|
||||
static const unsigned char drst_rxprog[] = {
|
||||
156, 6, 0, 45, 1, 0, 3, 21, 0, 3, 6, 0, 15, 4, 0, 6,
|
||||
100, 68, 0, 4, 0, 21, 82, 114, 0, 6, 0, 15, 4, 0, 6, 83,
|
||||
115, 0, 4, 0, 6, 116, 84, 0, 31, 0, 3, 2, 0, 3, 0, 0,
|
||||
0,
|
||||
};
|
||||
static const cst_regex drst_rx = {
|
||||
0, 1, NULL, 0, 49,
|
||||
(char *)drst_rxprog
|
||||
};
|
||||
const cst_regex * const drst = &drst_rx;
|
||||
|
||||
static const unsigned char numess_rxprog[] = {
|
||||
156, 6, 0, 31, 1, 0, 3, 11, 0, 17, 4, 0, 0, 48, 49, 50,
|
||||
51, 52, 53, 54, 55, 56, 57, 0, 8, 0, 5, 115, 0, 2, 0, 3,
|
||||
0, 0, 0,
|
||||
};
|
||||
static const cst_regex numess_rx = {
|
||||
0, 1, NULL, 0, 35,
|
||||
(char *)numess_rxprog
|
||||
};
|
||||
const cst_regex * const numess = &numess_rx;
|
||||
|
||||
static const unsigned char sevenphonenumber_rxprog[] = {
|
||||
156, 6, 0, 112, 1, 0, 3, 4, 0, 14, 48, 49, 50, 51, 52, 53,
|
||||
54, 55, 56, 57, 0, 4, 0, 14, 48, 49, 50, 51, 52, 53, 54, 55,
|
||||
56, 57, 0, 4, 0, 14, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57,
|
||||
0, 8, 0, 5, 45, 0, 4, 0, 14, 48, 49, 50, 51, 52, 53, 54,
|
||||
55, 56, 57, 0, 4, 0, 14, 48, 49, 50, 51, 52, 53, 54, 55, 56,
|
||||
57, 0, 4, 0, 14, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 0,
|
||||
4, 0, 14, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 0, 2, 0,
|
||||
3, 0, 0, 0,
|
||||
};
|
||||
static const cst_regex sevenphonenumber_rx = {
|
||||
0, 1, NULL, 0, 116,
|
||||
(char *)sevenphonenumber_rxprog
|
||||
};
|
||||
const cst_regex * const sevenphonenumber = &sevenphonenumber_rx;
|
||||
|
||||
static const unsigned char fourdigits_rxprog[] = {
|
||||
156, 6, 0, 65, 1, 0, 3, 4, 0, 14, 48, 49, 50, 51, 52, 53,
|
||||
54, 55, 56, 57, 0, 4, 0, 14, 48, 49, 50, 51, 52, 53, 54, 55,
|
||||
56, 57, 0, 4, 0, 14, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57,
|
||||
0, 4, 0, 14, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 0, 2,
|
||||
0, 3, 0, 0, 0,
|
||||
};
|
||||
static const cst_regex fourdigits_rx = {
|
||||
0, 1, NULL, 0, 69,
|
||||
(char *)fourdigits_rxprog
|
||||
};
|
||||
const cst_regex * const fourdigits = &fourdigits_rx;
|
||||
|
||||
static const unsigned char threedigits_rxprog[] = {
|
||||
156, 6, 0, 51, 1, 0, 3, 4, 0, 14, 48, 49, 50, 51, 52, 53,
|
||||
54, 55, 56, 57, 0, 4, 0, 14, 48, 49, 50, 51, 52, 53, 54, 55,
|
||||
56, 57, 0, 4, 0, 14, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57,
|
||||
0, 2, 0, 3, 0, 0, 0,
|
||||
};
|
||||
static const cst_regex threedigits_rx = {
|
||||
0, 1, NULL, 0, 55,
|
||||
(char *)threedigits_rxprog
|
||||
};
|
||||
const cst_regex * const threedigits = &threedigits_rx;
|
||||
|
||||
static const unsigned char numbertime_rxprog[] = {
|
||||
156, 6, 0, 75, 1, 0, 3, 6, 0, 17, 4, 0, 17, 48, 49, 50,
|
||||
51, 52, 53, 54, 55, 56, 57, 0, 6, 0, 3, 9, 0, 3, 4, 0,
|
||||
14, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 0, 8, 0, 5, 58,
|
||||
0, 4, 0, 10, 48, 49, 50, 51, 52, 53, 0, 4, 0, 14, 48, 49,
|
||||
50, 51, 52, 53, 54, 55, 56, 57, 0, 2, 0, 3, 0, 0, 0,
|
||||
};
|
||||
static const cst_regex numbertime_rx = {
|
||||
0, 1, NULL, 0, 79,
|
||||
(char *)numbertime_rxprog
|
||||
};
|
||||
const cst_regex * const numbertime = &numbertime_rx;
|
||||
|
||||
static const unsigned char numbertimexm_rxprog[] = {
|
||||
156, 6, 0, 87, 1, 0, 3, 6, 0, 17, 4, 0, 17, 48, 49, 50,
|
||||
51, 52, 53, 54, 55, 56, 57, 0, 6, 0, 3, 9, 0, 3, 4, 0,
|
||||
14, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 0, 4, 0, 6, 58,
|
||||
46, 0, 4, 0, 10, 48, 49, 50, 51, 52, 53, 0, 4, 0, 14, 48,
|
||||
49, 50, 51, 52, 53, 54, 55, 56, 57, 0, 4, 0, 6, 97, 112, 0,
|
||||
8, 0, 5, 109, 0, 2, 0, 3, 0, 0, 0,
|
||||
};
|
||||
static const cst_regex numbertimexm_rx = {
|
||||
0, 1, NULL, 0, 91,
|
||||
(char *)numbertimexm_rxprog
|
||||
};
|
||||
const cst_regex * const numbertimexm = &numbertimexm_rx;
|
||||
|
||||
static const unsigned char dottedabbrevs_rxprog[] = {
|
||||
156, 6, 0, 161, 1, 0, 3, 21, 0, 3, 6, 0, 64, 4, 0, 56,
|
||||
65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80,
|
||||
81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 97, 98, 99, 100, 101, 102,
|
||||
103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118,
|
||||
119, 120, 121, 122, 0, 8, 0, 5, 46, 0, 31, 0, 3, 6, 0, 6,
|
||||
7, 0, 73, 6, 0, 3, 9, 0, 3, 4, 0, 56, 65, 66, 67, 68,
|
||||
69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84,
|
||||
85, 86, 87, 88, 89, 90, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106,
|
||||
107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122,
|
||||
0, 6, 0, 8, 8, 0, 8, 46, 0, 6, 0, 3, 9, 0, 3, 2,
|
||||
0, 3, 0, 0, 0,
|
||||
};
|
||||
static const cst_regex dottedabbrevs_rx = {
|
||||
0, 1, NULL, 0, 165,
|
||||
(char *)dottedabbrevs_rxprog
|
||||
};
|
||||
const cst_regex * const dottedabbrevs = &dottedabbrevs_rx;
|
||||
|
||||
static const unsigned char digitsslashdigits_rxprog[] = {
|
||||
156, 6, 0, 48, 1, 0, 3, 11, 0, 17, 4, 0, 0, 48, 49, 50,
|
||||
51, 52, 53, 54, 55, 56, 57, 0, 8, 0, 5, 47, 0, 11, 0, 17,
|
||||
4, 0, 0, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 0, 2, 0,
|
||||
3, 0, 0, 0,
|
||||
};
|
||||
static const cst_regex digitsslashdigits_rx = {
|
||||
0, 1, NULL, 0, 52,
|
||||
(char *)digitsslashdigits_rxprog
|
||||
};
|
||||
const cst_regex * const digitsslashdigits = &digitsslashdigits_rx;
|
||||
|
||||
static const unsigned char digits2dash_rxprog[] = {
|
||||
156, 6, 0, 72, 1, 0, 3, 21, 0, 3, 6, 0, 28, 11, 0, 17,
|
||||
4, 0, 0, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 0, 8, 0,
|
||||
5, 45, 0, 3, 0, 3, 31, 0, 3, 6, 0, 6, 7, 0, 37, 6,
|
||||
0, 3, 9, 0, 3, 11, 0, 17, 4, 0, 0, 48, 49, 50, 51, 52,
|
||||
53, 54, 55, 56, 57, 0, 2, 0, 3, 0, 0, 0,
|
||||
};
|
||||
static const cst_regex digits2dash_rx = {
|
||||
0, 1, NULL, 0, 76,
|
||||
(char *)digits2dash_rxprog
|
||||
};
|
||||
const cst_regex * const digits2dash = &digits2dash_rx;
|
||||
|
||||
static const unsigned char wandm_rxprog[] = {
|
||||
156, 6, 0, 190, 1, 0, 3, 10, 0, 18, 4, 0, 0, 48, 49, 50,
|
||||
51, 52, 53, 54, 55, 56, 57, 44, 0, 11, 0, 17, 4, 0, 0, 48,
|
||||
49, 50, 51, 52, 53, 54, 55, 56, 57, 0, 21, 0, 3, 6, 0, 9,
|
||||
8, 0, 137, 108, 98, 0, 6, 0, 9, 8, 0, 128, 76, 66, 0, 6,
|
||||
0, 10, 8, 0, 119, 108, 98, 115, 0, 6, 0, 10, 8, 0, 109, 76,
|
||||
66, 83, 0, 6, 0, 9, 8, 0, 99, 102, 116, 0, 6, 0, 9, 8,
|
||||
0, 90, 70, 84, 0, 6, 0, 9, 8, 0, 81, 107, 103, 0, 6, 0,
|
||||
9, 8, 0, 72, 107, 109, 0, 6, 0, 9, 8, 0, 63, 111, 122, 0,
|
||||
6, 0, 9, 8, 0, 54, 104, 122, 0, 6, 0, 9, 8, 0, 45, 72,
|
||||
122, 0, 6, 0, 9, 8, 0, 36, 72, 90, 0, 6, 0, 10, 8, 0,
|
||||
27, 75, 72, 122, 0, 6, 0, 10, 8, 0, 17, 77, 72, 122, 0, 6,
|
||||
0, 10, 8, 0, 7, 71, 72, 122, 0, 31, 0, 3, 2, 0, 3, 0,
|
||||
0, 0,
|
||||
};
|
||||
static const cst_regex wandm_rx = {
|
||||
0, 1, NULL, 0, 194,
|
||||
(char *)wandm_rxprog
|
||||
};
|
||||
const cst_regex * const wandm = &wandm_rx;
|
||||
|
902
3rdparty/flite_hts_engine/flite/lang/usenglish/us_text.c
vendored
Normal file
902
3rdparty/flite_hts_engine/flite/lang/usenglish/us_text.c
vendored
Normal file
|
@ -0,0 +1,902 @@
|
|||
/*************************************************************************/
|
||||
/* */
|
||||
/* 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 English text analysis functions */
|
||||
/* */
|
||||
/*************************************************************************/
|
||||
|
||||
#include <ctype.h>
|
||||
#include "flite.h"
|
||||
#include "usenglish.h"
|
||||
#include "us_text.h"
|
||||
#include "cst_regex.h"
|
||||
|
||||
static int text_splitable(const char *s,int i);
|
||||
static cst_val *state_name(const char *name,cst_item *t);
|
||||
|
||||
/* compiled us regexes */
|
||||
#include "us_regexes.h"
|
||||
|
||||
static const char * const wandm_abbrevs[99][2] =
|
||||
{
|
||||
{ "LB", "pounds" },
|
||||
{ "LBS", "pounds" },
|
||||
{ "lb", "pounds" },
|
||||
{ "lbs", "pounds" },
|
||||
{ "ft", "feet" },
|
||||
{ "FT", "feet" },
|
||||
{ "kg", "kilograms" },
|
||||
{ "km", "kilometers" },
|
||||
{ "oz", "ounces" },
|
||||
{ "hz", "hertz" },
|
||||
{ "Hz", "hertz" },
|
||||
{ "HZ", "hertz" },
|
||||
{ "KHz", "kilohertz" },
|
||||
{ "MHz", "megahertz" },
|
||||
{ "GHz", "gigahertz" },
|
||||
{ NULL, NULL },
|
||||
};
|
||||
|
||||
static const char * const eedwords[] = {
|
||||
"to",
|
||||
"can",
|
||||
"can't",
|
||||
"cannot",
|
||||
"cant",
|
||||
"could",
|
||||
"couldn't",
|
||||
"couldnt",
|
||||
"will",
|
||||
"shall",
|
||||
NULL};
|
||||
|
||||
void us_text_init()
|
||||
{
|
||||
/* Nothing */
|
||||
}
|
||||
|
||||
void us_text_deinit()
|
||||
{
|
||||
/* Nothing */
|
||||
}
|
||||
|
||||
static int rex_like(const cst_item *t)
|
||||
{
|
||||
/* returns 1 if this is in a king like context */
|
||||
char *pn = cst_downcase(ffeature_string(t,"p.name"));
|
||||
char *ppn = cst_downcase(ffeature_string(t,"p.p.name"));
|
||||
int v = 0;
|
||||
|
||||
if (cst_streq(pn,"louis") ||
|
||||
cst_streq(pn,"henry") ||
|
||||
cst_streq(pn,"charles") ||
|
||||
cst_streq(pn,"philip") ||
|
||||
cst_streq(pn,"george") ||
|
||||
cst_streq(pn,"edward") ||
|
||||
cst_streq(pn,"pius") ||
|
||||
cst_streq(pn,"william") ||
|
||||
cst_streq(pn,"richard") ||
|
||||
cst_streq(pn,"ptolemy") ||
|
||||
cst_streq(pn,"john") ||
|
||||
cst_streq(pn,"paul") ||
|
||||
cst_streq(pn,"peter") ||
|
||||
cst_streq(pn,"nicholas") ||
|
||||
cst_streq(pn,"frederick") ||
|
||||
cst_streq(pn,"james") ||
|
||||
cst_streq(pn,"alfonso") ||
|
||||
cst_streq(pn,"ivan") ||
|
||||
cst_streq(pn,"napolean") ||
|
||||
cst_streq(pn,"leo") ||
|
||||
cst_streq(pn,"gregory") ||
|
||||
cst_streq(pn,"catherine") ||
|
||||
cst_streq(pn,"alexandria") ||
|
||||
cst_streq(pn,"pierre") ||
|
||||
cst_streq(pn,"elizabeth") ||
|
||||
cst_streq(pn,"mary"))
|
||||
v = 1;
|
||||
else if (cst_streq(ppn,"king") ||
|
||||
cst_streq(ppn,"queen") ||
|
||||
cst_streq(ppn,"pope") ||
|
||||
cst_streq(ppn,"duke") ||
|
||||
cst_streq(ppn,"tsar") ||
|
||||
cst_streq(ppn,"emperor") ||
|
||||
cst_streq(ppn,"shah") ||
|
||||
cst_streq(ppn,"ceasar") ||
|
||||
cst_streq(ppn,"duchess") ||
|
||||
cst_streq(ppn,"tsarina") ||
|
||||
cst_streq(ppn,"empress") ||
|
||||
cst_streq(ppn,"baron") ||
|
||||
cst_streq(ppn,"baroness") ||
|
||||
cst_streq(ppn,"sultan") ||
|
||||
cst_streq(ppn,"count") ||
|
||||
cst_streq(ppn,"countess"))
|
||||
v = 1;
|
||||
|
||||
cst_free(pn);
|
||||
cst_free(ppn);
|
||||
return v;
|
||||
}
|
||||
|
||||
static int section_like(const cst_item *t)
|
||||
{
|
||||
/* returns 1 if this is in a king like context */
|
||||
char *pn = cst_downcase(ffeature_string(t,"p.name"));
|
||||
int v = 0;
|
||||
|
||||
if (cst_streq(pn,"section") ||
|
||||
cst_streq(pn,"chapter") ||
|
||||
cst_streq(pn,"part") ||
|
||||
cst_streq(pn,"phrase") ||
|
||||
cst_streq(pn,"verse") ||
|
||||
cst_streq(pn,"scene") ||
|
||||
cst_streq(pn,"act") ||
|
||||
cst_streq(pn,"book") ||
|
||||
cst_streq(pn,"volume") ||
|
||||
cst_streq(pn,"chap") ||
|
||||
cst_streq(pn,"war") ||
|
||||
cst_streq(pn,"apollo") ||
|
||||
cst_streq(pn,"trek") ||
|
||||
cst_streq(pn,"fortran"))
|
||||
v = 1;
|
||||
|
||||
cst_free(pn);
|
||||
|
||||
return v;
|
||||
}
|
||||
|
||||
cst_utterance *us_textanalysis(cst_utterance *u)
|
||||
{
|
||||
if (!feat_present(u->features, "tokentowords_func"))
|
||||
utt_set_feat(u, "tokentowords_func", itemfunc_val(us_tokentowords));
|
||||
|
||||
return default_textanalysis(u);
|
||||
}
|
||||
|
||||
static cst_val *us_tokentowords_one(cst_item *token, const char *name);
|
||||
cst_val *us_tokentowords(cst_item *token)
|
||||
{
|
||||
return us_tokentowords_one(token, item_feat_string(token, "name"));
|
||||
}
|
||||
|
||||
static cst_val *add_break(cst_val *l)
|
||||
{
|
||||
/* add feature (break 1) to last item in this list */
|
||||
const cst_val *i;
|
||||
cst_val *t;
|
||||
cst_features *f;
|
||||
|
||||
for (i=l; val_cdr(i); i=val_cdr(i));
|
||||
|
||||
if (i) /* might be empty list */
|
||||
{
|
||||
f = new_features();
|
||||
feat_set_string(f,"break","1");
|
||||
t = cons_val(val_car(i),features_val(f));
|
||||
set_car((cst_val *)i,t);
|
||||
}
|
||||
|
||||
return l;
|
||||
}
|
||||
|
||||
static cst_val *us_tokentowords_one(cst_item *token, const char *name)
|
||||
{
|
||||
/* Return list of words that expand token/name */
|
||||
char *p, *aaa, *bbb, *ccc;
|
||||
int i,j,k,l;
|
||||
cst_val *r, *s;
|
||||
const char *nsw = "";
|
||||
cst_lexicon *lex;
|
||||
cst_utterance *utt;
|
||||
/* printf("token_name %s name %s\n",item_name(token),name); */
|
||||
/* FIXME: For SAPI and friends, any tokens with explicit
|
||||
pronunciations need to be passed through as-is. This should be
|
||||
done in the interface code rather than here once the
|
||||
tokentowords hook is accessible. AWB: no, they should set the
|
||||
nsw feature and this function should deal with it (doesn't yet though)*/
|
||||
if (item_feat_present(token,"phones"))
|
||||
return cons_val(string_val(name),NULL);
|
||||
|
||||
if (item_feat_present(token,"nsw"))
|
||||
nsw = item_feat_string(token,"nsw");
|
||||
|
||||
utt = item_utt(token);
|
||||
lex = val_lexicon(feat_val(utt->features,"lexicon"));
|
||||
|
||||
if ((cst_streq("a",name) || cst_streq("A",name)) &&
|
||||
((item_next(token) == 0) ||
|
||||
(!cst_streq(name,item_name(token))) ||
|
||||
(!cst_streq("",ffeature_string(token,"punc")))))
|
||||
{ /* if A is a sub part of a token, then its ey not ah */
|
||||
r = cons_val(string_val("_a"),0);
|
||||
}
|
||||
else if (cst_strlen(name) == 0)
|
||||
r = NULL;
|
||||
else if (cst_regex_match(dottedabbrevs,name))
|
||||
{ /* X.X.X */
|
||||
aaa = cst_strdup(name);
|
||||
for (i=j=0; aaa[i]; i++)
|
||||
if (aaa[i] != '.')
|
||||
{
|
||||
aaa[j] = aaa[i];
|
||||
j++;
|
||||
}
|
||||
aaa[j] = '\0';
|
||||
r = en_exp_letters(aaa);
|
||||
cst_free(aaa);
|
||||
}
|
||||
else if (cst_regex_match(cst_rx_commaint,name))
|
||||
{ /* 99,999,999 */
|
||||
aaa = cst_strdup(name);
|
||||
for (j=i=0; i < cst_strlen(name); i++)
|
||||
if (name[i] != ',')
|
||||
{
|
||||
aaa[j] = name[i];
|
||||
j++;
|
||||
}
|
||||
aaa[j] = '\0';
|
||||
r = en_exp_real(aaa);
|
||||
cst_free(aaa);
|
||||
}
|
||||
else if (cst_regex_match(sevenphonenumber,name))
|
||||
{ /* 234-3434 telephone numbers */
|
||||
p=strchr(name,'-');
|
||||
aaa = cst_strdup(name);
|
||||
aaa[cst_strlen(name)-cst_strlen(p)] = '\0';
|
||||
bbb = cst_strdup(p+1);
|
||||
r = val_append(add_break(en_exp_digits(aaa)),
|
||||
en_exp_digits(bbb));
|
||||
cst_free(aaa);
|
||||
cst_free(bbb);
|
||||
}
|
||||
else if
|
||||
((cst_regex_match(threedigits,name) &&
|
||||
((!cst_regex_match(cst_rx_digits,ffeature_string(token,"p.name"))
|
||||
&& cst_regex_match(threedigits,ffeature_string(token,"n.name"))
|
||||
&& cst_regex_match(fourdigits,ffeature_string(token,"n.n.name"))) ||
|
||||
(cst_regex_match(sevenphonenumber,ffeature_string(token,"n.name"))) ||
|
||||
(!cst_regex_match(cst_rx_digits,ffeature_string(token,"p.p.name"))
|
||||
&& cst_regex_match(threedigits,ffeature_string(token,"p.name"))
|
||||
&& cst_regex_match(fourdigits,ffeature_string(token,"n.name"))))) ||
|
||||
(cst_regex_match(fourdigits,name) &&
|
||||
(!cst_regex_match(cst_rx_digits,ffeature_string(token,"n.name"))
|
||||
&& cst_regex_match(threedigits,ffeature_string(token,"p.name"))
|
||||
&& cst_regex_match(threedigits,ffeature_string(token,"p.p.name")))))
|
||||
{
|
||||
/* part of a telephone number */
|
||||
if (cst_streq("",ffeature_string(token,"punc")))
|
||||
item_set_string(token,"punc",",");
|
||||
r = add_break(en_exp_digits(name));
|
||||
}
|
||||
else if (cst_regex_match(numbertime,name))
|
||||
{
|
||||
p=strchr(name,':');
|
||||
aaa = cst_strdup(name);
|
||||
aaa[cst_strlen(name)-cst_strlen(p)] = '\0';
|
||||
bbb = cst_strdup(p+1);
|
||||
|
||||
r = en_exp_number(aaa);
|
||||
if (!cst_streq("00",bbb))
|
||||
r = val_append(r,en_exp_id(bbb));
|
||||
/* r = add_break(r); */
|
||||
|
||||
cst_free(aaa);
|
||||
cst_free(bbb);
|
||||
}
|
||||
else if (cst_regex_match(numbertimexm,name))
|
||||
{
|
||||
p=strchr(name,':');
|
||||
if (!p) p=strchr(name,'.');
|
||||
aaa = cst_strdup(name);
|
||||
aaa[cst_strlen(name)-cst_strlen(p)] = '\0';
|
||||
bbb = cst_strdup(p+1);
|
||||
bbb[2] = '\0';
|
||||
ccc = cst_strdup(p+3);
|
||||
|
||||
r = en_exp_number(aaa);
|
||||
if (!cst_streq("00",bbb))
|
||||
r = val_append(r,en_exp_id(bbb));
|
||||
/* r = add_break(r); */
|
||||
|
||||
r = val_append(r,en_exp_letters(ccc));
|
||||
|
||||
cst_free(aaa);
|
||||
cst_free(bbb);
|
||||
cst_free(ccc);
|
||||
}
|
||||
else if (cst_regex_match(digits2dash,name))
|
||||
{ /* 999-999-999 etc */
|
||||
bbb = cst_strdup(name);
|
||||
for (r=0,aaa=p=bbb; *p; p++)
|
||||
{
|
||||
if (*p == '-')
|
||||
{
|
||||
*p = '\0';
|
||||
r = val_append(val_reverse(add_break(en_exp_digits(aaa))),r);
|
||||
aaa = p+1;
|
||||
}
|
||||
}
|
||||
r = val_append(val_reverse(add_break(en_exp_digits(aaa))),r);
|
||||
r = val_reverse(r);
|
||||
cst_free(bbb);
|
||||
}
|
||||
else if (cst_regex_match(cst_rx_digits,name))
|
||||
{ /* string of digits (use cart to disambiguate) */
|
||||
if (cst_streq("nide",nsw))
|
||||
r = en_exp_id(name);
|
||||
else {
|
||||
const cst_val *tv;
|
||||
const char *ts;
|
||||
char *rname;
|
||||
|
||||
rname = cst_strdup(item_feat_string(token,"name"));
|
||||
if (cst_streq(name,rname))
|
||||
tv = cart_interpret(token,&us_nums_cart);
|
||||
else
|
||||
{ /* in a recursive call */
|
||||
item_set_string(token,"name",name);
|
||||
tv = cart_interpret(token,&us_nums_cart);
|
||||
item_set_string(token,"name",rname);
|
||||
}
|
||||
cst_free(rname);
|
||||
ts = val_string(tv);
|
||||
if (cst_streq(ts,"ordinal"))
|
||||
r = en_exp_ordinal(name);
|
||||
else if (cst_streq(ts,"digits"))
|
||||
r = en_exp_digits(name);
|
||||
else if (cst_streq(ts,"year"))
|
||||
r = en_exp_id(name);
|
||||
else
|
||||
r = en_exp_number(name);
|
||||
}
|
||||
}
|
||||
else if (cst_regex_match(romannums,name))
|
||||
{ /* Roman numerals */
|
||||
if (cst_streq("",ffeature_string(token,"p.punc")))
|
||||
{ /* no preceeding punc */
|
||||
char n[10];
|
||||
cst_sprintf(n,"%d",en_exp_roman(name));
|
||||
if (rex_like(token))
|
||||
r = cons_val(string_val("the"),
|
||||
en_exp_ordinal(n));
|
||||
else if (section_like(token))
|
||||
r = en_exp_number(n);
|
||||
else
|
||||
r = en_exp_letters(name);
|
||||
}
|
||||
else
|
||||
r = en_exp_letters(name);
|
||||
}
|
||||
else if (cst_regex_match(drst,name))
|
||||
{ /* St Andrew's St, Dr King Dr */
|
||||
const char *street;
|
||||
const char *saint;
|
||||
if ((name[0] == 's') || (name[0] == 'S'))
|
||||
{
|
||||
street = "street";
|
||||
saint = "saint";
|
||||
}
|
||||
else
|
||||
{
|
||||
street = "drive";
|
||||
saint = "doctor";
|
||||
}
|
||||
if ((item_next(token) == 0) ||
|
||||
strchr(item_feat_string(token,"punc"),','))
|
||||
r = cons_val(string_val(street),NULL);
|
||||
else if (strchr(ffeature_string(token,"punc"),','))
|
||||
r = cons_val(string_val(saint),NULL);
|
||||
else
|
||||
{
|
||||
const char *pname = ffeature_string(token,"p.name");
|
||||
const char *nname = ffeature_string(token,"n.name");
|
||||
if ((pname[0] >= 'A') && (pname[0] <= 'Z') &&
|
||||
(nname[0] >= 'a') && (nname[0] <= 'z'))
|
||||
r = cons_val(string_val(street),NULL);
|
||||
else if ((pname[0] >= '0') && (pname[0] <= '9') &&
|
||||
(nname[0] >= 'a') && (nname[0] <= 'z'))
|
||||
r = cons_val(string_val(street),NULL);
|
||||
else if ((pname[0] >= 'a') && (pname[0] <= 'z') &&
|
||||
(nname[0] >= 'A') && (nname[0] <= 'Z'))
|
||||
r = cons_val(string_val(saint),NULL);
|
||||
else if (cst_streq(ffeature_string(token,"n.whitespace")," "))
|
||||
r = cons_val(string_val(saint),NULL);
|
||||
else
|
||||
r = cons_val(string_val(street),NULL);
|
||||
}
|
||||
if (cst_streq(item_feat_string(token,"punc"),"."))
|
||||
item_set_string(token,"punc","");
|
||||
}
|
||||
else if (cst_streq(name,"Mr"))
|
||||
{
|
||||
item_set_string(token,"punc","");
|
||||
r = cons_val(string_val("mister"),NULL);
|
||||
}
|
||||
else if (cst_streq(name,"Mrs"))
|
||||
{
|
||||
item_set_string(token,"punc","");
|
||||
r = cons_val(string_val("missus"),NULL);
|
||||
}
|
||||
else if ((cst_streq(name,"read")) ||
|
||||
(cst_streq(name,"lead")))
|
||||
{ /* checking WSJ examples, this seems a quick and easy way to */
|
||||
/* get manty of these correct */
|
||||
const char *pname = ffeature_string(token,"p.name");
|
||||
|
||||
for (i=0; eedwords[i]; i++)
|
||||
if (cst_streq(pname,eedwords[i]))
|
||||
break;
|
||||
|
||||
if (eedwords[i])
|
||||
{ /* reed or leed */
|
||||
if (name[0] == 'r')
|
||||
r = cons_val(string_val("reed"),NULL);
|
||||
else
|
||||
r = cons_val(string_val("leed"),NULL);
|
||||
}
|
||||
else /* red or led */
|
||||
{
|
||||
if (name[0] == 'r')
|
||||
r = cons_val(string_val("red"),NULL);
|
||||
else
|
||||
r = cons_val(string_val("led"),NULL);
|
||||
}
|
||||
}
|
||||
else if (cst_streq(name,"am") || cst_streq(name,"AM"))
|
||||
{
|
||||
if (!cst_streq(name,item_name(token)))
|
||||
r = en_exp_letters(name);
|
||||
else if (item_prev(token) &&
|
||||
(cst_regex_match(numbertime,ffeature_string(token,"p.name")) ||
|
||||
cst_regex_match(cst_rx_digits,ffeature_string(token,"p.name"))))
|
||||
r = en_exp_letters(name);
|
||||
else
|
||||
r = cons_val(string_val(name),NULL);
|
||||
}
|
||||
else if ((cst_strlen(name) == 1) &&
|
||||
(name[0] >= 'A') &&
|
||||
(name[0] <= 'Z') &&
|
||||
(cst_streq(" ",ffeature_string(token,"n.whitespace"))) &&
|
||||
(ffeature_string(token,"n.name")[0] >= 'A') &&
|
||||
(ffeature_string(token,"n.name")[0] <= 'Z'))
|
||||
{
|
||||
item_set_string(token,"punc","");
|
||||
aaa = cst_downcase(name);
|
||||
if (cst_streq(aaa,"a"))
|
||||
r = cons_val(string_val("_a"),0);
|
||||
else
|
||||
r = cons_val(string_val(aaa),0);
|
||||
cst_free(aaa);
|
||||
}
|
||||
else if (cst_regex_match(cst_rx_double,name))
|
||||
{ /* real numbers */
|
||||
r = en_exp_real(name);
|
||||
}
|
||||
else if (cst_regex_match(ordinal_number,name))
|
||||
{ /* explicit ordinals */
|
||||
aaa = cst_strdup(name);
|
||||
aaa[cst_strlen(name)-2] = '\0';
|
||||
r = en_exp_ordinal(aaa);
|
||||
cst_free(aaa);
|
||||
}
|
||||
else if ((cst_regex_match(illion,name)) &&
|
||||
(cst_regex_match(usmoney,ffeature_string(token,"p.name"))))
|
||||
{
|
||||
r = cons_val(string_val(name),
|
||||
cons_val(string_val("dollars"),NULL));
|
||||
}
|
||||
else if (cst_regex_match(usmoney,name))
|
||||
{
|
||||
/* US money */
|
||||
/* printf("money, money, money %s\n", name); */
|
||||
p = strchr(name,'.');
|
||||
|
||||
if (cst_regex_match(illion,ffeature_string(token,"n.name")))
|
||||
{ /* carl sagan's billions and billions */
|
||||
r = en_exp_real(&name[1]);
|
||||
}
|
||||
else if (!p)
|
||||
{
|
||||
aaa = cst_strdup(&name[1]);
|
||||
if (cst_streq("1",aaa))
|
||||
r = cons_val(string_val("dollar"),NULL);
|
||||
else
|
||||
r = cons_val(string_val("dollars"),NULL);
|
||||
r = val_append(us_tokentowords_one(token,aaa),r);
|
||||
cst_free(aaa);
|
||||
}
|
||||
else if ((cst_strlen(p) == 1) || (cst_strlen(p) > 3))
|
||||
{ /* simply read as mumble point mumble */
|
||||
r = val_append(en_exp_real(&name[1]),
|
||||
cons_val(string_val("dollars"),NULL));
|
||||
}
|
||||
else
|
||||
{
|
||||
aaa = cst_strdup(name);
|
||||
aaa[cst_strlen(name)-cst_strlen(p)] = '\0';
|
||||
for (i=j=0; aaa[i] != '\0'; i++)
|
||||
{
|
||||
if (aaa[i] != ',')
|
||||
{
|
||||
aaa[j] = aaa[i];
|
||||
j++;
|
||||
}
|
||||
}
|
||||
aaa[j] = '\0';
|
||||
if (cst_streq("00",p+1))
|
||||
r = 0;
|
||||
else if (cst_streq("01",p+1))
|
||||
r = val_append(en_exp_number(p+1),
|
||||
cons_val(string_val("cent"),NULL));
|
||||
else
|
||||
r = val_append(en_exp_number(p+1),
|
||||
cons_val(string_val("cents"),NULL));
|
||||
|
||||
if (cst_streq("1",aaa+1))
|
||||
r = cons_val(string_val("dollar"),r);
|
||||
else
|
||||
r = cons_val(string_val("dollars"),r);
|
||||
|
||||
r = val_append(en_exp_number(aaa+1),r);
|
||||
cst_free(aaa);
|
||||
}
|
||||
}
|
||||
else if (name[cst_strlen(name)-1] == '%')
|
||||
{
|
||||
aaa = cst_strdup(name);
|
||||
aaa[cst_strlen(aaa)-1] = '\0';
|
||||
r = val_append(us_tokentowords_one(token,aaa),
|
||||
cons_val(string_val("per"),
|
||||
cons_val(string_val("cent"),NULL)));
|
||||
cst_free(aaa);
|
||||
|
||||
}
|
||||
else if (cst_regex_match(numess,name))
|
||||
{ /* 60s and 7s and 9s */
|
||||
aaa = cst_strdup(name);
|
||||
aaa[cst_strlen(name)-1] = '\0';
|
||||
r = val_append(en_exp_number(aaa),
|
||||
cons_val(string_val("'s"),0));
|
||||
cst_free(aaa);
|
||||
}
|
||||
else if ((p=(cst_strrchr(name,'\''))))
|
||||
{
|
||||
static const char *pc[] = { "'s", "'ll", "'ve", "'d", NULL };
|
||||
|
||||
bbb = cst_downcase(p);
|
||||
if (cst_member_string(bbb, pc))
|
||||
{
|
||||
aaa = cst_strdup(name);
|
||||
aaa[cst_strlen(name)-cst_strlen(p)] = '\0';
|
||||
r = val_append(us_tokentowords_one(token,aaa),
|
||||
cons_val(string_val(bbb),0));
|
||||
cst_free(aaa);
|
||||
}
|
||||
else if (cst_streq(p,"'tve")) /* admittedly rare and weird */
|
||||
{
|
||||
aaa = cst_strdup(name);
|
||||
aaa[cst_strlen(name)-cst_strlen(p)+2] = '\0';
|
||||
r = val_append(us_tokentowords_one(token,aaa),
|
||||
cons_val(string_val("'ve"),0));
|
||||
cst_free(aaa);
|
||||
}
|
||||
else
|
||||
{
|
||||
aaa = cst_strdup(name);
|
||||
strcpy(&aaa[cst_strlen(name)-cst_strlen(p)],p+1);
|
||||
r = us_tokentowords_one(token,aaa);
|
||||
cst_free(aaa);
|
||||
}
|
||||
cst_free(bbb);
|
||||
}
|
||||
else if ((cst_regex_match(digitsslashdigits,name)) &&
|
||||
(cst_streq(name,item_name(token))))
|
||||
{ /* might be fraction, or not */
|
||||
p=strchr(name,'/');
|
||||
aaa = cst_strdup(name);
|
||||
aaa[cst_strlen(name)-cst_strlen(p)] = '\0';
|
||||
bbb = cst_strdup(p+1);
|
||||
if ((cst_streq("1",aaa)) && (cst_streq("2",bbb)))
|
||||
r = cons_val(string_val("a"),
|
||||
cons_val(string_val("half"),0));
|
||||
else if (atoi(aaa) < (atoi(bbb)))
|
||||
{
|
||||
r = val_append(en_exp_number(aaa),
|
||||
en_exp_ordinal(bbb));
|
||||
if (atoi(aaa) > 1)
|
||||
r = val_append(r,cons_val(string_val("'s"),0));
|
||||
}
|
||||
else
|
||||
r = val_append(en_exp_number(aaa),
|
||||
cons_val(string_val("slash"),
|
||||
en_exp_number(bbb)));
|
||||
|
||||
if ((cst_regex_match(cst_rx_digits,ffeature_string(token,"p.name")))
|
||||
&& (item_prev(token))) /* don't mistake "0" as a number */
|
||||
r = cons_val(string_val("and"),r);
|
||||
cst_free(aaa);
|
||||
cst_free(bbb);
|
||||
}
|
||||
else if ((p=(strchr(name,'-'))))
|
||||
{ /* aaa-bbb */
|
||||
aaa = cst_strdup(name);
|
||||
aaa[cst_strlen(name)-cst_strlen(p)] = '\0';
|
||||
bbb = cst_strdup(p+1);
|
||||
if (cst_regex_match(cst_rx_digits,aaa) &&
|
||||
cst_regex_match(cst_rx_digits,bbb))
|
||||
{
|
||||
ccc = cst_strdup(name);
|
||||
item_set_string(token,"name",bbb);
|
||||
r = us_tokentowords_one(token,bbb);
|
||||
item_set_string(token,"name",aaa);
|
||||
r = val_append(us_tokentowords_one(token,aaa),
|
||||
cons_val(string_val("to"),r));
|
||||
item_set_string(token,"name",ccc);
|
||||
cst_free(ccc);
|
||||
}
|
||||
else
|
||||
r = val_append(us_tokentowords_one(token,aaa),
|
||||
us_tokentowords_one(token,bbb));
|
||||
cst_free(aaa);
|
||||
cst_free(bbb);
|
||||
}
|
||||
else if (cst_regex_match(wandm,name))
|
||||
{ /* weights and measures */
|
||||
|
||||
for (j=cst_strlen(name)-1; j > 0; j--)
|
||||
if (cst_strchr("0123456789",name[j]))
|
||||
break;
|
||||
j += 1;
|
||||
for (i=0; wandm_abbrevs[i][0]; i++)
|
||||
if (cst_streq(name+j,wandm_abbrevs[i][0]))
|
||||
break;
|
||||
aaa = cst_strdup(name);
|
||||
aaa[j] = '\0';
|
||||
/* remove any commas */
|
||||
for (k=0,l=0; aaa[l]; k++,l++)
|
||||
{
|
||||
if (aaa[l] == ',') l++;
|
||||
aaa[k] = aaa[l];
|
||||
}
|
||||
aaa[k] = '\0';
|
||||
if (!wandm_abbrevs[i][0]) /* didn't find an expansion */
|
||||
r = val_append(en_exp_number(aaa),
|
||||
us_tokentowords_one(token,name+j));
|
||||
else
|
||||
r = val_append(en_exp_number(aaa),
|
||||
cons_val(string_val(wandm_abbrevs[i][1]),NULL));
|
||||
|
||||
cst_free(aaa);
|
||||
}
|
||||
else if ((cst_strlen(name) > 1) && (!cst_regex_match(cst_rx_alpha,name)))
|
||||
{ /* its not just alphas */
|
||||
for (i=0; name[i] != '\0'; i++)
|
||||
if (text_splitable(name,i))
|
||||
break;
|
||||
aaa = cst_strdup(name);
|
||||
aaa[i+1] = '\0';
|
||||
bbb = cst_strdup(&name[i+1]);
|
||||
item_set_string(token,"nsw","nide");
|
||||
r = val_append(us_tokentowords_one(token,aaa),
|
||||
us_tokentowords_one(token,bbb));
|
||||
cst_free(aaa);
|
||||
cst_free(bbb);
|
||||
}
|
||||
else if ((s = state_name(name,token)))
|
||||
{
|
||||
r = s;
|
||||
}
|
||||
else if ((cst_strlen(name) > 1) &&
|
||||
(cst_regex_match(cst_rx_alpha,name)) &&
|
||||
(!in_lex(lex,name,NULL)) &&
|
||||
(!us_aswd(name)))
|
||||
/* Still not quiet right, if there is a user_lex we need to check */
|
||||
/* it too -- but user_lex isn't user setable yet */
|
||||
/* Need common exception list */
|
||||
/* unpronouncable list of alphas */
|
||||
r = en_exp_letters(name);
|
||||
|
||||
/* buckets of other stuff missing */
|
||||
|
||||
else /* just a word */
|
||||
{
|
||||
aaa = cst_downcase(name);
|
||||
r = cons_val(string_val(aaa),0);
|
||||
cst_free(aaa);
|
||||
}
|
||||
return r;
|
||||
}
|
||||
|
||||
static int text_splitable(const char *s,int i)
|
||||
{
|
||||
/* should token be split after this */
|
||||
|
||||
if (strchr("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",s[i]) &&
|
||||
strchr("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",s[i+1]))
|
||||
return FALSE;
|
||||
else if (strchr("0123456789",s[i]) &&
|
||||
strchr("0123456789",s[i+1]))
|
||||
return FALSE;
|
||||
else
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static const char * const states[99][5] =
|
||||
{
|
||||
{ "AL", "ambiguous", "alabama" , NULL, NULL },
|
||||
{ "Al", "ambiguous", "alabama" , NULL, NULL },
|
||||
{ "Ala", "", "alabama" , NULL, NULL },
|
||||
{ "AK", "", "alaska" , NULL, NULL },
|
||||
{ "Ak", "", "alaska" , NULL, NULL },
|
||||
{ "AZ", "", "arizona" , NULL, NULL },
|
||||
{ "Az", "", "arizona" , NULL, NULL },
|
||||
{ "CA", "", "california" , NULL, NULL },
|
||||
{ "Ca", "", "california" , NULL, NULL },
|
||||
{ "Cal", "ambiguous", "california" , NULL, NULL },
|
||||
{ "Calif", "", "california" , NULL, NULL },
|
||||
{ "CO", "ambiguous", "colorado" , NULL, NULL },
|
||||
{ "Co", "ambiguous", "colorado" , NULL, NULL },
|
||||
{ "Colo", "", "colorado" , NULL, NULL },
|
||||
{ "DC", "", "d" , "c", NULL },
|
||||
{ "DE", "", "delaware" , NULL, NULL },
|
||||
{ "De", "ambiguous", "delaware" , NULL, NULL },
|
||||
{ "Del", "ambiguous", "delaware" , NULL, NULL },
|
||||
{ "FL", "", "florida" , NULL, NULL },
|
||||
{ "Fl", "ambiguous", "florida" , NULL, NULL },
|
||||
{ "Fla", "", "florida" , NULL, NULL },
|
||||
{ "GA", "", "georgia" , NULL, NULL },
|
||||
{ "Ga", "", "georgia" , NULL, NULL },
|
||||
{ "HI", "", "hawaii" , NULL, NULL },
|
||||
{ "Hi", "ambiguous", "hawaii" , NULL, NULL },
|
||||
{ "IA", "", "iowa" , NULL, NULL },
|
||||
{ "Ia", "ambiguous", "iowa" , NULL, NULL },
|
||||
{ "Ind", "ambiguous", "indiana" , NULL, NULL },
|
||||
{ "ID", "ambiguous", "idaho" , NULL, NULL },
|
||||
{ "IL", "ambiguous", "illinois" , NULL, NULL },
|
||||
{ "Il", "ambiguous", "illinois" , NULL, NULL },
|
||||
{ "ILL", "ambiguous", "illinois" , NULL, NULL },
|
||||
{ "KS", "", "kansas" , NULL, NULL },
|
||||
{ "Ks", "", "kansas" , NULL, NULL },
|
||||
{ "Kans", "", "kansas" , NULL, NULL },
|
||||
{ "KY", "ambiguous", "kentucky" , NULL, NULL },
|
||||
{ "Ky", "ambiguous", "kentucky" , NULL, NULL },
|
||||
{ "LA", "ambiguous", "louisiana" , NULL, NULL },
|
||||
{ "La", "ambiguous", "louisiana" , NULL, NULL },
|
||||
{ "Lou", "ambiguous", "louisiana" , NULL, NULL },
|
||||
{ "Lous", "ambiguous", "louisiana" , NULL, NULL },
|
||||
{ "MA", "ambiguous", "massachusetts" , NULL, NULL },
|
||||
{ "Mass", "ambiguous", "massachusetts" , NULL, NULL },
|
||||
{ "Ma", "ambiguous", "massachusetts" , NULL, NULL },
|
||||
{ "MD", "ambiguous", "maryland" , NULL, NULL },
|
||||
{ "Md", "ambiguous", "maryland" , NULL, NULL },
|
||||
{ "ME", "ambiguous", "maine" , NULL, NULL },
|
||||
{ "Me", "ambiguous", "maine" , NULL, NULL },
|
||||
{ "MI", "", "michigan" , NULL, NULL },
|
||||
{ "Mi", "ambiguous", "michigan" , NULL, NULL },
|
||||
{ "Mich", "ambiguous", "michigan" , NULL, NULL },
|
||||
{ "MN", "ambiguous", "minnestota" , NULL, NULL },
|
||||
{ "Minn", "ambiguous", "minnestota" , NULL, NULL },
|
||||
{ "MS", "ambiguous", "mississippi" , NULL, NULL },
|
||||
{ "Miss", "ambiguous", "mississippi" , NULL, NULL },
|
||||
{ "MT", "ambiguous", "montanna" , NULL, NULL },
|
||||
{ "Mt", "ambiguous", "montanna" , NULL, NULL },
|
||||
{ "MO", "ambiguous", "missouri" , NULL, NULL },
|
||||
{ "Mo", "ambiguous", "missouri" , NULL, NULL },
|
||||
{ "NC", "ambiguous", "north" , "carolina", NULL },
|
||||
{ "ND", "ambiguous", "north" , "dakota", NULL },
|
||||
{ "NE", "ambiguous", "nebraska" , NULL, NULL },
|
||||
{ "Ne", "ambiguous", "nebraska" , NULL, NULL },
|
||||
{ "Neb", "ambiguous", "nebraska" , NULL, NULL },
|
||||
{ "NH", "ambiguous", "new" , "hampshire", NULL },
|
||||
{ "NV", "", "nevada" , NULL, NULL },
|
||||
{ "Nev", "", "nevada" , NULL, NULL },
|
||||
{ "NY", "", "new" , "york", NULL },
|
||||
{ "OH", "ambiguous", "ohio" , NULL, NULL },
|
||||
{ "OK", "ambiguous", "oklahoma" , NULL, NULL },
|
||||
{ "Okla", "", "oklahoma" , NULL, NULL },
|
||||
{ "OR", "ambiguous", "oregon" , NULL, NULL },
|
||||
{ "Or", "ambiguous", "oregon" , NULL, NULL },
|
||||
{ "Ore", "ambiguous", "oregon" , NULL, NULL },
|
||||
{ "PA", "ambiguous", "pennsylvania" , NULL, NULL },
|
||||
{ "Pa", "ambiguous", "pennsylvania" , NULL, NULL },
|
||||
{ "Penn", "ambiguous", "pennsylvania" , NULL, NULL },
|
||||
{ "RI", "ambiguous", "rhode" , "island", NULL },
|
||||
{ "SC", "ambiguous", "south" , "carlolina", NULL },
|
||||
{ "SD", "ambiguous", "south" , "dakota", NULL },
|
||||
{ "TN", "ambiguous", "tennesee" , NULL, NULL },
|
||||
{ "Tn", "ambiguous", "tennesee" , NULL, NULL },
|
||||
{ "Tenn", "ambiguous", "tennesee" , NULL, NULL },
|
||||
{ "TX", "ambiguous", "texas" , NULL, NULL },
|
||||
{ "Tx", "ambiguous", "texas" , NULL, NULL },
|
||||
{ "Tex", "ambiguous", "texas" , NULL, NULL },
|
||||
{ "UT", "ambiguous", "utah" , NULL, NULL },
|
||||
{ "VA", "ambiguous", "virginia" , NULL, NULL },
|
||||
{ "WA", "ambiguous", "washington" , NULL, NULL },
|
||||
{ "Wa", "ambiguous", "washington" , NULL, NULL },
|
||||
{ "Wash", "ambiguous", "washington" , NULL, NULL },
|
||||
{ "WI", "ambiguous", "wisconsin" , NULL, NULL },
|
||||
{ "Wi", "ambiguous", "wisconsin" , NULL, NULL },
|
||||
{ "WV", "ambiguous", "west" , "virginia", NULL },
|
||||
{ "WY", "ambiguous", "wyoming" , NULL, NULL },
|
||||
{ "Wy", "ambiguous", "wyoming" , NULL, NULL },
|
||||
{ "Wyo", "", "wyoming" , NULL, NULL },
|
||||
{ "PR", "ambiguous", "puerto" , "rico", NULL },
|
||||
{ NULL, NULL, "puerto" , "rico", NULL }
|
||||
};
|
||||
|
||||
static cst_val *state_name(const char *name,cst_item *t)
|
||||
{
|
||||
int s,j;
|
||||
int do_it = 0;
|
||||
cst_val *r = 0;
|
||||
|
||||
for (s=0; states[s][0]; s++)
|
||||
{
|
||||
if (cst_streq(states[s][0],name))
|
||||
{
|
||||
if (cst_streq(states[s][1],"ambiguous"))
|
||||
{
|
||||
const char *pname = ffeature_string(t,"p.name");
|
||||
const char *nname = ffeature_string(t,"n.name");
|
||||
/* previous name is capitalized */
|
||||
if (((strchr("ABCDEFGHIJKLMNOPQRSTUVWXYZ",pname[0])) &&
|
||||
(cst_strlen(pname) > 2) &&
|
||||
(cst_regex_match(cst_rx_alpha,pname))) &&
|
||||
((strchr("abcdefghijklmnopqrstuvwxyz",nname[0])) ||
|
||||
(item_next(t) == 0) ||
|
||||
(cst_streq(".",item_feat_string(t,"punc"))) ||
|
||||
(((cst_strlen(nname) == 5 || (cst_strlen(nname) == 10)) &&
|
||||
cst_regex_match(cst_rx_digits,nname)))))
|
||||
do_it = 1;
|
||||
else
|
||||
do_it = 0;
|
||||
}
|
||||
else
|
||||
do_it = 1;
|
||||
|
||||
if (do_it)
|
||||
{
|
||||
for (j=2; states[s][j]; j++)
|
||||
r = cons_val(string_val(states[s][j]),r);
|
||||
return val_reverse(r);
|
||||
}
|
||||
}
|
||||
}
|
||||
return r;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
64
3rdparty/flite_hts_engine/flite/lang/usenglish/us_text.h
vendored
Normal file
64
3rdparty/flite_hts_engine/flite/lang/usenglish/us_text.h
vendored
Normal file
|
@ -0,0 +1,64 @@
|
|||
/*************************************************************************/
|
||||
/* */
|
||||
/* 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 Text analysis */
|
||||
/* */
|
||||
/*************************************************************************/
|
||||
#ifndef _US_TEXT_H__
|
||||
#define _US_TEXT_H__
|
||||
|
||||
#include "cst_val.h"
|
||||
#include "cst_hrg.h"
|
||||
#include "cst_cart.h"
|
||||
|
||||
cst_val *en_exp_number(const char *numstring);
|
||||
cst_val *en_exp_digits(const char *numstring);
|
||||
cst_val *en_exp_id(const char *numstring);
|
||||
cst_val *en_exp_ordinal(const char *numstring);
|
||||
cst_val *en_exp_letters(const char *lets);
|
||||
cst_val *en_exp_real(const char *numstring);
|
||||
int en_exp_roman(const char *roman);
|
||||
|
||||
extern const cst_cart us_nums_cart;
|
||||
|
||||
void us_text_init();
|
||||
cst_utterance *us_textanalysis(cst_utterance *u);
|
||||
cst_val *us_tokentowords(cst_item *token);
|
||||
|
||||
int us_aswd(const char *w);
|
||||
|
||||
#endif
|
||||
|
137
3rdparty/flite_hts_engine/flite/lang/usenglish/usenglish.c
vendored
Normal file
137
3rdparty/flite_hts_engine/flite/lang/usenglish/usenglish.c
vendored
Normal file
|
@ -0,0 +1,137 @@
|
|||
/*************************************************************************/
|
||||
/* */
|
||||
/* 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 2001 */
|
||||
/*************************************************************************/
|
||||
/* Generic models for US English */
|
||||
/*************************************************************************/
|
||||
|
||||
/* ----------------------------------------------------------------- */
|
||||
/* The English TTS System "Flite+hts_engine" */
|
||||
/* developed by HTS Working Group */
|
||||
/* http://hts-engine.sourceforge.net/ */
|
||||
/* ----------------------------------------------------------------- */
|
||||
/* */
|
||||
/* Copyright (c) 2005-2013 Nagoya Institute of Technology */
|
||||
/* Department of Computer Science */
|
||||
/* */
|
||||
/* 2005-2008 Tokyo Institute of Technology */
|
||||
/* Interdisciplinary Graduate School of */
|
||||
/* Science and Engineering */
|
||||
/* */
|
||||
/* All rights reserved. */
|
||||
/* */
|
||||
/* Redistribution and use in source and binary forms, with or */
|
||||
/* without modification, are permitted provided that the following */
|
||||
/* conditions are met: */
|
||||
/* */
|
||||
/* - Redistributions of source code must retain the above copyright */
|
||||
/* notice, this list of conditions and the following disclaimer. */
|
||||
/* - 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. */
|
||||
/* - Neither the name of the HTS working group 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 COPYRIGHT HOLDERS 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 COPYRIGHT OWNER 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. */
|
||||
/* ----------------------------------------------------------------- */
|
||||
|
||||
#include "flite.h"
|
||||
#include "usenglish.h"
|
||||
#ifndef FLITE_PLUS_HTS_ENGINE
|
||||
#include "us_f0.h"
|
||||
#endif /* !FLITE_PLUS_HTS_ENGINE */
|
||||
#include "us_text.h"
|
||||
#include "us_ffeatures.h"
|
||||
|
||||
static const char * const us_english_punctuation = "\"'`.,:;!?(){}[]";
|
||||
static const char * const us_english_prepunctuation = "\"'`({[";
|
||||
static const char * const us_english_singlecharsymbols = "";
|
||||
static const char * const us_english_whitespace = " \t\n\r";
|
||||
|
||||
void usenglish_init(cst_voice *v)
|
||||
{
|
||||
us_text_init();
|
||||
|
||||
/* utterance break function */
|
||||
feat_set(v->features,"utt_break",breakfunc_val(&default_utt_break));
|
||||
|
||||
/* Phoneset */
|
||||
feat_set(v->features,"phoneset",phoneset_val(&us_phoneset));
|
||||
feat_set_string(v->features,"silence",us_phoneset.silence);
|
||||
|
||||
/* Text analyser */
|
||||
feat_set_string(v->features,"text_whitespace",us_english_whitespace);
|
||||
feat_set_string(v->features,"text_postpunctuation",us_english_punctuation);
|
||||
feat_set_string(v->features,"text_prepunctuation",
|
||||
us_english_prepunctuation);
|
||||
feat_set_string(v->features,"text_singlecharsymbols",
|
||||
us_english_singlecharsymbols);
|
||||
|
||||
feat_set(v->features,"tokentowords_func",itemfunc_val(&us_tokentowords));
|
||||
|
||||
/* very simple POS tagger */
|
||||
feat_set(v->features,"pos_tagger_cart",cart_val(&us_pos_cart));
|
||||
|
||||
/* Phrasing */
|
||||
feat_set(v->features,"phrasing_cart",cart_val(&us_phrasing_cart));
|
||||
|
||||
/* Intonation */
|
||||
feat_set(v->features,"int_cart_accents",cart_val(&us_int_accent_cart));
|
||||
feat_set(v->features,"int_cart_tones",cart_val(&us_int_tone_cart));
|
||||
|
||||
#ifndef FLITE_PLUS_HTS_ENGINE
|
||||
/* Duration */
|
||||
feat_set(v->features,"dur_cart",cart_val(&us_durz_cart));
|
||||
feat_set(v->features,"dur_stats",dur_stats_val((dur_stats *)us_dur_stats));
|
||||
|
||||
/* f0 model */
|
||||
feat_set(v->features,"f0_model_func",uttfunc_val(&us_f0_model));
|
||||
#endif /* !FLITE_PLUS_HTS_ENGINE */
|
||||
|
||||
us_ff_register(v->ffunctions);
|
||||
}
|
120
3rdparty/flite_hts_engine/flite/lang/usenglish/usenglish.h
vendored
Normal file
120
3rdparty/flite_hts_engine/flite/lang/usenglish/usenglish.h
vendored
Normal file
|
@ -0,0 +1,120 @@
|
|||
/*************************************************************************/
|
||||
/* */
|
||||
/* 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: December 2000 */
|
||||
/*************************************************************************/
|
||||
/* Generic models for US English */
|
||||
/*************************************************************************/
|
||||
|
||||
/* ----------------------------------------------------------------- */
|
||||
/* The English TTS System "Flite+hts_engine" */
|
||||
/* developed by HTS Working Group */
|
||||
/* http://hts-engine.sourceforge.net/ */
|
||||
/* ----------------------------------------------------------------- */
|
||||
/* */
|
||||
/* Copyright (c) 2005-2013 Nagoya Institute of Technology */
|
||||
/* Department of Computer Science */
|
||||
/* */
|
||||
/* 2005-2008 Tokyo Institute of Technology */
|
||||
/* Interdisciplinary Graduate School of */
|
||||
/* Science and Engineering */
|
||||
/* */
|
||||
/* All rights reserved. */
|
||||
/* */
|
||||
/* Redistribution and use in source and binary forms, with or */
|
||||
/* without modification, are permitted provided that the following */
|
||||
/* conditions are met: */
|
||||
/* */
|
||||
/* - Redistributions of source code must retain the above copyright */
|
||||
/* notice, this list of conditions and the following disclaimer. */
|
||||
/* - 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. */
|
||||
/* - Neither the name of the HTS working group 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 COPYRIGHT HOLDERS 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 COPYRIGHT OWNER 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. */
|
||||
/* ----------------------------------------------------------------- */
|
||||
|
||||
#ifndef _US_ENGLISH_H_
|
||||
#define _US_ENGLISH_H_
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#include "cst_utterance.h"
|
||||
#include "cst_cart.h"
|
||||
#include "cst_val.h"
|
||||
#include "cst_phoneset.h"
|
||||
#include "cst_lexicon.h"
|
||||
#include "cst_synth.h"
|
||||
|
||||
/* Voices call this to use usenglish. */
|
||||
void usenglish_init(cst_voice *v);
|
||||
|
||||
/* Default functions and values that you might need. */
|
||||
#ifndef FLITE_PLUS_HTS_ENGINE
|
||||
cst_utterance *us_f0_model(cst_utterance *u);
|
||||
#endif /* !FLITE_PLUS_HTS_ENGINE */
|
||||
extern const cst_phoneset us_phoneset;
|
||||
extern const cst_cart us_phrasing_cart;
|
||||
extern const cst_cart us_int_accent_cart;
|
||||
extern const cst_cart us_int_tone_cart;
|
||||
#ifndef FLITE_PLUS_HTS_ENGINE
|
||||
extern const cst_cart us_durz_cart;
|
||||
#endif /* !FLITE_PLUS_HTS_ENGINE */
|
||||
extern const cst_cart us_pos_cart;
|
||||
#ifndef FLITE_PLUS_HTS_ENGINE
|
||||
extern const dur_stat * const us_dur_stats[];
|
||||
#endif /* !FLITE_PLUS_HTS_ENGINE */
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /* extern "C" */
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#endif
|
198
3rdparty/flite_hts_engine/flite/src/hrg/cst_ffeature.c
vendored
Normal file
198
3rdparty/flite_hts_engine/flite/src/hrg/cst_ffeature.c
vendored
Normal file
|
@ -0,0 +1,198 @@
|
|||
/*************************************************************************/
|
||||
/* */
|
||||
/* Language Technologies Institute */
|
||||
/* Carnegie Mellon University */
|
||||
/* Copyright (c) 1999-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: April 2000 */
|
||||
/*************************************************************************/
|
||||
/* */
|
||||
/* Item features and paths */
|
||||
/* */
|
||||
/*************************************************************************/
|
||||
#include "cst_alloc.h"
|
||||
#include "cst_item.h"
|
||||
#include "cst_relation.h"
|
||||
#include "cst_utterance.h"
|
||||
#include "cst_tokenstream.h"
|
||||
|
||||
CST_VAL_REGISTER_FUNCPTR(ffunc,cst_ffunction)
|
||||
|
||||
DEF_STATIC_CONST_VAL_STRING(ffeature_default_val,"0");
|
||||
|
||||
static const void *internal_ff(const cst_item *item,
|
||||
const char *featpath,int type);
|
||||
|
||||
const char *ffeature_string(const cst_item *item,const char *featpath)
|
||||
{
|
||||
return val_string(ffeature(item,featpath));
|
||||
}
|
||||
int ffeature_int(const cst_item *item,const char *featpath)
|
||||
{
|
||||
return val_int(ffeature(item,featpath));
|
||||
}
|
||||
float ffeature_float(const cst_item *item,const char *featpath)
|
||||
{
|
||||
return val_float(ffeature(item,featpath));
|
||||
}
|
||||
|
||||
cst_item* path_to_item(const cst_item *item,const char *featpath)
|
||||
{
|
||||
return (cst_item *)internal_ff(item,featpath,1);
|
||||
}
|
||||
|
||||
const cst_val *ffeature(const cst_item *item,const char *featpath)
|
||||
{
|
||||
return (cst_val *)internal_ff(item,featpath,0);
|
||||
}
|
||||
|
||||
static const void *internal_ff(const cst_item *item,
|
||||
const char *featpath,int type)
|
||||
{
|
||||
const char *tk, *relation;
|
||||
cst_utterance *utt;
|
||||
const cst_item *pitem;
|
||||
void *void_v;
|
||||
const cst_val *ff;
|
||||
cst_ffunction ffunc;
|
||||
char tokenstring[200]; /* we don't seem to have featpaths longer than 72 */
|
||||
char *tokens[100];
|
||||
int i,j;
|
||||
|
||||
/* This used to use cst_tokenstream but that was too slow */
|
||||
for (i=0; i<199 && featpath[i]; i++)
|
||||
tokenstring[i] = featpath[i];
|
||||
tokenstring[i]='\0';
|
||||
tokens[0] = tokenstring;
|
||||
for (i=0,j=1; tokenstring[i]; i++)
|
||||
{
|
||||
if (strchr(":.",tokenstring[i]))
|
||||
{
|
||||
tokenstring[i] = '\0';
|
||||
tokens[j] = &tokenstring[i+1];
|
||||
j++;
|
||||
}
|
||||
}
|
||||
tokens[j] = NULL;
|
||||
j=0;
|
||||
for (tk = tokens[j], pitem=item;
|
||||
pitem &&
|
||||
(((type == 0) && tokens[j+1]) ||
|
||||
((type == 1) && tk));
|
||||
j++, tk = tokens[j])
|
||||
{
|
||||
if (cst_streq(tk,"n"))
|
||||
pitem = item_next(pitem);
|
||||
else if (cst_streq(tk,"p"))
|
||||
pitem = item_prev(pitem);
|
||||
else if (cst_streq(tk,"pp"))
|
||||
{
|
||||
if (item_prev(pitem))
|
||||
pitem = item_prev(item_prev(pitem));
|
||||
else
|
||||
pitem = NULL;
|
||||
}
|
||||
else if (cst_streq(tk,"nn"))
|
||||
{
|
||||
if (item_next(pitem))
|
||||
pitem = item_next(item_next(pitem));
|
||||
else
|
||||
pitem = NULL;
|
||||
}
|
||||
else if (cst_streq(tk,"parent"))
|
||||
pitem = item_parent(pitem);
|
||||
else if ((cst_streq(tk,"daughter")) ||
|
||||
(cst_streq(tk,"daughter1")))
|
||||
pitem = item_daughter(pitem);
|
||||
else if (cst_streq(tk,"daughtern"))
|
||||
pitem = item_last_daughter(pitem);
|
||||
else if (cst_streq(tk,"R"))
|
||||
{
|
||||
/* A relation move */
|
||||
j++;
|
||||
relation = tokens[j];
|
||||
pitem = item_as(pitem,relation);
|
||||
}
|
||||
else
|
||||
{
|
||||
cst_errmsg("ffeature: unknown directive \"%s\" ignored\n",tk);
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
if (type == 0)
|
||||
{
|
||||
if (pitem && (utt = item_utt(pitem)))
|
||||
ff = feat_val(utt->ffunctions,tk);
|
||||
else
|
||||
ff = NULL;
|
||||
void_v = NULL;
|
||||
if (!ff)
|
||||
void_v = (void *)item_feat(pitem,tk);
|
||||
else if (pitem)
|
||||
{
|
||||
ffunc = val_ffunc(ff);
|
||||
void_v = (void *)(*ffunc)(pitem);
|
||||
}
|
||||
if (void_v == NULL)
|
||||
{
|
||||
#if 0
|
||||
if (pitem)
|
||||
printf("awb_debug didn't find %s in %s\n",tk,
|
||||
get_param_string(pitem->contents->features,"name","noname"));
|
||||
else
|
||||
{
|
||||
if (cst_streq("gpos",tk))
|
||||
printf("awb_debug2\n");
|
||||
printf("awb_debug didn't find %s %s\n",tk,featpath);
|
||||
}
|
||||
#endif
|
||||
void_v = (void *)&ffeature_default_val;
|
||||
}
|
||||
}
|
||||
else
|
||||
void_v = (void *)pitem;
|
||||
|
||||
return void_v;
|
||||
}
|
||||
|
||||
void ff_register(cst_features *ffunctions, const char *name, cst_ffunction f)
|
||||
{
|
||||
/* Register features functions */
|
||||
|
||||
if (feat_present(ffunctions, name))
|
||||
cst_errmsg("warning: ffunction %s redefined\n", name);
|
||||
feat_set(ffunctions, name, ffunc_val(f));
|
||||
}
|
||||
|
||||
void ff_unregister(cst_features *ffunctions, const char *name)
|
||||
{
|
||||
feat_remove(ffunctions, name);
|
||||
}
|
383
3rdparty/flite_hts_engine/flite/src/hrg/cst_item.c
vendored
Normal file
383
3rdparty/flite_hts_engine/flite/src/hrg/cst_item.c
vendored
Normal file
|
@ -0,0 +1,383 @@
|
|||
/*************************************************************************/
|
||||
/* */
|
||||
/* 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 */
|
||||
/*************************************************************************/
|
||||
/* */
|
||||
/* Items (and Item Contents) */
|
||||
/* */
|
||||
/*************************************************************************/
|
||||
#include "cst_alloc.h"
|
||||
#include "cst_item.h"
|
||||
#include "cst_relation.h"
|
||||
#include "cst_utterance.h"
|
||||
|
||||
/* Define functions for using items, rels and utts as vals */
|
||||
CST_VAL_REGISTER_TYPE_NODEL(relation,cst_relation)
|
||||
CST_VAL_REGISTER_TYPE_NODEL(item,cst_item)
|
||||
CST_VAL_REGISTER_TYPE(utterance,cst_utterance)
|
||||
CST_VAL_REGISTER_FUNCPTR(itemfunc,cst_itemfunc)
|
||||
|
||||
cst_item *new_item_relation(cst_relation *r,cst_item *i)
|
||||
{
|
||||
cst_item *ni;
|
||||
|
||||
ni = cst_utt_alloc(r->utterance, cst_item, 1);
|
||||
ni->contents = 0;
|
||||
ni->n = ni->p = ni->u = ni->d = 0;
|
||||
ni->relation = r;
|
||||
item_contents_set(ni,i);
|
||||
return ni;
|
||||
}
|
||||
|
||||
void item_contents_set(cst_item *current, cst_item *i)
|
||||
{
|
||||
cst_item_contents *c = 0;
|
||||
cst_item *nn_item;
|
||||
if (i == 0)
|
||||
c = new_item_contents(current);
|
||||
else
|
||||
c = i->contents;
|
||||
if (c != current->contents)
|
||||
{
|
||||
item_unref_contents(current);
|
||||
current->contents = c;
|
||||
/* If this contents is already in this relation */
|
||||
/* empty the other reference */
|
||||
if (feat_present(current->contents->relations,current->relation->name))
|
||||
{ /* oops this is already in this relation */
|
||||
nn_item = val_item(feat_val(current->contents->relations,
|
||||
current->relation->name));
|
||||
feat_set(nn_item->contents->relations,
|
||||
current->relation->name,
|
||||
item_val(nn_item));
|
||||
|
||||
}
|
||||
/* Add back reference */
|
||||
feat_set(current->contents->relations,
|
||||
current->relation->name,
|
||||
item_val(current));
|
||||
}
|
||||
}
|
||||
|
||||
void delete_item(cst_item *item)
|
||||
{
|
||||
cst_item *ds, *nds;
|
||||
|
||||
if (item->n != NULL)
|
||||
{
|
||||
item->n->p = item->p;
|
||||
item->n->u = item->u; /* in trees if this is first daughter */
|
||||
}
|
||||
if (item->p != NULL) item->p->n = item->n;
|
||||
if (item->u != NULL) item->u->d = item->n; /* when first daughter */
|
||||
|
||||
if (item->relation)
|
||||
{
|
||||
if (item->relation->head == item)
|
||||
item->relation->head = item->n;
|
||||
if (item->relation->tail == item)
|
||||
item->relation->tail = item->p;
|
||||
}
|
||||
|
||||
/* Delete all the daughters of item */
|
||||
for (ds = item->d; ds; ds=nds)
|
||||
{
|
||||
nds = ds->n;
|
||||
delete_item(ds);
|
||||
}
|
||||
|
||||
item_unref_contents(item);
|
||||
cst_utt_free(item->relation->utterance, item);
|
||||
}
|
||||
|
||||
void item_unref_contents(cst_item *item)
|
||||
{
|
||||
/* unreference this item from contents, and delete contents */
|
||||
/* if no one else is referencing it */
|
||||
|
||||
if (item && item->contents)
|
||||
{
|
||||
feat_remove(item->contents->relations,item->relation->name);
|
||||
if (feat_length(item->contents->relations) == 0)
|
||||
{
|
||||
delete_features(item->contents->relations);
|
||||
delete_features(item->contents->features);
|
||||
cst_utt_free(item->relation->utterance,item->contents);
|
||||
}
|
||||
item->contents = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
cst_item_contents *new_item_contents(cst_item *i)
|
||||
{
|
||||
cst_item_contents *ic;
|
||||
|
||||
ic = cst_utt_alloc(i->relation->utterance,cst_item_contents,1);
|
||||
ic->features = new_features_local(i->relation->utterance->ctx);
|
||||
ic->relations = new_features_local(i->relation->utterance->ctx);
|
||||
|
||||
return ic;
|
||||
}
|
||||
|
||||
cst_item *item_as(const cst_item *i,const char *rname)
|
||||
{
|
||||
/* return i as relation rname or null */
|
||||
const cst_val *v;
|
||||
|
||||
if (i == NULL)
|
||||
return NULL;
|
||||
else
|
||||
{
|
||||
v = feat_val(i->contents->relations,rname);
|
||||
if (v != NULL)
|
||||
return val_item(v);
|
||||
else
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
/********************************************************************/
|
||||
/* List relation related functions */
|
||||
/********************************************************************/
|
||||
|
||||
cst_item *item_next(const cst_item *i)
|
||||
{
|
||||
if (i == NULL)
|
||||
return NULL;
|
||||
else
|
||||
return i->n;
|
||||
}
|
||||
|
||||
cst_item *item_prev(const cst_item *i)
|
||||
{
|
||||
if (i == NULL)
|
||||
return NULL;
|
||||
else
|
||||
return i->p;
|
||||
}
|
||||
|
||||
cst_item *item_append(cst_item *current, cst_item *ni)
|
||||
{
|
||||
cst_item *rni = 0;
|
||||
|
||||
if (ni && (ni->relation == current->relation))
|
||||
{
|
||||
/* got to delete it first as an item can't be in a relation twice */
|
||||
}
|
||||
else
|
||||
rni = new_item_relation(current->relation,ni);
|
||||
|
||||
rni->n = current->n;
|
||||
if (current->n != NULL)
|
||||
current->n->p = rni;
|
||||
rni->p = current;
|
||||
current->n = rni;
|
||||
|
||||
if (current->relation->tail == current)
|
||||
current->relation->tail = rni;
|
||||
|
||||
return rni;
|
||||
}
|
||||
|
||||
cst_item *item_prepend(cst_item *current, cst_item *ni)
|
||||
{
|
||||
cst_item *rni = 0;
|
||||
|
||||
if (ni && (ni->relation == current->relation))
|
||||
{
|
||||
/* got to delete it first as an item can't be in a relation twice */
|
||||
}
|
||||
else
|
||||
rni = new_item_relation(current->relation,ni);
|
||||
|
||||
rni->p = current->p;
|
||||
if (current->p != NULL)
|
||||
current->p->n = rni;
|
||||
rni->n = current;
|
||||
current->p = rni;
|
||||
|
||||
if (current->u) /* in a tree */
|
||||
{
|
||||
current->u->d = rni;
|
||||
rni->u = current->u;
|
||||
current->u = NULL;
|
||||
}
|
||||
|
||||
if (current->relation->head == current)
|
||||
current->relation->head = rni;
|
||||
|
||||
return rni;
|
||||
}
|
||||
|
||||
/********************************************************************/
|
||||
/* Tree relation related functions */
|
||||
/********************************************************************/
|
||||
cst_item *item_parent(const cst_item *i)
|
||||
{
|
||||
const cst_item *n;
|
||||
|
||||
for (n=i; item_prev(n); n=item_prev(n));
|
||||
if (n == NULL)
|
||||
return NULL;
|
||||
else
|
||||
return n->u;
|
||||
}
|
||||
|
||||
cst_item *item_daughter(const cst_item *i)
|
||||
{
|
||||
if (i == NULL)
|
||||
return NULL;
|
||||
else
|
||||
return i->d;
|
||||
}
|
||||
|
||||
cst_item *item_nth_daughter(const cst_item *i,int n)
|
||||
{
|
||||
int d;
|
||||
cst_item *p;
|
||||
|
||||
for (d=0,p=item_daughter(i); p && (d < n); p=item_next(p),d++);
|
||||
return p;
|
||||
}
|
||||
|
||||
|
||||
cst_item *item_last_daughter(const cst_item *i)
|
||||
{
|
||||
cst_item *p;
|
||||
|
||||
for (p=item_daughter(i); item_next(p); p=item_next(p));
|
||||
return p;
|
||||
}
|
||||
|
||||
cst_item *item_add_daughter(cst_item *i,cst_item *nd)
|
||||
{
|
||||
cst_item *p,*rnd;
|
||||
|
||||
p = item_last_daughter(i);
|
||||
|
||||
if (p)
|
||||
rnd=item_append(p,nd);
|
||||
else
|
||||
{ /* first new daughter */
|
||||
if (nd && (nd->relation == i->relation))
|
||||
{
|
||||
/* got to delete it first as nd can't be in a relation twice */
|
||||
cst_errmsg("item_add_daughter: already in relation\n");
|
||||
return 0;
|
||||
}
|
||||
else
|
||||
rnd = new_item_relation(i->relation,nd);
|
||||
|
||||
rnd->u = i;
|
||||
i->d = rnd;
|
||||
}
|
||||
|
||||
return rnd;
|
||||
}
|
||||
|
||||
/********************************************************************/
|
||||
/* Feature functions */
|
||||
/********************************************************************/
|
||||
|
||||
int item_feat_present(const cst_item *i,const char *name)
|
||||
{
|
||||
return feat_present(item_feats(i),name);
|
||||
}
|
||||
|
||||
int item_feat_remove(const cst_item *i,const char *name)
|
||||
{
|
||||
return feat_remove(item_feats(i),name);
|
||||
}
|
||||
|
||||
cst_features *item_feats(const cst_item *i)
|
||||
{
|
||||
return (i ? i->contents->features : NULL);
|
||||
}
|
||||
|
||||
const cst_val *item_feat(const cst_item *i,const char *name)
|
||||
{
|
||||
return feat_val(item_feats(i),name);
|
||||
}
|
||||
|
||||
int item_feat_int(const cst_item *i,const char *name)
|
||||
{
|
||||
return feat_int(item_feats(i),name);
|
||||
}
|
||||
|
||||
float item_feat_float(const cst_item *i,const char *name)
|
||||
{
|
||||
return feat_float(item_feats(i),name);
|
||||
}
|
||||
|
||||
const char *item_feat_string(const cst_item *i,const char *name)
|
||||
{
|
||||
return feat_string(item_feats(i),name);
|
||||
}
|
||||
|
||||
void item_set(const cst_item *i,const char *name,const cst_val *val)
|
||||
{
|
||||
feat_set(item_feats(i),name,val);
|
||||
}
|
||||
|
||||
void item_set_int(const cst_item *i,const char *name,int val)
|
||||
{
|
||||
feat_set_int(item_feats(i),name,val);
|
||||
}
|
||||
|
||||
void item_set_float(const cst_item *i,const char *name,float val)
|
||||
{
|
||||
feat_set_float(item_feats(i),name,val);
|
||||
}
|
||||
|
||||
void item_set_string(const cst_item *i,const char *name,const char *val)
|
||||
{
|
||||
feat_set_string(item_feats(i),name,val);
|
||||
}
|
||||
|
||||
cst_utterance *item_utt(const cst_item *i)
|
||||
{
|
||||
if (i && i->relation)
|
||||
return i->relation->utterance;
|
||||
else
|
||||
return NULL;
|
||||
}
|
||||
|
||||
int item_equal(const cst_item *a, const cst_item *b)
|
||||
{
|
||||
if ((a == b) ||
|
||||
(a && b && (a->contents == b->contents)))
|
||||
return TRUE;
|
||||
else
|
||||
return FALSE;
|
||||
}
|
117
3rdparty/flite_hts_engine/flite/src/hrg/cst_relation.c
vendored
Normal file
117
3rdparty/flite_hts_engine/flite/src/hrg/cst_relation.c
vendored
Normal file
|
@ -0,0 +1,117 @@
|
|||
/*************************************************************************/
|
||||
/* */
|
||||
/* 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 */
|
||||
/*************************************************************************/
|
||||
/* */
|
||||
/* Relations */
|
||||
/* */
|
||||
/*************************************************************************/
|
||||
#include "cst_item.h"
|
||||
#include "cst_relation.h"
|
||||
#include "cst_utterance.h"
|
||||
|
||||
static const char * const cst_relation_noname = "NoName";
|
||||
|
||||
cst_relation *new_relation(const char *name, cst_utterance *u)
|
||||
{
|
||||
cst_relation *r = cst_utt_alloc(u,cst_relation,1);
|
||||
|
||||
r->name = cst_strdup(name);
|
||||
r->features = new_features_local(u->ctx);
|
||||
r->head = NULL;
|
||||
r->utterance = u;
|
||||
|
||||
return r;
|
||||
}
|
||||
|
||||
void delete_relation(cst_relation *r)
|
||||
{
|
||||
cst_item *p, *np;
|
||||
|
||||
if (r != NULL)
|
||||
{
|
||||
/* This needs to traverse the *all* items */
|
||||
for(p=r->head; p; p=np)
|
||||
{
|
||||
np = item_next(p);
|
||||
delete_item(p); /* this *does* go down daughters too */
|
||||
}
|
||||
delete_features(r->features);
|
||||
cst_free(r->name);
|
||||
cst_utt_free(r->utterance,r);
|
||||
}
|
||||
}
|
||||
|
||||
cst_item *relation_head(cst_relation *r)
|
||||
{
|
||||
return ( r == NULL ? NULL : r->head);
|
||||
}
|
||||
|
||||
cst_item *relation_tail(cst_relation *r)
|
||||
{
|
||||
return (r == NULL ? NULL : r->tail);
|
||||
}
|
||||
|
||||
const char *relation_name(cst_relation *r)
|
||||
{
|
||||
return (r == NULL ? cst_relation_noname : r->name);
|
||||
}
|
||||
|
||||
cst_item *relation_append(cst_relation *r, cst_item *i)
|
||||
{
|
||||
cst_item *ni = new_item_relation(r,i);
|
||||
|
||||
if (r->head == NULL)
|
||||
r->head = ni;
|
||||
|
||||
ni->p = r->tail;
|
||||
if (r->tail)
|
||||
r->tail->n = ni;
|
||||
r->tail = ni;
|
||||
return ni;
|
||||
}
|
||||
|
||||
cst_item *relation_prepend(cst_relation *r, cst_item *i)
|
||||
{
|
||||
cst_item *ni = new_item_relation(r,i);
|
||||
|
||||
if (r->tail == NULL)
|
||||
r->tail = ni;
|
||||
|
||||
ni->n = r->head;
|
||||
if (r->head)
|
||||
r->head->p = ni;
|
||||
r->head = ni;
|
||||
return ni;
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue