项目地址https://github.com/ScrapeGraphAI/Scrapegraph-ai
from scrapegraphai.graphs import SpeechGraph
graph_config = {
"llm": {
"api_key": "OPENAI_API_KEY",
"model": "openai/gpt-3.5-turbo",
},
"tts_model": {
"api_key": "OPENAI_API_KEY",
"model": "tts-1",
"voice": "alloy"
},
"output_path": "audio_summary.mp3",
}
# ************************************************
# 创建 SpeechGraph 实例并运行
# ************************************************
speech_graph = SpeechGraph(
prompt="列出所有项目和其描述",
source="https://perinim.github.io/projects",
config=graph_config,
)
result = speech_graph.run()
print(result)
原文始发于微信公众号(军机故阁):开源AI爬虫工具
免责声明:文章中涉及的程序(方法)可能带有攻击性,仅供安全研究与教学之用,读者将其信息做其他用途,由读者承担全部法律及连带责任,本站不承担任何法律及连带责任;如有问题可邮件联系(建议使用企业邮箱或有效邮箱,避免邮件被拦截,联系方式见首页),望知悉。
- 左青龙
- 微信扫一扫
-
- 右白虎
- 微信扫一扫
-
评论