Skip to main content

langchain-flowspeech

langchain-flowspeech provides LangChain tools for generating text-to-speech audio with FlowSpeech.

FlowSpeech is a context-aware text-to-speech service for human-like narration with emotion control, pause control, and multi-speaker voice configuration.

Installation

pip install langchain-flowspeech

Authentication

Create a FlowSpeech API key in your FlowSpeech account, then export it:

export FLOWSPEECH_API_KEY="..."

Do not commit API keys, cookies, session tokens, or provider credentials.

Usage

from langchain_flowspeech import FlowSpeechTextToSpeechTool

tool = FlowSpeechTextToSpeechTool()

result = tool.invoke({
    "text": "Welcome to FlowSpeech. This audio is generated from a LangChain tool.",
    "voice_name": "Kore",
    "output_path": "flowspeech-demo.wav",
})

print(result["output_path"])
print(result["mime_type"])
print(result["quota"])

Multi-Speaker Speech

from langchain_flowspeech import FlowSpeechSpeaker, FlowSpeechTextToSpeechTool

tool = FlowSpeechTextToSpeechTool()

result = tool.invoke({
    "text": "Speaker A: We can make this sound natural.\nSpeaker B: Great, let's use different voices.",
    "speakers": [
        FlowSpeechSpeaker(speaker="Speaker A", voice_name="Kore"),
        FlowSpeechSpeaker(speaker="Speaker B", voice_name="Puck"),
    ],
    "output_path": "conversation.wav",
})

API Surface

The package uses the public FlowSpeech API:

  • GET /api/ai/text-to-speech/quota
  • POST /api/ai/text-to-speech

Responses include base64-encoded audio and metadata such as MIME type, sample rate, channel count, bit depth, and quota information.

Development

python -m venv .venv
. .venv/bin/activate
pip install -e ".[test]"
pytest

Publishing

This project is ready for PyPI packaging. Build locally with:

python -m pip install build
python -m build

For GitHub Actions trusted publishing, configure a PyPI trusted publisher for waeckerlinfederowicz66-sketch/langchain-flowspeech, then add a publishing workflow with id-token: write.

Safety

This repository intentionally contains no secrets. Tests use mocked HTTP responses.

Metadata

Release files for langchain-flowspeech 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 langchain-flowspeech 0.1.0
File Size Uploaded
langchain_flowspeech-0.1.0.tar.gz 6.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for langchain-flowspeech 0.1.0
File Interpreter ABI Platform
langchain_flowspeech-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 13.0 kB

Release files / langchain_flowspeech-0.1.0.tar.gz

Download URL langchain_flowspeech-0.1.0.tar.gz
Size 6.5 kB
Tags Source
SHA-256 checksum
How to use checksums
892e1acb2d273152229ad73569e829a028887f270324f40e727c3a5dbc5d9107
BLAKE2b-256 checksum
How to use checksums
5417ecde278492f1d2de0632f065853800162cf276e24b9929d4d68768affff4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 21, 2026.

Transparency log

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

Download URL langchain_flowspeech-0.1.0-py3-none-any.whl
Size 6.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e4c47a33221b8af51128c04c5b848e1acc0f98096eeb81723fee3cd668834f24
BLAKE2b-256 checksum
How to use checksums
31bde0c9f6ef6b091c69ade7fbde7909d332a3ec388b20bc491739524f1189a6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 21, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

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