mirror of
https://github.com/khoaliber/khoj.git
synced 2026-03-02 21:19:12 +00:00
Fix return types of offline, online transcribe methods for python 3.9
This commit is contained in:
@@ -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
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user