import json
import sys

p = '/opt/ai-avatar-demo/models/qwen3-tts-12hz-1b7-base/config.json'
try:
    obj = json.load(open(p, encoding='utf-8'))
    print('base_config=', p)
    for k in ['tokenizer_type', 'tts_model_size', 'tts_model_type', 'model_type', 'architectures']:
        print(k, '=', obj.get(k))
    if obj.get('tts_model_type') != 'base':
        print("ERROR: tts_model_type is not base!")
        sys.exit(1)
except Exception as e:
    print("ERROR:", repr(e))
    sys.exit(1)
