Skip to content

bruno-collections/bruno-sarvamai

Repository files navigation

Sarvam AI - Bruno API Collection

Bruno + Sarvam AI

A ready-to-use Bruno collection for the Sarvam AI APIs — Text-to-Speech (TTS) and Speech-to-Text (STT) across 23 Indian languages.

Prerequisites

  • Bruno installed on your machine
  • A Sarvam AI API key

Getting Your API Key

  1. Go to the Sarvam AI Dashboard
  2. Sign up or log in to your account
  3. Navigate to the API Keys section and create a new key
  4. Copy your API key — you'll need it when configuring the Bruno environment

For more details, see the Sarvam AI Quickstart Guide.

Importing the Collection in Bruno

  1. Open Bruno
  2. Click the + button in the top-left corner and select Import Collection
  3. Select Clone from Git Repository
  4. Paste the repository URL:
    https://github.com/bruno-collections/bruno-sarvamai.git
    
  5. Choose a local destination folder
  6. Click Clone

The collection will be cloned and loaded with all TTS and STT requests organized by language.

For more details on importing, see the Bruno Import Collections Guide.

Configuring the API Key

  1. After importing, select the Sarvam-AI collection in Bruno
  2. Go to Environments and select the local environment
  3. Set the value of Sarvam_API_Key to your Sarvam AI API key
  4. Make sure the local environment is active

Folder Structure

collections/Sarvam-AI/
├── opencollection.yml            # Collection metadata
├── .gitignore
├── environments/
│   └── local.yml                 # Environment with Sarvam_API_Key secret
├── text-to-speech/
│   ├── folder.yml                # Folder config
│   ├── text-to-speech.yml        # Original TTS request (Hindi)
│   ├── tts-bengali.yml           # TTS → Bengali (bn-IN)
│   ├── tts-english.yml           # TTS → English (en-IN)
│   ├── tts-gujarati.yml          # TTS → Gujarati (gu-IN)
│   ├── tts-hindi.yml             # TTS → Hindi (hi-IN)
│   ├── tts-kannada.yml           # TTS → Kannada (kn-IN)
│   ├── tts-malayalam.yml         # TTS → Malayalam (ml-IN)
│   ├── tts-marathi.yml           # TTS → Marathi (mr-IN)
│   ├── tts-odia.yml              # TTS → Odia (od-IN)
│   ├── tts-punjabi.yml           # TTS → Punjabi (pa-IN)
│   ├── tts-tamil.yml             # TTS → Tamil (ta-IN)
│   ├── tts-telugu.yml            # TTS → Telugu (te-IN)
│   ├── tts-assamese.yml          # TTS → Assamese (as-IN) [Beta]
│   ├── tts-bodo.yml              # TTS → Bodo (brx-IN) [Beta]
│   ├── tts-dogri.yml             # TTS → Dogri (doi-IN) [Beta]
│   ├── tts-konkani.yml           # TTS → Konkani (kok-IN) [Beta]
│   ├── tts-kashmiri.yml          # TTS → Kashmiri (ks-IN) [Beta]
│   ├── tts-maithili.yml          # TTS → Maithili (mai-IN) [Beta]
│   ├── tts-manipuri.yml          # TTS → Manipuri (mni-IN) [Beta]
│   ├── tts-nepali.yml            # TTS → Nepali (ne-IN) [Beta]
│   ├── tts-sanskrit.yml          # TTS → Sanskrit (sa-IN) [Beta]
│   ├── tts-santali.yml           # TTS → Santali (sat-IN) [Beta]
│   ├── tts-sindhi.yml            # TTS → Sindhi (sd-IN) [Beta]
│   └── tts-urdu.yml              # TTS → Urdu (ur-IN) [Beta]
├── speech-to-text/
│   ├── folder.yml                # Folder config
│   ├── speech-to-text.yml        # Original STT request
│   ├── echo-sarvam.yml           # Translate API request
│   ├── stt-assamese.yml          # STT ← Assamese (as-IN)
│   ├── stt-bengali.yml           # STT ← Bengali (bn-IN)
│   ├── stt-bodo.yml              # STT ← Bodo (brx-IN)
│   ├── stt-dogri.yml             # STT ← Dogri (doi-IN)
│   ├── stt-english.yml           # STT ← English (en-IN)
│   ├── stt-gujarati.yml          # STT ← Gujarati (gu-IN)
│   ├── stt-hindi.yml             # STT ← Hindi (hi-IN)
│   ├── stt-kannada.yml           # STT ← Kannada (kn-IN)
│   ├── stt-kashmiri.yml          # STT ← Kashmiri (ks-IN)
│   ├── stt-konkani.yml           # STT ← Konkani (kok-IN)
│   ├── stt-maithili.yml          # STT ← Maithili (mai-IN)
│   ├── stt-malayalam.yml         # STT ← Malayalam (ml-IN)
│   ├── stt-manipuri.yml          # STT ← Manipuri (mni-IN)
│   ├── stt-marathi.yml           # STT ← Marathi (mr-IN)
│   ├── stt-nepali.yml            # STT ← Nepali (ne-IN)
│   ├── stt-odia.yml              # STT ← Odia (od-IN)
│   ├── stt-punjabi.yml           # STT ← Punjabi (pa-IN)
│   ├── stt-sanskrit.yml          # STT ← Sanskrit (sa-IN)
│   ├── stt-santali.yml           # STT ← Santali (sat-IN)
│   ├── stt-sindhi.yml            # STT ← Sindhi (sd-IN)
│   ├── stt-tamil.yml             # STT ← Tamil (ta-IN)
│   ├── stt-telugu.yml            # STT ← Telugu (te-IN)
│   └── stt-urdu.yml              # STT ← Urdu (ur-IN)
└── output/
    ├── folder.yml                # Folder config
    └── *.wav                     # Generated audio output files

Supported Languages

Language Code Language TTS STT Status
bn-IN Bengali Stable
en-IN English Stable
gu-IN Gujarati Stable
hi-IN Hindi Stable
kn-IN Kannada Stable
ml-IN Malayalam Stable
mr-IN Marathi Stable
od-IN Odia Stable
pa-IN Punjabi Stable
ta-IN Tamil Stable
te-IN Telugu Stable
as-IN Assamese Beta
brx-IN Bodo Beta
doi-IN Dogri Beta
kok-IN Konkani Beta
ks-IN Kashmiri Beta
mai-IN Maithili Beta
mni-IN Manipuri Beta
ne-IN Nepali Beta
sa-IN Sanskrit Beta
sat-IN Santali Beta
sd-IN Sindhi Beta
ur-IN Urdu Beta

Note: Languages marked as Beta are in beta access and may have limited support or accuracy compared to stable languages. Refer to the Sarvam AI documentation for the latest availability.

How It Works

Text-to-Speech (TTS)

Each TTS request sends a sample text in the target language to the Sarvam AI /text-to-speech endpoint using the bulbul:v3 model. The after-response script automatically decodes the base64 audio and saves it as a .wav file in the output/ folder (e.g., output/tamil-output.wav).

Speech-to-Text (STT)

Each STT request uploads an audio file to the Sarvam AI /speech-to-text endpoint using the saaras:v3 model in transcribe mode. The file field expects an audio file named <language>.wav (e.g., bengali.wav). Add your audio files before running the requests.

API Reference

License

This collection is provided as-is for use with Sarvam AI APIs. You must have a valid Sarvam AI subscription to use these endpoints.

About

Bruno and Sarvam AI together.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors