JARVIS: asistente de voz local para Linux
Nucleo propio: oye con whisper.cpp, piensa con un modelo de Ollama, habla con Piper, y hace RAG sobre los apuntes del usuario. 100% local, sin cuentas ni claves. Escrito bajo una restriccion dura, 4 GB de VRAM: el cerebro y whisper comparten tarjeta y solo caben porque estan dimensionados para ello. El RAG usa embeddings estaticos con busqueda hibrida; la voz clonada se sirve de una cache de frases. Incluye instalador (install.sh), requisitos, y documentacion del stack, del manejo de root y de las acciones. Los apuntes indexados y el diario NO se incluyen: son privados y el .gitignore los bloquea.
This commit is contained in:
commit
8e4bc8ad94
125 changed files with 25033 additions and 0 deletions
33
voz/clonar_prueba.py
Normal file
33
voz/clonar_prueba.py
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
#!/usr/bin/env python3
|
||||
# Prueba de clonacion con XTTS-v2. Clona la voz de ref/jarvis_ref.wav y sintetiza
|
||||
# unas frases de prueba en espanol. Mide el tiempo por frase (GPU vs CPU).
|
||||
import os, sys, time
|
||||
os.environ.setdefault("COQUI_TOS_AGREED", "1") # aceptar licencia CPML no interactivo
|
||||
|
||||
DISPOSITIVO = sys.argv[1] if len(sys.argv) > 1 else "cuda"
|
||||
REF = os.path.join(os.path.dirname(__file__), "ref", "jarvis_ref.wav")
|
||||
SALIDA = os.path.join(os.path.dirname(__file__), "ref", "muestras")
|
||||
os.makedirs(SALIDA, exist_ok=True)
|
||||
|
||||
FRASES = [
|
||||
"Buenas noches, señor. Todo está listo.",
|
||||
"He encontrado tres ficheros que coinciden. ¿Cuál abro?",
|
||||
"El procesador está a sesenta y un grados y quedan cuarenta gigabytes de memoria.",
|
||||
]
|
||||
|
||||
print(f"cargando XTTS-v2 en {DISPOSITIVO}...", flush=True)
|
||||
t0 = time.time()
|
||||
import torch
|
||||
from TTS.api import TTS
|
||||
tts = TTS("tts_models/multilingual/multi-dataset/xtts_v2").to(DISPOSITIVO)
|
||||
print(f" modelo cargado en {time.time()-t0:.1f} s", flush=True)
|
||||
|
||||
for i, frase in enumerate(FRASES, 1):
|
||||
t0 = time.time()
|
||||
dst = os.path.join(SALIDA, f"prueba_{DISPOSITIVO}_{i}.wav")
|
||||
tts.tts_to_file(text=frase, speaker_wav=REF, language="es", file_path=dst)
|
||||
dur = time.time() - t0
|
||||
print(f" [{i}] {dur:5.1f} s -> {dst}", flush=True)
|
||||
print(f" «{frase}»", flush=True)
|
||||
|
||||
print("listo.", flush=True)
|
||||
Loading…
Add table
Add a link
Reference in a new issue