diff options
author | wasertech | 2023-09-12 23:56:19 +0200 |
---|---|---|
committer | wasertech | 2023-09-12 23:56:19 +0200 |
commit | b77724a050ee83dbc2981ff281f5bb3a8941af12 (patch) | |
tree | 7fa538f367c197cbd4b2b9749fa56c1abc032083 | |
parent | 75e8b96dddc1db6fbcf7b02ae4effd369f132fd2 (diff) | |
download | aur-b77724a050ee83dbc2981ff281f5bb3a8941af12.tar.gz |
update TTS v0.166.1
-rw-r--r-- | .SRCINFO | 72 | ||||
-rw-r--r-- | PKGBUILD | 210 |
2 files changed, 111 insertions, 171 deletions
@@ -1,43 +1,49 @@ -pkgbase = python-tts - pkgdesc = Deep learning for Text to Speech by Coqui. - pkgver = 0.8.0 - pkgrel = 00 +pkgbase = tts + pkgdesc = Coqui-TSS for inference + pkgver = 0.16.1 + pkgrel = 1 url = https://github.com/coqui-ai/TTS arch = any license = MPL2 - depends = python - depends = python-anyascii - depends = python-coqpit + makedepends = python-build + makedepends = python-installer + makedepends = python-wheel depends = cython - depends = python-flask - depends = python-fsspec - depends = python-gruut - depends = python-jieba - depends = python-librosa - depends = python-matplotlib - depends = python-numba + depends = python depends = python-numpy - depends = python-pandas - depends = pypinyin - depends = python-pysbd - depends = python-pyworld - depends = python-yaml depends = python-scipy - depends = python-soundfile depends = python-pytorch depends = python-torchaudio + depends = python-soundfile + depends = python-librosa + depends = python-numba + depends = python-inflect depends = python-tqdm - depends = python-coqui-trainer - depends = python-umap-learn - depends = python-unidic-lite - depends = python-requests - depends = python-six - optdepends = python-mecab - source = PKGBUILD_EXTRAS - source = https://files.pythonhosted.org/packages/67/99/6c20d7d05ba1b790ecf630c966339575f1e1ba1de99180cfb6cd0cdef613/TTS-0.8.0.tar.gz - source = LICENSE - md5sums = SKIP - md5sums = 4cf8c77a5153de2c7ce78c03d1098264 - md5sums = 815ca599c9df247a0c7f619bab123dad + depends = python-anyascii + depends = python-yaml + depends = python-fsspec + depends = python-aiohttp + depends = python-packaging + depends = python-flask + depends = python-pysbd + optdepends = python-umap-learn: for notebooks + optdepends = python-pandas: for notebooks + optdepends = python-matplotlib: for training + optdepends = python-coqui-trainer: for training + optdepends = python-coqpit: for configuration + optdepends = python-gruut: for german, spanish, french + optdepends = python-jieba: for chinese + optdepends = pypinyin: for chinese + optdepends = python-mecab: for japanese + optdepends = python-unidic-lite: for japanese + optdepends = python-jamo-git: for korean + optdepends = python-nltk: for korean + optdepends = python-einops: for tortoise + optdepends = python-transformers: for tortoise + provides = tts + conflicts = python-tts + options = !strip + source = https://github.com/coqui-ai/TTS/archive/refs/tags/v0.16.1.tar.gz + sha256sums = 83f8edc34dd5e7a4c07d75866417753d82cac6dc9acfec92015be598ff44bc78 -pkgname = python-tts +pkgname = tts @@ -1,143 +1,77 @@ # Maintainer: Danny Waser (Waser Technologies) <waser@waser.tech> - -export PIP_CONFIG_FILE=/dev/null -export PIP_DISABLE_PIP_VERSION_CHECK=true - -pkgname=python-tts -epoch= -pkgver=0.8.0 -pkgrel=00 -pkgdesc='Deep learning for Text to Speech by Coqui.' -arch=(any) -url=https://github.com/coqui-ai/TTS -license=(MPL2) -depends=(python python-anyascii python-coqpit cython python-flask python-fsspec python-gruut python-jieba python-librosa python-matplotlib python-numba python-numpy python-pandas pypinyin python-pysbd python-pyworld python-yaml python-scipy python-soundfile python-pytorch python-torchaudio python-tqdm python-coqui-trainer python-umap-learn python-unidic-lite) -depends+=(python-requests python-six) -optdepends=(python-mecab) -makedepends=() -checkdepends=() -provides=() -conflicts=(${provides%=*}) # No quotes, to avoid an empty entry. -source=(PKGBUILD_EXTRAS) -md5sums=(SKIP) -noextract=() -source+=(https://files.pythonhosted.org/packages/67/99/6c20d7d05ba1b790ecf630c966339575f1e1ba1de99180cfb6cd0cdef613/TTS-0.8.0.tar.gz) -md5sums+=(4cf8c77a5153de2c7ce78c03d1098264) -source+=(LICENSE) -md5sums+=(815ca599c9df247a0c7f619bab123dad) - -_first_source() { - echo " ${source_i686[@]} ${source_x86_64[@]} ${source[@]}" | - tr ' ' '\n' | grep -Pv '^(PKGBUILD_EXTRAS)?$' | head -1 -} - -_vcs="$(grep -Po '^[a-z]+(?=\+)' <<< "$(_first_source)")" -if [[ "$_vcs" ]]; then - makedepends+=("$(pkgfile --quiet /usr/bin/$_vcs)") - provides+=("${pkgname%-$_vcs}") - conflicts+=("${pkgname%-$_vcs}") -fi - -_is_wheel() { - [[ $(_first_source) =~ \.whl$ ]] -} - -if [[ _is_wheel && - $(basename "$(_first_source)" | rev | cut -d- -f1 | rev) =~ ^manylinux ]]; then - options=(!strip) # https://github.com/pypa/manylinux/issues/119 -fi - -_dist_name() { - find "$srcdir" -mindepth 1 -maxdepth 1 -type d -printf '%f -' | - grep -v '^_tmpenv$' +# Maintainer: AlphaJack <alphajack at tuta dot io> + +pkgname="tts" +pkgver=0.16.1 +pkgrel=1 +pkgdesc="Coqui-TSS for inference" +url="https://github.com/coqui-ai/TTS" +license=("MPL2") +arch=("any") +provides=("tts") +conflicts=("python-tts") +depends=("cython" + "python" + "python-numpy" + "python-scipy" + "python-pytorch" + "python-torchaudio" + "python-soundfile" + "python-librosa" + "python-numba" + "python-inflect" + "python-tqdm" + "python-anyascii" + "python-yaml" + "python-fsspec" + "python-aiohttp" + "python-packaging" + "python-flask" + "python-pysbd" + ) +makedepends=("python-build" "python-installer" "python-wheel") +optdepends=("python-umap-learn: for notebooks" + "python-pandas: for notebooks" + "python-matplotlib: for training" + "python-coqui-trainer: for training" + "python-coqpit: for configuration" + "python-gruut: for german, spanish, french" + "python-jieba: for chinese" + "pypinyin: for chinese" + "python-mecab: for japanese" + "python-unidic-lite: for japanese" + "python-jamo-git: for korean" + "python-nltk: for korean" + #"python-g2pkk: for korean" + #"python-bangla: for bangla" + #"python-bnnumerizer: for bangla" + #"python-bnunicodenormalizer: for bangla" + #"python-k_diffusion: for tortoise" + "python-einops: for tortoise" + "python-transformers: for tortoise" +) +options=("!strip") +source=("https://github.com/coqui-ai/TTS/archive/refs/tags/v$pkgver.tar.gz") +sha256sums=('83f8edc34dd5e7a4c07d75866417753d82cac6dc9acfec92015be598ff44bc78') + +prepare(){ + # remove hardcoded versions + sed -i "TTS-$pkgver/setup.py" \ + -e "s|3.11|4.0|g" + sed -i "TTS-$pkgver/requirements.txt" \ + -re "s|cython==[0-9]+\.[0-9]+\.[0-9]+|cython|g" \ + -re "s|numpy==[0-9]+\.[0-9]+\.[0-9]+|numpy|g" + sed -i "TTS-$pkgver/pyproject.toml" \ + -re "s|cython==[0-9]+\.[0-9]+\.[0-9]+|cython|g" \ + -re "s|numpy==[0-9]+\.[0-9]+\.[0-9]+|numpy|g" } -if [[ $(_first_source) =~ ^git+ ]]; then - _pkgver() { - ( set -o pipefail - cd "$srcdir/$(_dist_name)" - git describe --long --tags 2>/dev/null | - sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g' || - printf "r%s.%s" \ - "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" - ) - } - - pkgver() { _pkgver; } -fi - -_build() { - if _is_wheel; then return; fi - cd "$srcdir" - # See Arch Wiki/PKGBUILD/license. - # Get the first filename that matches. - local test_name - if [[ ${license[0]} =~ ^(BSD|MIT|ZLIB|Python)$ ]]; then - for test_name in LICENSE LICENSE.txt license.txt COPYING COPYING.md COPYING.rst COPYING.txt COPYRIGHT; do - if cp "$srcdir/$(_dist_name)/$test_name" "$srcdir/LICENSE" 2>/dev/null; then - break - fi - done - fi - # Use the latest version of pip, as Arch's version is historically out of - # date(!) and newer versions do fix bugs (sometimes). - python -mvenv --clear --system-site-packages _tmpenv - _tmpenv/bin/pip --quiet install -U pip - # Build the wheel (which we allow to fail) only after fetching the license. - # In order to isolate from ~/.pydistutils.cfg, we need to set $HOME to a - # temporary directory, and thus first $XDG_CACHE_HOME back to its real - # location, so that pip inserts the wheel in the wheel cache. We cannot - # use --global-option=--no-user-cfg instead because that fully disables - # wheels, causing a from-source build of build dependencies such as - # numpy/scipy. - XDG_CACHE_HOME="${XDG_CACHE_HOME:-"$HOME/.cache"}" HOME=_tmpenv \ - _tmpenv/bin/pip wheel -v --no-deps --wheel-dir="$srcdir" \ - "./$(_dist_name)" || true -} - -build() { _build; } - -_check() { - # Define check(), possibly using _check as a helper, to run the tests. - # You may need to call `python setup.py build_ext -i` first. - if _is_wheel; then return; fi - cd "$srcdir/$(_dist_name)" - /usr/bin/python setup.py -q test +build(){ + cd "TTS-$pkgver" + python -m build --wheel --no-isolation } -_package() { - cd "$srcdir" - # pypa/pip#3063: pip always checks for a globally installed version. - python -mvenv --clear --system-site-packages _tmpenv - _tmpenv/bin/pip install --prefix="$pkgdir/usr" \ - --no-deps --ignore-installed --no-warn-script-location \ - "$(ls ./*.whl 2>/dev/null || echo ./"$(_dist_name)")" - if [[ -d "$pkgdir/usr/bin" ]]; then # Fix entry points. - python="#!$(readlink -f _tmpenv)/bin/python" - for f in "$pkgdir/usr/bin/"*; do - # Like [[ "$(head -n1 "$f")" = "#!$(readlink -f _tmpenv)/bin/python" ]] - # but without bash warning on null bytes in "$f" (if it is actually - # a compiled executable, not an entry point). - if python -c 'import os, sys; sys.exit(not open(sys.argv[1], "rb").read().startswith(os.fsencode(sys.argv[2]) + b"\n"))' "$f" "$python"; then - sed -i '1c#!/usr/bin/python' "$f" - fi - done - fi - if [[ -d "$pkgdir/usr/etc" ]]; then - mv "$pkgdir/usr/etc" "$pkgdir/etc" - fi - if [[ -f LICENSE ]]; then - install -D -m644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE" - fi -} - -package() { _package; } - -. "$(dirname "$BASH_SOURCE")/PKGBUILD_EXTRAS" - -# Remove makedepends already in depends (which may have been listed for the -# first build, but autodetected on the second. -makedepends=($(printf '%s\n' "${makedepends[@]}" | - grep -Pwv "^($(IFS='|'; echo "${depends[*]}"))$")) -: # Apparently ending with makedepends assignment sometimes fails. +package(){ + cd "TTS-$pkgver" + python -m installer --destdir="$pkgdir" dist/*.whl +}
\ No newline at end of file |