Metadata-Version: 2.4
Name: silentir
Version: 0.1.1
Summary: Generate structured notes from YouTube/Bilibili videos using local or online LLMs
Author: silentir contributors
License: MIT
Project-URL: Homepage, https://github.com/hexlianine/silentir
Project-URL: Repository, https://github.com/hexlianine/silentir.git
Keywords: ai,video,notes,summarization,transcription,youtube,bilibili
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Requires-Python: >=3.10
Description-Content-Type: text/markdown
Requires-Dist: yt-dlp>=2024.4.9
Provides-Extra: asr
Requires-Dist: faster-whisper>=1.0.0; extra == "asr"
Requires-Dist: openai-whisper>=20250625; extra == "asr"
Provides-Extra: ui
Requires-Dist: streamlit>=1.36.0; extra == "ui"
Requires-Dist: python-dotenv>=1.0.0; extra == "ui"
Provides-Extra: examples
Requires-Dist: openai; extra == "examples"

# silentir

The `silentir` project generates structured notes from YouTube and Bilibili URLs using local (`Ollama`) or online (`OpenAI-compatible`) models.

## Install

```bash
uv sync
```

Optional ASR dependencies:

```bash
uv sync --extra asr
```

Optional example dependencies (`examples/basic_usage.py`):

```bash
uv sync --extra examples
```

Optional Streamlit UI dependencies:

```bash
uv sync --extra ui
```

Install dev/test dependencies:

```bash
uv sync --group dev
```

## Quickstart

```bash
uv run silentir "https://www.youtube.com/watch?v=dQw4w9WgXcQ" \
  --provider-policy local_first \
  --output-format markdown \
  --include-timestamps section \
  --out notes.md
```

## Python API

```python
from silentir import generate_notes

result = generate_notes(
    "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
    language="auto",
    provider_policy="local_first",
    local_model="qwen2.5:7b-instruct",
    online_model="gpt-4.1-mini",
    ollama_host="http://localhost:11434",
    openai_base_url="https://api.openai.com/v1",
    openai_api_key=None,
)
print(result.note_markdown)
```

Run tests:

```bash
uv run pytest
```

## Lint And Format

Install Git hooks:

```bash
uv run pre-commit install
```

Run checks manually:

```bash
uv run pre-commit run --all-files
uv run ruff check .
uv run ruff format .
```

Architecture and pipeline details:

- `docs/architecture.md`

## Explicit Configuration

All runtime configuration is explicit. Use CLI flags or Python function arguments instead of environment variables.

## Notes

- Subtitle-first transcription is used by default.
- If subtitles are unavailable, ASR transcriber fallback is used.
- Runtime provider fallback follows `provider_policy`.

## Streamlit UI

Run the web UI:

```bash
uv run --extra ui,asr streamlit run examples/basic_ui.py
```

The UI exposes the same configuration options as the CLI and lets you preview and download generated notes.
You can also provide an optional `write path` to persist the rendered notes directly to a file.

## Skill

`silentir` can be used as an skill.

1. Ensure `silentir` is installed in the agent's environment.
2. Copy the `skills/silentir` directory to your skills folder.
3. The agent can then use the `/silentir` command to process video URLs.

**Skill files:**
- `skills/silentir/SKILL.md`: Manifest and metadata.
- `skills/silentir/handler.py`: Execution wrapper.
