This repository has been archived on 2026-08-19. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
ROCm-Research-Archive/_TestScripts/Scripts and Tests/_diag_tts.py
T
2026-08-20 00:45:43 +02:00

55 lines
1.5 KiB
Python

#!/usr/bin/env python3
"""Diagnose TTSEngine init inside qwen3-tts container."""
import sys, os, traceback
MODEL_DIR = "/models/qwen3-tts"
print("=== Step 1: Check model dir ===")
if os.path.isdir(MODEL_DIR):
for f in sorted(os.listdir(MODEL_DIR)):
fp = os.path.join(MODEL_DIR, f)
if os.path.isfile(fp):
print(f" {f} ({os.path.getsize(fp):,} bytes)")
else:
print(f" {f}/")
else:
print(f" ERROR: {MODEL_DIR} does not exist!")
sys.exit(1)
print("\n=== Step 2: Import qwen3_tts_gguf ===")
try:
import qwen3_tts_gguf
print(f" OK: {qwen3_tts_gguf.__file__}")
except Exception as e:
print(f" FAIL: {e}")
traceback.print_exc()
sys.exit(1)
print("\n=== Step 3: Import TTSEngine ===")
try:
from qwen3_tts_gguf.inference import TTSEngine
print(f" OK: {TTSEngine}")
except Exception as e:
print(f" FAIL: {e}")
traceback.print_exc()
sys.exit(1)
print("\n=== Step 4: Check inference bin dir ===")
bin_dir = os.path.join(os.path.dirname(qwen3_tts_gguf.__file__), "inference", "bin")
if os.path.isdir(bin_dir):
for f in sorted(os.listdir(bin_dir)):
print(f" {f}")
else:
print(f" WARN: {bin_dir} does not exist")
print("\n=== Step 5: Init TTSEngine ===")
try:
engine = TTSEngine(model_dir=MODEL_DIR)
print(f" OK: engine={engine}")
except Exception as e:
print(f" FAIL: {e}")
traceback.print_exc()
sys.exit(1)
print("\n=== DONE: Engine initialized successfully ===")