s2t 0.1.7__tar.gz → 0.1.8__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.
- {s2t-0.1.7 → s2t-0.1.8}/Makefile +23 -30
- {s2t-0.1.7/src/s2t.egg-info → s2t-0.1.8}/PKG-INFO +2 -1
- {s2t-0.1.7 → s2t-0.1.8}/pyproject.toml +1 -0
- s2t-0.1.8/scripts/tag.sh +45 -0
- {s2t-0.1.7 → s2t-0.1.8/src/s2t.egg-info}/PKG-INFO +2 -1
- {s2t-0.1.7 → s2t-0.1.8}/src/s2t.egg-info/SOURCES.txt +1 -0
- {s2t-0.1.7 → s2t-0.1.8}/src/s2t.egg-info/requires.txt +1 -0
- {s2t-0.1.7 → s2t-0.1.8}/.gitignore +0 -0
- {s2t-0.1.7 → s2t-0.1.8}/.pre-commit-config.yaml +0 -0
- {s2t-0.1.7 → s2t-0.1.8}/AGENTS.md +0 -0
- {s2t-0.1.7 → s2t-0.1.8}/CONTRIBUTING.md +0 -0
- {s2t-0.1.7 → s2t-0.1.8}/MANIFEST.in +0 -0
- {s2t-0.1.7 → s2t-0.1.8}/README.md +0 -0
- {s2t-0.1.7 → s2t-0.1.8}/docs/RELEASING.md +0 -0
- {s2t-0.1.7 → s2t-0.1.8}/docs/SESSION_STATE.md +0 -0
- {s2t-0.1.7 → s2t-0.1.8}/scripts/bench_transcribe.py +0 -0
- {s2t-0.1.7 → s2t-0.1.8}/setup.cfg +0 -0
- {s2t-0.1.7 → s2t-0.1.8}/src/s2t/__init__.py +0 -0
- {s2t-0.1.7 → s2t-0.1.8}/src/s2t/cli.py +0 -0
- {s2t-0.1.7 → s2t-0.1.8}/src/s2t/config.py +0 -0
- {s2t-0.1.7 → s2t-0.1.8}/src/s2t/outputs.py +0 -0
- {s2t-0.1.7 → s2t-0.1.8}/src/s2t/py.typed +0 -0
- {s2t-0.1.7 → s2t-0.1.8}/src/s2t/recorder.py +0 -0
- {s2t-0.1.7 → s2t-0.1.8}/src/s2t/translator/__init__.py +0 -0
- {s2t-0.1.7 → s2t-0.1.8}/src/s2t/translator/argos_backend.py +0 -0
- {s2t-0.1.7 → s2t-0.1.8}/src/s2t/types.py +0 -0
- {s2t-0.1.7 → s2t-0.1.8}/src/s2t/utils.py +0 -0
- {s2t-0.1.7 → s2t-0.1.8}/src/s2t/whisper_engine.py +0 -0
- {s2t-0.1.7 → s2t-0.1.8}/src/s2t.egg-info/dependency_links.txt +0 -0
- {s2t-0.1.7 → s2t-0.1.8}/src/s2t.egg-info/entry_points.txt +0 -0
- {s2t-0.1.7 → s2t-0.1.8}/src/s2t.egg-info/top_level.txt +0 -0
{s2t-0.1.7 → s2t-0.1.8}/Makefile
RENAMED
@@ -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 (
|
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,19 +36,16 @@ 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
50
|
$(PYTHON) -m pytest -q
|
53
51
|
|
@@ -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
|
-
[ -
|
68
|
-
|
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
|
-
[ -
|
81
|
-
|
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,17 @@ 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/.
|
121
|
-
echo "Error: active venv ($$VIRTUAL_ENV) differs from project .venv ($$PWD/.
|
122
|
-
echo "Please 'deactivate' or use the project venv (.
|
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
|
-
|
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
|
+
tag:
|
117
|
+
@VERSION="$(VERSION)" scripts/tag.sh
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: s2t
|
3
|
-
Version: 0.1.
|
3
|
+
Version: 0.1.8
|
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
|
@@ -15,6 +15,7 @@ Requires-Dist: sounddevice>=0.4.6
|
|
15
15
|
Requires-Dist: soundfile>=0.12.1
|
16
16
|
Requires-Dist: numpy>=1.23
|
17
17
|
Requires-Dist: openai-whisper>=20231117
|
18
|
+
Requires-Dist: argostranslate>=1.9.0
|
18
19
|
Provides-Extra: dev
|
19
20
|
Requires-Dist: pytest>=7; extra == "dev"
|
20
21
|
Requires-Dist: pytest-cov>=4; extra == "dev"
|
s2t-0.1.8/scripts/tag.sh
ADDED
@@ -0,0 +1,45 @@
|
|
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
|
+
# Remove existing tag locally/remote if present
|
38
|
+
git tag -d "${TAG}" >/dev/null 2>&1 || true
|
39
|
+
git push "${REMOTE}" --delete "${TAG}" >/dev/null 2>&1 || true
|
40
|
+
|
41
|
+
# Create annotated tag and push
|
42
|
+
git tag -a "${TAG}" -m "Release ${TAG}"
|
43
|
+
git push "${REMOTE}" "${TAG}"
|
44
|
+
echo "Tag ${TAG} pushed to ${REMOTE}"
|
45
|
+
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: s2t
|
3
|
-
Version: 0.1.
|
3
|
+
Version: 0.1.8
|
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
|
@@ -15,6 +15,7 @@ Requires-Dist: sounddevice>=0.4.6
|
|
15
15
|
Requires-Dist: soundfile>=0.12.1
|
16
16
|
Requires-Dist: numpy>=1.23
|
17
17
|
Requires-Dist: openai-whisper>=20231117
|
18
|
+
Requires-Dist: argostranslate>=1.9.0
|
18
19
|
Provides-Extra: dev
|
19
20
|
Requires-Dist: pytest>=7; extra == "dev"
|
20
21
|
Requires-Dist: pytest-cov>=4; extra == "dev"
|
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
|
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
|