Metadata-Version: 2.4
Name: pinch-sdk
Version: 0.1.0
Summary: Pinch Python SDK for real-time speech translation
Project-URL: Homepage, https://startpinch.com
Project-URL: Repository, https://github.com/pinch/pinch-python
Project-URL: Documentation, https://github.com/pinch/pinch-python#readme
Author: Pinch
License: MIT
License-File: LICENSE
Keywords: audio,pinch,realtime,speech,stt,translation,tts,voice
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Typing :: Typed
Requires-Python: >=3.10
Requires-Dist: httpx>=0.25.0
Requires-Dist: livekit>=0.12.0
Provides-Extra: audio
Requires-Dist: numpy>=1.24.0; extra == 'audio'
Requires-Dist: soxr>=0.3.7; extra == 'audio'
Provides-Extra: dev
Requires-Dist: pytest>=8.0.0; extra == 'dev'
Description-Content-Type: text/markdown

# Pinch Python SDK

Real-time speech translation.

## Requirements

- Python **3.10+**
- A Pinch API key ([get one here](https://startpinch.com))

## Quick Start (uv recommended)

```bash
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

```bash
pip install pinch-sdk
```

Or with uv:

```bash
uv add pinch-sdk
```

## Usage

```python
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:

```bash
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
