summary refs log tree commit diff stats
path: root/flite/build_script.sh
diff options
context:
space:
mode:
Diffstat (limited to 'flite/build_script.sh')
-rwxr-xr-xflite/build_script.sh14
1 files changed, 8 insertions, 6 deletions
diff --git a/flite/build_script.sh b/flite/build_script.sh
index 4e18760..2748331 100755
--- a/flite/build_script.sh
+++ b/flite/build_script.sh
@@ -5,6 +5,9 @@ set -e
 cd flite-6c9f20dc915b17f5619340069889db0aa007fcdc
 
 s_EXPORTED_FUNCTIONS="-s EXPORTED_FUNCTIONS=$(printf '_%s,' \
+flite_wrapper_init \
+flite_text_to_wave \
+delete_val \
 malloc
 )_free"
 
@@ -12,14 +15,13 @@ shared_flags="-Oz -flto -fno-unroll-loops -fno-inline -mnontrapping-fptoint"
 compile_flags="-DNDEBUG -DNO_STDIO $shared_flags"
 link_flags="$shared_flags -s MALLOC=emmalloc -s ASSERTIONS=0 -s INITIAL_MEMORY=$((20*1024*1024)) -s TOTAL_STACK=$((2*1024*1024)) -s STANDALONE_WASM=1 -s PURE_WASI=1 -s STACK_OVERFLOW_CHECK=0 -s WASM_BIGINT=1 -s ABORTING_MALLOC=0 -s MEMORY_GROWTH_GEOMETRIC_STEP=0 -s ALLOW_MEMORY_GROWTH=1"
 
-emconfigure ./configure STRIP='emstrip' CFLAGS="$compile_flags" LDFLAGS="$link_flags" --host=wasm32 --disable-sockets --disable-shared --without-pic --with-mmap=none --with-audio=none
+emconfigure ./configure STRIP='emstrip' CFLAGS="$compile_flags" LDFLAGS="$link_flags" --host=wasm32 --disable-sockets --disable-shared --without-pic --with-mmap=none --with-audio=none --with-vox=cmu_us_kal
 emmake make
 
-#emcc --no-entry $s_EXPORTED_FUNCTIONS $link_flags libmp3lame/.libs/libmp3lame.a
-#em++ --no-entry $s_EXPORTED_FUNCTIONS $link_flags $compile_flags -o pocketfft.wasm impl.cc
+emcc --no-entry $s_EXPORTED_FUNCTIONS $link_flags -o flite.wasm -Lbuild/wasm32-none/lib -Iinclude/ -lflite -lflite_usenglish -lflite_cmulex -lflite_cmu_us_kal ../extrafuncs.c
 
-#mkdir -p ../../src/main/resources/flite/
-#cp a.out.wasm ../../src/main/resources/flite.wasm
-#cp COPYING ../../src/main/resources/flite/
+mkdir -p ../../src/main/resources/flite/
+cp flite.wasm ../../src/main/resources/flite.wasm
+cp COPYING ../../src/main/resources/flite/
 
 exit 0