Skip to main content

Prerequisites

1

Get your API key

Sign up on the Vachana platform and generate an API key from your dashboard.
2

Install the SDK

pip install gnani-vachana
Requires Python 3.9+.
3

Set environment variables

export GNANI_API_KEY="your-api-key"
export GNANI_ORGANIZATION_ID="your-org-id"   # required for STT
export GNANI_USER_ID="your-user-id"           # required for STT

Supported formats: WAV, MP3, OGG, FLAC, AAC, M4A  ·  Sample rate: 8 – 44.1 kHz  ·  Max duration: 60 s
from gnani.stt import GnaniSTTClient

# reads GNANI_API_KEY, GNANI_ORGANIZATION_ID, GNANI_USER_ID from env
client = GnaniSTTClient()

result = client.transcribe("audio.wav", language_code="hi-IN")
print(result["transcript"])
Replace:Response:
{
  "success": true,
  "transcript": "नमस्ते, आप कैसे हैं?"
}

Next Steps

STT Reference

Full parameter reference, language codes, and batch transcription

TTS Reference

Voice options, audio config, and all streaming modes

Voice Cloning

Embedding API, quality tips, and synthesis options