cewsubprocess¶
This module contains the following classes:
aeneas.cewsubprocess.CEWSubprocess
which is an helper class executes theaeneas.cew
C extension in a separate process viasubprocess
.
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:
- https://groups.google.com/d/msg/aeneas-forced-alignment/NLbtSRf2_vg/mMHuTQiFEgAJ
- 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 theaeneas.cewsubprocess.CEWSubprocess.main()
function viasubprocess
.Parameters: - rconf (
RuntimeConfiguration
) – a runtime configuration - logger (
Logger
) – the logger object
-
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)
- rconf (