HugoFara / lwt

Learn languages by reading! A language learning app stemmed from Learning with Texts (LWT).
https://hugofara.github.io/lwt/
The Unlicense
164 stars 19 forks source link

[Feature] Subtitles support and audio snippets in Test from media #156

Closed ProgramComputer closed 6 months ago

ProgramComputer commented 9 months ago

The capability to parse subtitle files was added. Add a vtt, srt ... as a text, and link the corresponding audio-containing media. The audio will snip to fit the sentences in test mode, so you can play the tracks while testing - a play button will appear if possible.

As implied, it is not supported in long text mode.

A minor change was the Read Words Aloud checkbox in the test didn't keep the check selection when requests were made, so voice synthesis should now work in test mode as well.

I tested it with a video file, so any media file with audio supported on the browser will work.

SeStartSec and SeEndSec were added to Sentences table. These are in milliseconds. How the milliseconds are played depend on the browser. These may need to be adjusted by browser

HugoFara commented 6 months ago

Actually it's a feature I thought about, and your solution seems to be great. Yet I think it will be difficult to integrate it into LWT elegantly, as you would be able to create a text from an audio file, and it implies many different changes (on top of the ones you already brought).

As I also want to rebuild the media feature (into something HTML5) compatible, it will be great to integrate your PR at that time, see that for the future!