cewsubprocess

This module contains the following classes:

This module works around a problem with the eSpeak library, which seems to generate different audio data for the same input parameters/text, when run multiple times in the same process. See the following discussions for details:

  1. https://groups.google.com/d/msg/aeneas-forced-alignment/NLbtSRf2_vg/mMHuTQiFEgAJ
  2. https://sourceforge.net/p/espeak/mailman/message/34861696/

Warning

This module might be removed in a future version.

New in version 1.5.0.

class aeneas.cewsubprocess.CEWSubprocess(logger=None, rconf=None)[source]

This helper class executes the aeneas.cew C extension in a separate process by running the aeneas.cewsubprocess.CEWSubprocess.main() function via subprocess.

Parameters:
synthesize_multiple(audio_file_path, c_quit_after, c_backwards, u_text)[source]

Synthesize the text contained in the given fragment list into a wav file.

Parameters:
  • audio_file_path (string) – the path to the output audio file
  • c_quit_after (float) – stop synthesizing as soon as reaching this many seconds
  • c_backwards (bool) – synthesizing from the end of the text file
  • u_text (object) – a list of (voice_code, text) tuples
Return type:

tuple (sample_rate, synthesized, intervals)

aeneas.cewsubprocess.main()[source]

Run aeneas.cew, reading input text from file and writing audio and interval data to file.