vakforge 0.0.1__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.
- vakforge-0.0.1/.gitattributes +1 -0
- vakforge-0.0.1/.gitignore +38 -0
- vakforge-0.0.1/CLAUDE.md +55 -0
- vakforge-0.0.1/CONTRIBUTING.md +55 -0
- vakforge-0.0.1/LICENSE +202 -0
- vakforge-0.0.1/Makefile +13 -0
- vakforge-0.0.1/PKG-INFO +145 -0
- vakforge-0.0.1/README.md +112 -0
- vakforge-0.0.1/docs/ARCHITECTURE.md +196 -0
- vakforge-0.0.1/docs/DATA_ETHICS.md +53 -0
- vakforge-0.0.1/docs/DATA_FORMAT.md +137 -0
- vakforge-0.0.1/docs/DECISION_GUIDE.md +53 -0
- vakforge-0.0.1/docs/EVALUATION.md +83 -0
- vakforge-0.0.1/docs/LOCALE_PACKS.md +92 -0
- vakforge-0.0.1/docs/RECIPES.md +120 -0
- vakforge-0.0.1/docs/ROADMAP.md +71 -0
- vakforge-0.0.1/pyproject.toml +78 -0
- vakforge-0.0.1/tests/__init__.py +0 -0
- vakforge-0.0.1/tests/conftest.py +104 -0
- vakforge-0.0.1/tests/unit/__init__.py +0 -0
- vakforge-0.0.1/tests/unit/test_cli.py +46 -0
- vakforge-0.0.1/tests/unit/test_locales.py +20 -0
- vakforge-0.0.1/tests/unit/test_schema.py +61 -0
- vakforge-0.0.1/tests/unit/test_validate.py +82 -0
- vakforge-0.0.1/uv.lock +869 -0
- vakforge-0.0.1/vakforge/__init__.py +3 -0
- vakforge-0.0.1/vakforge/cli.py +124 -0
- vakforge-0.0.1/vakforge/config.py +28 -0
- vakforge-0.0.1/vakforge/locales/__init__.py +6 -0
- vakforge-0.0.1/vakforge/locales/base.py +56 -0
- vakforge-0.0.1/vakforge/locales/en.py +36 -0
- vakforge-0.0.1/vakforge/schema.py +189 -0
- vakforge-0.0.1/vakforge/validate.py +226 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
* text=auto eol=lf
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# original high-res brand images (23 MB); optimized copies live in site/assets/
|
|
2
|
+
assets-src/
|
|
3
|
+
|
|
4
|
+
# python
|
|
5
|
+
__pycache__/
|
|
6
|
+
*.py[cod]
|
|
7
|
+
.venv/
|
|
8
|
+
*.egg-info/
|
|
9
|
+
dist/
|
|
10
|
+
build/
|
|
11
|
+
.pytest_cache/
|
|
12
|
+
.ruff_cache/
|
|
13
|
+
.mypy_cache/
|
|
14
|
+
|
|
15
|
+
# project data and runs
|
|
16
|
+
data/raw/
|
|
17
|
+
runs/
|
|
18
|
+
checkpoints/
|
|
19
|
+
wandb/
|
|
20
|
+
*.wav
|
|
21
|
+
*.mp3
|
|
22
|
+
*.flac
|
|
23
|
+
*.ogg
|
|
24
|
+
*.safetensors
|
|
25
|
+
*.bin
|
|
26
|
+
*.pt
|
|
27
|
+
*.gguf
|
|
28
|
+
|
|
29
|
+
# env / editor / os
|
|
30
|
+
.env
|
|
31
|
+
.env.*
|
|
32
|
+
.vscode/
|
|
33
|
+
.idea/
|
|
34
|
+
.DS_Store
|
|
35
|
+
Thumbs.db
|
|
36
|
+
|
|
37
|
+
# local layout probes
|
|
38
|
+
site/_*.html
|
vakforge-0.0.1/CLAUDE.md
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
# CLAUDE.md — vakforge
|
|
2
|
+
|
|
3
|
+
Claude Code reads this file automatically at the start of every session in this repo. Keep it short and current. (Reference: https://docs.claude.com/en/docs/claude-code/overview)
|
|
4
|
+
|
|
5
|
+
## What this repo is
|
|
6
|
+
|
|
7
|
+
`vakforge` — turns the data a company already has (documents, database tables, chat logs, CRM records, recorded calls) into a self-hosted, evaluated, real-time voice assistant served from open models on the user's hardware, behind standard protocols (OpenAI Realtime WebSocket format first; WebRTC and SIP next). "Realtime compatible" means the wire format only; nothing calls a hosted API. Any language via locale packs; launch locales English (en-US/en-GB/en-IN) and Hinglish (hi-Latn-IN). Ships as: zero-ML-dep core library + CLI, an agent skill under `skill/`, a landing page under `site/`, and GPU recipes as optional extras. Full spec lives in `docs/`.
|
|
8
|
+
|
|
9
|
+
## Read first, every session
|
|
10
|
+
|
|
11
|
+
1. `docs/ROADMAP.md` — current phase and what is done/stubbed.
|
|
12
|
+
2. `docs/ARCHITECTURE.md` — package layout and boundaries.
|
|
13
|
+
3. `docs/DATA_FORMAT.md` — canonical schema; all recipes go through it.
|
|
14
|
+
4. `docs/LOCALE_PACKS.md` — anything language/market-specific lives in a pack, never in core.
|
|
15
|
+
5. The recipe you are touching in `docs/RECIPES.md`.
|
|
16
|
+
|
|
17
|
+
## Hard rules
|
|
18
|
+
|
|
19
|
+
- Verify every upstream API against installed source (`python -c "import x; print(x.__file__)"` then read it) or the pinned GitHub commit. Never guess signatures. Unverifiable → `# TODO(verify)` + skipped test, then tell the user.
|
|
20
|
+
- `pytest` passes on CPU with no downloads. GPU/model tests are marked `@pytest.mark.gpu` / `@pytest.mark.model` and excluded by default.
|
|
21
|
+
- Ask before: downloading models > 500 MB, GPU jobs > a few minutes, any paid API call.
|
|
22
|
+
- Recipes are optional extras with lazy imports. Core (`schema`, `inspect`, `validate`, `recommend`, `locales`) must import with zero ML deps.
|
|
23
|
+
- No `if lang == "..."` in core. Currency, dates, phone/ID formats, scripts, names, privacy notes, preferred models → the locale pack.
|
|
24
|
+
- PII redaction and consent metadata are mandatory steps in `prepare`; never add a flag that silently skips them without logging a warning.
|
|
25
|
+
- Update `docs/ROADMAP.md` checkboxes in the same commit as the feature.
|
|
26
|
+
|
|
27
|
+
## Commands
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
uv sync --group dev # core + pytest/ruff
|
|
31
|
+
uv sync --extra lfm25 # recipe A deps
|
|
32
|
+
uv sync --extra moshi # recipe B deps
|
|
33
|
+
uv sync --extra qwen # recipe D deps
|
|
34
|
+
uv sync --extra cascade # recipe C deps
|
|
35
|
+
uv run pytest # CPU tests (32 in Phase 0)
|
|
36
|
+
uv run pytest -m gpu # GPU tests (opt-in)
|
|
37
|
+
uv run ruff check . && uv run ruff format .
|
|
38
|
+
uv run vakforge --help
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
## Conventions
|
|
42
|
+
|
|
43
|
+
- Python 3.11+, `typer` CLI, `pydantic` v2, `rich` output, `soundfile`/`torchaudio` for audio, `jiwer` for WER.
|
|
44
|
+
- Audio internal standard: 24 kHz, float32, mono per stream; stereo files = channel 0 user, channel 1 agent.
|
|
45
|
+
- Language tags: BCP-47 (`en-US`, `en-GB`, `en-IN`, `hi`, `hi-Latn` for Roman Hindi, `zh-CN`). Locale pack ids add region (`hi-Latn-IN`). Code-switched turns carry `lang` = primary + `lang_mix` list.
|
|
46
|
+
- Config files are YAML validated by pydantic; CLI flags override config.
|
|
47
|
+
- Conventional commits. One logical change per commit.
|
|
48
|
+
- Docstrings on public functions; type hints everywhere; no bare `except`.
|
|
49
|
+
|
|
50
|
+
## Things that have bitten us (append as you learn)
|
|
51
|
+
|
|
52
|
+
- Model libraries pin conflicting `torch`/`transformers` versions → that is why recipes are isolated extras.
|
|
53
|
+
- pyannote diarization weights are gated on Hugging Face; document the acceptance step, never bundle weights.
|
|
54
|
+
- Whisper family mislabels Roman Hindi as English or Hindi inconsistently → run the locale pack's `detect_lang` after transcription. Expect the same for any code-switched locale.
|
|
55
|
+
- Thinker-only Qwen-Omni checkpoints from some frameworks can't be loaded by the full model without re-keying → adapter must merge Talker/code2wav from the vanilla checkpoint and test the round trip.
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
# Contributing to vakforge
|
|
2
|
+
|
|
3
|
+
## Ground rules
|
|
4
|
+
|
|
5
|
+
- We ship recipes we have actually run. A PR adding a model that "should work" is not mergeable; a PR adding a model with a committed `report.json` on the demo dataset is.
|
|
6
|
+
- Core stays dependency-light. If your change makes `import vakforge.schema` pull in torch, it will be rejected.
|
|
7
|
+
- Language- or market-specific logic goes in a locale pack (`docs/LOCALE_PACKS.md`). A PR that adds `if lang == "..."` to core will be asked to move it.
|
|
8
|
+
- Upstream APIs are verified against source, and the version is pinned. Say where you verified it in the PR description.
|
|
9
|
+
- Data safety code paths (redaction, consent) cannot be bypassed silently. Any new flag that weakens them must log a warning.
|
|
10
|
+
|
|
11
|
+
## Setup
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
git clone <repo> && cd vakforge
|
|
15
|
+
uv sync --extra dev
|
|
16
|
+
uv run pytest # must pass on CPU with no downloads
|
|
17
|
+
uv run ruff check . && uv run ruff format --check .
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
Recipe work:
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
uv sync --extra dev --extra lfm25 # or --extra moshi / --extra qwen / --extra cascade
|
|
24
|
+
uv run pytest -m model # opt-in, downloads models
|
|
25
|
+
uv run pytest -m gpu # opt-in, needs CUDA
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
## Branches and commits
|
|
29
|
+
|
|
30
|
+
- Branch from `main`: `feat/<area>-<short>`, `fix/…`, `docs/…`.
|
|
31
|
+
- Conventional commits: `feat(prepare): roman-hindi language tagging`.
|
|
32
|
+
- One logical change per PR. Large recipes land as a sequence: adapter → train wrapper → eval → serve.
|
|
33
|
+
|
|
34
|
+
## Pull request checklist
|
|
35
|
+
|
|
36
|
+
- [ ] Tests added/updated; CPU suite green
|
|
37
|
+
- [ ] `ruff` clean
|
|
38
|
+
- [ ] Docs updated (`docs/*.md`, `README.md` recipe table if applicable)
|
|
39
|
+
- [ ] `docs/ROADMAP.md` checkbox ticked
|
|
40
|
+
- [ ] For upstream integrations: version pinned, verification noted, `UPSTREAM_NOTES.md` updated
|
|
41
|
+
- [ ] For recipes: `LICENSE_NOTES.md` present; per-locale support declared in launch packs
|
|
42
|
+
- [ ] For locale packs: golden tests for normalizer, `detect_lang`, and every PII pattern; `privacy_notes` sourced
|
|
43
|
+
- [ ] No audio binaries, checkpoints, or real customer data in the diff
|
|
44
|
+
|
|
45
|
+
## Reporting model or data issues
|
|
46
|
+
|
|
47
|
+
Open an issue with: recipe, config hash, manifest hash, `versions.txt`, and the relevant slice of `report.json`. Do not attach real customer audio to issues.
|
|
48
|
+
|
|
49
|
+
## Code style
|
|
50
|
+
|
|
51
|
+
Python 3.11+, type hints, docstrings on public functions, `pydantic` for anything that crosses a boundary, `rich` for user-facing output, no print debugging left behind.
|
|
52
|
+
|
|
53
|
+
## Licence
|
|
54
|
+
|
|
55
|
+
By contributing you agree your code is released under Apache-2.0. Model weights and datasets keep their own licences.
|
vakforge-0.0.1/LICENSE
ADDED
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
|
|
2
|
+
Apache License
|
|
3
|
+
Version 2.0, January 2004
|
|
4
|
+
http://www.apache.org/licenses/
|
|
5
|
+
|
|
6
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
7
|
+
|
|
8
|
+
1. Definitions.
|
|
9
|
+
|
|
10
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
11
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
12
|
+
|
|
13
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
14
|
+
the copyright owner that is granting the License.
|
|
15
|
+
|
|
16
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
17
|
+
other entities that control, are controlled by, or are under common
|
|
18
|
+
control with that entity. For the purposes of this definition,
|
|
19
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
20
|
+
direction or management of such entity, whether by contract or
|
|
21
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
22
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
23
|
+
|
|
24
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
25
|
+
exercising permissions granted by this License.
|
|
26
|
+
|
|
27
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
28
|
+
including but not limited to software source code, documentation
|
|
29
|
+
source, and configuration files.
|
|
30
|
+
|
|
31
|
+
"Object" form shall mean any form resulting from mechanical
|
|
32
|
+
transformation or translation of a Source form, including but
|
|
33
|
+
not limited to compiled object code, generated documentation,
|
|
34
|
+
and conversions to other media types.
|
|
35
|
+
|
|
36
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
37
|
+
Object form, made available under the License, as indicated by a
|
|
38
|
+
copyright notice that is included in or attached to the work
|
|
39
|
+
(an example is provided in the Appendix below).
|
|
40
|
+
|
|
41
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
42
|
+
form, that is based on (or derived from) the Work and for which the
|
|
43
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
44
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
45
|
+
of this License, Derivative Works shall not include works that remain
|
|
46
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
47
|
+
the Work and Derivative Works thereof.
|
|
48
|
+
|
|
49
|
+
"Contribution" shall mean any work of authorship, including
|
|
50
|
+
the original version of the Work and any modifications or additions
|
|
51
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
52
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
53
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
54
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
55
|
+
means any form of electronic, verbal, or written communication sent
|
|
56
|
+
to the Licensor or its representatives, including but not limited to
|
|
57
|
+
communication on electronic mailing lists, source code control systems,
|
|
58
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
59
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
60
|
+
excluding communication that is conspicuously marked or otherwise
|
|
61
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
62
|
+
|
|
63
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
64
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
65
|
+
subsequently incorporated within the Work.
|
|
66
|
+
|
|
67
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
68
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
69
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
70
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
71
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
72
|
+
Work and such Derivative Works in Source or Object form.
|
|
73
|
+
|
|
74
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
75
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
76
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
77
|
+
(except as stated in this section) patent license to make, have made,
|
|
78
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
79
|
+
where such license applies only to those patent claims licensable
|
|
80
|
+
by such Contributor that are necessarily infringed by their
|
|
81
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
82
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
83
|
+
institute patent litigation against any entity (including a
|
|
84
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
85
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
86
|
+
or contributory patent infringement, then any patent licenses
|
|
87
|
+
granted to You under this License for that Work shall terminate
|
|
88
|
+
as of the date such litigation is filed.
|
|
89
|
+
|
|
90
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
91
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
92
|
+
modifications, and in Source or Object form, provided that You
|
|
93
|
+
meet the following conditions:
|
|
94
|
+
|
|
95
|
+
(a) You must give any other recipients of the Work or
|
|
96
|
+
Derivative Works a copy of this License; and
|
|
97
|
+
|
|
98
|
+
(b) You must cause any modified files to carry prominent notices
|
|
99
|
+
stating that You changed the files; and
|
|
100
|
+
|
|
101
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
102
|
+
that You distribute, all copyright, patent, trademark, and
|
|
103
|
+
attribution notices from the Source form of the Work,
|
|
104
|
+
excluding those notices that do not pertain to any part of
|
|
105
|
+
the Derivative Works; and
|
|
106
|
+
|
|
107
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
108
|
+
distribution, then any Derivative Works that You distribute must
|
|
109
|
+
include a readable copy of the attribution notices contained
|
|
110
|
+
within such NOTICE file, excluding those notices that do not
|
|
111
|
+
pertain to any part of the Derivative Works, in at least one
|
|
112
|
+
of the following places: within a NOTICE text file distributed
|
|
113
|
+
as part of the Derivative Works; within the Source form or
|
|
114
|
+
documentation, if provided along with the Derivative Works; or,
|
|
115
|
+
within a display generated by the Derivative Works, if and
|
|
116
|
+
wherever such third-party notices normally appear. The contents
|
|
117
|
+
of the NOTICE file are for informational purposes only and
|
|
118
|
+
do not modify the License. You may add Your own attribution
|
|
119
|
+
notices within Derivative Works that You distribute, alongside
|
|
120
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
121
|
+
that such additional attribution notices cannot be construed
|
|
122
|
+
as modifying the License.
|
|
123
|
+
|
|
124
|
+
You may add Your own copyright statement to Your modifications and
|
|
125
|
+
may provide additional or different license terms and conditions
|
|
126
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
127
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
128
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
129
|
+
the conditions stated in this License.
|
|
130
|
+
|
|
131
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
132
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
133
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
134
|
+
this License, without any additional terms or conditions.
|
|
135
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
136
|
+
the terms of any separate license agreement you may have executed
|
|
137
|
+
with Licensor regarding such Contributions.
|
|
138
|
+
|
|
139
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
140
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
141
|
+
except as required for reasonable and customary use in describing the
|
|
142
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
143
|
+
|
|
144
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
145
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
146
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
147
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
148
|
+
implied, including, without limitation, any warranties or conditions
|
|
149
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
150
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
151
|
+
appropriateness of using or redistributing the Work and assume any
|
|
152
|
+
risks associated with Your exercise of permissions under this License.
|
|
153
|
+
|
|
154
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
155
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
156
|
+
unless required by applicable law (such as deliberate and grossly
|
|
157
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
158
|
+
liable to You for damages, including any direct, indirect, special,
|
|
159
|
+
incidental, or consequential damages of any character arising as a
|
|
160
|
+
result of this License or out of the use or inability to use the
|
|
161
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
162
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
163
|
+
other commercial damages or losses), even if such Contributor
|
|
164
|
+
has been advised of the possibility of such damages.
|
|
165
|
+
|
|
166
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
167
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
168
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
169
|
+
or other liability obligations and/or rights consistent with this
|
|
170
|
+
License. However, in accepting such obligations, You may act only
|
|
171
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
172
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
173
|
+
defend, and hold each Contributor harmless for any liability
|
|
174
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
175
|
+
of your accepting any such warranty or additional liability.
|
|
176
|
+
|
|
177
|
+
END OF TERMS AND CONDITIONS
|
|
178
|
+
|
|
179
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
180
|
+
|
|
181
|
+
To apply the Apache License to your work, attach the following
|
|
182
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
183
|
+
replaced with your own identifying information. (Don't include
|
|
184
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
185
|
+
comment syntax for the file format. We also recommend that a
|
|
186
|
+
file or class name and description of purpose be included on the
|
|
187
|
+
same "printed page" as the copyright notice for easier
|
|
188
|
+
identification within third-party archives.
|
|
189
|
+
|
|
190
|
+
Copyright [yyyy] [name of copyright owner]
|
|
191
|
+
|
|
192
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
193
|
+
you may not use this file except in compliance with the License.
|
|
194
|
+
You may obtain a copy of the License at
|
|
195
|
+
|
|
196
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
197
|
+
|
|
198
|
+
Unless required by applicable law or agreed to in writing, software
|
|
199
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
200
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
201
|
+
See the License for the specific language governing permissions and
|
|
202
|
+
limitations under the License.
|
vakforge-0.0.1/Makefile
ADDED
vakforge-0.0.1/PKG-INFO
ADDED
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
|
+
Name: vakforge
|
|
3
|
+
Version: 0.0.1
|
|
4
|
+
Summary: Turn the data your company already has into a self-hosted, real-time voice assistant.
|
|
5
|
+
Project-URL: Homepage, https://github.com/vakforge-ai/vakforge
|
|
6
|
+
Project-URL: Repository, https://github.com/vakforge-ai/vakforge
|
|
7
|
+
Author-email: vakforge <vakforge.ai@gmail.com>
|
|
8
|
+
License-Expression: Apache-2.0
|
|
9
|
+
License-File: LICENSE
|
|
10
|
+
Keywords: fine-tuning,locale,realtime,speech-to-speech,voice-agent
|
|
11
|
+
Classifier: Development Status :: 2 - Pre-Alpha
|
|
12
|
+
Classifier: Intended Audience :: Developers
|
|
13
|
+
Classifier: Programming Language :: Python :: 3
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
16
|
+
Classifier: Topic :: Multimedia :: Sound/Audio :: Speech
|
|
17
|
+
Requires-Python: >=3.11
|
|
18
|
+
Requires-Dist: jsonschema>=4.21
|
|
19
|
+
Requires-Dist: numpy>=1.26
|
|
20
|
+
Requires-Dist: pydantic>=2.7
|
|
21
|
+
Requires-Dist: pyyaml>=6
|
|
22
|
+
Requires-Dist: rich>=13
|
|
23
|
+
Requires-Dist: soundfile>=0.12
|
|
24
|
+
Requires-Dist: typer>=0.12
|
|
25
|
+
Provides-Extra: cascade
|
|
26
|
+
Provides-Extra: dev
|
|
27
|
+
Requires-Dist: pytest>=8; extra == 'dev'
|
|
28
|
+
Requires-Dist: ruff>=0.5; extra == 'dev'
|
|
29
|
+
Provides-Extra: lfm25
|
|
30
|
+
Provides-Extra: moshi
|
|
31
|
+
Provides-Extra: qwen
|
|
32
|
+
Description-Content-Type: text/markdown
|
|
33
|
+
|
|
34
|
+
<p align="center">
|
|
35
|
+
<img src="https://raw.githubusercontent.com/vakforge-ai/vakforge/main/site/assets/social/readme-banner.webp" alt="vakforge: your data, your voice assistant, your hardware" width="100%">
|
|
36
|
+
</p>
|
|
37
|
+
|
|
38
|
+
# vakforge
|
|
39
|
+
|
|
40
|
+
**Turn the data your company already has into a self-hosted, real-time voice assistant.**
|
|
41
|
+
|
|
42
|
+
Documents, FAQs, database tables, chat logs, CRM records, recorded calls: vakforge works out what your assistant actually needs (knowledge, behaviour, tools, voice, language), generates the conversational data you lack, trains only what needs training, proves the result beats the base model on your own held-out data, and serves it on your hardware behind protocols your clients already speak, starting with the OpenAI Realtime WebSocket format. Open models only, nothing calls a hosted API, any language through locale packs. Launch locales: English (US, UK, India) and Hinglish.
|
|
43
|
+
|
|
44
|
+
> Status: pre-alpha. See [`docs/ROADMAP.md`](docs/ROADMAP.md) for what exists today.
|
|
45
|
+
|
|
46
|
+
## The problem
|
|
47
|
+
|
|
48
|
+
Open speech-to-speech models exist (Moshi, PersonaPlex, LFM2.5-Audio, Qwen-Omni). Fine-tuning scripts exist for some of them. Evaluation tools exist. Serving frameworks exist. What does not exist is one path from *"here is what my company knows"* to *"here is a voice assistant that handles my workflow, I can prove it is better than the base model, and my existing voice client can talk to it without a rewrite."* Every team rebuilds that path badly, and most of them fine-tune when they should have used retrieval.
|
|
49
|
+
|
|
50
|
+
## What ships
|
|
51
|
+
|
|
52
|
+
vakforge is three things in one repo:
|
|
53
|
+
|
|
54
|
+
1. **A core library and CLI** (`pip install vakforge`). Zero ML dependencies. Canonical dataset schema, validator, data inspector, decision engine, locale packs. Runs on a laptop.
|
|
55
|
+
2. **An agent skill** (`skill/`). Drop it into Claude Code or any coding agent. The agent reads your data, runs the decision guide, writes the recipe-specific glue for your project, and verifies every upstream API against source before using it. The knowledge lives here; the glue code is generated per project.
|
|
56
|
+
3. **Recipes** (`docs/RECIPES.md`). Tested paths from base model to served assistant. Each is an optional extra, isolated because model libraries conflict. Only recipes run end to end get listed.
|
|
57
|
+
|
|
58
|
+
```
|
|
59
|
+
vakforge inspect ./data -> what is actually in your documents, tables, chats, audio
|
|
60
|
+
vakforge recommend -> what needs customizing (often: retrieval, not the model)
|
|
61
|
+
vakforge prepare -> ingest, transcribe, redact PII, canonical dataset
|
|
62
|
+
vakforge synth -> synthetic dialogues in your locale over your tools and facts
|
|
63
|
+
vakforge train --recipe X -> one tested recipe, not a menu of 400 models
|
|
64
|
+
vakforge eval -> base vs tuned: WER, entities, tool calls, latency, voice
|
|
65
|
+
vakforge serve -> your open model behind the Realtime protocol; WebRTC and SIP next
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
## Bring any data
|
|
69
|
+
|
|
70
|
+
| You have | vakforge does |
|
|
71
|
+
|---|---|
|
|
72
|
+
| Documents, FAQs, SOPs, knowledge base | Retrieval at inference. Facts stay out of weights. Synthetic dialogues grounded in them. |
|
|
73
|
+
| Database tables, CRM, product catalogue | Tool definitions over your data, synthetic dialogues that exercise every tool, behaviour fine-tune for reliable tool use. |
|
|
74
|
+
| Chat logs, transcripts | Behaviour and workflow fine-tune of the language component; rendered to audio via `synth`. |
|
|
75
|
+
| Recorded calls (mono or stereo) | Transcribe, diarize, redact, then everything above plus voice, timing and full-duplex recipes. |
|
|
76
|
+
| Nothing yet | Scenario templates in your locale, rendered with open TTS, so you can ship a v0 and collect real data. |
|
|
77
|
+
|
|
78
|
+
## Locale packs
|
|
79
|
+
|
|
80
|
+
The pipeline is language-agnostic. Everything language- or market-specific lives in a locale pack: number/currency/date/address formats, PII patterns, privacy-law notes, name generators for synthetic data, preferred models, and a benchmark. See [`docs/LOCALE_PACKS.md`](docs/LOCALE_PACKS.md).
|
|
81
|
+
|
|
82
|
+
| Pack | Covers | Speech output today | Status |
|
|
83
|
+
|---|---|---|---|
|
|
84
|
+
| `en` | en-US, en-GB, en-IN | native (all recipes) | launch |
|
|
85
|
+
| `hi-Latn` | Hinglish / Roman Hindi, Hindi-English code-switching | English output; Hindi via cascade | launch, the hard-case showcase |
|
|
86
|
+
| `zh-CN` | Mandarin | via `qwen-omni` | planned |
|
|
87
|
+
| `es`, `de`, `fr`, `pt-BR`, `ja`, `ar` | | via `qwen-omni` or cascade | planned, contributions welcome |
|
|
88
|
+
|
|
89
|
+
## Recipes
|
|
90
|
+
|
|
91
|
+
| Recipe | Base model | Good for | Duplex | Hardware (train) | Status |
|
|
92
|
+
|---|---|---|---|---|---|
|
|
93
|
+
| `lfm25-audio` | LiquidAI LFM2.5-Audio-1.5B | workflow, tool use, style, CPU deploy | turn-based | 1x 24 GB GPU | planned (first) |
|
|
94
|
+
| `moshi-lora` | Kyutai Moshi / NVIDIA PersonaPlex | interruptions, natural timing, persona | full-duplex | 1x 40-80 GB GPU | planned |
|
|
95
|
+
| `qwen-omni` | Qwen3-Omni | multilingual incl. Mandarin, function calling | near-duplex | 80 GB / multi-GPU | planned |
|
|
96
|
+
| `cascade` | STT + LLM LoRA + TTS chosen by locale | any language with a good STT+TTS pair | turn-based | 1x 24 GB GPU | planned |
|
|
97
|
+
|
|
98
|
+
Details in [`docs/RECIPES.md`](docs/RECIPES.md).
|
|
99
|
+
|
|
100
|
+
## Serving: open models, standard protocols
|
|
101
|
+
|
|
102
|
+
"OpenAI Realtime compatible" describes the wire format, not the model. Every recipe serves an open model on your hardware; nothing calls OpenAI or any hosted API. We speak the Realtime WebSocket format first because it is the closest thing voice agents have to a common protocol: teams already on GPT Realtime change one URL, and Pipecat, LiveKit and Twilio integrations work unchanged. Open speech-to-speech models each ship their own ad-hoc protocol, so copying a widely used shape beats inventing another.
|
|
103
|
+
|
|
104
|
+
The server separates the model backend from the protocol, so more front ends plug in without touching recipes:
|
|
105
|
+
|
|
106
|
+
| Protocol | For | Status |
|
|
107
|
+
|---|---|---|
|
|
108
|
+
| OpenAI Realtime WebSocket (documented subset) | teams migrating off GPT Realtime; Pipecat, LiveKit, Twilio clients | first |
|
|
109
|
+
| WebRTC via LiveKit or Pipecat transports | browser and mobile apps, lowest latency | next |
|
|
110
|
+
| SIP / telephony | call centres and phone lines | next |
|
|
111
|
+
| Plain HTTP, one turn per request | batch jobs, simple integrations | planned |
|
|
112
|
+
| Gemini Live API format | teams on Google's stack | on request |
|
|
113
|
+
|
|
114
|
+
## Why launch with English and Hinglish
|
|
115
|
+
|
|
116
|
+
English is where the strongest open speech-to-speech models are, so every recipe works out of the box for US, UK and Indian English. Hinglish is the stress test: code-switching, Roman vs Devanagari script, Indian names and rupee amounts, noisy phone lines. If the pipeline handles that, a new locale pack is mostly formats and models, not new architecture.
|
|
117
|
+
|
|
118
|
+
## Quick start (target UX, not all steps implemented yet)
|
|
119
|
+
|
|
120
|
+
```bash
|
|
121
|
+
uv sync
|
|
122
|
+
uv run vakforge init my-assistant --locale en-US && cd my-assistant
|
|
123
|
+
uv run vakforge inspect ./data
|
|
124
|
+
uv run vakforge recommend
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
## Documentation
|
|
128
|
+
|
|
129
|
+
- [`docs/DECISION_GUIDE.md`](docs/DECISION_GUIDE.md): what actually needs customizing; when not to fine-tune
|
|
130
|
+
- [`docs/LOCALE_PACKS.md`](docs/LOCALE_PACKS.md): what a locale pack contains; how to add one
|
|
131
|
+
- [`docs/DATA_FORMAT.md`](docs/DATA_FORMAT.md): canonical dataset schema
|
|
132
|
+
- [`docs/ARCHITECTURE.md`](docs/ARCHITECTURE.md): package layout
|
|
133
|
+
- [`docs/RECIPES.md`](docs/RECIPES.md): per-model training recipes
|
|
134
|
+
- [`docs/EVALUATION.md`](docs/EVALUATION.md): metrics, report format, per-locale benchmarks
|
|
135
|
+
- [`docs/DATA_ETHICS.md`](docs/DATA_ETHICS.md): consent, PII, licences, privacy law by region
|
|
136
|
+
- [`docs/ROADMAP.md`](docs/ROADMAP.md): status
|
|
137
|
+
- [`CONTRIBUTING.md`](CONTRIBUTING.md)
|
|
138
|
+
|
|
139
|
+
## Related projects (we build on these, not against them)
|
|
140
|
+
|
|
141
|
+
Unsloth, LLaMA-Factory, ms-swift, kyutai-labs/moshi-finetune, NVIDIA PersonaPlex, liquid-audio, Qwen-Omni, Pipecat, LiveKit Agents, vLLM-omni, UltraEval-Audio, AI4Bharat, Common Voice
|
|
142
|
+
|
|
143
|
+
## Licence
|
|
144
|
+
|
|
145
|
+
Apache-2.0 for this code. Each recipe's base model has its own licence, see `docs/RECIPES.md`. Datasets you create with vakforge are yours; the consent metadata we require is there to keep it that way.
|
vakforge-0.0.1/README.md
ADDED
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
<p align="center">
|
|
2
|
+
<img src="https://raw.githubusercontent.com/vakforge-ai/vakforge/main/site/assets/social/readme-banner.webp" alt="vakforge: your data, your voice assistant, your hardware" width="100%">
|
|
3
|
+
</p>
|
|
4
|
+
|
|
5
|
+
# vakforge
|
|
6
|
+
|
|
7
|
+
**Turn the data your company already has into a self-hosted, real-time voice assistant.**
|
|
8
|
+
|
|
9
|
+
Documents, FAQs, database tables, chat logs, CRM records, recorded calls: vakforge works out what your assistant actually needs (knowledge, behaviour, tools, voice, language), generates the conversational data you lack, trains only what needs training, proves the result beats the base model on your own held-out data, and serves it on your hardware behind protocols your clients already speak, starting with the OpenAI Realtime WebSocket format. Open models only, nothing calls a hosted API, any language through locale packs. Launch locales: English (US, UK, India) and Hinglish.
|
|
10
|
+
|
|
11
|
+
> Status: pre-alpha. See [`docs/ROADMAP.md`](docs/ROADMAP.md) for what exists today.
|
|
12
|
+
|
|
13
|
+
## The problem
|
|
14
|
+
|
|
15
|
+
Open speech-to-speech models exist (Moshi, PersonaPlex, LFM2.5-Audio, Qwen-Omni). Fine-tuning scripts exist for some of them. Evaluation tools exist. Serving frameworks exist. What does not exist is one path from *"here is what my company knows"* to *"here is a voice assistant that handles my workflow, I can prove it is better than the base model, and my existing voice client can talk to it without a rewrite."* Every team rebuilds that path badly, and most of them fine-tune when they should have used retrieval.
|
|
16
|
+
|
|
17
|
+
## What ships
|
|
18
|
+
|
|
19
|
+
vakforge is three things in one repo:
|
|
20
|
+
|
|
21
|
+
1. **A core library and CLI** (`pip install vakforge`). Zero ML dependencies. Canonical dataset schema, validator, data inspector, decision engine, locale packs. Runs on a laptop.
|
|
22
|
+
2. **An agent skill** (`skill/`). Drop it into Claude Code or any coding agent. The agent reads your data, runs the decision guide, writes the recipe-specific glue for your project, and verifies every upstream API against source before using it. The knowledge lives here; the glue code is generated per project.
|
|
23
|
+
3. **Recipes** (`docs/RECIPES.md`). Tested paths from base model to served assistant. Each is an optional extra, isolated because model libraries conflict. Only recipes run end to end get listed.
|
|
24
|
+
|
|
25
|
+
```
|
|
26
|
+
vakforge inspect ./data -> what is actually in your documents, tables, chats, audio
|
|
27
|
+
vakforge recommend -> what needs customizing (often: retrieval, not the model)
|
|
28
|
+
vakforge prepare -> ingest, transcribe, redact PII, canonical dataset
|
|
29
|
+
vakforge synth -> synthetic dialogues in your locale over your tools and facts
|
|
30
|
+
vakforge train --recipe X -> one tested recipe, not a menu of 400 models
|
|
31
|
+
vakforge eval -> base vs tuned: WER, entities, tool calls, latency, voice
|
|
32
|
+
vakforge serve -> your open model behind the Realtime protocol; WebRTC and SIP next
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
## Bring any data
|
|
36
|
+
|
|
37
|
+
| You have | vakforge does |
|
|
38
|
+
|---|---|
|
|
39
|
+
| Documents, FAQs, SOPs, knowledge base | Retrieval at inference. Facts stay out of weights. Synthetic dialogues grounded in them. |
|
|
40
|
+
| Database tables, CRM, product catalogue | Tool definitions over your data, synthetic dialogues that exercise every tool, behaviour fine-tune for reliable tool use. |
|
|
41
|
+
| Chat logs, transcripts | Behaviour and workflow fine-tune of the language component; rendered to audio via `synth`. |
|
|
42
|
+
| Recorded calls (mono or stereo) | Transcribe, diarize, redact, then everything above plus voice, timing and full-duplex recipes. |
|
|
43
|
+
| Nothing yet | Scenario templates in your locale, rendered with open TTS, so you can ship a v0 and collect real data. |
|
|
44
|
+
|
|
45
|
+
## Locale packs
|
|
46
|
+
|
|
47
|
+
The pipeline is language-agnostic. Everything language- or market-specific lives in a locale pack: number/currency/date/address formats, PII patterns, privacy-law notes, name generators for synthetic data, preferred models, and a benchmark. See [`docs/LOCALE_PACKS.md`](docs/LOCALE_PACKS.md).
|
|
48
|
+
|
|
49
|
+
| Pack | Covers | Speech output today | Status |
|
|
50
|
+
|---|---|---|---|
|
|
51
|
+
| `en` | en-US, en-GB, en-IN | native (all recipes) | launch |
|
|
52
|
+
| `hi-Latn` | Hinglish / Roman Hindi, Hindi-English code-switching | English output; Hindi via cascade | launch, the hard-case showcase |
|
|
53
|
+
| `zh-CN` | Mandarin | via `qwen-omni` | planned |
|
|
54
|
+
| `es`, `de`, `fr`, `pt-BR`, `ja`, `ar` | | via `qwen-omni` or cascade | planned, contributions welcome |
|
|
55
|
+
|
|
56
|
+
## Recipes
|
|
57
|
+
|
|
58
|
+
| Recipe | Base model | Good for | Duplex | Hardware (train) | Status |
|
|
59
|
+
|---|---|---|---|---|---|
|
|
60
|
+
| `lfm25-audio` | LiquidAI LFM2.5-Audio-1.5B | workflow, tool use, style, CPU deploy | turn-based | 1x 24 GB GPU | planned (first) |
|
|
61
|
+
| `moshi-lora` | Kyutai Moshi / NVIDIA PersonaPlex | interruptions, natural timing, persona | full-duplex | 1x 40-80 GB GPU | planned |
|
|
62
|
+
| `qwen-omni` | Qwen3-Omni | multilingual incl. Mandarin, function calling | near-duplex | 80 GB / multi-GPU | planned |
|
|
63
|
+
| `cascade` | STT + LLM LoRA + TTS chosen by locale | any language with a good STT+TTS pair | turn-based | 1x 24 GB GPU | planned |
|
|
64
|
+
|
|
65
|
+
Details in [`docs/RECIPES.md`](docs/RECIPES.md).
|
|
66
|
+
|
|
67
|
+
## Serving: open models, standard protocols
|
|
68
|
+
|
|
69
|
+
"OpenAI Realtime compatible" describes the wire format, not the model. Every recipe serves an open model on your hardware; nothing calls OpenAI or any hosted API. We speak the Realtime WebSocket format first because it is the closest thing voice agents have to a common protocol: teams already on GPT Realtime change one URL, and Pipecat, LiveKit and Twilio integrations work unchanged. Open speech-to-speech models each ship their own ad-hoc protocol, so copying a widely used shape beats inventing another.
|
|
70
|
+
|
|
71
|
+
The server separates the model backend from the protocol, so more front ends plug in without touching recipes:
|
|
72
|
+
|
|
73
|
+
| Protocol | For | Status |
|
|
74
|
+
|---|---|---|
|
|
75
|
+
| OpenAI Realtime WebSocket (documented subset) | teams migrating off GPT Realtime; Pipecat, LiveKit, Twilio clients | first |
|
|
76
|
+
| WebRTC via LiveKit or Pipecat transports | browser and mobile apps, lowest latency | next |
|
|
77
|
+
| SIP / telephony | call centres and phone lines | next |
|
|
78
|
+
| Plain HTTP, one turn per request | batch jobs, simple integrations | planned |
|
|
79
|
+
| Gemini Live API format | teams on Google's stack | on request |
|
|
80
|
+
|
|
81
|
+
## Why launch with English and Hinglish
|
|
82
|
+
|
|
83
|
+
English is where the strongest open speech-to-speech models are, so every recipe works out of the box for US, UK and Indian English. Hinglish is the stress test: code-switching, Roman vs Devanagari script, Indian names and rupee amounts, noisy phone lines. If the pipeline handles that, a new locale pack is mostly formats and models, not new architecture.
|
|
84
|
+
|
|
85
|
+
## Quick start (target UX, not all steps implemented yet)
|
|
86
|
+
|
|
87
|
+
```bash
|
|
88
|
+
uv sync
|
|
89
|
+
uv run vakforge init my-assistant --locale en-US && cd my-assistant
|
|
90
|
+
uv run vakforge inspect ./data
|
|
91
|
+
uv run vakforge recommend
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
## Documentation
|
|
95
|
+
|
|
96
|
+
- [`docs/DECISION_GUIDE.md`](docs/DECISION_GUIDE.md): what actually needs customizing; when not to fine-tune
|
|
97
|
+
- [`docs/LOCALE_PACKS.md`](docs/LOCALE_PACKS.md): what a locale pack contains; how to add one
|
|
98
|
+
- [`docs/DATA_FORMAT.md`](docs/DATA_FORMAT.md): canonical dataset schema
|
|
99
|
+
- [`docs/ARCHITECTURE.md`](docs/ARCHITECTURE.md): package layout
|
|
100
|
+
- [`docs/RECIPES.md`](docs/RECIPES.md): per-model training recipes
|
|
101
|
+
- [`docs/EVALUATION.md`](docs/EVALUATION.md): metrics, report format, per-locale benchmarks
|
|
102
|
+
- [`docs/DATA_ETHICS.md`](docs/DATA_ETHICS.md): consent, PII, licences, privacy law by region
|
|
103
|
+
- [`docs/ROADMAP.md`](docs/ROADMAP.md): status
|
|
104
|
+
- [`CONTRIBUTING.md`](CONTRIBUTING.md)
|
|
105
|
+
|
|
106
|
+
## Related projects (we build on these, not against them)
|
|
107
|
+
|
|
108
|
+
Unsloth, LLaMA-Factory, ms-swift, kyutai-labs/moshi-finetune, NVIDIA PersonaPlex, liquid-audio, Qwen-Omni, Pipecat, LiveKit Agents, vLLM-omni, UltraEval-Audio, AI4Bharat, Common Voice
|
|
109
|
+
|
|
110
|
+
## Licence
|
|
111
|
+
|
|
112
|
+
Apache-2.0 for this code. Each recipe's base model has its own licence, see `docs/RECIPES.md`. Datasets you create with vakforge are yours; the consent metadata we require is there to keep it that way.
|