Skip to main content

LiveKit Agents plugin for Pinch real-time speech-to-speech translation

Project description

livekit-plugins-pinch

Real-time voice translation for LiveKit Agents, powered by Pinch.


What it does

Drop this plugin into any LiveKit room and it will:

  • Translate spoken audio in real time from one language to another
  • Publish the translated audio back into the room as a separate track
  • Emit transcripts (original + translated) via a simple callback

Installation

pip install livekit-plugins-pinch

Configuration

You need a Pinch API key. Get one at the developers portal.

Set it in your environment:

export PINCH_API_KEY=pk_your_key_here

That's the only credential this plugin needs. Your LiveKit credentials stay in your own app as usual.


Usage

from livekit import rtc
from livekit.plugins.pinch import Translator, TranslatorOptions

async def entrypoint(ctx: JobContext):
    await ctx.connect()

    translator = Translator(
        options=TranslatorOptions(
            source_language="en-US",
            target_language="es-ES",
            voice_type="clone",  # "clone" | "female" | "male"
        )
    )

    @translator.on_transcript
    def on_transcript(event):
        if event.is_final:
            print(f"[{event.type}] {event.text}")

    await translator.start(ctx.room)

Voice types

Value Description
clone Preserves the speaker's original voice identity (default)
female Standard female voice
male Standard male voice

Supported languages

Full list of language codes: supported languages


License

Apache 2.0 — see LICENSE for details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

livekit_plugins_pinch-0.1.0.tar.gz (11.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

livekit_plugins_pinch-0.1.0-py3-none-any.whl (12.2 kB view details)

Uploaded Python 3

File details

Details for the file livekit_plugins_pinch-0.1.0.tar.gz.

File metadata

  • Download URL: livekit_plugins_pinch-0.1.0.tar.gz
  • Upload date:
  • Size: 11.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for livekit_plugins_pinch-0.1.0.tar.gz
Algorithm Hash digest
SHA256 89c7753d0e626a1dc7760d3c1efe006f3db95eeecc683fa386db901237e92cd0
MD5 e4c0a28d4bac98739d5adc5206bd1384
BLAKE2b-256 d8b4fe81dac055dc5a71da04b307c5b1c7edd2af15a1d17367639676ac0220d9

See more details on using hashes here.

Provenance

The following attestation bundles were made for livekit_plugins_pinch-0.1.0.tar.gz:

Publisher: publish.yml on pinch-eng/livekit-plugins-pinch

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file livekit_plugins_pinch-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for livekit_plugins_pinch-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 bc2a1ab575b3e05cd73d882c0d9b10e98344bcc08dc3950b2cb10353b2f6383b
MD5 78ab180ca40f60821f7997807ebd6f49
BLAKE2b-256 98e36faf4477dc569db39dbf542140d525c9e500ea58a7a21d1ac824b9b939f2

See more details on using hashes here.

Provenance

The following attestation bundles were made for livekit_plugins_pinch-0.1.0-py3-none-any.whl:

Publisher: publish.yml on pinch-eng/livekit-plugins-pinch

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page