Page MenuHomePhabricator

Preview transcription in lexicon editor
Closed, ResolvedPublic

Description

The user should be able to preview the transcription (listen to the resulting speech) before saving an edit. This will be done by sending the transcription to Speechoid to be synthesized.

This could probably be done as a PHP request, which would reload the page with the preview element added. Alternatively, this can be done with AJAX in the frontend. The advantage with the latter is that it user experience will not be interrupted by the page reloading. This may be significant when fine tuning transcriptions. The downside is that it does not allow previewing if Javascript is disabled. Ideally, we would have an Javascript implementation with PHP fallback, but we should start with one of them.

Event Timeline

Lokal_Profil set the point value for this task to 8.Feb 11 2021, 10:04 AM
Lokal_Profil subscribed.

Since entering IPA is most easily done using ULS (which requires Javascript) we should start with the AJAX-solution. Supporting no-js can be pushed to the future.

The request to Speechoid should go via ApiListen. This API woul have to be upgraded to understand that the supplied text is IPA.

I've added "ipa" as a parameter to the listen API. I did some dependency injection and added a couple of tests while I was at it. Still need to clean up and expand parameter validation. May make this its own patch.

Change 666395 had a related patch set uploaded (by Sebastian Berlin (WMSE); owner: Sebastian Berlin (WMSE)):
[mediawiki/extensions/Wikispeech@master] Add input parameter "ipa" to listen API

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

I've changed the Quint tests to use packageFiles. The new module and tests for the special page uses export, but the old one still use the old mw.wikispeech. Even though it would be nice to move everything over to require and exports (as described here) that shouldn't be needed for the special page.

Change 668120 had a related patch set uploaded (by Sebastian Berlin (WMSE); owner: Sebastian Berlin (WMSE)):
[mediawiki/extensions/Wikispeech@master] Preview transcriptions on EditLexicon special page

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

Change 666395 merged by jenkins-bot:
[mediawiki/extensions/Wikispeech@master] Add input parameter "ipa" to listen API

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

Change 668120 merged by jenkins-bot:
[mediawiki/extensions/Wikispeech@master] Preview transcriptions on EditLexicon special page

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