From 921470cc5d6acdae8d74d2636882622c68514da5 Mon Sep 17 00:00:00 2001 From: Paillat Date: Sun, 18 Feb 2024 22:58:39 +0100 Subject: [PATCH] Add stroke color and stroke width to captioning engine --- src/engines/CaptioningEngine/SimpleCaptioningEngine.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/engines/CaptioningEngine/SimpleCaptioningEngine.py b/src/engines/CaptioningEngine/SimpleCaptioningEngine.py index 89cc748..bae0fcc 100644 --- a/src/engines/CaptioningEngine/SimpleCaptioningEngine.py +++ b/src/engines/CaptioningEngine/SimpleCaptioningEngine.py @@ -23,6 +23,8 @@ class SimpleCaptioningEngine(BaseCaptioningEngine): fontsize=self.font_size, color=self.font_color, font=self.font, + stroke_color=self.stroke_color, + stroke_width=self.stroke_width, method="caption", size=(self.ctx.width /3 * 2, None), ).set_position(('center', 0.65), relative=True).set_start(start).set_duration(end - start) @@ -89,7 +91,7 @@ class SimpleCaptioningEngine(BaseCaptioningEngine): minimum=0, maximum=40, step=1, - value=4, + value=6, ) font_stroke_color = gr.ColorPicker(label="Stroke Color", value="#000000") return [font, font_size, font_stroke_width, font_color, font_stroke_color]