Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
galateatalk [2011/10/08 23:06] nishimotzgalateatalk [2011/10/11 10:40] (current) nishimotz
Line 337: Line 337:
 see [[project:jagtalk]] see [[project:jagtalk]]
  
-===== Mac build (32bit, without ports) =====+===== Mac build (32bit, euc-jp, without ports) =====
  
 since 2011-10-08 since 2011-10-08
Line 358: Line 358:
 <code> <code>
 $ tar xvfz chasen-2.4.4.tar.gz $ tar xvfz chasen-2.4.4.tar.gz
 +$ cd chasen-2.4.4
 +$ make distclean
 +$ CFLAGS='-arch i386 -m32' CXXFLAGS='-arch i386 -m32' LDFLAGS='-arch i386' ./configure; make
 +$ sudo make install
 +$ file /usr/local/bin/chasen
 +/usr/local/bin/chasen: Mach-O executable i386
 +</code>
 +
 +chaone (from tokuteicorpus site or galateatalk sourceforge.jp site)
 +
 +  * to use the system libraries for XML, chaone was build as the 64bit binary.
 +
 +<code>
 +$ tar xvfz chaone-1.3.3.tar.gz
 +$ cd chaone-1.3.3
 +$ CFLAGS='-I/usr/include/libxslt -I/usr/include/libxml2' CPPFLAGS=$CFLAGS sh configure
 +$ make
 +$ chmod 755 install-sh
 +$ sudo make install
 +$ file /usr/local/chaone/chaone
 +/usr/local/chaone/chaone: Mach-O 64-bit executable x86_64
 +</code>
 +
 +The installer seems forgetting to copy a file..
 +
 +<code>
 +$ sudo cp ap_pos_rule.xml /usr/local/chaone/
 +</code>
 +
 +prepare speakers and unidic-chasen:
 +
 +<code>
 +$ ls ~/work/galatea/speakers-060820/
 +female01 male01
 +</code>
 +<code>
 +$ ls ~/work/galatea/unidic-chasen1312_eucj/
 +ChangeLog chadic.lex grammar.cha table.cha
 +cforms.cha chasenrc license.txt
 +chadic.da chasenrc_chaone manual.pdf
 +chadic.dat ctypes.cha matrix.cha
 +</code>
 +
 +copy and build [[http://en.nishimotz.com/project:jagtalk|jagtalk]]:
 +
 +<code>
 +$ git clone https://nishimotz@github.com/nishimotz/jagtalk.git
 +$ cd jagtalk
 +$ make -f Makefile.MACOSX
 +</code>
 +
 +  * https://github.com/nishimotz/jagtalk
 +
 +check the files below (modify them if necessary):
 +
 +<code>
 +$ cat test-jagtalk-macosx.sh 
 +cat 00-testcmd | ./jagtalk -C jagtalk-macosx.conf
 +</code>
 +<code>
 +$ cat 00-testcmd 
 +set Text = 123
 +set SaveWAV = _out.wav
 +set Run = EXIT
 +</code>
 +<code>
 +$ cat jagtalk-macosx.conf
 +# configuratiuon file for gtalk (GalateaTalk)
 +# macosx: http://en.nishimotz.com/galateatalk
 +
 +CHASEN: /usr/local/bin/chasen
 +CHAONE: /usr/local/chaone/chaone -s gtalk --encoding EUC-JP
 +CHASEN-RC: ./chasenrc-euc-jp-macosx
 +
 +# default for numbers and alphabets
 +NUMBER: DECIMAL
 +ALPHABET: WORD
 +DATE: YMD
 +TIME: hms
 +
 +# dictionary
 +DICTIONARY: ./gtalk-eucjp.dic
 +
 +# automatic play of synthesized speech
 +AUTO-PLAY: NO
 +
 +# time delay [msec] for autuomatic play
 +AUTO-PLAY-DELAY: 250
 +
 +# file of phoneme list
 +PHONEME-LIST: mono.lst
 +
 +# parameter files for each speaker
 +SPEAKER-ID: female01
 +GENDER: female
 +DUR-TREE-FILE:   ../../galatea/speakers-060820/female01/tree-dur.inf
 +PIT-TREE-FILE:   ../../galatea/speakers-060820/female01/tree-lf0.inf
 +MCEP-TREE-FILE:  ../../galatea/speakers-060820/female01/tree-mcep.inf
 +DUR-MODEL-FILE:  ../../galatea/speakers-060820/female01/duration.pdf
 +PIT-MODEL-FILE:  ../../galatea/speakers-060820/female01/lf0.pdf
 +MCEP-MODEL-FILE: ../../galatea/speakers-060820/female01/mcep.pdf
 +</code>
 +
 +chasenrc-euc-jp-macosx contains EUC-JP charactors.
 +
 +<code>
 +$ cat chasenrc-euc-jp-macosx
 +;;
 +;;  chasenrc for unidic / chaOne
 +;;
 +(GRAMMAR /Users/nishimotz/work/galatea/unidic-chasen1312_eucj)
 +(DADIC chadic)
 +
 +(UNKNOWN_POS (名詞 普通名詞 一般))
 +
 +(OUTPUT_FORMAT "<W1 orth=\"%m\" kana=\"%?U/%m/%y0/\" pron=\"%?U/%m/%a0/\" pos=\"%U(%P-)\"%?T/ cType=\"%T \"//%?F/ cForm=\"%F \"//%?I/ %i0//>%m</W1>\n")
 +
 +(OUTPUT_COMPOUND "SEG")
 +
 +(BOS_STRING "<S>\n"     
 +(EOS_STRING "</S>\n")
 +
 +(DEF_CONN_COST 10000)
 +(POS_COST
 + ((*)       1)
 + ((UNKNOWN) 30000)
 +)
 +
 +(CONN_WEIGHT 1)
 +(MORPH_WEIGHT 1)
 +(COST_WIDTH  0)
 +
 +(ANNOTATION
 + (("<" ">") "%m\n")
 + (("\"") "<cha:W1 orth=\"&#x22;\" kana=\"&#x22;\" pron=\"&#x22;\" pos=\"%U(%P-)\"%?T/ cType=\"%T \"//%?F/ cForm=\"%F \"//%?I/ %i//>%m</cha:W1>\n")
 +)
 +</code>
 +
 +run the test script, open _out.wav using QuickTime Player. You will hear 'hyaku ni juu san' (123 in Japanese).
 +
 +<code>
 +$ sh test-jagtalk-macosx.sh
 +</code>
 +
 +jagtalk now uses Mac audio device:
 +
 +<code>
 +$ sh run-jagtalk-macosx.sh
 +</code>
 +
 +<code>
 +$ cat 00-testcmd-speaker 
 +set Speak.syncinterval = 500
 +set Text = 123456789
 +set Speak = NOW
 </code> </code>
  
galateatalk.1318082770.txt.gz · Last modified: 2011/10/08 23:06 by nishimotz
www.chimeric.de Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0