<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
  <!ENTITY % general-entities SYSTEM "../../general.ent">
  %general-entities;

  <!ENTITY freetts-download-http "&sourceforge-repo;/freetts/freetts-&freetts-version;-src.zip">
  <!ENTITY freetts-download-ftp  " ">
  <!ENTITY freetts-md5sum        "692b5ece251fed88539736e55af5f391">
  <!ENTITY freetts-size          "13.5 MB">
  <!ENTITY freetts-buildsize     "92 MB">
  <!ENTITY freetts-time          "0.3 SBU">

  <!ENTITY freetts-testsuite-download  "&sourceforge-repo;/freetts/freetts-&freetts-version;-tst.zip">
  <!ENTITY freetts-testsuite-md5sum    "4348c7db928612d4b6f6eb2fd621a949">
  <!ENTITY freetts-testsuite-size      "3.8 MB">

]>

<sect1 id="freetts" xreflabel="FreeTTS-&freetts-version;">
  <?dbhtml filename="freetts.html"?>

  <sect1info>
    <othername>$LastChangedBy: bdubbs $</othername>
    <date>$Date: 2015-02-27 19:21:33 -0500 (Fri, 27 Feb 2015) $</date>
  </sect1info>

  <title>FreeTTS-&freetts-version;</title>

  <indexterm zone="freetts">
    <primary sortas="a-FreeTTS">FreeTTS</primary>
  </indexterm>

  <sect2 role="package">
    <title>Introduction to FreeTTS</title>

    <para>
      The <application>FreeTTS</application> package contains a speech
      synthesis system written entirely in the <application>Java</application>
      programming language. It is based upon
      <ulink url="http://www.cmuflite.org/">Flite</ulink>: a small run-time
      speech synthesis engine developed at Carnegie Mellon University.
      <application>Flite</application> is derived from the
      <ulink url="http://www.cstr.ed.ac.uk/projects/festival/">Festival</ulink>
      Speech Synthesis System from the University of Edinburgh and the
      <ulink url ="http://festvox.org/">FestVox</ulink> project from Carnegie
      Mellon University. The <application>FreeTTS</application> package is used
      to convert text to audible speech through the system audio hardware.
    </para>

    &lfs77_checked;

    <bridgehead renderas="sect3">Package Information</bridgehead>
    <itemizedlist spacing="compact">
      <listitem>
        <para>
          Download (HTTP): <ulink url="&freetts-download-http;"/>
        </para>
      </listitem>
      <listitem>
        <para>
          Download (FTP): <ulink url="&freetts-download-ftp;"/>
        </para>
      </listitem>
      <listitem>
        <para>
          Download MD5 sum: &freetts-md5sum;
        </para>
      </listitem>
      <listitem>
        <para>
          Download size: &freetts-size;
        </para>
      </listitem>
      <listitem>
        <para>
          Estimated disk space required: &freetts-buildsize;
        </para>
      </listitem>
      <listitem>
        <para>
          Estimated build time: &freetts-time;
        </para>
      </listitem>
    </itemizedlist>

    <bridgehead renderas="sect3">Additional Downloads</bridgehead>
    <itemizedlist spacing="compact">
      <listitem>
        <para>
          Test suite: <ulink url="&freetts-testsuite-download;"/>
        </para>
      </listitem>
      <listitem>
        <para>
          Download MD5 sum: &freetts-testsuite-md5sum;
        </para>
      </listitem>
      <listitem>
        <para>
          Download size: &freetts-testsuite-size;
        </para>
      </listitem>
    </itemizedlist>

    <bridgehead renderas="sect3">FreeTTS Dependencies</bridgehead>

    <bridgehead renderas="sect4">Required</bridgehead>
    <para role="required">
      <xref linkend="apache-ant"/> and
      <xref linkend="sharutils"/>
    </para>

    <para condition="html" role="usernotes">User Notes:
      <ulink url="&blfs-wiki;/freetts"/>
    </para>
  </sect2>

  <sect2 role="installation">
    <title>Installation of FreeTTS</title>

    <para>
      The <application>FreeTTS</application> package is distributed in
      ZIP format and the <command>unzip</command> command will default to
      creating an unused source directory. Additionally,
      unzipping the test suite file will prompt for questions
      about overwriting existing files. Use the following commands to
      <command>unzip</command> the source files:
    </para>

<screen><userinput>unzip -q freetts-&freetts-version;-src.zip -x META-INF/* &amp;&amp;
unzip -q freetts-&freetts-version;-tst.zip -x META-INF/*</userinput></screen>

    <tip>
      <para>
        The <command>sh jsapi.sh</command> command below installs the Java
        Speech API components into the <application>FreeTTS</application> source
        tree. You will be required to view, and then accept (by entering a
        <keycap>y</keycap> keypress), a license agreement before the installation
        will continue. If you are scripting (automating) the build, you'll need
        to account for this. There is information about automating build commands
        in the <xref linkend="automating-builds"/> section of Chapter 2. Towards
        the end of this section, specific information for automating this type of
        installation is discussed.
      </para>
    </tip>

    <para>
      Install <application>FreeTTS</application> by running the following
      commands:
    </para>

<screen><userinput>sed -i 's/value="src/value="./' build.xml &amp;&amp;
cd lib      &amp;&amp;
sh jsapi.sh &amp;&amp;
cd ..       &amp;&amp;
ant</userinput></screen>

    <para>
      To test the results, issue:
    </para>

<screen><userinput>ant junit &amp;&amp;
cd tests &amp;&amp;
sh regression.sh &amp;&amp;
cd ..</userinput></screen>

    <para>
      Now, as the <systemitem class="username">root</systemitem> user:
    </para>

<screen role="root"><userinput>install -v -m755 -d /opt/freetts-&freetts-version;/{lib,docs/{audio,images}} &amp;&amp;
install -v -m644 lib/*.jar /opt/freetts-&freetts-version;/lib                &amp;&amp;
install -v -m644 *.txt RELEASE_NOTES docs/*.{pdf,html,txt,sx{w,d}} \
                               /opt/freetts-&freetts-version;/docs           &amp;&amp;
install -v -m644 docs/audio/*  /opt/freetts-&freetts-version;/docs/audio     &amp;&amp;
install -v -m644 docs/images/* /opt/freetts-&freetts-version;/docs/images    &amp;&amp;
cp -v -R javadoc               /opt/freetts-&freetts-version;                &amp;&amp;
ln -v -s freetts-&freetts-version; /opt/freetts</userinput></screen>

    <para>
      Optionally, install any or all of the additional
      <application>FreeTTS</application> components using the following
      commands as the <systemitem class="username">root</systemitem> user
      (see the Command Explanations section for details):
    </para>

<screen role="root"><userinput>cp -v -R bin    /opt/freetts-&freetts-version;        &amp;&amp;
install -v -m644 speech.properties $JAVA_HOME/jre/lib &amp;&amp;
cp -v -R tools  /opt/freetts-&freetts-version;        &amp;&amp;
cp -v -R mbrola /opt/freetts-&freetts-version;        &amp;&amp;
cp -v -R demo   /opt/freetts-&freetts-version;</userinput></screen>

  </sect2>

  <sect2 role="commands">
    <title>Command Explanations</title>

    <para>
      <command>sed -i 's/value="src/value="./' build.xml</command>: Fix an
      error in the build file to allow the program to find the source.
    </para>

    <para>
      <command>sh jsapi.sh</command>: This command installs the
      <application>Java Speech API</application> components into the
      <application>FreeTTS</application> source tree.
    </para>

    <para>
      <command>ant</command>: <application>FreeTTS</application> uses the
      <application>Apache Ant</application> build system instead of the GNU
      <application>autotools</application>. This commands builds everything,
      including the class libraries, tools and demos.
    </para>

    <para>
      <command>cp -v -R bin ...</command>;
      <command>install -v -m644 speech.properties</command>: These two commands
      install the demonstration programs. Optionally copy the
      <filename>speech.properties</filename> file to
      <filename>~/speech.properties</filename> if you don't want to make it
      available system-wide.
    </para>

    <para>
      <command>cp -v -R tools ...</command>: This installs the voice data
      import utilities. See the <filename>README.html</filename> files in the
      <filename class="directory">tools/</filename> subdirectories for
      information and instructions about using the tools.
    </para>

    <para>
      <command>cp -v -R mbrola ...</command>: This installs the
      <filename class="libraryfile">mbrola.jar</filename> file, required if you
      use the <ulink
      url="http://freetts.sourceforge.net/mbrola/README.html">MBROLA</ulink>
      voices.
    </para>

    <para>
      <command>cp -v -R demo ...</command>: This installs the sources
      and documentation for the demonstration programs.
    </para>

    <para>
      For additional information and documentation about the
      <application>FreeTTS</application> project, visit the main web
      page at <ulink url="http://freetts.sourceforge.net"/>.
    </para>

  </sect2>

  <sect2 role="testing">
    <title>Testing the Installation</title>

    <para>
      Test the installation using the following command:
    </para>

<screen><userinput>java -jar /opt/freetts/lib/freetts.jar \
    -text "This is a test of the FreeTTS speech synthesis system"</userinput></screen>

    <para>
      Depending on the setup of your audio drivers and software, you
      may have to add the <option>-streaming</option> switch to the command
      as shown below:
    </para>

<screen><userinput>java -jar /opt/freetts/lib/freetts.jar -streaming \
    -text "This is a test of the FreeTTS speech synthesis system"</userinput></screen>

  </sect2>

  <sect2 role="content">
    <title>Contents</title>

    <segmentedlist>
      <segtitle>Installed Programs</segtitle>
      <segtitle>Installed Libraries</segtitle>
      <segtitle>Installed Directory</segtitle>

      <seglistitem>
        <seg>
          None
        </seg>
        <seg>
          /opt/freetts-&freetts-version;/lib/*.jar
        </seg>
        <seg>
          /opt/freetts-&freetts-version;
        </seg>
      </seglistitem>
    </segmentedlist>

    <variablelist>
      <bridgehead renderas="sect3">Short Descriptions</bridgehead>
      <?dbfo list-presentation="list"?>
      <?dbhtml list-presentation="table"?>

      <varlistentry>
        <term><filename class="libraryfile">*.jar </filename></term>
        <listitem>
          <para>
            contains the class libraries which make up the
            <application>FreeTTS</application> speech synthesis system.
          </para>
        </listitem>
      </varlistentry>
    </variablelist>

  </sect2>

</sect1>
