cmd-kural 0.1.2__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.
- cmd_kural-0.1.2/.github/workflows/build.yml +88 -0
- cmd_kural-0.1.2/.github/workflows/ci.yml +19 -0
- cmd_kural-0.1.2/.github/workflows/publish-pypi.yml +64 -0
- cmd_kural-0.1.2/.github/workflows/release.yml +82 -0
- cmd_kural-0.1.2/.gitignore +55 -0
- cmd_kural-0.1.2/.python-version +1 -0
- cmd_kural-0.1.2/AGENTS.md +161 -0
- cmd_kural-0.1.2/CHANGELOG.md +97 -0
- cmd_kural-0.1.2/LICENSE +34 -0
- cmd_kural-0.1.2/PKG-INFO +510 -0
- cmd_kural-0.1.2/README.md +450 -0
- cmd_kural-0.1.2/RELEASE.md +235 -0
- cmd_kural-0.1.2/SESSION.md +31 -0
- cmd_kural-0.1.2/THIRD_PARTY_NOTICES.md +178 -0
- cmd_kural-0.1.2/benchmarks/__init__.py +1 -0
- cmd_kural-0.1.2/benchmarks/datasets.py +147 -0
- cmd_kural-0.1.2/benchmarks/metrics.py +123 -0
- cmd_kural-0.1.2/benchmarks/run.py +267 -0
- cmd_kural-0.1.2/kural/__init__.py +3 -0
- cmd_kural-0.1.2/kural/__main__.py +345 -0
- cmd_kural-0.1.2/kural/config/__init__.py +8 -0
- cmd_kural-0.1.2/kural/config/app_rules.defaults.yaml +68 -0
- cmd_kural-0.1.2/kural/config/commands.defaults.yaml +65 -0
- cmd_kural-0.1.2/kural/config/config.defaults.yaml +212 -0
- cmd_kural-0.1.2/kural/config/config_manager.py +568 -0
- cmd_kural-0.1.2/kural/config/configcheck.py +218 -0
- cmd_kural-0.1.2/kural/config/defaults_merge.py +269 -0
- cmd_kural-0.1.2/kural/control/__init__.py +79 -0
- cmd_kural-0.1.2/kural/control/app_index.py +270 -0
- cmd_kural-0.1.2/kural/control/app_rules.py +149 -0
- cmd_kural-0.1.2/kural/control/autostart.py +112 -0
- cmd_kural-0.1.2/kural/control/chords.py +90 -0
- cmd_kural-0.1.2/kural/control/executor.py +365 -0
- cmd_kural-0.1.2/kural/control/guardrails.py +154 -0
- cmd_kural-0.1.2/kural/control/llm_fallback.py +137 -0
- cmd_kural-0.1.2/kural/control/media.py +247 -0
- cmd_kural-0.1.2/kural/control/mouse.py +185 -0
- cmd_kural-0.1.2/kural/control/parser.py +448 -0
- cmd_kural-0.1.2/kural/control/planner.py +250 -0
- cmd_kural-0.1.2/kural/control/windows.py +672 -0
- cmd_kural-0.1.2/kural/doctor.py +344 -0
- cmd_kural-0.1.2/kural/engine/__init__.py +6 -0
- cmd_kural-0.1.2/kural/engine/adaptive.py +231 -0
- cmd_kural-0.1.2/kural/engine/audio_ducking.py +104 -0
- cmd_kural-0.1.2/kural/engine/audio_feedback.py +130 -0
- cmd_kural-0.1.2/kural/engine/audio_gain.py +40 -0
- cmd_kural-0.1.2/kural/engine/audio_recorder.py +547 -0
- cmd_kural-0.1.2/kural/engine/bundle_logs.py +175 -0
- cmd_kural-0.1.2/kural/engine/cues.py +80 -0
- cmd_kural-0.1.2/kural/engine/dictation_cleanup.py +358 -0
- cmd_kural-0.1.2/kural/engine/dictation_languages.py +96 -0
- cmd_kural-0.1.2/kural/engine/dictionary.py +104 -0
- cmd_kural-0.1.2/kural/engine/file_transcriber.py +293 -0
- cmd_kural-0.1.2/kural/engine/flow_formatting.py +118 -0
- cmd_kural-0.1.2/kural/engine/hardware_detection.py +237 -0
- cmd_kural-0.1.2/kural/engine/history.py +188 -0
- cmd_kural-0.1.2/kural/engine/instance_manager.py +154 -0
- cmd_kural-0.1.2/kural/engine/log_setup.py +83 -0
- cmd_kural-0.1.2/kural/engine/model_registry.py +184 -0
- cmd_kural-0.1.2/kural/engine/model_transfer.py +233 -0
- cmd_kural-0.1.2/kural/engine/noise_suppression.py +51 -0
- cmd_kural-0.1.2/kural/engine/notes.py +80 -0
- cmd_kural-0.1.2/kural/engine/recovery.py +196 -0
- cmd_kural-0.1.2/kural/engine/server.py +322 -0
- cmd_kural-0.1.2/kural/engine/snippets.py +96 -0
- cmd_kural-0.1.2/kural/engine/stop_phrase.py +74 -0
- cmd_kural-0.1.2/kural/engine/streaming.py +106 -0
- cmd_kural-0.1.2/kural/engine/streaming_delivery.py +127 -0
- cmd_kural-0.1.2/kural/engine/streaming_manager.py +127 -0
- cmd_kural-0.1.2/kural/engine/streaming_recognizer.py +163 -0
- cmd_kural-0.1.2/kural/engine/transforms.py +288 -0
- cmd_kural-0.1.2/kural/engine/utils.py +296 -0
- cmd_kural-0.1.2/kural/engine/voice_activity_detection.py +336 -0
- cmd_kural-0.1.2/kural/engine/wake_word.py +83 -0
- cmd_kural-0.1.2/kural/engine/whisper_engine.py +412 -0
- cmd_kural-0.1.2/kural/runtime.py +814 -0
- cmd_kural-0.1.2/kural/selftest.py +198 -0
- cmd_kural-0.1.2/kural/ui/__init__.py +9 -0
- cmd_kural-0.1.2/kural/ui/cheat_sheet.py +245 -0
- cmd_kural-0.1.2/kural/ui/fallback_window.py +240 -0
- cmd_kural-0.1.2/kural/ui/history_window.py +277 -0
- cmd_kural-0.1.2/kural/ui/overlay.py +315 -0
- cmd_kural-0.1.2/kural/ui/settings_window.py +500 -0
- cmd_kural-0.1.2/kural/ui/terminal_title.py +152 -0
- cmd_kural-0.1.2/kural/ui/tray.py +161 -0
- cmd_kural-0.1.2/memory.md +73 -0
- cmd_kural-0.1.2/packaging/build.bat +13 -0
- cmd_kural-0.1.2/packaging/kural.iss +28 -0
- cmd_kural-0.1.2/packaging/kural.spec +79 -0
- cmd_kural-0.1.2/packaging/release_check.py +72 -0
- cmd_kural-0.1.2/packaging/smoke.py +106 -0
- cmd_kural-0.1.2/pyproject.toml +76 -0
- cmd_kural-0.1.2/tests/config/__init__.py +1 -0
- cmd_kural-0.1.2/tests/config/test_config_manager.py +111 -0
- cmd_kural-0.1.2/tests/config/test_configcheck.py +123 -0
- cmd_kural-0.1.2/tests/config/test_defaults_merge.py +63 -0
- cmd_kural-0.1.2/tests/conftest.py +6 -0
- cmd_kural-0.1.2/tests/control/__init__.py +1 -0
- cmd_kural-0.1.2/tests/control/test_app_index.py +98 -0
- cmd_kural-0.1.2/tests/control/test_app_rules.py +67 -0
- cmd_kural-0.1.2/tests/control/test_autostart.py +135 -0
- cmd_kural-0.1.2/tests/control/test_chords.py +98 -0
- cmd_kural-0.1.2/tests/control/test_elevation.py +31 -0
- cmd_kural-0.1.2/tests/control/test_executor.py +123 -0
- cmd_kural-0.1.2/tests/control/test_guardrails.py +87 -0
- cmd_kural-0.1.2/tests/control/test_llm_fallback.py +74 -0
- cmd_kural-0.1.2/tests/control/test_media.py +120 -0
- cmd_kural-0.1.2/tests/control/test_mouse.py +95 -0
- cmd_kural-0.1.2/tests/control/test_parser.py +93 -0
- cmd_kural-0.1.2/tests/control/test_planner.py +78 -0
- cmd_kural-0.1.2/tests/control/test_tamil_parser.py +145 -0
- cmd_kural-0.1.2/tests/control/test_windows.py +210 -0
- cmd_kural-0.1.2/tests/engine/__init__.py +0 -0
- cmd_kural-0.1.2/tests/engine/conftest.py +35 -0
- cmd_kural-0.1.2/tests/engine/test_adaptive.py +45 -0
- cmd_kural-0.1.2/tests/engine/test_audio_ducking.py +149 -0
- cmd_kural-0.1.2/tests/engine/test_audio_feedback.py +97 -0
- cmd_kural-0.1.2/tests/engine/test_audio_gain.py +51 -0
- cmd_kural-0.1.2/tests/engine/test_bundle_logs.py +115 -0
- cmd_kural-0.1.2/tests/engine/test_cues.py +46 -0
- cmd_kural-0.1.2/tests/engine/test_dictation_cleanup.py +114 -0
- cmd_kural-0.1.2/tests/engine/test_dictation_languages.py +92 -0
- cmd_kural-0.1.2/tests/engine/test_dictionary.py +35 -0
- cmd_kural-0.1.2/tests/engine/test_file_transcriber.py +254 -0
- cmd_kural-0.1.2/tests/engine/test_flow_formatting.py +75 -0
- cmd_kural-0.1.2/tests/engine/test_hardware_detection.py +82 -0
- cmd_kural-0.1.2/tests/engine/test_history.py +127 -0
- cmd_kural-0.1.2/tests/engine/test_instance_manager.py +108 -0
- cmd_kural-0.1.2/tests/engine/test_log_setup.py +74 -0
- cmd_kural-0.1.2/tests/engine/test_model_registry.py +79 -0
- cmd_kural-0.1.2/tests/engine/test_noise_suppression.py +56 -0
- cmd_kural-0.1.2/tests/engine/test_notes.py +47 -0
- cmd_kural-0.1.2/tests/engine/test_recovery.py +82 -0
- cmd_kural-0.1.2/tests/engine/test_server.py +459 -0
- cmd_kural-0.1.2/tests/engine/test_snippets.py +81 -0
- cmd_kural-0.1.2/tests/engine/test_stop_phrase.py +56 -0
- cmd_kural-0.1.2/tests/engine/test_streaming.py +115 -0
- cmd_kural-0.1.2/tests/engine/test_streaming_delivery.py +108 -0
- cmd_kural-0.1.2/tests/engine/test_transforms.py +131 -0
- cmd_kural-0.1.2/tests/engine/test_utils.py +97 -0
- cmd_kural-0.1.2/tests/engine/test_vram_idle.py +76 -0
- cmd_kural-0.1.2/tests/engine/test_wake_word.py +46 -0
- cmd_kural-0.1.2/tests/engine/test_whisper_engine.py +156 -0
- cmd_kural-0.1.2/tests/test_benchmark.py +136 -0
- cmd_kural-0.1.2/tests/test_doctor.py +69 -0
- cmd_kural-0.1.2/tests/test_import.py +17 -0
- cmd_kural-0.1.2/tests/test_release_check.py +106 -0
- cmd_kural-0.1.2/tests/test_runtime.py +595 -0
- cmd_kural-0.1.2/tests/test_selftest.py +157 -0
- cmd_kural-0.1.2/tests/ui/__init__.py +1 -0
- cmd_kural-0.1.2/tests/ui/test_cheat_sheet.py +60 -0
- cmd_kural-0.1.2/tests/ui/test_fallback_window.py +72 -0
- cmd_kural-0.1.2/tests/ui/test_history_window.py +95 -0
- cmd_kural-0.1.2/tests/ui/test_overlay.py +81 -0
- cmd_kural-0.1.2/tests/ui/test_settings.py +136 -0
- cmd_kural-0.1.2/tests/ui/test_terminal_title.py +82 -0
- cmd_kural-0.1.2/tests/ui/test_tray.py +66 -0
- cmd_kural-0.1.2/uv.lock +3958 -0
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
name: Verified builds
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
workflow_call:
|
|
5
|
+
inputs:
|
|
6
|
+
ref:
|
|
7
|
+
description: Exact validated commit for release builds
|
|
8
|
+
required: false
|
|
9
|
+
type: string
|
|
10
|
+
default: ''
|
|
11
|
+
|
|
12
|
+
permissions:
|
|
13
|
+
contents: read
|
|
14
|
+
|
|
15
|
+
jobs:
|
|
16
|
+
test:
|
|
17
|
+
runs-on: windows-latest
|
|
18
|
+
timeout-minutes: 20
|
|
19
|
+
steps:
|
|
20
|
+
- uses: actions/checkout@v4
|
|
21
|
+
with:
|
|
22
|
+
ref: ${{ inputs.ref || github.sha }}
|
|
23
|
+
persist-credentials: false
|
|
24
|
+
- uses: astral-sh/setup-uv@v5
|
|
25
|
+
with:
|
|
26
|
+
enable-cache: true
|
|
27
|
+
version: "0.13.9"
|
|
28
|
+
- run: uv sync --locked --python 3.12 --extra dev --extra runtime --extra tray
|
|
29
|
+
- run: uv run --no-sync ruff check .
|
|
30
|
+
- run: uv run --no-sync ruff format --check .
|
|
31
|
+
- run: uv run --no-sync pytest -m "not gpu and not mic"
|
|
32
|
+
|
|
33
|
+
packages:
|
|
34
|
+
needs: test
|
|
35
|
+
runs-on: windows-latest
|
|
36
|
+
timeout-minutes: 20
|
|
37
|
+
steps:
|
|
38
|
+
- uses: actions/checkout@v4
|
|
39
|
+
with:
|
|
40
|
+
ref: ${{ inputs.ref || github.sha }}
|
|
41
|
+
persist-credentials: false
|
|
42
|
+
- uses: astral-sh/setup-uv@v5
|
|
43
|
+
with:
|
|
44
|
+
version: "0.13.9"
|
|
45
|
+
enable-cache: true
|
|
46
|
+
- run: uv python install 3.12
|
|
47
|
+
- run: uv build --out-dir dist/packages
|
|
48
|
+
- run: uvx --from twine twine check --strict dist/packages/*
|
|
49
|
+
- run: uv run --no-project --python 3.12 packaging/smoke.py --packages dist/packages
|
|
50
|
+
- uses: actions/upload-artifact@v4
|
|
51
|
+
with:
|
|
52
|
+
name: kural-python-packages
|
|
53
|
+
path: dist/packages/*
|
|
54
|
+
if-no-files-found: error
|
|
55
|
+
|
|
56
|
+
desktop:
|
|
57
|
+
needs: test
|
|
58
|
+
runs-on: windows-latest
|
|
59
|
+
timeout-minutes: 30
|
|
60
|
+
steps:
|
|
61
|
+
- uses: actions/checkout@v4
|
|
62
|
+
with:
|
|
63
|
+
ref: ${{ inputs.ref || github.sha }}
|
|
64
|
+
persist-credentials: false
|
|
65
|
+
- uses: astral-sh/setup-uv@v5
|
|
66
|
+
with:
|
|
67
|
+
version: "0.13.9"
|
|
68
|
+
enable-cache: true
|
|
69
|
+
- run: uv sync --locked --python 3.12 --extra dev --extra runtime --extra tray
|
|
70
|
+
- run: uv run --no-sync pyinstaller --noconfirm --clean packaging/kural.spec
|
|
71
|
+
- run: Compress-Archive -Path dist/kural/* -DestinationPath dist/kural-windows-x64.zip
|
|
72
|
+
- run: uv run --no-sync python packaging/smoke.py --bundle dist/kural-windows-x64.zip
|
|
73
|
+
- name: Build unsigned per-user installer with runner Inno Setup
|
|
74
|
+
shell: pwsh
|
|
75
|
+
run: |
|
|
76
|
+
$compiler = "${env:ProgramFiles(x86)}\Inno Setup 6\ISCC.exe"
|
|
77
|
+
if (-not (Test-Path $compiler)) { throw 'Runner Inno Setup 6 is required' }
|
|
78
|
+
$version = uv run --no-sync python -c "import tomllib; print(tomllib.load(open('pyproject.toml','rb'))['project']['version'])"
|
|
79
|
+
& $compiler "/DAppVersion=$version" packaging/kural.iss
|
|
80
|
+
if ($LASTEXITCODE -ne 0) { throw 'Installer compilation failed' }
|
|
81
|
+
- run: uv run --no-sync python packaging/smoke.py --installer dist/kural-windows-x64-setup.exe
|
|
82
|
+
- uses: actions/upload-artifact@v4
|
|
83
|
+
with:
|
|
84
|
+
name: kural-windows-x64
|
|
85
|
+
path: |
|
|
86
|
+
dist/kural-windows-x64.zip
|
|
87
|
+
dist/kural-windows-x64-setup.exe
|
|
88
|
+
if-no-files-found: error
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
pull_request:
|
|
7
|
+
branches: [main]
|
|
8
|
+
workflow_dispatch:
|
|
9
|
+
|
|
10
|
+
permissions:
|
|
11
|
+
contents: read
|
|
12
|
+
|
|
13
|
+
concurrency:
|
|
14
|
+
group: ci-${{ github.workflow }}-${{ github.ref }}
|
|
15
|
+
cancel-in-progress: true
|
|
16
|
+
|
|
17
|
+
jobs:
|
|
18
|
+
build:
|
|
19
|
+
uses: ./.github/workflows/build.yml
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
name: Publish Python package to PyPI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
workflow_dispatch:
|
|
5
|
+
inputs:
|
|
6
|
+
tag:
|
|
7
|
+
description: Existing release tag matching project version (for example v0.1.1)
|
|
8
|
+
required: true
|
|
9
|
+
type: string
|
|
10
|
+
|
|
11
|
+
permissions:
|
|
12
|
+
contents: read
|
|
13
|
+
|
|
14
|
+
concurrency:
|
|
15
|
+
group: publish-pypi-${{ inputs.tag }}
|
|
16
|
+
cancel-in-progress: false
|
|
17
|
+
|
|
18
|
+
jobs:
|
|
19
|
+
validate:
|
|
20
|
+
runs-on: ubuntu-latest
|
|
21
|
+
timeout-minutes: 5
|
|
22
|
+
outputs:
|
|
23
|
+
commit: ${{ steps.tag.outputs.commit }}
|
|
24
|
+
version: ${{ steps.tag.outputs.version }}
|
|
25
|
+
tag: ${{ steps.tag.outputs.tag }}
|
|
26
|
+
steps:
|
|
27
|
+
- uses: actions/checkout@v4
|
|
28
|
+
with:
|
|
29
|
+
fetch-depth: 0
|
|
30
|
+
persist-credentials: false
|
|
31
|
+
- name: Validate exact existing release tag on main
|
|
32
|
+
id: tag
|
|
33
|
+
env:
|
|
34
|
+
RELEASE_TAG: ${{ inputs.tag }}
|
|
35
|
+
run: python3 packaging/release_check.py --tag "$RELEASE_TAG"
|
|
36
|
+
|
|
37
|
+
build:
|
|
38
|
+
needs: validate
|
|
39
|
+
uses: ./.github/workflows/build.yml
|
|
40
|
+
with:
|
|
41
|
+
ref: ${{ needs.validate.outputs.commit }}
|
|
42
|
+
|
|
43
|
+
publish:
|
|
44
|
+
if: ${{ vars.PUBLISH_PYPI == 'true' }}
|
|
45
|
+
needs: [validate, build]
|
|
46
|
+
runs-on: ubuntu-latest
|
|
47
|
+
timeout-minutes: 10
|
|
48
|
+
environment:
|
|
49
|
+
name: pypi
|
|
50
|
+
url: https://pypi.org/project/cmd-kural/
|
|
51
|
+
permissions:
|
|
52
|
+
id-token: write
|
|
53
|
+
steps:
|
|
54
|
+
- name: Download verified Python distributions
|
|
55
|
+
uses: actions/download-artifact@v4
|
|
56
|
+
with:
|
|
57
|
+
name: kural-python-packages
|
|
58
|
+
path: dist
|
|
59
|
+
- name: Check Python distribution metadata
|
|
60
|
+
run: uvx --from twine twine check --strict dist/*
|
|
61
|
+
- name: Publish to PyPI with Trusted Publishing (OIDC)
|
|
62
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
63
|
+
with:
|
|
64
|
+
packages-dir: dist/
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
name: Release
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
tags: ["v*"]
|
|
6
|
+
workflow_dispatch:
|
|
7
|
+
inputs:
|
|
8
|
+
tag:
|
|
9
|
+
description: Existing stable vX.Y.Z tag (must match project version)
|
|
10
|
+
required: true
|
|
11
|
+
type: string
|
|
12
|
+
|
|
13
|
+
permissions:
|
|
14
|
+
contents: read
|
|
15
|
+
|
|
16
|
+
concurrency:
|
|
17
|
+
group: release-${{ inputs.tag || github.ref_name }}
|
|
18
|
+
cancel-in-progress: false
|
|
19
|
+
|
|
20
|
+
jobs:
|
|
21
|
+
validate:
|
|
22
|
+
runs-on: ubuntu-latest
|
|
23
|
+
timeout-minutes: 5
|
|
24
|
+
outputs:
|
|
25
|
+
commit: ${{ steps.tag.outputs.commit }}
|
|
26
|
+
version: ${{ steps.tag.outputs.version }}
|
|
27
|
+
tag: ${{ steps.tag.outputs.tag }}
|
|
28
|
+
steps:
|
|
29
|
+
- uses: actions/checkout@v4
|
|
30
|
+
with:
|
|
31
|
+
fetch-depth: 0
|
|
32
|
+
persist-credentials: false
|
|
33
|
+
- name: Require existing exact version tag on main history
|
|
34
|
+
id: tag
|
|
35
|
+
env:
|
|
36
|
+
RELEASE_TAG: ${{ inputs.tag || github.ref_name }}
|
|
37
|
+
run: python3 packaging/release_check.py --tag "$RELEASE_TAG"
|
|
38
|
+
|
|
39
|
+
build:
|
|
40
|
+
needs: validate
|
|
41
|
+
uses: ./.github/workflows/build.yml
|
|
42
|
+
with:
|
|
43
|
+
ref: ${{ needs.validate.outputs.commit }}
|
|
44
|
+
|
|
45
|
+
github-release:
|
|
46
|
+
needs: [validate, build]
|
|
47
|
+
runs-on: ubuntu-latest
|
|
48
|
+
timeout-minutes: 10
|
|
49
|
+
permissions:
|
|
50
|
+
contents: write
|
|
51
|
+
steps:
|
|
52
|
+
- uses: actions/checkout@v4
|
|
53
|
+
with:
|
|
54
|
+
persist-credentials: false
|
|
55
|
+
fetch-depth: 0
|
|
56
|
+
- uses: actions/download-artifact@v4
|
|
57
|
+
with:
|
|
58
|
+
path: artifacts
|
|
59
|
+
- name: Check artifact set and tag has not moved; generate checksums
|
|
60
|
+
env:
|
|
61
|
+
RELEASE_TAG: ${{ needs.validate.outputs.tag }}
|
|
62
|
+
RELEASE_COMMIT: ${{ needs.validate.outputs.commit }}
|
|
63
|
+
RELEASE_VERSION: ${{ needs.validate.outputs.version }}
|
|
64
|
+
run: |
|
|
65
|
+
test "$(git rev-parse "refs/tags/$RELEASE_TAG^{commit}")" = "$RELEASE_COMMIT"
|
|
66
|
+
python3 packaging/release_check.py --artifacts artifacts --version "$RELEASE_VERSION"
|
|
67
|
+
(cd artifacts && sha256sum --check SHA256SUMS)
|
|
68
|
+
- uses: softprops/action-gh-release@v2
|
|
69
|
+
with:
|
|
70
|
+
tag_name: ${{ needs.validate.outputs.tag }}
|
|
71
|
+
target_commitish: ${{ needs.validate.outputs.commit }}
|
|
72
|
+
fail_on_unmatched_files: true
|
|
73
|
+
files: |
|
|
74
|
+
artifacts/kural-windows-x64/*.zip
|
|
75
|
+
artifacts/kural-windows-x64/*.exe
|
|
76
|
+
artifacts/kural-python-packages/*.whl
|
|
77
|
+
artifacts/kural-python-packages/*.tar.gz
|
|
78
|
+
artifacts/SHA256SUMS
|
|
79
|
+
generate_release_notes: true
|
|
80
|
+
|
|
81
|
+
# PyPI publication is intentionally separate and manual. Run
|
|
82
|
+
# publish-pypi.yml only after claiming cmd-kural and configuring trusted publishing.
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
# Python
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[cod]
|
|
4
|
+
*.pyo
|
|
5
|
+
*.pyd
|
|
6
|
+
*.egg-info/
|
|
7
|
+
dist/
|
|
8
|
+
build/
|
|
9
|
+
.eggs/
|
|
10
|
+
*.egg
|
|
11
|
+
|
|
12
|
+
# Virtual environments
|
|
13
|
+
.venv/
|
|
14
|
+
venv/
|
|
15
|
+
env/
|
|
16
|
+
|
|
17
|
+
# uv
|
|
18
|
+
.uv/
|
|
19
|
+
|
|
20
|
+
# Ruff / linting
|
|
21
|
+
.ruff_cache/
|
|
22
|
+
|
|
23
|
+
# Pytest
|
|
24
|
+
.pytest_cache/
|
|
25
|
+
.coverage
|
|
26
|
+
htmlcov/
|
|
27
|
+
|
|
28
|
+
# Kural runtime — never commit these
|
|
29
|
+
config.json
|
|
30
|
+
kural.log
|
|
31
|
+
kural.log.*
|
|
32
|
+
*.wav
|
|
33
|
+
*.mp3
|
|
34
|
+
*.flac
|
|
35
|
+
*.ogg
|
|
36
|
+
*.m4a
|
|
37
|
+
recordings/
|
|
38
|
+
history/
|
|
39
|
+
|
|
40
|
+
# Whisper models — large binaries, download separately
|
|
41
|
+
models/
|
|
42
|
+
*.bin
|
|
43
|
+
*.gguf
|
|
44
|
+
*.pt
|
|
45
|
+
|
|
46
|
+
# IDE
|
|
47
|
+
.idea/
|
|
48
|
+
.vscode/
|
|
49
|
+
*.swp
|
|
50
|
+
*.swo
|
|
51
|
+
*~
|
|
52
|
+
|
|
53
|
+
# Windows
|
|
54
|
+
Thumbs.db
|
|
55
|
+
desktop.ini
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
3.12
|
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
# Kural
|
|
2
|
+
|
|
3
|
+
> Local-first voice typing + voice control for Windows. English and Tamil. GPU-accelerated Whisper, no cloud.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Role
|
|
8
|
+
|
|
9
|
+
You are a senior Python engineer (Windows desktop, audio, speech recognition) working with Mohamed Aashir S on **Kural**, a merge of two MIT-licensed projects:
|
|
10
|
+
|
|
11
|
+
- **Base:** `drajb/whisper-local` (fork of Pin Wang's `whisper-key-local`) — the GPU speech engine, onboarding, diagnostics, settings.
|
|
12
|
+
- **Donor:** `ROHITCRAFTSYT/WhispLocal` — the voice-control engine (app index, fuzzy command matching, guardrails), adaptive learning, recovery features.
|
|
13
|
+
|
|
14
|
+
Target machine: Windows 11, NVIDIA RTX 3050 6 GB, 16 GB RAM. Languages: English and Tamil.
|
|
15
|
+
|
|
16
|
+
Priorities, in order: correctness and privacy → dictation latency on the GPU → voice-control reliability → polish.
|
|
17
|
+
|
|
18
|
+
Rules of engagement:
|
|
19
|
+
- Read the relevant module in BOTH source repos before writing a new one. Port and adapt; do not rewrite from memory.
|
|
20
|
+
- Never add a runtime network call. The only allowed network use is the one-time model download.
|
|
21
|
+
- If a claim in this file is marked **(verify)**, confirm it in the code before building on it.
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
## Project context
|
|
26
|
+
|
|
27
|
+
### What each source repo gives us
|
|
28
|
+
|
|
29
|
+
**drajb/whisper-local (base)**
|
|
30
|
+
|
|
31
|
+
| Pros | Cons / gaps |
|
|
32
|
+
|---|---|
|
|
33
|
+
| CUDA/float16 path with onboarding that installs the CUDA libraries; `doctor.py` checks them | Voice commands are marked experimental |
|
|
34
|
+
| Models include `large-v3-turbo` and `distil-large-v3.5`; setup wizard recommends Turbo for GPUs | Command matching is plain substring, first match wins, no fuzzy or misheard-word recovery |
|
|
35
|
+
| Tamil is in the dictation language list | No app index: every "open X" must be hand-written in `commands.yaml` |
|
|
36
|
+
| `commands.yaml` actions: `run`, `hotkey`, `type`, `rephrase` (Ollama), macros with `then:` and `delay:` | Command mode needs a separate hotkey plus a stop key |
|
|
37
|
+
| Settings UI, history window, stats, snippets, dictionary, app rules/styles, streaming, noise suppression, local OpenAI-compatible server | Large module count; some features may overlap with the donor (**verify** before porting anything) |
|
|
38
|
+
| Packaging dirs, tests, self-test, CI-style tooling | No Tamil trigger phrases or Tamil command aliases |
|
|
39
|
+
|
|
40
|
+
**ROHITCRAFTSYT/WhispLocal (donor)**
|
|
41
|
+
|
|
42
|
+
| Pros | Cons / gaps |
|
|
43
|
+
|---|---|
|
|
44
|
+
| Rich voice control: open/close/switch apps, web fallback, window management, media/volume, pointer, screenshot, lock, notes to Obsidian | `transcriber.py` hardcodes `device="cpu", compute_type="int8"`, so the RTX 3050 is never used |
|
|
45
|
+
| Indexes Start Menu shortcuts and Store apps; fuzzy app matching; second-pass fix of misheard leading verb ("oben chrome") | Practical models are tiny/base/small on CPU; weak for Tamil |
|
|
46
|
+
| `GUARDRAILS.md`: never deletes files, never purchases or books, graceful close only | Command parser assumes English verbs and phrasing |
|
|
47
|
+
| Adaptive vocabulary/corrections, voice editing, never-lose-a-dictation (paste last, retry last, DPAPI-encrypted take), config validation | 1 star, no releases; source install needs Python 3.11/3.12 |
|
|
48
|
+
| Native-script Indic prompting and optional Roman-script output | Windows-only; elevated (admin) windows ignore injected input |
|
|
49
|
+
| Mocked tests and CI that need no mic, model or network | Clipboard-based insertion by default |
|
|
50
|
+
|
|
51
|
+
### Gaps in both (the reason Kural exists)
|
|
52
|
+
|
|
53
|
+
1. **No project combines GPU Turbo with rich voice control.** Base has the GPU, donor has the control engine.
|
|
54
|
+
2. **Tamil voice commands are unsupported.** Matching in both is English-phrased. Need Tamil and Tanglish aliases ("திற chrome", "open chrome பண்ணு").
|
|
55
|
+
3. **Tanglish (mixed Tamil-English) accuracy is unmeasured.** No test set exists in either repo.
|
|
56
|
+
4. **No EN/TA benchmark harness** comparing Turbo, Large v3, distil and Q5 variants on the RTX 3050 (speed and WER).
|
|
57
|
+
5. **Neither appears to offer hands-free activation** (wake word or always-listening mode). Both are hotkey-driven (**verify**).
|
|
58
|
+
6. **Safety models differ.** Base runs any shell string from user YAML; donor has fixed guardrails. Kural needs one consistent policy.
|
|
59
|
+
7. **GPU memory is shared.** Nothing unloads the model after idle, so other GPU apps on a 6 GB card can run out of VRAM.
|
|
60
|
+
8. **Two packaging approaches** (base: pyapp/packaging; donor: PyInstaller). Pick one.
|
|
61
|
+
9. **Elevated windows** ignore injected keystrokes. Needs a clear user-facing message, not a silent failure.
|
|
62
|
+
|
|
63
|
+
### Licensing
|
|
64
|
+
|
|
65
|
+
Both sources are MIT. Keep all upstream copyright lines (Pin Wang, Rohit Burani, ROHITCRAFTSYT) in `LICENSE` and `THIRD_PARTY_NOTICES.md`. Note the origin of every ported file in its header comment.
|
|
66
|
+
|
|
67
|
+
---
|
|
68
|
+
|
|
69
|
+
## Architecture decisions
|
|
70
|
+
|
|
71
|
+
- **Base = `drajb/whisper-local`, imported by copy.** `main` starts as a bare skeleton, so the upstream code arrives in the first PR (`chore/import-base-engine`), not as a git fork. Record the upstream commit SHA in `THIRD_PARTY_NOTICES.md`. Rename the package to `kural`. Keep its engine, onboarding, doctor, settings, packaging.
|
|
72
|
+
- **Port from donor, as a `kural/control/` package:** command parser, app index (Start Menu + Store), fuzzy/second-pass matching, volume/media, window ops, guardrails. Adapt to base's `commands.yaml` so user-defined commands still work.
|
|
73
|
+
- **Command resolution order:** user `commands.yaml` exact → built-in commands → fuzzy app match → (optional, later) local-LLM intent fallback → "not understood" feedback. Never guess a destructive action.
|
|
74
|
+
- **Engine:** faster-whisper on CUDA, `float16`, default model `large-v3-turbo`. CPU `int8` fallback with a visible warning. Unload the model after a configurable idle time.
|
|
75
|
+
- **Language:** set manually (`en` / `ta`), no auto-detect by default. Native Tamil script output; Roman option kept from donor.
|
|
76
|
+
- **Text pipeline stays deterministic** (no LLM touches dictated words). LLM use is opt-in and only for rephrase/intent fallback.
|
|
77
|
+
- **Config:** `%APPDATA%\kural\`. Validate every key on load; a bad value falls back to its default and logs a warning (port donor's `configcheck.py`).
|
|
78
|
+
- **Privacy:** no telemetry. Transcripts are not logged at INFO. Retained audio only DPAPI-encrypted, one take, short expiry, off in Incognito.
|
|
79
|
+
|
|
80
|
+
### Roadmap
|
|
81
|
+
|
|
82
|
+
| Milestone | Outcome | Done when |
|
|
83
|
+
|---|---|---|
|
|
84
|
+
| M0 | Import base, rename, upstream tests green | `pytest` passes on Windows 11 (PRs: `chore/import-base-engine`, `refactor/rename-to-kural`) |
|
|
85
|
+
| M1 | GPU Turbo for EN + TA, benchmark harness | Report: latency and WER for Turbo / Large v3 / distil / Q5 on RTX 3050 |
|
|
86
|
+
| M2 | Voice-control engine ported | Open/close/switch/media/window commands work with fuzzy match and guardrails |
|
|
87
|
+
| M3 | Tamil + Tanglish command aliases and test set | Tamil triggers pass an agreed accuracy bar on recorded samples |
|
|
88
|
+
| M4 | One installer, idle VRAM unload, elevated-window message | Fresh Windows 11 install works end to end |
|
|
89
|
+
| M5 (optional) | Local-LLM intent fallback, wake word | Behind a setting, off by default |
|
|
90
|
+
|
|
91
|
+
---
|
|
92
|
+
|
|
93
|
+
## Code standards
|
|
94
|
+
|
|
95
|
+
- Python 3.12, type hints on all public functions, `ruff` clean, `pytest` for everything.
|
|
96
|
+
- Small modules, one responsibility each. No new module over ~300 lines without a reason.
|
|
97
|
+
- **Tests must not need a mic, GPU, model or network.** Mock audio devices and faster-whisper (the donor's test suite is the pattern to follow). GPU behaviour gets a separate marked test run on the real machine.
|
|
98
|
+
- Every ported file: keep the upstream license header, add a one-line "ported from <repo>/<path>" comment, and cover it with a test before changing its behaviour.
|
|
99
|
+
- Voice-control actions are an allowlist. No file deletion, purchases, payments or bookings by voice. Shutdown, restart and sign-out need a confirmation step and a cancel window.
|
|
100
|
+
- Errors reach the user as a plain sentence in the UI and a full traceback in `kural.log` (rotating, 1 MB x 3).
|
|
101
|
+
- Never swallow exceptions in the audio or transcription threads; log and surface them.
|
|
102
|
+
- Do not commit models, recordings, history files or `config.json`.
|
|
103
|
+
- Commit and branch rules are in **Git workflow** below. They apply to every change, including docs and config.
|
|
104
|
+
|
|
105
|
+
---
|
|
106
|
+
|
|
107
|
+
## Git workflow
|
|
108
|
+
|
|
109
|
+
`main` holds only the simple folder structure and default files. All real work lands through pull requests that the user merges. Claude never merges.
|
|
110
|
+
|
|
111
|
+
**Per task (one feature, function or requirement = one branch = one PR):**
|
|
112
|
+
|
|
113
|
+
1. Make sure local `main` is up to date: `git checkout main && git pull`.
|
|
114
|
+
2. Create a branch from `main` named for the work, as `<type>/<short-kebab-name>`:
|
|
115
|
+
- Types: `feat`, `fix`, `port`, `test`, `docs`, `chore`, `refactor`.
|
|
116
|
+
- Examples: `chore/import-base-engine`, `feat/gpu-turbo-engine`, `port/app-index`, `feat/tamil-command-aliases`, `test/benchmark-harness`.
|
|
117
|
+
3. Build the change in small steps. **Every change is committed**, however small, and nothing is left uncommitted when a session or task ends (`git status` must be clean).
|
|
118
|
+
4. Verify before opening the PR (all of these, in order):
|
|
119
|
+
- `ruff check .` and `ruff format --check .` pass.
|
|
120
|
+
- `pytest` passes, with new or changed behaviour covered by new tests.
|
|
121
|
+
- Run the feature itself where it can be run (CLI, `--doctor`, self-test, or a manual check on the real machine for GPU/mic/hotkey work) and note what was run.
|
|
122
|
+
- Review your own diff: no stray files, no secrets, license headers present on ported code.
|
|
123
|
+
5. Push the branch and open a PR into `main`.
|
|
124
|
+
6. **Stop and wait.** The user reviews and merges. Do not start the next task on top of an unmerged branch.
|
|
125
|
+
7. After the user confirms the merge: `git checkout main && git pull`, delete the merged local branch, then start the next task from step 2.
|
|
126
|
+
|
|
127
|
+
**Commits:**
|
|
128
|
+
|
|
129
|
+
- Conventional commit subjects: `feat:`, `fix:`, `port:`, `test:`, `docs:`, `chore:`, `refactor:`. Imperative mood, subject under 72 characters, body explains *why* when it is not obvious.
|
|
130
|
+
- One logical change per commit. Tests go in the same commit as the code they cover, or in the commit just before it.
|
|
131
|
+
- **No `Co-Authored-By` trailer, no `Claude-Session` line, no "Generated with" line, and no other attribution lines in any commit message.** Commits carry only the user's configured git identity. Do not edit `git config`.
|
|
132
|
+
- Never commit to `main` directly, force-push `main`, or rewrite history that is already pushed. Do not use `--no-verify` to skip hooks.
|
|
133
|
+
|
|
134
|
+
**Pull requests:**
|
|
135
|
+
|
|
136
|
+
- Title follows the commit style. Description has: **Summary** (what and why), **Changes** (bullets), **Verification** (the exact commands run and their result), **Notes** (known gaps, follow-ups, anything marked verify).
|
|
137
|
+
- Keep PRs small enough to review in one sitting. If a task grows past that, split it into several branches and PRs and say so.
|
|
138
|
+
|
|
139
|
+
---
|
|
140
|
+
|
|
141
|
+
## Skills
|
|
142
|
+
|
|
143
|
+
Use these custom skills at the right moment:
|
|
144
|
+
|
|
145
|
+
| Skill | When |
|
|
146
|
+
|---|---|
|
|
147
|
+
| `/architect` | Before building anything non-trivial with no plan yet (M2 control engine, M3 Tamil matching, VRAM unload). Output: a short design with module boundaries and test plan. |
|
|
148
|
+
| `/review` | When a feature is done. Production check: privacy, guardrails, threading, error paths, test coverage, license headers on ported code. |
|
|
149
|
+
| `/recover` | When something is broken and the fix isn't obvious (CUDA load hangs, hotkeys not firing, text not arriving, model won't load). Diagnose from `kural.log` and `doctor` output before changing code. |
|
|
150
|
+
| `/remember` | Session start: restore context from `SESSION.md`. Session end: save progress there. |
|
|
151
|
+
|
|
152
|
+
---
|
|
153
|
+
|
|
154
|
+
## Session continuity
|
|
155
|
+
|
|
156
|
+
- Each milestone is delivered as several small PRs, one per feature or requirement (see **Git workflow**). After opening a PR, stop and wait for the user to merge it before starting the next.
|
|
157
|
+
- Keep `SESSION.md` at the repo root. It holds: current milestone, current branch and PR link, last completed step, next step, open questions, and any **(verify)** items resolved or still open. Update it in a commit on the same branch as the work it describes.
|
|
158
|
+
- At session start run `/remember`, read `SESSION.md`, then state the current milestone and next step in two lines before doing anything.
|
|
159
|
+
- At session end run `/remember` to update `SESSION.md`. Record decisions with a one-line reason.
|
|
160
|
+
- When a **(verify)** item is checked, update this file with the result so it is not checked twice.
|
|
161
|
+
- Do not rely on chat history. Anything that matters goes in `SESSION.md` or this file.
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to Kural will be documented in this file.
|
|
4
|
+
|
|
5
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
|
+
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
## [Unreleased]
|
|
11
|
+
|
|
12
|
+
### Changed
|
|
13
|
+
- Recover the failed unpublished `cmd-kural` 0.1.1 release using a new `0.1.2` version/tag. The existing `v0.1.1` tag remains unchanged because it points to a pre-fix commit and release tags must not be moved.
|
|
14
|
+
- Prepare `cmd-kural` 0.1.2 wheel/sdist installation through `uv tool`; the `kural` CLI and import package name remain unchanged.
|
|
15
|
+
- The v0.1.0 GitHub Release and its `kural` distribution wheel remain unchanged.
|
|
16
|
+
- Add a manually triggered, OIDC-only PyPI publishing workflow gated on package ownership, PyPI Trusted Publisher setup, the protected GitHub `pypi` environment, and `PUBLISH_PYPI=true`.
|
|
17
|
+
|
|
18
|
+
### Notes
|
|
19
|
+
- `cmd-kural` is not published yet. A pending PyPI publisher does not reserve the name; the owner must claim the project before enabling publication.
|
|
20
|
+
- Install command after publication: `uv tool install --python 3.12 --from "cmd-kural[runtime,tray]" kural`. The installed command and Python import remain `kural`.
|
|
21
|
+
|
|
22
|
+
## [0.1.0] - 2026-11-20
|
|
23
|
+
|
|
24
|
+
### Added
|
|
25
|
+
|
|
26
|
+
#### Speech Engine & Hardware
|
|
27
|
+
- **GPU-Accelerated Inference:** Local Faster-Whisper engine running on NVIDIA CUDA `float16` with default `large-v3-turbo` model, targeting the NVIDIA RTX 3050 (6 GB VRAM).
|
|
28
|
+
- **CPU Fallback:** Automatic fallback to CPU `int8` with a visible user notification when no CUDA-capable GPU is detected.
|
|
29
|
+
- **Idle VRAM Unload:** Configurable timer (default 5 minutes) that transparently unloads the Whisper model from GPU memory during inactivity, freeing ~1.5 GB VRAM for other graphics applications, and reloads on the next dictation.
|
|
30
|
+
- **Bilingual Dictation:** Native-script Tamil (*தமிழ்*), English, and mixed Tanglish code-switching.
|
|
31
|
+
- **Indic Script Formatting:** Configurable native Tamil script output or Romanized phonetic Tanglish output via `SCRIPT_PRIMER_TAMIL` and `ROMAN_PRIMER_TAMIL`.
|
|
32
|
+
- **Whisper Mode:** Adaptive audio gain booster for quiet or whispered speech with 99.9th-percentile pop rejection and noise-floor protection.
|
|
33
|
+
- **Noise Suppression:** Optional spectral gating noise reduction via `noisereduce` to filter fan and HVAC hum.
|
|
34
|
+
|
|
35
|
+
#### Voice Control & Windows Automation
|
|
36
|
+
- **App Indexer:** Automatic indexing of Windows Start Menu shortcuts and Microsoft Store (UWP) apps with multi-tier fuzzy matching.
|
|
37
|
+
- **Bilingual Command Parser:** Grammar support for Subject-Verb-Object (*"open chrome"*, *"திற chrome"*) and Subject-Object-Verb (*"chrome திற"*, *"chrome open பண்ணு"*) phrasing.
|
|
38
|
+
- **Second-Pass Misheard Verb Recovery:** Recovers phonetically misheard leading verbs (*"oben chrome"* → *"open chrome"*).
|
|
39
|
+
- **Window Management:** Graceful application close via `WM_CLOSE`, window snapping (left, right, half), minimize, maximize, and restore.
|
|
40
|
+
- **Audio & Media Control:** Native Windows Core Audio endpoint volume adjustment, mute toggle, and media transport playback controls.
|
|
41
|
+
- **Window Elevation Safety (UIPI):** Win32 token elevation inspection that warns the user when the target window runs as Administrator instead of silently dropping input.
|
|
42
|
+
- **Command Hierarchy:** 5-tier resolution model: `commands.yaml` exact match → safety guardrails → built-in parser → fuzzy app index → not understood.
|
|
43
|
+
|
|
44
|
+
#### Safety Guardrails
|
|
45
|
+
- **Destructive Action Protection:** File deletion, partition formatting, and autonomous payments or bookings are strictly blocked by voice.
|
|
46
|
+
- **Protected Processes:** Prevents voice-closing system processes (`explorer.exe`, `taskmgr.exe`, `csrss.exe`).
|
|
47
|
+
- **Cancellable Power Actions:** System shutdown and restart require a delayed 60-second cancel window with explicit exit-code verification.
|
|
48
|
+
|
|
49
|
+
#### Dictation & Text Insertion
|
|
50
|
+
- **Push-to-Talk (PTT):** Hold-to-speak with instant finalization on key release.
|
|
51
|
+
- **Multi-Key Chord Matching:** Support for modifier combinations (e.g. `Ctrl+Alt`, `Ctrl+Windows`) with driver asymmetry resolution.
|
|
52
|
+
- **Mouse Flow:** Push-to-talk using mouse thumb buttons (`x1`, `x2`, middle click) with low-level event swallowing so browser Back/Forward is not triggered.
|
|
53
|
+
- **Double-Tap Hands-Free Lock:** Rapid double-tap (<450 ms) locks dictation in hands-free mode; tap once more to finish.
|
|
54
|
+
- **Instant Cancel Hotkey:** Press `Escape` (or configured shortcut) to instantly discard the recording buffer without transcribing or typing.
|
|
55
|
+
- **Hands-Free Voice Stop Phrases:** Say *"stop dictation"*, *"stop recording"*, *"முடி"*, *"நிறுத்து"*, or *"stop பண்ணு"* to automatically finalize hands-free recordings.
|
|
56
|
+
- **Flexible Delivery Methods:**
|
|
57
|
+
- `paste` (default): copies text to clipboard and issues `Ctrl+V`, then restores prior clipboard.
|
|
58
|
+
- `type`: direct Unicode keystroke injection via Win32 `SendInput` KEYEVENTF_UNICODE for paste-blocked applications (VMs, remote desktops, games).
|
|
59
|
+
- `copy`: places text on the clipboard without sending keystrokes to the foreground window.
|
|
60
|
+
- **Clipboard History Retention:** Option to keep dictations in Windows Clipboard History (`Win+V`) instead of restoring prior clipboard state.
|
|
61
|
+
- **Return to App:** Automatically refocuses the originating application window before delivering text if a notification or alert stole focus during speech.
|
|
62
|
+
- **Caret-Aware Insertion Planner:** Win32 caret inspection that handles sentence capitalization, spacing after quotes/brackets, and mid-sentence continuation.
|
|
63
|
+
- **Flow Disfluency Stripper:** Automatic removal of verbal fillers (*"um"*, *"uh"*, duplicate false starts) and spoken punctuation translation (*"comma"*, *"period"*, *"புள்ளி"*, *"கமா"*).
|
|
64
|
+
- **In-Place Voice Editing:** Replaces selected or targeted words by voice (*"replace X with Y"*).
|
|
65
|
+
- **Text Transforms:** Developer casing tools (camelCase, snake_case, kebab-case, PascalCase, backticks, code blocks).
|
|
66
|
+
- **Notes Quick-Capture:** Direct Markdown note capture to Obsidian or daily journal vaults with YAML frontmatter.
|
|
67
|
+
|
|
68
|
+
#### User Interface & Desktop Integration
|
|
69
|
+
- **Soundwave Visual Overlay:** Click-through floating pill with 7 dynamic vertical harmonic bars showing live microphone volume.
|
|
70
|
+
- **Live Speech Streaming Preview:** Real-time interim partial words displayed inside the floating pill while speaking.
|
|
71
|
+
- **System Tray Icon:** Pystray menu with quick access to Settings, History, Cheat Sheet, Paste Last, Retry Last, and Incognito Mode.
|
|
72
|
+
- **Synthesized Audio Cues:** Pure-Python harmonic sine tones with smooth attack envelopes for start, stop, complete, and error events (zero audio files on disk).
|
|
73
|
+
- **Terminal Title State:** Dynamic ANSI OSC 0 terminal tab title animations (`[● Dictating]`, `[⏳ Processing]`, `[✔ Done]`).
|
|
74
|
+
- **Graphical Settings Dialog:** Tkinter dark-themed configuration window with live hotkey detection, audio settings, and delivery options.
|
|
75
|
+
- **Graphical History Browser:** Search-as-you-type history browser with BM25 full-text search and one-click copy.
|
|
76
|
+
- **Cheat Sheet Window:** Quick-reference dialog showing all shortcuts and bilingual voice commands.
|
|
77
|
+
- **Fallback Safety-Net Window:** Rescues unplaced or blocked dictations into a dark-themed modal with pre-selected text and instant copy.
|
|
78
|
+
- **Single-Instance Win32 Mutex:** Named mutex (`Local\Kural_SingleInstance`) preventing duplicate instances and offering graceful takeover.
|
|
79
|
+
- **Windows Autostart:** Optional startup on user login via Windows registry Run key with windowless `pythonw.exe` execution.
|
|
80
|
+
|
|
81
|
+
#### Privacy & Data Recovery
|
|
82
|
+
- **100% Air-Gapped Local Operation:** No telemetry, analytics, or cloud connections; the only network request is the initial one-time model download.
|
|
83
|
+
- **Incognito Mode:** One-click tray toggle that disables `history.jsonl` writes, adaptive vocabulary learning, DPAPI audio retention, and in-memory ledger storage; entering Incognito immediately purges prior takes.
|
|
84
|
+
- **Encrypted Audio Recovery (`LastTake`):** DPAPI-encrypted single-take raw audio recording on disk with 24-hour expiry and corruption resilience.
|
|
85
|
+
- **In-Memory Ledger:** Ephemeral memory store of the last dictation enabling *"paste last dictation"* across windows.
|
|
86
|
+
- **Redacted Diagnostic Bundler:** `kural --bundle-logs` creates a clean ZIP archive with automatic redaction of Windows usernames, paths, and sensitive secrets.
|
|
87
|
+
|
|
88
|
+
#### Offline File Transcription & Local API
|
|
89
|
+
- **CLI File Transcription:** `kural --transcribe <file> [--format {text,srt,json}] [--output <file>]` for offline audio file transcription. Supports WAV (8/16/24/32-bit PCM) and non-WAV formats via `soundfile`.
|
|
90
|
+
- **Local OpenAI-Compatible Server:** `kural --serve [--host 127.0.0.1] [--port 7777]` providing `GET /health`, `GET /v1/models`, and `POST /v1/audio/transcriptions` endpoints with multipart upload support, `response_format` validation (`json`, `text`), and `language=auto` detection.
|
|
91
|
+
|
|
92
|
+
#### Tooling & Distribution
|
|
93
|
+
- **Complete Offline Test Suite:** 579 unit tests running completely offline without GPU, microphone, model download, or network.
|
|
94
|
+
- **GitHub Actions CI Pipeline (`ci.yml`):** Automated PR and push validation running `ruff check`, `ruff format --check`, offline `pytest`, `twine check --strict`, Python package builds, and standalone desktop bundle verification.
|
|
95
|
+
- **GitHub Actions Release Pipeline (`release.yml`):** Automated release workflow triggered on version tags (`v*.*.*`) or manual dispatch, generating `kural-windows-x64-setup.exe`, `kural-windows-x64.zip`, Python wheels, source distributions, and cryptographic `SHA256SUMS`.
|
|
96
|
+
- **Windows Setup Installer (`kural.iss`):** Inno Setup 6 per-user lowest-privilege Windows installer.
|
|
97
|
+
- **Standalone Portable Bundle:** PyInstaller distribution (`dist\kural\kural.exe`) requiring no Python installation.
|
cmd_kural-0.1.2/LICENSE
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2024 Mohamed Aashir S
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
This project incorporates code from the following MIT-licensed sources:
|
|
26
|
+
|
|
27
|
+
drajb/whisper-local (fork of Pin Wang's whisper-key-local)
|
|
28
|
+
Copyright (c) Pin Wang
|
|
29
|
+
Copyright (c) drajb contributors
|
|
30
|
+
MIT License — see THIRD_PARTY_NOTICES.md
|
|
31
|
+
|
|
32
|
+
ROHITCRAFTSYT/WhispLocal
|
|
33
|
+
Copyright (c) Rohit Burani / ROHITCRAFTSYT
|
|
34
|
+
MIT License — see THIRD_PARTY_NOTICES.md
|