Skip to content

Commit

Permalink
fix: 修改 edge-tts 的默认发音人
Browse files Browse the repository at this point in the history
  • Loading branch information
wzpan committed Apr 25, 2023
1 parent e18bc67 commit eba4ff7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion robot/TTS.py
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,7 @@ class EdgeTTS(AbstractTTS):

SLUG = "edge-tts"

def __init__(self, voice="Tingting", **args):
def __init__(self, voice="zh-CN-XiaoxiaoNeural", **args):
super(self.__class__, self).__init__()
self.voice = voice

Expand Down
8 changes: 4 additions & 4 deletions robot/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -300,10 +300,10 @@ def validyaml(filename):
:returns: True: 正确; False: 不正确
"""
try:
f = open(filename)
str = f.read()
yaml.safe_load(str)
return True
with open(filename) as f:
str = f.read()
yaml.safe_load(str)
return True
except Exception:
return False

Expand Down

0 comments on commit eba4ff7

Please sign in to comment.