This file contains hidden or 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/bash | |
| mkdir piper | |
| cd piper | |
| python3 -m venv ./venv # créer un nouvel environnement virtuel python3 vierge | |
| source ./venv/bin/activate # se placer dans l'environnement virtuel (change des var d'environnement dans le shell courant) | |
| python3 -m pip install piper-tts # installer le module python localement dans le ./venv | |
| wget -q https://huggingface.co/Trelis/piper-fr-fr-siwis-medium/resolve/main/model.onnx | |
| wget -q https://huggingface.co/Trelis/piper-fr-fr-siwis-medium/resolve/main/model.onnx.json | |
| ls -lh model.onnx* | |
| # Autres modèles français disponbiles: https://huggingface.co/rhasspy/piper-voices/tree/main/fr/fr_FR |
This file contains hidden or 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/bash | |
| kwriteconfigapplets() { | |
| # TODO security: sanitinize args, check that $c $i are really in [0-9]+ | |
| plugin="$1"; subgroups="$2"; key="$3"; value="$4" | |
| file=plasma-org.kde.plasma.desktop-appletsrc | |
| read -r c i < <(awk -v pluginre="^plugin=$plugin" \ | |
| 'match($0, /^\[Containments\]\[([0-9]+)\]\[Applets\]\[([0-9]+)\]/, a) {c=a[1]; i=a[2]} $0~pluginre { print c,i }' \ | |
| ~/.config/$file ) | |
| if [[ -n "$c" && -n "$i" ]]; then |