« CrispASR » : différence entre les versions
De Le Wiki de Lug
Autres actions
| (40 versions intermédiaires par le même utilisateur non affichées) | |||
| Ligne 6 : | Ligne 6 : | ||
# cd CrispASR | # cd CrispASR | ||
* On installe quelques dépendances avant la compilation ( activer [[Debian_APT#Dépôts_contrib_et_non-free|les dépôts contrib et non-free]] si nécessaire) : | * On installe quelques dépendances avant la compilation ( activer [[Debian_APT#Dépôts_contrib_et_non-free|les dépôts contrib et non-free]] si nécessaire) : | ||
# apt update | # apt update && apt upgrade | ||
# apt install libopencore-amrnb-dev libopencore-amrwb-dev libopus-dev libopusfile-dev libopenblas-dev ccache libfdk-aac-dev libsentencepiece-dev sentencepiece libopenblas-dev libnccl2 libnccl-dev libmp3lame-dev | # apt install libopencore-amrnb-dev libopencore-amrwb-dev libopus-dev libopusfile-dev libopenblas-dev ccache libfdk-aac-dev libsentencepiece-dev sentencepiece libopenblas-dev libnccl2 libnccl-dev libmp3lame-dev ffmpeg | ||
# ln -s /usr/lib/x86_64-linux-gnu/libopenblas.so /usr/local/lib/libcblas.so | # ln -s /usr/lib/x86_64-linux-gnu/libopenblas.so /usr/local/lib/libcblas.so | ||
# ldconfig | # ldconfig | ||
| Ligne 17 : | Ligne 17 : | ||
Version NVIDIA avec CUDA — nécessite l’installation préalable du CUDA Toolkit : | Version NVIDIA avec CUDA — nécessite l’installation préalable du CUDA Toolkit : | ||
# export CUDACXX=/usr/local/cuda-<font color=blue>13.3</font>/bin/nvcc | # export CUDACXX=/usr/local/cuda-<font color=blue>13.3</font>/bin/nvcc | ||
# cmake -B build -DCMAKE_BUILD_TYPE=Release -DGGML_CUDA=ON - | # cmake -B build -DCMAKE_BUILD_TYPE=Release -DGGML_CUDA=ON -DGGML_CUDA_FA_QUANTS=all -DGGML_LTO=ON | ||
Version Apple Silicon avec Metal : | Version Apple Silicon avec Metal : | ||
| Ligne 29 : | Ligne 29 : | ||
Les exécutables sont générés dans le répertoire <code>/opt/CrispASR/build/bin/</code>. | Les exécutables sont générés dans le répertoire <code>/opt/CrispASR/build/bin/</code>. | ||
=== Mise à jour === | |||
# cd /opt/CrispASR/ | |||
# rm -r build | |||
# git pull --recurse-submodules | |||
# export CUDACXX=/usr/local/cuda-<font color=blue>13.3</font>/bin/nvcc | |||
# cmake -B build -DCMAKE_BUILD_TYPE=Release -DGGML_CUDA=ON -DGGML_CUDA_FA_ALL_QUANTS=ON -DGGML_LTO=ON | |||
# cmake --build build -j$(nproc) | |||
=== Exemples === | === Exemples === | ||
==== Speech-to-Text ==== | ==== Speech-to-Text ==== | ||
| Ligne 44 : | Ligne 52 : | ||
Type=simple | Type=simple | ||
WorkingDirectory=/opt/CrispASR | WorkingDirectory=/opt/CrispASR | ||
Environment="CRISPASR_API_KEYS=<font color = blue>masuperclef</font>" | |||
ExecStart=/opt/CrispASR/build/bin/crispasr \ | ExecStart=/opt/CrispASR/build/bin/crispasr \ | ||
--server \ | --server \ | ||
| Ligne 61 : | Ligne 70 : | ||
| texte = | | texte = | ||
Parakeet est suffisamment léger pour fonctionner correctement sur CPU avec l’option <code>-ng</code>. Il est également possible de définir le nombre de threads CPU utilisés avec l’option <code>-t <font color="blue">N</font></code> ; la valeur par défaut est de 4. | Parakeet est suffisamment léger pour fonctionner correctement sur CPU avec l’option <code>-ng</code>. Il est également possible de définir le nombre de threads CPU utilisés avec l’option <code>-t <font color="blue">N</font></code> ; la valeur par défaut est de 4. | ||
}} | |||
{{Méta bandeau | |||
| niveau = modéré | |||
| icône = important | |||
| texte = | |||
La variable <code>Environment="CRISPASR_API_KEYS=<font color = blue>masuperclef</font>"</code> est facultative. Elle permet d’activer l’authentification par clé API sur le serveur CrispASR. Pour une utilisation avec Hermes, la valeur configurée ici doit être strictement identique à celle définie dans <code>VOICE_TOOLS_OPENAI_KEY</code>. | |||
}} | }} | ||
==== Text-to-Speech ==== | ==== Text-to-Speech ==== | ||
===== [https://huggingface.co/cstr/qwen3-tts-1.7b-base-GGUF Qwen3-TTS-12Hz-1.7B-Base] ===== | |||
Voir [[Client_Hugging_Face|Client Hugging Face]] | |||
# hf download cstr/qwen3-tts-1.7b-base-GGUF --include "*q8*.gguf" --local-dir /opt/models/tts/qwen3-tts-1.7b-base-GGUF/q8_0 | |||
# hf download cstr/qwen3-tts-tokenizer-12hz-GGUF --include "qwen3-tts-tokenizer-12hz.gguf" --local-dir /opt/models/tts/qwen3-tts-1.7b-base-GGUF/q8_0 | |||
# vi /etc/systemd/system/crispasr-tts.service | |||
[Unit] | |||
Description=CrispASR Text-to-Speech Server | |||
After=network.target | |||
[Service] | |||
Type=simple | |||
WorkingDirectory=/opt/CrispASR | |||
Environment="CRISPASR_API_KEYS=<font color = blue>masuperclef</font>" | |||
ExecStart=/opt/CrispASR/build/bin/crispasr \ | |||
--server \ | |||
--backend qwen3-tts \ | |||
-m /opt/models/tts/qwen3-tts-1.7b-base-GGUF/q8_0/qwen3-tts-12hz-1.7b-base-q8_0.gguf \ | |||
--codec-model /opt/models/tts/qwen3-tts-1.7b-base-GGUF/q8_0/qwen3-tts-tokenizer-12hz.gguf \ | |||
--voice-dir /opt/voices \ | |||
--i-have-rights \ | |||
--language <font color="blue">fr</font> \ | |||
--host <font color="blue">0.0.0.0</font> \ | |||
--tts-pad-silence-ms <font color="blue">0</font> \ | |||
--tts-cfg-scale <font color="blue">1</font> \ | |||
--tts-steps <font color="blue">32</font> \ | |||
--port <font color="blue">7981</font> | |||
Restart=on-failure | |||
RestartSec=5 | |||
[Install] | |||
WantedBy=multi-user.target | |||
{{Méta bandeau | |||
| niveau = information | |||
| icône = important | |||
| texte = | |||
Ce modèle est fourni sans voix. Il est donc nécessaire de placer un fichier WAV ainsi que sa transcription au format TXT dans le dossier <code>/opt/voices</code> (par exemple : <code>henriette.wav</code> et <code>henriette.txt</code>). | |||
}} | |||
{{Méta bandeau | |||
| niveau = modéré | |||
| icône = important | |||
| texte = | |||
La variable <code>Environment="CRISPASR_API_KEYS=<font color = blue>masuperclef</font>"</code> est facultative. Elle permet d’activer l’authentification par clé API sur le serveur CrispASR. Pour une utilisation avec Hermes, la valeur configurée ici doit être strictement identique à celle définie dans <code>VOICE_TOOLS_OPENAI_KEY</code>. | |||
}} | |||
{{Méta bandeau | |||
| niveau = information | |||
| icône = loupe | |||
| texte = | |||
<code>--tts-pad-silence-ms</code> : Ajoute un silence au début du fichier audio généré. Utile pour compenser le buffer de lecture, le resampling ou les artefacts de démarrage du codec. Mesure en millisecondes. Par défaut 0. | |||
<code>--tts-cfg-scale</code> : Échelle de guidance classifier-free pour la synthèse vocale. Contrôle à quel point le modèle suit strictement le texte et la voix de référence. Valeur >1 renforce la fidélité, valeur <1 donne plus de liberté créative. | |||
<code>---tts-steps</code> : nombre d’étapes de diffusion/ODE. Plus = plus lent mais plus propre. | |||
}} | |||
===== [https://huggingface.co/cstr/qwen3-tts-0.6b-base-GGUF Qwen3-TTS-12Hz-0.6B-Base] ===== | |||
Voir [[Client_Hugging_Face|Client Hugging Face]] | |||
# hf download cstr/qwen3-tts-0.6b-base-GGUF --include "*q8_0*.gguf" --local-dir /opt/models/tts/qwen3-tts-0.6b-base-GGUF/q8_0 | |||
# hf download cstr/qwen3-tts-tokenizer-12hz-GGUF --include "qwen3-tts-tokenizer-12hz.gguf" --local-dir /opt/models/tts/qwen3-tts-0.6b-base-GGUF/q8_0 | |||
# vi /etc/systemd/system/crispasr-tts.service | |||
[Unit] | |||
Description=CrispASR Text-to-Speech Server | |||
After=network.target | |||
[Service] | |||
Type=simple | |||
WorkingDirectory=/opt/CrispASR | |||
Environment="CRISPASR_API_KEYS=<font color = blue>masuperclef</font>" | |||
ExecStart=/opt/CrispASR/build/bin/crispasr \ | |||
--server \ | |||
--backend qwen3-tts \ | |||
-m /opt/models/tts/qwen3-tts-0.6b-base-GGUF/q8_0/qwen3-tts-12hz-0.6b-base-q8_0.gguf \ | |||
--codec-model /opt/models/tts/qwen3-tts-0.6b-base-GGUF/q8_0/qwen3-tts-tokenizer-12hz.gguf \ | |||
--voice-dir /opt/voices \ | |||
--i-have-rights \ | |||
--language <font color="blue">fr</font> \ | |||
--host <font color="blue">0.0.0.0</font> \ | |||
--tts-pad-silence-ms <font color="blue">200</font> \ | |||
--tts-cfg-scale <font color="blue">1</font> \ | |||
--tts-steps <font color="blue">32</font> \ | |||
--port <font color="blue">7981</font> | |||
Restart=on-failure | |||
RestartSec=5 | |||
[Install] | |||
WantedBy=multi-user.target | |||
{{Méta bandeau | |||
| niveau = information | |||
| icône = important | |||
| texte = | |||
Ce modèle est fourni sans voix. Il est donc nécessaire de placer un fichier WAV ainsi que sa transcription au format TXT dans le dossier <code>/opt/voices</code> (par exemple : <code>henriette.wav</code> et <code>henriette.txt</code>). | |||
}} | |||
{{Méta bandeau | |||
| niveau = modéré | |||
| icône = important | |||
| texte = | |||
La variable <code>Environment="CRISPASR_API_KEYS=<font color = blue>masuperclef</font>"</code> est facultative. Elle permet d’activer l’authentification par clé API sur le serveur CrispASR. Pour une utilisation avec Hermes, la valeur configurée ici doit être strictement identique à celle définie dans <code>VOICE_TOOLS_OPENAI_KEY</code>. | |||
}} | |||
{{Méta bandeau | |||
| niveau = information | |||
| icône = loupe | |||
| texte = | |||
<code>--tts-pad-silence-ms</code> : Ajoute un silence au début du fichier audio généré. Utile pour compenser le buffer de lecture, le resampling ou les artefacts de démarrage du codec. Mesure en millisecondes. Par défaut 0. | |||
<code>--tts-cfg-scale</code> : Échelle de guidance classifier-free pour la synthèse vocale. Contrôle à quel point le modèle suit strictement le texte et la voix de référence. Valeur >1 renforce la fidélité, valeur <1 donne plus de liberté créative. | |||
<code>---tts-steps</code> : nombre d’étapes de diffusion/ODE. Plus = plus lent mais plus propre. | |||
}} | |||
===== [https://huggingface.co/cstr/chatterbox-GGUF Chatterbox] ===== | ===== [https://huggingface.co/cstr/chatterbox-GGUF Chatterbox] ===== | ||
{{Méta bandeau | |||
| niveau = grave | |||
| icône = important | |||
| texte = | |||
Informations vérifiées le 23/07/2026. La compatibilité avec CrispASR semble actuellement limitée. Le modèle est trop lourd pour une utilisation en temps réel avec un chatbot, mais offre une très bonne qualité audio. | |||
}} | |||
Voir [[Client_Hugging_Face|Client Hugging Face]] | Voir [[Client_Hugging_Face|Client Hugging Face]] | ||
# hf download cstr/chatterbox-GGUF --include "*q8_0*.gguf" --local-dir /opt/models/tts | # hf download cstr/chatterbox-GGUF --include "*q8_0*.gguf" --local-dir /opt/models/tts/chatterbox-GGUF/q8_0 | ||
----- | ----- | ||
* Installer des voix : | * Installer des voix : | ||
| Ligne 102 : | Ligne 235 : | ||
--server \ | --server \ | ||
--backend chatterbox \ | --backend chatterbox \ | ||
-m /opt/models/tts | -m /opt/models/tts/chatterbox-GGUF/q8_0/chatterbox-t3-q8_0.gguf \ | ||
--codec-model /opt/models/tts | --codec-model /opt/models/tts/chatterbox-GGUF/q8_0/chatterbox-s3gen-q8_0.gguf \ | ||
--voice-dir /opt/voices \ | |||
--i-have-rights \ | |||
--language <font color="blue">fr</font> \ | |||
--host <font color="blue">0.0.0.0</font> \ | |||
--port <font color="blue">7981</font> | |||
Restart=on-failure | |||
RestartSec=5 | |||
[Install] | |||
WantedBy=multi-user.target | |||
===== [https://huggingface.co/cstr/omnivoice-GGUF OmniVoice] ===== | |||
{{Méta bandeau | |||
| niveau = grave | |||
| icône = important | |||
| texte = | |||
Informations vérifiées le 23/07/2026. Basé sur Qwen3-TTS, ce modèle offre des performances et une qualité similaires, mais ne semble pas capable de conserver une voix fixe, probablement en raison d’un bug. | |||
}} | |||
Voir [[Client_Hugging_Face|Client Hugging Face]] | |||
# hf download cstr/omnivoice-GGUF --include "*q8_0*.gguf" --local-dir /opt/models/tts/omnivoice-GGUF/q8_0 | |||
# vi /etc/systemd/system/crispasr-tts.service | |||
[Unit] | |||
Description=CrispASR Text-to-Speech Server | |||
After=network.target | |||
[Service] | |||
Type=simple | |||
WorkingDirectory=/opt/CrispASR | |||
ExecStart=/opt/CrispASR/build/bin/crispasr \ | |||
--server \ | |||
--backend omnivoice \ | |||
-m /opt/models/tts/omnivoice-GGUF/q8_0/omnivoice-q8_0.gguf \ | |||
--codec-model /opt/models/tts/omnivoice-GGUF/q8_0/omnivoice-tokenizer-q8_0.gguf \ | |||
--voice-dir /opt/voices \ | --voice-dir /opt/voices \ | ||
--i-have-rights \ | --i-have-rights \ | ||
Dernière version du 23 octobre 2026 à 18:06
Installation
- On récupère le projet :
# cd /opt/ # git clone --recurse-submodules https://github.com/CrispStrobe/CrispASR # cd CrispASR
- On installe quelques dépendances avant la compilation ( activer les dépôts contrib et non-free si nécessaire) :
# apt update && apt upgrade # apt install libopencore-amrnb-dev libopencore-amrwb-dev libopus-dev libopusfile-dev libopenblas-dev ccache libfdk-aac-dev libsentencepiece-dev sentencepiece libopenblas-dev libnccl2 libnccl-dev libmp3lame-dev ffmpeg # ln -s /usr/lib/x86_64-linux-gnu/libopenblas.so /usr/local/lib/libcblas.so # ldconfig
- On configure la compilation en choisissant le backend adapté au matériel utilisé.
Version CPU :
# cmake -B build -DCMAKE_BUILD_TYPE=Release
Version NVIDIA avec CUDA — nécessite l’installation préalable du CUDA Toolkit :
# export CUDACXX=/usr/local/cuda-13.3/bin/nvcc # cmake -B build -DCMAKE_BUILD_TYPE=Release -DGGML_CUDA=ON -DGGML_CUDA_FA_QUANTS=all -DGGML_LTO=ON
Version Apple Silicon avec Metal :
# cmake -B build -DCMAKE_BUILD_TYPE=Release -DGGML_METAL=ON
Version Vulkan — nécessite l’installation préalable des bibliothèques et outils de développement Vulkan :
# cmake -B build -DCMAKE_BUILD_TYPE=Release -DGGML_VULKAN=ON
- On lance ensuite la compilation :
# cmake --build build -j$(nproc)
Les exécutables sont générés dans le répertoire /opt/CrispASR/build/bin/.
Mise à jour
# cd /opt/CrispASR/ # rm -r build # git pull --recurse-submodules # export CUDACXX=/usr/local/cuda-13.3/bin/nvcc # cmake -B build -DCMAKE_BUILD_TYPE=Release -DGGML_CUDA=ON -DGGML_CUDA_FA_ALL_QUANTS=ON -DGGML_LTO=ON # cmake --build build -j$(nproc)
Exemples
Speech-to-Text
Voir Client Hugging Face
# hf download cstr/parakeet-tdt-0.6b-v3-GGUF --include "*q8_0*.gguf" --local-dir /opt/models/stt/parakeet-tdt-0.6b-v3/q8_0
# vi /etc/systemd/system/crispasr-stt.service
[Unit]
Description=CrispASR Speech-to-Text Server
After=network.target
[Service]
Type=simple
WorkingDirectory=/opt/CrispASR
Environment="CRISPASR_API_KEYS=masuperclef"
ExecStart=/opt/CrispASR/build/bin/crispasr \
--server \
--backend parakeet \
-m /opt/models/stt/parakeet-tdt-0.6b-v3/q8_0/parakeet-tdt-0.6b-v3-q8_0.gguf \
--language auto \
--host 0.0.0.0 \
--port 7980
Restart=on-failure
RestartSec=5
[Install]
WantedBy=multi-user.target
Text-to-Speech
Voir Client Hugging Face
# hf download cstr/qwen3-tts-1.7b-base-GGUF --include "*q8*.gguf" --local-dir /opt/models/tts/qwen3-tts-1.7b-base-GGUF/q8_0 # hf download cstr/qwen3-tts-tokenizer-12hz-GGUF --include "qwen3-tts-tokenizer-12hz.gguf" --local-dir /opt/models/tts/qwen3-tts-1.7b-base-GGUF/q8_0
# vi /etc/systemd/system/crispasr-tts.service
[Unit]
Description=CrispASR Text-to-Speech Server
After=network.target
[Service]
Type=simple
WorkingDirectory=/opt/CrispASR
Environment="CRISPASR_API_KEYS=masuperclef"
ExecStart=/opt/CrispASR/build/bin/crispasr \
--server \
--backend qwen3-tts \
-m /opt/models/tts/qwen3-tts-1.7b-base-GGUF/q8_0/qwen3-tts-12hz-1.7b-base-q8_0.gguf \
--codec-model /opt/models/tts/qwen3-tts-1.7b-base-GGUF/q8_0/qwen3-tts-tokenizer-12hz.gguf \
--voice-dir /opt/voices \
--i-have-rights \
--language fr \
--host 0.0.0.0 \
--tts-pad-silence-ms 0 \
--tts-cfg-scale 1 \
--tts-steps 32 \
--port 7981
Restart=on-failure
RestartSec=5
[Install]
WantedBy=multi-user.target
Voir Client Hugging Face
# hf download cstr/qwen3-tts-0.6b-base-GGUF --include "*q8_0*.gguf" --local-dir /opt/models/tts/qwen3-tts-0.6b-base-GGUF/q8_0 # hf download cstr/qwen3-tts-tokenizer-12hz-GGUF --include "qwen3-tts-tokenizer-12hz.gguf" --local-dir /opt/models/tts/qwen3-tts-0.6b-base-GGUF/q8_0
# vi /etc/systemd/system/crispasr-tts.service
[Unit]
Description=CrispASR Text-to-Speech Server
After=network.target
[Service]
Type=simple
WorkingDirectory=/opt/CrispASR
Environment="CRISPASR_API_KEYS=masuperclef"
ExecStart=/opt/CrispASR/build/bin/crispasr \
--server \
--backend qwen3-tts \
-m /opt/models/tts/qwen3-tts-0.6b-base-GGUF/q8_0/qwen3-tts-12hz-0.6b-base-q8_0.gguf \
--codec-model /opt/models/tts/qwen3-tts-0.6b-base-GGUF/q8_0/qwen3-tts-tokenizer-12hz.gguf \
--voice-dir /opt/voices \
--i-have-rights \
--language fr \
--host 0.0.0.0 \
--tts-pad-silence-ms 200 \
--tts-cfg-scale 1 \
--tts-steps 32 \
--port 7981
Restart=on-failure
RestartSec=5
[Install]
WantedBy=multi-user.target
Voir Client Hugging Face
# hf download cstr/chatterbox-GGUF --include "*q8_0*.gguf" --local-dir /opt/models/tts/chatterbox-GGUF/q8_0
- Installer des voix :
# mkdir /opt/voices
Fichier .wav avec un nom de personnalité dans le dossier /opt/voices
Optionnellement on joint le fichier de la transcription exacte de l’enregistrement, exemple :
# vi /opt/voices/henriette.txt
bla bla bla
GGUF : :
cd /opt/CrispASR python3 -m venv .venv-chatterbox source .venv-chatterbox/bin/activate pip install --upgrade pip pip install numpy source /opt/CrispASR/.venv-chatterbox/bin/activate pip install torch torchaudio --index-url https://download.pytorch.org/whl/cu128 pip install chatterbox-tts pip install gguf
# python models/bake-chatterbox-voice-from-wav.py --input /opt/voices/henriette.wav --output /opt/voices/henriette.gguf
# vi /etc/systemd/system/crispasr-tts.service
[Unit]
Description=CrispASR Text-to-Speech Server
After=network.target
[Service]
Type=simple
WorkingDirectory=/opt/CrispASR
ExecStart=/opt/CrispASR/build/bin/crispasr \
--server \
--backend chatterbox \
-m /opt/models/tts/chatterbox-GGUF/q8_0/chatterbox-t3-q8_0.gguf \
--codec-model /opt/models/tts/chatterbox-GGUF/q8_0/chatterbox-s3gen-q8_0.gguf \
--voice-dir /opt/voices \
--i-have-rights \
--language fr \
--host 0.0.0.0 \
--port 7981
Restart=on-failure
RestartSec=5
[Install]
WantedBy=multi-user.target
Voir Client Hugging Face
# hf download cstr/omnivoice-GGUF --include "*q8_0*.gguf" --local-dir /opt/models/tts/omnivoice-GGUF/q8_0
# vi /etc/systemd/system/crispasr-tts.service
[Unit]
Description=CrispASR Text-to-Speech Server
After=network.target
[Service]
Type=simple
WorkingDirectory=/opt/CrispASR
ExecStart=/opt/CrispASR/build/bin/crispasr \
--server \
--backend omnivoice \
-m /opt/models/tts/omnivoice-GGUF/q8_0/omnivoice-q8_0.gguf \
--codec-model /opt/models/tts/omnivoice-GGUF/q8_0/omnivoice-tokenizer-q8_0.gguf \
--voice-dir /opt/voices \
--i-have-rights \
--language fr \
--host 0.0.0.0 \
--port 7981
Restart=on-failure
RestartSec=5
[Install]
WantedBy=multi-user.target