From b6ae08bd2204da4ffafd60f48ccdcd647ad98ebd Mon Sep 17 00:00:00 2001 From: Edouard DUPIN Date: Sat, 19 Sep 2015 10:52:26 +0200 Subject: [PATCH] [DEV] 2.4 tools --- INSTALL | 291 + Makefile | 115 + README | 251 + audio/Makefile | 74 + audio/audioP.h | 56 + audio/esd.cc | 168 + audio/gen_audio.cc | 377 ++ audio/irixaudio.cc | 96 + audio/linux_sound.cc | 953 ++++ audio/macosxaudio.cc | 227 + audio/mplayer.cc | 106 + audio/nas.cc | 185 + audio/os2audio.cc | 269 + audio/sun16audio.cc | 336 ++ audio/win32audio.cc | 134 + base_class/EST_Complex.cc | 115 + base_class/EST_DMatrix.cc | 815 +++ base_class/EST_FMatrix.cc | 920 +++ base_class/EST_FeatureData.cc | 529 ++ base_class/EST_Featured.cc | 105 + base_class/EST_Features.cc | 217 + base_class/EST_IMatrix.cc | 64 + base_class/EST_Option.cc | 191 + base_class/EST_Pathname_unix.cc | 206 + base_class/EST_Pathname_win32.cc | 201 + base_class/EST_SMatrix.cc | 105 + base_class/EST_StringTrie.cc | 171 + base_class/EST_TBuffer.cc | 157 + base_class/EST_TDeque.cc | 235 + base_class/EST_THash.cc | 270 + base_class/EST_TKVL.cc | 304 + base_class/EST_TList.cc | 133 + base_class/EST_TMatrix.cc | 601 ++ base_class/EST_TNamedEnum.cc | 330 ++ base_class/EST_TSimpleMatrix.cc | 174 + base_class/EST_TSimpleVector.cc | 149 + base_class/EST_TSortable.cc | 70 + base_class/EST_TTimeIndex.cc | 137 + base_class/EST_TVector.cc | 324 ++ base_class/EST_Token.cc | 868 +++ base_class/EST_Tvectlist.cc | 67 + base_class/EST_UList.cc | 461 ++ base_class/EST_Val.cc | 150 + base_class/EST_features_aux.cc | 97 + base_class/EST_features_io.cc | 313 ++ base_class/EST_get_function_template.h | 86 + base_class/EST_ilist_aux.cc | 110 + base_class/EST_matrix_support.cc | 145 + base_class/EST_matrix_support.h | 65 + base_class/EST_slist_aux.cc | 240 + base_class/EST_svec_aux.cc | 107 + base_class/Makefile | 78 + base_class/THash_aux.cc | 54 + base_class/inst_tmpl/Makefile | 82 + base_class/inst_tmpl/deq_i_t.cc | 51 + base_class/inst_tmpl/deq_s_t.cc | 52 + base_class/inst_tmpl/hash_fi_t.cc | 51 + base_class/inst_tmpl/hash_ii_t.cc | 51 + base_class/inst_tmpl/hash_iv_t.cc | 57 + base_class/inst_tmpl/hash_sd_t.cc | 52 + base_class/inst_tmpl/hash_sf_t.cc | 53 + base_class/inst_tmpl/hash_sfmp_t.cc | 53 + base_class/inst_tmpl/hash_si_t.cc | 51 + base_class/inst_tmpl/hash_srp.cc | 53 + base_class/inst_tmpl/hash_ss_t.cc | 54 + base_class/inst_tmpl/hash_sv_t.cc | 57 + base_class/inst_tmpl/kvl_fi_t.cc | 51 + base_class/inst_tmpl/kvl_ii_t.cc | 51 + base_class/inst_tmpl/kvl_rs_t.cc | 55 + base_class/inst_tmpl/kvl_sd_t.cc | 52 + base_class/inst_tmpl/kvl_sf_t.cc | 53 + base_class/inst_tmpl/kvl_si_t.cc | 52 + base_class/inst_tmpl/kvl_ss_t.cc | 54 + base_class/inst_tmpl/kvl_sv_t.cc | 56 + base_class/inst_tmpl/kvl_vpi_t.cc | 51 + base_class/inst_tmpl/list_c_t.cc | 54 + base_class/inst_tmpl/list_d_t.cc | 54 + base_class/inst_tmpl/list_f_t.cc | 55 + base_class/inst_tmpl/list_i_t.cc | 55 + base_class/inst_tmpl/list_li_t.cc | 52 + base_class/inst_tmpl/list_s_t.cc | 57 + base_class/inst_tmpl/list_si_t.cc | 54 + base_class/inst_tmpl/list_val_t.cc | 53 + base_class/inst_tmpl/list_vi_t.cc | 61 + base_class/inst_tmpl/list_vs_t.cc | 57 + base_class/inst_tmpl/matrix_d_t.cc | 55 + base_class/inst_tmpl/matrix_f_t.cc | 81 + base_class/inst_tmpl/matrix_i_t.cc | 55 + base_class/inst_tmpl/matrix_s_t.cc | 52 + base_class/inst_tmpl/matrix_si_t.cc | 55 + base_class/inst_tmpl/matrix_val_t.cc | 51 + base_class/inst_tmpl/tbuffer_t.cc | 54 + base_class/inst_tmpl/timeindex_tr.cc | 63 + base_class/inst_tmpl/vector_c_t.cc | 55 + base_class/inst_tmpl/vector_d_t.cc | 56 + base_class/inst_tmpl/vector_dmatrix_t.cc | 72 + base_class/inst_tmpl/vector_dvector_t.cc | 69 + base_class/inst_tmpl/vector_f_t.cc | 79 + base_class/inst_tmpl/vector_fmatrix_t.cc | 73 + base_class/inst_tmpl/vector_fvector_t.cc | 54 + base_class/inst_tmpl/vector_i_t.cc | 56 + base_class/inst_tmpl/vector_ls_t.cc | 71 + base_class/inst_tmpl/vector_s_t.cc | 52 + base_class/inst_tmpl/vector_si_t.cc | 56 + base_class/inst_tmpl/vector_val_t.cc | 53 + base_class/rateconv.cc | 599 ++ base_class/rateconv.h | 50 + base_class/string/EST_Chunk.cc | 359 ++ base_class/string/EST_Regex.cc | 334 ++ base_class/string/EST_String.cc | 1369 +++++ base_class/string/EST_strcasecmp.c | 117 + base_class/string/Makefile | 57 + base_class/string/regerror.c | 17 + base_class/string/regexp.cc | 1299 +++++ base_class/string/regexp.h | 77 + base_class/string/regmagic.h | 5 + base_class/string/regsub.c | 80 + base_class/string/string_version.h | 43 + base_class/vec_mat_aux.cc | 734 +++ base_class/vec_mat_aux_d.cc | 710 +++ base_class/vec_mat_aux_i.cc | 59 + bin/Makefile | 54 + config.guess | 1568 ++++++ config.sub | 1793 ++++++ config/Makefile | 50 + config/ReadMe | 261 + config/common_make_rules | 67 + config/compilers/Makefile | 49 + config/compilers/egcs.mak | 66 + config/compilers/gcc.mak | 45 + config/compilers/gcc27.mak | 55 + config/compilers/gcc27emx.mak | 54 + config/compilers/gcc28.mak | 63 + config/compilers/gcc295.mak | 56 + config/compilers/gcc296.mak | 60 + config/compilers/gcc30.mak | 60 + config/compilers/gcc31.mak | 60 + config/compilers/gcc32.mak | 63 + config/compilers/gcc_defaults.mak | 111 + config/compilers/intel80.mak | 100 + config/compilers/jdk.mak | 67 + config/compilers/jdk12.mak | 67 + config/compilers/jdk_defaults.mak | 90 + config/compilers/jikes.mak | 68 + config/compilers/jikes_defaults.mak | 45 + config/compilers/jolt.mak | 62 + config/compilers/none.mak | 42 + config/compilers/suncc.mak | 45 + config/compilers/suncc40.mak | 63 + config/compilers/suncc_defaults.mak | 97 + config/config.in | 215 + config/configs/Makefile | 70 + config/configs/cstr.mak | 39 + config/configs/cstr_jdk1.2.mak | 45 + config/configs/egcs_as_gcc.mak | 45 + config/configs/ellipsis.mak | 49 + config/configs/kellogg.mak | 38 + config/configs/rjc.mak | 48 + config/configs/v_java.mak | 54 + config/example.Makefile | 99 + config/example.module.mak | 65 + config/make_system.mak | 44 + config/modules/Makefile | 50 + config/modules/debugging.mak | 48 + config/modules/descriptions | 42 + config/modules/dmalloc.mak | 59 + config/modules/editline.mak | 52 + config/modules/efence.mak | 46 + config/modules/esd_audio.mak | 50 + config/modules/freebsd16_audio.mak | 50 + config/modules/irix_audio.mak | 47 + config/modules/linux16_audio.mak | 65 + config/modules/macosx_audio.mak | 16 + config/modules/mplayer_audio.mak | 46 + config/modules/nas_audio.mak | 50 + config/modules/psola_tm.mak | 47 + config/modules/siod_python.mak | 36 + config/modules/sun16_audio.mak | 46 + config/modules/tcl.mak | 49 + config/modules/win32_audio.mak | 47 + config/project.mak | 140 + config/rules/Makefile | 54 + config/rules/bin_process.mak | 171 + config/rules/build_dir.mak | 47 + config/rules/build_tree.sh | 97 + config/rules/c.mak | 64 + config/rules/common_make_rules.mak | 122 + config/rules/compile_options.mak | 174 + config/rules/config_errors.mak | 52 + config/rules/cvs.mak | 117 + config/rules/defaults.mak | 201 + config/rules/doc.mak | 305 + config/rules/install.mak | 107 + config/rules/java.mak | 95 + config/rules/library.mak | 164 + config/rules/make_depend.awk | 16 + config/rules/make_depend.mak | 92 + config/rules/modules.mak | 137 + config/rules/modules.sh | 155 + config/rules/rcs.mak | 145 + config/rules/rules.mak | 56 + config/rules/script_process.awk | 100 + config/rules/targets.mak | 203 + config/rules/test_make_rules.mak | 133 + config/rules/top_level.mak | 105 + config/rules/visual_c.mak | 198 + config/system.sh | 115 + config/systems/DebianGNULinux.mak | 41 + config/systems/Linux.mak | 63 + config/systems/Makefile | 111 + config/systems/RedHatLinux.mak | 42 + config/systems/alpha_Linux.mak | 45 + config/systems/alpha_OSF1V4.0.mak | 48 + config/systems/alpha_RedHatLinux.mak | 48 + config/systems/default.mak | 145 + config/systems/hp9000_HP-UX.mak | 62 + config/systems/hp9000_HP-UXB.10.mak | 41 + config/systems/ip_IRIX.mak | 53 + config/systems/ip_IRIX5.3.mak | 46 + config/systems/ip_IRIX6.3.mak | 44 + config/systems/ip_IRIX6.4.mak | 44 + config/systems/ip_IRIX646.4.mak | 44 + config/systems/ix86_CYGWIN1.0.mak | 47 + config/systems/ix86_CYGWIN1.1.mak | 47 + config/systems/ix86_CYGWIN1.3.mak | 45 + config/systems/ix86_CYGWIN1.4.mak | 44 + config/systems/ix86_CYGWIN1.5.mak | 44 + config/systems/ix86_CYGWIN1.7.mak | 44 + config/systems/ix86_CYGWIN20.1.mak | 47 + config/systems/ix86_CYGWIN32.mak | 61 + config/systems/ix86_CYGWIN324.0.mak | 44 + config/systems/ix86_Darwin.mak | 56 + config/systems/ix86_FreeBSD.mak | 60 + config/systems/ix86_FreeBSD2.1.mak | 47 + config/systems/ix86_FreeBSD2.2.mak | 47 + config/systems/ix86_FreeBSD3.0.mak | 53 + config/systems/ix86_FreeBSD3.1.mak | 55 + config/systems/ix86_FreeBSD3.2.mak | 46 + config/systems/ix86_FreeBSD3.3.mak | 46 + config/systems/ix86_FreeBSD4.0.mak | 48 + config/systems/ix86_OS22.mak | 67 + config/systems/ix86_RedHatLinux4.0.mak | 46 + config/systems/ix86_RedHatLinux4.1.mak | 46 + config/systems/ix86_RedHatLinux4.2.mak | 46 + config/systems/ix86_RedHatLinux5.0.mak | 46 + config/systems/ix86_RedHatLinux5.1.mak | 47 + config/systems/ix86_RedHatLinux5.2.mak | 46 + config/systems/ix86_RedHatLinux6.0.mak | 53 + config/systems/ix86_RedHatLinux6.1.mak | 54 + config/systems/ix86_RedHatLinux6.2.mak | 41 + config/systems/ix86_RedHatLinux7.0.mak | 43 + config/systems/ix86_SunOS5.5.mak | 43 + config/systems/ix86_SunOS5.6.mak | 43 + config/systems/ix86_SunOS5.7.mak | 43 + config/systems/ix86_SunOS5.8.mak | 41 + config/systems/ix86_SunOS5.mak | 57 + config/systems/power_macintosh_Darwin.mak | 55 + config/systems/rs6000_AIX4.1.mak | 42 + config/systems/sparc_SunOS4.1.mak | 44 + config/systems/sparc_SunOS4.mak | 46 + config/systems/sparc_SunOS5.5.mak | 46 + config/systems/sparc_SunOS5.6.mak | 44 + config/systems/sparc_SunOS5.7.mak | 41 + config/systems/sparc_SunOS5.8.mak | 41 + config/systems/sparc_SunOS5.9.mak | 41 + config/systems/sparc_SunOS5.mak | 65 + config/systems/sparc_unknown.mak | 41 + config/systems/unknown_DebianGNULinux.mak | 41 + config/systems/unknown_Linux.mak | 40 + config/systems/unknown_RedHatLinux.mak | 42 + config/systems/unknown_unknown.mak | 54 + config/systems/x86_64_Darwin.mak | 56 + config/test_make_rules | 38 + config/vc_common_make_rules | 64 + config/vc_config_make_rules-dist | 28 + configure | 5001 +++++++++++++++++ configure.in | 94 + doc/DoxyFile | 1872 ++++++ doc/Makefile | 68 + doc/bibliography.bib | 62 + doc/cstr.gif | Bin 0 -> 724 bytes doc/edcrest.gif | Bin 0 -> 3659 bytes doc/est.jpg | Bin 0 -> 4398 bytes doc/estbaseclass.dox | 33 + doc/estexec.md | 85 + doc/estgram.md | 511 ++ doc/estintro.md | 83 + doc/estlicence.md | 478 ++ doc/estling.md | 165 + doc/estmanuals.md | 60 + doc/estserver.md | 397 ++ doc/estsigpr.md | 233 + doc/estspeechclass.md | 123 + doc/esttilt.md | 359 ++ doc/estutil.md | 16 + doc/estwagon.md | 369 ++ doc/estxml.md | 188 + doc/images/Makefile | 53 + doc/images/relations.eps | 1111 ++++ doc/images/relations.svg | 1060 ++++ doc/images/relations_2.eps | 967 ++++ doc/images/relations_2.svg | 1158 ++++ doc/images/tilt-f0-representation.eps | 959 ++++ doc/images/tilt-f0-representation.svg | 464 ++ doc/images/tilt-search-region.eps | 440 ++ doc/images/tilt-search-region.svg | 247 + doc/images/typical-pitch-accent.eps | 589 ++ doc/images/typical-pitch-accent.svg | 353 ++ doc/index.md | 28 + doc/man/Makefile | 67 + doc/man/align_man.dox.body | 15 + doc/man/bcat_man.dox.body | 19 + doc/man/ch_lab_man.dox.body | 18 + doc/man/ch_track_man.dox.body | 28 + doc/man/ch_utt_man.dox.body | 15 + doc/man/ch_wave_man.dox.body | 153 + doc/man/convert-options.xslt | 20 + doc/man/convert-synopsis.xslt | 31 + doc/man/create_dox.sh | 32 + doc/man/design_filter_man.dox.body | 21 + doc/man/dp_man.dox.body | 71 + doc/man/fringe_client_man.dox.body | 25 + doc/man/na_play_man.dox.body | 52 + doc/man/na_record_man.dox.body | 20 + doc/man/ngram_build_man.dox.body | 68 + doc/man/ngram_test_man.dox.body | 70 + doc/man/ols_man.dox.body | 15 + doc/man/ols_test_man.dox.body | 16 + doc/man/pda_man.dox.body | 31 + doc/man/pitchmark_man.dox.body | 82 + doc/man/scfg_make_man.dox.body | 23 + doc/man/scfg_parse_man.dox.body | 24 + doc/man/scfg_test_man.dox.body | 19 + doc/man/scfg_train_man.dox.body | 22 + doc/man/sig2fv_man.dox.body | 75 + doc/man/sigfilter_man.dox.body | 15 + doc/man/siod_man.dox.body | 20 + doc/man/spectgen_man.dox.body | 26 + doc/man/tilt_analysis_man.dox.body | 88 + doc/man/tilt_synthesis_man.dox.body | 54 + doc/man/viterbi_man.dox.body | 55 + doc/man/wagon_man.dox.body | 97 + doc/man/wagon_test_man.dox.body | 55 + doc/man/wfst_build_man.dox.body | 40 + doc/man/wfst_run_man.dox.body | 20 + doc/man/wfst_train_man.dox.body | 18 + doc/man/xml_parser_man.dox.body | 23 + grammar/Makefile | 47 + grammar/ngram/EST_Ngrammar.cc | 2779 +++++++++ grammar/ngram/EST_PST.cc | 508 ++ grammar/ngram/EST_lattice.cc | 1786 ++++++ grammar/ngram/EST_lattice_io.cc | 537 ++ grammar/ngram/Makefile | 51 + grammar/ngram/freqsmooth.cc | 178 + grammar/ngram/lattice_t.cc | 73 + grammar/ngram/ngrammar_aux.cc | 628 +++ grammar/ngram/ngrammar_io.cc | 951 ++++ grammar/ngram/ngrammar_utils.cc | 138 + grammar/scfg/EST_SCFG.cc | 312 + grammar/scfg/EST_SCFG_Chart.cc | 569 ++ grammar/scfg/EST_SCFG_inout.cc | 598 ++ grammar/scfg/Makefile | 49 + grammar/scfg/scfg.mak | 65 + grammar/wfst/EST_WFST.cc | 701 +++ grammar/wfst/Makefile | 50 + grammar/wfst/kkcompile.cc | 375 ++ grammar/wfst/ltscompile.cc | 389 ++ grammar/wfst/rgcompile.cc | 264 + grammar/wfst/tlcompile.cc | 195 + grammar/wfst/wfst.mak | 67 + grammar/wfst/wfst_aux.cc | 180 + grammar/wfst/wfst_aux.h | 73 + grammar/wfst/wfst_ops.cc | 996 ++++ grammar/wfst/wfst_regex.cc | 208 + grammar/wfst/wfst_train.cc | 633 +++ grammar/wfst/wfst_transduce.cc | 323 ++ include/EST.h | 76 + include/EST_ChannelType.h | 289 + include/EST_Chunk.h | 251 + include/EST_Complex.h | 111 + include/EST_Contents.h | 98 + include/EST_DMatrix.h | 237 + include/EST_Event.h | 189 + include/EST_FMatrix.h | 246 + include/EST_FeatureData.h | 180 + include/EST_Featured.h | 162 + include/EST_Features.h | 330 ++ include/EST_FileType.h | 73 + include/EST_FringeServer.h | 88 + include/EST_HMM.h | 125 + include/EST_Handleable.h | 76 + include/EST_IMatrix.h | 66 + include/EST_Ngrammar.h | 608 ++ include/EST_Option.h | 105 + include/EST_PST.h | 153 + include/EST_Pathname.h | 108 + include/EST_Regex.h | 151 + include/EST_SCFG.h | 352 ++ include/EST_SCFG_Chart.h | 184 + include/EST_SMatrix.h | 62 + include/EST_Server.h | 233 + include/EST_ServiceTable.h | 144 + include/EST_SingleChannelWave.h | 64 + include/EST_String.h | 652 +++ include/EST_StringTrie.h | 110 + include/EST_TBox.h | 69 + include/EST_TBuffer.h | 159 + include/EST_TDeque.h | 120 + include/EST_THandle.h | 152 + include/EST_THash.h | 333 ++ include/EST_TIterator.h | 298 + include/EST_TKVL.h | 204 + include/EST_TList.h | 322 ++ include/EST_TMatrix.h | 328 ++ include/EST_TNamedEnum.h | 169 + include/EST_TSimpleMatrix.h | 74 + include/EST_TSimpleVector.h | 83 + include/EST_TSortable.h | 58 + include/EST_TTimeIndex.h | 90 + include/EST_TVector.h | 334 ++ include/EST_Token.h | 393 ++ include/EST_Track.h | 773 +++ include/EST_TrackMap.h | 178 + include/EST_UList.h | 149 + include/EST_Val.h | 264 + include/EST_Val_defs.h | 180 + include/EST_WFST.h | 407 ++ include/EST_Wagon.h | 301 + include/EST_Wave.h | 329 ++ include/EST_audio.h | 61 + include/EST_bool.h | 124 + include/EST_cluster.h | 67 + include/EST_cmd_line.h | 56 + include/EST_cmd_line_options.h | 57 + include/EST_common.h | 66 + include/EST_cutils.h | 105 + include/EST_dynamic_model.h | 110 + include/EST_error.h | 199 + include/EST_features_aux.h | 104 + include/EST_grammar.h | 50 + include/EST_inline_utils.h | 82 + include/EST_io_aux.h | 82 + include/EST_iostream.h | 61 + include/EST_kalman.h | 60 + include/EST_lattice.h | 328 ++ include/EST_lattice_io.h | 52 + include/EST_ling_class.h | 54 + include/EST_math.h | 205 + include/EST_model_types.h | 112 + include/EST_multistats.h | 94 + include/EST_rw_status.h | 164 + include/EST_sigpr.h | 52 + include/EST_simplestats.h | 312 + include/EST_socket.h | 57 + include/EST_sort.h | 54 + include/EST_speech_class.h | 48 + include/EST_stats.h | 50 + include/EST_strcasecmp.h | 71 + include/EST_string_aux.h | 85 + include/EST_system.h | 59 + include/EST_tilt.h | 183 + include/EST_track_aux.h | 252 + include/EST_types.h | 81 + include/EST_unix.h | 63 + include/EST_util_class.h | 58 + include/EST_viterbi.h | 228 + include/EST_walloc.h | 61 + include/EST_wave_aux.h | 122 + include/Makefile | 78 + include/instantiate/EST_TDequeI.h | 72 + include/instantiate/EST_THashI.h | 102 + include/instantiate/EST_TIteratorI.h | 59 + include/instantiate/EST_TKVLI.h | 123 + include/instantiate/EST_TListI.h | 92 + include/instantiate/EST_TMatrixI.h | 62 + include/instantiate/EST_TNamedEnumI.h | 157 + include/instantiate/EST_TSimpleMatrixI.h | 52 + include/instantiate/EST_TSimpleVectorI.h | 52 + include/instantiate/EST_TSortableI.h | 75 + include/instantiate/EST_TStringHashI.h | 80 + include/instantiate/EST_TVectorI.h | 83 + include/instantiate/Makefile | 54 + .../ling_class/EST_FeatureFunctionPackage.h | 74 + include/ling_class/EST_Item.h | 448 ++ include/ling_class/EST_Item_Content.h | 122 + include/ling_class/EST_Relation.h | 234 + include/ling_class/EST_Relation_list.h | 119 + include/ling_class/EST_Relation_mls.h | 56 + include/ling_class/EST_Relation_tree.h | 191 + include/ling_class/EST_Utterance.h | 163 + include/ling_class/EST_item_aux.h | 96 + include/ling_class/EST_item_content_aux.h | 90 + include/ling_class/EST_relation_aux.h | 142 + include/ling_class/EST_relation_compare.h | 92 + include/ling_class/EST_utterance_aux.h | 58 + include/ling_class/EST_utterance_xml.h | 49 + include/ling_class/Makefile | 51 + include/rxp/Makefile | 57 + include/rxp/XML_Parser.h | 322 ++ include/rxp/charset.h | 83 + include/rxp/ctype16.h | 54 + include/rxp/dtd.h | 254 + include/rxp/input.h | 80 + include/rxp/rxp.h | 29 + include/rxp/stdio16.h | 67 + include/rxp/string16.h | 113 + include/rxp/system.h | 36 + include/rxp/url.h | 39 + include/rxp/xmlparser.h | 194 + include/sigpr/EST_Window.h | 233 + include/sigpr/EST_fft.h | 137 + include/sigpr/EST_filter.h | 404 ++ include/sigpr/EST_filter_design.h | 97 + include/sigpr/EST_misc_sigpr.h | 68 + include/sigpr/EST_pitchmark.h | 143 + include/sigpr/EST_sigpr_frame.h | 323 ++ include/sigpr/EST_sigpr_utt.h | 454 ++ include/sigpr/EST_spectrogram.h | 63 + include/sigpr/Makefile | 51 + include/siod.h | 214 + include/siod_defs.h | 285 + include/siod_est.h | 71 + include/unix/EST_defines_unix.h | 45 + include/unix/EST_socket_unix.h | 90 + include/unix/Makefile | 47 + include/win32/EST_defines_win32.h | 53 + include/win32/EST_iostream_win32.h | 59 + include/win32/EST_socket_win32.h | 63 + include/win32/EST_unix_win32.h | 116 + include/win32/Makefile | 47 + install-sh | 251 + intonation/Makefile | 47 + intonation/tilt/Makefile | 49 + intonation/tilt/tilt.h | 86 + intonation/tilt/tilt_analysis.cc | 1009 ++++ intonation/tilt/tilt_synthesis.cc | 487 ++ intonation/tilt/tilt_utils.cc | 421 ++ java/Makefile | 61 + java/ReadMe | 5 + java/basic_version/Makefile | 47 + java/basic_version/Makefile.version | 42 + java/basic_version/cstr/Makefile | 50 + java/basic_version/cstr/est/Features.java | 133 + java/basic_version/cstr/est/Item.java | 164 + java/basic_version/cstr/est/Item_Content.java | 132 + java/basic_version/cstr/est/Makefile | 58 + java/basic_version/cstr/est/Wave.java | 219 + java/common/Makefile | 48 + java/common/cstr/Makefile | 48 + java/common/cstr/awt/ColorSelection.java | 86 + java/common/cstr/awt/ImageCanvas.java | 146 + java/common/cstr/awt/Makefile | 46 + java/common/cstr/awt/ScrollWindow.java | 134 + java/common/cstr/awt/XColor.java | 202 + java/common/cstr/est/Makefile | 47 + java/common/cstr/est/ServerConnection.java | 129 + java/common/cstr/est/SocketsFile.java | 132 + .../cstr/est/awt/Item_Content_Window.java | 94 + java/common/cstr/est/awt/Makefile | 49 + java/common/cstr/est/awt/WaveImageSource.java | 218 + java/common/cstr/testPrograms/Makefile | 47 + java/common/cstr/testPrograms/PlayWave.java | 66 + java/common/cstr/testPrograms/WaveTest.java | 158 + java/common/cstr/util/BadValueException.java | 56 + java/common/cstr/util/Enum.java | 117 + java/common/cstr/util/EnumValues.java | 103 + java/common/cstr/util/Featured.java | 46 + java/common/cstr/util/ImagePainter.java | 50 + java/common/cstr/util/Keyed.java | 47 + java/common/cstr/util/LongHash.java | 109 + java/common/cstr/util/Makefile | 48 + java/common/cstr/util/Named.java | 47 + java/common/cstr/util/PaintCache.java | 402 ++ java/common/cstr/util/PaintPainter.java | 50 + java/common/cstr/util/Painter.java | 49 + java/common/cstr/util/SparseArray.java | 103 + java/common/cstr/util/Trace.java | 163 + java/common/cstr/util/TraceStream.java | 130 + java/cpp_version/Makefile | 47 + java/cpp_version/Makefile.version | 42 + java/cpp_version/cstr/Makefile | 51 + java/cpp_version/cstr/est/Features.cc | 278 + java/cpp_version/cstr/est/Features.java | 216 + java/cpp_version/cstr/est/Item.cc | 281 + java/cpp_version/cstr/est/Item.java | 298 + java/cpp_version/cstr/est/Item_Content.cc | 402 ++ java/cpp_version/cstr/est/Item_Content.java | 256 + java/cpp_version/cstr/est/Makefile | 69 + java/cpp_version/cstr/est/Relation.cc | 256 + java/cpp_version/cstr/est/Relation.java | 365 ++ java/cpp_version/cstr/est/Sigpr.cc | 68 + java/cpp_version/cstr/est/Sigpr.java | 70 + java/cpp_version/cstr/est/Track.cc | 319 ++ java/cpp_version/cstr/est/Track.java | 188 + .../cpp_version/cstr/est/TrackFileFormat.java | 95 + java/cpp_version/cstr/est/Utterance.cc | 233 + java/cpp_version/cstr/est/Utterance.java | 169 + .../cstr/est/UtteranceFileFormat.java | 88 + java/cpp_version/cstr/est/Wave.cc | 355 ++ java/cpp_version/cstr/est/Wave.java | 227 + java/cpp_version/cstr/est/skeleton.cc | 135 + java/cpp_version/cstr/est/skeleton.java | 105 + java/java.mak | 67 + java/java_cpp.mak | 71 + java/java_media.mak | 61 + java/media_version/Makefile | 47 + java/media_version/Makefile.version | 42 + java/media_version/cstr/Makefile | 51 + java/media_version/cstr/est/Features.java | 134 + java/media_version/cstr/est/Item.java | 164 + java/media_version/cstr/est/Item_Content.java | 132 + java/media_version/cstr/est/Makefile | 58 + java/media_version/cstr/est/Wave.java | 351 ++ .../cstr/est/WaveDataSource.java | 249 + lib/Makefile | 100 + lib/VCLocalRules | 5 + lib/cstrutt.dtd | 49 + lib/est_mainline-in | 37 + lib/est_program_makefile-in | 25 + lib/example_data/Makefile | 60 + lib/example_data/alice | 466 ++ lib/example_data/ch_track.htk | Bin 0 -> 10412 bytes lib/example_data/ch_wave.wav | Bin 0 -> 33316 bytes lib/example_data/channel_names.map | 5 + lib/example_data/colours.map | 5 + lib/example_data/colours_translation.map | 5 + lib/example_data/eg.dtd | 15 + lib/example_data/eg.xml | 9 + lib/example_data/kdt_001.il | 15 + lib/example_data/kdt_001.pm | 396 ++ lib/example_data/kdt_001.tilt | 15 + lib/example_data/kdt_001.wav | Bin 0 -> 113570 bytes lib/example_data/ked_wr1_012.utt | 1830 ++++++ lib/example_data/key.lab | 12 + lib/example_data/options.file | 4 + lib/example_data/vit.B.ngram | 35 + lib/example_data/vit.observes | 10 + lib/example_data/vit.vocab | 2 + lib/example_data/wagon.data | 106 + lib/example_data/wagon.desc | 22 + lib/example_data/wagon.tree | 33 + lib/siod/Makefile | 48 + lib/siod/cstr.scm | 99 + lib/siod/fringe.scm | 86 + lib/siod/init.scm | 111 + lib/siod/siod.scm | 616 ++ lib/siod/siod_client.scm | 68 + lib/siod/siod_server.scm | 43 + lib/siod/web.scm | 81 + ling_class/EST_FeatureFunctionContext.cc | 229 + ling_class/EST_FeatureFunctionContext.h | 89 + ling_class/EST_FeatureFunctionPackage.cc | 121 + ling_class/EST_Item.cc | 634 +++ ling_class/EST_Item_Content.cc | 123 + ling_class/EST_Relation.cc | 702 +++ ling_class/EST_Relation_mls.cc | 146 + ling_class/EST_Utterance.cc | 582 ++ ling_class/EST_UtteranceFile.cc | 662 +++ ling_class/EST_UtteranceFile.h | 104 + ling_class/EST_item_aux.cc | 112 + ling_class/EST_item_content_aux.cc | 206 + ling_class/EST_relation_aux.cc | 719 +++ ling_class/EST_relation_compare.cc | 1109 ++++ ling_class/EST_relation_track.cc | 196 + ling_class/EST_utterance_aux.cc | 95 + ling_class/Makefile | 74 + ling_class/apml.cc | 436 ++ ling_class/apml.h | 56 + ling_class/genxml.cc | 748 +++ ling_class/genxml.h | 76 + ling_class/item_aux.cc | 285 + ling_class/item_feats.cc | 149 + ling_class/ling_class_init.cc | 64 + ling_class/ling_class_init.h | 60 + ling_class/ling_t.cc | 56 + ling_class/relation_io.cc | 657 +++ ling_class/relation_io.h | 65 + ling_class/solexml.cc | 411 ++ ling_class/solexml.h | 56 + ling_class/standard_feature_functions.cc | 206 + main/Makefile | 106 + main/align_main.cc | 431 ++ main/bcat_main.cc | 132 + main/ch_lab_main.cc | 224 + main/ch_track_main.cc | 461 ++ main/ch_utt_main.cc | 107 + main/ch_wave_main.cc | 483 ++ main/design_filter_main.cc | 171 + main/dp_main.cc | 440 ++ main/na_play_main.cc | 225 + main/na_record_main.cc | 178 + main/ngram_build_main.cc | 508 ++ main/ngram_test_main.cc | 410 ++ main/ols_main.cc | 259 + main/ols_test_main.cc | 172 + main/pda_main.cc | 272 + main/pitchmark_main.cc | 427 ++ main/scfg_make_main.cc | 335 ++ main/scfg_parse_main.cc | 191 + main/scfg_test_main.cc | 152 + main/scfg_train_main.cc | 188 + main/sig2fv_main.cc | 413 ++ main/sigfilter_main.cc | 191 + main/siod_main.cc | 244 + main/spectgen_main.cc | 166 + main/tilt_analysis_main.cc | 324 ++ main/tilt_synthesis_main.cc | 200 + main/viterbi_main.cc | 849 +++ main/wagon_main.cc | 469 ++ main/wagon_test_main.cc | 452 ++ main/wfst_build_main.cc | 306 + main/wfst_run_main.cc | 227 + main/wfst_train_main.cc | 147 + main/xml_parser_main.cc | 307 + missing | 190 + mkinstalldirs | 40 + rxp/Makefile | 54 + rxp/XML_Parser.cc | 454 ++ rxp/charset.c | 354 ++ rxp/ctype16.c | 503 ++ rxp/dtd.c | 765 +++ rxp/input.c | 562 ++ rxp/rxp.c | 504 ++ rxp/rxp.mak | 57 + rxp/stdio16.c | 956 ++++ rxp/string16.c | 304 + rxp/system.c | 39 + rxp/url.c | 818 +++ rxp/xmlparser.c | 3156 +++++++++++ scripts/Makefile | 55 + scripts/build_docbook_index.prl | 301 + scripts/cxx_to_docbook.prl | 657 +++ scripts/est_examples.sh | 134 + scripts/est_gdb.sh | 46 + scripts/est_program.sh | 213 + scripts/example_to_doc++.prl | 173 + scripts/make_wagon_desc.sh | 72 + scripts/pm.prl | 271 + scripts/raw_to_xgraph.prl | 114 + scripts/resynth.sh | 125 + scripts/shared_script | 25 + scripts/shared_setup_prl | 10 + scripts/shared_setup_sh | 20 + scripts/tex_to_images.prl | 303 + sigpr/EST_Window.cc | 419 ++ sigpr/Makefile | 63 + sigpr/delta.cc | 169 + sigpr/fft.cc | 542 ++ sigpr/filter.cc | 591 ++ sigpr/misc.cc | 97 + sigpr/pda/Makefile | 51 + sigpr/pda/array_smoother.h | 76 + sigpr/pda/pcb_smoother.cc | 301 + sigpr/pda/pda.cc | 333 ++ sigpr/pda/smooth_pda.cc | 192 + sigpr/pda/srpd.h | 136 + sigpr/pda/srpd1.3.cc | 737 +++ sigpr/pitchmark.cc | 286 + sigpr/sigpr_frame.cc | 823 +++ sigpr/sigpr_utt.cc | 578 ++ sigpr/spectrogram.cc | 184 + siod/Makefile | 81 + siod/editline.c | 1985 +++++++ siod/editline.h | 164 + siod/el_complete.c | 266 + siod/el_sys_unix.c | 171 + siod/el_sys_win32.c | 153 + siod/el_unix.h | 64 + siod/io.cc | 371 ++ siod/io.h | 49 + siod/siod.cc | 541 ++ siod/siod.mak | 56 + siod/siod_est.cc | 453 ++ siod/siodeditline.c | 293 + siod/siodeditline.h | 75 + siod/siodp.h | 230 + siod/slib.cc | 2005 +++++++ siod/slib_core.cc | 370 ++ siod/slib_doc.cc | 253 + siod/slib_file.cc | 750 +++ siod/slib_format.cc | 361 ++ siod/slib_list.cc | 245 + siod/slib_math.cc | 282 + siod/slib_python.cc | 379 ++ siod/slib_python.h | 51 + siod/slib_repl.cc | 68 + siod/slib_server.cc | 117 + siod/slib_str.cc | 422 ++ siod/slib_sys.cc | 125 + siod/slib_xtr.cc | 615 ++ siod/trace.cc | 148 + speech_class/EST_Track.cc | 1500 +++++ speech_class/EST_TrackFile.cc | 2217 ++++++++ speech_class/EST_TrackFile.h | 173 + speech_class/EST_TrackMap.cc | 239 + speech_class/EST_Wave.cc | 609 ++ speech_class/EST_WaveFile.cc | 575 ++ speech_class/EST_WaveFile.h | 134 + speech_class/EST_track_aux.cc | 1116 ++++ speech_class/EST_wave_aux.cc | 329 ++ speech_class/EST_wave_cuts.cc | 188 + speech_class/EST_wave_io.cc | 1452 +++++ speech_class/EST_wave_temp.cc | 250 + speech_class/EST_wave_utils.cc | 707 +++ speech_class/EST_wave_utils.h | 65 + speech_class/Makefile | 63 + speech_class/esps_io.cc | 353 ++ speech_class/esps_utils.cc | 1190 ++++ speech_class/esps_utils.h | 195 + speech_class/htk.h | 84 + speech_class/ssff.cc | 302 + speech_class/ssff.h | 45 + speech_class/track_t.cc | 53 + speech_class/waveP.h | 135 + speech_class/wave_t.cc | 58 + stats/EST_DProbDist.cc | 456 ++ stats/EST_Discrete.cc | 177 + stats/EST_cluster.cc | 542 ++ stats/EST_multistats.cc | 270 + stats/EST_ols.cc | 343 ++ stats/EST_viterbi.cc | 623 ++ stats/Makefile | 59 + stats/confusion.cc | 170 + stats/dynamic_program.cc | 420 ++ stats/kalman_filter/EST_kalman.cc | 273 + stats/kalman_filter/Makefile | 48 + stats/kalman_filter/kalman_filter.mak | 54 + stats/ols.mak | 57 + stats/wagon/Makefile | 49 + stats/wagon/dlist.cc | 237 + stats/wagon/wagon.cc | 1197 ++++ stats/wagon/wagon.mak | 63 + stats/wagon/wagon_aux.cc | 1189 ++++ stats/wagon/wagonint.cc | 96 + testsuite/Makefile | 120 + testsuite/ch_track.sh | 88 + testsuite/ch_wave.sh | 213 + testsuite/complex_example.cc | 89 + testsuite/complex_regression.cc | 48 + testsuite/correct/Makefile | 55 + testsuite/correct/ch_track_script.out | 153 + testsuite/correct/ch_wave_script.out | 197 + testsuite/correct/complex_example.out | 20 + testsuite/correct/complex_regression.out | 1 + testsuite/correct/deq_example.out | 20 + testsuite/correct/deq_regression.out | 0 testsuite/correct/error_example.out | 19 + testsuite/correct/error_regression.out | 0 testsuite/correct/feature_example.out | 6 + testsuite/correct/feature_regression.out | 6 + testsuite/correct/handle_example.out | 42 + testsuite/correct/handle_regression.out | 0 testsuite/correct/hash_example.out | 10 + testsuite/correct/hash_regression.out | 11 + testsuite/correct/kvl_example.out | 12 + testsuite/correct/kvl_regression.out | 4 + testsuite/correct/ling_example.out | 32 + testsuite/correct/ling_regression.out | 314 ++ testsuite/correct/list_example.out | 76 + testsuite/correct/list_regression.out | 0 testsuite/correct/lpc_script.out | 62 + testsuite/correct/matrix_example.out | 116 + testsuite/correct/matrix_regression.out | 55 + testsuite/correct/named_enum_example.out | 39 + testsuite/correct/named_enum_regression.out | 8 + testsuite/correct/pathname_example.out | 33 + testsuite/correct/pathname_regression.out | 14 + testsuite/correct/sigpr_example.out | 4 + testsuite/correct/sigpr_regression.out | 0 testsuite/correct/string_example.out | 13 + testsuite/correct/string_regression.out | 79 + testsuite/correct/tilt_script.out | 2 + testsuite/correct/token_example.out | 4 + testsuite/correct/token_regression.out | 67 + testsuite/correct/track_example.out | 0 testsuite/correct/track_map_example.out | 274 + testsuite/correct/track_map_regression.out | 0 testsuite/correct/track_regression.out | 159 + testsuite/correct/viterbi_script.out | 10 + testsuite/correct/wagon_script.out | 4 + testsuite/correct/xml_example.out | 36 + testsuite/correct/xml_regression.out | 0 testsuite/deq_example.cc | 142 + testsuite/deq_regression.cc | 49 + testsuite/feature_example.cc | 224 + testsuite/feature_regression.cc | 224 + testsuite/handle_example.cc | 238 + testsuite/handle_regression.cc | 52 + testsuite/hash_example.cc | 146 + testsuite/hash_regression.cc | 99 + testsuite/kvl_example.cc | 191 + testsuite/kvl_regression.cc | 109 + testsuite/ling_example.cc | 651 +++ testsuite/ling_regression.cc | 67 + testsuite/list_example.cc | 268 + testsuite/list_regression.cc | 56 + testsuite/lpc.sh | 77 + testsuite/named_enum_example.cc | 253 + testsuite/named_enum_regression.cc | 135 + testsuite/pathname_example.cc | 102 + testsuite/pathname_regression.cc | 101 + testsuite/sigpr_example.cc | 641 +++ testsuite/sigpr_regression.cc | 84 + testsuite/string_example.cc | 102 + testsuite/string_regression.cc | 240 + testsuite/tilt.sh | 70 + testsuite/token_example.cc | 106 + testsuite/token_regression.cc | 205 + testsuite/track_example.cc | 545 ++ testsuite/track_regression.cc | 125 + testsuite/viterbi.sh | 42 + testsuite/wagon.sh | 57 + testsuite/xml_example.cc | 249 + testsuite/xml_regression.cc | 48 + utils/EST_cutils.c | 128 + utils/EST_error.c | 209 + utils/EST_swapping.cc | 116 + utils/Makefile | 62 + utils/cmd_line.cc | 514 ++ utils/cmd_line_aux.cc | 55 + utils/est_file.cc | 192 + utils/filetrans.cc | 162 + utils/system_specific_unix.c | 39 + utils/system_specific_win32.c | 131 + utils/util_io.cc | 348 ++ utils/walloc.c | 152 + wrappers/Makefile | 46 + wrappers/interface/EST_FVector.i | 160 + wrappers/interface/EST_Item.i | 230 + wrappers/interface/EST_Ngrammar.i | 187 + wrappers/interface/EST_Relation.i | 146 + wrappers/interface/EST_SignalProc.i | 117 + wrappers/interface/EST_TSimpleVector.i | 73 + wrappers/interface/EST_TVector.i | 115 + wrappers/interface/EST_Track.i | 299 + wrappers/interface/EST_Utterance.i | 127 + wrappers/interface/EST_Wave.i | 190 + wrappers/interface/EST_error.i | 60 + wrappers/interface/EST_pitchmark.i | 68 + wrappers/interface/EST_rw_status.i | 89 + wrappers/interface/Makefile | 49 + wrappers/interface/python/EST_Features.i | 162 + wrappers/interface/python/EST_typemaps.i | 250 + wrappers/interface/python/Makefile | 42 + wrappers/wrappers.mak | 80 + 945 files changed, 186828 insertions(+) create mode 100644 INSTALL create mode 100644 Makefile create mode 100644 README create mode 100644 audio/Makefile create mode 100644 audio/audioP.h create mode 100644 audio/esd.cc create mode 100644 audio/gen_audio.cc create mode 100644 audio/irixaudio.cc create mode 100644 audio/linux_sound.cc create mode 100644 audio/macosxaudio.cc create mode 100644 audio/mplayer.cc create mode 100644 audio/nas.cc create mode 100644 audio/os2audio.cc create mode 100644 audio/sun16audio.cc create mode 100644 audio/win32audio.cc create mode 100644 base_class/EST_Complex.cc create mode 100644 base_class/EST_DMatrix.cc create mode 100644 base_class/EST_FMatrix.cc create mode 100644 base_class/EST_FeatureData.cc create mode 100644 base_class/EST_Featured.cc create mode 100644 base_class/EST_Features.cc create mode 100644 base_class/EST_IMatrix.cc create mode 100644 base_class/EST_Option.cc create mode 100644 base_class/EST_Pathname_unix.cc create mode 100644 base_class/EST_Pathname_win32.cc create mode 100644 base_class/EST_SMatrix.cc create mode 100644 base_class/EST_StringTrie.cc create mode 100644 base_class/EST_TBuffer.cc create mode 100644 base_class/EST_TDeque.cc create mode 100644 base_class/EST_THash.cc create mode 100644 base_class/EST_TKVL.cc create mode 100644 base_class/EST_TList.cc create mode 100644 base_class/EST_TMatrix.cc create mode 100644 base_class/EST_TNamedEnum.cc create mode 100644 base_class/EST_TSimpleMatrix.cc create mode 100644 base_class/EST_TSimpleVector.cc create mode 100644 base_class/EST_TSortable.cc create mode 100644 base_class/EST_TTimeIndex.cc create mode 100644 base_class/EST_TVector.cc create mode 100644 base_class/EST_Token.cc create mode 100644 base_class/EST_Tvectlist.cc create mode 100644 base_class/EST_UList.cc create mode 100644 base_class/EST_Val.cc create mode 100644 base_class/EST_features_aux.cc create mode 100644 base_class/EST_features_io.cc create mode 100644 base_class/EST_get_function_template.h create mode 100644 base_class/EST_ilist_aux.cc create mode 100644 base_class/EST_matrix_support.cc create mode 100644 base_class/EST_matrix_support.h create mode 100644 base_class/EST_slist_aux.cc create mode 100644 base_class/EST_svec_aux.cc create mode 100644 base_class/Makefile create mode 100644 base_class/THash_aux.cc create mode 100644 base_class/inst_tmpl/Makefile create mode 100644 base_class/inst_tmpl/deq_i_t.cc create mode 100644 base_class/inst_tmpl/deq_s_t.cc create mode 100644 base_class/inst_tmpl/hash_fi_t.cc create mode 100644 base_class/inst_tmpl/hash_ii_t.cc create mode 100644 base_class/inst_tmpl/hash_iv_t.cc create mode 100644 base_class/inst_tmpl/hash_sd_t.cc create mode 100644 base_class/inst_tmpl/hash_sf_t.cc create mode 100644 base_class/inst_tmpl/hash_sfmp_t.cc create mode 100644 base_class/inst_tmpl/hash_si_t.cc create mode 100644 base_class/inst_tmpl/hash_srp.cc create mode 100644 base_class/inst_tmpl/hash_ss_t.cc create mode 100644 base_class/inst_tmpl/hash_sv_t.cc create mode 100644 base_class/inst_tmpl/kvl_fi_t.cc create mode 100644 base_class/inst_tmpl/kvl_ii_t.cc create mode 100644 base_class/inst_tmpl/kvl_rs_t.cc create mode 100644 base_class/inst_tmpl/kvl_sd_t.cc create mode 100644 base_class/inst_tmpl/kvl_sf_t.cc create mode 100644 base_class/inst_tmpl/kvl_si_t.cc create mode 100644 base_class/inst_tmpl/kvl_ss_t.cc create mode 100644 base_class/inst_tmpl/kvl_sv_t.cc create mode 100644 base_class/inst_tmpl/kvl_vpi_t.cc create mode 100644 base_class/inst_tmpl/list_c_t.cc create mode 100644 base_class/inst_tmpl/list_d_t.cc create mode 100644 base_class/inst_tmpl/list_f_t.cc create mode 100644 base_class/inst_tmpl/list_i_t.cc create mode 100644 base_class/inst_tmpl/list_li_t.cc create mode 100644 base_class/inst_tmpl/list_s_t.cc create mode 100644 base_class/inst_tmpl/list_si_t.cc create mode 100644 base_class/inst_tmpl/list_val_t.cc create mode 100644 base_class/inst_tmpl/list_vi_t.cc create mode 100644 base_class/inst_tmpl/list_vs_t.cc create mode 100644 base_class/inst_tmpl/matrix_d_t.cc create mode 100644 base_class/inst_tmpl/matrix_f_t.cc create mode 100644 base_class/inst_tmpl/matrix_i_t.cc create mode 100644 base_class/inst_tmpl/matrix_s_t.cc create mode 100644 base_class/inst_tmpl/matrix_si_t.cc create mode 100644 base_class/inst_tmpl/matrix_val_t.cc create mode 100644 base_class/inst_tmpl/tbuffer_t.cc create mode 100644 base_class/inst_tmpl/timeindex_tr.cc create mode 100644 base_class/inst_tmpl/vector_c_t.cc create mode 100644 base_class/inst_tmpl/vector_d_t.cc create mode 100644 base_class/inst_tmpl/vector_dmatrix_t.cc create mode 100644 base_class/inst_tmpl/vector_dvector_t.cc create mode 100644 base_class/inst_tmpl/vector_f_t.cc create mode 100644 base_class/inst_tmpl/vector_fmatrix_t.cc create mode 100644 base_class/inst_tmpl/vector_fvector_t.cc create mode 100644 base_class/inst_tmpl/vector_i_t.cc create mode 100644 base_class/inst_tmpl/vector_ls_t.cc create mode 100644 base_class/inst_tmpl/vector_s_t.cc create mode 100644 base_class/inst_tmpl/vector_si_t.cc create mode 100644 base_class/inst_tmpl/vector_val_t.cc create mode 100644 base_class/rateconv.cc create mode 100644 base_class/rateconv.h create mode 100644 base_class/string/EST_Chunk.cc create mode 100644 base_class/string/EST_Regex.cc create mode 100644 base_class/string/EST_String.cc create mode 100755 base_class/string/EST_strcasecmp.c create mode 100644 base_class/string/Makefile create mode 100644 base_class/string/regerror.c create mode 100644 base_class/string/regexp.cc create mode 100644 base_class/string/regexp.h create mode 100644 base_class/string/regmagic.h create mode 100644 base_class/string/regsub.c create mode 100644 base_class/string/string_version.h create mode 100644 base_class/vec_mat_aux.cc create mode 100644 base_class/vec_mat_aux_d.cc create mode 100644 base_class/vec_mat_aux_i.cc create mode 100644 bin/Makefile create mode 100755 config.guess create mode 100755 config.sub create mode 100644 config/Makefile create mode 100644 config/ReadMe create mode 100644 config/common_make_rules create mode 100644 config/compilers/Makefile create mode 100644 config/compilers/egcs.mak create mode 100644 config/compilers/gcc.mak create mode 100644 config/compilers/gcc27.mak create mode 100644 config/compilers/gcc27emx.mak create mode 100644 config/compilers/gcc28.mak create mode 100644 config/compilers/gcc295.mak create mode 100644 config/compilers/gcc296.mak create mode 100644 config/compilers/gcc30.mak create mode 100644 config/compilers/gcc31.mak create mode 100644 config/compilers/gcc32.mak create mode 100644 config/compilers/gcc_defaults.mak create mode 100644 config/compilers/intel80.mak create mode 100644 config/compilers/jdk.mak create mode 100644 config/compilers/jdk12.mak create mode 100644 config/compilers/jdk_defaults.mak create mode 100644 config/compilers/jikes.mak create mode 100644 config/compilers/jikes_defaults.mak create mode 100644 config/compilers/jolt.mak create mode 100644 config/compilers/none.mak create mode 100644 config/compilers/suncc.mak create mode 100644 config/compilers/suncc40.mak create mode 100644 config/compilers/suncc_defaults.mak create mode 100644 config/config.in create mode 100644 config/configs/Makefile create mode 100644 config/configs/cstr.mak create mode 100644 config/configs/cstr_jdk1.2.mak create mode 100644 config/configs/egcs_as_gcc.mak create mode 100644 config/configs/ellipsis.mak create mode 100644 config/configs/kellogg.mak create mode 100644 config/configs/rjc.mak create mode 100644 config/configs/v_java.mak create mode 100644 config/example.Makefile create mode 100644 config/example.module.mak create mode 100644 config/make_system.mak create mode 100644 config/modules/Makefile create mode 100644 config/modules/debugging.mak create mode 100644 config/modules/descriptions create mode 100644 config/modules/dmalloc.mak create mode 100644 config/modules/editline.mak create mode 100644 config/modules/efence.mak create mode 100644 config/modules/esd_audio.mak create mode 100644 config/modules/freebsd16_audio.mak create mode 100644 config/modules/irix_audio.mak create mode 100644 config/modules/linux16_audio.mak create mode 100644 config/modules/macosx_audio.mak create mode 100644 config/modules/mplayer_audio.mak create mode 100644 config/modules/nas_audio.mak create mode 100644 config/modules/psola_tm.mak create mode 100644 config/modules/siod_python.mak create mode 100644 config/modules/sun16_audio.mak create mode 100644 config/modules/tcl.mak create mode 100644 config/modules/win32_audio.mak create mode 100644 config/project.mak create mode 100644 config/rules/Makefile create mode 100644 config/rules/bin_process.mak create mode 100644 config/rules/build_dir.mak create mode 100755 config/rules/build_tree.sh create mode 100644 config/rules/c.mak create mode 100644 config/rules/common_make_rules.mak create mode 100644 config/rules/compile_options.mak create mode 100644 config/rules/config_errors.mak create mode 100644 config/rules/cvs.mak create mode 100644 config/rules/defaults.mak create mode 100644 config/rules/doc.mak create mode 100644 config/rules/install.mak create mode 100644 config/rules/java.mak create mode 100644 config/rules/library.mak create mode 100644 config/rules/make_depend.awk create mode 100644 config/rules/make_depend.mak create mode 100644 config/rules/modules.mak create mode 100644 config/rules/modules.sh create mode 100644 config/rules/rcs.mak create mode 100644 config/rules/rules.mak create mode 100644 config/rules/script_process.awk create mode 100644 config/rules/targets.mak create mode 100644 config/rules/test_make_rules.mak create mode 100644 config/rules/top_level.mak create mode 100644 config/rules/visual_c.mak create mode 100644 config/system.sh create mode 100644 config/systems/DebianGNULinux.mak create mode 100644 config/systems/Linux.mak create mode 100644 config/systems/Makefile create mode 100644 config/systems/RedHatLinux.mak create mode 100644 config/systems/alpha_Linux.mak create mode 100644 config/systems/alpha_OSF1V4.0.mak create mode 100644 config/systems/alpha_RedHatLinux.mak create mode 100644 config/systems/default.mak create mode 100644 config/systems/hp9000_HP-UX.mak create mode 100644 config/systems/hp9000_HP-UXB.10.mak create mode 100644 config/systems/ip_IRIX.mak create mode 100644 config/systems/ip_IRIX5.3.mak create mode 100644 config/systems/ip_IRIX6.3.mak create mode 100644 config/systems/ip_IRIX6.4.mak create mode 100644 config/systems/ip_IRIX646.4.mak create mode 100644 config/systems/ix86_CYGWIN1.0.mak create mode 100644 config/systems/ix86_CYGWIN1.1.mak create mode 100644 config/systems/ix86_CYGWIN1.3.mak create mode 100644 config/systems/ix86_CYGWIN1.4.mak create mode 100644 config/systems/ix86_CYGWIN1.5.mak create mode 100644 config/systems/ix86_CYGWIN1.7.mak create mode 100644 config/systems/ix86_CYGWIN20.1.mak create mode 100644 config/systems/ix86_CYGWIN32.mak create mode 100644 config/systems/ix86_CYGWIN324.0.mak create mode 100644 config/systems/ix86_Darwin.mak create mode 100644 config/systems/ix86_FreeBSD.mak create mode 100644 config/systems/ix86_FreeBSD2.1.mak create mode 100644 config/systems/ix86_FreeBSD2.2.mak create mode 100644 config/systems/ix86_FreeBSD3.0.mak create mode 100644 config/systems/ix86_FreeBSD3.1.mak create mode 100644 config/systems/ix86_FreeBSD3.2.mak create mode 100644 config/systems/ix86_FreeBSD3.3.mak create mode 100644 config/systems/ix86_FreeBSD4.0.mak create mode 100644 config/systems/ix86_OS22.mak create mode 100644 config/systems/ix86_RedHatLinux4.0.mak create mode 100644 config/systems/ix86_RedHatLinux4.1.mak create mode 100644 config/systems/ix86_RedHatLinux4.2.mak create mode 100644 config/systems/ix86_RedHatLinux5.0.mak create mode 100644 config/systems/ix86_RedHatLinux5.1.mak create mode 100644 config/systems/ix86_RedHatLinux5.2.mak create mode 100644 config/systems/ix86_RedHatLinux6.0.mak create mode 100644 config/systems/ix86_RedHatLinux6.1.mak create mode 100644 config/systems/ix86_RedHatLinux6.2.mak create mode 100644 config/systems/ix86_RedHatLinux7.0.mak create mode 100644 config/systems/ix86_SunOS5.5.mak create mode 100644 config/systems/ix86_SunOS5.6.mak create mode 100644 config/systems/ix86_SunOS5.7.mak create mode 100644 config/systems/ix86_SunOS5.8.mak create mode 100644 config/systems/ix86_SunOS5.mak create mode 100644 config/systems/power_macintosh_Darwin.mak create mode 100644 config/systems/rs6000_AIX4.1.mak create mode 100644 config/systems/sparc_SunOS4.1.mak create mode 100644 config/systems/sparc_SunOS4.mak create mode 100644 config/systems/sparc_SunOS5.5.mak create mode 100644 config/systems/sparc_SunOS5.6.mak create mode 100644 config/systems/sparc_SunOS5.7.mak create mode 100644 config/systems/sparc_SunOS5.8.mak create mode 100644 config/systems/sparc_SunOS5.9.mak create mode 100644 config/systems/sparc_SunOS5.mak create mode 100644 config/systems/sparc_unknown.mak create mode 100644 config/systems/unknown_DebianGNULinux.mak create mode 100644 config/systems/unknown_Linux.mak create mode 100644 config/systems/unknown_RedHatLinux.mak create mode 100644 config/systems/unknown_unknown.mak create mode 100644 config/systems/x86_64_Darwin.mak create mode 100644 config/test_make_rules create mode 100644 config/vc_common_make_rules create mode 100644 config/vc_config_make_rules-dist create mode 100755 configure create mode 100644 configure.in create mode 100644 doc/DoxyFile create mode 100644 doc/Makefile create mode 100644 doc/bibliography.bib create mode 100644 doc/cstr.gif create mode 100644 doc/edcrest.gif create mode 100644 doc/est.jpg create mode 100644 doc/estbaseclass.dox create mode 100644 doc/estexec.md create mode 100644 doc/estgram.md create mode 100644 doc/estintro.md create mode 100644 doc/estlicence.md create mode 100644 doc/estling.md create mode 100644 doc/estmanuals.md create mode 100644 doc/estserver.md create mode 100644 doc/estsigpr.md create mode 100644 doc/estspeechclass.md create mode 100644 doc/esttilt.md create mode 100644 doc/estutil.md create mode 100644 doc/estwagon.md create mode 100644 doc/estxml.md create mode 100644 doc/images/Makefile create mode 100644 doc/images/relations.eps create mode 100644 doc/images/relations.svg create mode 100644 doc/images/relations_2.eps create mode 100644 doc/images/relations_2.svg create mode 100644 doc/images/tilt-f0-representation.eps create mode 100644 doc/images/tilt-f0-representation.svg create mode 100644 doc/images/tilt-search-region.eps create mode 100644 doc/images/tilt-search-region.svg create mode 100644 doc/images/typical-pitch-accent.eps create mode 100644 doc/images/typical-pitch-accent.svg create mode 100644 doc/index.md create mode 100644 doc/man/Makefile create mode 100644 doc/man/align_man.dox.body create mode 100644 doc/man/bcat_man.dox.body create mode 100644 doc/man/ch_lab_man.dox.body create mode 100644 doc/man/ch_track_man.dox.body create mode 100644 doc/man/ch_utt_man.dox.body create mode 100644 doc/man/ch_wave_man.dox.body create mode 100644 doc/man/convert-options.xslt create mode 100644 doc/man/convert-synopsis.xslt create mode 100755 doc/man/create_dox.sh create mode 100644 doc/man/design_filter_man.dox.body create mode 100644 doc/man/dp_man.dox.body create mode 100644 doc/man/fringe_client_man.dox.body create mode 100644 doc/man/na_play_man.dox.body create mode 100644 doc/man/na_record_man.dox.body create mode 100644 doc/man/ngram_build_man.dox.body create mode 100644 doc/man/ngram_test_man.dox.body create mode 100644 doc/man/ols_man.dox.body create mode 100644 doc/man/ols_test_man.dox.body create mode 100644 doc/man/pda_man.dox.body create mode 100644 doc/man/pitchmark_man.dox.body create mode 100644 doc/man/scfg_make_man.dox.body create mode 100644 doc/man/scfg_parse_man.dox.body create mode 100644 doc/man/scfg_test_man.dox.body create mode 100644 doc/man/scfg_train_man.dox.body create mode 100644 doc/man/sig2fv_man.dox.body create mode 100644 doc/man/sigfilter_man.dox.body create mode 100644 doc/man/siod_man.dox.body create mode 100644 doc/man/spectgen_man.dox.body create mode 100644 doc/man/tilt_analysis_man.dox.body create mode 100644 doc/man/tilt_synthesis_man.dox.body create mode 100644 doc/man/viterbi_man.dox.body create mode 100644 doc/man/wagon_man.dox.body create mode 100644 doc/man/wagon_test_man.dox.body create mode 100644 doc/man/wfst_build_man.dox.body create mode 100644 doc/man/wfst_run_man.dox.body create mode 100644 doc/man/wfst_train_man.dox.body create mode 100644 doc/man/xml_parser_man.dox.body create mode 100644 grammar/Makefile create mode 100644 grammar/ngram/EST_Ngrammar.cc create mode 100644 grammar/ngram/EST_PST.cc create mode 100644 grammar/ngram/EST_lattice.cc create mode 100644 grammar/ngram/EST_lattice_io.cc create mode 100644 grammar/ngram/Makefile create mode 100644 grammar/ngram/freqsmooth.cc create mode 100644 grammar/ngram/lattice_t.cc create mode 100644 grammar/ngram/ngrammar_aux.cc create mode 100644 grammar/ngram/ngrammar_io.cc create mode 100644 grammar/ngram/ngrammar_utils.cc create mode 100644 grammar/scfg/EST_SCFG.cc create mode 100644 grammar/scfg/EST_SCFG_Chart.cc create mode 100644 grammar/scfg/EST_SCFG_inout.cc create mode 100644 grammar/scfg/Makefile create mode 100644 grammar/scfg/scfg.mak create mode 100644 grammar/wfst/EST_WFST.cc create mode 100644 grammar/wfst/Makefile create mode 100644 grammar/wfst/kkcompile.cc create mode 100644 grammar/wfst/ltscompile.cc create mode 100644 grammar/wfst/rgcompile.cc create mode 100644 grammar/wfst/tlcompile.cc create mode 100644 grammar/wfst/wfst.mak create mode 100644 grammar/wfst/wfst_aux.cc create mode 100644 grammar/wfst/wfst_aux.h create mode 100644 grammar/wfst/wfst_ops.cc create mode 100644 grammar/wfst/wfst_regex.cc create mode 100644 grammar/wfst/wfst_train.cc create mode 100644 grammar/wfst/wfst_transduce.cc create mode 100644 include/EST.h create mode 100644 include/EST_ChannelType.h create mode 100644 include/EST_Chunk.h create mode 100644 include/EST_Complex.h create mode 100644 include/EST_Contents.h create mode 100644 include/EST_DMatrix.h create mode 100644 include/EST_Event.h create mode 100644 include/EST_FMatrix.h create mode 100644 include/EST_FeatureData.h create mode 100644 include/EST_Featured.h create mode 100644 include/EST_Features.h create mode 100644 include/EST_FileType.h create mode 100644 include/EST_FringeServer.h create mode 100644 include/EST_HMM.h create mode 100644 include/EST_Handleable.h create mode 100644 include/EST_IMatrix.h create mode 100644 include/EST_Ngrammar.h create mode 100644 include/EST_Option.h create mode 100644 include/EST_PST.h create mode 100644 include/EST_Pathname.h create mode 100644 include/EST_Regex.h create mode 100644 include/EST_SCFG.h create mode 100644 include/EST_SCFG_Chart.h create mode 100644 include/EST_SMatrix.h create mode 100644 include/EST_Server.h create mode 100644 include/EST_ServiceTable.h create mode 100644 include/EST_SingleChannelWave.h create mode 100644 include/EST_String.h create mode 100644 include/EST_StringTrie.h create mode 100644 include/EST_TBox.h create mode 100644 include/EST_TBuffer.h create mode 100644 include/EST_TDeque.h create mode 100644 include/EST_THandle.h create mode 100644 include/EST_THash.h create mode 100644 include/EST_TIterator.h create mode 100644 include/EST_TKVL.h create mode 100644 include/EST_TList.h create mode 100644 include/EST_TMatrix.h create mode 100644 include/EST_TNamedEnum.h create mode 100644 include/EST_TSimpleMatrix.h create mode 100644 include/EST_TSimpleVector.h create mode 100644 include/EST_TSortable.h create mode 100644 include/EST_TTimeIndex.h create mode 100644 include/EST_TVector.h create mode 100644 include/EST_Token.h create mode 100644 include/EST_Track.h create mode 100644 include/EST_TrackMap.h create mode 100644 include/EST_UList.h create mode 100644 include/EST_Val.h create mode 100644 include/EST_Val_defs.h create mode 100644 include/EST_WFST.h create mode 100644 include/EST_Wagon.h create mode 100644 include/EST_Wave.h create mode 100644 include/EST_audio.h create mode 100644 include/EST_bool.h create mode 100644 include/EST_cluster.h create mode 100644 include/EST_cmd_line.h create mode 100644 include/EST_cmd_line_options.h create mode 100644 include/EST_common.h create mode 100644 include/EST_cutils.h create mode 100644 include/EST_dynamic_model.h create mode 100644 include/EST_error.h create mode 100644 include/EST_features_aux.h create mode 100644 include/EST_grammar.h create mode 100644 include/EST_inline_utils.h create mode 100644 include/EST_io_aux.h create mode 100644 include/EST_iostream.h create mode 100644 include/EST_kalman.h create mode 100644 include/EST_lattice.h create mode 100644 include/EST_lattice_io.h create mode 100644 include/EST_ling_class.h create mode 100644 include/EST_math.h create mode 100644 include/EST_model_types.h create mode 100644 include/EST_multistats.h create mode 100644 include/EST_rw_status.h create mode 100644 include/EST_sigpr.h create mode 100644 include/EST_simplestats.h create mode 100644 include/EST_socket.h create mode 100644 include/EST_sort.h create mode 100644 include/EST_speech_class.h create mode 100644 include/EST_stats.h create mode 100644 include/EST_strcasecmp.h create mode 100644 include/EST_string_aux.h create mode 100644 include/EST_system.h create mode 100644 include/EST_tilt.h create mode 100644 include/EST_track_aux.h create mode 100644 include/EST_types.h create mode 100644 include/EST_unix.h create mode 100644 include/EST_util_class.h create mode 100644 include/EST_viterbi.h create mode 100644 include/EST_walloc.h create mode 100644 include/EST_wave_aux.h create mode 100644 include/Makefile create mode 100644 include/instantiate/EST_TDequeI.h create mode 100644 include/instantiate/EST_THashI.h create mode 100644 include/instantiate/EST_TIteratorI.h create mode 100644 include/instantiate/EST_TKVLI.h create mode 100644 include/instantiate/EST_TListI.h create mode 100644 include/instantiate/EST_TMatrixI.h create mode 100644 include/instantiate/EST_TNamedEnumI.h create mode 100644 include/instantiate/EST_TSimpleMatrixI.h create mode 100644 include/instantiate/EST_TSimpleVectorI.h create mode 100644 include/instantiate/EST_TSortableI.h create mode 100644 include/instantiate/EST_TStringHashI.h create mode 100644 include/instantiate/EST_TVectorI.h create mode 100644 include/instantiate/Makefile create mode 100644 include/ling_class/EST_FeatureFunctionPackage.h create mode 100644 include/ling_class/EST_Item.h create mode 100644 include/ling_class/EST_Item_Content.h create mode 100644 include/ling_class/EST_Relation.h create mode 100644 include/ling_class/EST_Relation_list.h create mode 100644 include/ling_class/EST_Relation_mls.h create mode 100644 include/ling_class/EST_Relation_tree.h create mode 100644 include/ling_class/EST_Utterance.h create mode 100644 include/ling_class/EST_item_aux.h create mode 100644 include/ling_class/EST_item_content_aux.h create mode 100644 include/ling_class/EST_relation_aux.h create mode 100644 include/ling_class/EST_relation_compare.h create mode 100644 include/ling_class/EST_utterance_aux.h create mode 100644 include/ling_class/EST_utterance_xml.h create mode 100644 include/ling_class/Makefile create mode 100644 include/rxp/Makefile create mode 100644 include/rxp/XML_Parser.h create mode 100644 include/rxp/charset.h create mode 100644 include/rxp/ctype16.h create mode 100644 include/rxp/dtd.h create mode 100644 include/rxp/input.h create mode 100644 include/rxp/rxp.h create mode 100644 include/rxp/stdio16.h create mode 100644 include/rxp/string16.h create mode 100644 include/rxp/system.h create mode 100644 include/rxp/url.h create mode 100644 include/rxp/xmlparser.h create mode 100644 include/sigpr/EST_Window.h create mode 100644 include/sigpr/EST_fft.h create mode 100644 include/sigpr/EST_filter.h create mode 100644 include/sigpr/EST_filter_design.h create mode 100644 include/sigpr/EST_misc_sigpr.h create mode 100644 include/sigpr/EST_pitchmark.h create mode 100644 include/sigpr/EST_sigpr_frame.h create mode 100644 include/sigpr/EST_sigpr_utt.h create mode 100644 include/sigpr/EST_spectrogram.h create mode 100644 include/sigpr/Makefile create mode 100644 include/siod.h create mode 100644 include/siod_defs.h create mode 100644 include/siod_est.h create mode 100644 include/unix/EST_defines_unix.h create mode 100644 include/unix/EST_socket_unix.h create mode 100644 include/unix/Makefile create mode 100644 include/win32/EST_defines_win32.h create mode 100644 include/win32/EST_iostream_win32.h create mode 100644 include/win32/EST_socket_win32.h create mode 100644 include/win32/EST_unix_win32.h create mode 100644 include/win32/Makefile create mode 100755 install-sh create mode 100644 intonation/Makefile create mode 100644 intonation/tilt/Makefile create mode 100644 intonation/tilt/tilt.h create mode 100644 intonation/tilt/tilt_analysis.cc create mode 100644 intonation/tilt/tilt_synthesis.cc create mode 100644 intonation/tilt/tilt_utils.cc create mode 100644 java/Makefile create mode 100644 java/ReadMe create mode 100644 java/basic_version/Makefile create mode 100644 java/basic_version/Makefile.version create mode 100644 java/basic_version/cstr/Makefile create mode 100644 java/basic_version/cstr/est/Features.java create mode 100644 java/basic_version/cstr/est/Item.java create mode 100644 java/basic_version/cstr/est/Item_Content.java create mode 100644 java/basic_version/cstr/est/Makefile create mode 100644 java/basic_version/cstr/est/Wave.java create mode 100644 java/common/Makefile create mode 100644 java/common/cstr/Makefile create mode 100644 java/common/cstr/awt/ColorSelection.java create mode 100644 java/common/cstr/awt/ImageCanvas.java create mode 100644 java/common/cstr/awt/Makefile create mode 100644 java/common/cstr/awt/ScrollWindow.java create mode 100644 java/common/cstr/awt/XColor.java create mode 100644 java/common/cstr/est/Makefile create mode 100644 java/common/cstr/est/ServerConnection.java create mode 100644 java/common/cstr/est/SocketsFile.java create mode 100644 java/common/cstr/est/awt/Item_Content_Window.java create mode 100644 java/common/cstr/est/awt/Makefile create mode 100644 java/common/cstr/est/awt/WaveImageSource.java create mode 100644 java/common/cstr/testPrograms/Makefile create mode 100644 java/common/cstr/testPrograms/PlayWave.java create mode 100644 java/common/cstr/testPrograms/WaveTest.java create mode 100644 java/common/cstr/util/BadValueException.java create mode 100644 java/common/cstr/util/Enum.java create mode 100644 java/common/cstr/util/EnumValues.java create mode 100644 java/common/cstr/util/Featured.java create mode 100644 java/common/cstr/util/ImagePainter.java create mode 100644 java/common/cstr/util/Keyed.java create mode 100644 java/common/cstr/util/LongHash.java create mode 100644 java/common/cstr/util/Makefile create mode 100644 java/common/cstr/util/Named.java create mode 100644 java/common/cstr/util/PaintCache.java create mode 100644 java/common/cstr/util/PaintPainter.java create mode 100644 java/common/cstr/util/Painter.java create mode 100644 java/common/cstr/util/SparseArray.java create mode 100644 java/common/cstr/util/Trace.java create mode 100644 java/common/cstr/util/TraceStream.java create mode 100644 java/cpp_version/Makefile create mode 100644 java/cpp_version/Makefile.version create mode 100644 java/cpp_version/cstr/Makefile create mode 100644 java/cpp_version/cstr/est/Features.cc create mode 100644 java/cpp_version/cstr/est/Features.java create mode 100644 java/cpp_version/cstr/est/Item.cc create mode 100644 java/cpp_version/cstr/est/Item.java create mode 100644 java/cpp_version/cstr/est/Item_Content.cc create mode 100644 java/cpp_version/cstr/est/Item_Content.java create mode 100644 java/cpp_version/cstr/est/Makefile create mode 100644 java/cpp_version/cstr/est/Relation.cc create mode 100644 java/cpp_version/cstr/est/Relation.java create mode 100644 java/cpp_version/cstr/est/Sigpr.cc create mode 100644 java/cpp_version/cstr/est/Sigpr.java create mode 100644 java/cpp_version/cstr/est/Track.cc create mode 100644 java/cpp_version/cstr/est/Track.java create mode 100644 java/cpp_version/cstr/est/TrackFileFormat.java create mode 100644 java/cpp_version/cstr/est/Utterance.cc create mode 100644 java/cpp_version/cstr/est/Utterance.java create mode 100644 java/cpp_version/cstr/est/UtteranceFileFormat.java create mode 100644 java/cpp_version/cstr/est/Wave.cc create mode 100644 java/cpp_version/cstr/est/Wave.java create mode 100644 java/cpp_version/cstr/est/skeleton.cc create mode 100644 java/cpp_version/cstr/est/skeleton.java create mode 100644 java/java.mak create mode 100644 java/java_cpp.mak create mode 100644 java/java_media.mak create mode 100644 java/media_version/Makefile create mode 100644 java/media_version/Makefile.version create mode 100644 java/media_version/cstr/Makefile create mode 100644 java/media_version/cstr/est/Features.java create mode 100644 java/media_version/cstr/est/Item.java create mode 100644 java/media_version/cstr/est/Item_Content.java create mode 100644 java/media_version/cstr/est/Makefile create mode 100644 java/media_version/cstr/est/Wave.java create mode 100644 java/media_version/cstr/est/WaveDataSource.java create mode 100644 lib/Makefile create mode 100644 lib/VCLocalRules create mode 100644 lib/cstrutt.dtd create mode 100644 lib/est_mainline-in create mode 100644 lib/est_program_makefile-in create mode 100644 lib/example_data/Makefile create mode 100644 lib/example_data/alice create mode 100644 lib/example_data/ch_track.htk create mode 100644 lib/example_data/ch_wave.wav create mode 100644 lib/example_data/channel_names.map create mode 100644 lib/example_data/colours.map create mode 100644 lib/example_data/colours_translation.map create mode 100644 lib/example_data/eg.dtd create mode 100644 lib/example_data/eg.xml create mode 100644 lib/example_data/kdt_001.il create mode 100644 lib/example_data/kdt_001.pm create mode 100644 lib/example_data/kdt_001.tilt create mode 100644 lib/example_data/kdt_001.wav create mode 100644 lib/example_data/ked_wr1_012.utt create mode 100644 lib/example_data/key.lab create mode 100644 lib/example_data/options.file create mode 100644 lib/example_data/vit.B.ngram create mode 100644 lib/example_data/vit.observes create mode 100644 lib/example_data/vit.vocab create mode 100644 lib/example_data/wagon.data create mode 100644 lib/example_data/wagon.desc create mode 100644 lib/example_data/wagon.tree create mode 100644 lib/siod/Makefile create mode 100644 lib/siod/cstr.scm create mode 100644 lib/siod/fringe.scm create mode 100644 lib/siod/init.scm create mode 100644 lib/siod/siod.scm create mode 100644 lib/siod/siod_client.scm create mode 100644 lib/siod/siod_server.scm create mode 100644 lib/siod/web.scm create mode 100644 ling_class/EST_FeatureFunctionContext.cc create mode 100644 ling_class/EST_FeatureFunctionContext.h create mode 100644 ling_class/EST_FeatureFunctionPackage.cc create mode 100644 ling_class/EST_Item.cc create mode 100644 ling_class/EST_Item_Content.cc create mode 100644 ling_class/EST_Relation.cc create mode 100644 ling_class/EST_Relation_mls.cc create mode 100644 ling_class/EST_Utterance.cc create mode 100644 ling_class/EST_UtteranceFile.cc create mode 100644 ling_class/EST_UtteranceFile.h create mode 100644 ling_class/EST_item_aux.cc create mode 100644 ling_class/EST_item_content_aux.cc create mode 100644 ling_class/EST_relation_aux.cc create mode 100644 ling_class/EST_relation_compare.cc create mode 100644 ling_class/EST_relation_track.cc create mode 100644 ling_class/EST_utterance_aux.cc create mode 100644 ling_class/Makefile create mode 100644 ling_class/apml.cc create mode 100644 ling_class/apml.h create mode 100644 ling_class/genxml.cc create mode 100644 ling_class/genxml.h create mode 100644 ling_class/item_aux.cc create mode 100644 ling_class/item_feats.cc create mode 100644 ling_class/ling_class_init.cc create mode 100644 ling_class/ling_class_init.h create mode 100644 ling_class/ling_t.cc create mode 100644 ling_class/relation_io.cc create mode 100644 ling_class/relation_io.h create mode 100644 ling_class/solexml.cc create mode 100644 ling_class/solexml.h create mode 100644 ling_class/standard_feature_functions.cc create mode 100644 main/Makefile create mode 100644 main/align_main.cc create mode 100644 main/bcat_main.cc create mode 100644 main/ch_lab_main.cc create mode 100644 main/ch_track_main.cc create mode 100644 main/ch_utt_main.cc create mode 100644 main/ch_wave_main.cc create mode 100644 main/design_filter_main.cc create mode 100644 main/dp_main.cc create mode 100644 main/na_play_main.cc create mode 100644 main/na_record_main.cc create mode 100644 main/ngram_build_main.cc create mode 100644 main/ngram_test_main.cc create mode 100644 main/ols_main.cc create mode 100644 main/ols_test_main.cc create mode 100644 main/pda_main.cc create mode 100644 main/pitchmark_main.cc create mode 100644 main/scfg_make_main.cc create mode 100644 main/scfg_parse_main.cc create mode 100644 main/scfg_test_main.cc create mode 100644 main/scfg_train_main.cc create mode 100644 main/sig2fv_main.cc create mode 100644 main/sigfilter_main.cc create mode 100644 main/siod_main.cc create mode 100644 main/spectgen_main.cc create mode 100644 main/tilt_analysis_main.cc create mode 100644 main/tilt_synthesis_main.cc create mode 100644 main/viterbi_main.cc create mode 100644 main/wagon_main.cc create mode 100644 main/wagon_test_main.cc create mode 100644 main/wfst_build_main.cc create mode 100644 main/wfst_run_main.cc create mode 100644 main/wfst_train_main.cc create mode 100644 main/xml_parser_main.cc create mode 100755 missing create mode 100755 mkinstalldirs create mode 100644 rxp/Makefile create mode 100644 rxp/XML_Parser.cc create mode 100644 rxp/charset.c create mode 100644 rxp/ctype16.c create mode 100644 rxp/dtd.c create mode 100644 rxp/input.c create mode 100644 rxp/rxp.c create mode 100644 rxp/rxp.mak create mode 100644 rxp/stdio16.c create mode 100644 rxp/string16.c create mode 100644 rxp/system.c create mode 100644 rxp/url.c create mode 100644 rxp/xmlparser.c create mode 100644 scripts/Makefile create mode 100644 scripts/build_docbook_index.prl create mode 100644 scripts/cxx_to_docbook.prl create mode 100755 scripts/est_examples.sh create mode 100644 scripts/est_gdb.sh create mode 100644 scripts/est_program.sh create mode 100644 scripts/example_to_doc++.prl create mode 100755 scripts/make_wagon_desc.sh create mode 100755 scripts/pm.prl create mode 100644 scripts/raw_to_xgraph.prl create mode 100755 scripts/resynth.sh create mode 100644 scripts/shared_script create mode 100644 scripts/shared_setup_prl create mode 100644 scripts/shared_setup_sh create mode 100644 scripts/tex_to_images.prl create mode 100644 sigpr/EST_Window.cc create mode 100644 sigpr/Makefile create mode 100644 sigpr/delta.cc create mode 100644 sigpr/fft.cc create mode 100644 sigpr/filter.cc create mode 100644 sigpr/misc.cc create mode 100644 sigpr/pda/Makefile create mode 100644 sigpr/pda/array_smoother.h create mode 100644 sigpr/pda/pcb_smoother.cc create mode 100644 sigpr/pda/pda.cc create mode 100644 sigpr/pda/smooth_pda.cc create mode 100644 sigpr/pda/srpd.h create mode 100644 sigpr/pda/srpd1.3.cc create mode 100644 sigpr/pitchmark.cc create mode 100644 sigpr/sigpr_frame.cc create mode 100644 sigpr/sigpr_utt.cc create mode 100644 sigpr/spectrogram.cc create mode 100644 siod/Makefile create mode 100644 siod/editline.c create mode 100644 siod/editline.h create mode 100644 siod/el_complete.c create mode 100644 siod/el_sys_unix.c create mode 100644 siod/el_sys_win32.c create mode 100644 siod/el_unix.h create mode 100644 siod/io.cc create mode 100644 siod/io.h create mode 100644 siod/siod.cc create mode 100644 siod/siod.mak create mode 100644 siod/siod_est.cc create mode 100644 siod/siodeditline.c create mode 100644 siod/siodeditline.h create mode 100644 siod/siodp.h create mode 100644 siod/slib.cc create mode 100644 siod/slib_core.cc create mode 100644 siod/slib_doc.cc create mode 100644 siod/slib_file.cc create mode 100644 siod/slib_format.cc create mode 100644 siod/slib_list.cc create mode 100644 siod/slib_math.cc create mode 100644 siod/slib_python.cc create mode 100644 siod/slib_python.h create mode 100644 siod/slib_repl.cc create mode 100644 siod/slib_server.cc create mode 100644 siod/slib_str.cc create mode 100644 siod/slib_sys.cc create mode 100644 siod/slib_xtr.cc create mode 100644 siod/trace.cc create mode 100644 speech_class/EST_Track.cc create mode 100644 speech_class/EST_TrackFile.cc create mode 100644 speech_class/EST_TrackFile.h create mode 100644 speech_class/EST_TrackMap.cc create mode 100644 speech_class/EST_Wave.cc create mode 100644 speech_class/EST_WaveFile.cc create mode 100644 speech_class/EST_WaveFile.h create mode 100644 speech_class/EST_track_aux.cc create mode 100644 speech_class/EST_wave_aux.cc create mode 100644 speech_class/EST_wave_cuts.cc create mode 100644 speech_class/EST_wave_io.cc create mode 100644 speech_class/EST_wave_temp.cc create mode 100644 speech_class/EST_wave_utils.cc create mode 100644 speech_class/EST_wave_utils.h create mode 100644 speech_class/Makefile create mode 100644 speech_class/esps_io.cc create mode 100644 speech_class/esps_utils.cc create mode 100644 speech_class/esps_utils.h create mode 100644 speech_class/htk.h create mode 100644 speech_class/ssff.cc create mode 100644 speech_class/ssff.h create mode 100644 speech_class/track_t.cc create mode 100644 speech_class/waveP.h create mode 100644 speech_class/wave_t.cc create mode 100644 stats/EST_DProbDist.cc create mode 100644 stats/EST_Discrete.cc create mode 100644 stats/EST_cluster.cc create mode 100644 stats/EST_multistats.cc create mode 100644 stats/EST_ols.cc create mode 100644 stats/EST_viterbi.cc create mode 100644 stats/Makefile create mode 100644 stats/confusion.cc create mode 100644 stats/dynamic_program.cc create mode 100644 stats/kalman_filter/EST_kalman.cc create mode 100644 stats/kalman_filter/Makefile create mode 100644 stats/kalman_filter/kalman_filter.mak create mode 100644 stats/ols.mak create mode 100644 stats/wagon/Makefile create mode 100644 stats/wagon/dlist.cc create mode 100644 stats/wagon/wagon.cc create mode 100644 stats/wagon/wagon.mak create mode 100644 stats/wagon/wagon_aux.cc create mode 100644 stats/wagon/wagonint.cc create mode 100644 testsuite/Makefile create mode 100644 testsuite/ch_track.sh create mode 100644 testsuite/ch_wave.sh create mode 100644 testsuite/complex_example.cc create mode 100644 testsuite/complex_regression.cc create mode 100644 testsuite/correct/Makefile create mode 100644 testsuite/correct/ch_track_script.out create mode 100644 testsuite/correct/ch_wave_script.out create mode 100644 testsuite/correct/complex_example.out create mode 100644 testsuite/correct/complex_regression.out create mode 100644 testsuite/correct/deq_example.out create mode 100644 testsuite/correct/deq_regression.out create mode 100644 testsuite/correct/error_example.out create mode 100644 testsuite/correct/error_regression.out create mode 100644 testsuite/correct/feature_example.out create mode 100644 testsuite/correct/feature_regression.out create mode 100644 testsuite/correct/handle_example.out create mode 100644 testsuite/correct/handle_regression.out create mode 100644 testsuite/correct/hash_example.out create mode 100644 testsuite/correct/hash_regression.out create mode 100644 testsuite/correct/kvl_example.out create mode 100644 testsuite/correct/kvl_regression.out create mode 100644 testsuite/correct/ling_example.out create mode 100644 testsuite/correct/ling_regression.out create mode 100644 testsuite/correct/list_example.out create mode 100644 testsuite/correct/list_regression.out create mode 100644 testsuite/correct/lpc_script.out create mode 100644 testsuite/correct/matrix_example.out create mode 100644 testsuite/correct/matrix_regression.out create mode 100644 testsuite/correct/named_enum_example.out create mode 100644 testsuite/correct/named_enum_regression.out create mode 100644 testsuite/correct/pathname_example.out create mode 100644 testsuite/correct/pathname_regression.out create mode 100644 testsuite/correct/sigpr_example.out create mode 100644 testsuite/correct/sigpr_regression.out create mode 100644 testsuite/correct/string_example.out create mode 100644 testsuite/correct/string_regression.out create mode 100644 testsuite/correct/tilt_script.out create mode 100644 testsuite/correct/token_example.out create mode 100644 testsuite/correct/token_regression.out create mode 100644 testsuite/correct/track_example.out create mode 100644 testsuite/correct/track_map_example.out create mode 100644 testsuite/correct/track_map_regression.out create mode 100644 testsuite/correct/track_regression.out create mode 100644 testsuite/correct/viterbi_script.out create mode 100644 testsuite/correct/wagon_script.out create mode 100644 testsuite/correct/xml_example.out create mode 100644 testsuite/correct/xml_regression.out create mode 100644 testsuite/deq_example.cc create mode 100644 testsuite/deq_regression.cc create mode 100644 testsuite/feature_example.cc create mode 100644 testsuite/feature_regression.cc create mode 100644 testsuite/handle_example.cc create mode 100644 testsuite/handle_regression.cc create mode 100644 testsuite/hash_example.cc create mode 100644 testsuite/hash_regression.cc create mode 100644 testsuite/kvl_example.cc create mode 100644 testsuite/kvl_regression.cc create mode 100644 testsuite/ling_example.cc create mode 100644 testsuite/ling_regression.cc create mode 100644 testsuite/list_example.cc create mode 100644 testsuite/list_regression.cc create mode 100644 testsuite/lpc.sh create mode 100644 testsuite/named_enum_example.cc create mode 100644 testsuite/named_enum_regression.cc create mode 100644 testsuite/pathname_example.cc create mode 100644 testsuite/pathname_regression.cc create mode 100644 testsuite/sigpr_example.cc create mode 100644 testsuite/sigpr_regression.cc create mode 100644 testsuite/string_example.cc create mode 100644 testsuite/string_regression.cc create mode 100644 testsuite/tilt.sh create mode 100644 testsuite/token_example.cc create mode 100644 testsuite/token_regression.cc create mode 100644 testsuite/track_example.cc create mode 100644 testsuite/track_regression.cc create mode 100644 testsuite/viterbi.sh create mode 100644 testsuite/wagon.sh create mode 100644 testsuite/xml_example.cc create mode 100644 testsuite/xml_regression.cc create mode 100644 utils/EST_cutils.c create mode 100644 utils/EST_error.c create mode 100644 utils/EST_swapping.cc create mode 100644 utils/Makefile create mode 100644 utils/cmd_line.cc create mode 100644 utils/cmd_line_aux.cc create mode 100644 utils/est_file.cc create mode 100644 utils/filetrans.cc create mode 100644 utils/system_specific_unix.c create mode 100644 utils/system_specific_win32.c create mode 100644 utils/util_io.cc create mode 100644 utils/walloc.c create mode 100644 wrappers/Makefile create mode 100644 wrappers/interface/EST_FVector.i create mode 100644 wrappers/interface/EST_Item.i create mode 100644 wrappers/interface/EST_Ngrammar.i create mode 100644 wrappers/interface/EST_Relation.i create mode 100644 wrappers/interface/EST_SignalProc.i create mode 100644 wrappers/interface/EST_TSimpleVector.i create mode 100644 wrappers/interface/EST_TVector.i create mode 100644 wrappers/interface/EST_Track.i create mode 100644 wrappers/interface/EST_Utterance.i create mode 100644 wrappers/interface/EST_Wave.i create mode 100644 wrappers/interface/EST_error.i create mode 100644 wrappers/interface/EST_pitchmark.i create mode 100644 wrappers/interface/EST_rw_status.i create mode 100644 wrappers/interface/Makefile create mode 100644 wrappers/interface/python/EST_Features.i create mode 100644 wrappers/interface/python/EST_typemaps.i create mode 100644 wrappers/interface/python/Makefile create mode 100644 wrappers/wrappers.mak diff --git a/INSTALL b/INSTALL new file mode 100644 index 0000000..dde751d --- /dev/null +++ b/INSTALL @@ -0,0 +1,291 @@ +INSTALLATION + +Release notes + +This documentation covers version 2.4 of the Edinburgh Speech Tools +Library. While previous versions of the speech tools were primarily +released solely to support the Festival Speech Synthesis System, the +Edinburgh Speech Tools Library now contains sufficiently useful tools +that it is of use in its own right. + +Although hope that the speech tools has stabilised to a certain extent +and less structural changes will occur in future versions we don't +guaranteed future compatibility, although every effort will be made to +make upgrading as easy as possible. In addition, we warn that while +several programs and routines are quite mature, others are young and +have not be rigorously tested. Please do not assume these programs +work. + +Requirements + +In order to compile and install the Edinburgh Speech Tools you need +the following + +GNU make + +Any recent version, the various make programs that come with different +UNIX systems are wildly varying and hence it makes it too difficult to +write Makefiles which are portable, so we depend on a version of make +which is available for all of the platforms we are aiming at. + +A C++ compiler + +The system was developed primarily with GNU C++ (various versions from +version 2.7.2), but we also have compiled it successfully with a +number of other versions of gcc, and Visual C++. + +Hopefully we have now sanitized the code sufficiently to to make it +possible for ports to other C++ compilers without too much +difficulty. But please note C++ is not a fully standardized language +and each compiler follows the incomplete standard to various +degrees. Often there are many but simple problems when porting to new +C++ compilers. We are trying to deal with this by increasing our +support. However, it is likely that small changes will be required for +C++ compilers we have not yet tested the system under. + +However we feel this is stable enough to make it worthwhile attempting +ports to other C++ compilers that we haven't tried yet. + +Before installing the speech tools it is worth ensuring you have a +fully installed and working version of your C++ compiler. Most of the +problems people have had in installing the speech tools have been due +to incomplete or bad compiler installation. It might be worth checking +if the following program works, if you don't know if anyone has used +your C++ installation before. + + #include + int main (int argc, char **argv) + { + cout << "Hello world\n"; + } + + +Supported Systems + +We have successfully compiled and tested the speech tools on the +following systems, except where specified we include support for both +shared and static versions of the libraries: + +Sun Sparc Solaris 2.5.1/2.6/2.7/2.9 + GCC 2.7.2, GCC 2.8.1, gcc-2.95.3, gcc-3.2 gcc-3.3 + +MacOS GCC 4.2.1 (Snow Leopard default) + +Linux GCC 4.2 - 4.8.0 + +Windows 7/8 GCC (from Cygwin 1.7), Visual C++ (VS2010,VS2012). + +As stated before C++ compilers are not standard and it is non-trivial +to find the correct dialect which compiles under all. We recommend +the use of GCC 4.6 if you can use it, it is the most likely one to +work. Some of the compilers listed above produce a large number of +warnings when compiling the code. + +Previous versions of the system have successfully compiled under SGI +IRIX 5.3, 6.x, OSF (Alphas) and HPUX but at time of writing this we have +not yet rechecked this version. AIX4.3 probably works. + + +Java is no longer supported! + +The java directory contains optional Java classes which give some +access to speech tools facilities from Java programs. This has been +created to support the fringe graphical interface. There are three +levels of support enabled by the JAVA JAVA_MEDIA and JAVA_CPP options +in the config file. JAVA compiles some very basic classes intended to +allow very simple simulation of speech tools facilities in pure Java +programs. JAVA_MEDIA is similar but uses the Jva Media Framework to +play sound. JAVA_CPP compiles classes which use the Java native +interface to provide access to the actual speech tools C++ classes. + +You may (for instance on Solaris using gcc) need to make shared +libraries for some compiler support libraries in order to comple the +full JAVA_CPP support. See Appendix A for details. + +Windows 95/98/NT/XP/Vista/7/8 Port + +We have done two ports of this code to Windows machines, one uses the +Cygwin package, which provides a Unix like environment under on Win32 +systems, the other is a native port using Visual C++. + +We recommend using only Windows 7. + +The port using Visual C++ does not provide all of the +features of the Unix and Cygwin versions. You will need access to a +Unix or Cygwin system to create the makefiles used for the Visual C++ +compilation. + +Both Cygwin and Visual C++ ports have a number of limitations. + +Shared library creation is not supported. + Creation of Windows DLLs is different enough from creation of Unix + shared libraries that the support does not carry directly across, and + we haven't yet had time to work on it. + +Java not supported + Because the Java support is related to the creation of shared + libraries, this is also not yet implemented for Windows. + +Command line editing limited + Because of the limits of the Windows DOS console window, the + command line editing in siod is less reliable (for instance on + very long lines). + +(Visual C++) Networking not supported + Networking under Win32 is different from Unix in a number of + fairly fundamental ways, we haven't tackled this at all. + +There are no doubt other differences we have not noticed. We don't use +Windows for any of our work and so the Windows builds of our systems +don't get the extensive use the unix builds do. + +BUILDING IT + +Configuration + +All compile-time configuration for the system is done through GNU +configure. On most systems you can configure the system +by + + unix$ ./configure + +This creates the file config/config which for most machines will be +suitable. In some circumstances the default.s generated from this +may not be what you want and you may wish to edit this file. + +For Linux we now fully support shared libraries and even recommend +them. However if you are going to do a lot of development and don't +understand the consequences of shared libraries and getting +LD_LIBRARY_PATH correct (or what that is) we recommend you compile +unshared, the default. If you are going to simply run the speech tools +(and festival) then shared is a reasonable option. Uncomment the line +in the config file + + # SHARED = 2 + +Shared support under Solaris is complete for all the speech tools. If +you need to exec festival scripts using a version of festival built +with shared libraries, you must either execute them from a featureful +shell (e.g. bash), install the shared libraries in a standard place or +explicitly set LD_LIBRARY_PATH. Solaris's standard shell doesn't +support script execution of shells within shells. + +Simple choices for common set ups are given near the top of this +file. But for some sub-systems you will also need to change pathnames +for external library support. + +Compilation + +Once you have configured config/config you can compile the system. + + unix$ gmake + +Note this must be GNU make, which may be called make on your system, +or gmake or gnumake. This will compile all library functions and all +the executables. If you wish to only compile the library itself then +use + + unix$ gmake make_library + +Note that if you compile with -g (uncommenting DEBUG = 1 is +config/config the library and the corresponding binaries will be +large. Particularly the executables, you will need in order of 150 +megabytes to compile the system, if your C++ libraries are not +compiled as shared libraries. If you compile without -g the whole +library directory is about 12 megabytes on Linux (which has shared +libraries for libstdc++ or about 26 megabytes of Sparc Solaris (which +does not have a shared library libstdc++ by default). This is almost +entirely due to the size of the executables. C++ does not make small +binaries. + +In general we have made the system compile with no warnings. However +for some compilers this has proved to be near impossible. SunOS +include files have a number of system declarations missing, so many +system functions (e.g. fprintf) will appear to be undeclared. Sun's CC +compiler also likes to complain about missing source for some code +even though the code exists within our system and is deliberately in +separate files ro make it modular. + +To test the system after compilation + + unix$ gmake test + +Installing the system + +All executables are linked to from speech_tools/bin and you should add +that to your PATH in order to use them. + +Include files are speech_tools/include/ and the three generated +libraries are speech_tools/lib/libestools.a, +speech_tools/lib/libestbase.a and speech_tools/lib/libestring.a. For +most cases a three will be required. + +If space is a premium, compiled with the shared option (binaries +will be then be substantially smaller) and you can delete all .o files + +Some aspects of the system have further dependencies which depend of +the option selected at compile time. Specifically the readline +libraries and Netaudio libraries. + +These are uptodate instructions for Visual C++ builds. +VS2010 was tested but older versions may work + +Requirements: +MS Windows 7 (or Windows 8) +Visual C++ (VS2010 or VS2012) +cygwin 1.7 or later +speech_tools-2.3 +festival-2.3 + +Download and install cygwin. +Optionally download emacs so you have a decent editor :) +Download speech_tools and festival tar.gz files. +Download required festival lexicons and voices. + +Using cygwins bash shell: + mkdir C:/festival + cd C:/festival + +Using cygwin's tar command unpack: + tar xvfz speech_tools-2.3.tar.gz + tar xvfz festival-2.3.tar.gz + tar xvfz festlex... festvox... +(where festlex... and festvox... are the voice and lexicon files you +need. Do not use winzip to unpack the voices it corrupts them!) + +Create Visual C++ make files: (this may be slow...) + cd speech_tools + make VCMakefile + cp config/vc_config_make_rules-dist config/vc_config_make_rules + + cd ../festival + make VCMakefile + cp config/vc_config_make_rules-dist config/vc_config_make_rules + +Finally make festival init_modules code. (If you add new modules you +either need to edit init_modules.cc by hand or rerun this step.) + make -C src/modules init_modules.cc + +edit config/vc_config_make_rules and change: + SYSTEM_LIB=c:\\festival\\lib +to: + SYSTEM_LIB=c:\\festival\\festival\\lib +(or to wherever you unpacked festival) + +Now switch to a windows command prompt. +If necessary execute: VCVARSALL.BAT from the VC++ directory structure to set up +VC++ environment. (you may do this automatically at boot or login, or it should be +automatic if using the terminal provided by Visual studio) + +Build speech_tools and festival: + cd c:\festival\speech_tools + nmake /nologo /FVCMakefile + + cd ..\festival + nmake /nologo /FVCMakefile + +At this point you should be able to run festival by typing: + src\main\festival + + + diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..f3343f1 --- /dev/null +++ b/Makefile @@ -0,0 +1,115 @@ +########################################################################### +## ## +## Centre for Speech Technology Research ## +## University of Edinburgh, UK ## +## Copyright (c) 1996-2014 ## +## 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 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 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. ## +## ## +########################################################################### +## ## +## Top level Makefile for Edinburgh Speech tools library ## +## Authors: Paul Taylor, Simon King, Alan W Black, Richard Caley ## +## and others (see ACKNOWLEDGEMENTS) ## +## Version: 2.4 release December 2014 ## +## ## +########################################################################### + +TOP=. +DIRNAME=. +LIB_BUILD_DIRS = audio utils base_class ling_class speech_class sigpr \ + stats grammar intonation +# Development directories are those that contain non-stable code +#DEV_DIRS = $(shell if [ -f DEV_DIRS ]; then cat DEV_DIRS; fi ) +BUILD_DIRS = $(LIB_BUILD_DIRS) lib main scripts testsuite bin +TEMPLATE_DIRS=include audio utils base_class base_class/string \ + ling_class speech_class sigpr stats grammar siod +EXTRA_DIRS=siod java rxp wrappers +ALL_DIRS = include $(BUILD_DIRS) $(EXTRA_DIRS) config doc +VERSION=$(PROJECT_VERSION) +CONFIG=configure configure.in config.sub config.guess \ + missing install-sh mkinstalldirs +FILES=Makefile README INSTALL $(CONFIG) + +LOCAL_CLEAN= Build.trace Test.trace Templates.DB + +ALL = .config_error .sub_directories + +# Try and say if config hasn't been created +config_dummy := $(shell test -f config/config || ( echo '*** '; echo '*** Making default config file ***'; echo '*** '; ./configure; ) >&2) + +# force a check on the system file +system_dummy := $(shell $(MAKE) -C $(TOP)/config -f make_system.mak TOP=.. system.mak) + +include $(TOP)/config/common_make_rules + +dist: backup +backup: time-stamp + @ $(MAKE) file-list + @ sed 's/^\.\///' FileList.all + @ (cd ..; tar cvf - `cat speech_tools/FileList.all` speech_tools/.time-stamp | gzip > speech_tools/speech_tools-$(VERSION)-$(PROJECT_STATE).tar.gz) + @ $(RM) -f $(TOP)/FileList.all + @ ls -l speech_tools-$(VERSION)-$(PROJECT_STATE).tar.gz + +time-stamp : + @ echo speech_tools $(VERSION) >.time-stamp + @ date >>.time-stamp + +minrev: backup + @mv speech_tools-$(VERSION).tar.gz speech_tools-$(VERSION).`date +%y%m%d`.tar.gz + +tags: + @ $(RM) -f FileList + @ $(MAKE) --no-print-directory FileList + @ etags `grep ".[ch]c*$$" FileList` + +test: make_library + @ $(MAKE) --no-print-directory -C testsuite test + +rebuild_and_test: + $(MAKE) -k clean + $(MAKE) -k depend + $(MAKE) -k all >Build.trace 2>&1 + $(MAKE) -k test >Test.trace 2>&1 + @if egrep 'FAILED|INCORRECT' Test.trace ;\ + then \ + echo test failed ;\ + exit 1 ;\ + fi + @if cat Build.trace Test.trace | egrep 'warning:' ;\ + then \ + echo warnings found ;\ + exit 2 ;\ + fi + +config/config: config/config.in config.status + ./config.status + +configure: configure.in + autoconf + +include $(TOP)/config/rules/top_level.mak +include $(TOP)/config/rules/install.mak diff --git a/README b/README new file mode 100644 index 0000000..88e3ded --- /dev/null +++ b/README @@ -0,0 +1,251 @@ + EDINBURGH SPEECH TOOLS LIBRARY + VERSION 2.4 December 2014 + +Principal authors: Alan W Black, Paul Taylor, Richard Caley, + Simon King, Rob Clark and Korin Richmond + +Centre for Speech Technology +University of Edinburgh +Informatics Forum +10 Crichton Street +Edinburgh EH8 9AB, UK +http://www.cstr.ed.ac.uk/projects/speech_tools + +Although this is a considered stable release, there are still a number +of known parts are missing or incomplete. + +------------------------------------------------------------------------ + +The Edinburgh speech tools system is a library of C++ classes, functions +and utility programs that are frequently used in speech software. The +system compiles to a single unix library .a file which can be linked +with software. At present, C++ classes for several useful speech and +language classes have been written, along with audio software and some +basic signal processing software. + +======================================================================== + + + Edinburgh Speech Tools Library version 2.4 + Centre for Speech Technology Research + University of Edinburgh, UK + Copyright (c) 1994-2014 + 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 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 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. + +======================================================================== + +The following c++ programs are available: + + na_play: generic playback program for use with net_audio and CSTR ao. + + ch_wave: Waveform file conversion program. + + ch_lab: label file conversion program. + + ch_track: Track file conversion program. + + wagon: a CART tree build and test program + + And others + +The following C++ sub-libraries are available + + audio: C++ audio functions for Network Audio system, Suns + Linux and FreeBSD + + speech_class: C++ speech classes, including waveform and track. + + ling_class: C++ linguistic classes. + + sigpr: Signal processing + + utils: Various utilities. + + +COPYING +------------------------------------------------------------------------ + +Some files in the distribution do not fall under the above copyright. +However none have any commercial restrictions, and no files fall under +the GPL. Specifically files that have different licences are as +follows: + +grammar/wfst/wfst_train.cc + Copyright Carnegie Mellon University (under the same + open licences as much of the rest of the code). +siod/ +include/siod*.h +lib/siod/siod.scm + Apart from some new functionality under our licence the SIOD + files fall under the licence given in siod/slib.cc copyright + Paradigm Associates. This code has been substantially modified + by us though our changes are under that licence. + + editline.c editline.h el_complete.c el_sysunix.c el_unix.h + are copyright 1992 Simmule Turner and Rich Salz under the + "BSD like" licence in siod/editline.c Again substantial + changes have been made by us which continue to be under that + licence + +rxp/ +include/rxp/ + Is Copyright Richard Tobin. We have a specific version of RXP + which allows free (including non-commercial) use. + +base_class/raveconv.cc + Is copyright 1992, 1995 by Markus Mummert + +base_class/string/reg*.{c,cc} + Copyright (c) 1986 by University of Toronto. + +base_class/string/EST_strcasecmp.c + Copyright (c) 1987, 1993 + The Regents of the University of California. All rights reserved. + + The standard BSD licence + + +ACKNOWLEDGEMENTS +------------------------------------------------------------------------ + +Most of the software was written by Paul Taylor, Alan W Black, Simon +King, Richard Caley, Rob Clark and Korin Richmond. Additional +contributions have been made by the following people. Slightly +different licence agreements accompany these pieces of code, so it is +important that the various agreements be properly understood. + +Tony Robinson: some signal processing code. +Markus Mummert: sample rate converter (rateconv.cc). +Craig Reese and Joe Campbell: ulaw conversion code. +Paul Bagshaw: pitch tracker. +Theo Veenker: IRIX audio support. +Stan Chen: AIX support +Paradigm Assoc. and George Carrett: For Scheme In One Defun +Simmule Turner and Rich Salz: for editline +Henry Spencer: for regex code +The Regents of the University of California: some string comparison code +Richard Tobin: RXP, XML parser. +Arthur Toth: Windows server code +Pierre Lorenzon gcc-4.7 patches +Sergio Oller: for making the documentation work again + +INSTALLATION +************ + +see INSTALL file for details + +FILE/DIRECTORY STRUCTURE +------------------------------------------------------------------------ + +The main directory contains minimal wrap-around main() functions +which compile to form executables which use the algorithms in the +speech tools. All these main() functions really do is to read +command line options and read and write files, the algorithms +themselves are completely contained within the libraries. + +The directory structure is as follows: + +config: + shared make rules and configuration make rules + +speech_class: + general speech class files, including waveforms, contours etc. + +ling_class: + general linguistic class files, including a stream-based architecture. + +sigpr: + signal processing code. + +doc: + basic documentation, generates html, info and postscript + +include: + class and general header files. + +lib: + where the .a files are kept + +main: + Directory containing main files which compile to executables. + + +DOCUMENTATION +------------------------------------------------------------------------ + +There are two sources of documentation. + +Man pages exist for the more important stand-alone programs. These are +found in the main directory. + +The library documentation has substantiall improved in this version +using an integrated DOC++, JADE and docbook combination. Classes are +described at the overview, theorectical, practical and code level. +The build process for the documentation is still dependent on some +more obscure packages so it is recommended that you take the +pre-built documentation. Or access it on-line through + http://www.cstr.ed.ac.uk/projects/speech_tools + +The library documentation is in texinfo format which can be converted +into GNU info HTML and postscript, see Makefile in doc/ + +Note the documentation is not up to date. We are in the process of moving the documentation to Doxygen. + +BUGS/COMMENTS ETC +------------------------------------------------------------------------ + +Substantial parts of this release are considered mature and should be +relatively free of bugs, however there are newer parts which have not +been rigourously tested yet. If you find any bugs, please send a bug +report to speechtools@cstr.ed.ac.uk. Any useful comments will also be +appreciated. See also the bugs file in the doc directory. + +If you have some software that you think could be integrated into the +speechtools system, please contact us at +speechtools@cstr.ed.ac.uk. The whole point of writing and releasing +code such as this is to prevent duplication of effort, and therefore +we would appreciate greatly any code which will add to the usefulness +of the system. Signal processing routines are particularly welcome. + + +====================================================================== +ADDITIONAL SOFTWARE +====================================================================== + +CSTR supplies a number of different speech technology systems +including speech synthesis systems and (in the future) a recognition +system. To find out more information checkout http://www.cstr.ed.ac.uk/ + + + + + + + + + + diff --git a/audio/Makefile b/audio/Makefile new file mode 100644 index 0000000..6103654 --- /dev/null +++ b/audio/Makefile @@ -0,0 +1,74 @@ +########################################################################### +## ## +## Centre for Speech Technology Research ## +## University of Edinburgh, UK ## +## Copyright (c) 1996 ## +## 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 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 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 : Paul Taylor ## +## Date : March 1995 ## +##-----------------------------------------------------------------------## +## Audio System Makefile ## +## ## +##=======================================================================## +TOP=.. +DIRNAME=audio + +LOCAL_DEFAULT_LIBRARY = estbase + +H = audioP.h +CPPSRCS = gen_audio.cc nas.cc esd.cc sun16audio.cc \ + mplayer.cc win32audio.cc irixaudio.cc os2audio.cc \ + macosxaudio.cc linux_sound.cc + +SRCS = $(CPPSRCS) +OBJS = $(SRCS:.cc=.o) +FILES = $(CPPSRCS) $(H) Makefile + +ALL = .buildlib + +WIN_CFLAGS = $$(DEBUGFLAGS) $$(OPTFLAGS) $$(INCLUDEFLAGS) + +include $(TOP)/config/common_make_rules + +DEFINES += $(AUDIO_DEFINES) +INCLUDES += $(AUDIO_INCLUDES) + + + + + + + + + + + + + + diff --git a/audio/audioP.h b/audio/audioP.h new file mode 100644 index 0000000..6d49690 --- /dev/null +++ b/audio/audioP.h @@ -0,0 +1,56 @@ +/*************************************************************************/ +/* */ +/* Centre for Speech Technology Research */ +/* University of Edinburgh, UK */ +/* Copyright (c) 1996 */ +/* 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 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 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 */ +/* Date : May 1996 */ +/*=======================================================================*/ +/* Shared (private) audio declarations */ +/* */ +/*=======================================================================*/ +#ifndef __AUDIOP_H__ +#define __AUDIOP_H__ + +int play_nas_wave(EST_Wave &inwave, EST_Option &al); +int play_esd_wave(EST_Wave &inwave, EST_Option &al); +int play_sun16_wave(EST_Wave &inwave, EST_Option &al); +int play_linux_wave(EST_Wave &inwave, EST_Option &al); +int play_mplayer_wave(EST_Wave &inwave, EST_Option &al); +int play_win32audio_wave(EST_Wave &inwave, EST_Option &al); +int play_irix_wave(EST_Wave &inwave, EST_Option &al); +int play_macosx_wave(EST_Wave &inwave, EST_Option &al); + +int record_nas_wave(EST_Wave &inwave, EST_Option &al); +int record_esd_wave(EST_Wave &inwave, EST_Option &al); +int record_sun16_wave(EST_Wave &inwave, EST_Option &al); +int record_linux_wave(EST_Wave &inwave, EST_Option &al); + +#endif /* __AUDIOP_H__ */ diff --git a/audio/esd.cc b/audio/esd.cc new file mode 100644 index 0000000..277652f --- /dev/null +++ b/audio/esd.cc @@ -0,0 +1,168 @@ + /*************************************************************************/ + /* */ + /* Centre for Speech Technology Research */ + /* University of Edinburgh, UK */ + /* Copyright (c) 1995,1996 */ + /* 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 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 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 : Richard Caley */ + /* ------------------------------------------------------------------- */ + /* EST audio module using the enlightenment speech daemon. */ + /* */ + /*************************************************************************/ + + +#include +#include +#include +#include +#include +#include "EST_Wave.h" +#include "EST_Option.h" +#include "audioP.h" +#include "EST_io_aux.h" + +#ifdef SUPPORT_ESD + +// Hack hack. aupvlist.h is broken at least on FBSD 3.1.1 + +#undef __cplusplus + +extern "C" +{ +#include +} +#define __cplusplus + +#include + +#define au_serverrate 16000 + +bool esd_supported = TRUE; + +static int endian_int = 1; +#define ESD_BIG_ENDIAN (((char *)&endian_int)[0] == 0) + +EST_String server; + +void get_server(EST_Option &al) +{ + if (al.present("-display")) + { + EST_String display = al.val("-display"); + if (display.contains(":")) + { + server = display.before(":"); + } + else + { + server = display; + } + } + else + server = ""; +} + +int play_esd_wave(EST_Wave &inwave, EST_Option &al) +{ + + get_server(al); + + int format; + + switch (inwave.num_channels()) + { + case 1: format=ESD_MONO; + break; + + case 2: format=ESD_STEREO; + break; + + default: + cerr << "EST: " << inwave.num_channels() << " channel data not supported\n"; + return -1; + } + + format |= ESD_BITS16 | ESD_STREAM | ESD_PLAY; + + int sample_rate = inwave.sample_rate(); + + int esd = esd_play_stream( format, sample_rate, + server==EST_String::Empty?NULL:(const char *)server, "from est"); + + int n = inwave.num_samples() * sizeof(short) * inwave.num_channels(); + int nw=0, tot=0; + const char *data = (const char *)(inwave.values().memory()); + + while(n > 0 && (nw = write(esd, data+tot, n)) >0) + { + n -= nw; + tot+=nw; + } + + if (nw < 0) + { + cerr << "ESD: error writing - " << strerror(errno) << "\n"; + } + + esd_close(esd); + + return 1; +} + +int record_esd_wave(EST_Wave &wave, EST_Option &al) +{ + (void)wave; + (void)al; + + cerr << "ESD: record not written yet\n"; + return -1; +} + +#else +int esd_supported = FALSE; + +int play_esd_wave(EST_Wave &inwave, EST_Option &al) +{ + (void)inwave; + (void)al; + cerr << "ESD playback not supported" << endl; + return -1; +} + + +int record_esd_wave(EST_Wave &wave, EST_Option &al) +{ + (void)wave; + (void)al; + cerr << "ESD record not supported" << endl; + return -1; +} + +#endif diff --git a/audio/gen_audio.cc b/audio/gen_audio.cc new file mode 100644 index 0000000..985324a --- /dev/null +++ b/audio/gen_audio.cc @@ -0,0 +1,377 @@ +/*************************************************************************/ +/* */ +/* Centre for Speech Technology Research */ +/* University of Edinburgh, UK */ +/* Copyright (c) 1995,1996 */ +/* 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 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 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 : Paul Taylor */ +/* Date : March 95 */ +/*-----------------------------------------------------------------------*/ +/* Generalised playback function */ +/* */ +/*=======================================================================*/ + +#include +#include +#include +#include +#include +#include "EST_system.h" +#include "EST_socket.h" +#include "EST_Option.h" +#include "EST_Wave.h" +#include "EST_io_aux.h" +#include "audioP.h" +#include "EST_audio.h" +#include "EST_wave_aux.h" + +static int play_sunau_wave(EST_Wave &inwave, EST_Option &al); +static int play_socket_wave(EST_Wave &inwave, EST_Option &al); +static int play_aucomm_wave(EST_Wave &inwave, EST_Option &al); + +static int record_sunau_wave(EST_Wave &wave, EST_Option &al); + +int play_wave(EST_Wave &inwave, EST_Option &al) +{ + EST_String protocol; + EST_Wave wtmp; + EST_Wave *toplay; + char *quality; + char *sr; + + if ((sr = getenv("NA_PLAY_HOST")) != NULL) + if (!al.present("-display")) + al.add_item("-display", sr); + + if ((quality = getenv("NA_PLAY_QUALITY")) != NULL) + if (!al.present("-quality")) + al.add_item("-quality", quality); + + if (al.present("-p")) + protocol = al.val("-p"); + else if ((sr=getenv("NA_PLAY_PROTOCOL")) != NULL) + protocol = sr; + else if (protocol == "") + { + if (nas_supported) + protocol = "netaudio"; // the default protocol + else if (esd_supported) + protocol = "esdaudio"; + else if (sun16_supported) + protocol = "sun16audio"; + else if (freebsd16_supported) + protocol = "freebsd16audio"; + else if (linux16_supported) + protocol = "linux16audio"; + else if (irix_supported) + protocol = "irixaudio"; + else if (macosx_supported) + protocol = "macosxaudio"; + else if (win32audio_supported) + protocol = "win32audio"; + else if (mplayer_supported) + protocol = "mplayeraudio"; + else + protocol = "sunaudio"; + } + + // OS X can handle multichannel audio, don't know about other systems. + if (inwave.num_channels() > 1 && upcase(protocol) != "MACOSXAUDIO" ) + { + wave_combine_channels(wtmp,inwave); + toplay = &wtmp; + } + else + toplay = &inwave; + + if (upcase(protocol) == "NETAUDIO") + return play_nas_wave(*toplay,al); + else if (upcase(protocol) == "ESDAUDIO") + return play_esd_wave(*toplay,al); + else if (upcase(protocol) == "SUNAUDIO") + return play_sunau_wave(*toplay,al); + else if (upcase(protocol) == "SUN16AUDIO") + return play_sun16_wave(*toplay,al); + else if ((upcase(protocol) == "FREEBSD16AUDIO") || + (upcase(protocol) == "LINUX16AUDIO")) + return play_linux_wave(*toplay,al); + else if (upcase(protocol) == "IRIXAUDIO") + return play_irix_wave(*toplay,al); + else if (upcase(protocol) == "MACOSXAUDIO") + return play_macosx_wave(*toplay,al); + else if (upcase(protocol) == "MPLAYERAUDIO") + return play_mplayer_wave(*toplay,al); + else if (upcase(protocol) == "WIN32AUDIO") + return play_win32audio_wave(*toplay,al); + else if (upcase(protocol) == "AUDIO_COMMAND") + return play_aucomm_wave(*toplay,al); + else if (upcase(protocol) == "SOCKET") + return play_socket_wave(*toplay,al); + else + { + cerr << "Unknown audio server protocol " << protocol << endl; + return -1; + } +} + +static int play_socket_wave(EST_Wave &inwave, EST_Option &al) +{ + // Send inwave down the given fd (a socket) + SOCKET_FD fd; + EST_String otype; + EST_String tmpfile = make_tmp_filename(); + + if (al.present("socket_fd")) + fd = al.ival("socket_fd"); + else + { + cerr << "Socket audio mode: no socket_fd specified" << endl; + return -1; + } + + if (al.present("socket_otype")) + otype = al.val("socket_otype"); // file type to send to client + else + otype = "riff"; + + inwave.save(tmpfile,otype); + + // Because the client may receive many different types of file + // I send WV\n to it before the file itself + send(fd,"WV\n",3,0); + socket_send_file(fd,tmpfile); + unlink(tmpfile); + + return 0; +} + +static int play_aucomm_wave(EST_Wave &inwave, EST_Option &al) +{ + // Play wave by specified command + EST_String usrcommand, otype; + char tmpfile[2048]; + char pref[2048]; + + if (al.present("-command")) + usrcommand = al.val("-command"); + else if (getenv("NA_PLAY_COMMAND") != NULL) + usrcommand = getenv("NA_PLAY_COMMAND"); + else + { + cerr << "Audio protocol set to COMMAND but no command specified\n"; + return -1; + } + + sprintf(tmpfile,"/tmp/audiofile_%05ld",(long)getpid()); + + if (al.present("-rate")) + inwave.resample(al.ival("-rate")); + if (al.present("-otype")) + otype = al.val("-otype"); + else + otype = "raw"; + + if (inwave.save(tmpfile,otype) != write_ok) + { + cerr << "Audio writing file \"" << tmpfile << "\" in type \"" << + otype << " failed " << endl; + return -1; + } + + sprintf(pref,"FILE=%s;SR=%d;",tmpfile,inwave.sample_rate()); + + system((EST_String)pref+usrcommand.unquote('"')); + + unlink(tmpfile); // so we don't fill up /tmp + + return 0; +} + +static int play_sunau_wave(EST_Wave &inwave, EST_Option &al) +{ + // Play wave through /dev/audio using 8K ulaw encoding + // works for Suns as well as Linux and FreeBSD machines + int rcode; + const char *audiodevice; + + inwave.resample(8000); + + if (al.present("-audiodevice")) + audiodevice = al.val("-audiodevice"); + else + audiodevice = "/dev/audio"; + + // Should really do something cute about checking if /dev/audio + // is not in use + rcode = inwave.save(audiodevice,"ulaw"); + + return rcode; + +} + +EST_String options_supported_audio(void) +{ + // returns list of supported audio types + EST_String audios = ""; + + audios += "sunaudio"; // we always support this in spite of the hardware + + audios += " audio_command"; + if (nas_supported) + audios += " netaudio"; + else if (esd_supported) + audios += " esdaudio"; + if (sun16_supported) + audios += " sun16audio"; + if (freebsd16_supported) + audios += " freebsd16audio"; + if (linux16_supported) + audios += " linux16audio"; + if (irix_supported) + audios += " irixaudio"; + if (mplayer_supported) + audios += " mplayeraudio"; + if (macosx_supported) + audios += "macosxaudio"; + if (win32audio_supported) + audios += " win32audio"; + if (os2audio_supported) + audios += " os2audio"; + + return audios; +} + +int record_wave(EST_Wave &wave, EST_Option &al) +{ + // Record wave from audio device + char *sr; + EST_String protocol; + + // For archaic reasons, if you are using NAS use DISPLAY or + // AUDIOSERVER + if ((sr = getenv("NA_PLAY_HOST")) != NULL) + if (!al.present("-display")) + al.add_item("-display", sr); + + if (al.present("-p")) + protocol = al.val("-p"); + else if ((sr=getenv("NA_PLAY_PROTOCOL")) != NULL) + protocol = sr; + else if (protocol == "") + { + if (nas_supported) + protocol = "netaudio"; // the default protocol + else if (esd_supported) + protocol = "esdaudio"; // the default protocol + else if (sun16_supported) + protocol = "sun16audio"; + else if (freebsd16_supported) + protocol = "freebsd16audio"; + else if (linux16_supported) + protocol = "linux16audio"; + else if (irix_supported) + protocol = "irixaudio"; + else if (win32audio_supported) + protocol = "win32audio"; + else if (mplayer_supported) + protocol = "mplayeraudio"; + else + protocol = "sunaudio"; + } + + if (upcase(protocol) == "NETAUDIO") + return record_nas_wave(wave,al); + else if (upcase(protocol) == "ESDAUDIO") + return record_esd_wave(wave,al); + else if (upcase(protocol) == "SUN16AUDIO") + return record_sun16_wave(wave,al); + else if ((upcase(protocol) == "FREEBSD16AUDIO") || + (upcase(protocol) == "LINUX16AUDIO")) + return record_linux_wave(wave,al); + else if (upcase(protocol) == "SUNAUDIO") + return record_sunau_wave(wave,al); + else + { + cerr << "NA_RECORD: \"" << protocol << + "\" EST current has no record support" << endl; + return -1; + } +} + +static int record_sunau_wave(EST_Wave &wave, EST_Option &al) +{ + int num_samples,i,r,n; + int audio; + unsigned char *ulawwave; + short *waveform; + const int AUDIOBUFFSIZE = 256; + const char *audiodevice; + + if (al.present("-audiodevice")) + audiodevice = al.val("-audiodevice"); + else + audiodevice = "/dev/audio"; + + if ((audio = open(audiodevice, O_RDONLY)) == -1) + { + cerr << "SUN16: can't open " << audiodevice << " for reading" << endl; + return -1; + } + + num_samples = (int)(8000*al.fval("-time")); + ulawwave = walloc(unsigned char,num_samples); + + for (r=i=0; i < num_samples; i+= r) + { + if (num_samples > i+AUDIOBUFFSIZE) + n = AUDIOBUFFSIZE; + else + n = num_samples-i; + r = read(audio,&ulawwave[i], n); + if (r <= 0) + { + cerr << "sunaudio: failed to read from audio device" << endl; + close(audio); + wfree(ulawwave); + return -1; + } + } + + wave.resize(num_samples); + wave.set_sample_rate(8000); + waveform = wave.values().memory(); + + ulaw_to_short(ulawwave,waveform,num_samples); + wave.resample(al.ival("-sample_rate")); + + close(audio); + wfree(ulawwave); + return 0; +} + diff --git a/audio/irixaudio.cc b/audio/irixaudio.cc new file mode 100644 index 0000000..0afecde --- /dev/null +++ b/audio/irixaudio.cc @@ -0,0 +1,96 @@ +/*************************************************************************/ +/* Author : Theo Veenker (Utrecht University) */ +/* Date : September 1997 */ +/*-----------------------------------------------------------------------*/ +/* Optional 16bit linear support for audio on IRIS 4D workstations */ +/* */ +/*=======================================================================*/ + +#include +#include +#include +#include +#include "EST_unix.h" +#include "EST_cutils.h" +#include "EST_Wave.h" +#include "EST_Option.h" +#include "audioP.h" +#include "EST_io_aux.h" + +#if defined (SUPPORT_IRIX) || defined (SUPPORT_IRIX53) +#include +#include + +int irix_supported = TRUE; + +int play_irix_wave(EST_Wave &inwave, EST_Option &al) +{ + int sample_rate; + short *waveform; + int num_samples; + ALconfig config; + ALport port; + int r; + (void)al; + + waveform = inwave.values().memory(); + num_samples = inwave.num_samples(); + sample_rate = inwave.sample_rate(); + + config = ALnewconfig(); + ALsetsampfmt(config, AL_SAMPFMT_TWOSCOMP); + ALsetwidth(config, AL_SAMPLE_16); + ALsetchannels(config, AL_MONO); + + long pvbuf[2]; + pvbuf[0] = AL_OUTPUT_RATE; + pvbuf[1] = sample_rate; + ALsetparams(AL_DEFAULT_DEVICE, pvbuf, 2); + +/* + ALgetparams(AL_DEFAULT_DEVICE, pvbuf, 2); + if (pvbuf[1] != sample_rate) + { + cerr << "IRIX: sample rate " << sample_rate << + " not supported; using " << pvbuf[1] << endl; + } +*/ + + port = ALopenport("speech-tools", "w", config); + if (!port) + { + cerr << "IRIX: can't open audio port" << endl; + ALfreeconfig(config); + return -1; + } + + r = ALwritesamps(port, waveform, num_samples); + if (r != 0) + cerr << "IRIX: failed to write to buffer" << endl; + + // Wait until all samples are played. + // IRIX 5.3 doesn't have usleep +#ifdef SUPPORT_IRIX53 + while (ALgetfilled(port)) sginap(1); +#elseif + while (ALgetfilled(port)) usleep(10000); +#endif + + ALcloseport(port); + ALfreeconfig(config); + + return 1; +} + +#else +int irix_supported = FALSE; + +int play_irix_wave(EST_Wave &inwave, EST_Option &al) +{ + (void)inwave; + (void)al; + cerr << "IRIX 16bit linear not supported" << endl; + return -1; +} + +#endif diff --git a/audio/linux_sound.cc b/audio/linux_sound.cc new file mode 100644 index 0000000..f530964 --- /dev/null +++ b/audio/linux_sound.cc @@ -0,0 +1,953 @@ +/*************************************************************************/ +/* */ +/* Centre for Speech Technology Research */ +/* University of Edinburgh, UK */ +/* Copyright (c) 1997,1998 */ +/* 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 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 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 */ +/* Date : July 1997 */ +/*-----------------------------------------------------------------------*/ +/* Optional support for /dev/dsp under FreeBSD and Linux */ +/* These use the same underlying sound drivers (voxware). This uses */ +/* 16bit linear if the device supports it otherwise it uses 8bit. The */ +/* 8bit driver is still better than falling back to the "sunaudio" ulaw */ +/* 8K as this driver can cope with various sample rates (and saves on */ +/* resampling). */ +/* */ +/* Combined FreeBSD and Voxware code Feb 98 */ +/* */ +/* This may work on NetBSD and OpenBSD but I haven't tried it */ +/* */ +/*=======================================================================*/ + +#include +#include +#include +#include +#include +#include "EST_cutils.h" +#include "EST_walloc.h" +#include "EST_Wave.h" +#include "EST_wave_aux.h" +#include "EST_Option.h" +#include "audioP.h" +#include "EST_io_aux.h" +#include "EST_error.h" + +#ifdef SUPPORT_FREEBSD16 +#include +#include +int freebsd16_supported = TRUE; +int linux16_supported = FALSE; +static char *aud_sys_name = "FreeBSD"; +#endif /*SUPPORT_FREEBSD16 */ + +#ifdef SUPPORT_VOXWARE + +#include +#include +#include +#include +#include +int linux16_supported = TRUE; +int freebsd16_supported = FALSE; +static const char *aud_sys_name = "Linux"; +static int stereo_only = 0; + +// Code to block signals while sound is playing. +// Needed inside Java on (at least some) linux systems +// as scheduling interrupts seem to break the writes. + +#if defined(SUPPORT_LINUX16) || defined(SUPPORT_FREEBSD16) + +#include +#include + +#define THREAD_DECS() \ + sigset_t oldmask \ + +#define THREAD_PROTECT() do { \ + sigset_t newmask; \ + \ + sigfillset(&newmask); \ + \ + pthread_sigmask(SIG_BLOCK, &newmask, &oldmask); \ + } while(0) + +#define THREAD_UNPROTECT() do { \ + pthread_sigmask(SIG_SETMASK, &oldmask, NULL); \ + } while (0) + +#else +#define THREAD_DECS() //empty +#define THREAD_PROTECT() //empty +#define THREAD_UNPROTECT() //empty +#endif /* LINUX_16/FREEBSD16 */ + +static int sb_set_sample_rate(int sbdevice, int samp_rate) +{ + int fmt; + int sfmts; + int stereo=0; + int sstereo; + int channels=1; + + ioctl(sbdevice,SNDCTL_DSP_RESET,0); + ioctl(sbdevice,SNDCTL_DSP_SPEED,&samp_rate); + sstereo = stereo; + ioctl(sbdevice,SNDCTL_DSP_STEREO,&sstereo); + /* Some devices don't do mono even when you ask them nicely */ + if (sstereo != stereo) + stereo_only = 1; + ioctl(sbdevice,SNDCTL_DSP_CHANNELS,&channels); + ioctl(sbdevice,SNDCTL_DSP_GETFMTS,&sfmts); + + if (sfmts == AFMT_U8) + fmt = AFMT_U8; // its really an 8 bit only device + else if (EST_LITTLE_ENDIAN) + fmt = AFMT_S16_LE; + else + fmt = AFMT_S16_BE; + + ioctl(sbdevice,SNDCTL_DSP_SETFMT,&fmt); + + return fmt; +} + +#define AUDIOBUFFSIZE 256 +// #define AUDIOBUFFSIZE 20480 + +int play_linux_wave(EST_Wave &inwave, EST_Option &al) +{ + int sample_rate; + short *waveform; + short *waveform2 = 0; + int num_samples; + int audio,actual_fmt; + int i,r,n; + const char *audiodevice; + + if (al.present("-audiodevice")) + audiodevice = al.val("-audiodevice"); + else + audiodevice = "/dev/dsp"; + + if ((audio = open(audiodevice,O_WRONLY)) == -1) + { + cerr << aud_sys_name << ": can't open " << audiodevice << endl; + return -1; + } + + // int tmp=open("/tmp/vox_play_wave",O_WRONLY|O_CREAT); + + waveform = inwave.values().memory(); + num_samples = inwave.num_samples(); + sample_rate = inwave.sample_rate(); + + actual_fmt = sb_set_sample_rate(audio,sample_rate); + + if (stereo_only) + { + waveform2 = walloc(short,num_samples*2); + for (i=0; i i+AUDIOBUFFSIZE) + n = AUDIOBUFFSIZE; + else + n = num_samples-i; + // r = write(tmp,&uchars[i], n); + r = write(audio,&uchars[i], n); + if (r == 0) + { + THREAD_UNPROTECT(); + cerr << aud_sys_name << ": failed to write to buffer" << + sample_rate << endl; + close(audio); + return -1; + } + } + wfree(uchars); + } + else if ((actual_fmt == AFMT_S16_LE) || + (actual_fmt == AFMT_S16_BE)) + { + int blksize, nbuf, c; + short *buf; + + ioctl (audio, SNDCTL_DSP_GETBLKSIZE, &blksize); + nbuf=blksize; + buf=new short[nbuf]; + + for (i=0; i < num_samples; i += r/2) + { + if (num_samples > i+nbuf) + n = nbuf; + else + n = num_samples-i; + + for(c=0; c i+AUDIOBUFFSIZE) + n = AUDIOBUFFSIZE; + else + n = num_samples-i; + r = read(audio,&waveform2[i], n*2); + r /= 2; + if (r <= 0) + { + cerr << aud_sys_name << ": failed to read from audio device" + << endl; + close(audio); + return -1; + } + } + + } + else if (actual_fmt == AFMT_U8) + { + inwave.resize((int)(sample_rate*al.fval("-time"))); + inwave.set_sample_rate(sample_rate); + num_samples = inwave.num_samples(); + waveform = inwave.values().memory(); + unsigned char *u8wave = walloc(unsigned char,num_samples); + + for (i=0; i < num_samples; i+= r) + { + if (num_samples > i+AUDIOBUFFSIZE) + n = AUDIOBUFFSIZE; + else + n = num_samples-i; + r = read(audio,&u8wave[i],n); + if (r <= 0) + { + cerr << aud_sys_name << ": failed to read from audio device" + << endl; + close(audio); + wfree(u8wave); + return -1; + } + + } + uchar_to_short(u8wave,waveform,num_samples); + wfree(u8wave); + } + else + { + cerr << aud_sys_name << ": unknown audio format from device: " << + actual_fmt << endl; + close(audio); + return -1; + } + + if (stereo_only) + { + for (i=0; i +#include +#include +#include +#include +static const char *aud_sys_name = "ALSALINUX"; + +// Code to block signals while sound is playing. +// Needed inside Java on (at least some) linux systems +// as scheduling interrupts seem to break the writes. + +int linux16_supported = TRUE; +int freebsd16_supported = FALSE; + +#ifdef THREAD_SAFETY +#include +#include + +#define THREAD_DECS() \ + sigset_t oldmask \ + +#define THREAD_PROTECT() do { \ + sigset_t newmask; \ + \ + sigfillset(&newmask); \ + \ + pthread_sigmask(SIG_BLOCK, &newmask, &oldmask); \ + } while(0) + +#define THREAD_UNPROTECT() do { \ + pthread_sigmask(SIG_SETMASK, &oldmask, NULL); \ + } while (0) + +#else +#define THREAD_DECS() //empty +#define THREAD_PROTECT() //empty +#define THREAD_UNPROTECT() //empty +#endif /* THREAD_SAFETY */ + +static const char *pcm_dev_name ="default"; + +typedef enum { + CST_AUDIO_LINEAR16 = 0, + CST_AUDIO_LINEAR8, + CST_AUDIO_MULAW +} cst_audiofmt; + +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; + +static int audio_bps(cst_audiofmt fmt) +{ + switch (fmt) + { + case CST_AUDIO_LINEAR16: + return 2; + case CST_AUDIO_LINEAR8: + case CST_AUDIO_MULAW: + return 1; + } + return 0; +} + +static inline void print_pcm_state(snd_pcm_t *handle, char *msg) +{ + fprintf(stderr, "PCM state at %s = %s\n", msg, + snd_pcm_state_name(snd_pcm_state(handle))); +} + +cst_audiodev *audio_open_alsa(int sps, int channels, cst_audiofmt fmt) +{ + cst_audiodev *ad; + unsigned int real_rate; + int err; + + /* alsa specific stuff */ + snd_pcm_t *pcm_handle; + snd_pcm_stream_t stream = SND_PCM_STREAM_PLAYBACK; + snd_pcm_hw_params_t *hwparams; + snd_pcm_format_t format; + snd_pcm_access_t access = SND_PCM_ACCESS_RW_INTERLEAVED; + + /* Allocate the snd_pcm_hw_params_t structure on the stack. */ + snd_pcm_hw_params_alloca(&hwparams); + + /* Open pcm device */ + err = snd_pcm_open(&pcm_handle, pcm_dev_name, stream, 0); + if (err < 0) + { + EST_warning("audio_open_alsa: failed to open audio device %s. %s\n", + pcm_dev_name, snd_strerror(err)); + return NULL; + } + + /* Init hwparams with full configuration space */ + err = snd_pcm_hw_params_any(pcm_handle, hwparams); + if (err < 0) + { + snd_pcm_close(pcm_handle); + EST_warning("audio_open_alsa: failed to get hardware parameters from audio device. %s\n", snd_strerror(err)); + return NULL; + } + + /* Set access mode */ + err = snd_pcm_hw_params_set_access(pcm_handle, hwparams, access); + if (err < 0) + { + snd_pcm_close(pcm_handle); + EST_warning("audio_open_alsa: failed to set access mode. %s.\n", snd_strerror(err)); + return NULL; + } + + /* Determine matching alsa sample format */ + /* This could be implemented in a more */ + /* flexible way (byte order conversion). */ + switch (fmt) + { + case CST_AUDIO_LINEAR16: + if (EST_LITTLE_ENDIAN) + format = SND_PCM_FORMAT_S16_LE; + else + format = SND_PCM_FORMAT_S16_BE; + break; + case CST_AUDIO_LINEAR8: + format = SND_PCM_FORMAT_U8; + break; + case CST_AUDIO_MULAW: + format = SND_PCM_FORMAT_MU_LAW; + break; + default: + snd_pcm_close(pcm_handle); + EST_warning("audio_open_alsa: failed to find suitable format.\n"); + return NULL; + break; + } + + /* Set samble format */ + err = snd_pcm_hw_params_set_format(pcm_handle, hwparams, format); + if (err <0) + { + snd_pcm_close(pcm_handle); + EST_warning("audio_open_alsa: failed to set format. %s.\n", snd_strerror(err)); + return NULL; + } + + /* Set sample rate near the disired rate */ + real_rate = sps; + err = snd_pcm_hw_params_set_rate_near(pcm_handle, hwparams, &real_rate, 0); + if (err < 0) + { + snd_pcm_close(pcm_handle); + EST_warning("audio_open_alsa: failed to set sample rate near %d. %s.\n", sps, snd_strerror(err)); + return NULL; + } + + /* Set number of channels */ + assert(channels >0); + err = snd_pcm_hw_params_set_channels(pcm_handle, hwparams, channels); + if (err < 0) + { + snd_pcm_close(pcm_handle); + EST_warning("audio_open_alsa: failed to set number of channels to %d. %s.\n", channels, snd_strerror(err)); + return NULL; + } + + /* Commit hardware parameters */ + err = snd_pcm_hw_params(pcm_handle, hwparams); + if (err < 0) + { + snd_pcm_close(pcm_handle); + EST_warning("audio_open_alsa: failed to set hw parameters. %s.\n", snd_strerror(err)); + return NULL; + } + + /* Make sure the device is ready to accept data */ + assert(snd_pcm_state(pcm_handle) == SND_PCM_STATE_PREPARED); + + /* Write hardware parameters to flite audio device data structure */ + ad = walloc(cst_audiodev, 1); + assert(ad != NULL); + ad->real_sps = ad->sps = sps; + ad->real_channels = ad->channels = channels; + ad->real_fmt = ad->fmt = fmt; + ad->platform_data = (void *) pcm_handle; + + return ad; +} + +int audio_close_alsa(cst_audiodev *ad) +{ + int result; + snd_pcm_t *pcm_handle; + + if (ad == NULL) + return 0; + + pcm_handle = (snd_pcm_t *) ad->platform_data; + + snd_pcm_drain(pcm_handle); /* wait for current stuff in buffer to finish */ + + result = snd_pcm_close(pcm_handle); + if (result < 0) + { + EST_warning("audio_close_alsa: Error: %s.\n", snd_strerror(result)); + } + wfree(ad); + return result; +} + +/* Returns zero if recovery was successful. */ +static int recover_from_error(snd_pcm_t *pcm_handle, ssize_t res) +{ + if (res == -EPIPE) /* xrun */ + { + res = snd_pcm_prepare(pcm_handle); + if (res < 0) + { + /* Failed to recover from xrun */ + EST_warning("recover_from_write_error: failed to recover from xrun. %s\n.", snd_strerror(res)); + return res; + } + } + else if (res == -ESTRPIPE) /* Suspend */ + { + while ((res = snd_pcm_resume(pcm_handle)) == -EAGAIN) + { + snd_pcm_wait(pcm_handle, 1000); + } + if (res < 0) + { + res = snd_pcm_prepare(pcm_handle); + if (res <0) + { + /* Resume failed */ + EST_warning("audio_recover_from_write_error: failed to resume after suspend. %s\n.", snd_strerror(res)); + return res; + } + } + } + else if (res < 0) + { + /* Unknown failure */ + EST_warning("audio_recover_from_write_error: %s.\n", snd_strerror(res)); + return res; + } + return 0; +} + +int audio_write_alsa(cst_audiodev *ad, void *samples, int num_bytes) +{ + size_t frame_size; + ssize_t num_frames, res; + snd_pcm_t *pcm_handle; + char *buf = (char *) samples; + + /* Determine frame size in bytes */ + frame_size = audio_bps(ad->real_fmt) * ad->real_channels; + /* Require that only complete frames are handed in */ + assert((num_bytes % frame_size) == 0); + num_frames = num_bytes / frame_size; + pcm_handle = (snd_pcm_t *) ad->platform_data; + + while (num_frames > 0) + { + res = snd_pcm_writei(pcm_handle, buf, num_frames); + if (res != num_frames) + { + if (res == -EAGAIN || (res > 0 && res < num_frames)) + { + snd_pcm_wait(pcm_handle, 100); + } + else if (recover_from_error(pcm_handle, res) < 0) + { + return -1; + } + } + + if (res >0) + { + num_frames -= res; + buf += res * frame_size; + } + } + return num_bytes; +} + +int audio_flush_alsa(cst_audiodev *ad) +{ + int result; + result = snd_pcm_drain((snd_pcm_t *) ad->platform_data); + if (result < 0) + { + EST_warning("audio_flush_alsa: Error: %s.\n", snd_strerror(result)); + } + /* Prepare device for more data */ + result = snd_pcm_prepare((snd_pcm_t *) ad->platform_data); +if (result < 0) + { + EST_warning("audio_flush_alsa: Error: %s.\n", snd_strerror(result)); + } + return result; +} + +int audio_drain_alsa(cst_audiodev *ad) +{ + int result; + result = snd_pcm_drop((snd_pcm_t *) ad->platform_data); + if (result < 0) + { + EST_warning("audio_drain_alsa: Error: %s.\n", snd_strerror(result)); + } +/* Prepare device for more data */ + result = snd_pcm_prepare((snd_pcm_t *) ad->platform_data); +if (result < 0) + { + EST_warning("audio_drain_alsa: Error: %s.\n", snd_strerror(result)); + } + return result; +} + +#define AUDIOBUFFSIZE 256 +// #define AUDIOBUFFSIZE 20480 + +int play_linux_wave(EST_Wave &inwave, EST_Option &al) +{ + int sample_rate; + short *waveform; + int num_samples; + const char *audiodevice; + cst_audiodev *ad; + + if (al.present("-audiodevice")) + audiodevice = al.val("-audiodevice"); + else + audiodevice = "/dev/dsp"; + + waveform = inwave.values().memory(); + num_samples = inwave.num_samples(); + sample_rate = inwave.sample_rate(); + + ad = audio_open_alsa(sample_rate,1,CST_AUDIO_LINEAR16); + + THREAD_DECS(); + THREAD_PROTECT(); + + audio_write_alsa(ad,waveform,num_samples*sizeof(short)); + + audio_close_alsa(ad); + + THREAD_UNPROTECT(); + return 1; +} + +int record_linux_wave(EST_Wave &inwave, EST_Option &al) +{ +#if 0 + int sample_rate=16000; // egcs needs the initialized for some reason + short *waveform; + short *waveform2=0; + int num_samples; + int audio=-1,actual_fmt; + int i,r,n; + char *audiodevice; + + if (al.present("-audiodevice")) + audiodevice = al.val("-audiodevice"); + else + audiodevice = "/dev/dsp"; + + sample_rate = al.ival("-sample_rate"); + + if ((audio = open(audiodevice,O_RDONLY)) == -1) + { + cerr << aud_sys_name << ": can't open " << audiodevice + << "for reading" << endl; + return -1; + } + + actual_fmt = sb_set_sample_rate(audio,sample_rate); + + if ((actual_fmt == AFMT_S16_LE) || + (actual_fmt == AFMT_S16_BE)) + { + // We assume that the device returns audio in native byte order + // by default + inwave.resize((int)(sample_rate*al.fval("-time"))); + inwave.set_sample_rate(sample_rate); + num_samples = inwave.num_samples(); + waveform = inwave.values().memory(); + + if (stereo_only) + { + waveform2 = walloc(short,num_samples*2); + num_samples *= 2; + } + else + waveform2 = waveform; + + for (i=0; i < num_samples; i+= r) + { + if (num_samples > i+AUDIOBUFFSIZE) + n = AUDIOBUFFSIZE; + else + n = num_samples-i; + r = read(audio,&waveform2[i], n*2); + r /= 2; + if (r <= 0) + { + cerr << aud_sys_name << ": failed to read from audio device" + << endl; + close(audio); + return -1; + } + } + + } + else if (actual_fmt == AFMT_U8) + { + inwave.resize((int)(sample_rate*al.fval("-time"))); + inwave.set_sample_rate(sample_rate); + num_samples = inwave.num_samples(); + waveform = inwave.values().memory(); + unsigned char *u8wave = walloc(unsigned char,num_samples); + + for (i=0; i < num_samples; i+= r) + { + if (num_samples > i+AUDIOBUFFSIZE) + n = AUDIOBUFFSIZE; + else + n = num_samples-i; + r = read(audio,&u8wave[i],n); + if (r <= 0) + { + cerr << aud_sys_name << ": failed to read from audio device" + << endl; + close(audio); + wfree(u8wave); + return -1; + } + + } + uchar_to_short(u8wave,waveform,num_samples); + wfree(u8wave); + } + else + { + cerr << aud_sys_name << ": unknown audio format from device: " << + actual_fmt << endl; + close(audio); + return -1; + } + + if (stereo_only) + { + for (i=0; i + +int freebsd16_supported = FALSE; +int linux16_supported = TRUE; + +static const char *aud_sys_name = "PULSEAUDIO"; + +#define AUDIOBUFFSIZE 256 +// #define AUDIOBUFFSIZE 20480 + +int play_linux_wave(EST_Wave &inwave, EST_Option &al) +{ + pa_sample_spec *ss; + pa_simple *s; + short *waveform; + int num_samples; + int err=0, i, r; + + ss = walloc(pa_sample_spec,1); + ss->rate = inwave.sample_rate(); + ss->channels = inwave.num_channels(); + + if (EST_BIG_ENDIAN) + ss->format = PA_SAMPLE_S16BE; + else + ss->format = PA_SAMPLE_S16LE; + + s = pa_simple_new( + NULL, /* use default server */ + "festival", + PA_STREAM_PLAYBACK, + NULL, /* use default device */ + "Speech", + ss, + NULL, /* default channel map */ + NULL, /* default buffering attributes */ + &err); + if (err < 0) + return NULL; + + waveform = inwave.values().memory(); + num_samples = inwave.num_samples(); + + for (i=0; i < num_samples; i += AUDIOBUFFSIZE/2) + { + if (i + AUDIOBUFFSIZE/2 < num_samples) + pa_simple_write(s,&waveform[i],(size_t)AUDIOBUFFSIZE,&err); + else + pa_simple_write(s,&waveform[i],(size_t)(num_samples-i)*2,&err); + } + + pa_simple_drain(s,&err); + pa_simple_free(s); + wfree(ss); + + return 1; +} + +int record_linux_wave(EST_Wave &inwave, EST_Option &al) +{ + return -1; +} + +#else /* not supported */ + +int freebsd16_supported = FALSE; +int linux16_supported = FALSE; + +int play_linux_wave(EST_Wave &inwave, EST_Option &al) +{ + (void)inwave; + (void)al; + cerr << "MacOS X audio support not compiled." << endl; + return -1; +} +int record_linux_wave(EST_Wave &inwave, EST_Option &al) +{ + (void)inwave; + (void)al; + cerr << "MacOS X audio support not compiled." << endl; + return -1; +} + +#endif /* ALSA */ +#endif /* PULSEAUDIO */ +#endif /* VOXWARE */ + diff --git a/audio/macosxaudio.cc b/audio/macosxaudio.cc new file mode 100644 index 0000000..8a3d68f --- /dev/null +++ b/audio/macosxaudio.cc @@ -0,0 +1,227 @@ +/*************************************************************************/ +/* */ +/* Centre for Speech Technology Research */ +/* University of Edinburgh, UK */ +/* Copyright (c) 1996-2009 */ +/* All Rights Reserved. */ +/* */ +/* Permission is hereby granted, free of charge, to use and distribute */ +/* this software and its documentation without restriction, including */ +/* without limitation the rights to use, copy, modify, merge, publish, */ +/* distribute, sublicense, and/or sell copies of this work, and to */ +/* permit persons to whom this work is furnished to do so, subject to */ +/* the following conditions: */ +/* 1. The code must retain the above copyright notice, this list of */ +/* conditions and the following disclaimer. */ +/* 2. Any modifications must be clearly marked as such. */ +/* 3. Original authors' names are not deleted. */ +/* 4. The authors' names are not used to endorse or promote products */ +/* derived from this software without specific prior written */ +/* permission. */ +/* */ +/* THE UNIVERSITY OF EDINBURGH 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 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 : Brian Foley */ +/* bfoley@compsoc.nuigalway.ie */ +/* Date : February 2004 */ +/*************************************************************************/ +/* OSX 10.6 updates */ +/* Author : Rob Clark */ +/* robert@cstr.ed.ac.uk */ +/* Date : Jan 2009 */ +/*=======================================================================*/ +#include "EST_unix.h" +#include "EST_cutils.h" +#include "EST_Wave.h" +#include "EST_Option.h" +#include "audioP.h" + +#if defined (SUPPORT_MACOSX_AUDIO) + +#include +#include +#include +#include +#include + +int macosx_supported = TRUE; + +AudioUnit outau; +EST_SMatrix *waveMatrix; +UInt32 waveSize; +UInt32 waveIndex; +bool done; + +OSStatus render_callback(void *inref, + AudioUnitRenderActionFlags *inflags, + const AudioTimeStamp *instamp, + UInt32 inbus, + UInt32 inframes, + AudioBufferList *ioData) +{ + + // fill each channel with available audio data + + UInt32 channels = ioData->mNumberBuffers; + int totalNumberOfBytes = waveSize; + int channelBytesLeft = totalNumberOfBytes - waveIndex; + int bufferSize = ioData->mBuffers[0].mDataByteSize; + + if(channelBytesLeft > 0) { + if(channelBytesLeft < bufferSize) { + for(UInt32 i = 0; i < channels; ++i) { + waveMatrix->copy_column((int)i, (int short*)ioData->mBuffers[i].mData, waveIndex/2, channelBytesLeft/2); + memset((char*)ioData->mBuffers[i].mData + channelBytesLeft, 0, bufferSize - channelBytesLeft) ; + } + waveIndex += channelBytesLeft; + } else { + for(UInt32 i = 0; i < channels; ++i) + waveMatrix->copy_column((int)i, (int short*)ioData->mBuffers[i].mData, waveIndex/2, bufferSize/2); + waveIndex += bufferSize; + } + } else { + for(UInt32 i = 0; i < channels; ++i) + memset(ioData->mBuffers[i].mData, 0, ioData->mBuffers[i].mDataByteSize); + done = TRUE; + } + + return noErr; +} + + +void CreateDefaultAU() +{ + OSStatus err = noErr; + + // Open the default output unit + ComponentDescription desc; + desc.componentType = kAudioUnitType_Output; + desc.componentSubType = kAudioUnitSubType_DefaultOutput; + desc.componentManufacturer = kAudioUnitManufacturer_Apple; + desc.componentFlags = 0; + desc.componentFlagsMask = 0; + + Component comp = FindNextComponent(NULL, &desc); + if (comp == NULL) { printf ("FindNextComponent\n"); return; } + + err = OpenAComponent(comp, &outau); + if (comp == NULL) { printf ("OpenAComponent=%ld\n", long(err)); return; } + + // Set up render callback + AURenderCallbackStruct input; + input.inputProc = render_callback; + input.inputProcRefCon = NULL; + + err = AudioUnitSetProperty (outau, + kAudioUnitProperty_SetRenderCallback, + kAudioUnitScope_Input, + 0, + &input, + sizeof(input)); + if (err) { printf ("AudioUnitSetProperty-CB=%ld\n", long(err)); return; } + +} + +int play_macosx_wave(EST_Wave &inwave, EST_Option &al) +{ + OSStatus err; + AudioStreamBasicDescription waveformat, outformat; + UInt32 size = sizeof(AudioStreamBasicDescription); + UInt32 running; + + CreateDefaultAU(); + + // The EST_Wave structure will allow us to access individula channels + // so this is set up using kAudioFormatFlagIsNonInterleaved format. + // Here the per packet and per frame info is per channel. + waveformat.mSampleRate = (Float64)inwave.sample_rate(); + waveformat.mFormatID = kAudioFormatLinearPCM; + waveformat.mFormatFlags = kLinearPCMFormatFlagIsSignedInteger + | kAudioFormatFlagsNativeEndian + | kLinearPCMFormatFlagIsPacked + | kAudioFormatFlagIsNonInterleaved; + waveformat.mFramesPerPacket = 1; + waveformat.mChannelsPerFrame = inwave.num_channels(); + waveformat.mBytesPerPacket = 2; + waveformat.mBytesPerFrame = 2; + waveformat.mBitsPerChannel = 16; + + err = AudioUnitSetProperty(outau, + kAudioUnitProperty_StreamFormat, + kAudioUnitScope_Input, + 0, + &waveformat, + size); + if (err != noErr) { + cerr << "Error setting input audio stream format." << endl; + CloseComponent(outau); + return -1; + } + + err = AudioUnitGetProperty(outau, + kAudioUnitProperty_StreamFormat, + kAudioUnitScope_Output, + 0, + &outformat, + &size); + if (err != noErr) { + cerr << "Error getting output audio stream format." << endl; + CloseComponent(outau); + return -1; + } + + err = AudioUnitInitialize(outau); + if (err) { + printf ("AudioUnitInitialize=%ld\n", long(err)); + return -1; + } + + // set up for playing + waveSize = inwave.num_samples()*sizeof(short); + waveMatrix = &inwave.values(); + done = FALSE; + waveIndex = 0; + + err = AudioOutputUnitStart(outau); + if (err != noErr) { + cerr << "Error starting audio outup: " << err << endl; + CloseComponent(outau); + return -1; + } + + // Poll every 50ms whether the sound has stopped playing yet. + // Probably not the best way of doing things. + size = sizeof(UInt32); + do { + usleep(50 * 1000); + err = AudioUnitGetProperty(outau, kAudioOutputUnitProperty_IsRunning, + kAudioUnitScope_Global, 0, &running, &size); + } while (err == noErr && running && !done); + + CloseComponent (outau); + + return 1; +} + +#else + +int macosx_supported = FALSE; + +int play_macosx_wave(EST_Wave &inwave, EST_Option &al) +{ + (void)inwave; + (void)al; + cerr << "OS X Core Audio in not supported in this configuration." << endl; + return -1; +} + +#endif \ No newline at end of file diff --git a/audio/mplayer.cc b/audio/mplayer.cc new file mode 100644 index 0000000..60d1480 --- /dev/null +++ b/audio/mplayer.cc @@ -0,0 +1,106 @@ +/*************************************************************************/ +/* */ +/* Centre for Speech Technology Research */ +/* University of Edinburgh, UK */ +/* Copyright (c) 1995,1996 */ +/* 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 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 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 : Richard Caley */ +/* Date : August 1997 */ +/*-----------------------------------------------------------------------*/ +/* Optional 16bit linear support for Windows NT/95 */ +/* */ +/*=======================================================================*/ + +#include +#include "EST_cutils.h" +#include "EST_Wave.h" +#include "EST_Option.h" +#include "EST_io_aux.h" +#include "EST_Pathname.h" + +#ifdef SUPPORT_MPLAYER + +int mplayer_supported = TRUE; + +static EST_Pathname tempfile; +static EST_Pathname temppath; +static EST_Pathname tempdir; + +static void find_tempfile(void) +{ + const char *s=NULL; + + if (!(s=getenv("TMP"))) + if (!(s=getenv("TMPDIR"))) + if (!(s=getenv("TEMPDIR"))) + s="\tmp"; + + tempdir = s; + + char buffer[512]; + sprintf(buffer, "est%4d.wav", getpid()); + tempfile = buffer; + temppath = EST_Pathname::append(tempdir.as_directory(), tempfile); +} + +int play_mplayer_wave(EST_Wave &inwave, EST_Option &al) +{ + + if (tempfile == "") + find_tempfile(); + + inwave.save(temppath, "riff"); + + char command[1000]; + + sprintf(command, + "mplayer /play %s\\%s", + (const char *)tempdir, + (const char *)tempfile); + + cout << "command '" << command <<"'\n"; + system(command); + + unlink(temppath); + + return 1; +} + +#else +int mplayer_supported = FALSE; + +int play_mplayer_wave(EST_Wave &inwave, EST_Option &al) +{ + (void)inwave; + (void)al; + cerr << "Windows mplayer not supported" << endl; + return -1; +} + +#endif diff --git a/audio/nas.cc b/audio/nas.cc new file mode 100644 index 0000000..11ce2fb --- /dev/null +++ b/audio/nas.cc @@ -0,0 +1,185 @@ +/*************************************************************************/ +/* */ +/* Centre for Speech Technology Research */ +/* University of Edinburgh, UK */ +/* Copyright (c) 1995,1996 */ +/* 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 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 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 : Paul Taylor & Alan Black */ +/* Date : April 1995 & 96 */ +/*-----------------------------------------------------------------------*/ +/* Playback function for NCD's NAS server (formerly called netaudio) */ +/* */ +/*=======================================================================*/ + +#include +#include +#include +#include +#include +#include "EST_Wave.h" +#include "EST_Option.h" +#include "audioP.h" +#include "EST_io_aux.h" + +#ifdef SUPPORT_NAS +#include