Introducing Subtitle Formatting and Font Color Options in Whisper #1900
MatteoFasulo
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
This enhancement proposal builds upon the advancements of a previous pull request (PR #1786) and aims to further enhance the capabilities of the Whisper repository by introducing new features for subtitle customization. The primary additions include a
subtitle_format
option, allowing users to style subtitles with underline, bold, or italicized formatting. Additionally, afont_color
option enables users to specify the font color for subtitles using hex values.The core modification is made to the
iterate_result
function inutils.py
, which now accommodates the new options. When usingsubtitle_format
, users can choose from "u" for underlined, "b" for bolded, and "i" for italicized subtitles. In conjunction with this, thefont_color
option accepts hex color values (e.g., "#FFFFFF" for white), providing users with the flexibility to personalize the appearance of subtitles.The default behavior is set to None for
subtitle_format
and white forfont_color
if these options are not explicitly specified. This ensures backward compatibility and seamless integration with third-party software like FFMPEG.To implement these enhancements, users can simply include the desired options in the
word_options
dictionary when utilizing theiterate_result
function. An illustrative example is provided in the usage section, showcasing how to integrate these options into your Whisper workflow.This proposed enhancement not only enhances the visual appeal of generated subtitles but also empowers users with greater control over the styling aspects, contributing to a more versatile and user-friendly experience with the Whisper library. Your feedback on this enhancement proposal is highly encouraged and welcomed in the discussion section.
Example:
Beta Was this translation helpful? Give feedback.
All reactions