clamsproject / mmif-visualizer

A web site to visualize MultiMedia Interchange Format json
Apache License 2.0
2 stars 1 forks source link

VTT generation fails with unusual `timeUnit` keys #37

Closed keighrim closed 2 months ago

keighrim commented 2 months ago

Bug Description

When using MMIF from the latest clams whisper app, the visualizer fails to generate VTT format because the timeUnit key used in the app is millisecond, while the timedelta class expects milliseconds.

We need to "normalize" the timeunit key names, and this can be done using SDK helper. However, current implementation of the normalization scheme is using singular millisecond (unfirtunately) and wonder what's the best way to address this bug.

https://github.com/clamsproject/mmif-python/blob/262015bca12bf82a49c50923946e392f8e66d710/mmif/utils/timeunit_helper.py#L5-L22

Reproduction steps

Input whisper output MMIF to the mmif-viz

Expected behavior

No response

Log output

No response

Screenshots

No response

Additional context

No response