diff options
| author | yum <yum.food.vr@gmail.com> | 2023-09-18 21:00:56 -0700 |
|---|---|---|
| committer | yum <yum.food.vr@gmail.com> | 2023-09-18 21:23:14 -0700 |
| commit | c2bc70c18d2fd1c3601b32f2a93b3b4a704786a5 (patch) | |
| tree | d945752abe708c5634a50b7cd0e17f9bf39d8e64 /Scripts/transcribe_pipeline.py | |
| parent | b037e158065bec98d91231c0c6443b63f45ec7ea (diff) | |
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
Diffstat (limited to 'Scripts/transcribe_pipeline.py')
| -rw-r--r-- | Scripts/transcribe_pipeline.py | 28 |
1 files changed, 28 insertions, 0 deletions
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 + |
