Skip to main content

parlat-cli

Python SDK, CLI и MCP-сервер для Парлат — голосовой расшифровки на русском.

Установка

Выберите режим в зависимости от использования:

# 1. Только SDK + базовый CLI (login / status / transcribe FILE)
#    ~3 MB зависимостей, без C-расширений.
pip install parlat-cli

# 2. + микрофон (parlat record)
pip install 'parlat-cli[record]'

# 3. + MCP-сервер для Claude Code / Cursor / Windsurf / Claude Desktop
pip install 'parlat-cli[mcp]'

# 4. Всё разом
pip install 'parlat-cli[all]'

Запись с микрофона на Linux дополнительно требует PortAudio (в колёсах для macOS/Windows он уже внутри):

sudo apt install libportaudio2

SDK

from parlat.client import APIClient, ApiError

client = APIClient(
    "https://api.parlat.ru",
    token="parlat_sk_..."   # из /dashboard/api-keys
)

# Файл с диска
result = client.transcribe_file("meeting.mp3", language="auto")
print(result["text"])

# Уже загруженные байты (например, из Telegram-бота)
audio_bytes = await download_from_tg(...)
result = client.transcribe_file(
    "voice.oga",
    file_bytes=audio_bytes,
    language="ru",
)

Все ошибки бросают ApiError(code, message, upgrade_url, status):

try:
    client.transcribe_file("big.wav")
except ApiError as e:
    if e.code == "not_pro":
        print(f"Upgrade: {e.upgrade_url}")
    elif e.code == "file_too_large":
        print("Too big — split into 25 MB chunks")

CLI

parlat login                            # email + пароль интерактивно
parlat status                           # план и квота
parlat transcribe meeting.mp3           # файл → текст в stdout
parlat transcribe voice.oga --lang ru   # форсировать язык
parlat record --copy                    # с микрофона (нужен [record])
parlat record --max 30                  # лимит 30 сек
parlat logout                           # удалить токен

Exit codes: 0 ok, 1 ошибка API, 2 не залогинен, 3 нужна Pro-подписка, 4 сеть, 5 не установлен extra.

MCP

После pip install 'parlat-cli[mcp]' и parlat login добавьте в свой MCP-клиент:

// ~/.config/claude-code/mcp.json (или аналог для Cursor / Windsurf / Claude Desktop)
{
  "mcpServers": {
    "parlat": {
      "command": "parlat",
      "args": ["mcp"]
    }
  }
}

Появятся два инструмента:

  • transcribe_voice — записать с микрофона, вернуть текст. Авто-стоп после 2 сек тишины.
  • transcribe_file — расшифровать локальный файл.

Telegram-бот за 30 секунд

from aiogram import Bot, Dispatcher, F, types
import aiohttp, os

bot = Bot(token=os.environ["TG_TOKEN"])
dp = Dispatcher()

@dp.message(F.voice)
async def handle_voice(msg: types.Message):
    file = await bot.get_file(msg.voice.file_id)
    url = f"https://api.telegram.org/file/bot{bot.token}/{file.file_path}"
    async with aiohttp.ClientSession() as s:
        r = await s.post(
            "https://api.parlat.ru/v1/transcribe/url",
            headers={"Authorization": f"Bearer {os.environ['PARLAT_KEY']}"},
            json={"url": url, "language": "auto"},
        )
        data = await r.json()
        await msg.answer(data["text"])

Никаких локальных моделей, никакого ffmpeg на твоей стороне — всё на сервере Parlat.

Получить API-ключ

  1. Регистрация на parlat.ru/signup
  2. Оформить Pro на parlat.ru/pricing (290 ₽/мес)
  3. parlat.ru/dashboard/api-keys → «Создать ключ»

Документация

parlat.ru/docs.html — полный endpoint reference, примеры на Python/Node/aiogram, error codes, лимиты.

Лицензия

MIT. См. pypi.org/project/parlat-cli.

Metadata

Release files for parlat-cli 0.2.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for parlat-cli 0.2.1
File Size Uploaded
parlat_cli-0.2.1.tar.gz 14.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for parlat-cli 0.2.1
File Interpreter ABI Platform
parlat_cli-0.2.1-py3-none-any.whl Python 3 none any Details

Total release size: 25.3 kB

Release files / parlat_cli-0.2.1.tar.gz

Download URL parlat_cli-0.2.1.tar.gz
Size 14.9 kB
Tags Source
SHA-256 checksum
How to use checksums
e9ae8d2f6ac1dd014ee0035300f79a95435ddf1a5967f99fddf4ec13b71e64bd
BLAKE2b-256 checksum
How to use checksums
8abf366d4c5d2255aacf4350a8fab0f5e66a1f460385dde6bb452f9134b56a59
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.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 Aug 8, 2026.

Transparency log

Release files / parlat_cli-0.2.1-py3-none-any.whl

Download URL parlat_cli-0.2.1-py3-none-any.whl
Size 10.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
fc10a551b40482be68dbfcb0694cd7dd0bd8ab33e6aa6d278a05c41884ae425b
BLAKE2b-256 checksum
How to use checksums
8ec92591f48caa818d9d3d21c6802e243d8e5ac2e3a7379961e7e6dda87174f0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.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 Aug 8, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.2.1 This release

2 release files

0.2.0

2 release files

0.1.0

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