This content is still in French
The page itself is translated, but its detailed content is not yet. Hardware sheets, guides and catalogues are still shown in French: we would rather give you the original than a rough machine translation. View the French site
Dictée et lecture à voix haute, sans connexion
Étape 5 sur 6
Assembler la borne vocale
bash
#!/usr/bin/env bash
# borne-vocale.sh — appuyez sur Entrée, parlez, écoutez la réponse
set -euo pipefail
WHISPER=~/whisper.cpp
PIPER=~/piper
MODELE_LLM=qwen3:4b
while true; do
read -rp "Entrée pour parler (5 s), Ctrl+C pour quitter... "
arecord -f S16_LE -r 16000 -c 1 -d 5 /tmp/question.wav 2>/dev/null
question=$("$WHISPER"/build/bin/whisper-cli \
-m "$WHISPER"/models/ggml-small.bin -l fr -nt -f /tmp/question.wav 2>/dev/null)
echo "Vous : $question"
reponse=$(ollama run "$MODELE_LLM" "Réponds en deux phrases maximum. $question")
echo "SATI : $reponse"
echo "$reponse" | "$PIPER"/piper -m "$PIPER"/fr_FR-siwis-medium.onnx -f /tmp/reponse.wav
aplay -q /tmp/reponse.wav
done
shell
chmod +x borne-vocale.sh
./borne-vocale.sh