String 发音人选择, 0为女声,1为男声,
#3为情感合成-度逍遥,4为情感合成-度丫丫,默认为普通女 否
def wordToFileB():
print('开始转文件...else:
wordToFile(data,per,filepath)
flag = tkinter.messagebox.askokcancel('提示','转语音成功...1, {
'vol': vol,
'spd':spd,
'pit':pit,
'per':per
})
# 识别正确返回语音二进制...dict):
with open(filepath, 'wb') as f:
f.write(result)
tk = Tk()
tk.title('文字转语音...", command=wordToFileB).place(x=200,y=330)
Button(tk, text="播语音", command=playFileB).place(x=260,y=330