README 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320
  1. Flite: a small run-time speech synthesis engine
  2. version 2.0.0-release
  3. Copyright Carnegie Mellon University 1999-2014
  4. All rights reserved
  5. http://cmuflite.org
  6. Flite is a small fast run-time speech synthesis engine. It is the
  7. latest addition to the suite of free software synthesis tools
  8. including University of Edinburgh's Festival Speech Synthesis System
  9. and Carnegie Mellon University's FestVox project, tools, scripts and
  10. documentation for building synthetic voices. However, flite itself
  11. does not require either of these systems to compile and run.
  12. The core Flite library was developed by Alan W Black <awb@cs.cmu.edu>
  13. (mostly in his so-called spare time) while employed in the Language
  14. Technologies Institute at Carnegie Mellon University. The name
  15. "flite", originally chosen to mean "festival-lite" is perhaps doubly
  16. appropriate as a substantial part of design and coding was done over
  17. 30,000ft while awb was travelling, and (usually) isn't in meetings.
  18. The voices, lexicon and language components of flite, both their
  19. compression techniques and their actual contents were developed by
  20. Kevin A. Lenzo <lenzo@cs.cmu.edu> and Alan W Black <awb@cs.cmu.edu>.
  21. Flite is the answer to the complaint that Festival is too big, too slow,
  22. and not portable enough.
  23. o Flite is designed for very small devices, such as PDAs, and also
  24. for large server machines which need to serve lots of ports.
  25. o Flite is not a replacement for Festival but an alternative run time
  26. engine for voices developed in the FestVox framework where size and
  27. speed is crucial.
  28. o Flite is all in ANSI C, it contains no C++ or Scheme, thus requires
  29. more care in programming, and is harder to customize at run time.
  30. o It is thread safe
  31. o Voices, lexicons and language descriptions can be compiled
  32. (mostly automatically for voices and lexicons) into C representations
  33. from their FestVox formats
  34. o All voices, lexicons and language model data are const and in the
  35. text segment (i.e. they may be put in ROM). As they are linked in
  36. at compile time, there is virtually no startup delay.
  37. o Although the synthesized output is not exactly the same as the same
  38. voice in Festival they are effectively equivalent. That is, flite
  39. doesn't sound better or worse than the equivalent voice in festival,
  40. just faster, smaller and scalable.
  41. o For standard diphone voices, maximum run time memory
  42. requirements are approximately less than twice the memory requirement
  43. for the waveform generated. For 32bit archtectures
  44. this effectively means under 1M.
  45. o The flite program supports, synthesis of individual strings or files
  46. (utterance by utterance) to direct audio devices or to waveform files.
  47. o The flite library offers simple functions suitable for use in specific
  48. applications.
  49. Flite is distributed with a single 8K diphone voice (derived from the
  50. cmu_us_kal voice), a pruned lexicon (derived from
  51. cmulex) and a set of models for US English. Here are comparisons
  52. with Festival using basically the same 8KHz diphone voice
  53. Flite Festival
  54. core code 60K 2.6M
  55. USEnglish 100K ??
  56. lexicon 600K 5M
  57. diphone 1.8M 2.1M
  58. runtime <1M 16-20M
  59. On a 500Mhz PIII, a timing test of the first two chapters of
  60. "Alice in Wonderland" (doc/alice) was done. This produces about
  61. 1300 seconds of speech. With flite it takes 19.128 seconds (about
  62. 70.6 times faster than real time) with Festival it takes 97 seconds
  63. (13.4 times faster than real time). On the ipaq (with the 16KHz diphones)
  64. flite synthesizes 9.79 time faster than real time.
  65. Requirements:
  66. o A good C compiler, some of these files are quite large and some C
  67. compilers might choke on these, gcc is fine. Sun CC 3.01 has been
  68. tested too. Visual C++ 6.0 is known to fail on the large diphone
  69. database files. We recommend you use GCC under Cygwin or mingw32
  70. instead.
  71. o GNU Make
  72. o An audio device isn't required as flite can write its output to
  73. a waveform file.
  74. Supported platforms:
  75. We have successfully compiled and run on
  76. o Various Intel Linux systems (and iPaq Linux), under various versions
  77. of GCC (2.7.2 to 4.x)
  78. o Mac OS X
  79. o Various Android devices
  80. o FreeBSD 3.x and 4.x
  81. o Solaris 5.7, and Solaris 9
  82. o Windows 2000/XP and later under Cygwin 1.3.5 and later
  83. o Successfully compiles and runs under 64Bit Linux architectures
  84. o OSF1 V4.0 (gives an unimportant warning about sizes when compiled cst_val.c)
  85. Previously we supported PalmOS and Windows CE but these seem to be rare
  86. nowadays so they are no longer actively supported.
  87. Other similar platforms should just work, we have also cross compiled
  88. on a Linux machine for StrongARM. However note that new byte order
  89. architectures may not work directly as there is some careful
  90. byte order constraints in some structures. These are portable but may
  91. require reordering of some fields, contact us if you are moving to
  92. a new archiecture.
  93. News
  94. ----
  95. New in 2.0.0 (Dec 2014)
  96. o Indic language support (Hindi, Tamil and Telugu)
  97. o SSML support
  98. o CG voices as files accessilble by file:/// and http://
  99. (and set of 13 voices to load)
  100. o random forest (multimodel support) improves voice quality
  101. o Supports diffrent sample rates/mgc order to tune for speed
  102. o Kal diphone 500K smaller
  103. o Fixed lots of API issues
  104. o thread safe (again) after initialization
  105. o Generalized tokenstreams (used in Bard Storyteller)
  106. o simple-Pulseaudio support
  107. o Improved Android support
  108. o Removed PalmOS support from distribution
  109. o Companion multilingual ebook reader Bard Storyteller
  110. http://festvox.org/bard/
  111. New in 1.4.1 (March 2010)
  112. o better ssml support (actually does something)
  113. o better clunit support (smaller)
  114. o Android support
  115. New in 1.4 (December 2009)
  116. o crude multi-voice selection support (may change)
  117. o 4 basic voices are included 3 clustergen (awb, rms and slt) plus
  118. the kal diphone database
  119. o CMULEX now uses maximum onset for syllabification
  120. o alsa support
  121. o Clustergen support (including mlpg with mixed excitation)
  122. But is still slow on limited processors
  123. o Windows support with Visual Studio (specifically for the Olympus
  124. Spoken Dialog System)
  125. o WinCE support is redone with cegcc/mingw32ce with example
  126. example TTS app: Flowm: Flite on Windows Mobile
  127. o Speed-ups in feature interpretation limiting calls to alloc
  128. o Speed-ups (and fixes) for converting clunits festvox voices
  129. New in 1.3-release (October 2005)
  130. o fixes to lpc residual extraction to give better quality output
  131. o An updated lexicon (festlex_CMU from festival-2.0.95) and better
  132. compression its about 30% of the previous size, with about
  133. the same accuracy
  134. o Fairly substantial code movements to better support PalmOS and
  135. multi-platform cross compilation builds
  136. o A PalmOS 5.0 port with an small example talking app ("flop")
  137. o runs under ix86_64 linux
  138. New in 1.2-release (February 2003)
  139. o A build process for diphone and clunits/ldom voices
  140. FestVox voices can be converted (sometimes) automatically
  141. o Various bug fixes
  142. o Initial support for Mac OS X (not talking to audio device yet)
  143. but compiles and runs
  144. o Text files can be synthesize to a single audio file
  145. o (optional) shared library support (Linux)
  146. Compilation
  147. -----------
  148. In general
  149. tar zxvf flite-2.0.0-release.tar.gz
  150. cd flite-2.0.0-release
  151. ./configure
  152. make
  153. Where tar is gnu tar (gtar), and make is gnu make (gmake).
  154. Configuration should be automatic, but maybe doesn't work in all cases
  155. especially if you have some new compiler. You can explicitly set to
  156. compiler in config/config and add any options you see fit. Configure
  157. tries to guess these but it might be able for cross compilation cases
  158. Interesting options there are
  159. -DWORDS_BIGENDIAN=1 for bigendian machines (e.g. Sparc, M68x)
  160. -DNO_UNION_INITIALIZATION=1 For compilers without C 99 union inintialization
  161. -DCST_AUDIO_NONE if you don't need/want audio support
  162. There are different sets of voices and languages you can select between
  163. them (and your own sets if you make config/XXX.lv). For example
  164. ./configure --with-langvox=transtac
  165. Will use the languages and voices defined in config/transtac.lv
  166. Usage:
  167. ------
  168. The ./bin/flite voices contains all supported voices and you may
  169. choose between the voices with the -voice flag and list the supported
  170. voices with the -lw flag. Note the kal (diphone) voice is a different
  171. technology from the others and is much less computationally expensive
  172. but more robotic. For each voice additional binaries that contain
  173. only that voice are created in ./bin/flite_FULLVOICENAME,
  174. e.g. ./bin/flite_cmu_us_awb.
  175. If it compiles properly a binary will be put in bin/, note by
  176. default -g is on so it will be bigger than is actually required
  177. ./bin/flite "Flite is a small fast run-time synthesis engine" flite.wav
  178. Will produce an 8KHz riff headered waveform file (riff is Microsoft's
  179. wave format often called .WAV).
  180. ./bin/flite doc/alice
  181. Will play the text file doc/alice. If the first argument contains
  182. a space it is treated as text otherwise it is treated as a filename.
  183. If a second argument is given a waveform file is written to it,
  184. if no argument is given or "play" is given it will attempt to
  185. write directly to the audio device (if supported). if "none"
  186. is given the audio is simply thrown away (used for benchmarking).
  187. Explicit options are also available.
  188. ./bin/flite -v doc/alice none
  189. Will synthesize the file without playing the audio and give a summary
  190. of the speed.
  191. ./bin/flite doc/alice alice.wav
  192. will synthesize the whole of alice into a single file (previoous
  193. versions would only give the last utterance in the file, but
  194. that is fixed now).
  195. An additional set of feature setting options are available, these are
  196. *debug* options, Voices are represented as sets of feature values (see
  197. lang/cmu_us_kal/cmu_us_kal.c) and you can override values on the
  198. command line. This can stop flite from working if malicious values
  199. are set and therefor this facility is not intended to be made
  200. available for standard users. But these are useful for
  201. debugging. Some typical examples are
  202. ./bin/flite --sets join_type=simple_join doc/intro
  203. Use simple concatenation of diphones without prosodic modification
  204. ./bin/flite -pw doc/alice
  205. Print sentences as they are said
  206. ./bin/flite --setf duration_stretch=1.5 doc/alice
  207. Make it speak slower
  208. ./bin/flite --setf int_f0_target_mean=145 doc/alice
  209. Make it speak higher
  210. The talking clock is an example talking clode as discussed on
  211. http://festvox.org/ldom it requires a single argument HH:MM
  212. under Unix you can call it
  213. ./bin/flite_time `date +%H:%M`
  214. ./bin/flite -lv
  215. List the voices linked in directly in this build
  216. ./bin/flite -voice rms -f doc/alice
  217. Speak with the US male rms voice
  218. ./bin/flite -voice awb -f doc/alice
  219. Speak with the "Scottish" male awb voice
  220. ./bin/flite -voice slt -f doc/alice
  221. Speak with the US female slt voice
  222. ./bin/flite -voice http://festvox.org/flite/voices/US/cmu_us_ksp.flitevox -f doc/alice
  223. Speak with KSP voice, download on the fly from festvox.org
  224. ./bin/flite -voice voices/cmu_us_ahw.flitevox -f doc/alice
  225. Speak with AHW voice loaded from the local file.
  226. Voice names are identified as loadable files if the name includes a
  227. "/" (slash) otherwise they are treated as internal names. So if you
  228. want to load voices from the current directory you need to prefix the
  229. with "./".
  230. Voice quality
  231. -------------
  232. So you've eagerly downloaded flite, compiled it and run it, now you
  233. are disappointed that it doesn't sound wonderful, sure its fast and
  234. small but what you really hoped for was the dulcit tones of a deep
  235. baritone voice that would make you desperately hang on every phrase it
  236. mellifluously produces. But instead you get an 8Khz diphone voice that
  237. sounds like it came from the last millenium.
  238. Well, first, you are right, it is an 8KHz diphone voice from the last
  239. millenium, and that was actually deliberate. As we developed flite we
  240. wanted a voice that was stable and that we could directly compare with
  241. that very same voice in Festival. Flite is an *engine*. We want to
  242. be able take voices built with the FestVox process and compile them
  243. for flite, the result should be exactly the same quality (though of
  244. course trading the size for quality in flite is also an option). The
  245. included voice is just a sample voice that was used in the testing
  246. process.
  247. We expect that often voices will be loaded from external files, and we
  248. have now set up a voice repository on
  249. http://festvox.org/flite/voices/LANG/*.flitevox
  250. If you visit there with a browser you can hear the examples. You can
  251. also download the .flitevox files to you machine so you don't need a
  252. network connect everytime you need to load a voice.
  253. We are now actively adding to this list of available voices in English
  254. and other languages.
  255. Bard Storyteller: http://festvox.org/bard/
  256. -------------------------------------------
  257. Bard is a companion app that read ebooks, both displaying them and
  258. actually reading them to you using flite. Bard supports a wide
  259. range of fonts, and flite voices, and books in text, html and
  260. epub format. Bard is used as a evaluation of flites capabilities
  261. and an example of a serious application using flite.