Last active
April 12, 2022 06:01
-
-
Save dardo82/7aab074e5c5d8257d9de2aab2b547e84 to your computer and use it in GitHub Desktop.
VOSK API install
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
curl -L -O github.com/alphacep/vosk-api/archive/refs/heads/master.zip | |
unzip master.zip; rm master.zip; cd vosk-api-master/python/example; pwd | |
curl -L -O alphacephei.com/kaldi/models/vosk-model-small-en-us-0.15.zip | |
curl -L -O alphacephei.com/kaldi/models/vosk-model-small-it-0.4.zip | |
unzip *-model-*-en-*.zip; unzip *-model-*-it-*.zip; rm *.zip; cd ${0%/*} | |
pwd; chmod +x vosk-srt.sh; cp -v vosk-srt.sh /usr/local/bin/vosk-srt | |
sudo mv -v $OLDPWD $(pip show vosk | awk '/Loc/{print $2}')/vosk-api |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
DIR="$(pip show vosk | awk '/Loc/{print $2}')/vosk-api" | |
FILE="$([ ${2%%/*} ] && echo $PWD/$2 || echo $2)"; cd "$DIR"; rm model | |
LANG="$1"; ln -s vosk-model-small-$LANG-* model; ./test_srt.py "$FILE" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment