Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AttributeError: 'dict' object has no attribute 'temperature' #6

Open
chengwen0926 opened this issue Jan 28, 2025 · 1 comment
Open

Comments

@chengwen0926
Copy link

正常启动TTS在后台监听,执行GenerateAudio.py脚本时显示缺少“temperature”

File "C:\Users\dell\anaconda3\envs\tts\lib\site-packages\ChatTTS\core.py", line 471, in _infer_code
if not isinstance(params.temperature, list):
AttributeError: 'dict' object has no attribute 'temperature'�

@chengwen0926
Copy link
Author

【已解决】参考ChatTTS项目中Advanced Usage的部分,将params_infer_code的赋值方式改一下

params_infer_code = ChatTTS.Chat.InferCodeParams(
spk_emb = rand_spk, # add sampled speaker
temperature = .3, # using custom temperature
top_P = 0.7, # top P decode
top_K = 20, # top K decode
)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant