Pinch Python SDK for real-time speech translation
Project description
Pinch Python SDK
Real-time speech translation.
Requirements
- Python 3.10+
- A Pinch API key (get one here)
Quick Start (uv recommended)
git clone https://github.com/pinch/pinch-python.git
cd pinch-python
export PINCH_API_KEY="your_key_here"
uv run python examples/translate.py
Install from PyPI
pip install pinch-sdk
Or with uv:
uv add pinch-sdk
Usage
import asyncio
from pinch import translate_file
async def main():
await translate_file(
input_wav_path="input.wav",
output_wav_path="output.wav",
transcript_path="transcript.txt",
# source_language="en-US", # default
# target_language="es-ES", # default
)
asyncio.run(main())
API Key
Set PINCH_API_KEY as an environment variable:
export PINCH_API_KEY="your_key_here"
Or create a .env file in your project directory:
PINCH_API_KEY=your_key_here
Audio Requirements
- Input must be 16-bit PCM WAV
- Supported sample rates: 16000 Hz and 48000 Hz
- Other sample rates require:
pip install "pinch-sdk[audio]"
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pinch_sdk-0.1.0.tar.gz.
File metadata
- Download URL: pinch_sdk-0.1.0.tar.gz
- Upload date:
- Size: 205.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
180577ff1c22cecf704459f348728bff27c12944327ec0e2f5c3abeba975de34
|
|
| MD5 |
d2f20c38f91a213c94c032c02c325ff6
|
|
| BLAKE2b-256 |
aa7c87497dd078d721e2a378d41dc0dacf07bc7408e5ac05d2800a7282df9e00
|
Provenance
The following attestation bundles were made for pinch_sdk-0.1.0.tar.gz:
Publisher:
publish.yml on pinch-eng/pinch-python-sdk
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pinch_sdk-0.1.0.tar.gz -
Subject digest:
180577ff1c22cecf704459f348728bff27c12944327ec0e2f5c3abeba975de34 - Sigstore transparency entry: 836300095
- Sigstore integration time:
-
Permalink:
pinch-eng/pinch-python-sdk@061333255b931998adfd8934ea040a73c1ca63a2 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/pinch-eng
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@061333255b931998adfd8934ea040a73c1ca63a2 -
Trigger Event:
release
-
Statement type:
File details
Details for the file pinch_sdk-0.1.0-py3-none-any.whl.
File metadata
- Download URL: pinch_sdk-0.1.0-py3-none-any.whl
- Upload date:
- Size: 16.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
056f12812ce5b9991db5fa8798876f51192c377fd7df81cf0936c14d42f08c6a
|
|
| MD5 |
2e7491f6972552092c2db3b97fde99e6
|
|
| BLAKE2b-256 |
c66a81f712c8f3f7ae43f93134346e7967d312abefb70a95b16288eb5d6bfd06
|
Provenance
The following attestation bundles were made for pinch_sdk-0.1.0-py3-none-any.whl:
Publisher:
publish.yml on pinch-eng/pinch-python-sdk
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pinch_sdk-0.1.0-py3-none-any.whl -
Subject digest:
056f12812ce5b9991db5fa8798876f51192c377fd7df81cf0936c14d42f08c6a - Sigstore transparency entry: 836300113
- Sigstore integration time:
-
Permalink:
pinch-eng/pinch-python-sdk@061333255b931998adfd8934ea040a73c1ca63a2 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/pinch-eng
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@061333255b931998adfd8934ea040a73c1ca63a2 -
Trigger Event:
release
-
Statement type: