-
Notifications
You must be signed in to change notification settings - Fork 7
/
INSTALL
229 lines (185 loc) · 11.1 KB
/
INSTALL
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
==============================
Building and Installing Speect
==============================
This document describes how to install Speect from
source in a new location and customize that installation.
#. `Prerequisites`_
#. `Optional`_
#. `Configuration and Compilation`_
#. `Configuration Options in CMake`_
#. `Plug-in Options in CMake`_
#. `Installation`_
Prerequisites
=============
In order to compile Speect you will need the following:
* an ANSI C/ISO C90 compliant compiler,
* CMake (http://www.cmake.org), at least version 2.8
Optional
========
To build the Python bindings you will need:
* SWIG (http://www.swig.org), at least version 1.3.40,
* Python (http://www.python.org), at least version 2.6.
To include the HMM-based synthesis plug-ins for the HTS Engine:
* HTS Engine (http://hts-engine.sourceforge.net), version dependent
on the voices being used.
Configuration and Compilation
=============================
CMake must be run to generate a build system for Speect. CMake
provides both a command-line tool and interactive interfaces. Advanced
users may wish to use the command-line tool but here we document the
CMake interactive interface.
With Speect the build system is placed in a separate tree (known as an
*out-of-source* build) to the source tree. It is preferable to do an
out-of-source build so that your source tree remains unchanged. An
in-source build puts generated files in your source tree, and can
sometimes lead to unwanted behaviour if you forget to clean the source
tree after you have made changes to the code. With an out-of-source
build you can just delete the whole tree. Also an out-of-source build
makes it easy to have multiple builds with different configurations
sharing the same source tree. Once a single in-source build has been
created it is the only build tree that can be associated with that
source tree. The default directory to place different builds is
``speect/build``.
CMake can be run from the command line on these platforms, or you can
use the CMake graphical interface (``cmake-gui``) if you have it
installed. The current working directory should be set to the desired
binary tree location in which the build system should be
generated. CMake will usually choose the system C compiler
automatically but it can be told to use specific compilers through the
``CC`` environment variable.
A typical build for Speect looks like this::
$ ls -d speect
speect/
$ cd speect/build
$ ccmake ../
$ make
The ``ccmake`` tool is a curses-based dialog that may be used to
interactively configure Speect. When it appears press ``c`` on the
keyboard to run the initial configuration of the Speect build system.
Eventually a set of configuration options will appear. These may be
edited using the arrow-keys and the ``ENTER`` key for navigation. See
below (`Configuration Options in CMake`_) for details on the meaning
of each of these options.
Once the options have been set as desired press ``c`` again to
reconfigure. New options may appear when earlier options are
adjusted. Keep adjusting options and pressing ``c`` until the desired
configuration is reached. Finally press ``g`` to actually generate the
build system. Now that the build system has been generated just run
``make`` or ``gmake`` to build Speect.
Alternatively one can pass CMake all the desired options through the
command line, for example::
$ ls -d speect
speect/
$ cd speect/build
$ cmake ../ -DERROR_HANDLING=off -DHTS_ENGINE_INCLUDE_104=/path/to/hts/include \
-DHTS_ENGINE_LIB_104=/path/to/hts/lib/libHTSEngine.a
$ make
NOTE: The ``ccmake`` curses dialog is the most commonly used interactive
interface for CMake on UNIX-like platforms, so these instructions
assume it is available. Some system administrators may not have
installed curses in which case ``ccmake`` will not be available. On these
platforms one may use the command ``cmake -i`` in place of ccmake and
follow the on-screen instructions to configure Speect. See the CMake
documentation for further details.
Configuration Options in CMake
==============================
Several configuration options are available to customize the Speect
build system. These options are configured through an interactive
CMake interface as described above. Note that not all options are
available on all platforms, and some options are available only when
other options are set to a particular value.
The interactive CMake interface provides brief documentation for every
option. Some options have more meaning than can be described in one
sentence, so additional documentation is provided here:
+----------------------+------------------+------------------------+--------------+
|Variable |Options |Docstring |Default |
+======================+==================+========================+==============+
|CMAKE_BUILD_TYPE |Debug, Release, |The build type |Debug |
| |RelWithDebInfo, |influences the C | |
| |MinSizeRel, |optimization and debug | |
| |Profile |compilation flags. | |
+----------------------+------------------+------------------------+--------------+
|CMAKE_INSTALL_PREFIX | |The installation path |``/usr/local``|
| | |for the ``make install``| |
| | |command. | |
+----------------------+------------------+------------------------+--------------+
|ERROR_ABORT_FATAL |ON or OFF |Call libc abort() or |OFF |
| | |gracefully exit with | |
| | |error log. | |
+----------------------+------------------+------------------------+--------------+
|ERROR_HANDLING |ON or OFF |Use Speect error |ON |
| | |handling mechanism. | |
+----------------------+------------------+------------------------+--------------+
|LIB_SUFFIX | |Suffix for library | |
| | |directories, e.g. "64" | |
+----------------------+------------------+------------------------+--------------+
|SAFE_CAST |ON or OFF |If ON then all Speect |ON |
| | |object casting will be | |
| | |checked. | |
+----------------------+------------------+------------------------+--------------+
|STRICT_WARN |ON or OFF |Enable stricter compile |OFF |
| | |flags. | |
+----------------------+------------------+------------------------+--------------+
|WANT_EXAMPLES |ON or OFF |Include examples in |OFF |
| | |build process. | |
+----------------------+------------------+------------------------+--------------+
|WANT_TESTS |ON or OFF |Inlcuded tests in build |OFF |
| | |process. | |
+----------------------+------------------+------------------------+--------------+
|WANT_THREADS |ON or OFF |Enable multi threaded |OFF |
| | |support. | |
+----------------------+------------------+------------------------+--------------+
|WARN_DECL_AFTER_STMT |ON or OFF |Warn about declarations |OFF |
| | |after statements (GCC) | |
+----------------------+------------------+------------------------+--------------+
|WANT_PYTHON_WRAPPER |ON or OFF |Include Python bindings |ON |
| | |in build process. | |
+----------------------+------------------+------------------------+--------------+
|WANT_PYTHON_3 |ON or OFF |Build Python wrappers |OFF |
| | |for Python version 3.x | |
+----------------------+------------------+------------------------+--------------+
Plug-in Options in CMake
========================
Some plug-ins only get compiled if the required external files and
libraries are available. The options include:
* HMM-based synthesis plug-ins for the HTS Engine:
The HTS Engine compile time options for HTS Engine plug-ins are in
the form HTS_ENGINE_INCLUDE_* and HTS_ENGINE_LIB_*, where * denotes
the HTS Engine version. These options are added as plug-ins for new
HTS Engine versions are added, and versions 1.03, 1.04 and 1.05 are
currently supported. For example:
+------------------------+-----------------------------------------------------------+
|Variable |Docstring |
+========================+===========================================================+
|HTS_ENGINE_INCLUDE_103 |Path to HTS Engine version 1.03 include directory. |
| | |
+------------------------+-----------------------------------------------------------+
|HTS_ENGINE_LIB_103 |Full path and name to the HTS Engine version 1.03 library. |
| | |
+------------------------+-----------------------------------------------------------+
Installation
============
Speect can be used from the build tree or it can be installed. When
using the Speect Python bindings from the build tree one needs to tell
Python where to find Speect. This is done by adding the
``speect/build/swig/python`` path to the PYTHONPATH environment
variable.
Installing Speect from a source distribution requires first that it be
compiled in a build tree. See the `Configuration and Compilation`_
section above for details. Once Speect has been compiled in a build
tree one may build the install target to actually put Speect in an
installation tree. If Speect was built using a CMake Makefile
generator then this is done by running ``make install`` from the top
of the build tree. The installation process will install all files in
a directory structure rooted at the directory specified by
CMAKE_INSTALL_PREFIX.
WARNING: The ``make install`` command has an option to specify a
destination directory (``DESTDIR`` = "...") on the command line or
through an environment variable. If ``DESTDIR`` is specified then
Speect needs the environment variable SPCT_PLUGIN_PATH set to the
``DESTDIR``/CMAKE_INSTALL_PREFIX/speect/plugins directory to be able
to find the plug-ins (see the default plug-in path documentation for
more details).
The Python wrappers are installed using ``distutils`` as follows::
$ cd speect/build/swig/python
$ python setup.py install