> ## Documentation Index
> Fetch the complete documentation index at: https://docs.lokutor.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Langflow

> Use Lokutor text to speech and speech to text as components in Langflow flows.

The Lokutor bundle adds two components to [Langflow](https://www.langflow.org): **Lokutor Text to Speech** and **Lokutor Speech to Text**, in English, Spanish, Catalan, Galician, Basque, Portuguese, French, Italian and German.

Source: the `lokutor` folder of `lfx-bundles` in [langflow-ai/langflow](https://github.com/langflow-ai/langflow), submitted as [langflow-ai/langflow#16133](https://github.com/langflow-ai/langflow/pull/16133) against the `release-1.14.0` branch. Until it is merged and released, the components are not available in a stock Langflow install.

## Setup

1. Create an API key in the [dashboard](https://app.lokutor.com).
2. Install the bundle's extra (it has no dependencies of its own): `uv pip install "lfx-bundles[lokutor]"`.
3. In the Langflow editor, open **Bundles > Lokutor** and drag a component onto the canvas.
4. Paste the key into **Lokutor API Key**, or store it as a Langflow global variable.

## Components

| Component | Lokutor endpoint | Output |
| :- | :- | :- |
| Lokutor Text to Speech | [`POST /v1/tts/synthesize`](https://docs.lokutor.com/api-reference/rest) with `text`, `voice` (`F1`-`F5`, `M1`-`M5` or a `clone_...` id), `language` and `temperature` | `Data`: `audio_base64` (WAV), `mime_type`, `sample_rate`, `duration_seconds`, `size_bytes`, `voice`, `language` |
| Lokutor Speech to Text | [`POST /v1/speech-to-text`](https://docs.lokutor.com/api-reference/speech-to-text) with `file`, `language_code`, and optionally `diarize` and `num_speakers` | `Message` (transcript) and `Data` (language, per-word times, speaker labels) |

Speech to text reads an uploaded WAV file, or the `Data` from **Lokutor Text to Speech** connected to its **Audio Data** input. If both outputs are connected, one request is made and billed.

## Limits

* Speech to text takes **WAV only** (PCM 8 or 16 bit, 8 to 48 kHz, 10 MB; larger only with speaker labels on). Convert other formats first.
* Text to speech returns WAV, and text is limited to 10,000 characters per component run.
* Without a language, synthesis has no language hint; set one for predictable results outside English.
* Errors (invalid key, no balance, unsupported audio) fail the component with the status and message Lokutor returned.

## What was not verified

The components were tested against the live API through their Python classes (a "Hello" synthesized and transcribed back) and with mocked-HTTP unit tests. They were not run inside a running Langflow server: the editor rendering, the **Bundles** sidebar entry, and how the Playground displays the audio `Data` were not checked.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.