Fix return types of offline, online transcribe methods for python 3.9

This commit is contained in:
Debanjum Singh Solanky 2023-11-26 06:26:34 -08:00
parent 06f99ceb3c
commit a79604b601
2 changed files with 2 additions and 2 deletions

View file

@ -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
"""

View file

@ -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
"""