In create_event_gather_flow(), in addition to calling resource_exists() for session.caption_uri, further validate the caption file by comparing its length against the video at session.video_uri. Reject, i.e. just do speech-to-text, if their lengths differ by more than 20%.
Link to Relevant Issue
This pull request resolves #213
Description of Changes
In
create_event_gather_flow()
, in addition to callingresource_exists()
forsession.caption_uri
, further validate the caption file by comparing its length against the video atsession.video_uri
. Reject, i.e. just do speech-to-text, if their lengths differ by more than 20%.