aeneas.cfw¶
aeneas.cfw is a Python C++ extension to synthesize text with Festival.
The only function provided by this module is:
-
cfw.
synthesize_multiple
(output_file_path, quit_after, backwards, text)¶ Synthesize several text fragments into a single WAVE file.
The returned tuple
(sr, synt, anchors)
contains the sample rate of the output WAVE file, the number of fragments actually synthesized, and a list of time values, each representing the begin time in the output WAVE file of the corresponding text fragment.Note that if
quit_after
is specified, the numbersynt
of fragments actually synthesized might be less than the number of fragments intext
.Parameters: - output_file_path (string) – the path of the WAVE file to be created, UTF-8 encoded
- quit_after (float) – stop synthesizing after reaching the given duration (in seconds)
- backwards (int) – if nonzero, synthesize backwards, that is,
starting from the last fragment.
In any case, the fragments in the output WAVE file
will be in natural order.
This option is meaningful only if
quit_after > 0
. - text (list) – a list of
(voice_code, fragment_text)
tuples with the text to be synthesized. Thevoice_code
is the the Festival voice code (e.g.,(language_english)
,(language_scots_gaelic)
,(language_italian)
, etc.). Thefragment_text
must be UTF-8 encoded.
Return type: tuple