Fix story maker bug

This commit is contained in:
wugren
2023-09-22 00:09:21 +08:00
parent 4e45130140
commit 5c2dd13ab2
10 changed files with 147 additions and 133 deletions
+2 -2
View File
@@ -83,9 +83,9 @@ class TextToSpeechFunction(AIFunction):
continue
if audio is not None:
path = os.path.join(os.curdir, "{}.mp3".format(random.sample('zyxwvutsrqponmlkjihgfedcba', 10)))
path = os.path.join(os.path.realpath(os.curdir), "{}.mp3".format(''.join(random.sample('zyxwvutsrqponmlkjihgfedcba', 10))))
audio.export(path, format="mp3")
return "complete.file path:{}".format(path)
return "已经生成音频文件, 文件路径为{}".format(path)
else:
return "failed"