initial import

This commit is contained in:
2025-06-22 20:39:04 -05:00
commit f8a70886f0
3428 changed files with 302546 additions and 0 deletions

168
festival/PKGBUILD Normal file
View File

@@ -0,0 +1,168 @@
# Maintainer: Jesus E. <heckyel@riseup.net>
pkgname=festival
pkgver=2.4
pkgrel=5
pkgdesc="A general multi-lingual speech synthesis system (including voices)"
arch=(i686 x86_64)
url='http://www.cstr.ed.ac.uk/projects/festival/'
license=(custom:Festival)
depends=(perl sndio)
options=('!makeflags')
source=(http://www.cstr.ed.ac.uk/downloads/${pkgname}/${pkgver}/$pkgname-$pkgver-release.tar.gz
http://www.cstr.ed.ac.uk/downloads/${pkgname}/${pkgver}/speech_tools-$pkgver-release.tar.gz
http://www.cstr.ed.ac.uk/downloads/${pkgname}/${pkgver}/festlex_CMU.tar.gz
http://www.cstr.ed.ac.uk/downloads/${pkgname}/${pkgver}/festlex_OALD.tar.gz
http://www.cstr.ed.ac.uk/downloads/${pkgname}/${pkgver}/festlex_POSLEX.tar.gz
http://www.cstr.ed.ac.uk/downloads/${pkgname}/${pkgver}/voices/festvox_cmu_us_awb_cg.tar.gz
http://www.cstr.ed.ac.uk/downloads/${pkgname}/${pkgver}/voices/festvox_cmu_us_rms_cg.tar.gz
http://www.cstr.ed.ac.uk/downloads/${pkgname}/${pkgver}/voices/festvox_cmu_us_slt_cg.tar.gz
http://www.cstr.ed.ac.uk/downloads/${pkgname}/${pkgver}/voices/festvox_kallpc16k.tar.gz
http://www.cstr.ed.ac.uk/downloads/${pkgname}/${pkgver}/voices/festvox_rablpc16k.tar.gz
festival-without-java.patch
festival-config.patch
festival-2.4-compat.patch
festival-shared-build.patch
festival-sndio.patch
speech_tools-without-java.patch
speech_tools-config.patch
speech_tools-shared-build.patch
speech_tools-gcc47.patch
speech_tools-sndio.patch)
sha512sums=('7c8eb6812c587623ea0877d5c792418ace2787f71087929d867adc4714ba13612da6e431dde89ca234330a83bf76519306c1302623e837a6fbfa4c4416b32231'
'e6931216069fd3ea791ad22f8657fddd73b18296221e12cbbdf9241d2efda7821ea80a549e595151343533039107a00f939b52f7dc1034a6d9cf2f57d7baefa7'
'c293344020fd3337193303cd5dfb7e2b0a1012770a484d8bccaae921b0c61b75699204bec45fee0db754506d6f1558fd616866cc94e76afcbb85a4dcbcf9542b'
'dc7ec5db71ef331f4c4460a741392d548e037369d47080dc734e912aa312bd5c11e66cdcb94bdc4746a3f6c16c0e0294ce159f07b46e350b85c0afab07cc2064'
'd7f96621fd98bcd3c84f0188fc6ac5a006e2cbb535279693be3341d51148344360f68e67962f08c4041df1e3527de9b30705b13fb9859ad91e3c804704eb5348'
'edb4008606afc72802b265a503d1f6a37fc8f99bd21f6aaa72a06a970f86858da17c0857ce423356f0a432b19ada87778e0a88f6ecb9aeb66ae42a41c06e0494'
'b0a519a654e349b49b627bb35384dadde8e44c4af43a4df7f8126c1535fe5838d8d2cd13fc9813cad7ec4dd92ae018c6090ca453d0e6a1c470ccf839faf21125'
'b02da2a5a17e0341cbd0d692021b8cb44cd3bfd3e6a60a06c5a22004ce2ad135efba64df75f4c8479a4cd2da15fd733165bce89972ae206c3e11b543150a69e4'
'e7155a8df1305fc80a0b7f97e07b74f2d687ce93f89dc74b4ab3653a369629b956491381a1f4613e531570cc688480b151b2e60fd5b8f9755c641648dc72d3bc'
'a8962a8187e83c4419414e7ef5953a8a1ed1b65a7d5a9dea3722185a4fb660727897e7dca9f6ccddf4fefc85d9d757dcb444a6ac08328b7dc94624ffff24f5a6'
'ad42dd594d86f71e6abcaae541334a18cfd3cc929301b27176590fb57d1486d106d595c6ea9ac259c089b58b035259ebfc1f80761c01010f7744aeb9cc93c833'
'25b75692e5ab8a18bc4500d573e2bdb3fbd543b5238d5ec7346c5199695a2b543cea8ffe4bd70e64e2f51563fc2daed9b551afd4170c8db08275fa7e70b6c882'
'26f60c777e8062ec23b9e19a4ff48bd3425a7686ebcabb2d1cae0f13351e3b2ccae9d0d4996291b55548a75df6d7750e2f127ff2faf3a8a86a01fb141c0e8b16'
'5271eb4eb92a43b1b44cea01f473ed1012f216bbb86c6213be69fbeb565ecba76859a3c5ec9f5cfa87764dc073fc5c0d80d082721c256ee977c050682ca7c87f'
'4a8cd2a3cac554cf4862a08e0c78f757228262087b4e9033565c68d7a0e278a529b2ae5d7e9e48017f8fd71f1351bc761a6f01728656433c029f51e8b492f730'
'5683178c8e88abae20fef22a78621d0c50ac5265d711b21c233fb9e6a2e28db9a470e56efaa26a0d77380458f45b410024af8586e47a7b128dcef7f5efb7bb1c'
'64bafc35935e83dc31c1377c8fb528c2f72fcfabd1b6cf2cec216584677e04304437eea375d1847f9bc0e1aafa7f769d4bf2e83b8d539995f56b32eccd7c6982'
'16e007d4f8b3cae113933434bad580fe9a1b52473ad77f98236e9a88ec225f91dbe26364899ba620c4b064164abedcff0a190c768835e67ae160f210f1cdaded'
'c71bedc38425a59f7ebb42eaa39e40ac7755260d93c52d478e8bc11ed9a50b686189077672953a656bce11522d7b7ced3919854499fe41a19053c9e1a619e7b3'
'b2a43d5979cc544f89f7e2f4bf0bb4825e021e160cfe0bc0c864477618033bc2778f7f256cffba51b49b179b5fc67f86647587c63d4b39092ffc467b54cb2074')
prepare() {
# Remove Java support
patch -Np0 -i festival-without-java.patch
patch -Np0 -i speech_tools-without-java.patch
# Fix config files
patch -Np0 -i festival-config.patch
patch -Np0 -i speech_tools-config.patch
patch -Np0 -i festival-2.4-compat.patch
# Fix build with new gcc versions and build shared libs - taken from Mageia
patch -Np0 -i festival-shared-build.patch
patch -Np0 -i speech_tools-shared-build.patch
patch -Np0 -i speech_tools-gcc47.patch
# Add sndio support
patch -Np0 -i festival-sndio.patch
patch -Np0 -i speech_tools-sndio.patch
# Avoid make failure on making scripts and docs
sed -i "s#examples bin doc#examples#" festival/Makefile
}
build() {
# Build Speech Tools first
cd speech_tools
./configure --prefix=/usr --sysconfdir=/etc
make OPTIMISE_CXXFLAGS="${CXXFLAGS} -fno-strict-aliasing -fno-delete-null-pointer-checks -std=gnu++98" OPTIMISE_CCFLAGS="${CFLAGS} -fno-strict-aliasing"
# Build Festival itself
cd ../festival
./configure --prefix=/usr --sysconfdir=/etc
make OPTIMISE_CXXFLAGS="${CXXFLAGS} -fno-delete-null-pointer-checks -std=gnu++98" OPTIMISE_CCFLAGS="${CFLAGS}"
}
package() {
# Install Speech Tools first
cd speech_tools
install -dm755 "$pkgdir"/usr/{bin,lib,include/speech_tools/{,instantiate,ling_class,rxp,sigpr,unix}}
# binaries
#move binaries over wrappers (FS#7864)
for i in $(grep -l 'EST shared script' bin/*); do
cp -f main/$(basename $i) bin;
done
install -m755 -t "$pkgdir"/usr/bin bin/[a-z]*
rm -f "$pkgdir"/usr/bin/{est_gdb,est_examples,est_program}
# libraries
install -m755 -t "$pkgdir"/usr/lib lib/lib*.so.*
ln -sf libestbase.so.${pkgver}.1 "$pkgdir"/usr/lib/libestbase.so
ln -sf libestools.so.${pkgver}.1 "$pkgdir"/usr/lib/libestools.so
ln -sf libeststring.so.1.2 "$pkgdir"/usr/lib/libeststring.so
# headers
for dir in {.,instantiate,ling_class,rxp,sigpr,unix}; do
install -m644 -t "$pkgdir"/usr/include/speech_tools/$dir include/$dir/*.h
done
# Install Festival itself
cd "$srcdir"/festival
# binaries
install -m755 src/main/festival "$pkgdir"/usr/bin/
install -m755 src/main/festival_client "$pkgdir"/usr/bin/
install -m755 examples/benchmark "$pkgdir"/usr/bin/
install -m755 examples/dumpfeats "$pkgdir"/usr/bin/
install -m755 examples/durmeanstd "$pkgdir"/usr/bin/
install -m755 examples/latest "$pkgdir"/usr/bin/
install -m755 examples/make_utts "$pkgdir"/usr/bin/
install -m755 examples/powmeanstd "$pkgdir"/usr/bin/
install -m755 examples/run-festival-script "$pkgdir"/usr/bin/
install -m755 examples/saytime "$pkgdir"/usr/bin/
install -m755 examples/scfg_parse_text "$pkgdir"/usr/bin/
install -m755 examples/text2pos "$pkgdir"/usr/bin/
install -m755 examples/text2wave "$pkgdir"/usr/bin
# libraries
install -m755 src/lib/libFestival.so.* "$pkgdir"/usr/lib/
ln -sf libFestival.so.2.4.0 "$pkgdir"/usr/lib/libFestival.so
# headers
install -dm755 "$pkgdir"/usr/include/festival
install -m644 -t "$pkgdir"/usr/include/festival src/include/*.h
mkdir -p "$pkgdir"/usr/share/festival
cp -aR lib/* "$pkgdir"/usr/share/festival
rm -fv $(find "$pkgdir"/usr/share/festival -name Makefile)
rm -fv $(find "$pkgdir"/usr/bin -name Makefile)
# create voices directory and include initial data
install -dm755 "$pkgdir"/usr/share/festival/voices
cp -rf lib/voices/us "$pkgdir/usr/share/festival/voices/"
cp -rf lib/voices/english "$pkgdir/usr/share/festival/voices/"
# licenses
install -D -m644 "$srcdir"/festival/COPYING \
"$pkgdir"/usr/share/licenses/$pkgname/LICENSE
install -D -m644 "$srcdir"/speech_tools/README \
"$pkgdir"/usr/share/licenses/$pkgname/LICENSE.other
# some general cleanups
for i in $(find "$pkgdir"/usr/include/ -type f); do
sed -i -e 's,"EST.*\.h",\<speech_tools/&\>,g' -e 's,speech_tools/\",speech_tools/,g' \
-e 's,"siod.*\.h",\<speech_tools/&\>,g' -e 's,speech_tools/\",speech_tools/,g' \
-e 's,"instantiate/.*\.h",\<speech_tools/&\>,g' -e 's,speech_tools/instantiate/\",speech_tools/instantiate/,g' -e 's,"instantiate,instantiate,g' \
-e 's,"ling_class/.*\.h",\<speech_tools/&\>,g' -e 's,speech_tools/ling_class/\",speech_tools/ling_class/,g' -e 's,"ling_class,ling_class,g' \
-e 's,"rxp/.*\.h",\<speech_tools/&\>,g' -e 's,speech_tools/rxp/\",speech_tools/rxp/,g' -e 's,"rxp,rxp,g' \
-e 's,"sigpr/.*\.h",\<speech_tools/&\>,g' -e 's,speech_tools/sigpr/\",speech_tools/sigpr/,g' -e 's,"sigpr,sigpr,g' \
-e 's,"unix/.*\.h",\<speech_tools/&\>,g' -e 's,speech_tools/unix/\",speech_tools/unix/,g' -e 's,\.h\">,.h\>,g' -e 's,"unix,unix,g' \
-e 's,"festival\.h",\<festival/festival.h\>,g' \
-e 's,"ModuleDescription\.h",\<festival/ModuleDescription.h\>,g' \
-e 's,"Phone\.h",\<festival/Phone.h\>,g' $i
done
}

View File

@@ -0,0 +1,369 @@
diff --git festival.orig/src/modules/clustergen/HTS_vocoder_me.cc festival/src/modules/clustergen/HTS_vocoder_me.cc
index 038bf53..e7dac19 100644
--- festival.orig/src/modules/clustergen/HTS_vocoder_me.cc
+++ festival/src/modules/clustergen/HTS_vocoder_me.cc
@@ -90,8 +90,9 @@
HTS_VOCODER_ME_C_START;
+#include <math.h>
#include "./HTS_vocoder_me.h"
-#include "../hts_engine/HTS_vocoder.c"
+#include "../hts_engine/HTS_vocoder.h"
/* HTS_Vocoder_initialize_me: initialize vocoder (mixed excitation) */
void HTS_Vocoder_initialize_me(HTS_Vocoder_ME * v_me,
diff --git festival.orig/src/modules/hts_engine/HTS_vocoder.c festival/src/modules/hts_engine/HTS_vocoder.c
index 3693584..e33cd82 100644
--- festival.orig/src/modules/hts_engine/HTS_vocoder.c
+++ festival/src/modules/hts_engine/HTS_vocoder.c
@@ -57,10 +57,12 @@ HTS_VOCODER_C_START;
#include <math.h> /* for sqrt(),log(),exp(),pow(),cos() */
+//#include "HTS_vocoder.h"
+
/* hts_engine libraries */
#include "HTS_hidden.h"
-static const double HTS_pade[21] = {
+const double HTS_pade[21] = {
1.00000000000,
1.00000000000,
0.00000000000,
@@ -85,7 +87,7 @@ static const double HTS_pade[21] = {
};
/* HTS_movem: move memory */
-static void HTS_movem(double *a, double *b, const int nitem)
+void HTS_movem(double *a, double *b, const int nitem)
{
long i = (long) nitem;
@@ -101,7 +103,7 @@ static void HTS_movem(double *a, double *b, const int nitem)
}
/* HTS_mlsafir: sub functions for MLSA filter */
-static double HTS_mlsafir(const double x, const double *b, const int m, const double a, const double aa, double *d)
+double HTS_mlsafir(const double x, const double *b, const int m, const double a, const double aa, double *d)
{
double y = 0.0;
int i;
@@ -122,7 +124,7 @@ static double HTS_mlsafir(const double x, const double *b, const int m, const do
}
/* HTS_mlsadf1: sub functions for MLSA filter */
-static double HTS_mlsadf1(double x, const double *b, const int m, const double a, const double aa, const int pd, double *d, const double *ppade)
+double HTS_mlsadf1(double x, const double *b, const int m, const double a, const double aa, const int pd, double *d, const double *ppade)
{
double v, out = 0.0, *pt;
int i;
@@ -144,7 +146,7 @@ static double HTS_mlsadf1(double x, const double *b, const int m, const double a
}
/* HTS_mlsadf2: sub functions for MLSA filter */
-static double HTS_mlsadf2(double x, const double *b, const int m, const double a, const double aa, const int pd, double *d, const double *ppade)
+double HTS_mlsadf2(double x, const double *b, const int m, const double a, const double aa, const int pd, double *d, const double *ppade)
{
double v, out = 0.0, *pt;
int i;
@@ -166,7 +168,7 @@ static double HTS_mlsadf2(double x, const double *b, const int m, const double a
}
/* HTS_mlsadf: functions for MLSA filter */
-static double HTS_mlsadf(double x, const double *b, const int m, const double a, const int pd, double *d)
+double HTS_mlsadf(double x, const double *b, const int m, const double a, const int pd, double *d)
{
const double aa = 1 - a * a;
const double *ppade = &(HTS_pade[pd * (pd + 1) / 2]);
@@ -178,7 +180,7 @@ static double HTS_mlsadf(double x, const double *b, const int m, const double a,
}
/* HTS_rnd: functions for random noise generation */
-static double HTS_rnd(unsigned long *next)
+double HTS_rnd(unsigned long *next)
{
double r;
@@ -189,7 +191,7 @@ static double HTS_rnd(unsigned long *next)
}
/* HTS_nrandom: functions for gaussian random noise generation */
-static double HTS_nrandom(HTS_Vocoder * v)
+double HTS_nrandom(HTS_Vocoder * v)
{
if (v->sw == 0) {
v->sw = 1;
@@ -207,7 +209,7 @@ static double HTS_nrandom(HTS_Vocoder * v)
}
/* HTS_mceq: function for M-sequence random noise generation */
-static int HTS_mseq(HTS_Vocoder * v)
+int HTS_mseq(HTS_Vocoder * v)
{
int x0, x28;
@@ -229,7 +231,7 @@ static int HTS_mseq(HTS_Vocoder * v)
}
/* HTS_mc2b: transform mel-cepstrum to MLSA digital fillter coefficients */
-static void HTS_mc2b(double *mc, double *b, int m, const double a)
+void HTS_mc2b(double *mc, double *b, int m, const double a)
{
if (mc != b) {
if (a != 0.0) {
@@ -244,7 +246,7 @@ static void HTS_mc2b(double *mc, double *b, int m, const double a)
}
/* HTS_b2bc: transform MLSA digital filter coefficients to mel-cepstrum */
-static void HTS_b2mc(const double *b, double *mc, int m, const double a)
+void HTS_b2mc(const double *b, double *mc, int m, const double a)
{
double d, o;
@@ -257,7 +259,7 @@ static void HTS_b2mc(const double *b, double *mc, int m, const double a)
}
/* HTS_freqt: frequency transformation */
-static void HTS_freqt(HTS_Vocoder * v, const double *c1, const int m1, double *c2, const int m2, const double a)
+void HTS_freqt(HTS_Vocoder * v, const double *c1, const int m1, double *c2, const int m2, const double a)
{
int i, j;
const double b = 1 - a * a;
@@ -287,7 +289,7 @@ static void HTS_freqt(HTS_Vocoder * v, const double *c1, const int m1, double *c
}
/* HTS_c2ir: The minimum phase impulse response is evaluated from the minimum phase cepstrum */
-static void HTS_c2ir(const double *c, const int nc, double *h, const int leng)
+void HTS_c2ir(const double *c, const int nc, double *h, const int leng)
{
int n, k, upl;
double d;
@@ -303,7 +305,7 @@ static void HTS_c2ir(const double *c, const int nc, double *h, const int leng)
}
/* HTS_b2en: calculate frame energy */
-static double HTS_b2en(HTS_Vocoder * v, const double *b, const int m, const double a)
+double HTS_b2en(HTS_Vocoder * v, const double *b, const int m, const double a)
{
int i;
double en = 0.0;
@@ -330,7 +332,7 @@ static double HTS_b2en(HTS_Vocoder * v, const double *b, const int m, const doub
}
/* HTS_ignorm: inverse gain normalization */
-static void HTS_ignorm(double *c1, double *c2, int m, const double g)
+void HTS_ignorm(double *c1, double *c2, int m, const double g)
{
double k;
if (g != 0.0) {
@@ -345,7 +347,7 @@ static void HTS_ignorm(double *c1, double *c2, int m, const double g)
}
/* HTS_gnorm: gain normalization */
-static void HTS_gnorm(double *c1, double *c2, int m, const double g)
+void HTS_gnorm(double *c1, double *c2, int m, const double g)
{
double k;
if (g != 0.0) {
@@ -360,7 +362,7 @@ static void HTS_gnorm(double *c1, double *c2, int m, const double g)
}
/* HTS_lsp2lpc: transform LSP to LPC */
-static void HTS_lsp2lpc(HTS_Vocoder * v, double *lsp, double *a, const int m)
+void HTS_lsp2lpc(HTS_Vocoder * v, double *lsp, double *a, const int m)
{
int i, k, mh1, mh2, flag_odd;
double xx, xf, xff;
@@ -451,7 +453,7 @@ static void HTS_lsp2lpc(HTS_Vocoder * v, double *lsp, double *a, const int m)
}
/* HTS_gc2gc: generalized cepstral transformation */
-static void HTS_gc2gc(HTS_Vocoder * v, double *c1, const int m1, const double g1, double *c2, const int m2, const double g2)
+void HTS_gc2gc(HTS_Vocoder * v, double *c1, const int m1, const double g1, double *c2, const int m2, const double g2)
{
int i, min, k, mk;
double ss1, ss2, cc;
@@ -484,7 +486,7 @@ static void HTS_gc2gc(HTS_Vocoder * v, double *c1, const int m1, const double g1
}
/* HTS_mgc2mgc: frequency and generalized cepstral transformation */
-static void HTS_mgc2mgc(HTS_Vocoder * v, double *c1, const int m1, const double a1, const double g1, double *c2, const int m2, const double a2, const double g2)
+void HTS_mgc2mgc(HTS_Vocoder * v, double *c1, const int m1, const double a1, const double g1, double *c2, const int m2, const double a2, const double g2)
{
double a;
@@ -502,7 +504,7 @@ static void HTS_mgc2mgc(HTS_Vocoder * v, double *c1, const int m1, const double
}
/* HTS_lsp2mgc: transform LSP to MGC */
-static void HTS_lsp2mgc(HTS_Vocoder * v, double *lsp, double *mgc, const int m, const double alpha)
+void HTS_lsp2mgc(HTS_Vocoder * v, double *lsp, double *mgc, const int m, const double alpha)
{
int i;
/* lsp2lpc */
@@ -531,7 +533,7 @@ static void HTS_lsp2mgc(HTS_Vocoder * v, double *lsp, double *mgc, const int m,
}
/* HTS_mglsadff: sub functions for MGLSA filter */
-static double HTS_mglsadff(double x, const double *b, const int m, const double a, double *d)
+double HTS_mglsadff(double x, const double *b, const int m, const double a, double *d)
{
int i;
@@ -550,7 +552,7 @@ static double HTS_mglsadff(double x, const double *b, const int m, const double
}
/* HTS_mglsadf: sub functions for MGLSA filter */
-static double HTS_mglsadf(double x, const double *b, const int m, const double a, const int n, double *d)
+double HTS_mglsadf(double x, const double *b, const int m, const double a, const int n, double *d)
{
int i;
@@ -561,7 +563,7 @@ static double HTS_mglsadf(double x, const double *b, const int m, const double a
}
/* THS_check_lsp_stability: check LSP stability */
-static void HTS_check_lsp_stability(double *lsp, size_t m)
+void HTS_check_lsp_stability(double *lsp, size_t m)
{
size_t i, j;
double tmp;
@@ -595,7 +597,7 @@ static void HTS_check_lsp_stability(double *lsp, size_t m)
}
/* HTS_lsp2en: calculate frame energy */
-static double HTS_lsp2en(HTS_Vocoder * v, double *lsp, size_t m, double alpha)
+double HTS_lsp2en(HTS_Vocoder * v, double *lsp, size_t m, double alpha)
{
size_t i;
double en = 0.0;
@@ -632,7 +634,7 @@ static double HTS_lsp2en(HTS_Vocoder * v, double *lsp, size_t m, double alpha)
}
/* HTS_white_noise: return white noise */
-static double HTS_white_noise(HTS_Vocoder * v)
+double HTS_white_noise(HTS_Vocoder * v)
{
if (v->gauss)
return (double) HTS_nrandom(v);
@@ -641,7 +643,7 @@ static double HTS_white_noise(HTS_Vocoder * v)
}
/* HTS_ping_pulse: ping pulse using low-pass filter */
-static void HTS_ping_pulse(HTS_Vocoder * v, const int ping_place, const double p, const int nlpf, const double *lpf)
+void HTS_ping_pulse(HTS_Vocoder * v, const int ping_place, const double p, const int nlpf, const double *lpf)
{
int i, j;
const double power = sqrt(p);
@@ -652,7 +654,7 @@ static void HTS_ping_pulse(HTS_Vocoder * v, const int ping_place, const double p
}
/* HTS_ping_noise: ping noise using low-pass filter */
-static void HTS_ping_noise(HTS_Vocoder * v, const int ping_place, const int nlpf, const double *lpf)
+void HTS_ping_noise(HTS_Vocoder * v, const int ping_place, const int nlpf, const double *lpf)
{
int i, j;
const double power = HTS_white_noise(v);
@@ -667,7 +669,7 @@ static void HTS_ping_noise(HTS_Vocoder * v, const int ping_place, const int nlpf
}
/* HTS_Vocoder_initialize_excitation: initialize excitation */
-static void HTS_Vocoder_initialize_excitation(HTS_Vocoder * v, size_t nlpf)
+void HTS_Vocoder_initialize_excitation(HTS_Vocoder * v, size_t nlpf)
{
size_t i;
@@ -684,7 +686,7 @@ static void HTS_Vocoder_initialize_excitation(HTS_Vocoder * v, size_t nlpf)
}
/* HTS_Vocoder_start_excitation: start excitation of each frame */
-static void HTS_Vocoder_start_excitation(HTS_Vocoder * v, const double pitch, const int nlpf)
+void HTS_Vocoder_start_excitation(HTS_Vocoder * v, const double pitch, const int nlpf)
{
if (v->p1 != 0.0 && pitch != 0.0)
v->inc = (pitch - v->p1) * IPERIOD / v->fprd;
@@ -699,7 +701,7 @@ static void HTS_Vocoder_start_excitation(HTS_Vocoder * v, const double pitch, co
}
/* HTS_Vocoder_get_excitation: get excitation of each sample */
-static double HTS_Vocoder_get_excitation(HTS_Vocoder * v, const int fprd_index, const int iprd_index, const int nlpf, const double *lpf)
+double HTS_Vocoder_get_excitation(HTS_Vocoder * v, const int fprd_index, const int iprd_index, const int nlpf, const double *lpf)
{
double x;
int i, j;
@@ -755,7 +757,7 @@ static double HTS_Vocoder_get_excitation(HTS_Vocoder * v, const int fprd_index,
}
/* HTS_Vocoder_end_excitation: end excitation of each frame */
-static void HTS_Vocoder_end_excitation(HTS_Vocoder * v, const int nlpf)
+void HTS_Vocoder_end_excitation(HTS_Vocoder * v, const int nlpf)
{
int i;
@@ -771,7 +773,7 @@ static void HTS_Vocoder_end_excitation(HTS_Vocoder * v, const int nlpf)
}
/* HTS_Vocoder_postfilter_mcp: postfilter for MCP */
-static void HTS_Vocoder_postfilter_mcp(HTS_Vocoder * v, double *mcp, const int m, double alpha, double beta)
+void HTS_Vocoder_postfilter_mcp(HTS_Vocoder * v, double *mcp, const int m, double alpha, double beta)
{
double e1, e2;
int k;
@@ -797,7 +799,7 @@ static void HTS_Vocoder_postfilter_mcp(HTS_Vocoder * v, double *mcp, const int m
}
/* HTS_Vocoder_postfilter_lsp: postfilter for LSP */
-static void HTS_Vocoder_postfilter_lsp(HTS_Vocoder * v, double *lsp, size_t m, double alpha, double beta)
+void HTS_Vocoder_postfilter_lsp(HTS_Vocoder * v, double *lsp, size_t m, double alpha, double beta)
{
double e1, e2;
size_t i;
diff --git festival/src/modules/hts_engine/HTS_vocoder.h festival/src/modules/hts_engine/HTS_vocoder.h
new file mode 100644
index 0000000..f3dd9a6
--- /dev/null
+++ festival/src/modules/hts_engine/HTS_vocoder.h
@@ -0,0 +1,42 @@
+#ifndef HTS_VOCODER_H
+#define HTS_VOCODER_H
+
+/* hts_engine libraries */
+#include "HTS_hidden.h"
+
+void HTS_Vocoder_clear(HTS_Vocoder *v);
+void HTS_Vocoder_synthesize(HTS_Vocoder *v,size_t m,double lf0,double *spectrum,size_t nlpf,double *lpf,double alpha,double beta,double volume,double *rawdata,HTS_Audio *audio);
+void HTS_Vocoder_initialize(HTS_Vocoder *v,size_t m,size_t stage,HTS_Boolean use_log_gain,size_t rate,size_t fperiod);
+void HTS_Vocoder_postfilter_lsp(HTS_Vocoder *v,double *lsp,size_t m,double alpha,double beta);
+void HTS_Vocoder_postfilter_mcp(HTS_Vocoder *v,double *mcp,const int m,double alpha,double beta);
+void HTS_Vocoder_end_excitation(HTS_Vocoder *v,const int nlpf);
+double HTS_Vocoder_get_excitation(HTS_Vocoder *v,const int fprd_index,const int iprd_index,const int nlpf,const double *lpf);
+void HTS_Vocoder_start_excitation(HTS_Vocoder *v,const double pitch,const int nlpf);
+void HTS_Vocoder_initialize_excitation(HTS_Vocoder *v,size_t nlpf);
+void HTS_ping_noise(HTS_Vocoder *v,const int ping_place,const int nlpf,const double *lpf);
+void HTS_ping_pulse(HTS_Vocoder *v,const int ping_place,const double p,const int nlpf,const double *lpf);
+double HTS_white_noise(HTS_Vocoder *v);
+double HTS_lsp2en(HTS_Vocoder *v,double *lsp,size_t m,double alpha);
+void HTS_check_lsp_stability(double *lsp,size_t m);
+double HTS_mglsadf(double x,const double *b,const int m,const double a,const int n,double *d);
+double HTS_mglsadff(double x,const double *b,const int m,const double a,double *d);
+void HTS_lsp2mgc(HTS_Vocoder *v,double *lsp,double *mgc,const int m,const double alpha);
+void HTS_mgc2mgc(HTS_Vocoder *v,double *c1,const int m1,const double a1,const double g1,double *c2,const int m2,const double a2,const double g2);
+void HTS_gc2gc(HTS_Vocoder *v,double *c1,const int m1,const double g1,double *c2,const int m2,const double g2);
+void HTS_lsp2lpc(HTS_Vocoder *v,double *lsp,double *a,const int m);
+void HTS_gnorm(double *c1,double *c2,int m,const double g);
+void HTS_ignorm(double *c1,double *c2,int m,const double g);
+double HTS_b2en(HTS_Vocoder *v,const double *b,const int m,const double a);
+void HTS_c2ir(const double *c,const int nc,double *h,const int leng);
+void HTS_freqt(HTS_Vocoder *v,const double *c1,const int m1,double *c2,const int m2,const double a);
+void HTS_b2mc(const double *b,double *mc,int m,const double a);
+void HTS_mc2b(double *mc,double *b,int m,const double a);
+int HTS_mseq(HTS_Vocoder *v);
+double HTS_nrandom(HTS_Vocoder *v);
+double HTS_rnd(unsigned long *next);
+double HTS_mlsadf(double x,const double *b,const int m,const double a,const int pd,double *d);
+double HTS_mlsadf2(double x,const double *b,const int m,const double a,const double aa,const int pd,double *d,const double *ppade);
+double HTS_mlsadf1(double x,const double *b,const int m,const double a,const double aa,const int pd,double *d,const double *ppade);
+double HTS_mlsafir(const double x,const double *b,const int m,const double a,const double aa,double *d);
+void HTS_movem(double *a,double *b,const int nitem);
+#endif

View File

@@ -0,0 +1,81 @@
diff --git festival.orig/config/config.in festival/config/config.in
index d7a28e5..2c387d3 100644
--- festival.orig/config/config.in
+++ festival/config/config.in
@@ -20,7 +20,7 @@ EST=$(TOP)/../speech_tools
## You may need to set this explicitly if automounter or NFS
## side effects cause problems
-FESTIVAL_HOME := $(shell (cd $(TOP); pwd))
+FESTIVAL_HOME := /usr
###########################################################################
## Feature selection.
diff --git festival.orig/config/project.mak festival/config/project.mak
index 3f36fd6..1160732 100644
--- festival.orig/config/project.mak
+++ festival/config/project.mak
@@ -103,6 +103,5 @@ LIBRARY_TEMPLATE_DIRS_estools = $(LIBRARY_TEMPLATE_DIRS:%=$(EST)/%)
DOCXX_DIRS = $(TOP)/src
MODULE_TO_DOCXX = perl $(TOP)/src/modules/utilities/extract_module_doc++.prl
-FTLIBDIR = $(FESTIVAL_HOME)/lib
-
+FTLIBDIR = /usr/share/festival
diff --git festival.orig/config/systems/Linux.mak festival/config/systems/Linux.mak
index 7b7cb51..1fbba94 100644
--- festival.orig/config/systems/Linux.mak
+++ festival/config/systems/Linux.mak
@@ -41,7 +41,7 @@
include $(EST)/config/systems/default.mak
TCL_LIBRARY = -ltcl
-OS_LIBS = -ldl
+OS_LIBS = -ldl -lncurses
## the native audio module for this type of system
NATIVE_AUDIO_MODULE = LINUX16
diff --git festival.orig/config/systems/default.mak festival/config/systems/default.mak
index 602ff77..46ef454 100644
--- festival.orig/config/systems/default.mak
+++ festival/config/systems/default.mak
@@ -40,7 +40,7 @@
###########################################################################
## Installation directories
-INSTALL_PREFIX=/usr/local
+INSTALL_PREFIX=/usr
BINDIR=$(INSTALL_PREFIX)/bin
LIBDIR=$(INSTALL_PREFIX)/lib
@@ -63,8 +63,8 @@ NAS_LIB = /usr/X11R6/lib
###########################################################################
## Where to find Enlightenment Speech Demon
-ESD_INCLUDE = /usr/local/include
-ESD_LIB = /usr/local/lib
+ESD_INCLUDE = /usr/include
+ESD_LIB = /usr/lib
###########################################################################
## Where to find X11
@@ -75,14 +75,14 @@ X11_LIB = /usr/X11R6/lib
###########################################################################
## TCL support
-TCL_INCLUDE = /usr/local/include
-TCL_LIB = /usr/local/lib
-TCL_LIBRARY = -ltcl7.6
+TCL_INCLUDE = /usr/include
+TCL_LIB = /usr/lib
+TCL_LIBRARY = -ltcl
###########################################################################
## Efence library for malloc debugging
-EFENCE_LIB = /usr/local/lib
+EFENCE_LIB = /usr/lib
###########################################################################
## Commands.

View File

@@ -0,0 +1,13 @@
diff --git festival.orig/config/project.mak festival/config/project.mak
index 1160732..4b5f603 100644
--- festival.orig/config/project.mak
+++ festival/config/project.mak
@@ -80,6 +80,8 @@ PROJECT_LIBRARIES = Festival
PROJECT_LIBRARY_DIR_Festival = $(TOP)/src/lib
PROJECT_DEFAULT_LIBRARY = Festival
+PROJECT_LIBRARY_VERSION_Festival = $(PROJECT_VERSION).0
+
# Libraries used from other projects
REQUIRED_LIBRARIES = estools estbase eststring

View File

@@ -0,0 +1,57 @@
diff --git festival.orig/config/modules/Makefile festival/config/modules/Makefile
index b950f75..9595ef8 100644
--- festival.orig/config/modules/Makefile
+++ festival/config/modules/Makefile
@@ -40,7 +40,7 @@ DIRNAME=config/modules
RULESETS = efence.mak dmalloc.mak \
psola_tm.mak editline.mak tcl.mak \
freebsd16_audio.mak irix_audio.mak linux16_audio.mak \
- sun16_audio.mak win32_audio.mak macosx_audio.mak \
+ sun16_audio.mak win32_audio.mak macosx_audio.mak sndio_audio.mak \
mplayer_audio.mak nas_audio.mak esd_audio.mak native_audio.mak \
siod.mak wagon.mak scfg.mak wfst.mak ols.mak debugging.mak
diff --git festival/config/modules/sndio_audio.mak festival/config/modules/sndio_audio.mak
new file mode 100644
index 0000000..1f5d7d2
--- /dev/null
+++ festival/config/modules/sndio_audio.mak
@@ -0,0 +1,8 @@
+
+INCLUDE_SNDIO_AUDIO=1
+
+MOD_DESC_SNDIO_AUDIO=(from EST) Audio module for sndio audio support
+
+AUDIO_DEFINES += -DSUPPORT_SNDIO
+
+MODULE_LIBS += -lsndio
diff --git festival.orig/config/systems/Linux.mak festival/config/systems/Linux.mak
index 1fbba94..62a3d7b 100644
--- festival.orig/config/systems/Linux.mak
+++ festival/config/systems/Linux.mak
@@ -44,7 +44,7 @@ TCL_LIBRARY = -ltcl
OS_LIBS = -ldl -lncurses
## the native audio module for this type of system
-NATIVE_AUDIO_MODULE = LINUX16
+NATIVE_AUDIO_MODULE = SNDIO
## echo -n doesn't work
ECHO_N = /usr/bin/printf "%s"
diff --git festival.orig/lib/init.scm festival/lib/init.scm
index 90bccb7..fe785e3 100644
--- festival.orig/lib/init.scm
+++ festival/lib/init.scm
@@ -95,8 +95,10 @@
(Parameter.def 'Audio_Method 'os2audio))
((member 'mplayeraudio *modules*)
(Parameter.def 'Audio_Method 'mplayeraudio))
- (t ;; can't find direct support so guess that /dev/audio for 8k ulaw exists
- (Parameter.def 'Audio_Method 'sunaudio)))
+ ((member 'sndioaudio *modules*)
+ (Parameter.def 'Audio_Method 'sndioaudio))
+ (t ;; stupid crappy software. default to only supported "protocol"
+ (Parameter.def 'Audio_Method 'sndioaudio)))
;;; If you have an external program to play audio add its definition
;;; in siteinit.scm

View File

@@ -0,0 +1,104 @@
diff --git festival.orig/config/modules/linux16_audio.mak festival/config/modules/linux16_audio.mak
index e19ea82..a1eb469 100644
--- festival.orig/config/modules/linux16_audio.mak
+++ festival/config/modules/linux16_audio.mak
@@ -51,7 +51,3 @@ endif
ifeq ($(LINUXAUDIO),none)
AUDIO_DEFINES += -DSUPPORT_VOXWARE
endif
-
-ifdef INCLUDE_JAVA_CPP
- MODULE_LIBS += -lpthread
-endif
diff --git festival.orig/config/project.mak festival/config/project.mak
index 6456309..3f36fd6 100644
--- festival.orig/config/project.mak
+++ festival/config/project.mak
@@ -52,9 +52,6 @@ PROJECT_OTHER_CONFIGS = $(EST)/config/config
MODULE_DIRECTORY = $(TOP)/src/modules
-DISTRIBUTED_MODULES = \
- JAVA
-
DEVELOPMENT_MODULES = RJC_SYNTHESIS \
UNISYN_PHONOLOGY
@@ -101,12 +98,6 @@ PROJECT_TEMPLATE_DBS = $(TOP) $(EST)
LIBRARY_TEMPLATE_DIRS_estools = $(LIBRARY_TEMPLATE_DIRS:%=$(EST)/%)
-JAVA_CLASS_LIBRARY = $(TOP)/src/lib/festival.jar
-
-JAVA_CLASSPATH= $(TOP)/lib/festival.jar:$(EST_HOME)/lib/est_$(EST_JAVA_VERSION).jar:$(SYSTEM_JAVA_CLASSPATH)
-
-PROJECT_JAVA_ROOT=$(TOP)/src/modules/java
-
# Places to look for documentation
DOCXX_DIRS = $(TOP)/src
diff --git festival.orig/config/systems/Linux.mak festival/config/systems/Linux.mak
index 923c9a7..7b7cb51 100644
--- festival.orig/config/systems/Linux.mak
+++ festival/config/systems/Linux.mak
@@ -40,11 +40,6 @@
include $(EST)/config/systems/default.mak
-DEFAULT_JAVA_HOME=/usr/lib/jdk-1.1.6
-JAVA=/usr/bin/java
-JAVAC=/usr/bin/javac
-JAVAH=/usr/bin/javah
-
TCL_LIBRARY = -ltcl
OS_LIBS = -ldl
diff --git festival.orig/config/systems/default.mak festival/config/systems/default.mak
index 69e8835..602ff77 100644
--- festival.orig/config/systems/default.mak
+++ festival/config/systems/default.mak
@@ -139,6 +139,3 @@ DOCXX_ARGS = -a -f -B banner.inc -M sane -D 'SYSTEM "$(EST_HOME)/doc/sane.dtd"'
COMPILER_VERSION_COMMAND=true
-JAVA_COMPILER_VERSION_COMMAND=true
-
-JAVA_SYSTEM_INCLUDES = -I$(JAVA_HOME)/include/genunix
diff --git festival.orig/lib/Makefile festival/lib/Makefile
index bd89321..79176e4 100644
--- festival.orig/lib/Makefile
+++ festival/lib/Makefile
@@ -56,7 +56,7 @@ GENERAL = init.scm synthesis.scm module_description.scm \
voices.scm tts.scm festdoc.scm languages.scm token.scm \
mbrola.scm display.scm postlex.scm tokenpos.scm \
festtest.scm cslush.scm cart_aux.scm pauses.scm \
- scfg.scm mettree.scm java.scm clunits.scm clunits_build.scm \
+ scfg.scm mettree.scm clunits.scm clunits_build.scm \
siteinit.scm
HTS = hts.scm
OTHERS = Sable.v0_2.dtd sable-latin.ent festival.el scfg_wsj_wp20.gram \
diff --git festival.orig/src/modules/Makefile festival/src/modules/Makefile
index 555cb75..d493f92 100644
--- festival.orig/src/modules/Makefile
+++ festival/src/modules/Makefile
@@ -44,7 +44,7 @@ BASE_DIRS = Lexicon base Duration Intonation Text \
LIB_BUILD_DIRS = $(BASE_DIRS)
BUILD_DIRS = $(LIB_BUILD_DIRS)
-OPTIONAL = diphone clunits clustergen java rxp UniSyn_phonology MultiSyn hts_engine
+OPTIONAL = diphone clunits clustergen rxp UniSyn_phonology MultiSyn hts_engine
ALL_DIRS = $(BASE_DIRS) $(OPTIONAL)
diff --git festival.orig/src/scripts/Makefile festival/src/scripts/Makefile
index 89d3b43..684842a 100644
--- festival.orig/src/scripts/Makefile
+++ festival/src/scripts/Makefile
@@ -40,7 +40,6 @@
TOP=../..
DIRNAME=src/scripts
SCRIPTS= festival_server.sh festival_server_control.sh
-EXTRA_SCRIPTS = jsapi_example.sh festival_client_java.sh
FILES = Makefile shared_setup_sh shared_setup_prl shared_script $(SCRIPTS) $(EXTRA_SCRIPTS)
INSTALL =
ALL = $(SCRIPTS)

View File

@@ -0,0 +1,113 @@
diff --git speech_tools.orig/config/config.in speech_tools/config/config.in
index 1e24249..67fbf9f 100644
--- speech_tools.orig/config/config.in
+++ speech_tools/config/config.in
@@ -15,7 +15,7 @@
## You may need to set this explicitly if automounter or NFS
## side effects cause problems
-EST_HOME := $(shell (cd $(EST); pwd))
+EST_HOME := /usr
###########################################################################
## System type.
@@ -28,14 +28,14 @@ EST_HOME := $(shell (cd $(EST); pwd))
##
## Examples: sparc_SunOS5 intel_Linux2.0
-SYSTEM_TYPE=$(MACHINETYPE)_$(OSTYPE)$(OSREV)
+SYSTEM_TYPE=Linux
###########################################################################
## Compiler.
## The definitions are in compilers/$(COMPILER).mak
## Examples: gcc suncc egcs gcc28
-COMPILER=@COMPILERTYPE@
+COMPILER=gcc
###########################################################################
## Pre defined configurations (for directory locations, setup peculiarities
@@ -55,7 +55,7 @@ WARN=1
# VERBOSE=1
#DEBUG=1
# PROFILE=gprof
-#SHARED=2
+SHARED=2
## Directory specific selections which override the above
@@ -92,7 +92,7 @@ LINUXAUDIO = @LINUXAUDIO@
## It may not work under all systems, so may be optionally omitted.
INCLUDE_MODULES += EDITLINE
-TERMCAPLIB = @TERMCAPLIB@
+TERMCAPLIB =
# speech recognition
#INCLUDE_MODULES += ASR
@@ -152,7 +152,7 @@ INCLUDE_MODULES += RXP
CONFIG_WRAPPER_LANGUAGES = PYTHON
# Language specific includes should be set to correct site paths
-CONFIG_PYTHON_INCLUDES= -I/usr/include/python2.2/
+CONFIG_PYTHON_INCLUDES= -I/usr/include/python2.7/
##
###################################################################
diff --git speech_tools.orig/config/systems/Linux.mak speech_tools/config/systems/Linux.mak
index 7b7cb51..1fbba94 100644
--- speech_tools.orig/config/systems/Linux.mak
+++ speech_tools/config/systems/Linux.mak
@@ -41,7 +41,7 @@
include $(EST)/config/systems/default.mak
TCL_LIBRARY = -ltcl
-OS_LIBS = -ldl
+OS_LIBS = -ldl -lncurses
## the native audio module for this type of system
NATIVE_AUDIO_MODULE = LINUX16
diff --git speech_tools.orig/config/systems/default.mak speech_tools/config/systems/default.mak
index 24d6dea..937fb5c 100644
--- speech_tools.orig/config/systems/default.mak
+++ speech_tools/config/systems/default.mak
@@ -40,7 +40,7 @@
###########################################################################
## Installation directories
-INSTALL_PREFIX=/usr/local
+INSTALL_PREFIX=/usr
BINDIR=$(INSTALL_PREFIX)/bin
LIBDIR=$(INSTALL_PREFIX)/lib
@@ -63,8 +63,8 @@ NAS_LIB = /usr/X11R6/lib
###########################################################################
## Where to find Enlightenment Speech Demon
-ESD_INCLUDE = /usr/local/include
-ESD_LIB = /usr/local/lib
+ESD_INCLUDE = /usr/include
+ESD_LIB = /usr/lib
###########################################################################
## Where to find X11
@@ -75,14 +75,14 @@ X11_LIB = /usr/X11R6/lib
###########################################################################
## TCL support
-TCL_INCLUDE = /usr/local/include
-TCL_LIB = /usr/local/lib
-TCL_LIBRARY = -ltcl7.6
+TCL_INCLUDE = /usr/include
+TCL_LIB = /usr/lib
+TCL_LIBRARY = -ltcl
###########################################################################
## Efence library for malloc debugging
-EFENCE_LIB = /usr/local/lib
+EFENCE_LIB = /usr/lib
###########################################################################
## Commands.

View File

@@ -0,0 +1,51 @@
diff --git speech_tools.orig/base_class/EST_TSimpleMatrix.cc speech_tools/base_class/EST_TSimpleMatrix.cc
index 3a7c47e..7b8ffb1 100644
--- speech_tools.orig/base_class/EST_TSimpleMatrix.cc
+++ speech_tools/base_class/EST_TSimpleMatrix.cc
@@ -44,6 +44,7 @@
#include "EST_TVector.h"
#include <fstream>
#include <iostream>
+#include <cstring>
#include "EST_cutils.h"
#include <string.h>
@@ -52,7 +53,7 @@ void EST_TSimpleMatrix<T>::copy_data(const EST_TSimpleMatrix<T> &a)
{
if (!a.p_sub_matrix && !this->p_sub_matrix)
- memcpy((void *)&this->a_no_check(0,0),
+ std::memcpy((void *)&this->a_no_check(0,0),
(const void *)&a.a_no_check(0,0),
this->num_rows()*this->num_columns()*sizeof(T)
);
diff --git speech_tools.orig/base_class/EST_TSimpleVector.cc speech_tools/base_class/EST_TSimpleVector.cc
index 5539594..38b313c 100644
--- speech_tools.orig/base_class/EST_TSimpleVector.cc
+++ speech_tools/base_class/EST_TSimpleVector.cc
@@ -43,6 +43,7 @@
#include "EST_TSimpleVector.h"
#include "EST_matrix_support.h"
#include <fstream>
+#include <cstring>
#include "EST_cutils.h"
#include <string.h>
@@ -51,7 +52,7 @@ template<class T> void EST_TSimpleVector<T>::copy(const EST_TSimpleVector<T> &a)
if (this->p_column_step==1 && a.p_column_step==1)
{
resize(a.n(), FALSE);
- memcpy((void *)(this->p_memory), (const void *)(a.p_memory), this->n() * sizeof(T));
+ std::memcpy((void *)(this->p_memory), (const void *)(a.p_memory), this->n() * sizeof(T));
}
else
((EST_TVector<T> *)this)->copy(a);
@@ -141,7 +142,7 @@ template<class T> EST_TSimpleVector<T> &EST_TSimpleVector<T>::operator=(const ES
template<class T> void EST_TSimpleVector<T>::zero()
{
if (this->p_column_step==1)
- memset((void *)(this->p_memory), 0, this->n() * sizeof(T));
+ std::memset((void *)(this->p_memory), 0, this->n() * sizeof(T));
else
((EST_TVector<T> *)this)->fill(*this->def_val);
}

View File

@@ -0,0 +1,63 @@
diff --git speech_tools.orig/config/compilers/gcc_defaults.mak speech_tools/config/compilers/gcc_defaults.mak
index 193ce24..194266e 100644
--- speech_tools.orig/config/compilers/gcc_defaults.mak
+++ speech_tools/config/compilers/gcc_defaults.mak
@@ -81,7 +81,7 @@ SHARED_CXXFLAGS = -fPIC
SHARED_LINKFLAGS =
ifndef GCC_MAKE_SHARED_LIB
- MAKE_SHARED_LIB = $(CXX) -shared -fno-shared-data -o XXX
+ MAKE_SHARED_LIB = $(CXX) -shared -o XXX -Wl,-soname,YYY
else
MAKE_SHARED_LIB = $(GCC_MAKE_SHARED_LIB)
endif
diff --git speech_tools.orig/config/rules/defaults.mak speech_tools/config/rules/defaults.mak
index 27ec08a..336c88f 100644
--- speech_tools.orig/config/rules/defaults.mak
+++ speech_tools/config/rules/defaults.mak
@@ -69,15 +69,21 @@ ifdef N
MADE_FROM_ABOVE:=$(N)
endif
+ifneq ($(SHARED),0)
+ LIBTYPE=so
+else
+ LIBTYPE=a
+endif
+
ifndef PROJECT_LIBDEPS
- PROJECT_LIBDEPS = $(foreach l,$(PROJECT_LIBRARIES),$(PROJECT_LIBRARY_DIR_$(l))/lib$(l).a)
+ PROJECT_LIBDEPS = $(foreach l,$(PROJECT_LIBRARIES),$(PROJECT_LIBRARY_DIR_$(l))/lib$(l).$(LIBTYPE))
endif
ifndef PROJECT_LIBS
PROJECT_LIBS = $(foreach l,$(PROJECT_LIBRARIES),-L$(PROJECT_LIBRARY_DIR_$(l)) -l$(l))
endif
ifndef REQUIRED_LIBDEPS
- REQUIRED_LIBDEPS = $(foreach l,$(REQUIRED_LIBRARIES),$(REQUIRED_LIBRARY_DIR_$(l))/lib$(l).a)
+ REQUIRED_LIBDEPS = $(foreach l,$(REQUIRED_LIBRARIES),$(REQUIRED_LIBRARY_DIR_$(l))/lib$(l).$(LIBTYPE))
endif
ifndef REQUIRED_LIBS
REQUIRED_LIBS = $(foreach l,$(REQUIRED_LIBRARIES),-L$(REQUIRED_LIBRARY_DIR_$(l)) -l$(l))
diff --git speech_tools.orig/config/rules/library.mak speech_tools/config/rules/library.mak
index f93d019..b449f21 100644
--- speech_tools.orig/config/rules/library.mak
+++ speech_tools/config/rules/library.mak
@@ -103,13 +103,13 @@ endif
###########################################################################
lib%.so : lib%.a
- @echo Make Shared Library $*
+ @echo Make Shared Library $(*F)
@if [ ! -d shared_space ] ; then mkdir shared_space ; else $(RM) -f shared_space/*.o ; fi
@(cd shared_space ; $(AR) x ../$< )
- @echo Link Shared Library $*
- $(subst XXX,$@.$(PROJECT_LIBRARY_VERSION_$*),$(MAKE_SHARED_LIB)) shared_space/*.o $(PROJECT_LIBRARY_USES_$*:%=-L. -l%) $$libs
+ @echo Link Shared Library $(*F)
+ $(subst XXX,$@.$(PROJECT_LIBRARY_VERSION_$(*F)),$(subst YYY,$(@F).$(PROJECT_LIBRARY_VERSION_$(*F)),$(MAKE_SHARED_LIB))) shared_space/*.o $(PROJECT_LIBRARY_USES_$(*F):%=-L. -l%) $$libs
@$(RM) -f shared_space/*.o $@
- @ln -s $@.$(PROJECT_LIBRARY_VERSION_$*) $@
+ @ln -s $(@F).$(PROJECT_LIBRARY_VERSION_$(*F)) $@
###########################################################################
## ##

View File

@@ -0,0 +1,527 @@
diff --git speech_tools.orig/audio/Makefile speech_tools/audio/Makefile
index 6103654..1535faf 100644
--- speech_tools.orig/audio/Makefile
+++ speech_tools/audio/Makefile
@@ -44,7 +44,7 @@ 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
+ macosxaudio.cc linux_sound.cc sndio.cc
SRCS = $(CPPSRCS)
OBJS = $(SRCS:.cc=.o)
diff --git speech_tools.orig/audio/audioP.h speech_tools/audio/audioP.h
index 6d49690..6c86ab1 100644
--- speech_tools.orig/audio/audioP.h
+++ speech_tools/audio/audioP.h
@@ -43,6 +43,7 @@ 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_sndio_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);
@@ -52,5 +53,6 @@ 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);
+int record_sndio_wave(EST_Wave &inwave, EST_Option &al);
#endif /* __AUDIOP_H__ */
diff --git speech_tools.orig/audio/gen_audio.cc speech_tools/audio/gen_audio.cc
index 985324a..ec286a4 100644
--- speech_tools.orig/audio/gen_audio.cc
+++ speech_tools/audio/gen_audio.cc
@@ -97,6 +97,8 @@ int play_wave(EST_Wave &inwave, EST_Option &al)
protocol = "win32audio";
else if (mplayer_supported)
protocol = "mplayeraudio";
+ else if (sndio_supported)
+ protocol = "sndioaudio";
else
protocol = "sunaudio";
}
@@ -121,6 +123,8 @@ int play_wave(EST_Wave &inwave, EST_Option &al)
else if ((upcase(protocol) == "FREEBSD16AUDIO") ||
(upcase(protocol) == "LINUX16AUDIO"))
return play_linux_wave(*toplay,al);
+ else if (upcase(protocol) == "SNDIOAUDIO")
+ return play_sndio_wave(*toplay,al);
else if (upcase(protocol) == "IRIXAUDIO")
return play_irix_wave(*toplay,al);
else if (upcase(protocol) == "MACOSXAUDIO")
@@ -263,6 +267,8 @@ EST_String options_supported_audio(void)
audios += " win32audio";
if (os2audio_supported)
audios += " os2audio";
+ if (sndio_supported)
+ audios += " sndioaudio";
return audios;
}
@@ -301,6 +307,8 @@ int record_wave(EST_Wave &wave, EST_Option &al)
protocol = "win32audio";
else if (mplayer_supported)
protocol = "mplayeraudio";
+ else if (sndio_supported)
+ protocol = "sndioaudio";
else
protocol = "sunaudio";
}
@@ -314,6 +322,8 @@ int record_wave(EST_Wave &wave, EST_Option &al)
else if ((upcase(protocol) == "FREEBSD16AUDIO") ||
(upcase(protocol) == "LINUX16AUDIO"))
return record_linux_wave(wave,al);
+ else if (upcase(protocol) == "SNDIOAUDIO")
+ return record_sndio_wave(wave,al);
else if (upcase(protocol) == "SUNAUDIO")
return record_sunau_wave(wave,al);
else
diff --git speech_tools/audio/sndio.cc speech_tools/audio/sndio.cc
new file mode 100644
index 0000000..866f43c
--- /dev/null
+++ speech_tools/audio/sndio.cc
@@ -0,0 +1,371 @@
+/*
+ * Copyright (c) 2010 Jacob Meuser <jakemsr@sdf.lonestar.org>
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, 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.
+ */
+
+/* Based on voxware.cc which came with the following copyright notice. */
+
+/*************************************************************************/
+/* */
+/* 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 */
+/*-----------------------------------------------------------------------*/
+
+#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
+#include <ctype.h>
+#include <sys/stat.h>
+#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_SNDIO
+#include <sndio.h>
+int sndio_supported = TRUE;
+static char *aud_sys_name = "sndio";
+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.
+
+#ifdef THREAD_SAFETY
+#include <signal.h>
+#include <pthread.h>
+
+#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
+
+
+#define AUDIOBUFFSIZE 256
+// #define AUDIOBUFFSIZE 20480
+
+int
+play_sndio_wave(EST_Wave &inwave, EST_Option &al)
+{
+ struct sio_hdl *hdl;
+ struct sio_par par;
+ int sample_rate;
+ short *waveform;
+ short *waveform2 = NULL;
+ int num_samples;
+ int i, r, n;
+ char *audiodevice = NULL;
+
+ if (al.present("-audiodevice"))
+ audiodevice = al.val("-audiodevice");
+
+ if ((hdl = sio_open(audiodevice, SIO_PLAY, 0)) == NULL) {
+ cerr << aud_sys_name << ": error opening device" << endl;
+ return -1;
+ }
+
+ waveform = inwave.values().memory();
+ num_samples = inwave.num_samples();
+ sample_rate = inwave.sample_rate();
+
+ sio_initpar(&par);
+
+ par.rate = sample_rate;
+ par.pchan = 1;
+ par.bits = 16;
+ par.sig = 1;
+ par.le = SIO_LE_NATIVE;
+
+ if (!sio_setpar(hdl, &par) || !sio_getpar(hdl, &par)) {
+ cerr << aud_sys_name << ": error configuring parameters" << endl;
+ return -1;
+ }
+
+ if ((par.pchan != 1 && par.pchan != 2) ||
+ !((par.bits == 16 && par.sig == 1) ||
+ (par.bits == 8 && par.sig == 0)) ||
+ par.rate != sample_rate) {
+ cerr << aud_sys_name << ": could not set appropriate parameters" << endl;
+ return -1;
+ }
+
+ if (!sio_start(hdl)) {
+ cerr << aud_sys_name << ": could not start sudio" << endl;
+ return -1;
+ }
+
+ if (par.pchan == 2)
+ stereo_only = 1;
+
+ if (stereo_only) {
+ waveform2 = walloc(short, num_samples * 2);
+ for (i = 0; i < num_samples; i++) {
+ waveform2[i * 2] = inwave.a(i);
+ waveform2[(i * 2) + 1] = inwave.a(i);
+ }
+ waveform = waveform2;
+ num_samples *= 2;
+ }
+
+ THREAD_DECS();
+ THREAD_PROTECT();
+
+ if (par.bits == 8) {
+ // Its actually 8bit unsigned so convert the buffer;
+ unsigned char *uchars = walloc(unsigned char,num_samples);
+ for (i=0; i < num_samples; i++)
+ uchars[i] = waveform[i] / 256 + 128;
+ for (i=0; i < num_samples; i += r) {
+ if (num_samples > i + AUDIOBUFFSIZE)
+ n = AUDIOBUFFSIZE;
+ else
+ n = num_samples - i;
+ r = sio_write(hdl, &uchars[i], n);
+ if (r == 0 && sio_eof(hdl)) {
+ THREAD_UNPROTECT();
+ cerr << aud_sys_name << ": failed to write to buffer" <<
+ sample_rate << endl;
+ sio_close(hdl);
+ return -1;
+ }
+ }
+ wfree(uchars);
+ } else {
+ // 16-bit
+ int nbuf, c;
+ short *buf;
+
+ nbuf = par.round * par.bps * par.pchan;
+
+ 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 < n; c++)
+ buf[c] = waveform[c + i];
+
+ for(; c < nbuf; c++)
+ buf[c] = waveform[n - 1];
+
+ r = sio_write(hdl, buf, nbuf * 2);
+ if (r == 0 && sio_eof(hdl)) {
+ THREAD_UNPROTECT();
+ EST_warning("%s: failed to write to buffer (sr=%d)",
+ aud_sys_name, sample_rate );
+ sio_close(hdl);
+ return -1;
+ }
+
+ }
+ delete [] buf;
+ }
+
+ sio_close(hdl);
+ if (waveform2)
+ wfree(waveform2);
+
+ THREAD_UNPROTECT();
+ return 1;
+}
+
+int
+record_sndio_wave(EST_Wave &inwave, EST_Option &al)
+{
+ struct sio_hdl *hdl;
+ struct sio_par par;
+ int sample_rate = 16000; // egcs needs the initialized for some reason
+ short *waveform;
+ short *waveform2 = NULL;
+ int num_samples;
+ int i,r,n;
+ char *audiodevice = NULL;
+
+ if (al.present("-audiodevice"))
+ audiodevice = al.val("-audiodevice");
+
+ sample_rate = al.ival("-sample_rate");
+
+ if ((hdl = sio_open(audiodevice, SIO_REC, 0)) == NULL) {
+ cerr << aud_sys_name << ": error opening device" << endl;
+ return -1;
+ }
+
+ sio_initpar(&par);
+
+ par.rate = sample_rate;
+ par.rchan = 1;
+ par.bits = 16;
+ par.sig = 1;
+ par.le = SIO_LE_NATIVE;
+
+ if (!sio_setpar(hdl, &par) || !sio_getpar(hdl, &par)) {
+ cerr << aud_sys_name << ": error configuring parameters" << endl;
+ return -1;
+ }
+
+ if ((par.rchan != 1 && par.rchan != 2) ||
+ !((par.bits == 16 && par.sig == 1) ||
+ (par.bits == 8 && par.sig == 0)) ||
+ par.rate != sample_rate) {
+ cerr << aud_sys_name << ": could not set appropriate parameters" << endl;
+ return -1;
+ }
+
+ if (!sio_start(hdl)) {
+ cerr << aud_sys_name << ": could not start sudio" << endl;
+ return -1;
+ }
+
+ if (par.rchan == 2)
+ stereo_only = 1;
+
+ inwave.resize((int)(sample_rate * al.fval("-time")));
+ inwave.set_sample_rate(sample_rate);
+ num_samples = inwave.num_samples();
+ waveform = inwave.values().memory();
+
+ if (par.bits == 16) {
+ // We assume that the device returns audio in native byte order
+ // by default
+
+ 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 = sio_read(hdl, &waveform2[i], n * 2);
+ r /= 2;
+ if (r == 0 && sio_eof(hdl)) {
+ cerr << aud_sys_name << ": failed to read from audio device"
+ << endl;
+ sio_close(hdl);
+ return -1;
+ }
+ }
+ } else {
+ 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 = sio_read(hdl, &u8wave[i], n);
+ if (r == 0 && sio_eof(hdl)) {
+ cerr << aud_sys_name << ": failed to read from audio device"
+ << endl;
+ sio_close(hdl);
+ wfree(u8wave);
+ return -1;
+ }
+
+ }
+ uchar_to_short(u8wave, waveform, num_samples);
+ wfree(u8wave);
+ }
+
+ if (stereo_only) {
+ for (i = 0; i < num_samples; i += 2)
+ waveform[i / 2] = waveform2[i];
+ wfree(waveform2);
+ }
+
+ sio_close(hdl);
+ return 0;
+}
+
+#else
+
+int sndio_supported = FALSE;
+
+int
+play_sndio_wave(EST_Wave &inwave, EST_Option &al)
+{
+ (void)inwave;
+ (void)al;
+ cerr << "Audio: sndio not compiled in this version" << endl;
+ return -1;
+}
+
+int
+record_sndio_wave(EST_Wave &inwave, EST_Option &al)
+{
+ (void)inwave;
+ (void)al;
+ cerr << "Audio: sndio not compiled in this version" << endl;
+ return -1;
+}
+
+#endif
diff --git speech_tools.orig/config/modules/Makefile speech_tools/config/modules/Makefile
index c937c64..6bfb6d3 100644
--- speech_tools.orig/config/modules/Makefile
+++ speech_tools/config/modules/Makefile
@@ -42,7 +42,7 @@ RULESETS = efence.mak dmalloc.mak debugging.mak \
freebsd16_audio.mak irix_audio.mak linux16_audio.mak \
sun16_audio.mak win32_audio.mak macosx_audio.mak \
mplayer_audio.mak nas_audio.mak esd_audio.mak \
- siod_python.mak
+ siod_python.mak sndio_audio.mak
FILES = Makefile descriptions $(RULESETS)
diff --git speech_tools/config/modules/sndio_audio.mak speech_tools/config/modules/sndio_audio.mak
new file mode 100644
index 0000000..1f5d7d2
--- /dev/null
+++ speech_tools/config/modules/sndio_audio.mak
@@ -0,0 +1,8 @@
+
+INCLUDE_SNDIO_AUDIO=1
+
+MOD_DESC_SNDIO_AUDIO=(from EST) Audio module for sndio audio support
+
+AUDIO_DEFINES += -DSUPPORT_SNDIO
+
+MODULE_LIBS += -lsndio
diff --git speech_tools.orig/config/systems/Linux.mak speech_tools/config/systems/Linux.mak
index 1fbba94..62a3d7b 100644
--- speech_tools.orig/config/systems/Linux.mak
+++ speech_tools/config/systems/Linux.mak
@@ -44,7 +44,7 @@ TCL_LIBRARY = -ltcl
OS_LIBS = -ldl -lncurses
## the native audio module for this type of system
-NATIVE_AUDIO_MODULE = LINUX16
+NATIVE_AUDIO_MODULE = SNDIO
## echo -n doesn't work
ECHO_N = /usr/bin/printf "%s"
diff --git speech_tools.orig/include/EST_audio.h speech_tools/include/EST_audio.h
index 2b1df88..29891b8 100644
--- speech_tools.orig/include/EST_audio.h
+++ speech_tools/include/EST_audio.h
@@ -46,6 +46,7 @@ extern int nas_supported;
extern int esd_supported;
extern int sun16_supported;
extern int freebsd16_supported;
+extern int sndio_supported;
extern int linux16_supported;
extern int mplayer_supported;
extern int win32audio_supported;
diff --git speech_tools.orig/lib/siod/init.scm speech_tools/lib/siod/init.scm
index a149f96..37acb24 100644
--- speech_tools.orig/lib/siod/init.scm
+++ speech_tools/lib/siod/init.scm
@@ -78,8 +78,10 @@
(Parameter.def 'Audio_Method 'os2audio))
((member 'mplayeraudio *modules*)
(Parameter.def 'Audio_Method 'mplayeraudio))
- (t ;; can't find direct support so guess that /dev/audio for 8k ulaw exists
- (Parameter.def 'Audio_Method 'sunaudio)))
+ ((member 'sndioaudio *modules*)
+ (Parameter.def 'Audio_Method 'sndioaudio))
+ (t ;; stupid crappy software. default to only supported "protocol"
+ (Parameter.def 'Audio_Method 'sndioaudio)))
;;; If you have an external program to play audio add its definition
;;; in siteinit.scm

View File

@@ -0,0 +1,478 @@
diff --git speech_tools.orig/Makefile speech_tools/Makefile
index f3343f1..ef8b23e 100644
--- speech_tools.orig/Makefile
+++ speech_tools/Makefile
@@ -47,7 +47,7 @@ LIB_BUILD_DIRS = audio utils base_class ling_class speech_class sigpr \
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
+EXTRA_DIRS=siod rxp wrappers
ALL_DIRS = include $(BUILD_DIRS) $(EXTRA_DIRS) config doc
VERSION=$(PROJECT_VERSION)
CONFIG=configure configure.in config.sub config.guess \
diff --git speech_tools.orig/config/compilers/Makefile speech_tools/config/compilers/Makefile
index 3d3d5bb..53470f2 100644
--- speech_tools.orig/config/compilers/Makefile
+++ speech_tools/config/compilers/Makefile
@@ -40,10 +40,10 @@ DIRNAME=config/compilers
COMPILERS = gcc.mak gcc27.mak gcc28.mak gcc295.mak \
egcs.mak gcc27emx.mak intel80.mak \
suncc.mak suncc40.mak \
- jolt.mak jdk.mak jdk12.mak none.mak \
- jikes.mak gcc296.mak gcc30.mak gcc31.mak gcc32.mak
+ none.mak \
+ gcc296.mak gcc30.mak gcc31.mak gcc32.mak
-FILES = Makefile $(COMPILERS) gcc_defaults.mak suncc_defaults.mak jdk_defaults.mak jikes_defaults.mak
+FILES = Makefile $(COMPILERS) gcc_defaults.mak suncc_defaults.mak
include $(TOP)/config/common_make_rules
diff --git speech_tools.orig/config/config.in speech_tools/config/config.in
index 15d563e..1e24249 100644
--- speech_tools.orig/config/config.in
+++ speech_tools/config/config.in
@@ -38,12 +38,6 @@ SYSTEM_TYPE=$(MACHINETYPE)_$(OSTYPE)$(OSREV)
COMPILER=@COMPILERTYPE@
###########################################################################
-## Java system to use if you include the Java interface.
-## Examples jdk
-
-JAVA_COMPILER=jdk
-
-###########################################################################
## Pre defined configurations (for directory locations, setup peculiarities
## etc.)
##
@@ -120,23 +114,6 @@ INCLUDE_MODULES += SCFG
INCLUDE_MODULES += WFST
INCLUDE_MODULES += OLS
-## Java
-
-
-## Define this to include the pure Java code
-# INCLUDE_MODULES += JAVA
-# JAVA_HOME = PUT_SOMETHING_HERE
-
-## Define this to compile the Java interface to the EST classes. You
-## need to compile with the SHARED option above. This is required for
-## fringe.
-# INCLUDE_MODULES += JAVA_CPP
-
-## Define this to have the Java code use the Java Media API to
-## play sounds etc.
-# INCLUDE_MODULES += JAVA_MEDIA
-# JMF_HOME = PUT_SOMETHING_HERE
-
## Richard Tobin's RXP XML parser.
INCLUDE_MODULES += RXP
@@ -198,10 +175,6 @@ include $(EST)/config/systems/$(SYSTEM_TYPE).mak
include $(EST)/config/compilers/$(COMPILER).mak
-ifneq ($(JAVA_COMPILER),none)
- include $(EST)/config/compilers/$(JAVA_COMPILER).mak
-endif
-
ifneq ($(CONFIGURATION),)
include $(CONFIGURATION:%=$(EST)/config/configs/%.mak)
endif
diff --git speech_tools.orig/config/configs/Makefile speech_tools/config/configs/Makefile
index d9c5f15..885156e 100644
--- speech_tools.orig/config/configs/Makefile
+++ speech_tools/config/configs/Makefile
@@ -48,10 +48,6 @@ DIRNAME=config/configs
##
## ellipsis Setup on cstr linux machine
##
-## kellogg Setup on cstr machine with different java location
-##
-## v_java Special setup for a with-java compilation at cstr
-##
## rjc Weird things in rjc's setup.
@@ -59,8 +55,6 @@ CONFIGURATIONS = \
egcs_as_gcc.mak \
cstr.mak \
ellipsis.mak \
- kellogg.mak \
- v_java.mak \
rjc.mak \
cstr_jdk1.2.mak
diff --git speech_tools.orig/config/modules/linux16_audio.mak speech_tools/config/modules/linux16_audio.mak
index 61d761c..31ec2b0 100644
--- speech_tools.orig/config/modules/linux16_audio.mak
+++ speech_tools/config/modules/linux16_audio.mak
@@ -56,10 +56,3 @@ endif
ifeq ($(LINUXAUDIO),none)
AUDIO_DEFINES += -DSUPPORT_VOXWARE
endif
-
-ifdef INCLUDE_JAVA_CPP
- AUDIO_DEFINES += -DTHREAD_SAFETY
- MODULE_LIBS += -lpthread
-endif
-
-
diff --git speech_tools.orig/config/project.mak speech_tools/config/project.mak
index 5e9c216..0bdd548 100644
--- speech_tools.orig/config/project.mak
+++ speech_tools/config/project.mak
@@ -63,7 +63,6 @@ DISTRIBUTED_MODULES = \
NAS_AUDIO ESD_AUDIO NATIVE_AUDIO MPLAYER_AUDIO \
EDITLINE \
SIOD WAGON SCFG WFST OLS \
- JAVA JAVA_CPP JAVA_MEDIA \
TCL RXP
DEVELOPMENT_MODULES = \
@@ -91,36 +90,22 @@ PROJECT_LIB_DIR = $(TOP)/lib
PROJECT_LIBRARIES = estools estbase eststring
-PROJECT_LIBRARIES_JAVA = estjava
-
PROJECT_LIBRARY_DIR = lib
PROJECT_LIBRARY_DIR_estools = $(TOP)/lib
PROJECT_LIBRARY_DIR_estbase = $(TOP)/lib
PROJECT_LIBRARY_DIR_eststring = $(TOP)/lib
-PROJECT_LIBRARY_DIR_estjava = $(TOP)/lib
PROJECT_LIBRARY_USES_estbase = eststring
-PROJECT_LIBRARY_USES_estjava = estbase eststring
-
PROJECT_LIBRARY_VERSION_estools = $(PROJECT_VERSION).1
PROJECT_LIBRARY_VERSION_estbase = $(PROJECT_VERSION).1
PROJECT_LIBRARY_VERSION_eststring = 1.2
-PROJECT_LIBRARY_VERSION_estjava = $(PROJECT_VERSION).1
-
-PROJECT_LIBRARY_NEEDS_SYSLIBS_estjava=1
PROJECT_DEFAULT_LIBRARY = estools
PROJECT_SHARED_LIBRARIES = eststring estbase
PROJECT_ALL_LIBRARIES = eststring estbase estools
-JAVA_CLASS_LIBRARY = $(LOCAL_JAVA_CLASS_LIBRARY)
-
-JAVA_CLASSPATH=$(LOCAL_JAVA_CLASSPATH):$(SYSTEM_JAVA_CLASSPATH)
-
-PROJECT_JAVA_ROOT=$(LOCAL_JAVA_ROOT)
-
# Libraries used from other projects
REQUIRED_LIBRARIES =
diff --git speech_tools.orig/config/rules/Makefile speech_tools/config/rules/Makefile
index bbc8dec..a155041 100644
--- speech_tools.orig/config/rules/Makefile
+++ speech_tools/config/rules/Makefile
@@ -41,7 +41,7 @@ TOP=../..
RULESETS = compile_options.mak defaults.mak library.mak make_depend.mak \
rcs.mak rules.mak targets.mak modules.mak \
- config_errors.mak visual_c.mak c.mak java.mak \
+ config_errors.mak visual_c.mak c.mak \
bin_process.mak install.mak top_level.mak doc.mak \
common_make_rules.mak test_make_rules.mak cvs.mak \
build_dir.mak
diff --git speech_tools.orig/config/rules/bin_process.mak speech_tools/config/rules/bin_process.mak
index a1b9807..3ab5730 100644
--- speech_tools.orig/config/rules/bin_process.mak
+++ speech_tools/config/rules/bin_process.mak
@@ -107,12 +107,7 @@ endif
main="$(MAIN)/$(DIRNAME)" \
lib="$($(PROJECT_PREFIX)_HOME)/$(PROJECT_LIBRARY_DIR)" \
est="'$(EST_HOME)'" \
- classpath="$(SYSTEM_JAVA_CLASSPATH)" \
perl="$(PERL)" \
- javahome="$(JAVA_HOME)" \
- java="$(JAVA)" \
- javac="$(JAVAC)" \
- java_version="$(EST_JAVA_VERSION)" \
ldpath="$(SYSTEM_LD_LIBRARY_PATH)" \
ldvar="$(LD_LIBRARY_PATH_VARIABLE)" \
$(PROJECT_SCRIPTS_DIR)/shared_script > "$(subst TOP,$(TOP),$(BIN))/$$b" ;\
@@ -154,11 +149,6 @@ endif
topdir="$($(PROJECT_PREFIX)_HOME)" \
est="'$(EST_HOME)'" \
perl="$(PERL)" \
- javahome=$(JAVA_HOME) \
- java_version="$(EST_JAVA_VERSION)" \
- java=$(JAVA) \
- javac=$(JAVAC) \
- classpath=$(SYSTEM_JAVA_CLASSPATH) \
ldpath="$(SYSTEM_LD_LIBRARY_PATH)" \
ldvar="$(LD_LIBRARY_PATH_VARIABLE)" \
"$$script" > "$(subst TOP,$(TOP),$(BIN))/$$b" ;\
diff --git speech_tools.orig/config/rules/common_make_rules.mak speech_tools/config/rules/common_make_rules.mak
index bd23c02..b69234c 100644
--- speech_tools.orig/config/rules/common_make_rules.mak
+++ speech_tools/config/rules/common_make_rules.mak
@@ -54,10 +54,6 @@ endif
# export TEMPLATE_DIRS
export CI_ARGS
-ifdef JAVA_CLASSES
- NEED_JAVA=1
-endif
-
# Various subsets of directories
ifndef ALL_DIRS
@@ -66,10 +62,6 @@ ifdef BUILD_DIRS
endif
endif
-ifdef JAVA_COMMON_DIRS
- JUST_BUILD_DIRS := $(JUST_BUILD_DIRS) $(notdir $(JAVA_COMMON_DIRS))
-endif
-
ifdef JUST_LIB
SUBDIRECTORIES = ${JUST_BUILD_DIRS} ${LIB_BUILD_DIRS} ${EXTRA_LIB_BUILD_DIRS}
else
@@ -95,10 +87,6 @@ include $(EST)/config/rules/cvs.mak
include $(EST)/config/rules/c.mak
-ifdef NEED_JAVA
-include $(EST)/config/rules/java.mak
-endif
-
include $(EST)/config/rules/config_errors.mak
# keep track of the places we put templates. Used for compiling things
diff --git speech_tools.orig/config/rules/compile_options.mak speech_tools/config/rules/compile_options.mak
index dfe53b9..5ace28f 100644
--- speech_tools.orig/config/rules/compile_options.mak
+++ speech_tools/config/rules/compile_options.mak
@@ -113,9 +113,6 @@ ifneq ($(DEBUG),0)
ifneq ($(OPTIMISE),4)
CFLAGS += $(DEBUG_CCFLAGS)
CXXFLAGS += $(DEBUG_CXXFLAGS)
- JAVAFLAGS += $(DEBUG_JAVAFLAGS)
- JAVAC := $(DEBUG_JAVAC)
- JAVAH := $(DEBUG_JAVAH)
LINKFLAGS += $(DEBUG_LINKFLAGS)
endif
endif
@@ -132,7 +129,6 @@ endif
ifneq ($(OPTIMISE),0)
CFLAGS += $(OPTIMISE_CCFLAGS)
CXXFLAGS += $(OPTIMISE_CXXFLAGS)
- JAVAFLAGS += $(OPTIMISE_JAVAFLAGS)
LINKFLAGS += $(OPTIMISE_LINKFLAGS)
endif
@@ -149,12 +145,10 @@ endif
ifneq ($(WARN),0)
CFLAGS += $(WARN_CCFLAGS)
CXXFLAGS += $(WARN_CXXFLAGS)
- JAVAFLAGS += $(WARN_JAVAFLAGS)
LINKFLAGS += $(WARN_LINKFLAGS)
else
CFLAGS += $(NOWARN_CCFLAGS)
CXXFLAGS += $(NOWARN_CXXFLAGS)
- JAVAFLAGS += $(NOWARN_JAVAFLAGS)
LINKFLAGS += $(NOWARN_LINKFLAGS)
endif
@@ -162,7 +156,6 @@ endif
ifneq ($(VERBOSE),0)
CFLAGS += $(VERBOSE_CCFLAGS)
CXXFLAGS += $(VERBOSE_CXXFLAGS)
- JAVAFLAGS += $(VERBOSE_JAVAFLAGS)
LINKFLAGS += $(VERBOSE_LINKFLAGS)
endif
diff --git speech_tools.orig/config/rules/config_errors.mak speech_tools/config/rules/config_errors.mak
index 3b7bd7e..6218dc3 100644
--- speech_tools.orig/config/rules/config_errors.mak
+++ speech_tools/config/rules/config_errors.mak
@@ -39,14 +39,4 @@
## ##
###########################################################################
-ifdef NEED_JAVA
-ifndef INCLUDE_JAVA
-.config_error:: FORCE
- @echo "+------------------------------------------------------"
- @echo "| This system requires java support in the speech tools"
- @echo "+------------------------------------------------------"
- @exit 1
-endif
-endif
-
.config_error:: FORCE
diff --git speech_tools.orig/config/rules/defaults.mak speech_tools/config/rules/defaults.mak
index aca1573..27ec08a 100644
--- speech_tools.orig/config/rules/defaults.mak
+++ speech_tools/config/rules/defaults.mak
@@ -153,12 +153,6 @@ ifndef NON_PROJECT_LIBS
NON_PROJECT_LIBS = $(CONFIG_LIBS) $(LOCAL_LIBS) $(REQUIRED_LIBS) \
$(SYSTEM_LD_LIBRARY_PATH:%=-L%) \
$(MODULE_LIBS) $(MODULE_EXTRA_LIBS) $(DEBUG_LIBS) $(OS_LIBS) $(MATH_LIBRARY) $(COMPILERLIBS)
-
-# reduced list for linking with java code.
-
- JAVA_PROJECT_LIBS = $(CONFIG_LIBS) $(LOCAL_LIBS) $(REQUIRED_LIBS) \
- $(SYSTEM_LD_LIBRARY_PATH:%=-L%) \
- $(MODULE_LIBS) $(DEBUG_LIBS) $(OS_LIBS) $(MATH_LIBRARY) $(COMPILERLIBS)
endif
## Default C Compilation
diff --git speech_tools.orig/config/rules/library.mak speech_tools/config/rules/library.mak
index 0181988..f93d019 100644
--- speech_tools.orig/config/rules/library.mak
+++ speech_tools/config/rules/library.mak
@@ -107,7 +107,6 @@ lib%.so : lib%.a
@if [ ! -d shared_space ] ; then mkdir shared_space ; else $(RM) -f shared_space/*.o ; fi
@(cd shared_space ; $(AR) x ../$< )
@echo Link Shared Library $*
- if [ -n "$(PROJECT_LIBRARY_NEEDS_SYSLIBS_$*)" ] ; then libs='$(JAVA_PROJECT_LIBS)' ; fi ;\
$(subst XXX,$@.$(PROJECT_LIBRARY_VERSION_$*),$(MAKE_SHARED_LIB)) shared_space/*.o $(PROJECT_LIBRARY_USES_$*:%=-L. -l%) $$libs
@$(RM) -f shared_space/*.o $@
@ln -s $@.$(PROJECT_LIBRARY_VERSION_$*) $@
diff --git speech_tools.orig/config/rules/make_depend.mak speech_tools/config/rules/make_depend.mak
index 26589ec..4d01b47 100644
--- speech_tools.orig/config/rules/make_depend.mak
+++ speech_tools/config/rules/make_depend.mak
@@ -39,7 +39,7 @@
###########################################################################
ifndef ALL_DEPEND
- ALL_DEPEND = $(SRCS) $(CPPSRCS) $(CSRCS) $(JAVA_CLASSES:%=%.java)
+ ALL_DEPEND = $(SRCS) $(CPPSRCS) $(CSRCS)
endif
$(DEPEND): $(ALL_DEPEND)
@@ -68,7 +68,6 @@ ifneq ($(ALL_DEPEND),)
case "$$ext" in \
c) $(MAKE_DEPEND_C) $(DEPEND_FLAGS) "$$i";;\
cc) $(MAKE_DEPEND_CXX) $(DEPEND_FLAGS) "$$i";;\
- java) echo "$$basename.class : $$basename.java";;\
*) echo "# Can't make depend for extension $$ext";;\
esac ;\
}|\
diff --git speech_tools.orig/config/rules/script_process.awk speech_tools/config/rules/script_process.awk
index d8976f3..67d4eb4 100644
--- speech_tools.orig/config/rules/script_process.awk
+++ speech_tools/config/rules/script_process.awk
@@ -44,26 +44,6 @@
sub(/__PERL__/, perl);
}
-/__CLASSPATH__/ {
- sub(/__CLASSPATH__/, classpath);
-}
-
-/__JAVA__/ {
- sub(/__JAVA__/, java);
-}
-
-/__JAVAC__/ {
- sub(/__JAVAC__/, javac);
-}
-
-/__JAVA_VERSION__/ {
- sub(/__JAVA_VERSION__/, java_version);
-}
-
-/__JAVA_HOME__/ {
- sub(/__JAVA_HOME__/, javahome);
-}
-
/__LDPATH__/ {
sub(/__LDPATH__/, ldpath);
}
diff --git speech_tools.orig/config/rules/targets.mak speech_tools/config/rules/targets.mak
index f052401..dcce8e2 100644
--- speech_tools.orig/config/rules/targets.mak
+++ speech_tools/config/rules/targets.mak
@@ -66,7 +66,7 @@ ${SUBDIRECTORIES} dummy_dir_name: FORCE
## Clean up junk
clean:
- $(RM) -fr $(OBJS) $(JAVA_CLASSES_CLASS) $(ALL_EXECS) $(ALL_EXECS:%=%.mak) $(ALL_LIBS) $(LOCAL_CLEAN) make.depend .buildlib* *~
+ $(RM) -fr $(OBJS) $(ALL_EXECS) $(ALL_EXECS:%=%.mak) $(ALL_LIBS) $(LOCAL_CLEAN) make.depend .buildlib* *~
ifdef ALL_DIRS
@ for i in $(ALL_DIRS) ; \
do \
diff --git speech_tools.orig/config/rules/top_level.mak speech_tools/config/rules/top_level.mak
index 9aa3f12..a7f1028 100644
--- speech_tools.orig/config/rules/top_level.mak
+++ speech_tools/config/rules/top_level.mak
@@ -50,13 +50,6 @@ real-info:
fi ;\
echo 'SYSTEM_TYPE:=:$(SYSTEM_TYPE)' ;\
echo 'COMPILER:=:$(COMPILER_DESC) '`$(COMPILER_VERSION_COMMAND)` ;\
- if [ '$(JAVA_COMPILER)' != none ] ;\
- then \
- echo 'JAVA_COMPILER:=:$(JAVA_COMPILER_DESC) '`$(JAVA_COMPILER_VERSION_COMMAND)` ;\
- echo 'JAVA_HOME:=:$(JAVA_HOME)' ;\
- echo 'JMF_HOME:=:$(JMF_HOME)' ;\
- echo 'JSAPI_HOME:=:$(JSAPI_HOME)' ;\
- fi ;\
echo 'CONFIGURATION:=:$(CONFIGURATION)' ;\
if [ -n '$(LOCAL_REPOSITORY)' ] ;\
then \
@@ -75,10 +68,6 @@ real-info:
echo 'TEMPLATES:=:$(TEMPLATES)' ;\
echo 'DEFINES:=:$(DEFINES)' ;\
echo 'LIBS:=:$(LIBS)' ;\
- if [ '$(JAVA_COMPILER)' != none ] ;\
- then \
- echo 'JAVA_CLASSPATH:=:$(JAVA_CLASSPATH)' ;\
- fi ;\
echo '' ;\
echo '---------------------------------------------------------------' ;\
} | $(KV_COMMAND) FS=':=:' sep=' = ' ind=22
diff --git speech_tools.orig/config/systems/Linux.mak speech_tools/config/systems/Linux.mak
index 923c9a7..7b7cb51 100644
--- speech_tools.orig/config/systems/Linux.mak
+++ speech_tools/config/systems/Linux.mak
@@ -40,11 +40,6 @@
include $(EST)/config/systems/default.mak
-DEFAULT_JAVA_HOME=/usr/lib/jdk-1.1.6
-JAVA=/usr/bin/java
-JAVAC=/usr/bin/javac
-JAVAH=/usr/bin/javah
-
TCL_LIBRARY = -ltcl
OS_LIBS = -ldl
diff --git speech_tools.orig/config/systems/default.mak speech_tools/config/systems/default.mak
index 50477be..24d6dea 100644
--- speech_tools.orig/config/systems/default.mak
+++ speech_tools/config/systems/default.mak
@@ -140,6 +140,3 @@ DOCXX_ARGS = -a -f -B banner.inc -M sane -D 'SYSTEM "$(EST_HOME)/doc/sane.dtd"'
COMPILER_VERSION_COMMAND=true
-JAVA_COMPILER_VERSION_COMMAND=true
-
-JAVA_SYSTEM_INCLUDES = -I$(JAVA_HOME)/include/genunix
diff --git speech_tools.orig/lib/Makefile speech_tools/lib/Makefile
index 0ff24b0..bfece4f 100644
--- speech_tools.orig/lib/Makefile
+++ speech_tools/lib/Makefile
@@ -77,11 +77,7 @@ $(SKELETONS:%-in=%) : %: %-in
defines='$(DEFINES)' \
libs='$(LIBS_ABS)' \
est='$(EST_HOME)' \
- classpath='$(SYSTEM_JAVA_CLASSPATH)' \
perl='$(PERL)' \
- javahome='$(JAVA_HOME)' \
- java='$(JAVA)' \
- javac='$(JAVAC)' \
ldpath='$(SYSTEM_LD_LIBRARY_PATH)' \
cccommand='$(CC_COMMAND_ABS)' \
cxxcommand='$(CXX_COMMAND_ABS)' \