diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml index d1861ff..a0a8a05 100644 --- a/.github/ISSUE_TEMPLATE/config.yml +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -3,6 +3,9 @@ contact_links: - name: Live browser demo url: https://huggingface.co/spaces/Abol0pati/sokhan-fa-demo about: Try Sokhan's speech engine client-side before filing an issue. + - name: Questions & ideas + url: https://github.com/Abolfazlrwm/sokhan/discussions + about: Ask questions and share ideas in the Discussions forum. - name: Security vulnerabilities url: https://github.com/Abolfazlrwm/sokhan/blob/main/SECURITY.md about: Please report vulnerabilities privately, not as public issues. diff --git a/CHANGELOG.md b/CHANGELOG.md index 56b268b..7986346 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,28 @@ The format follows [Keep a Changelog](https://keepachangelog.com/) and the proje ## [Unreleased] +### Added + +- `CITATION.cff` so the project can be cited in academic work +- FastAPI app metadata: MIT license info is now rendered on `/docs` + +### Changed + +- Backend and bot package versions are dynamic now — they track + `__version__` (single source of truth, currently 1.4.0) instead of the + stale hardcoded `0.1.0` — and both carry full PEP 621 metadata: + authors, MIT license, keywords, classifiers and project URLs +- `sokhan_bot.__version__` tracks the release again (was stuck at 1.1.0) +- The web `package.json` matches the release version and declares + description, license, repository and bugs URLs +- `deploy/docker-compose.yml` passes the plan/admin variables through to + the containers (`PLAN_FREE_MAX_FILE_MINUTES`, + `PLAN_PRO_MAX_FILE_MINUTES`, `PLAN_PRO_MONTHLY_MINUTES`, + `ADMIN_API_KEY`) — before this, plan caps were not tunable and the + admin surface answered 503 in every compose deployment +- The issue-template chooser links to Discussions for questions and + ideas; the landing page footer does the same + ## [1.4.0] - 2026-11-23 ### Added diff --git a/CITATION.cff b/CITATION.cff new file mode 100644 index 0000000..ded25d1 --- /dev/null +++ b/CITATION.cff @@ -0,0 +1,27 @@ +cff-version: 1.2.0 +message: "If you use Sokhan in your research, please cite it using this metadata." +title: "Sokhan: Persian-first speech-to-text toolkit" +type: software +authors: + - family-names: Ranjbaran + given-names: Abolfazl + email: 206173650+Abolfazlrwm@users.noreply.github.com +version: "1.4.0" +date-released: "2026-11-23" +license: MIT +repository-code: "https://github.com/Abolfazlrwm/sokhan" +url: "https://abolfazlrwm.github.io/sokhan/" +abstract: >- + Sokhan is a self-hostable, Persian-first speech-to-text toolkit: a + FastAPI service with a faster-whisper streaming engine, a Celery + worker, a Persian RTL Next.js dashboard and a Telegram bot. Accuracy + is published as reproducible WER/CER measurements on a fixed Common + Voice (fa) fixture shipped with the repository, and a LoRA + fine-tuning pipeline adapts Whisper to Persian speech. +keywords: + - persian + - speech-to-text + - whisper + - asr + - self-hosted + - reproducibility diff --git a/backend/pyproject.toml b/backend/pyproject.toml index ca8c189..ad759a9 100644 --- a/backend/pyproject.toml +++ b/backend/pyproject.toml @@ -4,9 +4,24 @@ build-backend = "setuptools.build_meta" [project] name = "sokhan-backend" -version = "0.1.0" description = "Persian-first speech-to-text engine and REST API for Sokhan" requires-python = ">=3.10" +authors = [{ name = "Abolfazl Ranjbaran", email = "206173650+Abolfazlrwm@users.noreply.github.com" }] +license = { text = "MIT" } +keywords = ["persian", "farsi", "speech-to-text", "asr", "whisper", "fastapi", "self-hosted"] +classifiers = [ + "Development Status :: 4 - Beta", + "Intended Audience :: Developers", + "License :: OSI Approved :: MIT License", + "Natural Language :: Persian", + "Operating System :: OS Independent", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "Topic :: Multimedia :: Sound/Audio :: Speech", +] +dynamic = ["version"] dependencies = [ "fastapi>=0.110", "uvicorn[standard]>=0.29", @@ -25,6 +40,12 @@ dependencies = [ "psycopg[binary]>=3.1", ] +[project.urls] +Homepage = "https://abolfazlrwm.github.io/sokhan/" +Repository = "https://github.com/Abolfazlrwm/sokhan" +Issues = "https://github.com/Abolfazlrwm/sokhan/issues" +Changelog = "https://github.com/Abolfazlrwm/sokhan/blob/main/CHANGELOG.md" + [project.optional-dependencies] dev = ["pytest>=8", "ruff>=0.4", "mypy>=1.9", "pytest-cov>=5"] # Neural speaker diarization (gated HF weights + a token are also required). @@ -34,6 +55,10 @@ diarize = ["torch>=2.1", "pyannote.audio>=3.1"] [tool.setuptools.packages.find] include = ["sokhan*"] +[tool.setuptools.dynamic] +# Single source of truth: sokhan.__version__ tracks the release tag. +version = { attr = "sokhan.__version__" } + [tool.mypy] python_version = "3.11" ignore_missing_imports = true diff --git a/backend/sokhan/main.py b/backend/sokhan/main.py index 9ae04b7..289a9df 100644 --- a/backend/sokhan/main.py +++ b/backend/sokhan/main.py @@ -39,6 +39,10 @@ def create_app() -> FastAPI: description="Persian-first speech-to-text: transcripts, summaries and exports.", version=__version__, lifespan=lifespan, + license_info={ + "name": "MIT", + "url": "https://github.com/Abolfazlrwm/sokhan/blob/main/LICENSE", + }, ) # Browsers only hit the API from the web app, so the default is the # local dev front-end instead of a wildcard. Deployments set diff --git a/bot/pyproject.toml b/bot/pyproject.toml index 4ac210a..78b5643 100644 --- a/bot/pyproject.toml +++ b/bot/pyproject.toml @@ -4,9 +4,24 @@ build-backend = "setuptools.build_meta" [project] name = "sokhan-bot" -version = "0.1.0" description = "Telegram bot for Sokhan: send a voice message, receive the transcript" requires-python = ">=3.10" +authors = [{ name = "Abolfazl Ranjbaran", email = "206173650+Abolfazlrwm@users.noreply.github.com" }] +license = { text = "MIT" } +keywords = ["persian", "farsi", "telegram-bot", "asr", "transcription", "aiogram"] +classifiers = [ + "Development Status :: 4 - Beta", + "Intended Audience :: Developers", + "License :: OSI Approved :: MIT License", + "Natural Language :: Persian", + "Operating System :: OS Independent", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "Topic :: Communications :: Chat", +] +dynamic = ["version"] dependencies = [ "aiogram>=3.4", "httpx>=0.27", @@ -15,5 +30,15 @@ dependencies = [ [project.optional-dependencies] dev = ["pytest>=8", "ruff>=0.4"] +[project.urls] +Homepage = "https://abolfazlrwm.github.io/sokhan/" +Repository = "https://github.com/Abolfazlrwm/sokhan" +Issues = "https://github.com/Abolfazlrwm/sokhan/issues" +Changelog = "https://github.com/Abolfazlrwm/sokhan/blob/main/CHANGELOG.md" + [tool.setuptools.packages.find] include = ["sokhan_bot*"] + +[tool.setuptools.dynamic] +# Single source of truth: sokhan_bot.__version__ tracks the release tag. +version = { attr = "sokhan_bot.__version__" } diff --git a/bot/sokhan_bot/__init__.py b/bot/sokhan_bot/__init__.py index 6849410..3e8d9f9 100644 --- a/bot/sokhan_bot/__init__.py +++ b/bot/sokhan_bot/__init__.py @@ -1 +1 @@ -__version__ = "1.1.0" +__version__ = "1.4.0" diff --git a/deploy/docker-compose.yml b/deploy/docker-compose.yml index 73f8ceb..5b2d564 100644 --- a/deploy/docker-compose.yml +++ b/deploy/docker-compose.yml @@ -48,6 +48,10 @@ services: STREAMING_DECODE: ${STREAMING_DECODE:-true} WEBHOOK_SIGNING_SECRET: ${WEBHOOK_SIGNING_SECRET:-} FREE_MINUTES_PER_USER_PER_MONTH: ${FREE_MINUTES_PER_USER_PER_MONTH:-30} + PLAN_FREE_MAX_FILE_MINUTES: ${PLAN_FREE_MAX_FILE_MINUTES:-10} + PLAN_PRO_MAX_FILE_MINUTES: ${PLAN_PRO_MAX_FILE_MINUTES:-180} + PLAN_PRO_MONTHLY_MINUTES: ${PLAN_PRO_MONTHLY_MINUTES:-1200} + ADMIN_API_KEY: ${ADMIN_API_KEY:-} MAX_UPLOAD_MB: ${MAX_UPLOAD_MB:-200} SUMMARY_ENABLED: ${SUMMARY_ENABLED:-false} LLM_API_BASE: ${LLM_API_BASE:-} diff --git a/site/index.html b/site/index.html index ee99d6e..b23db06 100644 --- a/site/index.html +++ b/site/index.html @@ -226,6 +226,7 @@ docker pull ghcr.io/abolfazlrwm/sokhan-api:latest