Initial upload: tiny-ava Parisa 4.5M Persian TTS (PyTorch + ONNX + 12 samples + model card)
Browse files- .gitattributes +13 -0
- LICENSE +202 -0
- README.md +137 -0
- charts/training_curves.png +3 -0
- config.json +36 -0
- onnx/tiny-ava-parisa.json +72 -0
- onnx/tiny-ava-parisa.onnx +3 -0
- samples/01_greeting.wav +3 -0
- samples/02_ezafe_chain.wav +3 -0
- samples/03_ezafe_kasra.wav +3 -0
- samples/04_homo_tost.wav +3 -0
- samples/05_homo_gol.wav +3 -0
- samples/06_homo_gel.wav +3 -0
- samples/07_homo_mord.wav +3 -0
- samples/08_question.wav +3 -0
- samples/09_uvulars.wav +3 -0
- samples/10_long.wav +3 -0
- samples/11_colloq_1.wav +3 -0
- samples/12_colloq_2.wav +3 -0
- tiny-ava-parisa.pt +3 -0
.gitattributes
CHANGED
|
@@ -33,3 +33,16 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
| 33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
| 36 |
+
charts/training_curves.png filter=lfs diff=lfs merge=lfs -text
|
| 37 |
+
samples/01_greeting.wav filter=lfs diff=lfs merge=lfs -text
|
| 38 |
+
samples/02_ezafe_chain.wav filter=lfs diff=lfs merge=lfs -text
|
| 39 |
+
samples/03_ezafe_kasra.wav filter=lfs diff=lfs merge=lfs -text
|
| 40 |
+
samples/04_homo_tost.wav filter=lfs diff=lfs merge=lfs -text
|
| 41 |
+
samples/05_homo_gol.wav filter=lfs diff=lfs merge=lfs -text
|
| 42 |
+
samples/06_homo_gel.wav filter=lfs diff=lfs merge=lfs -text
|
| 43 |
+
samples/07_homo_mord.wav filter=lfs diff=lfs merge=lfs -text
|
| 44 |
+
samples/08_question.wav filter=lfs diff=lfs merge=lfs -text
|
| 45 |
+
samples/09_uvulars.wav filter=lfs diff=lfs merge=lfs -text
|
| 46 |
+
samples/10_long.wav filter=lfs diff=lfs merge=lfs -text
|
| 47 |
+
samples/11_colloq_1.wav filter=lfs diff=lfs merge=lfs -text
|
| 48 |
+
samples/12_colloq_2.wav filter=lfs diff=lfs merge=lfs -text
|
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.
|
README.md
ADDED
|
@@ -0,0 +1,137 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: apache-2.0
|
| 3 |
+
language:
|
| 4 |
+
- fa
|
| 5 |
+
pipeline_tag: text-to-speech
|
| 6 |
+
tags:
|
| 7 |
+
- text-to-speech
|
| 8 |
+
- persian
|
| 9 |
+
- farsi
|
| 10 |
+
- onnx
|
| 11 |
+
- tiny-voca
|
| 12 |
+
- cpu
|
| 13 |
+
---
|
| 14 |
+
|
| 15 |
+
# tiny-ava
|
| 16 |
+
|
| 17 |
+
**tiny-ava** is a tiny **4.5M-parameter** Persian (Farsi) text-to-speech model trained from scratch on top of the [`tiny-voca`](https://github.com/n4ze3m/tiny-voca) architecture. Including the built-in waveform generator, the complete model is **~18 MB (PyTorch) / ~20 MB (ONNX)** and runs **38× faster than real time on 1 CPU thread** (**77× real time on 4 CPU threads**).
|
| 18 |
+
|
| 19 |
+
<audio controls src="https://huggingface.co/mehdi-hf/tiny-ava/resolve/main/samples/01_greeting.wav"></audio>
|
| 20 |
+
|
| 21 |
+
- **Code & release repo:** https://github.com/mallahyari/tiny-ava
|
| 22 |
+
- **Persian G2P frontends:** [`mehdi-hf/persian-g2p-tiny`](https://huggingface.co/mehdi-hf/persian-g2p-tiny) (16 MB, MIT) · `mehdi-hf/persian-g2p-0.6b` (596M, Apache-2.0)
|
| 23 |
+
- **Base architecture:** [`n4ze3m/tiny-voca`](https://github.com/n4ze3m/tiny-voca) (Apache-2.0)
|
| 24 |
+
|
| 25 |
+
| | |
|
| 26 |
+
|---|---|
|
| 27 |
+
| Parameters | 4,531,147 |
|
| 28 |
+
| Voice | `parisa` (Persian female) |
|
| 29 |
+
| Output | 24 kHz mono |
|
| 30 |
+
| Input | Persian IPA tokens (46 symbols) + 3-class stress/ezafe channel |
|
| 31 |
+
| CPU speed (acoustic + vocoder) | **38.5× real time** (1 thread) · **77.4× real time** (4 threads) |
|
| 32 |
+
| Pretrained weights in the model | None (trained from scratch) |
|
| 33 |
+
| License | Apache-2.0 |
|
| 34 |
+
|
| 35 |
+
---
|
| 36 |
+
|
| 37 |
+
## Files
|
| 38 |
+
|
| 39 |
+
| File | Size | Contents |
|
| 40 |
+
|---|---:|---|
|
| 41 |
+
| `tiny-ava-parisa.pt` | 18.2 MB | PyTorch inference weights, float32 |
|
| 42 |
+
| `onnx/tiny-ava-parisa.onnx` | 20.4 MB | ONNX export, float32, opset 17 |
|
| 43 |
+
| `onnx/tiny-ava-parisa.json` | 761 B | Symbol table (46 symbols), voice map, and runtime metadata |
|
| 44 |
+
| `config.json` | 674 B | Model & acoustic DSP configuration |
|
| 45 |
+
| `samples/` | 2.5 MB | 12 sample 24 kHz WAVs |
|
| 46 |
+
| `charts/training_curves.png` | — | 104k-step training & validation curves |
|
| 47 |
+
|
| 48 |
+
SHA256:
|
| 49 |
+
- `tiny-ava-parisa.pt`: `698d43ea896eaa95bb6a444218097187fffb34b861710bd81a44a069eb4ab3d7`
|
| 50 |
+
- `onnx/tiny-ava-parisa.onnx`: `4e387b2f28a6d65916ed7c33ecdac4428135e9adfc13e1734b77592e6993a340`
|
| 51 |
+
|
| 52 |
+
---
|
| 53 |
+
|
| 54 |
+
## Samples (24 kHz, Parisa Voice)
|
| 55 |
+
|
| 56 |
+
| Category | Persian Text | Audio |
|
| 57 |
+
|---|---|---|
|
| 58 |
+
| Greeting & question | سلام، حال شما چطور است؟ امروز هوای تهران آفتابی است. | <audio controls preload="none" src="https://huggingface.co/mehdi-hf/tiny-ava/resolve/main/samples/01_greeting.wav"></audio> |
|
| 59 |
+
| Ezafe chain | نشست سران سیاسی کشورهای عضو به خوبی پیش رفت. | <audio controls preload="none" src="https://huggingface.co/mehdi-hf/tiny-ava/resolve/main/samples/02_ezafe_chain.wav"></audio> |
|
| 60 |
+
| Explicit kasra (`ـِ`) | بارانِ ریزی روی آسفالتِ خیس خیابان میبارد. | <audio controls preload="none" src="https://huggingface.co/mehdi-hf/tiny-ava/resolve/main/samples/03_ezafe_kasra.wav"></audio> |
|
| 61 |
+
| Homograph (`تست` → *tost*) | من هر روز صبح نان تست داغ با کره و عسل میخورم. | <audio controls preload="none" src="https://huggingface.co/mehdi-hf/tiny-ava/resolve/main/samples/04_homo_tost.wav"></audio> |
|
| 62 |
+
| Homograph (`گل` → *gol*) | گل قرمز زیبایی را روی میز گذاشت و لبخند زد. | <audio controls preload="none" src="https://huggingface.co/mehdi-hf/tiny-ava/resolve/main/samples/05_homo_gol.wav"></audio> |
|
| 63 |
+
| Homograph + diacritic (`گِل`) | کفشهایم بعد از باران پر از گِل و لای شد. | <audio controls preload="none" src="https://huggingface.co/mehdi-hf/tiny-ava/resolve/main/samples/06_homo_gel.wav"></audio> |
|
| 64 |
+
| Homograph (`مرد` → *mord*) | حیوان خانگی من دیروز در اثر گرمای شدید بیهوش شد و مرد. | <audio controls preload="none" src="https://huggingface.co/mehdi-hf/tiny-ava/resolve/main/samples/07_homo_mord.wav"></audio> |
|
| 65 |
+
| Question (`؟`) | آیا واقعاً فکر کردی که تولد تو را فراموش میکنم؟ | <audio controls preload="none" src="https://huggingface.co/mehdi-hf/tiny-ava/resolve/main/samples/08_question.wav"></audio> |
|
| 66 |
+
| Persian uvulars (`ق/غ/خ/ع`) | قصر قدیم در کنار غار خاموش و عمیق کوهستان قرار دارد. | <audio controls preload="none" src="https://huggingface.co/mehdi-hf/tiny-ava/resolve/main/samples/09_uvulars.wav"></audio> |
|
| 67 |
+
| Long sentence | توسعه مدلهای کوچک هوش مصنوعی باعث میشود که فناوری تبدیل متن به گفتار بدون نیاز به سرور و اینترنت روی دستگاههای معمولی اجرا شود. | <audio controls preload="none" src="https://huggingface.co/mehdi-hf/tiny-ava/resolve/main/samples/10_long.wav"></audio> |
|
| 68 |
+
| Colloquial Persian | سلام، چطوری؟ دیگه باید برم، نمیتونم بیشتر بمونم. | <audio controls preload="none" src="https://huggingface.co/mehdi-hf/tiny-ava/resolve/main/samples/11_colloq_1.wav"></audio> |
|
| 69 |
+
|
| 70 |
+
---
|
| 71 |
+
|
| 72 |
+
## ONNX Interface
|
| 73 |
+
|
| 74 |
+
The ONNX graph (`onnx/tiny-ava-parisa.onnx`) takes Persian IPA token IDs and stress/ezafe values and directly outputs a 24 kHz waveform. Text-to-phoneme conversion runs outside the graph using either [`mehdi-hf/persian-g2p-tiny`](https://huggingface.co/mehdi-hf/persian-g2p-tiny) (16 MB) or `mehdi-hf/persian-g2p-0.6b` (596M), mapped to the 46-symbol table in `onnx/tiny-ava-parisa.json`.
|
| 75 |
+
|
| 76 |
+
### Inputs
|
| 77 |
+
|
| 78 |
+
| Input | Type | Shape | Meaning |
|
| 79 |
+
|---|---|---|---|
|
| 80 |
+
| `tokens` | `int64` | `[1, N]` | Persian IPA & punctuation IDs (`0..45`), wrapped with `<bos>` and `<eos>` |
|
| 81 |
+
| `stress` | `int64` | `[1, N]` | `0` unstressed, `1` word-final primary lexical stress, `2` explicit ezafe (`-e`/`-ye`) |
|
| 82 |
+
| `voice` | `int64` | `[1]` | `0` (`parisa`) |
|
| 83 |
+
| `speed` | `float32` | `[1]` | Speaking rate (`1.0` default; larger is faster) |
|
| 84 |
+
| `pitch_shift` | `float32` | `[1]` | Added to log F0 (`0.058` ≈ +1 semitone) |
|
| 85 |
+
| `pitch_range` | `float32` | `[1]` | Scales pitch movement around utterance mean (`1.0`–`1.1` recommended) |
|
| 86 |
+
|
| 87 |
+
### Outputs
|
| 88 |
+
|
| 89 |
+
| Output | Type | Shape | Meaning |
|
| 90 |
+
|---|---|---|---|
|
| 91 |
+
| `audio` | `float32` | `[1, samples]` | 24 kHz mono waveform (scale peak to ≤ `0.99` before 16-bit WAV export) |
|
| 92 |
+
| `durations` | `int64` | `[1, N]` | Predicted duration per token in frames (`256` samples = `10.67 ms` per frame) |
|
| 93 |
+
|
| 94 |
+
---
|
| 95 |
+
|
| 96 |
+
## Architecture
|
| 97 |
+
|
| 98 |
+
Built on the exact `tiny-voca` feed-forward transformer + complex-cepstrum source-filter architecture, adapted for Persian:
|
| 99 |
+
|
| 100 |
+
- **46-symbol Persian vocabulary:** 5 specials, 12 Persian/standard punctuation pause carriers (`،`, `.`, `؟`, `!`, `؛`, `:`, `«`, `»`, `(`, `)`, `—`, `…`), 23 consonants, and 6 vowels (`a, e, o, i, u, ɑ`).
|
| 101 |
+
- **Text encoder:** 4 Conformer-style RoPE blocks (`192` channels, `4` heads, kernel-7 depthwise conv, `640` FFN).
|
| 102 |
+
- **Duration & pause predictor:** Separate duration regression + binary pause-presence head for commas, periods, and word boundaries.
|
| 103 |
+
- **Prosody & acoustic stacks:** 2 frame blocks predicting log-F0, voicing, and energy + 5 frame blocks predicting harmonic & noise filter cepstra.
|
| 104 |
+
- **Source-filter waveform head (`25.9k` params):** Anti-aliased float64 harmonic pulse train + causal/anticausal complex-cepstrum filtering + 4-subframe noise branch (no neural vocoder required).
|
| 105 |
+
|
| 106 |
+
---
|
| 107 |
+
|
| 108 |
+
## Training & Evaluation
|
| 109 |
+
|
| 110 |
+
- **Training data:** 8,033 clean punctuated Parisa clips (**19.97 hours**, 24 kHz), annotated with `mehdi-hf/persian-g2p-0.6b` and offline CTC forced alignment (`facebook/wav2vec2-lv-60-espeak-cv-ft`, 99.73% QC acceptance, `88.6%` fricative-to-vowel voicing flip within 2 frames).
|
| 111 |
+
- **Training schedule:** 104,000 steps on 1× NVIDIA A100-80GB (~5.5 hours). Spectral + prosody losses for the first 8,000 steps, followed by multi-period and multi-resolution GAN discriminators (`--gan-ratio 0.7`, `--teacher-final 0`).
|
| 112 |
+
|
| 113 |
+
### Held-Out Test Evaluation (50 clips, `faster-whisper large-v3`, `language="fa"`)
|
| 114 |
+
|
| 115 |
+
| Model | Persian CER ↓ | Persian WER ↓ | CPU Speed (1 thread / 4 threads) |
|
| 116 |
+
|---|---:|---:|---:|
|
| 117 |
+
| **tiny-ava (`parisa`, 4.53M)** | **6.95%** *(0.85× teacher)* | **36.96%** *(0.92× teacher)* | **38.5× / 77.4× real time** |
|
| 118 |
+
| Teacher recordings (reference floor) | 8.20% | 40.22% | — |
|
| 119 |
+
|
| 120 |
+

|
| 121 |
+
|
| 122 |
+
---
|
| 123 |
+
|
| 124 |
+
## Limitations
|
| 125 |
+
|
| 126 |
+
- Single fixed female voice (`parisa`); no voice cloning.
|
| 127 |
+
- Pronunciation accuracy on rare homographs, numbers, and out-of-vocabulary loanwords depends on the upstream Persian G2P frontend (typing explicit `ـَ`, `ـِ`, `ـُ` diacritics lets you override pronunciation deterministically).
|
| 128 |
+
- Deterministic prosody: the same input text is always spoken with the same cadence.
|
| 129 |
+
- Utterance-level generation (not frame-streaming), though a 5-second Persian sentence synthesizes in ~65 ms on 4 CPU threads.
|
| 130 |
+
|
| 131 |
+
---
|
| 132 |
+
|
| 133 |
+
## License & Credits
|
| 134 |
+
|
| 135 |
+
- **License:** Apache-2.0.
|
| 136 |
+
- **Architecture:** Based on [`n4ze3m/tiny-voca`](https://github.com/n4ze3m/tiny-voca) (Apache-2.0) by Muhammed Nazeem.
|
| 137 |
+
- **Offline Aligner (annotation only):** `facebook/wav2vec2-lv-60-espeak-cv-ft` (Apache-2.0).
|
charts/training_curves.png
ADDED
|
Git LFS Details
|
config.json
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"sample_rate": 24000,
|
| 3 |
+
"hop": 256,
|
| 4 |
+
"n_fft": 1024,
|
| 5 |
+
"n_mels": 80,
|
| 6 |
+
"f0_min": 75.0,
|
| 7 |
+
"f0_max": 550.0,
|
| 8 |
+
"speakers": [
|
| 9 |
+
"parisa"
|
| 10 |
+
],
|
| 11 |
+
"vocab_size": 46,
|
| 12 |
+
"channels": 192,
|
| 13 |
+
"heads": 4,
|
| 14 |
+
"feedforward": 640,
|
| 15 |
+
"kernel": 7,
|
| 16 |
+
"encoder_layers": 4,
|
| 17 |
+
"prosody_layers": 2,
|
| 18 |
+
"acoustic_layers": 5,
|
| 19 |
+
"dropout": 0.1,
|
| 20 |
+
"predictor_channels": 128,
|
| 21 |
+
"synth_fft": 512,
|
| 22 |
+
"synth_hop": 128,
|
| 23 |
+
"noise_fft": 256,
|
| 24 |
+
"noise_hop": 64,
|
| 25 |
+
"cep_causal": 80,
|
| 26 |
+
"cep_anti": 16,
|
| 27 |
+
"noise_cep": 32,
|
| 28 |
+
"harmonic_limit": 0.47,
|
| 29 |
+
"max_tokens": 512,
|
| 30 |
+
"max_frames": 3000,
|
| 31 |
+
"mel_mean": -5.0,
|
| 32 |
+
"mel_scale": 5.0,
|
| 33 |
+
"energy_mean": -4.0,
|
| 34 |
+
"energy_scale": 2.0,
|
| 35 |
+
"pitch_reference_hz": 200.0
|
| 36 |
+
}
|
onnx/tiny-ava-parisa.json
ADDED
|
@@ -0,0 +1,72 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"sample_rate": 24000,
|
| 3 |
+
"hop": 256,
|
| 4 |
+
"voices": [
|
| 5 |
+
"parisa"
|
| 6 |
+
],
|
| 7 |
+
"symbols": [
|
| 8 |
+
"<pad>",
|
| 9 |
+
"<bos>",
|
| 10 |
+
"<eos>",
|
| 11 |
+
"<sp>",
|
| 12 |
+
"<unk>",
|
| 13 |
+
"،",
|
| 14 |
+
".",
|
| 15 |
+
"؟",
|
| 16 |
+
"!",
|
| 17 |
+
"؛",
|
| 18 |
+
":",
|
| 19 |
+
"«",
|
| 20 |
+
"»",
|
| 21 |
+
"(",
|
| 22 |
+
")",
|
| 23 |
+
"—",
|
| 24 |
+
"…",
|
| 25 |
+
"p",
|
| 26 |
+
"b",
|
| 27 |
+
"t",
|
| 28 |
+
"d",
|
| 29 |
+
"k",
|
| 30 |
+
"ɡ",
|
| 31 |
+
"q",
|
| 32 |
+
"ʔ",
|
| 33 |
+
"f",
|
| 34 |
+
"v",
|
| 35 |
+
"s",
|
| 36 |
+
"z",
|
| 37 |
+
"ʃ",
|
| 38 |
+
"ʒ",
|
| 39 |
+
"x",
|
| 40 |
+
"h",
|
| 41 |
+
"tʃ",
|
| 42 |
+
"dʒ",
|
| 43 |
+
"m",
|
| 44 |
+
"n",
|
| 45 |
+
"l",
|
| 46 |
+
"r",
|
| 47 |
+
"j",
|
| 48 |
+
"a",
|
| 49 |
+
"e",
|
| 50 |
+
"o",
|
| 51 |
+
"i",
|
| 52 |
+
"u",
|
| 53 |
+
"ɑ"
|
| 54 |
+
],
|
| 55 |
+
"max_tokens": 512,
|
| 56 |
+
"max_frames": 3000,
|
| 57 |
+
"step": 104000,
|
| 58 |
+
"frontend": "persian-g2p",
|
| 59 |
+
"frontend_fingerprint": "f8c95de34b918211b7071d156dca1693a50f804ba7db4bf76c631983f1fb9845",
|
| 60 |
+
"inputs": [
|
| 61 |
+
"tokens",
|
| 62 |
+
"stress",
|
| 63 |
+
"voice",
|
| 64 |
+
"speed",
|
| 65 |
+
"pitch_shift",
|
| 66 |
+
"pitch_range"
|
| 67 |
+
],
|
| 68 |
+
"outputs": [
|
| 69 |
+
"audio",
|
| 70 |
+
"durations"
|
| 71 |
+
]
|
| 72 |
+
}
|
onnx/tiny-ava-parisa.onnx
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:4e387b2f28a6d65916ed7c33ecdac4428135e9adfc13e1734b77592e6993a340
|
| 3 |
+
size 21361734
|
samples/01_greeting.wav
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:3697c887dd2e0de20d189a1aa3b27deb7d0a82a70e48db2b2e6ba4baa252ea7b
|
| 3 |
+
size 226348
|
samples/02_ezafe_chain.wav
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:60cb2799884b557ad4b46bf80be4582c5059d97fc9a883399324844674d62032
|
| 3 |
+
size 194092
|
samples/03_ezafe_kasra.wav
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:b071f6dd0e71861e356b5240ac837d85ce2f0449ef1e390bb77050591a0277fa
|
| 3 |
+
size 170028
|
samples/04_homo_tost.wav
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:e8fa582e65f939659f7a597b5142d1a3de8eec68fa552cd6db166ed1cc73c49d
|
| 3 |
+
size 186412
|
samples/05_homo_gol.wav
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:05dd3830fe79fc6ead2bf1a42c2e086ab4ef991945c7c9c3aabfc1283acd1b8b
|
| 3 |
+
size 181804
|
samples/06_homo_gel.wav
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:3ee0905696bbbef95aa70c01f54f4d63259febf919b294020308e2a3556717d4
|
| 3 |
+
size 148524
|
samples/07_homo_mord.wav
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:4b8096e652f4ac4469fc90d09437f13c334a7c245d04e2f8a5a563f4ad71b0bd
|
| 3 |
+
size 222764
|
samples/08_question.wav
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:5bc79c8d31d64603870b58746d9583ccf6c9aced6f953cb544d7f38ae8d5c186
|
| 3 |
+
size 199724
|
samples/09_uvulars.wav
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:9c339ff4b657342e52ec17207c71ddf96e10751fe0a593390f8c0a59ad527631
|
| 3 |
+
size 227372
|
samples/10_long.wav
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:2cfc5ffda50465100b1aa27ed3cdf3418e1de9dc57c9ce2d0f6416c317e8bead
|
| 3 |
+
size 497708
|
samples/11_colloq_1.wav
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:0f2acca0bab5e26d43c5d83eed852f254119b052d7589abd9a6897c2f1423e6c
|
| 3 |
+
size 212524
|
samples/12_colloq_2.wav
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:fa6511961ce574193d3e1e9651e4d31e35e0a69cecac402605a8f124a489f5e4
|
| 3 |
+
size 174636
|
tiny-ava-parisa.pt
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:698d43ea896eaa95bb6a444218097187fffb34b861710bd81a44a069eb4ab3d7
|
| 3 |
+
size 18184261
|