From c2bc70c18d2fd1c3601b32f2a93b3b4a704786a5 Mon Sep 17 00:00:00 2001 From: yum Date: Mon, 18 Sep 2023 21:00:56 -0700 Subject: Reimplement BrowserSource as a StreamingPlugin BrowserSource now fades text out continuously over time. TODO * Delete C++ webserver, browsersource, transcript code * Add UI for text age fading --- Scripts/transcribe_pipeline.py | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 Scripts/transcribe_pipeline.py (limited to 'Scripts/transcribe_pipeline.py') diff --git a/Scripts/transcribe_pipeline.py b/Scripts/transcribe_pipeline.py new file mode 100644 index 0000000..3f48b08 --- /dev/null +++ b/Scripts/transcribe_pipeline.py @@ -0,0 +1,28 @@ +import time + + +class TranscriptCommit: + def __init__(self, + delta: str, + preview: str, + latency_s: int = None, + thresh_at_commit: int = None, + audio: bytes = None): + self.delta = delta + self.preview = preview + self.latency_s = latency_s + self.thresh_at_commit = thresh_at_commit + self.audio = audio + self.ts = time.time() + + +class StreamingPlugin: + def __init__(self): + pass + + def transform(self, commit: TranscriptCommit) -> TranscriptCommit: + return commit + + def stop(self): + pass + -- cgit v1.2.3