$npx skillfedfor your agent

cartesia

The official Python library for the cartesia API

Worth itPyPI Python ModulesReleased Aug 2026835.7K downloads / moApache-2.0Pure Python

Decision gist · record as of 2026-08-14

pure-Python wheel — cartesia-4.0.1-py3-none-any.whl
v4.0.1 · released 2026-08-14 · Python >=3.9 · 6 runtime deps: anyio, distro, httpx, pydantic, sniffio, typing-extensions

Yes. The package is actively maintained, has low install friction, carries a permissive license, and provides a straightforward typed interface to a modern TTS API. Install it if you need to integrate Cartesia's speech synthesis into a Python application. No known security vulnerabilities and supports Python 3.9 through 3.14.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Requires a valid Cartesia API key set in the CARTESIA_API_KEY environment variable.
  • Low install friction with a pure-Python wheel and six common runtime dependencies.
  • The package is actively maintained with a recent release and 128 repository stars.

License · maintenance · safety

Apache-2.0 (permissive) — Licensed under Apache-2.0 (permissive), allowing free use, modification, and distribution with minimal restrictions—suitable for both open-source and commercial projects.

last release 2026-08-14 (0 days) · last repo commit 2026-08-14 · 128 stars

0 known vulnerabilities (OSV.dev, 2026-08-14) · 835,744 downloads/mo, #4,934 on PyPI

Verify before relying

pip install cartesia

import os
from cartesia import Cartesia

client = Cartesia(api_key=os.getenv("CARTESIA_API_KEY"))
response = client.tts.generate(
    model_id="sonic-latest",
    output_format={"container": "wav", "encoding": "pcm_f32le", "sample_rate": 44100},
    transcript="Hello world",
    voice="e07c00bc-4134-4eae-9ea4-1a55fb45746b",
)
response.write_to_file("output.wav")
  • Whether the websockets extra dependency (mentioned in install docs) is included in the runtime dependency list or must be installed separately.
  • Performance characteristics and latency for real-time streaming use cases.
  • Rate limits and quota behavior when generating multiple concurrent audio streams.
Same gist for agents: .md · .json

What it is and what it does

Cartesia is a Python client library that wraps the Cartesia REST API, enabling developers to generate speech from text using the Sonic real-time text-to-speech model. It provides both synchronous and asynchronous clients powered by httpx, with full type hints for request and response objects. The library supports streaming inputs via websockets, allowing text fragments to be pushed incrementally—useful for latency-sensitive applications like voice agents that need to synthesize LLM output as it streams.

The package handles common API patterns including error handling, retries, timeouts, and file uploads. It supports multiple output formats (container types, encodings, sample rates) and voice selection. Developers can use either the blocking Cartesia client or AsyncCartesia for concurrent operations, with identical functionality between the two.

Use it for

  • Generate speech audio from text and save to file for playback or distribution.
  • Stream text fragments from an LLM to Cartesia over websockets for low-latency voice agent responses.
  • Build concurrent text-to-speech pipelines using AsyncCartesia for batch audio generation.
  • Integrate real-time speech synthesis into interactive applications with custom voice selection and audio format control.

Worth the install?

AI-flagged interpretation of the facts on this page. Verify before relying on it.

Worth it

Yes.

The package is actively maintained, has low install friction, carries a permissive license, and provides a straightforward typed interface to a modern TTS API. Install it if you need to integrate Cartesia's speech synthesis into a Python application. No known security vulnerabilities and supports Python 3.9 through 3.14.

Install

cartesia on PyPI

Before you install

Low install friction with a pure-Python wheel and six common runtime dependencies. The package is actively maintained with a recent release and 128 repository stars.

Requires a valid Cartesia API key set in the CARTESIA_API_KEY environment variable.

License in practice

Licensed under Apache-2.0 (permissive), allowing free use, modification, and distribution with minimal restrictions—suitable for both open-source and commercial projects.

Quickstart

pip install cartesia

import os
from cartesia import Cartesia

client = Cartesia(api_key=os.getenv("CARTESIA_API_KEY"))
response = client.tts.generate(
    model_id="sonic-latest",
    output_format={"container": "wav", "encoding": "pcm_f32le", "sample_rate": 44100},
    transcript="Hello world",
    voice="e07c00bc-4134-4eae-9ea4-1a55fb45746b",
)
response.write_to_file("output.wav")

Verify before relying

  • Whether the websockets extra dependency (mentioned in install docs) is included in the runtime dependency list or must be installed separately.
  • Performance characteristics and latency for real-time streaming use cases.
  • Rate limits and quota behavior when generating multiple concurrent audio streams.

Package facts

LicenseApache-2.0 permissive
Python supportSupports the current Python release >=3.9
Install frictionLow. Pure-Python wheel
Runtime dependencies
6 packages
anyiodistrohttpxpydanticsniffiotyping-extensions
MaintenanceActively maintained 0 days since the last release
Last repo commit
First released
Downloads835,744 / month, #4,934 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14
Classifiers
Intended Audience :: DevelopersLicense :: OSI Approved :: Apache Software LicenseOperating System :: MacOSOperating System :: Microsoft :: WindowsOperating System :: OS IndependentOperating System :: POSIXOperating System :: POSIX :: LinuxProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: 3.9Topic :: Software Development :: Libraries :: Python ModulesTyping :: Typed

Evidence: cartesia-4.0.1-py3-none-any.whl

Tags

Capabilities
cartesia text-to-speech api clientpython tts libraryreal-time speech synthesisstreaming audio generationcartesia sonic apiwebsocket tts clientasync text to speech
Topics
text-to-speechapi-clientasync-support

Let your AI agent find packages like this

Example. Real query, live index.

You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.

wish › “cartesia text-to-speech api client”

Give your agent the search over MCP, or paste the wish link into any chat.

More Python Modules packages

idna Worth it
PyPI · Python Modules · released Jun 2026

Converts domain names between Unicode and ASCII-compatible encoding (Punycode) according to IDNA 2008 and Unicode Technical Standard 46, with security validation and broader script coverage than the standard library.

Install it if you work with internationalized domain names, need to validate domains, or use HTTP clients that depend on it transitively.

BSD-3-Clausepure Python · 3.9+
1.8Bdownloads / mo
setuptools Worth it
PyPI · Python Modules · released Aug 2026

Setuptools is a Python build backend and package management tool that handles building, distributing, and installing Python packages, including support for C/C++ extension modules.

MITpure Python · 3.10+
1.6Bdownloads / mo
PyYAML Worth it
PyPI · Python Modules · released Sep 2025

PyYAML parses and emits YAML 1.1 data format, enabling serialization and deserialization of configuration files and Python objects to and from human-readable YAML text.

MITcompiled wheel · 3.8+
1.2Bdownloads / mo
pydantic Worth it
PyPI · Python Modules · released May 2026

Pydantic validates Python data structures against type hints, coercing and checking input at runtime to ensure it matches a declared schema.

MITpure Python · 3.9+
1.1Bdownloads / mo
annotated-types Worth it
PyPI · Python Modules · released Jul 2026

Provides reusable metadata objects for use with PEP-593 `typing.Annotated` to express common constraints like bounds, collection sizes, and predicates on types.

Install it if you use or build libraries that need to express type constraints in a standardized, inspectable way—or if you want to annotate your own types with…

MITpure Python · 3.10+
871.3Mdownloads / mo
typing-inspection Worth it
PyPI · Python Modules · released Aug 2026

Provides runtime tools to inspect and introspect Python type annotations, enabling programmatic examination of type hints at execution time.

MITpure Python · 3.10+
783.0Mdownloads / mo

See also livekit-plugins-cartesia · kugelaudio · livekit-plugins-soniox · deepgram-sdk · gladiaio-sdk · fish-audio-sdk · elevenlabs · gTTS · speechmatics-rt · miniaudio