As was pointed out by @Bawolff in this discussion, the current implementation (postentially) adds a lot of HTML. At the moment, all cleaned text is added again, under the utterances-element. While this may be necessary when a client doesn't use JS, it would be good to avoid when possible. It would also make further development easier, as working with HTML elements as "data containers" can be quite cumbersome.
Ajax request to action API
- Making API requests to cleaning and segmenting allows easy re-use
- Storing the data as a JS-object makes handling easier
- Ajax request(s) removes the need to store this in the html
- If a user does not use Wikispeech the process will not have to be run.
- Likely harder to implement solution for No-JS
- No pre-loading of first utterance (at least not as default)
- Implement new utterance storage
- Build API module
- Request to API
- Update existing code to use new utterance storage
- Implement No-JS workaround
- Seems to be designed for things like this.
- Streamlining HTML: If no other solution is found, it should still be possible to decrease the amount of HTML that needs to be added, e.g. by storing string positions, rather than the strings themselves.
- Most of current implementation of preprocessing can be kept as it is.
- Still adds HTML.