Files
2024-07-23 21:49:42 +08:00

10 lines
258 B
Python
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import aip
import os
f = open("audio.mp3", 'wb')
client = aip.AipSpeech("Enter Your APP_ID", "Enter Your API_KEY", "Enter Your SECRET_KEY")
f.write(client.synthesis("步行导航开始直行后前方50米右转", options={}))
os.startfile("audio.mp3")