Page MenuHomePhabricator

Send recording to storage
Open, Needs TriagePublic8 Estimated Story Points

Description

This should be done when the user clicks the save button. Data should sent to the API for storing recordings.

The audio data is stored in an audio element until this is done (or the page is closed/refreshed). Prompt identifier will also be included.

Event Timeline

Se T273038 from which the creation of the API itself will be broken out"

It took a bit of a song and dance to get the actual data out of the audio element. There were several different callback variant that made testing a bit tricky.

Looks like we want to use mw.Api.postWithToken() since we are modifying data.

Change 663000 had a related patch set uploaded (by Sebastian Berlin (WMSE); owner: Sebastian Berlin (WMSE)):
[mediawiki/extensions/WikispeechSpeechDataCollector@master] [WIP] Send recording to API

https://gerrit.wikimedia.org/r/663000

Sebastian_Berlin-WMSE renamed this task from Send audio data to storage to Send recording to storage.Feb 10 2021, 6:57 AM
Sebastian_Berlin-WMSE updated the task description. (Show Details)

Looks like I still have not managed to get the correct data. It is not actually audio data, it seems. I tried with a website that managed to transform a sound file into data and it gets a different result.

Using XMLHttpRequest instead of $.get solved it. It gets a Blod right away.