Fix publishing apks to huggingface (#1121)

Save APKs for each release in a separate directory.

Huggingface requires that each directory cannot contain more than 1000 files.

Since we have so many tts models and for each model we need to build APKs of 4 different ABIs,
it is a workaround for the huggingface's constraint by placing them into separate directories for different releases.
This commit is contained in:
Fangjun Kuang
2024-07-13 16:14:00 +08:00
committed by GitHub
parent 54e6e962bf
commit b5093e27f9
36 changed files with 123 additions and 60 deletions

View File

@@ -2,6 +2,8 @@ name: apk-asr-2pass
on:
push:
branches:
- apk
tags:
- 'v[0-9]+.[0-9]+.[0-9]+*'
@@ -160,14 +162,19 @@ jobs:
export GIT_LFS_SKIP_SMUDGE=1
export GIT_CLONE_PROTECTION_ACTIVE=false
SHERPA_ONNX_VERSION=$(grep "SHERPA_ONNX_VERSION" ./CMakeLists.txt | cut -d " " -f 2 | cut -d '"' -f 2)
echo "SHERPA_ONNX_VERSION $SHERPA_ONNX_VERSION"
git clone https://huggingface.co/csukuangfj/sherpa-onnx-apk huggingface
cd huggingface
git fetch
git pull
git merge -m "merge remote" --ff origin main
mkdir -p asr-2pass
cp -v ../apks/*.apk ./asr-2pass/
d=asr-2pass/$SHERPA_ONNX_VERSION
mkdir -p $d
cp -v ../apks/*.apk $d/
git status
git lfs track "*.apk"
git add .

View File

@@ -2,6 +2,8 @@ name: apk-asr
on:
push:
branches:
- apk
tags:
- 'v[0-9]+.[0-9]+.[0-9]+*'
@@ -160,14 +162,18 @@ jobs:
export GIT_LFS_SKIP_SMUDGE=1
export GIT_CLONE_PROTECTION_ACTIVE=false
SHERPA_ONNX_VERSION=$(grep "SHERPA_ONNX_VERSION" ./CMakeLists.txt | cut -d " " -f 2 | cut -d '"' -f 2)
echo "SHERPA_ONNX_VERSION $SHERPA_ONNX_VERSION"
git clone https://huggingface.co/csukuangfj/sherpa-onnx-apk huggingface
cd huggingface
git fetch
git pull
git merge -m "merge remote" --ff origin main
mkdir -p asr
cp -v ../apks/*.apk ./asr/
d=asr/$SHERPA_ONNX_VERSION
mkdir -p $d
cp -v ../apks/*.apk $d/
git status
git lfs track "*.apk"
git add .

View File

@@ -2,6 +2,8 @@ name: apk-audio-tagging-wearos
on:
push:
branches:
- apk
tags:
- 'v[0-9]+.[0-9]+.[0-9]+*'
@@ -160,14 +162,18 @@ jobs:
export GIT_LFS_SKIP_SMUDGE=1
export GIT_CLONE_PROTECTION_ACTIVE=false
SHERPA_ONNX_VERSION=$(grep "SHERPA_ONNX_VERSION" ./CMakeLists.txt | cut -d " " -f 2 | cut -d '"' -f 2)
echo "SHERPA_ONNX_VERSION $SHERPA_ONNX_VERSION"
git clone https://huggingface.co/csukuangfj/sherpa-onnx-apk huggingface
cd huggingface
git fetch
git pull
git merge -m "merge remote" --ff origin main
mkdir -p audio-tagging-wearos
cp -v ../apks/*.apk ./audio-tagging-wearos/
d=audio-tagging-wearos/$SHERPA_ONNX_VERSION
mkdir -p $d
cp -v ../apks/*.apk $d/
git status
git lfs track "*.apk"
git add .

View File

@@ -2,6 +2,8 @@ name: apk-audio-tagging
on:
push:
branches:
- apk
tags:
- 'v[0-9]+.[0-9]+.[0-9]+*'

View File

@@ -2,6 +2,8 @@ name: apk-kws
on:
push:
branches:
- apk
tags:
- 'v[0-9]+.[0-9]+.[0-9]+*'
@@ -157,14 +159,18 @@ jobs:
export GIT_LFS_SKIP_SMUDGE=1
export GIT_CLONE_PROTECTION_ACTIVE=false
SHERPA_ONNX_VERSION=$(grep "SHERPA_ONNX_VERSION" ./CMakeLists.txt | cut -d " " -f 2 | cut -d '"' -f 2)
echo "SHERPA_ONNX_VERSION $SHERPA_ONNX_VERSION"
git clone https://huggingface.co/csukuangfj/sherpa-onnx-apk huggingface
cd huggingface
git fetch
git pull
git merge -m "merge remote" --ff origin main
mkdir -p kws
cp -v ../apks/*.apk ./kws/
d=kws/$SHERPA_ONNX_VERSION
mkdir -p $d
cp -v ../apks/*.apk $d/
git status
git lfs track "*.apk"
git add .

View File

@@ -2,6 +2,8 @@ name: apk-speaker-identification
on:
push:
branches:
- apk
tags:
- 'v[0-9]+.[0-9]+.[0-9]+*'
@@ -98,14 +100,18 @@ jobs:
export GIT_LFS_SKIP_SMUDGE=1
export GIT_CLONE_PROTECTION_ACTIVE=false
SHERPA_ONNX_VERSION=$(grep "SHERPA_ONNX_VERSION" ./CMakeLists.txt | cut -d " " -f 2 | cut -d '"' -f 2)
echo "SHERPA_ONNX_VERSION $SHERPA_ONNX_VERSION"
git clone https://huggingface.co/csukuangfj/sherpa-onnx-apk huggingface
cd huggingface
git fetch
git pull
git merge -m "merge remote" --ff origin main
mkdir -p speaker-identification
cp -v ../apks/*.apk ./speaker-identification/
d=speaker-identification/$SHERPA_ONNX_VERSION
mkdir -p $d/
cp -v ../apks/*.apk $d/
git status
git lfs track "*.apk"
git add .

View File

@@ -2,6 +2,8 @@ name: apk-slid
on:
push:
branches:
- apk
tags:
- 'v[0-9]+.[0-9]+.[0-9]+*'
@@ -160,14 +162,18 @@ jobs:
export GIT_LFS_SKIP_SMUDGE=1
export GIT_CLONE_PROTECTION_ACTIVE=false
SHERPA_ONNX_VERSION=$(grep "SHERPA_ONNX_VERSION" ./CMakeLists.txt | cut -d " " -f 2 | cut -d '"' -f 2)
echo "SHERPA_ONNX_VERSION $SHERPA_ONNX_VERSION"
git clone https://huggingface.co/csukuangfj/sherpa-onnx-apk huggingface
cd huggingface
git fetch
git pull
git merge -m "merge remote" --ff origin main
mkdir -p slid
cp -v ../apks/*.apk ./slid/
d=slid/$SHERPA_ONNX_VERSION
mkdir -p $d/
cp -v ../apks/*.apk $d/
git status
git lfs track "*.apk"
git add .

View File

@@ -2,6 +2,8 @@ name: apk-tts-engine
on:
push:
branches:
- apk
tags:
- 'v[0-9]+.[0-9]+.[0-9]+*'
@@ -161,14 +163,18 @@ jobs:
export GIT_LFS_SKIP_SMUDGE=1
export GIT_CLONE_PROTECTION_ACTIVE=false
SHERPA_ONNX_VERSION=$(grep "SHERPA_ONNX_VERSION" ./CMakeLists.txt | cut -d " " -f 2 | cut -d '"' -f 2)
echo "SHERPA_ONNX_VERSION $SHERPA_ONNX_VERSION"
git clone https://huggingface.co/csukuangfj/sherpa-onnx-apk huggingface
cd huggingface
git fetch
git pull
git merge -m "merge remote" --ff origin main
mkdir -p tts-engine-2
cp -v ../apks/*.apk ./tts-engine-2/
d=tts-engine-new/$SHERPA_ONNX_VERSION
mkdir -p $d
cp -v ../apks/*.apk $d/
git status
git lfs track "*.apk"
git add .

View File

@@ -2,6 +2,8 @@ name: apk-tts
on:
push:
branches:
- apk
tags:
- 'v[0-9]+.[0-9]+.[0-9]+*'
@@ -161,14 +163,18 @@ jobs:
export GIT_LFS_SKIP_SMUDGE=1
export GIT_CLONE_PROTECTION_ACTIVE=false
SHERPA_ONNX_VERSION=$(grep "SHERPA_ONNX_VERSION" ./CMakeLists.txt | cut -d " " -f 2 | cut -d '"' -f 2)
echo "SHERPA_ONNX_VERSION $SHERPA_ONNX_VERSION"
git clone https://huggingface.co/csukuangfj/sherpa-onnx-apk huggingface
cd huggingface
git fetch
git pull
git merge -m "merge remote" --ff origin main
mkdir -p tts-2
cp -v ../apks/*.apk ./tts-2/
d=tts-new/$SHERPA_ONNX_VERSION
mkdir -p $d
cp -v ../apks/*.apk $d/
git status
git lfs track "*.apk"
git add .

View File

@@ -2,6 +2,8 @@ name: apk-vad-asr
on:
push:
branches:
- apk
tags:
- 'v[0-9]+.[0-9]+.[0-9]+*'
@@ -160,14 +162,18 @@ jobs:
export GIT_LFS_SKIP_SMUDGE=1
export GIT_CLONE_PROTECTION_ACTIVE=false
SHERPA_ONNX_VERSION=$(grep "SHERPA_ONNX_VERSION" ./CMakeLists.txt | cut -d " " -f 2 | cut -d '"' -f 2)
echo "SHERPA_ONNX_VERSION $SHERPA_ONNX_VERSION"
git clone https://huggingface.co/csukuangfj/sherpa-onnx-apk huggingface
cd huggingface
git fetch
git pull
git merge -m "merge remote" --ff origin main
mkdir -p vad-asr
cp -v ../apks/*.apk ./vad-asr/
d=vad-asr/$SHERPA_ONNX_VERSION
mkdir -p $d
cp -v ../apks/*.apk $d/
git status
git lfs track "*.apk"
git add .

View File

@@ -2,6 +2,8 @@ name: apk-vad
on:
push:
branches:
- apk
tags:
- 'v[0-9]+.[0-9]+.[0-9]+*'
@@ -157,14 +159,18 @@ jobs:
export GIT_LFS_SKIP_SMUDGE=1
export GIT_CLONE_PROTECTION_ACTIVE=false
SHERPA_ONNX_VERSION=$(grep "SHERPA_ONNX_VERSION" ./CMakeLists.txt | cut -d " " -f 2 | cut -d '"' -f 2)
echo "SHERPA_ONNX_VERSION $SHERPA_ONNX_VERSION"
git clone https://huggingface.co/csukuangfj/sherpa-onnx-apk huggingface
cd huggingface
git fetch
git pull
git merge -m "merge remote" --ff origin main
mkdir -p vad
cp -v ../apks/*.apk ./vad/
d=vad/SHERPA_ONNX_VERSION
mkdir -p $d
cp -v ../apks/*.apk $d/
git status
git lfs track "*.apk"
git add .