We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Is there some code for Whisper jax to produce srt subtitle?
The text was updated successfully, but these errors were encountered:
srt_data = "" for index, entry in enumerate(chunks): start_time, end_time = entry['timestamp'] start_hours, start_minutes, start_seconds = int(start_time // 3600), int((start_time % 3600) // 60), start_time % 60 end_hours, end_minutes, end_seconds = int(end_time // 3600), int((end_time % 3600) // 60), end_time % 60 srt_entry = f"{index + 1}\n{start_hours:02d}:{start_minutes:02d}:{start_seconds:06.3f} --> {end_hours:02d}:{end_minutes:02d}:{end_seconds:06.3f}\n{entry['text']}\n\n" srt_data += srt_entry print(srt_data) with open('output.srt', 'w', encoding='utf-8') as f: f.write(srt_data) print("SRT data saved to output.srt")
I use something like the above
Sorry, something went wrong.
how to use your code to change txt to srt?
No branches or pull requests
Is there some code for Whisper jax to produce srt subtitle?
The text was updated successfully, but these errors were encountered: