Assistante vocale manga overlay — Avatar animé multi-GIF + Whisper local + NVIDIA Nemotron (cloud) + TTS pré-enregistré
| Fonction | Techno |
|---|---|
| Reconnaissance vocale (STT) | faster-whisper base (local, CPU, int8) |
| LLM Conversation | nvidia/nemotron-mini-4b-instruct via NVIDIA NIM API (gratuit, ~100-200 tok/s) |
| Synthèse vocale (TTS) | WAV pré-enregistrés (clone vocal Qwen3-TTS, style anime JP → texte FR) |
| Actions système | YouTube, Terminal, LibreOffice, Gmail, YouTube Music, Discord, Navigateur, VS Code, Kimi AI, Zer0Cod, GitHub, Hugging Face, Telegram, pi-cli, qwen-cli |
| Émotions | 10+ émotions détectées (love, happy, excited, sad, confused, thinking, blush, proud, cute, surprised) |
| Interface | PyQt6 overlay frameless, always-on-top, 12 GIFs animés, bulle chat, barre de saisie |
| Avatar GIF | Rotation aléatoire 3s au repos + GIF spécifique par action (retour auto 5s) |
| Hotkey globale | Ctrl+Shift+Z (via xbindkeys) |
| Entrée texte | Barre de chat intégrée |
| Navigateur | Firefox (défaut système via webbrowser) |
| Fermeture | Touche Échap ou bouton ✕ rouge |
- Linux (testé Ubuntu/Debian/Arch)
- Python 3.10+
- PipeWire (
pw-play) pour l'audio xbindkeyspour le hotkey global- Microphone fonctionnel
cd /home/k00/Bureau/zerochan
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt# Ubuntu/Debian
sudo apt install python3-venv portaudio19-dev libportaudio2 xbindkeys
# Arch
sudo pacman -S python portaudio xbindkeys- Va sur build.nvidia.com
- Connecte-toi → Get API Key → Génère une clé
- Exporte-la :
export NVIDIA_API_KEY="nvapi-TA_CLE_ICI"(Ajoute au ~/.bashrc ou ~/.zshrc pour persistance)
Le dossier audio_zerochan/ doit contenir les WAV organisés ainsi :
audio_zerochan/
├── action/ # youtube_open, terminal_open, spotify_open, etc.
├── emotions/ # happy, sad, excited, love, thinking, etc.
├── errors/ # error, not_found, cancelled, confirm, sorry, thanks
├── greetings/ # hello, hey, bye, good_morning, good_night, welcome_back
├── music/ # (optionnel)
└── system/ # startup, listening, processing, shutdown, volume_*
Les WAV fournis sont générés via Qwen3-TTS (voice cloning) sur HF Space
wordercom-qwen3-tts.
Place tes fichiers image.gif, image1.gif ... image11.gif dans le dossier du projet.
- 12 GIFs détectés automatiquement (
image*.gif) - Tri numérique :
image.gif(0) →image1.gif(1) → ... →image11.gif(11)
cd /home/k00/Bureau/zerochan
export NVIDIA_API_KEY="nvapi-TA_CLE_ICI"
python3 zerochan.pyDouble-clic sur Zero-chan.desktop sur le Bureau.
La clé API est embarquée dans le lanceur.
| Action | Raccourci / UI |
|---|---|
| Parler (micro) | Ctrl+Shift+Z (maintenu 5s max) |
| Taper un message | Clic dans la barre → texte → Entrée ou ✨ |
| Micro bouton | Clic sur 🎤 dans l'UI |
| Fermer (clavier) | Touche Échap |
| Fermer (souris) | Clic sur bouton ✕ rouge (barre de chat) |
| Commande | Action | GIF |
|---|---|---|
"ouvre youtube" / "regarde vidéo" |
Ouvre YouTube (recherche optionnelle) | image1.gif |
"ouvre terminal" / "lance console" |
Ouvre un terminal | image2.gif |
"ouvre libreoffice" / "éditeur" |
Ouvre Mousepad/LibreOffice | image3.gif |
"ouvre gmail" / "mail" |
Ouvre Gmail (nouveau message) | image4.gif |
"joue musique" / "mets du Korn" |
YouTube Music (détecte artiste: Korn, SOAD, Slipknot, LP, Limp Bizkit) | image5.gif |
"ouvre discord" |
Discord Web | image6.gif |
"ouvre navigateur" / "chrome" / "firefox" |
image7.gif |
|
"ouvre vscode" / "code" |
VS Code (ou vscode.dev) | image8.gif |
"ouvre kimi" |
Kimi AI (https://kimi.com) | image7.gif |
"ouvre zerocod" |
Zer0Cod.desktop (fallback VS Code) | image8.gif |
"ouvre github" |
GitHub.com | image7.gif |
"ouvre huggingface" |
HuggingFace.co | image7.gif |
"ouvre telegram" |
Telegram Web | image7.gif |
"ouvre pi" / "pi-cli" |
Lance pi dans un terminal |
image9.gif |
"ouvre qwen" / "qwen-cli" |
Lance qwen dans un terminal |
image10.gif |
Tout le reste = Discussion libre avec Nemotron (personnalité Zero-chan anime/metal/kawaii)
zerochan.py # App principale (PyQt6, hotkey, pipeline audio, GIFs)
zerobrain_nvidia.py # Cerveau : Whisper (STT) + NVIDIA Nemotron (LLM) + Plugin Registry
actions/ # Plugins d'actions (YAML)
│ ├── web.yaml # YouTube, GitHub, HuggingFace, Kimi, Telegram, Gmail, Navigateur
│ ├── system.yaml # Terminal, VS Code, LibreOffice, Discord
│ ├── dev.yaml # pi-cli, qwen-cli, Zer0Cod
│ └── music.yaml # YouTube Music + détection artistes
plugins/
│ └── loader.py # Chargeur de plugins (ActionRegistry, ActionPlugin)
audio_zerochan/ # WAV TTS organisés par catégorie
image*.gif # 12 Avatars animés (image.gif à image11.gif)
venv/ # Environnement Python isolé
Zero-chan.desktop # Lanceur Bureau (sans terminal)
requirements.txt # Dépendances Python
README.md # Cette doc
LICENSE # MIT License
Micro (16kHz) → Whisper (local) → Texte
↓
Nemotron-mini-4B (NVIDIA NIM cloud) → Réponse + Détection action/émotion/GIF
↓
Exécution action (webbrowser/subprocess) → WAV contextuel (pw-play)
↓
Affichage bulle + GIF spécifique (3s) → Retour rotation aléatoire (5s)
NVIDIA_MODEL = "nvidia/nemotron-mini-4b-instruct" # Rapide, 4B
# Alternatives gratuites :
# "nvidia/nvidia-nemotron-nano-9b-v2" # 9B, plus récent
# "meta/llama-3.1-8b-instruct" # Standard
# "nv-mistralai/mistral-nemo-12b-instruct" # 12B, excellent FRWHISPER_MODEL = "base" # tiny, base, small, medium, large-v3
WHISPER_DEVICE = "cpu" # ou "cuda" si GPU dispo
WHISPER_COMPUTE = "int8" # int8, int8_float16, float16, float32self.gif_timer.start(3000) # Rotation aléatoire : 3 secondes
# Retour auto après action : 5 secondes (QTimer.singleShot(5000, ...))# Modifie la ligne xbindkeys :
f'"/usr/bin/touch {trigger_path}"',
" Ctrl+Shift+Z", # ← Change ici (ex: Ctrl+Alt+Z)Les actions sont maintenant définies dans des fichiers YAML dans le dossier actions/ :
actions/
├── web.yaml # YouTube, GitHub, HuggingFace, Kimi, Telegram, Gmail, Navigateur
├── system.yaml # Terminal, VS Code, LibreOffice, Discord
├── dev.yaml # pi-cli, qwen-cli, Zer0Cod
└── music.yaml # YouTube Music avec détection d'artistes
Ajouter une action sans toucher au code :
- Crée/modifie un fichier dans
actions/(ex:actions/custom.yaml) - Ajoute ton action :
# actions/custom.yaml
actions:
- id: open_reddit
name: "Reddit"
category: "web"
triggers:
- reddit
- r/
url: "https://reddit.com/"
gif_index: 7
wav: "action/browser_open.wav"
response: "📱 Reddit ouvert ! Quelle subreddit ? 🤔"- Redémarre Zero-chan →
"ouvre reddit"fonctionne direct !
Types d'actions supportés :
| Type | category | Utilisation |
|---|---|---|
web |
web | Ouvre URL (webbrowser.open) |
music |
music | YouTube Music + détection artistes |
system |
system | Lance commande locale (subprocess) |
terminal |
dev | Lance dans terminal ({terminal} -e cmd) |
desktop |
dev | Lance .desktop (gtk-launch) |
Champs disponibles : triggers, url/url_template, command/command_template, terminals, fallback_command, desktop_name, desktop_paths, gif_index, wav, fallback_wav, response, fallback_response, artists (music), priority (ordre de priorité).
| Problème | Solution |
|---|---|
NVIDIA_API_KEY non définie |
export NVIDIA_API_KEY="nvapi-..." dans le même terminal |
pw-play: not found |
sudo apt install pipewire-audio-client-libraries |
xbindkeys ne marche pas |
pkill xbindkeys && xbindkeys + vérifie ~/.xbindkeysrc |
| Micro muet | pavucontrol → onglet "Entrée" → bon device + volume |
| Whisper lent | Réduis WHISPER_MODEL="tiny" ou passe device="cuda" |
| GIF non animé | Vérifie n_frames > 1 avec PIL |
| Firefox pas défaut | xdg-settings set default-web-browser firefox.desktop |
| Lanceur ne marche pas | Clic droit → Propriétés → Permissions → "Autoriser l'exécution" |
faster-whisper
openai
numpy
sounddevice
PyQt6
PillowMIT License — voir LICENSE
- NVIDIA — Nemotron models & NIM API gratuite
- faster-whisper — STT local performant
- Qwen3-TTS — Voice cloning (HF Space
wordercom-qwen3-tts) - PyQt6 — GUI overlay
- Phi-3 / Nemotron — Modèles de base
- Support multi-langues (Whisper
language=Noneauto-détect) - Streaming LLM (tokens progressifs dans la bulle)
- TTS local (piper, kokoro, bark) pour zéro cloud
- Mode "always listening" avec VAD (Silero)
- OverlayWayland (wlr-layer-shell) pour Hyprland/Sway
- GIFs spécifiques pour émotions (love, angry, sad, etc.)
- Hot-reload des plugins YAML sans redémarrer (QFileSystemWatcher)
Fait avec ❤️ pour les fans d'anime & de metal 🤘🎸
