Metadata-Version: 2.4
Name: sotto
Version: 0.1.2
Summary: Private voice transcription server — receive audio, transcribe locally, write clean text.
Project-URL: Homepage, https://github.com/reedshea/sotto
Project-URL: Repository, https://github.com/reedshea/sotto
Author: Reed Shea
License-Expression: MIT
Keywords: private,self-hosted,transcription,voice,whisper
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Multimedia :: Sound/Audio :: Speech
Requires-Python: >=3.11
Requires-Dist: fastapi>=0.104
Requires-Dist: faster-whisper>=1.0
Requires-Dist: httpx>=0.25
Requires-Dist: nvidia-cublas-cu12; sys_platform == 'win32'
Requires-Dist: nvidia-cudnn-cu12; sys_platform == 'win32'
Requires-Dist: python-multipart>=0.0.6
Requires-Dist: pyyaml>=6.0
Requires-Dist: uvicorn[standard]>=0.24
Provides-Extra: dev
Requires-Dist: httpx; extra == 'dev'
Requires-Dist: pytest-asyncio>=0.23; extra == 'dev'
Requires-Dist: pytest>=7.0; extra == 'dev'
Requires-Dist: ruff>=0.1; extra == 'dev'
Description-Content-Type: text/markdown

# Sotto

*Sotto voce: in a quiet voice.* Your words, captured reliably, processed privately.

Sotto is a lightweight Python server that receives audio uploads, transcribes them locally with Whisper, generates a short title and summary via LLM, and writes clean text output to a configurable location.

Designed to run on hardware you control. Pairs with the [`sotto mobi` iOS app](https://github.com/reedshea/sotto/ios) for reliable voice capture.

## Quickstart

```bash
pip install sotto
sotto init          # creates ~/.config/sotto/config.yaml
sotto start         # starts receiver + worker on port 8377
```

## Configuration

```bash
sotto init
# Edit ~/.config/sotto/config.yaml
sotto start
```

Key settings:

- **storage.output_dir** — where completed transcripts are written (default: `~/.local/share/sotto`)
- **pipelines** — separate pipelines for private (local LLM) and standard (API) processing
- **whisper.model** — Whisper model size (default: `large-v3`)
- **whisper.device** — `cuda` or `cpu`
- **auth.tokens** — bearer tokens for authenticating uploads from the iOS app

## API

### Upload audio

```
POST /upload
Content-Type: multipart/form-data
Authorization: Bearer <token>

file: <audio file>
privacy: "private" | "standard"
```

Returns: `{"uuid": "...", "status": "pending"}`

### Check job status

```
GET /jobs/<uuid>
Authorization: Bearer <token>
```

### List jobs

```
GET /jobs?limit=50&offset=0
Authorization: Bearer <token>
```

### Health check

```
GET /health
```

## Output

For each completed job, two files are written to `output_dir/completed/YYYY/MM/`:

- `<uuid>.txt` — clean transcript
- `<uuid>.json` — metadata (title, summary, duration, pipeline info)

## Prerequisites

- Python 3.11+
- [Ollama](https://ollama.ai) running separately (for private pipeline)
- Anthropic API key (for standard pipeline)
- CUDA-capable GPU recommended for Whisper transcription

## Releases & CI/CD
This project uses a monorepo structure with automated deployments triggered by git tags:

* **iOS (TestFlight):** Push a tag starting with ios-v (e.g., git tag ios-v1.0.0) to trigger Xcode Cloud builds.

* **Python (PyPI):** Push a tag starting with py-v (e.g., git tag py-v1.0.0) to trigger the GitHub Actions publishing workflow.

Note: Ensure you increment the version number in pyproject.toml before tagging to avoid "Version Already Exists" errors.

## License

MIT — Built by Reed Shea. Open source. Private by design.
