tts setup: detect libespeak-ng by file, ldconfig is not on a user's PATH
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
060b2351f7
commit
50fd4b1cad
1 changed files with 6 additions and 1 deletions
|
|
@ -8,7 +8,12 @@ cd "$(dirname "$0")"
|
||||||
|
|
||||||
missing=()
|
missing=()
|
||||||
command -v ffmpeg >/dev/null || missing+=(ffmpeg)
|
command -v ffmpeg >/dev/null || missing+=(ffmpeg)
|
||||||
ldconfig -p 2>/dev/null | grep -q libespeak-ng || missing+=(espeak-ng)
|
# libespeak-ng (comes with espeak-ng). Look for the file: ldconfig is in /sbin, not on a normal user's PATH
|
||||||
|
has_espeak() {
|
||||||
|
compgen -G '/usr/lib/*/libespeak-ng.so*' >/dev/null || compgen -G '/usr/lib*/libespeak-ng.so*' >/dev/null ||
|
||||||
|
/sbin/ldconfig -p 2>/dev/null | grep -q libespeak-ng
|
||||||
|
}
|
||||||
|
has_espeak || missing+=(espeak-ng)
|
||||||
python3 -c 'import venv, ensurepip' 2>/dev/null || missing+=(python3-venv)
|
python3 -c 'import venv, ensurepip' 2>/dev/null || missing+=(python3-venv)
|
||||||
if ((${#missing[@]})); then echo "First install: sudo apt install ${missing[*]}"; exit 1; fi
|
if ((${#missing[@]})); then echo "First install: sudo apt install ${missing[*]}"; exit 1; fi
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue