aeneas.cew is a Python C extension to synthesize text with eSpeak.

The only function provided by this module is:

cew.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 number synt of fragments actually synthesized might be less than the number of fragments in text.

  • 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. The voice_code is the the eSpeak voice code (e.g., en, en-gb, it, etc.). The fragment_text must be UTF-8 encoded.
Return type: