blob: f7008581b44ac978e0a27c9022019c59b1c4a899 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
|
# Copyright 2026 Trunkmasters
# Distributed under the terms of the GNU General Public License v2
EAPI=8
# Kokoro-82M v1.0 (hexgrad), the ONNX export of onnx-community at a pinned revision: the full
# precision model (the 8-bit one is slower on CPUs without fast integer kernels), the phoneme
# vocabulary and the English voices (American a*, British b*). Data only; www-apps/attendant's
# attendant-speech runs it on sci-libs/onnxruntime with espeak-ng's phonemes.
HF_REV="1939ad2a8e416c0acfeecc08a694d14ef25f2231"
HF_URI="https://huggingface.co/onnx-community/Kokoro-82M-v1.0-ONNX/resolve/${HF_REV}"
VOICES="af_alloy af_aoede af_bella af_heart af_jessica af_kore af_nicole af_nova af_river af_sarah af_sky am_adam am_echo am_eric am_fenrir am_liam am_michael am_onyx am_puck am_santa bf_alice bf_emma bf_isabella bf_lily bm_daniel bm_fable bm_george bm_lewis"
DESCRIPTION="Kokoro-82M v1.0 text-to-speech model (ONNX) with its English voices"
HOMEPAGE="
https://huggingface.co/hexgrad/Kokoro-82M
https://huggingface.co/onnx-community/Kokoro-82M-v1.0-ONNX
"
SRC_URI="
${HF_URI}/onnx/model.onnx -> ${P}-model.onnx
${HF_URI}/config.json -> ${P}-config.json
${HF_URI}/tokenizer.json -> ${P}-tokenizer.json
${HF_URI}/tokenizer_config.json -> ${P}-tokenizer_config.json
${HF_URI}/README.md -> ${P}-README.md
"
for voice in ${VOICES}; do
SRC_URI+=" ${HF_URI}/voices/${voice}.bin -> ${P}-voice-${voice}.bin"
done
S="${WORKDIR}"
LICENSE="Apache-2.0"
SLOT="0"
KEYWORDS="~amd64"
RESTRICT="mirror strip"
src_unpack() { :; }
src_install() {
local dir=/usr/share/kokoro-82m f voice
insinto "${dir}"
for f in config.json tokenizer.json tokenizer_config.json README.md; do
newins "${DISTDIR}/${P}-${f}" "${f}"
done
insinto "${dir}/onnx"
newins "${DISTDIR}/${P}-model.onnx" model.onnx
insinto "${dir}/voices"
for voice in ${VOICES}; do
newins "${DISTDIR}/${P}-voice-${voice}.bin" "${voice}.bin"
done
}
|