Pipecat Lokutor
Lokutor text-to-speech and speech-to-text integration for Pipecat.
Get an API key and test voices at app.lokutor.com. Documentation: docs.lokutor.com
Lokutor TTS runs entirely on CPU-only infrastructure, keeping costs low while delivering high-quality speech synthesis. No GPU markup — just affordable, scalable TTS.
Installation
pip install pipecat-lokutor
Or with uv:
uv add pipecat-lokutor
Usage
from pipecat_lokutor import LokutorTTSService
tts = LokutorTTSService(
api_key="your_api_key",
voice_id="F1",
params=LokutorTTSService.InputParams(
language="en",
speed=1.0,
steps=5,
visemes=False,
),
)
Pipecat Pipeline
from pipecat.pipeline.pipeline import Pipeline
pipeline = Pipeline([
transport.input(),
stt,
llm,
tts,
transport.output(),
])
Expression tags
Lokutor TTS understands expression tags in the text: the sounds [laugh], [sigh] and [breath], and eight emotion tags that change how a sentence is spoken. They are plain text, so an LLM can emit them in its reply and LokutorTTSService passes them through unchanged. See Expression tags for the list and how to use them.
Speech-to-text
LokutorSTTService streams audio to Lokutor's real-time recogniser (wss://api.lokutor.com/ws/stt, our own Conv 2.0 model, nine languages: en, es, ca, gl, eu, pt, fr, it, de) and pushes interim and final transcripts.
from pipecat.transcriptions.language import Language
from pipecat_lokutor import LokutorSTTService
stt = LokutorSTTService(
api_key="your_api_key",
settings=LokutorSTTService.Settings(
language=Language.ES, # None: detect the language
keyterms=["Lokutor", "Pipecat"], # optional custom vocabulary, up to 100
),
)
Notes:
- The pipeline's audio input must be 16 kHz mono (Pipecat's default); the service refuses to start otherwise.
- Lokutor ends a session when you ask for the final transcript, so the service sends
endas soon as Pipecat's VAD reports that the user stopped speaking and reopens the socket for the next utterance (finalize_on_vad_stop=True). Set it toFalseto rely on the server's own end-of-utterance detection (about 0.7 s of silence). - Set
ttfs_p99_latencyto the value you measure for your setup with the Pipecat STT benchmark. - The service was tested with Pipecat 1.12.
pipeline = Pipeline([transport.input(), stt, llm, tts, transport.output()])
Voices
Browse and test available voices at app.lokutor.com.
Supported Languages
32 languages: en, es, fr, de, it, pt, ja, ko, zh, ar, bg, hr, cs, da, nl, et, fi, el, hi, hu, id, lv, lt, pl, ro, ru, sk, sl, sv, tr, uk, vi.
Pass any Pipecat Language (including regional variants like Language.EN_US) — it is normalized to the matching Lokutor base code automatically.
Example
See examples/groq-stt-groq-llm-lokutor-tts.py for a full example using Groq STT + Groq LLM + Lokutor TTS.
# Install dependencies
uv sync
# Set environment variables
export GROQ_API_KEY="your_groq_api_key"
export LOKUTOR_API_KEY="your_lokutor_api_key"
# Run the example
python examples/groq-stt-groq-llm-lokutor-tts.py -t webrtc
Then open http://localhost:7860/client/.
Compatibility
Tested with Pipecat v0.0.86+.
License
BSD 2-Clause License. See LICENSE for details.
Metadata
Release files for pipecat-lokutor 0.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pipecat_lokutor-0.3.0.tar.gz | 13.0 kB | Without provenance | Details for pipecat_lokutor-0.3.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pipecat_lokutor-0.3.0-py3-none-any.whl | Python 3 | none | any | Details for pipecat_lokutor-0.3.0-py3-none-any.whl |
Total release size: 24.3 kB
Release files / pipecat_lokutor-0.3.0.tar.gz
| Download URL | pipecat_lokutor-0.3.0.tar.gz |
|---|---|
| Size | 13.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a0baabbcbf3f91295c81aa3f75136b62fba9cb51dec6194148ff252aa87a74d7
|
|
BLAKE2b-256 checksum How to use checksums |
6dbbdb43a9ca67aa9381b7bfb574db4b319fa7758901146d82a7f7c1374d78a5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.2
|
Release files / pipecat_lokutor-0.3.0-py3-none-any.whl
| Download URL | pipecat_lokutor-0.3.0-py3-none-any.whl |
|---|---|
| Size | 11.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d7629f93492bfbf6504f400ec21b17b63c50cdc9aab99ea0fdaf1cb33cace010
|
|
BLAKE2b-256 checksum How to use checksums |
ce3f2838fa69190d70f9a12140c45d767d646620ab58ab7b9f23decc49b94332
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.2
|
Security for pipecat-lokutor 0.3.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.