Skip to content

Commit

Permalink
Merge pull request #147 from Ikaros-521/owner
Browse files Browse the repository at this point in the history
修复edge-tts + so-vits-svc协同下,相对路径无法变声的bug
  • Loading branch information
Ikaros-521 authored Jul 21, 2023
2 parents 578f1b2 + 8be33f0 commit c8b52d5
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1152,6 +1152,9 @@ cmd输入命令即可:`doctoc /path/to/file`
- 新增本地问答库匹配 最低相似度配置,用于微调需要的关键词匹配度,已自定义触发灵敏度。
- 音频随机变速 GUI适配

### 2023-07-21
修复edge-tts + so-vits-svc协同下,相对路径无法变声的bug

</details>


Expand Down
6 changes: 6 additions & 0 deletions utils/audio.py
Original file line number Diff line number Diff line change
Expand Up @@ -400,6 +400,9 @@ async def voice_change_and_put_to_queue(voice_tmp_path):
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)

# 转换为绝对路径
voice_tmp_path = os.path.abspath(voice_tmp_path)

logging.info(f"edge-tts合成成功,输出到={voice_tmp_path}")

await voice_change_and_put_to_queue(voice_tmp_path)
Expand Down Expand Up @@ -778,6 +781,9 @@ async def voice_change_and_put_to_queue(voice_tmp_path):
communicate = edge_tts.Communicate(text=content, voice=edge_tts_config["voice"], rate=edge_tts_config["rate"], volume=edge_tts_config["volume"])
await communicate.save(voice_tmp_path)

# 转换为绝对路径
voice_tmp_path = os.path.abspath(voice_tmp_path)

logging.info(f"edge-tts合成成功,输出到={voice_tmp_path}")

await voice_change_and_put_to_queue(voice_tmp_path)
Expand Down

0 comments on commit c8b52d5

Please sign in to comment.