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.
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.