Having all the analysis parts above implement the abstract class.
Making the classes take a std::shared_ptr<text_event_reader> instead of a std::shared_ptr<document_reader> (except for text_reader which starts the process).
Optionally hiding them behind a createXYZ method.
This will be a performance hit (need to measure to see how much), but it adds flexibility -- especially for using different grapheme to phoneme rules.
---
Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/1026777-make-the-text-to-speech-chain-flexible?utm_campaign=plugin&utm_content=tracker%2F254961&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F254961&utm_medium=issues&utm_source=github).
It should be possible to specify the specific call chain of the different text analysis parts:
It should be possible to build a pipeline of these and others in an arbitary order. This means:
Creating an abstract class:
std::shared_ptr<text_event_reader>
instead of astd::shared_ptr<document_reader>
(except fortext_reader
which starts the process).createXYZ
method.This will be a performance hit (need to measure to see how much), but it adds flexibility -- especially for using different grapheme to phoneme rules.