File size: 320 Bytes
73d4f3c
c7fc3b6
73d4f3c
 
 
 
91b1985
73d4f3c
91b1985
1
2
3
4
5
6
7
8
9
10
from services.gemini_client import get_gemini_client

async def speech_to_text(audio_bytes: bytes) -> str:
    client = get_gemini_client()
    response = client.models.generate_content(
        model="gemini-2.5-flash",
        contents=[{"mime_type": "audio/wav", "data": audio_bytes}],
    )
    return response.text