Esc to close · ⌘K / Ctrl-K opens search anywhere
BharatRouter ऑडियो को ठीक उसी तरह सर्व करता है जैसे यह चैट को करता है: एक API कुंजी, OpenAI वायर फ़ॉर्मेट, INR मूल्य निर्धारण। दोनों ऑडियो मॉडल भारत-निवासीसेल्फ-होस्टेड इंफ्रास्ट्रक्चर पर चलते हैं — Parakeet के साथ ट्रांसक्रिप्शन,Kokoro (हिंदी-सक्षम आवाज़ें) के साथ संश्लेषण। अनुरोध को सर्व करने वाला रूटx-br-provider प्रतिक्रिया हैडर में इको होता है।
POST /v1/audio/transcriptions — OpenAI-संगत मल्टीपार्ट अपलोड। मॉडलparakeet। 25 MB तक की ऑडियो फ़ाइल (mp3/wav/m4a/webm और सामान्य फ़ॉर्मेट)। प्रति सेकंड ग्रेन्युलैरिटी पर प्रति मिनट ऑडियो के हिसाब से बिल किया गया (न्यूनतम 1 सेकंड)।
curl https://api.bharatrouter.com/v1/audio/transcriptions \
-H "Authorization: Bearer br-..." \
-F [email protected] \
-F model=parakeet \
-F language=hi \
-F response_format=jsonफ़ील्ड: file और model आवश्यक हैं; language,prompt, temperature और response_format वैकल्पिक हैं।response_format उत्तर के आकार को नियंत्रित करता है:
| response_format | उत्तर |
|---|---|
json (डिफ़ॉल्ट) | { "text": "..." } |
text | प्लेन टेक्स्ट बॉडी (text/plain)। |
verbose_json | text, language, duration और segments के साथ पूर्ण ऑब्जेक्ट। |
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, language="hi")
print(r.text)POST /v1/audio/speech — JSON बॉडी। मॉडल kokoro, बहुभाषी आवाज़ें (हिंदी सहित)। प्रति 1 मिलियन इनपुट वर्णों पर बिल किया गया। उत्तर कच्चा ऑडियो बाइट्स है; response_formatकंटेनर का चयन करता है (mp3 डिफ़ॉल्ट, साथ ही wav, opus,flac)।
curl https://api.bharatrouter.com/v1/audio/speech \
-H "Authorization: Bearer br-..." -H "Content-Type: application/json" \
-d '{
"model": "kokoro",
"input": "नमस्ते, आपका स्वागत है।",
"response_format": "mp3"
}' --output hello.mp3