Fix XTTS loader compatibility and add default voice
This commit is contained in:
@ -1,9 +1,14 @@
|
||||
print("DEBUG: Starting worker...", flush=True)
|
||||
import time, json, os
|
||||
print("DEBUG: Imported stdlib", flush=True)
|
||||
from core.queue_worker import fetch_job, store_result
|
||||
print("DEBUG: Imported queue_worker", flush=True)
|
||||
from engine.xtts2_loader import synthesize
|
||||
print("DEBUG: Imported xtts2_loader", flush=True)
|
||||
from engine.audio_export import convert_audio
|
||||
print("DEBUG: Imported audio_export", flush=True)
|
||||
|
||||
print("Worker gestartet. Warte auf Jobs…")
|
||||
print("Worker gestartet. Warte auf Jobs…", flush=True)
|
||||
|
||||
while True:
|
||||
job = fetch_job()
|
||||
@ -11,6 +16,13 @@ while True:
|
||||
time.sleep(0.1)
|
||||
continue
|
||||
|
||||
audio = synthesize(job)
|
||||
out, mime = convert_audio(audio, job.get("format","wav"))
|
||||
store_result(job["job_id"], out, mime)
|
||||
try:
|
||||
start = time.time()
|
||||
print(f"🔄 Processing Job {job['job_id']}...", flush=True)
|
||||
audio = synthesize(job)
|
||||
out, mime = convert_audio(audio, job.get("format","wav"))
|
||||
store_result(job["job_id"], out, mime)
|
||||
print(f"✅ Job {job['job_id']} done in {time.time()-start:.2f}s")
|
||||
except Exception as e:
|
||||
print(f"❌ Error processing job {job.get('job_id')}: {e}")
|
||||
# Optional: Store error state if protocol supports it
|
||||
|
||||
Reference in New Issue
Block a user