File size: 386 Bytes
95cb26e 2da4544 4a13628 2da4544 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
import os
from groq import Groq
from config import client
def speech_to_text(file_path: str):
with open(file_path, "rb") as f:
transcription = client.audio.transcriptions.create(
file=(file_path, f.read()),
model="whisper-large-v3-turbo",
temperature=0,
response_format="verbose_json"
)
return transcription.text
|