-
Notifications
You must be signed in to change notification settings - Fork 217
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use CutSet for whisper annotation workflow #834
Conversation
…instead of touching the audio file
… feature/whisper_cut
@pzelasko I have separated it into two helper functions. Let me know if it looks reasonable now. |
lhotse/workflows/whisper.py
Outdated
id=f"{cut.id}-{segment['id']:06d}", | ||
recording_id=cut.recording_id, | ||
start=round(segment["start"], ndigits=8), | ||
duration=round(segment["end"], ndigits=8), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think with this single change we can prevent timestamps going out of cut's duration; can you also include _postprocess_timestamps
in the cut-based workflow?
duration=round(segment["end"], ndigits=8), | |
duration=max(cut.duration, round(segment["end"], ndigits=8)), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
BTW, why are we using "end" as the duration? Shouldn't it be "end-start"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because in my own testing I discovered that their "end" is actually a "duration" 😂 but if you could triple-check that I got it right, maybe using some longer recording, that'd be great.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So I ran the model on one of the AMI headset recordings (~5000s) and it seems like the "end" actually shows the end of the segment, not the duration. Here is the JSON containing the results["segments"]
: https://drive.google.com/file/d/169igkcDY2SmMs5k3hOhHip89T4MQDnKs/view?usp=sharing
Thanks, LGTM |
This PR allows transcribing a CutSet with the whisper workflow. It is currently WIP since it relies on #832 and #822. But I have verified that it works.