replicate / cog-whisper

Run OpenAI Whisper as a Cog model
Apache License 2.0
60 stars 43 forks source link

Bug Fix: Handle Missing Duration in .webm Audio Files #19

Closed opalthailand closed 2 months ago

opalthailand commented 3 months ago

The current implementation of the get_audio_duration function encounters a bug when processing .webm audio files. This is due to the absence of duration information in the audio stream metadata, as observed both in our code and the results from the Replicate website below.

To address this issue, I propose an enhancement to the function that includes a check to verify the presence of "duration" information in the audio_stream before attempting to retrieve the duration value.

image image