s2t 0.1.7__tar.gz → 0.1.9__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (34) hide show
  1. {s2t-0.1.7 → s2t-0.1.9}/AGENTS.md +1 -1
  2. s2t-0.1.9/CONTRIBUTING.md +36 -0
  3. {s2t-0.1.7 → s2t-0.1.9}/Makefile +25 -31
  4. {s2t-0.1.7/src/s2t.egg-info → s2t-0.1.9}/PKG-INFO +7 -5
  5. {s2t-0.1.7 → s2t-0.1.9}/README.md +3 -3
  6. s2t-0.1.9/docs/RELEASING.md +18 -0
  7. s2t-0.1.9/docs/SESSION_STATE.md +35 -0
  8. {s2t-0.1.7 → s2t-0.1.9}/pyproject.toml +4 -2
  9. s2t-0.1.9/scripts/tag.sh +51 -0
  10. {s2t-0.1.7 → s2t-0.1.9}/src/s2t/cli.py +1 -1
  11. {s2t-0.1.7 → s2t-0.1.9/src/s2t.egg-info}/PKG-INFO +7 -5
  12. {s2t-0.1.7 → s2t-0.1.9}/src/s2t.egg-info/SOURCES.txt +1 -0
  13. {s2t-0.1.7 → s2t-0.1.9}/src/s2t.egg-info/requires.txt +1 -0
  14. s2t-0.1.7/CONTRIBUTING.md +0 -37
  15. s2t-0.1.7/docs/RELEASING.md +0 -19
  16. s2t-0.1.7/docs/SESSION_STATE.md +0 -35
  17. {s2t-0.1.7 → s2t-0.1.9}/.gitignore +0 -0
  18. {s2t-0.1.7 → s2t-0.1.9}/.pre-commit-config.yaml +0 -0
  19. {s2t-0.1.7 → s2t-0.1.9}/MANIFEST.in +0 -0
  20. {s2t-0.1.7 → s2t-0.1.9}/scripts/bench_transcribe.py +0 -0
  21. {s2t-0.1.7 → s2t-0.1.9}/setup.cfg +0 -0
  22. {s2t-0.1.7 → s2t-0.1.9}/src/s2t/__init__.py +0 -0
  23. {s2t-0.1.7 → s2t-0.1.9}/src/s2t/config.py +0 -0
  24. {s2t-0.1.7 → s2t-0.1.9}/src/s2t/outputs.py +0 -0
  25. {s2t-0.1.7 → s2t-0.1.9}/src/s2t/py.typed +0 -0
  26. {s2t-0.1.7 → s2t-0.1.9}/src/s2t/recorder.py +0 -0
  27. {s2t-0.1.7 → s2t-0.1.9}/src/s2t/translator/__init__.py +0 -0
  28. {s2t-0.1.7 → s2t-0.1.9}/src/s2t/translator/argos_backend.py +0 -0
  29. {s2t-0.1.7 → s2t-0.1.9}/src/s2t/types.py +0 -0
  30. {s2t-0.1.7 → s2t-0.1.9}/src/s2t/utils.py +0 -0
  31. {s2t-0.1.7 → s2t-0.1.9}/src/s2t/whisper_engine.py +0 -0
  32. {s2t-0.1.7 → s2t-0.1.9}/src/s2t.egg-info/dependency_links.txt +0 -0
  33. {s2t-0.1.7 → s2t-0.1.9}/src/s2t.egg-info/entry_points.txt +0 -0
  34. {s2t-0.1.7 → s2t-0.1.9}/src/s2t.egg-info/top_level.txt +0 -0
@@ -18,7 +18,7 @@ Prefer Make targets when available:
18
18
  If no Makefile: `python -m venv .venv && source .venv/bin/activate && pip install -e .[dev]`, then `pytest -q`, `ruff check .`, `black --check .`.
19
19
 
20
20
  ## Coding Style & Naming Conventions
21
- - Python 3.11+, 4-space indentation, type hints required.
21
+ - Python 3.11–3.12, 4-space indentation, type hints required.
22
22
  - Naming: `snake_case` for modules/functions/vars, `PascalCase` for classes.
23
23
  - Docstrings: concise, Google-style; include argument/return types when helpful.
24
24
  - Tools: `black` (format), `ruff` (lint), `mypy` (types). Keep imports sorted.
@@ -0,0 +1,36 @@
1
+ # Contributing
2
+
3
+ Thanks for contributing! This guide summarizes the setup and common development commands.
4
+
5
+ ## Requirements
6
+ - Python 3.11–3.12
7
+ - Recommended: project virtualenv via Makefile
8
+
9
+ ## Setup
10
+ ```
11
+ make setup
12
+ ```
13
+
14
+ ## Common Commands
15
+ - Format (auto-fix): `make format` (Ruff fixes + Ruff formatter)
16
+ - Lint + type check: `make lint` (Ruff + mypy)
17
+ - Tests: `make test`
18
+ - Full gate (pre-release): `make check`
19
+
20
+ ## Pre-commit Hooks
21
+ Install optional Git hooks locally:
22
+ ```
23
+ make precommit-install
24
+ ```
25
+ Hooks include Ruff (`--fix`), Ruff formatter, mypy, and basic checks.
26
+
27
+ ## Style & Typing
28
+ - Formatter: Ruff formatter (Black is not used)
29
+ - Linting: Ruff (including import sorting and quality rules)
30
+ - Types: mypy; please use type hints consistently
31
+
32
+ ## Project Structure
33
+ - App code: `src/s2t/` (CLI, modules, utils)
34
+ - Tests: `tests/`
35
+ - Scripts: `scripts/`
36
+ - Docs: `docs/`
@@ -4,7 +4,7 @@ PATH := .venv/bin:$(PATH)
4
4
  # Prefer the project venv if present
5
5
  PYTHON := $(shell if [ -x .venv/bin/python ]; then echo .venv/bin/python; else command -v python; fi)
6
6
  PIP := $(PYTHON) -m pip
7
- .PHONY: help setup dev install ensure-dev lint format test check build publish publish-test record list-models clean version precommit-install guard-venv
7
+ .PHONY: help setup dev install ensure-dev lint format test check build publish publish-test record list-models clean version precommit-install guard-venv tag
8
8
 
9
9
  help:
10
10
  @echo "Common targets:"
@@ -16,8 +16,9 @@ help:
16
16
  @echo " test Run pytest"
17
17
  @echo " check Lint + tests (pre-publish gate)"
18
18
  @echo " build Build sdist/wheel (installs 'build' if missing)"
19
- @echo " publish Upload to PyPI via twine (installs 'twine' if missing)"
20
- @echo " publish-test Upload to TestPyPI via twine"
19
+ @echo " publish Upload to PyPI via twine (username=__token__, requires TWINE_PASSWORD)"
20
+ @echo " publish-test Upload to TestPyPI via twine (username=__token__, requires TWINE_PASSWORD)"
21
+ @echo " tag Create/push git tag (VERSION=x.y.z or auto-bump patch)"
21
22
  @echo " record Run s2t (passes ARGS='...' to forward options)"
22
23
  @echo " profile Run s2t with --profile (use ARGS to pass flags)"
23
24
  @echo " list-models Print whisper.available_models()"
@@ -35,21 +36,18 @@ dev: guard-venv
35
36
  install: guard-venv
36
37
  $(PIP) install -e .
37
38
 
38
- lint:
39
39
  lint: guard-venv ensure-dev
40
40
  # Auto-fix what Ruff can, then format, then type-check
41
41
  $(PYTHON) -m ruff check . --fix --unsafe-fixes
42
42
  $(PYTHON) -m ruff format .
43
43
  $(PYTHON) -m mypy src
44
44
 
45
- format:
46
45
  format: guard-venv ensure-dev
47
46
  $(PYTHON) -m ruff check . --fix --unsafe-fixes
48
47
  $(PYTHON) -m ruff format .
49
48
 
50
- test:
51
49
  test: guard-venv ensure-dev
52
- $(PYTHON) -m pytest -q
50
+ @$(PYTHON) -m pytest -q || { code=$$?; if [ $$code -eq 5 ]; then echo "No tests collected; treating as success."; exit 0; else exit $$code; fi; }
53
51
 
54
52
  check: guard-venv ensure-dev lint test
55
53
 
@@ -63,30 +61,16 @@ build: guard-venv
63
61
  $(PYTHON) -m build $(if $(NO_ISOLATION),--no-isolation,)
64
62
 
65
63
  publish: guard-venv build
64
+ # Ensure twine is available
66
65
  $(PYTHON) -c 'import importlib.util,sys; sys.exit(0) if importlib.util.find_spec("twine") else sys.exit(1)' || $(PIP) install twine ; \
67
- [ -f .env.twine ] && set -a && . ./.env.twine && set +a || true; \
68
- if [ "$$ALLOW_CUSTOM_TWINE_USERNAME" = "1" ]; then TWINE_USERNAME="$${TWINE_USERNAME:-__token__}"; else TWINE_USERNAME="__token__"; fi; \
69
- # Prefer prod-specific secrets first
70
- if [ -n "$$TWINE_PROD_PASSWORD_CMD" ] && [ -z "$$TWINE_PASSWORD" ]; then TWINE_PASSWORD="$$(sh -c "$$TWINE_PROD_PASSWORD_CMD" | head -n1 | tr -d '\r\n')"; fi; \
71
- if [ -n "$$PASS_PROD_TWINE_ENTRY" ] && [ -z "$$TWINE_PASSWORD" ]; then TWINE_PASSWORD="$$(pass show "$$PASS_PROD_TWINE_ENTRY" | head -n1 | tr -d '\r\n')"; fi; \
72
- # Fallback to generic secrets
73
- if [ -n "$$TWINE_PASSWORD_CMD" ] && [ -z "$$TWINE_PASSWORD" ]; then TWINE_PASSWORD="$$(sh -c "$$TWINE_PASSWORD_CMD" | head -n1 | tr -d '\r\n')"; fi; \
74
- if [ -n "$$PASS_TWINE_ENTRY" ] && [ -z "$$TWINE_PASSWORD" ]; then TWINE_PASSWORD="$$(pass show "$$PASS_TWINE_ENTRY" | head -n1 | tr -d '\r\n')"; fi; \
75
- if [ -z "$$TWINE_PASSWORD" ]; then echo "Error: TWINE_PASSWORD is empty. Provide via .env.twine, TWINE_*_PASSWORD_CMD, or PASS_*_TWINE_ENTRY." >&2; exit 2; fi; \
76
- env TWINE_USERNAME="$$TWINE_USERNAME" TWINE_PASSWORD="$$TWINE_PASSWORD" twine upload --non-interactive $$TWINE_EXTRA_FLAGS dist/*
66
+ if [ -z "$$TWINE_PASSWORD" ]; then echo "Error: TWINE_PASSWORD is not set in the environment." >&2; exit 2; fi; \
67
+ env TWINE_USERNAME="__token__" TWINE_PASSWORD="$$TWINE_PASSWORD" twine upload --non-interactive $$TWINE_EXTRA_FLAGS dist/*
77
68
 
78
69
  publish-test: guard-venv build
70
+ # Ensure twine is available
79
71
  $(PYTHON) -c 'import importlib.util,sys; sys.exit(0) if importlib.util.find_spec("twine") else sys.exit(1)' || $(PIP) install twine ; \
80
- [ -f .env.twine ] && set -a && . ./.env.twine && set +a || true; \
81
- if [ "$$ALLOW_CUSTOM_TWINE_USERNAME" = "1" ]; then TWINE_USERNAME="$${TWINE_USERNAME:-__token__}"; else TWINE_USERNAME="__token__"; fi; \
82
- # Prefer test-specific secrets first
83
- if [ -n "$$TWINE_TEST_PASSWORD_CMD" ] && [ -z "$$TWINE_PASSWORD" ]; then TWINE_PASSWORD="$$(sh -c "$$TWINE_TEST_PASSWORD_CMD" | head -n1 | tr -d '\r\n')"; fi; \
84
- if [ -n "$$PASS_TEST_TWINE_ENTRY" ] && [ -z "$$TWINE_PASSWORD" ]; then TWINE_PASSWORD="$$(pass show "$$PASS_TEST_TWINE_ENTRY" | head -n1 | tr -d '\r\n')"; fi; \
85
- # Fallback to generic secrets
86
- if [ -n "$$TWINE_PASSWORD_CMD" ] && [ -z "$$TWINE_PASSWORD" ]; then TWINE_PASSWORD="$$(sh -c "$$TWINE_PASSWORD_CMD" | head -n1 | tr -d '\r\n')"; fi; \
87
- if [ -n "$$PASS_TWINE_ENTRY" ] && [ -z "$$TWINE_PASSWORD" ]; then TWINE_PASSWORD="$$(pass show "$$PASS_TWINE_ENTRY" | head -n1 | tr -d '\r\n')"; fi; \
88
- if [ -z "$$TWINE_PASSWORD" ]; then echo "Error: TWINE_PASSWORD is empty. Provide via .env.twine, TWINE_*_PASSWORD_CMD, or PASS_*_TWINE_ENTRY." >&2; exit 2; fi; \
89
- env TWINE_USERNAME="$$TWINE_USERNAME" TWINE_PASSWORD="$$TWINE_PASSWORD" twine upload --non-interactive --repository testpypi $$TWINE_EXTRA_FLAGS dist/*
72
+ if [ -z "$$TWINE_PASSWORD" ]; then echo "Error: TWINE_PASSWORD is not set in the environment." >&2; exit 2; fi; \
73
+ env TWINE_USERNAME="__token__" TWINE_PASSWORD="$$TWINE_PASSWORD" twine upload --non-interactive --repository testpypi $$TWINE_EXTRA_FLAGS dist/*
90
74
 
91
75
  record: guard-venv
92
76
  @if [ -x .venv/bin/s2t ]; then .venv/bin/s2t $(ARGS); else s2t $(ARGS); fi
@@ -117,8 +101,18 @@ precommit-install: guard-venv ensure-dev
117
101
  pre-commit install --install-hooks
118
102
 
119
103
  guard-venv:
120
- @if [ -n "$$VIRTUAL_ENV" ] && [ "$$VIRTUAL_ENV" != "$$PWD/.venv312" ]; then \
121
- echo "Error: active venv ($$VIRTUAL_ENV) differs from project .venv ($$PWD/.venv312)."; \
122
- echo "Please 'deactivate' or use the project venv (.venv312)."; \
104
+ @if [ -n "$$VIRTUAL_ENV" ] && [ "$$VIRTUAL_ENV" != "$$PWD/.venv" ]; then \
105
+ echo "Error: active venv ($$VIRTUAL_ENV) differs from project .venv ($$PWD/.venv)."; \
106
+ echo "Please 'deactivate' or use the project venv (.venv)."; \
123
107
  exit 1; \
124
- fi
108
+ fi
109
+
110
+ # Create and push a git tag
111
+ # Usage:
112
+ # make tag VERSION=1.2.3 # use provided version
113
+ # make tag TAG_PREFIX=v # default prefix 'v'
114
+ # make tag REMOTE=origin # default remote 'origin'
115
+ # make tag # auto-bump patch from latest tag
116
+ # Create and push a git tag only after checks pass
117
+ tag: check
118
+ @VERSION="$(VERSION)" scripts/tag.sh
@@ -1,20 +1,22 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: s2t
3
- Version: 0.1.7
3
+ Version: 0.1.9
4
4
  Summary: Speech to Text (s2t): Record audio, run Whisper, export formats, and copy transcript to clipboard.
5
5
  Author: Maintainers
6
6
  License-Expression: LicenseRef-Proprietary
7
7
  Classifier: Programming Language :: Python :: 3
8
8
  Classifier: Programming Language :: Python :: 3 :: Only
9
9
  Classifier: Programming Language :: Python :: 3.11
10
+ Classifier: Programming Language :: Python :: 3.12
10
11
  Classifier: Environment :: Console
11
12
  Classifier: Operating System :: OS Independent
12
- Requires-Python: >=3.11
13
+ Requires-Python: <3.13,>=3.11
13
14
  Description-Content-Type: text/markdown
14
15
  Requires-Dist: sounddevice>=0.4.6
15
16
  Requires-Dist: soundfile>=0.12.1
16
17
  Requires-Dist: numpy>=1.23
17
18
  Requires-Dist: openai-whisper>=20231117
19
+ Requires-Dist: argostranslate>=1.9.0
18
20
  Provides-Extra: dev
19
21
  Requires-Dist: pytest>=7; extra == "dev"
20
22
  Requires-Dist: pytest-cov>=4; extra == "dev"
@@ -35,7 +37,7 @@ Record audio from your microphone, run Whisper to transcribe it, export common f
35
37
  - Editable: `pip install -e .`
36
38
  - Standard: `pip install .`
37
39
 
38
- Requirements: Python 3.11+. No mandatory external binaries. ffmpeg is optional (only for MP3 encoding/decoding).
40
+ Requirements: Python 3.11–3.12. No mandatory external binaries. ffmpeg is optional (only for MP3 encoding/decoding).
39
41
 
40
42
  System requirements (Linux)
41
43
  - Some environments need system libraries for audio I/O:
@@ -90,5 +92,5 @@ Notes on models
90
92
  - The name `turbo` refers to OpenAI’s hosted model family and is not provided by the local `whisper` CLI. If you pass `-m turbo`, the command may fail; choose a supported local model instead.
91
93
 
92
94
  ## Development & Release
93
- - Für Entwickler-Setup und Beitragshinweise siehe `CONTRIBUTING.md`.
94
- - Für den Release-Prozess siehe `docs/RELEASING.md`.
95
+ - For developer setup and contribution guidelines, see `CONTRIBUTING.md`.
96
+ - For the release process, see `docs/RELEASING.md`.
@@ -7,7 +7,7 @@ Record audio from your microphone, run Whisper to transcribe it, export common f
7
7
  - Editable: `pip install -e .`
8
8
  - Standard: `pip install .`
9
9
 
10
- Requirements: Python 3.11+. No mandatory external binaries. ffmpeg is optional (only for MP3 encoding/decoding).
10
+ Requirements: Python 3.11–3.12. No mandatory external binaries. ffmpeg is optional (only for MP3 encoding/decoding).
11
11
 
12
12
  System requirements (Linux)
13
13
  - Some environments need system libraries for audio I/O:
@@ -62,5 +62,5 @@ Notes on models
62
62
  - The name `turbo` refers to OpenAI’s hosted model family and is not provided by the local `whisper` CLI. If you pass `-m turbo`, the command may fail; choose a supported local model instead.
63
63
 
64
64
  ## Development & Release
65
- - Für Entwickler-Setup und Beitragshinweise siehe `CONTRIBUTING.md`.
66
- - Für den Release-Prozess siehe `docs/RELEASING.md`.
65
+ - For developer setup and contribution guidelines, see `CONTRIBUTING.md`.
66
+ - For the release process, see `docs/RELEASING.md`.
@@ -0,0 +1,18 @@
1
+ # Releasing
2
+
3
+ Versioning and releases are powered by `setuptools-scm` (PEP 621 dynamic version):
4
+
5
+ - Versions are derived from Git tags (e.g., `v0.1.0`).
6
+ - During development (without a tag) a fallback version is used; with a tag the package gets the exact version.
7
+
8
+ ## Steps
9
+ 1. Create and push a tag, for example:
10
+ - `git tag v0.1.1`
11
+ - `git push --tags`
12
+ 2. Publish to TestPyPI or PyPI:
13
+ - `make publish-test` or `make publish`
14
+ - These targets build artifacts first (`make build`) and run checks (`make check`).
15
+
16
+ ## Build Details
17
+ - `make check` runs formatting/linting/type checking and tests.
18
+ - `make build` creates the sdist and wheel.
@@ -0,0 +1,35 @@
1
+ # Session State
2
+
3
+ Status: Preparing deployment; the package builds and passes type checks. Upload to TestPyPI is pending.
4
+
5
+ ## Changes This Session (Summary)
6
+ - Switched to Ruff-only formatting (removed Black); `make format`/`make lint` perform auto-fixes.
7
+ - Fixed mypy issues strictly (TypedDicts in `src/s2t/types.py`).
8
+ - Moved third‑party stubs to `stubs/` (`sounddevice`, `soundfile`, `pyperclip`, `whisper`).
9
+ - Marked package as typed (`src/s2t/py.typed`) and excluded stubs from the sdist via `MANIFEST.in`.
10
+ - Updated pyproject: Ruff configuration and license field to SPDX style (`LicenseRef-Proprietary`).
11
+ - Docs: streamlined README; added `CONTRIBUTING.md` and `docs/RELEASING.md`. Added Linux system library notes.
12
+ - Build verified: `make build` produces a valid wheel + sdist; `twine check dist/*` passes.
13
+
14
+ ## Open Steps (for TestPyPI/PyPI)
15
+ 1) Provide TestPyPI credentials (one of):
16
+ - Project-local `.env.twine` (gitignored) with:
17
+ - `TWINE_USERNAME=__token__`
18
+ - `TWINE_PASSWORD=your_testpypi_api_token`
19
+ - or configure `~/.pypirc` (testpypi section).
20
+ 2) Trigger upload:
21
+ - `make publish-test`
22
+ 3) Validate installation in a fresh venv:
23
+ - `python -m venv .venv-test && source .venv-test/bin/activate`
24
+ - `pip install --index-url https://test.pypi.org/simple --extra-index-url https://pypi.org/simple s2t`
25
+ - Smoke test: `s2t -h`, optionally `s2t -L`
26
+ 4) If OK: upload to PyPI
27
+ - `make publish` (with PyPI token analogous to TestPyPI)
28
+
29
+ ## Notes
30
+ - Linux: install `libportaudio2` and `libsndfile1` if needed; ffmpeg is optional for MP3.
31
+ - No secrets in the repo: `.env.twine` is excluded via `.gitignore`.
32
+
33
+ ## Re-entry
34
+ - If `.env.twine` already exists: run `make publish-test` directly.
35
+ - Then test the installation as above; if successful, run `make publish`.
@@ -11,7 +11,7 @@ name = "s2t"
11
11
  dynamic = ["version"]
12
12
  description = "Speech to Text (s2t): Record audio, run Whisper, export formats, and copy transcript to clipboard."
13
13
  readme = "README.md"
14
- requires-python = ">=3.11"
14
+ requires-python = ">=3.11,<3.13"
15
15
  license = "LicenseRef-Proprietary"
16
16
  authors = [
17
17
  { name = "Maintainers" }
@@ -21,11 +21,13 @@ dependencies = [
21
21
  "soundfile>=0.12.1",
22
22
  "numpy>=1.23",
23
23
  "openai-whisper>=20231117",
24
+ "argostranslate>=1.9.0",
24
25
  ]
25
26
  classifiers = [
26
27
  "Programming Language :: Python :: 3",
27
28
  "Programming Language :: Python :: 3 :: Only",
28
29
  "Programming Language :: Python :: 3.11",
30
+ "Programming Language :: Python :: 3.12",
29
31
  "Environment :: Console",
30
32
  "Operating System :: OS Independent",
31
33
  ]
@@ -71,7 +73,7 @@ select = ["E", "F", "I", "B", "UP"]
71
73
  ignore = ["E501"]
72
74
 
73
75
  [tool.ruff.format]
74
- # Ruff-Formatter übernimmt die Formatierung (Black ersetzt)
76
+ # Ruff formatter handles formatting (replaces Black)
75
77
  quote-style = "preserve"
76
78
 
77
79
  [tool.pytest.ini_options]
@@ -0,0 +1,51 @@
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+
4
+ # Configurable via environment:
5
+ # - VERSION=x.y.z # explicit version to tag
6
+ # - TAG_PREFIX=v # default 'v'
7
+ # - REMOTE=origin # default 'origin'
8
+
9
+ REMOTE="${REMOTE:-origin}"
10
+ TAG_PREFIX="${TAG_PREFIX:-v}"
11
+ VER="${VERSION:-}"
12
+
13
+ if [[ -z "$VER" ]]; then
14
+ LAST_TAG=$(git describe --tags --abbrev=0 2>/dev/null || true)
15
+ if [[ -n "$LAST_TAG" ]]; then
16
+ BASE="${LAST_TAG#v}"
17
+ IFS='.' read -r MA MI PA <<< "$BASE"
18
+ MA="${MA:-0}"; MI="${MI:-0}"; PA="${PA:-0}"
19
+ if ! [[ "$MA" =~ ^[0-9]+$ && "$MI" =~ ^[0-9]+$ && "$PA" =~ ^[0-9]+$ ]]; then
20
+ echo "Error: last tag '$LAST_TAG' is not a semantic version (x.y.z)." >&2
21
+ exit 1
22
+ fi
23
+ PA=$((PA + 1))
24
+ VER="${MA}.${MI}.${PA}"
25
+ echo "No VERSION provided; bumping patch from ${LAST_TAG} -> ${VER}"
26
+ else
27
+ VER="0.1.0"
28
+ echo "No VERSION provided and no existing tags; defaulting to ${VER}"
29
+ fi
30
+ else
31
+ echo "Using provided VERSION: ${VER}"
32
+ fi
33
+
34
+ TAG="${TAG_PREFIX}${VER}"
35
+ echo "Preparing tag ${TAG} (remote ${REMOTE})"
36
+
37
+ # Ensure clean working tree (no uncommitted changes or untracked files)
38
+ if [[ -n "$(git status --porcelain)" ]]; then
39
+ echo "Error: working tree is not clean. Commit, stash, or remove changes before tagging." >&2
40
+ git status --porcelain
41
+ exit 1
42
+ fi
43
+
44
+ # Remove existing tag locally/remote if present
45
+ git tag -d "${TAG}" >/dev/null 2>&1 || true
46
+ git push "${REMOTE}" --delete "${TAG}" >/dev/null 2>&1 || true
47
+
48
+ # Create annotated tag and push
49
+ git tag -a "${TAG}" -m "Release ${TAG}"
50
+ git push "${REMOTE}" "${TAG}"
51
+ echo "Tag ${TAG} pushed to ${REMOTE}"
@@ -446,7 +446,7 @@ def main(argv: list[str] | None = None) -> int:
446
446
  parser.add_argument(
447
447
  "--silence-sec",
448
448
  type=float,
449
- default=1.0,
449
+ default=2.0,
450
450
  help="Auto-split when continuous silence >= this many seconds (0 disables)",
451
451
  )
452
452
  parser.add_argument(
@@ -1,20 +1,22 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: s2t
3
- Version: 0.1.7
3
+ Version: 0.1.9
4
4
  Summary: Speech to Text (s2t): Record audio, run Whisper, export formats, and copy transcript to clipboard.
5
5
  Author: Maintainers
6
6
  License-Expression: LicenseRef-Proprietary
7
7
  Classifier: Programming Language :: Python :: 3
8
8
  Classifier: Programming Language :: Python :: 3 :: Only
9
9
  Classifier: Programming Language :: Python :: 3.11
10
+ Classifier: Programming Language :: Python :: 3.12
10
11
  Classifier: Environment :: Console
11
12
  Classifier: Operating System :: OS Independent
12
- Requires-Python: >=3.11
13
+ Requires-Python: <3.13,>=3.11
13
14
  Description-Content-Type: text/markdown
14
15
  Requires-Dist: sounddevice>=0.4.6
15
16
  Requires-Dist: soundfile>=0.12.1
16
17
  Requires-Dist: numpy>=1.23
17
18
  Requires-Dist: openai-whisper>=20231117
19
+ Requires-Dist: argostranslate>=1.9.0
18
20
  Provides-Extra: dev
19
21
  Requires-Dist: pytest>=7; extra == "dev"
20
22
  Requires-Dist: pytest-cov>=4; extra == "dev"
@@ -35,7 +37,7 @@ Record audio from your microphone, run Whisper to transcribe it, export common f
35
37
  - Editable: `pip install -e .`
36
38
  - Standard: `pip install .`
37
39
 
38
- Requirements: Python 3.11+. No mandatory external binaries. ffmpeg is optional (only for MP3 encoding/decoding).
40
+ Requirements: Python 3.11–3.12. No mandatory external binaries. ffmpeg is optional (only for MP3 encoding/decoding).
39
41
 
40
42
  System requirements (Linux)
41
43
  - Some environments need system libraries for audio I/O:
@@ -90,5 +92,5 @@ Notes on models
90
92
  - The name `turbo` refers to OpenAI’s hosted model family and is not provided by the local `whisper` CLI. If you pass `-m turbo`, the command may fail; choose a supported local model instead.
91
93
 
92
94
  ## Development & Release
93
- - Für Entwickler-Setup und Beitragshinweise siehe `CONTRIBUTING.md`.
94
- - Für den Release-Prozess siehe `docs/RELEASING.md`.
95
+ - For developer setup and contribution guidelines, see `CONTRIBUTING.md`.
96
+ - For the release process, see `docs/RELEASING.md`.
@@ -9,6 +9,7 @@ pyproject.toml
9
9
  docs/RELEASING.md
10
10
  docs/SESSION_STATE.md
11
11
  scripts/bench_transcribe.py
12
+ scripts/tag.sh
12
13
  src/s2t/__init__.py
13
14
  src/s2t/cli.py
14
15
  src/s2t/config.py
@@ -2,6 +2,7 @@ sounddevice>=0.4.6
2
2
  soundfile>=0.12.1
3
3
  numpy>=1.23
4
4
  openai-whisper>=20231117
5
+ argostranslate>=1.9.0
5
6
 
6
7
  [dev]
7
8
  pytest>=7
s2t-0.1.7/CONTRIBUTING.md DELETED
@@ -1,37 +0,0 @@
1
- # Contributing
2
-
3
- Danke für deinen Beitrag! Hier findest du die wichtigsten Hinweise für Entwicklung und Checks.
4
-
5
- ## Voraussetzungen
6
- - Python 3.11+
7
- - Empfohlen: Projekt-venv via Makefile
8
-
9
- ## Setup
10
- ```
11
- make setup
12
- ```
13
-
14
- ## Wichtige Befehle
15
- - Formatieren (auto-fix): `make format` (Ruff Lint-Fixes + Ruff Formatter)
16
- - Lint + Typprüfung (auto-fix + mypy): `make lint`
17
- - Tests: `make test`
18
- - Kombiniert (Gate vor Build/Release): `make check`
19
-
20
- ## Pre-commit Hooks
21
- Installiere optionale Git-Hooks lokal:
22
- ```
23
- make precommit-install
24
- ```
25
- Aktive Hooks: Ruff (`--fix`), Ruff Formatter, mypy und Basis-Hooks.
26
-
27
- ## Stil & Typen
28
- - Formatter: Ruff Formatter (Black wurde entfernt)
29
- - Linting: Ruff (Importsortierung, Qualitätsregeln)
30
- - Typen: mypy; bitte durchgängig Typannotationen nutzen
31
-
32
- ## Struktur
33
- - App-Code: `src/transcriber/` (CLI, Module)
34
- - Tests: `tests/`
35
- - Scripts: `scripts/`
36
- - Docs: `docs/`
37
-
@@ -1,19 +0,0 @@
1
- # Releasing
2
-
3
- Versionierung und Releases basieren auf `setuptools-scm` (PEP 621, dynamische Version):
4
-
5
- - Versionen werden über Git-Tags abgeleitet (z. B. `v0.1.0`).
6
- - Während der Entwicklung (ohne Tag) wird eine Fallback-Version genutzt; mit Tag erhält das Paket die exakte Version.
7
-
8
- ## Schritte
9
- 1. Tag erstellen und pushen, z. B.:
10
- - `git tag v0.1.1`
11
- - `git push --tags`
12
- 2. Optional TestPyPI, sonst direkt PyPI:
13
- - `make publish-test` oder `make publish`
14
- - Diese Targets bauen zuvor (`make build`) und führen Checks aus (`make check`).
15
-
16
- ## Build-Details
17
- - `make check` führt Format/Lint/Typprüfung und Tests aus.
18
- - `make build` erzeugt sdist und Wheel.
19
-
@@ -1,35 +0,0 @@
1
- # Session State
2
-
3
- Stand: Deployment vorbereiten, Paket ist baubar und typgeprüft. Upload zu TestPyPI steht aus.
4
-
5
- ## Änderungen dieser Session (Kurzfassung)
6
- - Formatter auf nur Ruff umgestellt (Black entfernt); Makefile `format`/`lint` fixen automatisch.
7
- - mypy-Fehler streng behoben (TypedDicts in `src/s2t/types.py`).
8
- - Drittanbieter-Stubs nach `stubs/` verschoben (`sounddevice`, `soundfile`, `pyperclip`, `whisper`).
9
- - Paket als "typed" markiert (`src/s2t/py.typed`) und Stubs via `MANIFEST.in` vom sdist ausgeschlossen.
10
- - pyproject: Ruff-Konfig aktualisiert, Lizenzfeld auf SPDX-Form (`LicenseRef-Proprietary`).
11
- - Doku: README verschlankt; `CONTRIBUTING.md`, `docs/RELEASING.md` hinzugefügt. Linux Systemlibs-Hinweis ergänzt.
12
- - Build geprüft: `make build` erzeugt gültiges Wheel + sdist; `twine check dist/*` ist grün.
13
-
14
- ## Offene Schritte (für TestPyPI/PyPI)
15
- 1) TestPyPI-Creds bereitstellen (eine der Optionen):
16
- - `.env.twine` im Projekt (gitignored) mit:
17
- - `TWINE_USERNAME=__token__`
18
- - `TWINE_PASSWORD=dein_testpypi_api_token`
19
- - oder `~/.pypirc` konfigurieren (testpypi Sektion).
20
- 2) Upload anstoßen:
21
- - `make publish-test`
22
- 3) Installation validieren in frischem venv:
23
- - `python -m venv .venv-test && source .venv-test/bin/activate`
24
- - `pip install --index-url https://test.pypi.org/simple --extra-index-url https://pypi.org/simple s2t`
25
- - Smoke: `s2t -h`, optional `s2t -L`
26
- 4) Wenn ok: PyPI-Upload
27
- - `make publish` (mit PyPI-Token analog zu TestPyPI)
28
-
29
- ## Hinweise
30
- - Linux: ggf. `libportaudio2` und `libsndfile1` installieren; ffmpeg optional für MP3.
31
- - Keine Secrets im Repo: `.env.twine` ist per `.gitignore` ausgeschlossen.
32
-
33
- ## Wiedereinstieg
34
- - Falls `.env.twine` schon existiert: direkt `make publish-test` ausführen.
35
- - Danach Installation wie oben testen; bei Erfolg `make publish`.
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes