From 3bb72e6a139397c865a0d3a293f6c971f536ad2e Mon Sep 17 00:00:00 2001 From: Winston H <56998716+winstxnhdw@users.noreply.github.com> Date: Wed, 3 Jul 2024 15:16:33 +0100 Subject: [PATCH] fix: main transcriber should not be async --- capgen/transcriber/transcriber.py | 2 +- server/features/transcriber.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/capgen/transcriber/transcriber.py b/capgen/transcriber/transcriber.py index b4b7d91..6e0b4cd 100644 --- a/capgen/transcriber/transcriber.py +++ b/capgen/transcriber/transcriber.py @@ -53,7 +53,7 @@ def __init__( except ValueError: self.model = WhisperModel(**model_parameters) - async def transcribe(self, file: str | BinaryIO, caption_format: str) -> str | None: + def transcribe(self, file: str | BinaryIO, caption_format: str) -> str | None: """ Summary ------- diff --git a/server/features/transcriber.py b/server/features/transcriber.py index 87d4bb4..9076f50 100644 --- a/server/features/transcriber.py +++ b/server/features/transcriber.py @@ -43,4 +43,4 @@ async def transcribe(cls, file: str | BinaryIO, transcription_type: Literal['srt ------- transcription (str | None) : the transcribed text in the chosen caption format """ - return await cls.transcriber.transcribe(file, transcription_type) + return cls.transcriber.transcribe(file, transcription_type)