Skip to main content

pipecat-oogam

Oogam speech services for Pipecat: streaming speech-to-text, streaming text-to-speech and the Sutra conversation model, for 27 Indian languages and English.

Service Oogam endpoint What it does
OogamSTTService wss://platform.oogam.ai/v1/realtime?intent=transcription Streaming STT. Final transcripts; finalizes the turn the moment Pipecat's VAD says the user stopped.
OogamTTSService POST /v1/audio/speech (stream: true, response_format: "pcm") Streaming TTS — 24 kHz PCM played as it is generated.
OogamLLMService POST /v1/chat/completions Sutra (sutra-conversation) through Pipecat's OpenAI service.
pip install pipecat-oogam

Requires Python 3.11+, Pipecat 1.16 or later (1.x) and an Oogam API key with the NAAD product enabled. Tested with Pipecat v1.16.0.

Maintained by DWET Labs, the team behind Oogam. Integration guide: oogam.ai/integrations/pipecat.

Speech-to-text

from pipecat.transcriptions.language import Language
from pipecat_oogam import OogamSTTService

stt = OogamSTTService(
    api_key=os.environ["OOGAM_API_KEY"],
    settings=OogamSTTService.Settings(language=Language.HI),
)

Turn-taking stays with your pipeline. Oogam's own end-of-turn detection waits for 700 ms of silence. With this service you do not wait for it: when Pipecat's VAD reports that the user stopped speaking, the service sends Oogam finalize and Oogam closes the turn straight away. Smart Turn — Pipecat's default — or any other turn strategy then decides whether the user's turn is really over, exactly as with any other streaming STT. Set finalize_on_vad_stop=False only if you want Oogam to decide instead.

Each transcript is final. Measured on the live engine (12 Nov 2026): with finalize the transcript arrives about 0.33 s after the caller stops, against about 0.8 s when Oogam waits out its own silence window. If a caller pauses for 0.8 s or more mid-sentence, Oogam closes a turn there and the rest arrives as a second transcript; Pipecat's user aggregator joins them, so Smart Turn still decides when the agent replies. (If Oogam ever re-transcribes a turn with replace, the service pushes only the new words.)

Breaths don't split sentences. Pipecat's VAD also stops at a 0.2 s breath inside a sentence, and Oogam transcribes each finalized stretch on its own — so finalizing there splits the sentence and the second half is heard without its context (measured: "मेरा mobile number | छह पाँच चार है" lost "नौ आठ सात"). Since 0.2 the service holds the finalize for finalize_hold_ms (400) and drops it if the caller carries on, watching the audio itself so a soft restart that Pipecat's VAD is slow to report still counts. Measured on the live engine with Hindi sentences that have a 350 ms breath: 6 of 6 kept whole (0 of 6 in 0.1), for about 0.15–0.25 s on the reply.

For replies about as fast as 0.1, add OogamSmartTurnStopStrategy — Pipecat's own Smart Turn v3 strategy, which also tells the STT to finalize at once when Smart Turn judges a pause to be the end of the turn:

from pipecat.turns.user_turn_strategies import UserTurnStrategies
from pipecat_oogam import OogamSmartTurnStopStrategy

user_params = LLMUserAggregatorParams(
    vad_analyzer=SileroVADAnalyzer(),
    user_turn_strategies=UserTurnStrategies(stop=[OogamSmartTurnStopStrategy(max_wait=1.5)]),
)

Breaths stay whole wherever Smart Turn calls them unfinished (6 of 9 in the same test); when it wrongly calls a breath the end, that sentence splits as in 0.1. max_wait is Smart Turn's stop_secs: how long it waits when it thinks the caller is not finished (Pipecat's default 3 s; 1–1.5 s suits number-heavy calls).

The language must be given — Oogam does not auto-detect. To follow a caller who switches language mid-call, turn on auto-switch:

stt = OogamSTTService(
    api_key=os.environ["OOGAM_API_KEY"],
    settings=OogamSTTService.Settings(
        language=Language.HI,
        auto_switch=True,
        candidates=[Language.HI, Language.EN_IN, Language.GU],
    ),
)

@stt.event_handler("on_language_changed")
async def on_language_changed(service, from_code, to_code, reason):
    # e.g. switch the TTS language to match
    await task.queue_frame(TTSUpdateSettingsFrame(delta=OogamTTSService.Settings(language=to_code)))

Auto-switch acts on Oogam's language hint, which comes after the turn it was detected in — so the first sentence after a switch is transcribed in the old language, and the switch applies from the next one. Changing language with an STTUpdateSettingsFrame re-pins the live session without reconnecting.

Setting Default
language Language.HI A Pipecat Language or an Oogam short code (hi, en-IN, bho).
finalize_hold_ms (constructor) 400 Wait after a VAD stop before finalizing; 0 = finalize at every VAD stop (0.1). Keep it ≤ 500: Oogam closes a turn itself at ~0.8 s of silence.
vad_end_silence_ms Oogam's (700) 700–5000. Reserved: sent to Oogam, but the current engine does not act on it.
auto_switch False Follow a caller who changes language.
candidates any Languages a call may switch to.
min_confidence 0.6 Hint confidence needed to switch.

Audio is sent at 16 kHz mono PCM16; Pipecat resamples whatever your transport delivers.

Text-to-speech

async with aiohttp.ClientSession() as session:
    tts = OogamTTSService(
        api_key=os.environ["OOGAM_API_KEY"],
        aiohttp_session=session,
        settings=OogamTTSService.Settings(voice="aditi", language=Language.HI),
    )

voice is a preset id (aditi, arjun, …) or a cloned voice id from GET /v1/voices. Set language deliberately: Oogam falls back to Hindi for a code it does not know.

Sutra

llm = OogamLLMService(api_key=os.environ["OOGAM_API_KEY"])

No function calling yet. /v1/chat/completions answers a request that carries tools with 400 tools_not_supported, so do not register tools on this service. For tool use, keep Oogam for STT and TTS and pair them with an LLM service that supports tools.

A complete agent

examples/voice_agent.py (in the source distribution, and on oogam.ai/integrations/pipecat) runs Oogam STT → Sutra → Oogam TTS with Silero VAD and Smart Turn, in the browser through Pipecat's development runner:

pip install "pipecat-ai[runner,webrtc,silero]" pipecat-oogam
OOGAM_API_KEY=sk-setu-… python examples/voice_agent.py

Smart Turn v3 ships with Pipecat itself, so it needs no extra.

Billing

Streaming STT is billed at the speech-to-text rate per second the socket is open, TTS per character as on the REST API, and Sutra per token.

Developing

pip install -e ".[dev]"
pytest

Tests that need a running Oogam gateway are skipped unless OOGAM_DEV_STACK points at one.

Support

support@dwetlabs.com · Streaming STT reference

Metadata

Release files for pipecat-oogam 0.2.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-oogam 0.2.0
File Size Uploaded Provenance Actions
pipecat_oogam-0.2.0.tar.gz 22.7 kB Without provenance Details for pipecat_oogam-0.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for pipecat-oogam 0.2.0
File Interpreter ABI Platform Actions
pipecat_oogam-0.2.0-py3-none-any.whl Python 3 none any Details for pipecat_oogam-0.2.0-py3-none-any.whl

Total release size: 41.9 kB

Release files / pipecat_oogam-0.2.0.tar.gz

Download URL pipecat_oogam-0.2.0.tar.gz
Size 22.7 kB
Tags Source
SHA-256 checksum
How to use checksums
787e04ba105fe2b973c9578cc07ba9e4db9197b5ca68412bb0baff9580db1267
BLAKE2b-256 checksum
How to use checksums
82854cf468bd42514c709da6838a88da5d044aaf91700d5665d99c528ef205bc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.11

Release files / pipecat_oogam-0.2.0-py3-none-any.whl

Download URL pipecat_oogam-0.2.0-py3-none-any.whl
Size 19.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
48d00fa43778da8f7a38b5029c9ba3d91af0ac42fa59a4db8d2e9d627caf8cc5
BLAKE2b-256 checksum
How to use checksums
8fcfcf92da8105a9bf55ad031d17fe1a80d753538e89c8ee318068fe19d508a2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.11

Security for pipecat-oogam 0.2.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.

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