r4victor / afaligner

📈 A forced aligner intended for synchronization of narrated text
MIT License
81 stars 11 forks source link

Allow passing configuration into aeneas #10

Open dhouck opened 1 year ago

dhouck commented 1 year ago

For some reason (no clue what), I get terrible synchronization with espeak and espeak-ng, but decent synchronization with festival. Itʼd be nice to be able to pass tts=festival into aeneas. I have a hardcoded patch Iʼve applied:

from aeneas.runtimeconfiguration import RuntimeConfiguration as RConf

and replace the existing synthesizer creation with

    rconf = RConf("tts=festival")
    synthesizer = Synthesizer(rconf)

but thatʼs obviously a terrible general solution (most people probably would prefer espeak, and if they donʼt they might prefer one of the other options, and this doesnʼt account for other things one might want to pass to aeneas).