real-ssb22 commited on
Commit
22d102f
·
0 Parent(s):

Script to make a Gradint .exe bundle for Cameron Wong's voice (like the bundle script for Yali)

Browse files

git-svn-id: http://svn.code.sf.net/p/e-guidedog/code/ssb22/cameron-voice@904 29193198-4895-4776-b068-10539e920549

Files changed (6) hide show
  1. COPYING +12 -0
  2. Makefile +15 -0
  3. README +10 -0
  4. cameron-exe-readme.txt +19 -0
  5. setup.bat +29 -0
  6. unzipsfx.exe +0 -0
COPYING ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ These syllables were recorded by Cameron Wong
2
+ for the Ekho program.
3
+
4
+ You can redistribute and/or modify these recordings under the terms of
5
+ the GNU General Public License as published by the Free Software
6
+ Foundation; either version 3 of the License, or (at your option) any
7
+ later version.
8
+
9
+ These recordings are distributed in the hope that they will be useful,
10
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
11
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12
+ General Public License for more details.
Makefile ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ RawParams=-r 44100 -c 1 -s -2
2
+ SHELL=/bin/bash
3
+
4
+ yali-voice.exe: ../../jyutping-wong setup.bat cameron-exe-readme.txt unzipsfx.exe
5
+ mkdir -p partials/cant/wong
6
+ pushd ../../jyutping-wong ; for N in *.wav ; do sox $$N $(RawParams) $$(echo $$N|sed -e s/wav/raw/); done; popd
7
+ mv ../../jyutping-wong/*.raw partials/cant/wong/
8
+ sox -t raw $(RawParams) /dev/null -t wav - 2>/dev/null | cat > partials/header.wav
9
+ cp cameron-exe-readme.txt partials/cant/README.txt
10
+ for N in setup.bat partials/cant/README.txt ; do python -c "import sys; sys.stdout.write(sys.stdin.read().replace('\r','').replace('\n','\r\n'))" < $$N > n && mv n $$N; done
11
+ find setup.bat partials -type f | sort | zip -q -9 cameron-voice.zip -@
12
+ echo '$$AUTORUN$$>setup.bat' | zip -z cameron-voice.zip
13
+ cat unzipsfx.exe cameron-voice.zip > cameron-voice.exe
14
+ zip -A cameron-voice.exe
15
+ rm -rf partials cameron-voice.zip
README ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ cameron-voice.exe is a zip file that must be
2
+ compatible with unzip on non-Windows platforms
3
+ as well as being self-extracting.
4
+
5
+ unzipsfx.exe is a Win32 build of unzipsfx
6
+ (cross-compiled with Mingw32) with
7
+ CHEAP_SFX_AUTORUN defined, and hacked process.c
8
+ so it doesn't confirm the Auto-run command.
9
+
10
+ Use 'make' to makke a new cameron-voice.exe from the WAVs.
cameron-exe-readme.txt ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ These syllables were recorded by Cameron Wong
2
+ (developer of the Ekho speech synthesizer).
3
+
4
+ You can redistribute and/or modify these recordings under the terms of
5
+ the GNU General Public License as published by the Free Software
6
+ Foundation; either version 3 of the License, or (at your option) any
7
+ later version.
8
+
9
+ These recordings are distributed in the hope that they will be useful,
10
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
11
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12
+ General Public License for more details.
13
+
14
+ If you are running on Linux on a solid-state device (OLPC XO, NSLU2, etc),
15
+ you probably don't want Gradint to have to concatenate these files to make a
16
+ custom WAV for each phrase. Linux is usually good enough for Gradint not to
17
+ have to do this, in which case you can convert them back to WAV by doing:
18
+
19
+ for N in cant/wong/*.raw ; do sox -t raw -r 44100 -s -2 $N $(echo $N|sed -e s/raw$/wav/) && rm $N; done && rm header.wav
setup.bat ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ @echo off
2
+
3
+ if exist gradint-wrapper.exe goto alreadyInRightDir
4
+
5
+ rem find where gradint is
6
+ if not exist "%HOMEDRIVE%%HOMEPATH%" set HOMEDRIVE=C:
7
+ if not exist "%HOMEDRIVE%%HOMEPATH%" set HOMEPATH="\Program Files"
8
+ if not exist "%USERPROFILE%" set USERPROFILE="C:\WINDOWS"
9
+
10
+ if not exist "%HOMEDRIVE%%HOMEPATH%\gradint" mkdir "%HOMEDRIVE%%HOMEPATH%\gradint"
11
+ rem (allow install before gradint is installed)
12
+
13
+ if exist "%HOMEDRIVE%%HOMEPATH%\gradint\partials" goto copy
14
+ rem see if we have the XP general directory-move command (probably won't work on 95 or Vista)
15
+ move partials "%HOMEDRIVE%%HOMEPATH%\gradint\partials"
16
+ if errorlevel 1 goto copy
17
+ goto alreadyInRightDir
18
+ :copy
19
+ xcopy /Y partials "%HOMEDRIVE%%HOMEPATH%\gradint\partials\" /S
20
+ rmdir partials /S /Q
21
+ :alreadyInRightDir
22
+ rem restart gradint
23
+ tskill gradint-wrapper 2>nul
24
+ taskkill /f /im gradint-wrapper.exe 2>nul >nul
25
+ pushd "%HOMEDRIVE%%HOMEPATH%\gradint"
26
+ if exist gradint-wrapper.exe start gradint-wrapper.exe once_per_day=2
27
+ popd
28
+ :end
29
+ del setup.bat
unzipsfx.exe ADDED
Binary file (49.2 kB). View file