--- language: - en license: mit library_name: gguf pipeline_tag: text-generation tags: - gguf - conversational - text-generation - text-to-speech - voice-cloning - offline - digital-twin - xtts - piper-tts - whisper --- # Jason AI Twin (Offline Digital Twin & Cloned Voice) An offline, privacy-first AI Digital Twin architecture featuring quantized local LLM reasoning, custom knowledge bases, GPU-accelerated speech recognition, and neural voice cloning. ## 🎙️ Cloned Voice & Audio Assets The AI Twin features neural voice cloning sourced from `/local-tts`: * **`cloned_output.wav`**: High-fidelity cloned voice reference sample synthesized from Jason's voice profile. Used as the primary speaker reference for zero-shot Coqui XTTS v2 voice synthesis. * **`cloned_sample2.wav`**: Second verified neural synthesis sample generated with Coqui XTTS v2 on CUDA using Jason's vocal profile ("The voice cloning matrix is fully operational..."). * **`my_voice_clean.wav`**: Cleaned, noise-reduced studio vocal sample of Jason's voice (22.05 kHz PCM) for fine-tuning and voice cloning alignment. * **`amy.onnx` / `amy.onnx.json`**: Ultra-fast, low-latency ONNX voice model for Piper TTS fallback. --- ## 🧠 Brain & Models * **`digital_twin_q4.gguf`**: Q4_K_M quantized LLM brain (`jason_twin`) trained and adapted on Jason's communication style, knowledge bases, and preferences. * **`Modelfile`**: Ollama configuration for launching `jason_twin` locally with optimized system prompt, temperature, and context length. --- ## 🚀 Interactive CLI Client (`chat_twin.py`) The repository includes [chat_twin.py](chat_twin.py), an interactive voice and text terminal client: * **Two-Way Voice Interaction**: Press `[ENTER]` on an empty prompt to record your voice; local Whisper (`openai/whisper-tiny.en`) transcribes it with GPU acceleration. * **Neural Voice Synthesis**: Speaks responses back in Jason's cloned voice using local XTTS v2 (`--speaker_wav cloned_output.wav`). * **Multi-Engine Fallback**: Gracefully falls back to Piper ONNX, `spd-say`, or `espeak-ng` if GPU voice cloning is unavailable. ### In-Chat Commands: | Command | Action | | :--- | :--- | | `/voice cloned` | Activate Jason's cloned voice from `/local-tts` | | `/voice ` | Switch to system voices (`male1`, `male2`, `female1`, etc.) | | `/rate ` | Adjust speech rate (-100 to 100) | | `/tts on\|off` | Toggle Text-to-Speech output | | `/stop` or `/s` | Immediately silence current speech output | | `/clear` or `/c` | Reset conversation context and clear terminal | | `/help` or `/h` | Display digital twin command menu | | `/exit` | Exit the application | --- ## 🛠️ Quickstart ### 1. Run via Ollama ```bash ollama create jason_twin -f Modelfile ollama run jason_twin ``` ### 2. Run Interactive Voice Twin CLI ```bash # Ensure dependencies are installed pip install TTS transformers torch torchaudio # Launch voice chat client python3 chat_twin.py ``` ### 3. Desktop Shortcut On Ubuntu systems, launch directly via the included `AI_Twin.desktop` or: ```bash ./launch_twin.sh ```