[77811] trunk/dports/audio

ryandesign at macports.org ryandesign at macports.org
Wed Apr 13 21:02:05 PDT 2011


Revision: 77811
          http://trac.macports.org/changeset/77811
Author:   ryandesign at macports.org
Date:     2011-04-13 21:02:05 -0700 (Wed, 13 Apr 2011)
Log Message:
-----------
open_jtalk: new port, version 1.02; see #29075

Added Paths:
-----------
    trunk/dports/audio/open_jtalk/
    trunk/dports/audio/open_jtalk/Portfile
    trunk/dports/audio/open_jtalk/files/
    trunk/dports/audio/open_jtalk/files/open_jtalk_demo
    trunk/dports/audio/open_jtalk/files/patch-Makefile.diff

Added: trunk/dports/audio/open_jtalk/Portfile
===================================================================
--- trunk/dports/audio/open_jtalk/Portfile	                        (rev 0)
+++ trunk/dports/audio/open_jtalk/Portfile	2011-04-14 04:02:05 UTC (rev 77811)
@@ -0,0 +1,62 @@
+# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
+# $Id$
+
+PortSystem          1.0
+
+name                open_jtalk
+version             1.02
+categories          audio japanese
+platforms           darwin
+maintainers         nomaintainer
+license             BSD
+
+description         Japanese text-to-speech synthesis system
+
+long_description    Open JTalk is a Japanese text-to-speech synthesis system.
+
+homepage            http://open-jtalk.sourceforge.net/
+master_sites        sourceforge:open-jtalk
+
+checksums           ${distname}${extract.suffix} \
+                        sha1    cc3e4b1b04600ad2d526f07a33e2b2978f47ee2b \
+                        rmd160  875463e70dea02b702719546905a3b86df78bcb2
+
+depends_lib         port:hts_engine_API \
+                    port:libiconv
+
+patchfiles          patch-Makefile.diff
+
+use_autoreconf      yes
+
+configure.args      --with-hts-engine-header-path=${prefix}/include \
+                    --with-hts-engine-library-path=${prefix}/lib
+
+default_variants    +voice
+
+set voice_name      hts_voice_nitech_jp_atr503_m001
+set voice_model     ${voice_name}-${version}
+
+variant voice description {Add HTS voice and a demo script} {
+    distfiles-append    ${voice_model}${extract.suffix}
+    checksums-append    ${voice_model}${extract.suffix} \
+                            sha1    aea8118b703a3dc5681fdffbafa42e5ad8e007d0 \
+                            rmd160  2856c060f983c63fc9632ab56fa4e2443abf585d
+
+    post-destroot {
+        # copy the voice model data.
+        set voice_dir    ${prefix}/lib/${name}/${voice_model}
+        copy ${workpath}/${voice_model} ${destroot}${voice_dir}
+        # configure an executable demo script file.
+        set script_name  open_jtalk_demo
+        set script_dest  ${destroot}${prefix}/bin/${script_name}
+        set dic_dir      ${prefix}/lib/${name}/dic
+        xinstall -m 755 ${filespath}/${script_name} ${script_dest}
+        reinplace "s|@prefix@|${prefix}|g" ${script_dest}
+        reinplace "s|@voice_dir@|${voice_dir}|g" ${script_dest}
+        reinplace "s|@dic_dir@|${dic_dir}|g" ${script_dest}
+    }
+}
+
+livecheck.type      regex
+livecheck.url       http://sourceforge.net/projects/open-jtalk/files/
+livecheck.regex     /${name}-(\[0-9.\]+)/


Property changes on: trunk/dports/audio/open_jtalk/Portfile
___________________________________________________________________
Added: svn:keywords
   + Id
Added: svn:eol-style
   + native

Added: trunk/dports/audio/open_jtalk/files/open_jtalk_demo
===================================================================
--- trunk/dports/audio/open_jtalk/files/open_jtalk_demo	                        (rev 0)
+++ trunk/dports/audio/open_jtalk/files/open_jtalk_demo	2011-04-14 04:02:05 UTC (rev 77811)
@@ -0,0 +1,42 @@
+#!/bin/bash
+# Shell wrapper for Open JTalk.
+
+VOICE_DIR=@voice_dir@
+DIC_DIR=@dic_dir@
+
+CMDNAME=`basename $0`
+
+case $1 in
+    -h) echo "Usage: $CMDNAME [-h] [-i infile]" 1>&2 ; exit 0 ;;
+    -i) shift ;;
+    *)  set -- /dev/stdin ;;
+esac
+
+WAVFILE="/tmp/$CMDNAME-$$.wav"
+
+while read LINE
+do
+    echo $LINE | @prefix@/bin/iconv -t EUC-JP | @prefix@/bin/open_jtalk \
+        -td $VOICE_DIR/tree-dur.inf \
+        -tf $VOICE_DIR/tree-lf0.inf \
+        -tm $VOICE_DIR/tree-mgc.inf \
+        -md $VOICE_DIR/dur.pdf \
+        -mf $VOICE_DIR/lf0.pdf \
+        -mm $VOICE_DIR/mgc.pdf \
+        -df $VOICE_DIR/lf0.win1 \
+        -df $VOICE_DIR/lf0.win2 \
+        -df $VOICE_DIR/lf0.win3 \
+        -dm $VOICE_DIR/mgc.win1 \
+        -dm $VOICE_DIR/mgc.win2 \
+        -dm $VOICE_DIR/mgc.win3 \
+        -cf $VOICE_DIR/gv-lf0.pdf \
+        -cm $VOICE_DIR/gv-mgc.pdf \
+        -ef $VOICE_DIR/tree-gv-lf0.inf \
+        -em $VOICE_DIR/tree-gv-mgc.inf \
+        -k  $VOICE_DIR/gv-switch.inf \
+        -x  $DIC_DIR \
+        -ow $WAVFILE && afplay $WAVFILE
+done < "$1"
+
+rm -f $WAVFILE
+exit 0

Added: trunk/dports/audio/open_jtalk/files/patch-Makefile.diff
===================================================================
--- trunk/dports/audio/open_jtalk/files/patch-Makefile.diff	                        (rev 0)
+++ trunk/dports/audio/open_jtalk/files/patch-Makefile.diff	2011-04-14 04:02:05 UTC (rev 77811)
@@ -0,0 +1,22 @@
+--- mecab-naist-jdic/Makefile.am.orig	2010-12-13 12:26:13.000000000 +0900
++++ mecab-naist-jdic/Makefile.am	2011-04-10 16:25:04.000000000 +0900
+@@ -5,7 +5,7 @@
+ 
+ MAINTAINERCLEANFILES = Makefile.in char.bin matrix.bin sys.dic unk.dic
+ 
+-dicdir = @prefix@/dic
++dicdir = @prefix@/lib/open_jtalk/dic
+ 
+ dic_DATA   = char.bin matrix.bin sys.dic unk.dic left-id.def right-id.def rewrite.def pos-id.def
+ 
+--- mecab-naist-jdic/Makefile.in.orig	2010-12-18 18:14:24.000000000 +0900
++++ mecab-naist-jdic/Makefile.in	2011-04-10 16:31:36.000000000 +0900
+@@ -168,7 +168,7 @@
+ EXTRA_DIST = COPYING Makefile.mak naist-jdic.csv matrix.def left-id.def pos-id.def rewrite.def right-id.def char.def unk.def feature.def
+ DISTCLEANFILES = *.log *.out *~
+ MAINTAINERCLEANFILES = Makefile.in char.bin matrix.bin sys.dic unk.dic
+-dicdir = @prefix@/dic
++dicdir = @prefix@/lib/open_jtalk/dic
+ dic_DATA = char.bin matrix.bin sys.dic unk.dic left-id.def right-id.def rewrite.def pos-id.def
+ all: all-am
+ 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20110413/5512606b/attachment.html>


More information about the macports-changes mailing list