操作系统mac os
python 版本 python3.11
import edge_tts
import asyncio
TEXT = "how are you"
print(TEXT)
voice = 'zh-CN-YunxiNeural'
output = '4.mp3'
rate = '-4%'
volume = '+0%'
async def my_function():
tts = edge_tts.Communicate(text = TEXT,voice = voice,rate = rate,volume=volume)
await tts.save(output)
if __name__ == '__main__':
asyncio.run(my_function())
运行这个代码的时候报错
解决方法
完美解决