summaryrefslogtreecommitdiff
path: root/data/flite/make.sh
diff options
context:
space:
mode:
authorJay Freeman <saurik@saurik.com>2008-03-03 11:02:02 +0000
committerJay Freeman <saurik@saurik.com>2008-03-03 11:02:02 +0000
commita32ffe96fdeddbd7e165bfa7918960454252c99a (patch)
tree5638df7b5451ad292b6b4fd31302788407728035 /data/flite/make.sh
parent4d3e0cb850d0a8d5335d41ba6ce55dee10673c43 (diff)
Managed to get text-to-speech working.
git-svn-id: http://svn.telesphoreo.org/trunk@145 514c082c-b64e-11dc-b46d-3d985efe055d
Diffstat (limited to 'data/flite/make.sh')
-rw-r--r--data/flite/make.sh41
1 files changed, 41 insertions, 0 deletions
diff --git a/data/flite/make.sh b/data/flite/make.sh
new file mode 100644
index 000000000..869d64da1
--- /dev/null
+++ b/data/flite/make.sh
@@ -0,0 +1,41 @@
+pkg:extract
+cd *
+pkg:patch
+autoconf
+
+function pkg_:split {
+ size=$1
+ data=$2
+ half=$(($(wc -l "${data}" | cut -d ' ' -f 1) / size))
+
+ for ((i = 0; i != size; ++i)); do
+ tail -n +"$((half * i + 1))" "${data}" | head -n "${half}" >"${data}-$i.c"
+ done
+}
+
+pkg: cp -a %/cmu_lex_data-{0,1}.c lang/cmulex
+pkg_:split 2 lang/cmulex/cmu_lex_data_raw.c
+pkg_:split 5 lang/cmu_us_kal/cmu_us_kal_res.c
+
+for ((i = 0; i != 5; ++i)); do
+ if [[ $i != 0 ]]; then
+ echo 'const unsigned char cmu_us_kal_res_'"${i}"'_[] = {' >>lang/cmu_us_kal/cmu_us_kal_res-"${i}".c
+ fi
+
+ echo '#include "cmu_us_kal_res.c-'"${i}"'.c"' >>lang/cmu_us_kal/cmu_us_kal_res-"${i}".c
+
+ if [[ $i != 4 ]]; then
+ echo '};' >>lang/cmu_us_kal/cmu_us_kal_res-"${i}".c
+ fi
+done
+
+pkg:configure
+mkdir -p build/arm-darwin/obj/lang/cmu_us_kal16
+touch build/arm-darwin/obj/lang/cmu_us_kal16/cmu_us_kal16_res.o
+
+mkdir -p build/arm-darwin/obj/lang/cmulex
+mkdir -p build/arm-darwin/obj/lang/cmu_us_kal
+touch build/arm-darwin/obj/lang/cmulex/cmu_lex_data.o
+touch build/arm-darwin/obj/lang/cmu_us_kal/cmu_us_kal_res.o
+make
+make install prefix="${PKG_DEST}/usr"