Skip to main content

Pinch Python SDK

Requirements

  • Python 3.10+
  • A Pinch API key in PINCH_API_KEY
    • Docs: https://www.startpinch.com/docs
    • Create/manage API keys (Portal): https://portal.startpinch.com/dashboard/developers

Authentication (PINCH_API_KEY)

The SDK reads the API key from:

  1. PINCH_API_KEY environment variable (recommended)
  2. A local .env file in your current working directory (optional)

Example .env file (optional):

PINCH_API_KEY=your_key_here

Install (pip)

python3 -m pip install pinch-sdk

Optional (only needed for WAV resampling support for non-16k/48k inputs):

python3 -m pip install "pinch-sdk[audio]"

Install (uv)

In a uv-managed project:

uv add pinch-sdk

Usage

Create a small script (for example translate.py) in your own project:

import asyncio

from pinch import PinchClient

async def main() -> None:
    client = PinchClient()  # reads PINCH_API_KEY

    await client.translate_file(
        input_wav_path="input.wav",
        output_wav_path="output.wav",
        transcript_path="transcript.txt",
        # defaults:
        # source_language="en-US"
        # target_language="es-ES"
        # audio_output_enabled=True
    )

if __name__ == "__main__":
    asyncio.run(main())

Run (pip environment):

export PINCH_API_KEY="..."
python3 translate.py

Run (uv environment):

export PINCH_API_KEY="..."
uv run python translate.py

Outputs:

  • output.wav (if audio_output_enabled=True)
  • transcript.txt

Input audio notes

  • Input must be 16-bit PCM WAV
  • Streaming API supports sample rates: 16000 Hz (recommended) and 48000 Hz
  • WAV helpers support 16000 Hz and 48000 Hz out of the box
  • Other sample rates require resampling deps: python3 -m pip install "pinch-sdk[audio]"

Repo example (for this git checkout)

This repository includes an example script and a default input WAV.

Run with pip:

python3 -m pip install -e .
export PINCH_API_KEY="..."
python3 examples/translate.py

Run with uv:

uv sync
export PINCH_API_KEY="..."
uv run python examples/translate.py

Outputs (generated):

  • examples/output.wav
  • examples/transcript.txt

Notes:

  • The example reads examples/input.wav by default.
  • The example does not print transcripts to stdout; it only writes examples/transcript.txt.

Metadata

Release files for pinch-sdk 0.1.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 pinch-sdk 0.1.1
File Size Uploaded
pinch_sdk-0.1.1.tar.gz 206.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pinch-sdk 0.1.1
File Interpreter ABI Platform
pinch_sdk-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 224.0 kB

Release files / pinch_sdk-0.1.1.tar.gz

Download URL pinch_sdk-0.1.1.tar.gz
Size 206.5 kB
Tags Source
SHA-256 checksum
How to use checksums
374d4d82477f3a552ebbaabda2a417d9cc250eadb14a591d443319c2cd5c4593
BLAKE2b-256 checksum
How to use checksums
07e6e441cb7f03a51cdacb4ebb4fb0c48b27eda6b92e8250daba0eae81b7af66
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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 Jan 20, 2026.

Transparency log

Release files / pinch_sdk-0.1.1-py3-none-any.whl

Download URL pinch_sdk-0.1.1-py3-none-any.whl
Size 17.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e2d1ac2ef87f02dbc9fc08dd61bef6e04b4c5ddc11cd0c4839766355654b8ed9
BLAKE2b-256 checksum
How to use checksums
4af8674609946ab69a83666f56d265bef19662ffa7f6641d037d27fcbb2cd30d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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 Jan 20, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.1.1 This release

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