Skip to content

Commit

Permalink
Merge pull request #171 from Ikaros-521/owner
Browse files Browse the repository at this point in the history
去除edge-tts部分,对合成内容空格转逗号,英语方面兼容性会好一些
  • Loading branch information
Ikaros-521 authored Jul 28, 2023
2 parents 576f315 + d854b29 commit 124c788
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion utils/audio.py
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,7 @@ async def voice_change_and_put_to_queue(voice_tmp_path):
try:
voice_tmp_path = './out/' + self.common.get_bj_time(4) + '.mp3'
# 过滤" '字符
message["content"] = message["content"].replace('"', '').replace("'", '').replace(" ", ',')
message["content"] = message["content"].replace('"', '').replace("'", '')
# 使用 Edge TTS 生成回复消息的语音文件
communicate = edge_tts.Communicate(text=message["content"], voice=message["data"]["voice"], rate=message["data"]["rate"], volume=message["data"]["volume"])
await communicate.save(voice_tmp_path)
Expand Down

0 comments on commit 124c788

Please sign in to comment.