Skip to content

Commit

Permalink
use script for download
Browse files Browse the repository at this point in the history
  • Loading branch information
JarbasAl committed Dec 13, 2024
1 parent 6e11122 commit 2e961ed
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
6 changes: 1 addition & 5 deletions build_raspOVOS_ca.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,11 @@ echo "Caching pre-trained padatious intents..."
mkdir -p /home/$USER/.local/share/mycroft/intent_cache
cp -rv /mounted-github-repo/intent_cache/ca-ES /home/$USER/.local/share/mycroft/intent_cache/


echo "Installing Citrinet plugin..."
uv pip install ovos-stt-plugin-citrinet

echo "Downloading catalan citrinet model..."
huggingface-cli repo download projecte-aina/stt-ca-citrinet-512 --filename model.onnx --subdir onnx
huggingface-cli repo download projecte-aina/stt-ca-citrinet-512 --filename tokenizer.spm --subdir onnx
huggingface-cli repo download projecte-aina/stt-ca-citrinet-512 --filename preprocessor.ts --subdir onnx

python /mounted-github-repo/packages/download_citrinet_ca.py

# install matxa
echo "Installing Matxa TTS..."
Expand Down
9 changes: 9 additions & 0 deletions packages/download_citrinet_ca.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
from huggingface_hub import hf_hub_download

repo_id = "projecte-aina/stt-ca-citrinet-512"
subfolder = "onnx"

files = ["model.onnx", "tokenizer.spm", "preprocessor.ts"]
for file in files:
file_path = hf_hub_download(repo_id=repo_id, filename=file, subfolder=subfolder)
print(f"Downloaded {file} to {file_path}")

0 comments on commit 2e961ed

Please sign in to comment.