Skip to main content

pipecat-vaakini

Pipecat TTS service for Vaakini: text to speech in 12 Indian languages with one model, vaakini-tts-1.

Full documentation: docs.vaakini.com/pipecat.

Tested with Pipecat v1.12.0 and v1.16.0. Maintained by Oggnai Technologies, the company that runs Vaakini.

Install

pip install pipecat-vaakini

Usage

import os

from pipecat_vaakini import VaakiniTTSService

tts = VaakiniTTSService(
    api_key=os.environ["VAAKINI_API_KEY"],
    settings=VaakiniTTSService.Settings(voice="Monika", language="hi"),
)

pipeline = Pipeline(
    [transport.input(), stt, user_aggregator, llm, tts, transport.output(), assistant_aggregator]
)

Your API key is in the dashboard at vaakini.com.

VaakiniTTSService(...)

Argument Default
api_key required your Vaakini API key
settings required VaakiniTTSService.Settings(...), below
base_url wss://api.vaakini.com Vaakini's URL

Other keyword arguments go to Pipecat's WebsocketTTSService, except text_aggregation_mode (Vaakini splits the text into sentences itself, so the service streams the LLM's text to it as it arrives) and sample_rate: the audio is 24000 Hz, and the pipeline's output transport resamples it to its own rate.

VaakiniTTSService.Settings(...)

Setting Default
voice required a Vaakini voice's name, in any case ("Monika"), or the id of one of your org's custom voices ("cv_…"); GET /v1/voices lists them
language None the language the text is in: "as", "bn", "en", "gu", "hi", "kn", "ml", "mr", "or", "pa", "ta" or "te", or its Pipecat Language (Language.HI; a region, as in Language.HI_IN, is dropped). Left out, the model picks it from each sentence's script
model "vaakini-tts-1" the model; this is the only one
normalize None (on) numbers, currency, dates, times, phone numbers, URLs and emails spoken as words; False turns it off
temperature None sampling temperature, 0.1 to 1.5: lower is steadier
top_k None sample from the k likeliest codes, 1 to 2048
top_p None nucleus sampling, above 0 and at most 1
repetition_penalty None penalty on recently repeated codes, 0 to 5

normalize, temperature, top_k, top_p and repetition_penalty are sent only when set: left out or None, the model's own default applies.

Vaakini checks the settings: a wrong one is reported as an ErrorFrame.

How a reply is spoken

The service streams the LLM's text to Vaakini as it arrives. Vaakini splits it into sentences and speaks each as soon as it is complete, so the first audio follows the reply's first sentence.

Changing settings mid-session

from pipecat.frames.frames import TTSUpdateSettingsFrame

await worker.queue_frame(
    TTSUpdateSettingsFrame(delta=VaakiniTTSService.Settings(voice="Bunty", temperature=0.6))
)

Replies that start afterwards use the new settings. A setting left out of the update keeps its value; None puts one back to the model's default (Settings(temperature=None)).

Interruptions

When the user interrupts, the service tells Vaakini to stop the reply. The next reply starts on the same connection.

Transcripts

The service's TTSTextFrames follow the audio: each sentence's words as its audio starts.

Metrics

With usage metrics on, each reply's TTSUsageMetricsData is the characters Vaakini spoke, which are the ones it charges for: the reply's sentences, without the spaces between them. An interrupted reply counts the sentences sent in full before the interruption.

License

Apache-2.0.

Metadata

Release files for pipecat-vaakini 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pipecat-vaakini 0.1.0
File Size Uploaded Provenance Actions
pipecat_vaakini-0.1.0.tar.gz 15.6 kB Without provenance Details for pipecat_vaakini-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for pipecat-vaakini 0.1.0
File Interpreter ABI Platform Actions
pipecat_vaakini-0.1.0-py3-none-any.whl Python 3 none any Details for pipecat_vaakini-0.1.0-py3-none-any.whl

Total release size: 33.1 kB

Release files / pipecat_vaakini-0.1.0.tar.gz

Download URL pipecat_vaakini-0.1.0.tar.gz
Size 15.6 kB
Tags Source
SHA-256 checksum
How to use checksums
18bc7515469b249ade1d21fb0bd4a9a8080bcf73fb9715ce986b4ecbd2488c54
BLAKE2b-256 checksum
How to use checksums
d0a94e22d74b78e206e7813358fa66b4ff149eafcf80008f7736c9a85c8190f1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.13

Release files / pipecat_vaakini-0.1.0-py3-none-any.whl

Download URL pipecat_vaakini-0.1.0-py3-none-any.whl
Size 17.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8cf4a26517a86baaef56ffdabf2b4271af83e58efda9015d3be6d8c3bf7a81d3
BLAKE2b-256 checksum
How to use checksums
d062e613d8e797a4f24c5eff6c23ae82937040828d422ff28f5a477cc854c480
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.13

Security for pipecat-vaakini 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page