Page MenuHomePhabricator

Replace url with audio data in Speechoid
Closed, ResolvedPublic

Description

Change the Speechoid response from delivering a link to the synthezised audio to instead delivering the audio into the MediaWiki extension.

Event Timeline

Lokal_Profil renamed this task from Stream utterance (audio) to to Stream utterance (audio) to Wikispeech extension.Feb 25 2020, 10:26 AM
Lokal_Profil renamed this task from Stream utterance (audio) to Wikispeech extension to Replace url with audio stream in Speechoid.
Lokal_Profil created this task.
Lokal_Profil updated the task description. (Show Details)

Garbage collection of generated audio files will also have to be provided (likely separate task)

Lokal_Profil renamed this task from Replace url with audio stream in Speechoid to Replace url with audio data in Speechoid.Mar 24 2020, 11:39 AM
Lokal_Profil updated the task description. (Show Details)

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.

Next steps are to remove any saved files, making the server "stateless".

@HaraldBerthelsen Did you have time to do this as well?

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.