⚡ नवीन — Kimi K3 आता लाइव: तुमची Moonshot की जोडा →
दस्तऐवज

ऑडिओ — भाषण

BharatRouter ऑडिओ तसेच सर्व्ह करते जसे ते chat करते: एक API key, OpenAI wire format, INR pricing. दोन्ही ऑडिओ मॉडेल first-party आणिIndia-resident आहेत — platform key वर सर्व्ह केली जातात, BYOK ची गरज नाही: लिप्यंतरण Parakeet ने, संश्लेषण Kokoro ने. request सर्व्ह करणारा route x-br-provider response header मध्ये परत येतो.

▶ ऑडिओ प्लेग्राउंड वापरून पहा

Speech to text

POST /v1/audio/transcriptions — OpenAI-compatible multipart upload. मॉडेलparakeet. 25 MB पर्यंतची ऑडिओ फाइल (mp3/wav/m4a/webm आणि नेहमीचे फॉरमॅट). प्रति-सेकंद granularity वर₹0.5 / मिनिट ऑडिओ नुसार बिलिंग (किमान 1 सेकंद).

curl https://api.bharatrouter.com/v1/audio/transcriptions \
  -H "Authorization: Bearer br-..." \
  -F [email protected] \
  -F model=parakeet \
  -F response_format=json

फील्ड: file आणि model आवश्यक; language,prompt, temperature आणि response_format ऐच्छिक.response_format उत्तराचा आकार ठरवते:

response_formatउत्तर
json (default){ "text": "..." }
textसाधा मजकूर body (text/plain).
verbose_jsontext, language, duration आणि segments सह पूर्ण object.
from openai import OpenAI
client = OpenAI(base_url="https://api.bharatrouter.com/v1", api_key="br-...")

with open("call.mp3", "rb") as f:
    r = client.audio.transcriptions.create(model="parakeet", file=f)
print(r.text)

Text to speech

POST /v1/audio/speech — JSON body. मॉडेल kokoro, बहुभाषी voices (हिंदीसह). ₹50 प्रति 1 दशलक्ष input characters नुसार बिलिंग. उत्तर raw audio bytes असते; response_format container निवडते (mp3 default, तसेच wav, opus, flac).

curl https://api.bharatrouter.com/v1/audio/speech \
  -H "Authorization: Bearer br-..." -H "Content-Type: application/json" \
  -d '{
    "model": "kokoro",
    "input": "India runs on BharatRouter.",
    "response_format": "mp3"
  }' --output hello.mp3

Notes

  • ऑडिओ मॉडेल single-route आणि first-party आहेत (platform key वर सर्व्ह), म्हणून ती थेट proxy होतात — ऑडिओसाठी multi-provider failover नाही, पण तेच metering आणि creditdebits लागू होतात (trial keys मोफत राहतात).
  • किंमत catalog वर आहे: ASR ₹0.5/मिनिट, TTS ₹50 प्रति 1M characters.
  • दोन्ही endpoints standard API key घेतात — पाहा API keys आणि limits.