From d5f1347587501dd9c1f8f320a9f1dc295ac05d3c Mon Sep 17 00:00:00 2001 From: Stevan Freeborn <65925598+StevanFreeborn@users.noreply.github.com> Date: Sun, 27 Jul 2025 23:33:45 -0500 Subject: [PATCH] feat: wip on extracting whisper transcription logic to separate class --- .../Transcription/ITranscriber.cs | 12 ++++++++++++ .../Transcription/WhisperTranscriber.cs | 10 ++++++++++ 2 files changed, 22 insertions(+) create mode 100644 src/StreamShorts.Library/Transcription/ITranscriber.cs create mode 100644 src/StreamShorts.Library/Transcription/WhisperTranscriber.cs diff --git a/src/StreamShorts.Library/Transcription/ITranscriber.cs b/src/StreamShorts.Library/Transcription/ITranscriber.cs new file mode 100644 index 0000000..425da8d --- /dev/null +++ b/src/StreamShorts.Library/Transcription/ITranscriber.cs @@ -0,0 +1,12 @@ +namespace StreamShorts.Library.Transcription; + +public interface ITranscriber +{ + IAsyncEnumerable TranscribeAsync(Stream audio); +} + +public record TranscriptionSegment( + TimeSpan StartTime, + TimeSpan EndTime, + string Text +); \ No newline at end of file diff --git a/src/StreamShorts.Library/Transcription/WhisperTranscriber.cs b/src/StreamShorts.Library/Transcription/WhisperTranscriber.cs new file mode 100644 index 0000000..c77a20a --- /dev/null +++ b/src/StreamShorts.Library/Transcription/WhisperTranscriber.cs @@ -0,0 +1,10 @@ + +namespace StreamShorts.Library.Transcription; + +public class WhisperTranscriber : ITranscriber +{ + public IAsyncEnumerable TranscribeAsync(Stream audio) + { + throw new NotImplementedException(); + } +} \ No newline at end of file