Initial commit: Doctor-Patient clinical transcription and structured summary pipeline

This commit is contained in:
Ayush
2026-11-16 19:22:04 +05:30
commit f451738732
60 changed files with 11321 additions and 0 deletions
+29
View File
@@ -0,0 +1,29 @@
import asyncio
import httpx
import os
import base64
from dotenv import load_dotenv
load_dotenv()
SARVAM_API_KEY = os.getenv("SARVAM_API_KEY", "")
async def test():
with open("test.wav", "rb") as f:
audio_data = f.read()
async with httpx.AsyncClient(timeout=60) as client:
submit_resp = await client.post(
"https://api.sarvam.ai/speech-to-text",
headers={"api-subscription-key": SARVAM_API_KEY},
files={"file": ("test.wav", audio_data, "audio/wav")},
data={
"model": "saaras:v4",
"mode": "codemix",
"with_timestamps": "true",
"with_diarization": "true",
}
)
print(submit_resp.status_code)
print(submit_resp.json())
asyncio.run(test())