ReadAlongs / Studio

Audiobook alignment for Indigenous languages
https://readalongs.github.io/Studio/
Other
38 stars 20 forks source link

When the g2p for a word is empty, assemble should return an error #168

Closed joanise closed 1 year ago

joanise commented 1 year ago

Input in Studio-Web: Staff on the Caledonian Sleeper will hold two 24-hour strikes. One from 11:59 on Sunday 31 October and one on Thursday 11 November. Language: EN The assemble output includes this: <w id=\"t0b0d0p0s0w8\" effective-g2p-lang=\"und\" ARPABET=\"\">24</w> which is not valid and causes the aligner to fail.

Assemble should return a 422 when a word has empty g2p and maybe list all the words with empty g2p.

Related to https://github.com/ReadAlongs/Web-Component/pull/180, which makes the aligner respond better to the problem, but the root cause is in assemble so it should be fixed here too.

joanise commented 1 year ago

Never mind, #180 display the error in a toastr, so we don't need to patch assemble itself.