赞
踩
目录
https://github.com/rany2/edge-tts
在Python代码中使用Microsoft Edge的在线文本到语音服务
- import asyncio
- # pip install edge_tts
- import edge_tts
-
- TEXT = """给我放首我喜欢听的歌曲""" * 3
- VOICE = "zh-CN-liaoning-XiaobeiNeural"
- OUTPUT_FILE = "./test.mp3"
-
-
- async def _main() -> None:
- communicate = edge_tts.Communicate(TEXT, VOICE)
- await communicate.save(OUTPUT_FILE)
-
-
- if __name__ == "__main__":
- asyncio.run(_main())
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。