-
Notifications
You must be signed in to change notification settings - Fork 841
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
Improve language detection when using clip_timestamps #867
base: master
Are you sure you want to change the base?
Conversation
1becddb
to
65dcdc4
Compare
faster_whisper/transcribe.py
Outdated
detected_language_info = {} | ||
seek = int( |
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.
Should replace with:
seek = int(start_timestamp * self.frames_per_second)
@ben91lin , hello. Tks for your improvement. But I found that an error occurs if clip_timestamp[0] > audio duration:
Could you fix this ? |
b8cc0fc
to
370902e
Compare
If audio_length is 80s and start_timestamp is 67s, it will clip the last 1.3 seconds for detection. |
I think it's wrong logic. In this case, if |
370902e
to
73dc4b2
Compare
73dc4b2
to
6f07c97
Compare
I think you are right, I omitted the padding from FeatureExtractor. Setting |
Using clip_timestamps to improve the initial seek for language detection, avoiding incorrect detection at the start of the audio file.