The word currently being recited should be highlighted. Care needs to be taken that this take precedence over sentence highlighting (T148622).
Description
Details
Subject | Repo | Branch | Lines +/- | |
---|---|---|---|---|
Highlight recited word | mediawiki/extensions/Wikispeech | master | +1 K -627 |
Status | Subtype | Assigned | Task | ||
---|---|---|---|---|---|
Open | None | T152430 Run Wikispeech offline | |||
Resolved | HaraldBerthelsen | T143644 Multiple requests to TTS server should not cause delay | |||
Resolved | Jopparn | T151786 Publically accessible demo (player) [Stage 1+2] | |||
Resolved | Sebastian_Berlin-WMSE | T122158 Highlight recited text (was: Display the read word) | |||
Resolved | Sebastian_Berlin-WMSE | T148623 Highlight recited word | |||
Resolved | Sebastian_Berlin-WMSE | T148622 Highlight recited sentence |
Event Timeline
This will likely need to store the relation between original text nodes (and offsets) and text elements. Make sure T157534: Links and "'s" causes token generation to fail doesn't happen again.
Increased story point since a lot of complications were discovered when working and more may appear before full implementation.
Worked on in Wikispeech (Sprint 2017-03-08):
- Implemented for most common cases.
To do in Wikispeech (Sprint 2017-03-22):
- Implement for all known cases.
- Start review.
Worked on in Wikispeech (Sprint 2017-03-22):
- Support a token spanning more than one text node (or only part of one).
To do in Wikispeech (Sprint 2017-04-05):
- Add test case for a few known edge cases
- Implement a different way to trigger token transition (the [[ https://developer.mozilla.org/en-US/docs/Web/Events/timeupdate | timeupdate event ]] is not reliably triggered for the frequencies which we require).
- Clean up code and commit
Discovered/recalled that [[ https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope/setTimeout | setTimeout ]] (which was my initial idea for replacing timeupdate) and friends aren't that accurate (http://stackoverflow.com/a/29972322). I'll go look for more accurate solutions.
After seeing demos using setTimeout, it may actually be accurate enough for this. There may be something else going on.
Worked on in Wikispeech (Sprint 2017-04-05):
- Fixed timing to work OK.
- Everything seems to work (TM).
To do in Wikispeech (Sprint 2017-04-25):
- Clean up code.
- Fix special cases that will probably pop up during above.
- Start review.
In implementing this, it was clear that the current structure of having all the JavaScript in great, big module wasn't viable any more. The patch for this task therefore includes breaking out the logic for highlighting into a separate module.
The is complete, as in there are no issues that I have found. I will hold off the patch until the patches that are currently under review have been merged.
Change 351576 had a related patch set uploaded (by Sebastian Berlin (WMSE); owner: Sebastian Berlin (WMSE)):
[mediawiki/extensions/Wikispeech@master] Highlight recited word
Worked on in Wikispeech (Sprint 2017-04-25):
- Submitted for review
- Review
To do in Wikispeech (Sprint 2017-05-10):
- Implement review
Worked on in Wikispeech (Sprint 2017-05-10):
- Started looking at review.
To do in Wikispeech (Sprint 2017-05-24):
- Finish implementing review.
Worked on in Wikispeech (Sprint 2017-05-24):
- Implemented first review.
To do in Wikispeech (Sprint 2017-06-07):
- Review again.
Change 351576 merged by jenkins-bot:
[mediawiki/extensions/Wikispeech@master] Highlight recited word
Mentioned in SAL (#wikimedia-cloud) [2017-06-14T10:04:05Z] <Sebastian-WMSE> Deploy latest from Git master: e641fcb (T165540), dfee00f (T148623)