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
- Docs:
Authentication (PINCH_API_KEY)
The SDK reads the API key from:
PINCH_API_KEYenvironment variable (recommended)- A local
.envfile 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(ifaudio_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.wavexamples/transcript.txt
Notes:
- The example reads
examples/input.wavby 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)
| File | Size | Uploaded | |
|---|---|---|---|
| pinch_sdk-0.1.1.tar.gz | 206.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| 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 logRelease 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