这里写自定义目录标题
from aip import AipSpeech
App_Id= '24210534'
App_key = 'PWRScOGduqPC8ydkrowZ8iO8'
Secret_Key='WsBIEemK57GbTsgGmxEia94rlQaygYTg'
client = AipSpeech(App_Id,App_key,Secret_Key)
#print(client)
content ='一生一世一双人'
result = client.synthesis(content,'zh',1,{
'vol':5,
'spd':3,
'pit':9,
'per':1
})
print(result)
if not isinstance(result,dict):
with open('a.wav','wb') as f:
f.write(result)
在这里插入图片描述