Get started
Quickstart
Sign up, copy your API key, hear a sentence, and give your agent its voice.
You need Python 3.10 or later for the clients (3.11 for Pipecat); the first request below needs only curl.
1. Sign up#
Create your account at vaakini.com.
Signing up creates your org, with ₹1,000 of free credit and an API key. No card is needed.
2. Copy your API key#
It is on the dashboard's home, and under API keys.
Copy the key from the dashboard and set it where your code runs. Every client reads it from VAAKINI_API_KEY.
export VAAKINI_API_KEY="vk_…"Keep it out of your source code and out of browsers: anyone with the key can spend your org’s credit. You can make more keys, and delete one, on the API keys page.
3. Hear a sentence#
One request, one MP3.
curl https://api.vaakini.com/v1/audio/speech \ -H "Authorization: Bearer $VAAKINI_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "vaakini-tts-1", "voice": "Monika", "language": "hi", "input": "नमस्ते, आपका ऑर्डर कल पहुँच जाएगा।", "response_format": "mp3"}' \ --output speech.mp3from vaakini import Vaakiniclient = Vaakini() # reads VAAKINI_API_KEYaudio = client.speech.create( input="नमस्ते, आपका ऑर्डर कल पहुँच जाएगा।", voice="Monika", language="hi", response_format="mp3",)with open("speech.mp3", "wb") as f: f.write(audio)The Python tab uses the SDK:
pip install vaakiniPlay speech.mp3. To hear the other voices, try them in the dashboard’s playground, or see Voices and languages.
4. Connect your agent#
Vaakini goes where your agent's TTS goes.
from livekit.agents import AgentSessionfrom livekit.plugins import vaakini# The API key comes from VAAKINI_API_KEY.tts = vaakini.TTS( voice="Monika", language="hi",)session = AgentSession( tts=tts, # ... stt, llm, vad)import osfrom pipecat_vaakini import VaakiniTTSServicetts = VaakiniTTSService( api_key=os.environ["VAAKINI_API_KEY"], settings=VaakiniTTSService.Settings( voice="Monika", language="hi", ),)# In your pipeline, where a TTS service goes, after the LLM:# Pipeline([transport.input(), stt, user_aggregator, llm, tts, transport.output(), assistant_aggregator])Install the one your agent is built on:
pip install livekit-plugins-vaakinipip install pipecat-vaakiniYour agent streams each reply to Vaakini as the LLM writes it, and Vaakini speaks it sentence by sentence. When the caller interrupts, the reply is cancelled. The LiveKit plugin and The Pipecat service have every setting and a whole agent each.