Skip to content

[Bug]阿里云TTS使用 cosyvoice-v2 会出现错误 #2553

@Melody0v0

Description

@Melody0v0

发生了什么

model填“cosyvoice-v2”,这时候无论语音合成模型选择哪个,都会报错

如何复现?

  1. 点击「服务提供商」
  2. 新增服务提供商
  3. 选择阿里云TTS服务
  4. model填“cosyvoice-v2”

AstrBot 版本、部署方式(如 Windows Docker Desktop 部署)、使用的提供商、使用的消息平台适配器

Docker部署

操作系统

Windows

报错日志

[23:33:19] [Core] [ERRO] [routes.config:272]: Error testing TTS provider aliyun: a bytes-like object is required, not 'NoneType'
Traceback (most recent call last):
File "/AstrBot/astrbot/dashboard/routes/config.py", line 265, in _test_single_provider
audio_result = await provider.get_audio("你好")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/AstrBot/astrbot/core/provider/sources/dashscope_tts.py", line 40, in get_audio
f.write(audio)
TypeError: a bytes-like object is required, not 'NoneType'

你愿意提交 PR 吗?

  • 是的,我愿意提交 PR!

Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions