mirror of
https://github.com/khoj-ai/khoj.git
synced 2024-11-27 17:35:07 +01:00
Fix return types of offline, online transcribe methods for python 3.9
This commit is contained in:
parent
06f99ceb3c
commit
a79604b601
2 changed files with 2 additions and 2 deletions
|
@ -6,7 +6,7 @@ import whisper
|
|||
from khoj.utils import state
|
||||
|
||||
|
||||
async def transcribe_audio_offline(audio_filename: str, model: str) -> str | None:
|
||||
async def transcribe_audio_offline(audio_filename: str, model: str) -> str:
|
||||
"""
|
||||
Transcribe audio file offline using Whisper
|
||||
"""
|
||||
|
|
|
@ -6,7 +6,7 @@ from asgiref.sync import sync_to_async
|
|||
import openai
|
||||
|
||||
|
||||
async def transcribe_audio(audio_file: BufferedReader, model, api_key) -> str | None:
|
||||
async def transcribe_audio(audio_file: BufferedReader, model, api_key) -> str:
|
||||
"""
|
||||
Transcribe audio file using Whisper model via OpenAI's API
|
||||
"""
|
||||
|
|
Loading…
Reference in a new issue