Skip to content

[BUG:API] 用相同的模型同样的语句在API和webui输出的效果不一样 #225

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

Open
3 tasks done
hhitdata opened this issue Apr 16, 2025 · 6 comments
Open
3 tasks done
Labels
bug Something isn't working

Comments

@hhitdata
Copy link

确认清单

  • 我已经阅读过 README.md 和 dependencies.md 文件
  • 我已经确认之前没有 issue 或 discussion 涉及此 BUG
  • 我已经确认问题发生在最新代码或稳定版本中

Forge Commit 或者 Tag

0.8.0-rc

Python 版本

3.10.16

PyTorch 版本

2.3.1+cu121

操作系统信息

Ubuntu 16.04.7 LTS

BUG 描述

用相同的模型同样的语句在API和webui输出的效果不一样,用的fishspeech,API的输出会很拖沓,语速很慢,有种慢放的感觉。用chattts就不会有这个问题。

BUG 端点

/v2/tts

复现参数

{
"text": "请注意,电梯将在下午两点进行例行维护,预计需要一个小时的时间,请大家在此期间使用楼梯。",
"spk": {
"from_spk_name": "mona"
},
"adjuct": {
"pitch": 0,
"speed_rate": 1
},
"encoder": {
"bitrate": "64k",
"format": "mp3",
"acodec": "libmp3lame"
},
"enhance": {
"enabled": true,
"model": "resemble-enhance"
},
"tts": {
"mid": "fishspeech",
"temperature": 0.3,
"top_p": 0.7,
"top_k": 20
},
"infer": {
"eos": ".。",
"batch_size": 8,
// "stream": true
}
}

期望结果

和webui的差不多

实际结果

同bug描述

错误信息

@hhitdata hhitdata added the bug Something isn't working label Apr 16, 2025
zhzLuke96 added a commit that referenced this issue Apr 16, 2025
- 修复 ffmpeg 参数覆盖问题
@zhzLuke96
Copy link
Member

fixed e257af3

编码器传参问题

@hhitdata
Copy link
Author

hhitdata commented Apr 17, 2025

感谢
现在chattts又变成倍速模式了。。

zhzLuke96 added a commit that referenced this issue Apr 17, 2025
- 修复 ffmpeg 参数覆盖问题
- 增加单测
- 增加 AudioHandler.get_sample_rate()
@zhzLuke96
Copy link
Member

fixed 12aa078

现在应该完全修复了,给这个case增加了单测

@hhitdata
Copy link
Author

报错
Traceback (most recent call last):
File "/mnt/disk1/chattts/Speech-AI-Forge/modules/api/v2/tts_api.py", line 113, in forge_text_synthesize
return await handler.enqueue_to_response()
File "/mnt/disk1/chattts/Speech-AI-Forge/modules/core/handler/AudioHandler.py", line 230, in enqueue_to_response
buffer = await self.enqueue_to_buffer()
File "/mnt/disk1/chattts/Speech-AI-Forge/modules/core/handler/AudioHandler.py", line 201, in enqueue_to_buffer
return io.BytesIO(audio_bytes)
TypeError: a bytes-like object is required, not 'coroutine'

zhzLuke96 added a commit that referenced this issue Apr 18, 2025
@zhzLuke96
Copy link
Member

fixed 99cc5d0

@hhitdata
Copy link
Author

fixed 99cc5d0

好了好了感谢

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants