Change the Speechoid response from delivering a link to the synthezised audio to instead delivering the audio into the MediaWiki extension.
Partly done - a call to the wikispeech server, eg. http://localhost:10000/?lang=sv&input=sju%20sj%C3%B6sjuka%20sj%C3%B6m%C3%A4n. now also contains audio_data, a base64 encoded string. The audio_url still there as well, will remove that later. For testing you can also try adding the parameter output_type=html, eg. http://localhost:10000/?lang=sv&output_type=html&input=sju%20sj%C3%B6sjuka%20sj%C3%B6m%C3%A4n.
This will return very simple html with an audio element containing the base64 string as source.
Next steps are to remove any saved files, making the server "stateless".
Let me know if you have any comments or problems with using this. It is of course all work in progress and can be changed at any time.
audio_url is no longer returned.
Tmp dir is cleared after each call.
External synthesisers (e.g. ahotts) _may_ in some cases leave temporary files during processing. If they do, these files can safely be cleaned up. Ahotts does this, in the ahotts/wav directory.
After some discussion we agreed to leave it that way for now.