import json
import pathlib

root = pathlib.Path('/opt/ai-avatar-demo/models')
for cfg in root.glob('**/config.json'):
    try:
        obj = json.load(open(cfg, encoding='utf-8'))
    except Exception as e:
        print('CONFIG_READ_FAIL', cfg, repr(e))
        continue
    print('CONFIG', cfg)
    print('  tokenizer_type=', obj.get('tokenizer_type'))
    print('  tts_model_size=', obj.get('tts_model_size'))
    print('  tts_model_type=', obj.get('tts_model_type'))
    print('  model_type=', obj.get('model_type'))
