lingualdub 0.1.0__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.
- lingualdub-0.1.0/LICENSE +190 -0
- lingualdub-0.1.0/PKG-INFO +356 -0
- lingualdub-0.1.0/README.md +287 -0
- lingualdub-0.1.0/lingualdub/__init__.py +62 -0
- lingualdub-0.1.0/lingualdub/cli.py +373 -0
- lingualdub-0.1.0/lingualdub/components/__init__.py +11 -0
- lingualdub-0.1.0/lingualdub/components/adaptation/__init__.py +11 -0
- lingualdub-0.1.0/lingualdub/components/adaptation/base.py +34 -0
- lingualdub-0.1.0/lingualdub/components/alignment/__init__.py +19 -0
- lingualdub-0.1.0/lingualdub/components/alignment/base.py +40 -0
- lingualdub-0.1.0/lingualdub/components/alignment/duration.py +164 -0
- lingualdub-0.1.0/lingualdub/components/alignment/forced.py +144 -0
- lingualdub-0.1.0/lingualdub/components/asr/__init__.py +11 -0
- lingualdub-0.1.0/lingualdub/components/asr/base.py +40 -0
- lingualdub-0.1.0/lingualdub/components/asr/dummy.py +97 -0
- lingualdub-0.1.0/lingualdub/components/asr/runyankole.py +187 -0
- lingualdub-0.1.0/lingualdub/components/asr/sunbird.py +216 -0
- lingualdub-0.1.0/lingualdub/components/asr/whisper.py +159 -0
- lingualdub-0.1.0/lingualdub/components/av_sync/__init__.py +9 -0
- lingualdub-0.1.0/lingualdub/components/av_sync/dialogue_timing.py +306 -0
- lingualdub-0.1.0/lingualdub/components/av_sync/video_merger.py +376 -0
- lingualdub-0.1.0/lingualdub/components/code_switch/__init__.py +21 -0
- lingualdub-0.1.0/lingualdub/components/code_switch/base.py +45 -0
- lingualdub-0.1.0/lingualdub/components/code_switch/dummy.py +170 -0
- lingualdub-0.1.0/lingualdub/components/code_switch/heuristic.py +192 -0
- lingualdub-0.1.0/lingualdub/components/code_switch/lexicons.py +51 -0
- lingualdub-0.1.0/lingualdub/components/eval/__init__.py +11 -0
- lingualdub-0.1.0/lingualdub/components/eval/av_sync.py +344 -0
- lingualdub-0.1.0/lingualdub/components/eval/base.py +48 -0
- lingualdub-0.1.0/lingualdub/components/eval/metrics.py +472 -0
- lingualdub-0.1.0/lingualdub/components/eval/speaker_similarity.py +174 -0
- lingualdub-0.1.0/lingualdub/components/speaker/__init__.py +11 -0
- lingualdub-0.1.0/lingualdub/components/speaker/base.py +31 -0
- lingualdub-0.1.0/lingualdub/components/speaker/embedding.py +255 -0
- lingualdub-0.1.0/lingualdub/components/translation/__init__.py +11 -0
- lingualdub-0.1.0/lingualdub/components/translation/base.py +31 -0
- lingualdub-0.1.0/lingualdub/components/translation/dummy.py +103 -0
- lingualdub-0.1.0/lingualdub/components/translation/hf_translator.py +157 -0
- lingualdub-0.1.0/lingualdub/components/translation/sunbird.py +208 -0
- lingualdub-0.1.0/lingualdub/components/tts/__init__.py +11 -0
- lingualdub-0.1.0/lingualdub/components/tts/base.py +45 -0
- lingualdub-0.1.0/lingualdub/components/tts/dummy.py +179 -0
- lingualdub-0.1.0/lingualdub/components/tts/mms_tts.py +201 -0
- lingualdub-0.1.0/lingualdub/components/tts/shared.py +58 -0
- lingualdub-0.1.0/lingualdub/components/tts/voice_conditioned.py +385 -0
- lingualdub-0.1.0/lingualdub/core/__init__.py +29 -0
- lingualdub-0.1.0/lingualdub/core/component.py +124 -0
- lingualdub-0.1.0/lingualdub/core/language.py +86 -0
- lingualdub-0.1.0/lingualdub/core/pipeline.py +155 -0
- lingualdub-0.1.0/lingualdub/core/resource.py +111 -0
- lingualdub-0.1.0/lingualdub/core/result.py +123 -0
- lingualdub-0.1.0/lingualdub/core/segment.py +92 -0
- lingualdub-0.1.0/lingualdub/languages/__init__.py +14 -0
- lingualdub-0.1.0/lingualdub/languages/luganda.py +33 -0
- lingualdub-0.1.0/lingualdub/languages/nllb.py +21 -0
- lingualdub-0.1.0/lingualdub/languages/runyankole.py +87 -0
- lingualdub-0.1.0/lingualdub/lingualdub.manifest.json +370 -0
- lingualdub-0.1.0/lingualdub/pipeline/__init__.py +16 -0
- lingualdub-0.1.0/lingualdub/pipeline/config_loader.py +194 -0
- lingualdub-0.1.0/lingualdub/pipeline/executor.py +261 -0
- lingualdub-0.1.0/lingualdub/py.typed +0 -0
- lingualdub-0.1.0/lingualdub/registry/__init__.py +20 -0
- lingualdub-0.1.0/lingualdub/registry/manifest.py +238 -0
- lingualdub-0.1.0/lingualdub/registry/registry.py +152 -0
- lingualdub-0.1.0/lingualdub/resources/__init__.py +20 -0
- lingualdub-0.1.0/lingualdub/resources/eval_sets.py +470 -0
- lingualdub-0.1.0/lingualdub/utils/__init__.py +18 -0
- lingualdub-0.1.0/lingualdub/utils/comparison.py +150 -0
- lingualdub-0.1.0/lingualdub/utils/consent.py +81 -0
- lingualdub-0.1.0/lingualdub/utils/provenance.py +50 -0
- lingualdub-0.1.0/lingualdub/utils/resource_helpers.py +66 -0
- lingualdub-0.1.0/lingualdub/utils/resource_manager.py +173 -0
- lingualdub-0.1.0/lingualdub.egg-info/PKG-INFO +356 -0
- lingualdub-0.1.0/lingualdub.egg-info/SOURCES.txt +79 -0
- lingualdub-0.1.0/lingualdub.egg-info/dependency_links.txt +1 -0
- lingualdub-0.1.0/lingualdub.egg-info/entry_points.txt +2 -0
- lingualdub-0.1.0/lingualdub.egg-info/requires.txt +45 -0
- lingualdub-0.1.0/lingualdub.egg-info/top_level.txt +1 -0
- lingualdub-0.1.0/pyproject.toml +178 -0
- lingualdub-0.1.0/setup.cfg +4 -0
- lingualdub-0.1.0/tests/test_cli.py +97 -0
lingualdub-0.1.0/LICENSE
ADDED
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
+
the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
+
other entities that control, are controlled by, or are under common
|
|
17
|
+
control with that entity. For the purposes of this definition,
|
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
+
direction or management of such entity, whether by contract or
|
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
+
|
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
+
exercising permissions granted by this License.
|
|
25
|
+
|
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
+
including but not limited to software source code, documentation
|
|
28
|
+
source, and configuration files.
|
|
29
|
+
|
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
|
31
|
+
transformation or translation of a Source form, including but
|
|
32
|
+
not limited to compiled object code, generated documentation,
|
|
33
|
+
and conversions to other media types.
|
|
34
|
+
|
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
+
Object form, made available under the License, as indicated by a
|
|
37
|
+
copyright notice that is included in or attached to the work
|
|
38
|
+
(an example is provided in the Appendix below).
|
|
39
|
+
|
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
+
the Work and Derivative Works thereof.
|
|
47
|
+
|
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
|
49
|
+
the original version of the Work and any modifications or additions
|
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
+
|
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
+
subsequently incorporated within the Work.
|
|
65
|
+
|
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
|
72
|
+
|
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
+
where such license applies only to those patent claims licensable
|
|
79
|
+
by such Contributor that are necessarily infringed by their
|
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
+
institute patent litigation against any entity (including a
|
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
+
or contributory patent infringement, then any patent licenses
|
|
86
|
+
granted to You under this License for that Work shall terminate
|
|
87
|
+
as of the date such litigation is filed.
|
|
88
|
+
|
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
+
modifications, and in Source or Object form, provided that You
|
|
92
|
+
meet the following conditions:
|
|
93
|
+
|
|
94
|
+
(a) You must give any other recipients of the Work or
|
|
95
|
+
Derivative Works a copy of this License; and
|
|
96
|
+
|
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
|
98
|
+
stating that You changed the files; and
|
|
99
|
+
|
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
|
102
|
+
attribution notices from the Source form of the Work,
|
|
103
|
+
excluding those notices that do not pertain to any part of
|
|
104
|
+
the Derivative Works; and
|
|
105
|
+
|
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
|
108
|
+
include a readable copy of the attribution notices contained
|
|
109
|
+
within such NOTICE file, excluding those notices that do not
|
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
|
111
|
+
of the following places: within a NOTICE text file distributed
|
|
112
|
+
as part of the Derivative Works; within the Source form or
|
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
|
114
|
+
within a display generated by the Derivative Works, if and
|
|
115
|
+
wherever such third-party notices normally appear. The contents
|
|
116
|
+
of the NOTICE file are for informational purposes only and
|
|
117
|
+
do not modify the License. You may add Your own attribution
|
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
+
that such additional attribution notices cannot be construed
|
|
121
|
+
as modifying the License.
|
|
122
|
+
|
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
|
124
|
+
may provide additional or different license terms and conditions
|
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
+
the conditions stated in this License.
|
|
129
|
+
|
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
+
this License, without any additional terms or conditions.
|
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
+
the terms of any separate license agreement you may have executed
|
|
136
|
+
with Licensor regarding such Contributions.
|
|
137
|
+
|
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
+
except as required for reasonable and customary use in describing the
|
|
141
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
142
|
+
|
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
|
152
|
+
|
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
|
158
|
+
incidental, or consequential damages of any character arising as a
|
|
159
|
+
result of this License or out of the use or inability to use the
|
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
+
other commercial damages or losses), even if such Contributor
|
|
163
|
+
has been advised of the possibility of such damages.
|
|
164
|
+
|
|
165
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
+
or other liability obligations and/or rights consistent with this
|
|
169
|
+
License. However, in accepting such obligations, You may act only
|
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
+
of your accepting any such warranty or additional liability.
|
|
175
|
+
|
|
176
|
+
END OF TERMS AND CONDITIONS
|
|
177
|
+
|
|
178
|
+
Copyright 2026 LingualDub Authors
|
|
179
|
+
|
|
180
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
181
|
+
you may not use this file except in compliance with the License.
|
|
182
|
+
You may obtain a copy of the License at
|
|
183
|
+
|
|
184
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
185
|
+
|
|
186
|
+
Unless required by applicable law or agreed to in writing, software
|
|
187
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
188
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
189
|
+
See the License for the specific language governing permissions and
|
|
190
|
+
limitations under the License.
|
|
@@ -0,0 +1,356 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: lingualdub
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: A composable, registry-based speech-AI framework for low-resource languages.
|
|
5
|
+
Author: LingualDub Authors and Contributors
|
|
6
|
+
Maintainer: LingualDub Core Team
|
|
7
|
+
License: Apache-2.0
|
|
8
|
+
Project-URL: Homepage, https://lingualdub.pages.dev
|
|
9
|
+
Project-URL: Documentation, https://lingualdub.pages.dev/docs
|
|
10
|
+
Project-URL: Repository, https://github.com/allaninfo-tech/lingualdub
|
|
11
|
+
Project-URL: Issues, https://github.com/allaninfo-tech/lingualdub/issues
|
|
12
|
+
Project-URL: Changelog, https://github.com/allaninfo-tech/lingualdub/blob/main/CHANGELOG.md
|
|
13
|
+
Keywords: speech-ai,low-resource-languages,speech-to-speech,dubbing,voice-cloning,asr,tts,machine-translation,luganda,runyankole,nlp
|
|
14
|
+
Classifier: Development Status :: 3 - Alpha
|
|
15
|
+
Classifier: Intended Audience :: Science/Research
|
|
16
|
+
Classifier: Intended Audience :: Developers
|
|
17
|
+
Classifier: License :: OSI Approved :: Apache Software License
|
|
18
|
+
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
|
|
19
|
+
Classifier: Topic :: Multimedia :: Sound/Audio :: Speech
|
|
20
|
+
Classifier: Topic :: Text Processing :: Linguistic
|
|
21
|
+
Classifier: Programming Language :: Python :: 3
|
|
22
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
23
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
24
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
25
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
26
|
+
Classifier: Typing :: Typed
|
|
27
|
+
Requires-Python: >=3.10
|
|
28
|
+
Description-Content-Type: text/markdown
|
|
29
|
+
License-File: LICENSE
|
|
30
|
+
Requires-Dist: pyyaml>=6.0
|
|
31
|
+
Provides-Extra: test
|
|
32
|
+
Requires-Dist: pytest>=7.4; extra == "test"
|
|
33
|
+
Requires-Dist: pytest-cov>=4.1; extra == "test"
|
|
34
|
+
Provides-Extra: lint
|
|
35
|
+
Requires-Dist: ruff>=0.6.0; extra == "lint"
|
|
36
|
+
Requires-Dist: mypy>=1.10.0; extra == "lint"
|
|
37
|
+
Provides-Extra: docs
|
|
38
|
+
Requires-Dist: mkdocs>=1.5.0; extra == "docs"
|
|
39
|
+
Requires-Dist: mkdocs-material>=9.5.0; extra == "docs"
|
|
40
|
+
Requires-Dist: mkdocstrings[python]>=0.25.0; extra == "docs"
|
|
41
|
+
Provides-Extra: models
|
|
42
|
+
Requires-Dist: torch>=2.0.0; extra == "models"
|
|
43
|
+
Requires-Dist: transformers>=4.38.0; extra == "models"
|
|
44
|
+
Requires-Dist: torchaudio>=2.0.0; extra == "models"
|
|
45
|
+
Requires-Dist: scipy>=1.10.0; extra == "models"
|
|
46
|
+
Requires-Dist: soundfile>=0.12.0; extra == "models"
|
|
47
|
+
Provides-Extra: eval
|
|
48
|
+
Requires-Dist: jiwer>=3.0.0; extra == "eval"
|
|
49
|
+
Requires-Dist: sacrebleu>=2.4.0; extra == "eval"
|
|
50
|
+
Provides-Extra: dev
|
|
51
|
+
Requires-Dist: pytest>=7.4; extra == "dev"
|
|
52
|
+
Requires-Dist: pytest-cov>=4.1; extra == "dev"
|
|
53
|
+
Requires-Dist: ruff>=0.6.0; extra == "dev"
|
|
54
|
+
Requires-Dist: mypy>=1.10.0; extra == "dev"
|
|
55
|
+
Requires-Dist: pre-commit>=3.7.0; extra == "dev"
|
|
56
|
+
Requires-Dist: build>=1.1.0; extra == "dev"
|
|
57
|
+
Requires-Dist: twine>=5.0.0; extra == "dev"
|
|
58
|
+
Requires-Dist: pyyaml>=6.0; extra == "dev"
|
|
59
|
+
Provides-Extra: all
|
|
60
|
+
Requires-Dist: torch>=2.0.0; extra == "all"
|
|
61
|
+
Requires-Dist: transformers>=4.38.0; extra == "all"
|
|
62
|
+
Requires-Dist: torchaudio>=2.0.0; extra == "all"
|
|
63
|
+
Requires-Dist: scipy>=1.10.0; extra == "all"
|
|
64
|
+
Requires-Dist: soundfile>=0.12.0; extra == "all"
|
|
65
|
+
Requires-Dist: jiwer>=3.0.0; extra == "all"
|
|
66
|
+
Requires-Dist: sacrebleu>=2.4.0; extra == "all"
|
|
67
|
+
Requires-Dist: pyyaml>=6.0; extra == "all"
|
|
68
|
+
Dynamic: license-file
|
|
69
|
+
|
|
70
|
+
<div align="center">
|
|
71
|
+
|
|
72
|
+
<a href="https://lingualdub.pages.dev">
|
|
73
|
+
<img src="docs/assets/logo.png" alt="LingualDub Logo" width="340" />
|
|
74
|
+
</a>
|
|
75
|
+
|
|
76
|
+
# LingualDub
|
|
77
|
+
|
|
78
|
+
**A composable, registry-based speech-AI framework for low-resource languages.**
|
|
79
|
+
|
|
80
|
+
[](https://github.com/allaninfo-tech/lingualdub/actions/workflows/ci.yml)
|
|
81
|
+
[](https://github.com/allaninfo-tech/lingualdub/actions/workflows/lint.yml)
|
|
82
|
+
[](https://www.python.org/downloads/)
|
|
83
|
+
[](https://opensource.org/licenses/Apache-2.0)
|
|
84
|
+
[](https://github.com/astral-sh/ruff)
|
|
85
|
+
[](http://mypy-lang.org/)
|
|
86
|
+
[](https://lingualdub.pages.dev)
|
|
87
|
+
|
|
88
|
+
<br />
|
|
89
|
+
|
|
90
|
+
[Documentation](https://lingualdub.pages.dev/docs) • [Milestones & Roadmap](docs/milestones.md) • [Contributing](CONTRIBUTING.md) • [Architecture](docs/architecture.md)
|
|
91
|
+
|
|
92
|
+
</div>
|
|
93
|
+
|
|
94
|
+
---
|
|
95
|
+
|
|
96
|
+
## Overview
|
|
97
|
+
|
|
98
|
+
**LingualDub** is an open, modular speech-AI framework designed as reusable research and production infrastructure for **all low-resource language contexts**. It standardises how language metadata, speech/text data resources, model components, execution pipelines, and evaluation metrics interoperate — so that any low-resource language, model adapter, and evaluator can be wired together, adapted, and replaced without rewriting framework internals.
|
|
99
|
+
|
|
100
|
+
Initial reference validation languages:
|
|
101
|
+
- **Luganda (`lug`)**: Bantu (Great Lakes) — initial speech-moderate / text-moderate reference baseline.
|
|
102
|
+
- **Runyankole (`nyn`)**: Bantu (Great Lakes) — speech-sparse / text-sparse language-family generalisation test.
|
|
103
|
+
- **Expandable to any language**: Simply define a `Language` profile, attach resources, and compose your pipeline.
|
|
104
|
+
|
|
105
|
+
---
|
|
106
|
+
|
|
107
|
+
## Key Features
|
|
108
|
+
|
|
109
|
+
- **Language-Agnostic & Composable**: Five foundational abstractions (`Language`, `Resource`, `Component`, `Pipeline`, `Result`) forming a closed, provenance-tracked loop.
|
|
110
|
+
- **Registry & Dynamic Discovery**: Decoupled component registration supporting multiple conflict policies (`NAMESPACED`, `HIGHEST_VERSION`, `EXPLICIT`) and automatic `lingualdub.manifest.json` scanning.
|
|
111
|
+
- **Assembly-Time Capability Checking**: Validates stage input/output contracts (`requires` vs `provides`) at assembly time before any heavy model loads or runs.
|
|
112
|
+
- **Graceful Failure Handling**: Multi-tier fault tolerance (`ABORT`, `SKIP`, `DEGRADE`) with built-in degraded fallback paths and warning propagation.
|
|
113
|
+
- **Code-Switching Native**: `Segment.language` is authoritative per span, enabling dynamic per-segment language routing across different models in a single run.
|
|
114
|
+
- **Built-in Resource Management**: Local file caching, automatic downloads, and cryptographic SHA256 integrity verification.
|
|
115
|
+
- **Strict Provenance & Consent Tracking**: Every run automatically records pipeline structure, model versions, dataset provenance, and consent basis for ethical voice AI.
|
|
116
|
+
|
|
117
|
+
---
|
|
118
|
+
|
|
119
|
+
## Architecture
|
|
120
|
+
|
|
121
|
+
```
|
|
122
|
+
┌─────────────────────────────┐
|
|
123
|
+
│ Language + Resources │
|
|
124
|
+
│ (Any ISO 639 Language) │
|
|
125
|
+
└──────────────┬──────────────┘
|
|
126
|
+
│
|
|
127
|
+
▼
|
|
128
|
+
┌─────────────────────────────────────────────────────────────┐
|
|
129
|
+
│ Registry Discovery │
|
|
130
|
+
│ (Manifest Scanner • Conflict Resolution • Versioning) │
|
|
131
|
+
└─────────────────────────────┬───────────────────────────────┘
|
|
132
|
+
│
|
|
133
|
+
▼
|
|
134
|
+
┌─────────────────────────────────────────────────────────────┐
|
|
135
|
+
│ Pipeline Assembly │
|
|
136
|
+
│ (Stage Composition • Assembly-Time Capability Check) │
|
|
137
|
+
└─────────────────────────────┬───────────────────────────────┘
|
|
138
|
+
│
|
|
139
|
+
▼
|
|
140
|
+
┌─────────────────────────────────────────────────────────────┐
|
|
141
|
+
│ Pipeline Executor │
|
|
142
|
+
│ (Per-Segment Routing • Abort / Skip / Degrade Paths) │
|
|
143
|
+
└─────────────────────────────┬───────────────────────────────┘
|
|
144
|
+
│
|
|
145
|
+
▼
|
|
146
|
+
┌─────────────────────────────┐
|
|
147
|
+
│ Result + Provenance Loop │
|
|
148
|
+
│ (Segments • Metrics • Audio)│
|
|
149
|
+
└─────────────────────────────┘
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
---
|
|
153
|
+
|
|
154
|
+
## Quickstart
|
|
155
|
+
|
|
156
|
+
### Installation
|
|
157
|
+
|
|
158
|
+
```bash
|
|
159
|
+
# Clone and install in editable mode
|
|
160
|
+
git clone https://github.com/allaninfo-tech/lingualdub.git
|
|
161
|
+
cd lingualdub
|
|
162
|
+
pip install -e ".[dev]"
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
For GPU models (Whisper, Sunbird, NLLB, MMS-TTS, metrics):
|
|
166
|
+
```bash
|
|
167
|
+
pip install -e ".[all]"
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
---
|
|
171
|
+
|
|
172
|
+
## The 3-Tier Workflow
|
|
173
|
+
|
|
174
|
+
LingualDub uses **GitHub as the bridge** between local development and cloud GPU execution (e.g. Google Colab):
|
|
175
|
+
|
|
176
|
+
```text
|
|
177
|
+
YOUR MACHINE GITHUB COLAB / GPU SERVER
|
|
178
|
+
┌───────────────────┐ ┌───────────────────┐ ┌───────────────────┐
|
|
179
|
+
│ Fast Unit Tests │ push │ Versioned Code, │ clone │ Real Heavy Models │
|
|
180
|
+
│ Deterministic │ ─────► │ Configs & Result │ ─────► │ Multi-Lingual / │
|
|
181
|
+
│ Local Integration │ │ Envelopes (JSON) │ │ Fine-Tuned Models │
|
|
182
|
+
└───────────────────┘ └─────────┬─────────┘ └─────────┬─────────┘
|
|
183
|
+
▲ │ │
|
|
184
|
+
│ pull │ push results │
|
|
185
|
+
└────────────────────────────┴────────────────────────────┘
|
|
186
|
+
```
|
|
187
|
+
|
|
188
|
+
1. **Level 1 (Local Unit Tests)**: Test core objects (`Language`, `Resource`, `Pipeline`, `Registry`) without GPUs or heavy downloads (`pytest`).
|
|
189
|
+
2. **Level 2 (Local Integration)**: Run full end-to-end pipelines locally with zero-dependency dummy adapters (`dummy_asr`, `dummy_translator`, `dummy_tts`) in under 0.1s.
|
|
190
|
+
3. **Level 3 (Remote Research Experiments)**: Execute real neural models (Sunbird AI, Whisper Large v3, NLLB, Meta MMS-TTS) on Colab GPUs via declarative configs and evaluate with WER, CER, and chrF.
|
|
191
|
+
|
|
192
|
+
---
|
|
193
|
+
|
|
194
|
+
### Running via CLI
|
|
195
|
+
|
|
196
|
+
```bash
|
|
197
|
+
# 1. Inspect registered components and languages
|
|
198
|
+
lingualdub registry list
|
|
199
|
+
|
|
200
|
+
# 2. Run a local pipeline test (generic to any text/language)
|
|
201
|
+
lingualdub experiment run configs/local_mock_pipeline.yaml \
|
|
202
|
+
--sample-text "Oli otya nnyabo" \
|
|
203
|
+
--output-dir experiments/local_test
|
|
204
|
+
|
|
205
|
+
# 3. Run a real GPU experiment on Colab (e.g. reference baseline)
|
|
206
|
+
lingualdub experiment run configs/luganda_english_baseline.yaml \
|
|
207
|
+
--input-audio data/samples/sample_lug.wav \
|
|
208
|
+
--output-dir experiments/luganda_dubbing/baseline_v1
|
|
209
|
+
|
|
210
|
+
# 4. Compare metric deltas across two runs
|
|
211
|
+
lingualdub compare \
|
|
212
|
+
--baseline experiments/luganda_dubbing/baseline_v1/results.json \
|
|
213
|
+
--candidate experiments/luganda_dubbing/run_v2/results.json
|
|
214
|
+
```
|
|
215
|
+
|
|
216
|
+
---
|
|
217
|
+
|
|
218
|
+
### Python API Example
|
|
219
|
+
|
|
220
|
+
```python
|
|
221
|
+
import lingualdub as ld
|
|
222
|
+
|
|
223
|
+
# 1. Define any language profile (e.g. Yoruba, Swahili, Luganda, Runyankole)
|
|
224
|
+
yoruba = ld.Language(
|
|
225
|
+
code="yor",
|
|
226
|
+
name="Yoruba",
|
|
227
|
+
family="Niger-Congo (Defoid)",
|
|
228
|
+
resource_profile="speech-sparse / text-moderate",
|
|
229
|
+
supported_tasks=["asr", "translation", "tts"],
|
|
230
|
+
)
|
|
231
|
+
|
|
232
|
+
# 2. Initialize registry and load declarative pipeline config
|
|
233
|
+
registry = ld.Registry(conflict_policy=ld.ConflictPolicy.HIGHEST_VERSION)
|
|
234
|
+
scanner = ld.ManifestScanner(registry)
|
|
235
|
+
scanner.scan()
|
|
236
|
+
|
|
237
|
+
loader = ld.ConfigLoader(registry)
|
|
238
|
+
pipeline = loader.load_file("configs/luganda_english_baseline.yaml")
|
|
239
|
+
|
|
240
|
+
# 3. Execute pipeline with automatic capability validation & fault tolerance
|
|
241
|
+
executor = ld.PipelineExecutor(pipeline)
|
|
242
|
+
audio_resource = ld.Resource(
|
|
243
|
+
id="sample_audio_01",
|
|
244
|
+
kind=ld.ResourceKind.SPEECH,
|
|
245
|
+
language="lug",
|
|
246
|
+
version="1.0.0",
|
|
247
|
+
path="data/samples/sample_lug.wav",
|
|
248
|
+
provenance={"consent_basis": "research_evaluation"},
|
|
249
|
+
)
|
|
250
|
+
|
|
251
|
+
result = executor.run(audio_resource)
|
|
252
|
+
|
|
253
|
+
# 4. Inspect structured results and provenance
|
|
254
|
+
print(f"Status: {result.status.value.upper()}")
|
|
255
|
+
for seg in result.segments:
|
|
256
|
+
print(f"[{seg.start:.2f}s -> {seg.end:.2f}s] ({seg.language}): {seg.text}")
|
|
257
|
+
print(f"Synthesised Audio Artifacts: {result.artifacts}")
|
|
258
|
+
```
|
|
259
|
+
|
|
260
|
+
---
|
|
261
|
+
|
|
262
|
+
## Core Abstractions
|
|
263
|
+
|
|
264
|
+
| Abstraction | Description |
|
|
265
|
+
|---|---|
|
|
266
|
+
| **`Language`** | Structured language profile capturing linguistic metadata, resource availability profile, supported tasks, and related language families. |
|
|
267
|
+
| **`Resource`** | Data or model asset (speech, parallel text, audio, checkpoint, eval set) with versioning, quality flags, and recorded consent basis. |
|
|
268
|
+
| **`Component`** | Replaceable processing unit with typed contracts (`requires` and `provides` capability tokens) and optional `degrade()` fallbacks. |
|
|
269
|
+
| **`Pipeline`** | Composed sequence of components with assembly-time compatibility validation and per-segment language routing. |
|
|
270
|
+
| **`Result`** | Structured execution envelope containing `Segment` lists, speaker info, confidence, status (`COMPLETE`, `PARTIAL`, `DEGRADED`, `FAILED`), and merged provenance. |
|
|
271
|
+
| **`Registry`** | Central repository enabling third-party extensions to register models, datasets, and evaluators without touching framework internals. |
|
|
272
|
+
|
|
273
|
+
---
|
|
274
|
+
|
|
275
|
+
## Research Challenge Modules
|
|
276
|
+
|
|
277
|
+
LingualDub provides modular workspaces for key open research problems in low-resource speech:
|
|
278
|
+
|
|
279
|
+
| Module | Priority | Focus Area |
|
|
280
|
+
|---|---|---|
|
|
281
|
+
| **Temporal Alignment** | Near-term | Duration modelling, speech-rate control, segment fitting, and cross-lingual synchronisation |
|
|
282
|
+
| **Code-Switching** | Near-term | Detection, representation, and per-segment routing for mixed-language speech |
|
|
283
|
+
| **Voice-Retention Evaluation** | Near-term | Repeatable speaker-similarity measurement and MOS human evaluation protocols |
|
|
284
|
+
| **Cross-Lingual Voice Transfer** | Open-ended | Speaker identity preservation across language boundaries with consent enforcement |
|
|
285
|
+
| **Audio-Visual Synchronisation** | Mid-term | Dialogue timing, scene cues, and lip-sync alignment for dubbed video |
|
|
286
|
+
|
|
287
|
+
---
|
|
288
|
+
|
|
289
|
+
## Project Roadmap
|
|
290
|
+
|
|
291
|
+
We follow a milestone-driven development model. Progress is tracked in [docs/milestones.md](docs/milestones.md):
|
|
292
|
+
|
|
293
|
+
- [x] **M0 — Foundation & Core Stabilization** (Serialization, Registry, Manifests, Resource Manager, Test Suite, CI)
|
|
294
|
+
- [ ] **M1 — First Real Dubbing Pipeline** (Luganda $\to$ English baseline with real model adapters)
|
|
295
|
+
- [ ] **M2 — Evaluation Infrastructure** (WER, CER, BLEU, chrF, run comparison utilities)
|
|
296
|
+
- [ ] **M3 — Code-Switching** (Per-segment language identification and routing)
|
|
297
|
+
- [ ] **M4 — Temporal Alignment** (Forced alignment & speech-rate adaptation)
|
|
298
|
+
- [ ] **M5 — Voice-Retention Evaluation** (Speaker embeddings & MOS protocol)
|
|
299
|
+
- [ ] **M6 — Cross-Lingual Voice Transfer** (Voice-conditioned TTS with consent checks)
|
|
300
|
+
- [ ] **M7 — Audio-Visual Synchronisation** (SyncNet alignment & video artifact export)
|
|
301
|
+
- [ ] **M8 — Generalisation Proof** (Runyankole language transfer validation)
|
|
302
|
+
- [ ] **M9 — Stable v0.1.0 Release** (Public PyPI package & full documentation)
|
|
303
|
+
|
|
304
|
+
---
|
|
305
|
+
|
|
306
|
+
## Repository Structure
|
|
307
|
+
|
|
308
|
+
```
|
|
309
|
+
lingualdub/
|
|
310
|
+
├── lingualdub/ # Core framework package (PEP 561 typed)
|
|
311
|
+
│ ├── core/ # Language, Resource, Component, Pipeline, Result, Segment
|
|
312
|
+
│ ├── registry/ # Registry, ManifestScanner, conflict resolution
|
|
313
|
+
│ ├── components/ # Task interfaces (ASR, TTS, MT, Alignment, Speaker, Eval, etc.)
|
|
314
|
+
│ ├── pipeline/ # PipelineExecutor and failure handling
|
|
315
|
+
│ ├── languages/ # Language profiles (Luganda, Runyankole, etc.)
|
|
316
|
+
│ └── utils/ # ResourceManager, provenance, comparison helpers
|
|
317
|
+
├── docs/ # Architecture, guides, milestones, manifest format
|
|
318
|
+
├── research/ # Research challenge module workspaces & notes
|
|
319
|
+
├── configs/ # Declarative pipeline YAML configurations
|
|
320
|
+
├── notebooks/ # Interactive demonstration & evaluation notebooks
|
|
321
|
+
├── tests/ # Pytest suite with >90% coverage on core modules
|
|
322
|
+
├── website/ # Source code for lingualdub.pages.dev (React + Tailwind)
|
|
323
|
+
├── .github/ # Issue templates, PR template, CI/CD workflows
|
|
324
|
+
├── pyproject.toml # Build configuration, dependency groups, tool settings
|
|
325
|
+
├── LICENSE # Apache 2.0 License
|
|
326
|
+
├── CITATION.cff # Academic citation metadata
|
|
327
|
+
└── CONTRIBUTING.md # Development and contribution guide
|
|
328
|
+
```
|
|
329
|
+
|
|
330
|
+
---
|
|
331
|
+
|
|
332
|
+
## Contributing
|
|
333
|
+
|
|
334
|
+
We welcome contributions! Please read our [Contributing Guide](CONTRIBUTING.md) and [Code of Conduct](CODE_OF_CONDUCT.md) before submitting a pull request.
|
|
335
|
+
|
|
336
|
+
---
|
|
337
|
+
|
|
338
|
+
## Citation
|
|
339
|
+
|
|
340
|
+
If you use LingualDub in your research, please cite:
|
|
341
|
+
|
|
342
|
+
```bibtex
|
|
343
|
+
@software{lingualdub2026,
|
|
344
|
+
author = {LingualDub Authors and Contributors},
|
|
345
|
+
title = {LingualDub: A Composable, Registry-Based Speech-AI Framework for Low-Resource Languages},
|
|
346
|
+
url = {https://github.com/allaninfo-tech/lingualdub},
|
|
347
|
+
version = {0.1.0},
|
|
348
|
+
year = {2026}
|
|
349
|
+
}
|
|
350
|
+
```
|
|
351
|
+
|
|
352
|
+
---
|
|
353
|
+
|
|
354
|
+
## License
|
|
355
|
+
|
|
356
|
+
This project is licensed under the **Apache License 2.0** — see the [LICENSE](LICENSE) file for details.
|