Skip to content

Fix for small segments#57

Open
Pranjalya wants to merge 4 commits intoshashikg:mainfrom
Pranjalya:small-segment-fix
Open

Fix for small segments#57
Pranjalya wants to merge 4 commits intoshashikg:mainfrom
Pranjalya:small-segment-fix

Conversation

@Pranjalya
Copy link
Copy Markdown

Patch

  • Fix for small segments, when the audio duration is less than max_seg_len
  • Fallback for generate_segment_batched in case the seq_len and seq_metadata is not provided

@BBC-Esq
Copy link
Copy Markdown

BBC-Esq commented May 25, 2024

I like it!

@Sembiance
Copy link
Copy Markdown

Great fix, without it WhisperS2T is useless for small duration audio.

HIGHLY recommend merging this pull request :)

@shashikg
Copy link
Copy Markdown
Owner

shashikg commented Jul 6, 2024

Hi @Pranjalya @Sembiance !
Can you describe here or link an issue related to small duration audio?

@Pranjalya
Copy link
Copy Markdown
Author

Hey @shashikg, the issue was in the loop where we segment audio into parts and the case where the original audio's duration is < 1s. Using the range function and setting the end timestamp as int(audio_duration) will lead it to it being 0, which when used on range returns an empty list. Using a math.ceil function ensures that it is rounded up to the next ceiling integer and the audio segment timestamp is logged.
This bug is potentially dangerous as well if someone is using indexing to map the audio segments, as it leads to missing of the parts.

@LostnD
Copy link
Copy Markdown

LostnD commented Nov 18, 2024

what will "max_seg_len" do?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants