Skip to content

Commit 4dffe03

Browse files
committedJan 25, 2025
⚡️optimize: 更新ormsgpack版本至1.7.0,调整请求序列化方式,优化语音余额命令别名
1 parent e3e001a commit 4dffe03

File tree

5 files changed

+29
-29
lines changed

5 files changed

+29
-29
lines changed
 

‎nonebot_plugin_fishspeech_tts/fish_audio_api.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ async def generate_tts(self, request: ServeTTSRequest) -> bytes:
158158
self.api_url + "/v1/tts",
159159
headers=self.headers,
160160
content=ormsgpack.packb(
161-
request.dict(),
161+
request, option=ormsgpack.OPT_SERIALIZE_PYDANTIC
162162
),
163163
timeout=60,
164164
) as resp,

‎nonebot_plugin_fishspeech_tts/fish_speech_api.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ async def generate_tts(self, request: ServeTTSRequest) -> bytes:
9797
self.api_url,
9898
headers=self.headers,
9999
content=ormsgpack.packb(
100-
request.dict(),
100+
request, option=ormsgpack.OPT_SERIALIZE_PYDANTIC
101101
),
102102
timeout=120,
103103
)

‎nonebot_plugin_fishspeech_tts/matcher.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
speaker_list = on_command(
3636
"语音列表", aliases={"语音角色列表"}, block=True, rule=to_me()
3737
)
38-
balance = on_command("语音余额", block=True, rule=to_me())
38+
balance = on_command("语音余额", aliases={"我的余额"}, block=True, rule=to_me())
3939

4040

4141
@tts_handler.handle()

‎pdm.lock

+24-24
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎pyproject.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,13 @@ build-backend = "pdm.backend"
1010

1111
[project]
1212
name = "nonebot-plugin-fishspeech-tts"
13-
version = "0.3.8"
13+
version = "0.3.9"
1414
description = "小样本TTS,通过调用在线或本地api发送TTS语音"
1515
authors = [
1616
{name = "Cvandia",email = "106718176+Cvandia@users.noreply.github.com"},
1717
]
1818
dependencies = [
19-
"ormsgpack<2.0.0,>=1.6.0",
19+
"ormsgpack<2.0.0,>=1.7.0",
2020
"httpx>=0.27.0",
2121
"nonebot2>=2.2.0",
2222
"nonebot-plugin-alconna>=0.46.4",

0 commit comments

Comments
 (0)