Text Generation
GGUF
ONNX
English
conversational
text-to-speech
voice-cloning
offline
digital-twin
xtts
piper-tts
whisper
Instructions to use jlind456/jason-ai-twin with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use jlind456/jason-ai-twin with llama.cpp:
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible server with a web UI: llama serve -hf jlind456/jason-ai-twin # Run inference directly in the terminal: llama cli -hf jlind456/jason-ai-twin
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf jlind456/jason-ai-twin # Run inference directly in the terminal: llama cli -hf jlind456/jason-ai-twin
Use pre-built binary
# Download pre-built binary from: # https://github.com/ggerganov/llama.cpp/releases # Start a local OpenAI-compatible server with a web UI: ./llama-server -hf jlind456/jason-ai-twin # Run inference directly in the terminal: ./llama-cli -hf jlind456/jason-ai-twin
Build from source code
git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama-server -hf jlind456/jason-ai-twin # Run inference directly in the terminal: ./build/bin/llama-cli -hf jlind456/jason-ai-twin
Use Docker
docker model run hf.co/jlind456/jason-ai-twin
- LM Studio
- Jan
- vLLM
How to use jlind456/jason-ai-twin with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "jlind456/jason-ai-twin" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "jlind456/jason-ai-twin", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/jlind456/jason-ai-twin
- Ollama
How to use jlind456/jason-ai-twin with Ollama:
ollama run hf.co/jlind456/jason-ai-twin
- Unsloth Desktop
- Pi
How to use jlind456/jason-ai-twin with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf jlind456/jason-ai-twin
Configure the model in Pi
# Install Pi: npm install -g @earendil-works/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "llama-cpp": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "jlind456/jason-ai-twin" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use jlind456/jason-ai-twin with Docker Model Runner:
docker model run hf.co/jlind456/jason-ai-twin
- Lemonade
How to use jlind456/jason-ai-twin with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull jlind456/jason-ai-twin
Run and chat with the model
lemonade run user.jason-ai-twin-{{QUANT_TAG}}List all available models
lemonade list
- Hermes Agent
How to use jlind456/jason-ai-twin with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf jlind456/jason-ai-twin
Configure Hermes
# Install Hermes: curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash hermes setup # Point Hermes at the local server: hermes config set model.provider custom hermes config set model.base_url http://127.0.0.1:8080/v1 hermes config set model.default jlind456/jason-ai-twin
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use jlind456/jason-ai-twin with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf jlind456/jason-ai-twin
Configure OpenClaw
# Install OpenClaw: npm install -g openclaw@latest # Register the local server and set it as the default model: openclaw onboard --non-interactive --mode local \ --auth-choice custom-api-key \ --custom-base-url http://127.0.0.1:8080/v1 \ --custom-model-id "jlind456/jason-ai-twin" \ --custom-provider-id llama-cpp \ --custom-compatibility openai \ --custom-text-input \ --accept-risk \ --skip-health
Run OpenClaw
openclaw agent --local --agent main --message "Hello from Hugging Face"
Update AI Twin TTS with cloned voice support
Browse files- chat_twin.py +36 -2
chat_twin.py
CHANGED
|
@@ -20,6 +20,7 @@ import subprocess
|
|
| 20 |
import threading
|
| 21 |
import queue
|
| 22 |
import time
|
|
|
|
| 23 |
|
| 24 |
# --- ANSI Terminal Colors ---
|
| 25 |
C_BLUE = "\033[94m"
|
|
@@ -89,8 +90,11 @@ def clean_markdown(text):
|
|
| 89 |
text = re.sub(r'\s+', ' ', text)
|
| 90 |
return text.strip()
|
| 91 |
|
|
|
|
|
|
|
|
|
|
| 92 |
def speak_text(text):
|
| 93 |
-
"""Executes the TTS system commands to say the text."""
|
| 94 |
if not tts_config["enabled"]:
|
| 95 |
return
|
| 96 |
|
|
@@ -98,6 +102,34 @@ def speak_text(text):
|
|
| 98 |
if not clean_text:
|
| 99 |
return
|
| 100 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 101 |
# Prepare command for spd-say
|
| 102 |
if not tts_config["fallback_espeak"]:
|
| 103 |
cmd = ["spd-say", "-w"] # -w waits until speaking is finished
|
|
@@ -293,7 +325,9 @@ def main():
|
|
| 293 |
|
| 294 |
# If input is empty, enter Voice Input Mode
|
| 295 |
if not user_input:
|
| 296 |
-
|
|
|
|
|
|
|
| 297 |
|
| 298 |
# Start recording
|
| 299 |
record_proc = record_audio()
|
|
|
|
| 20 |
import threading
|
| 21 |
import queue
|
| 22 |
import time
|
| 23 |
+
import tempfile
|
| 24 |
|
| 25 |
# --- ANSI Terminal Colors ---
|
| 26 |
C_BLUE = "\033[94m"
|
|
|
|
| 90 |
text = re.sub(r'\s+', ' ', text)
|
| 91 |
return text.strip()
|
| 92 |
|
| 93 |
+
CLONED_SPEAKER_WAV = "/home/jason/local-tts/cloned_output.wav"
|
| 94 |
+
TTS_CMD = "/home/jason/anaconda3/envs/tts-backend/bin/tts"
|
| 95 |
+
|
| 96 |
def speak_text(text):
|
| 97 |
+
"""Executes the TTS system commands to say the text using cloned voice."""
|
| 98 |
if not tts_config["enabled"]:
|
| 99 |
return
|
| 100 |
|
|
|
|
| 102 |
if not clean_text:
|
| 103 |
return
|
| 104 |
|
| 105 |
+
# Attempt voice-cloned TTS using XTTS v2 and cloned_output.wav
|
| 106 |
+
if os.path.exists(TTS_CMD) and os.path.exists(CLONED_SPEAKER_WAV) and not tts_config.get("fallback_espeak", False):
|
| 107 |
+
try:
|
| 108 |
+
with tempfile.NamedTemporaryFile(suffix=".wav", delete=False) as tmp_file:
|
| 109 |
+
tmp_wav = tmp_file.name
|
| 110 |
+
|
| 111 |
+
cmd = [
|
| 112 |
+
TTS_CMD,
|
| 113 |
+
"--model_name", "tts_models/multilingual/multi-dataset/xtts_v2",
|
| 114 |
+
"--text", clean_text,
|
| 115 |
+
"--speaker_wav", CLONED_SPEAKER_WAV,
|
| 116 |
+
"--language_idx", "en",
|
| 117 |
+
"--out_path", tmp_wav,
|
| 118 |
+
"--use_cuda", "true"
|
| 119 |
+
]
|
| 120 |
+
res = subprocess.run(cmd, stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL, timeout=45)
|
| 121 |
+
if res.returncode == 0 and os.path.exists(tmp_wav):
|
| 122 |
+
play_res = subprocess.run(["paplay", tmp_wav], stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL)
|
| 123 |
+
if play_res.returncode != 0:
|
| 124 |
+
subprocess.run(["aplay", tmp_wav], stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL)
|
| 125 |
+
try:
|
| 126 |
+
os.remove(tmp_wav)
|
| 127 |
+
except Exception:
|
| 128 |
+
pass
|
| 129 |
+
return
|
| 130 |
+
except Exception:
|
| 131 |
+
pass
|
| 132 |
+
|
| 133 |
# Prepare command for spd-say
|
| 134 |
if not tts_config["fallback_espeak"]:
|
| 135 |
cmd = ["spd-say", "-w"] # -w waits until speaking is finished
|
|
|
|
| 325 |
|
| 326 |
# If input is empty, enter Voice Input Mode
|
| 327 |
if not user_input:
|
| 328 |
+
if os.path.exists("/home/jason/coral/mic_active.wav"):
|
| 329 |
+
subprocess.run(["aplay", "-q", "/home/jason/coral/mic_active.wav"], stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL)
|
| 330 |
+
print(f"{C_YELLOW}[🎙️ Mic Active - Recording... Press ENTER to stop recording]{C_RESET}", end="", flush=True)
|
| 331 |
|
| 332 |
# Start recording
|
| 333 |
record_proc = record_audio()
|