From 04363a504cbc9cc82a119664aa6423857171138f Mon Sep 17 00:00:00 2001 From: Debanjum Singh Solanky Date: Wed, 11 Sep 2024 13:51:51 -0700 Subject: [PATCH] Prompt Whisper to know "Khoj" term for speech to text transcription --- src/khoj/processor/conversation/openai/whisper.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/khoj/processor/conversation/openai/whisper.py b/src/khoj/processor/conversation/openai/whisper.py index dcb84f89..6672c22c 100644 --- a/src/khoj/processor/conversation/openai/whisper.py +++ b/src/khoj/processor/conversation/openai/whisper.py @@ -9,5 +9,5 @@ async def transcribe_audio(audio_file: BufferedReader, model, client: OpenAI) -> Transcribe audio file using Whisper model via OpenAI's API """ # Send the audio data to the Whisper API - response = await sync_to_async(client.audio.translations.create)(model=model, file=audio_file) + response = await sync_to_async(client.audio.translations.create)(model=model, file=audio_file, prompt="Khoj") return response.text