mirror of
https://github.com/khoaliber/khoj.git
synced 2026-03-09 21:29:11 +00:00
Prompt Whisper to know "Khoj" term for speech to text transcription
This commit is contained in:
@@ -9,5 +9,5 @@ async def transcribe_audio(audio_file: BufferedReader, model, client: OpenAI) ->
|
|||||||
Transcribe audio file using Whisper model via OpenAI's API
|
Transcribe audio file using Whisper model via OpenAI's API
|
||||||
"""
|
"""
|
||||||
# Send the audio data to the Whisper 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
|
return response.text
|
||||||
|
|||||||
Reference in New Issue
Block a user