joaen / maya-auto-lip-sync

A tool to automatically generate lip sync animations in Autodesk: Maya using Montreal Forced Aligner.
MIT License
27 stars 6 forks source link

Script fails if transcript words are missing from lexicon #11

Open adamgravois opened 7 months ago

adamgravois commented 7 months ago

Another failure case I found: if a word in the transcript isn't in the lexicon (librispeech-lexicon.txt), the tool will fail. (This includes hyphenated words, like "head-on"! Sheesh!)

I notice MFA says something like "found undefined words, would you ilke to define them?" but the ALS script ignores that prompt, causing the transcription to fail.

Suggested simplest solution: trap that error, and report it to the user. Updating the lexicon or fixing the transcript isn't hard, IMHO.

joaen commented 7 months ago

Thanks for the input. I think the error handling in general could be much better tbh.

adamgravois commented 7 months ago

I understand how it is! You make a lil utility script (or not so little), it works for you, but you let other people use it and all a sudden everything is about error handling! lol