Function 语音合成(内容,音量,语速)
Dim _token,token,session,path,结果
结果 = zm.HttpGet("http://www.zaixianai.cn/voiceCompose", "utf-8", "/sdcard/Pictures/hccookie.txt", "")
_token = 取中间文本(结果, "var token=" & """", """" & ";")
session = 取中间文本(File.ReadLine("/sdcard/Pictures/hccookie.txt",6)&"*" , "laravel_session ", "*")
token = 取中间文本(File.ReadLine("/sdcard/Pictures/hccookie.txt", 5) & "*", "XSRF-TOKEN ", "*")
Dim 请求地址 = "http://www.zaixianai.cn/Api_getVoice"
Dim cookie="Hm_lpvt_d09fdf7e91f77cddf85908f081d4a3bc="&zm.Timestamp(GetNetworkTime())&";"&"Hm_lvt_d09fdf7e91f77cddf85908f081d4a3bc="&zm.Timestamp(GetNetworkTime())&";"&"laravel_session="&session&";"&"XSRF-TOKEN="&token
Dim 提交数据="content="&内容&"&volume="&音量&"&speech_rate="&语速&"&voice=Ninger&_token="&_token
Dim 合成结果
合成结果 = zm.HttpPost(请求地址,提交数据,"UTF-8","",cookie)
Dim msn=Split (合成结果,"""")
Dim surl = "http://www.zaixianai.cn/voice/"&msn(11)
path = "/sdcard/Pictures/" & msn(11)
zm.HttpDownload surl, path
语音合成 = path
End Function