Skip to content

Commit 4bf90f3

Browse files
committed
docs: fixed speechgraphexample
1 parent ae5655f commit 4bf90f3

File tree

1 file changed

+19
-10
lines changed

1 file changed

+19
-10
lines changed

README.md

Lines changed: 19 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@
88
[![](https://dcbadge.vercel.app/api/server/gkxQDAjfeX)](https://discord.gg/gkxQDAjfeX)
99

1010

11-
ScrapeGraphAI is a *web scraping* python library that uses LLM and direct graph logic to create scraping pipelines for websites, documents and XML files.
11+
ScrapeGraphAI is a *web scraping* python library that uses LLM and direct graph logic to create scraping pipelines for websites and local documents (XML, HTML, JSON, etc.).
12+
1213
Just say which information you want to extract and the library will do it for you!
1314

1415
<p align="center">
@@ -136,26 +137,34 @@ The output will be a list of recipes like the following:
136137
You just need to pass the OpenAI API key and the model name.
137138

138139
```python
139-
from scrapegraphai.graphs import SmartScraperGraph
140+
from scrapegraphai.graphs import SpeechGraph
140141

141-
# Define the configuration for the graph
142142
graph_config = {
143143
"llm": {
144144
"api_key": "OPENAI_API_KEY",
145145
"model": "gpt-3.5-turbo",
146146
},
147+
"tts_model": {
148+
"api_key": "OPENAI_API_KEY",
149+
"model": "tts-1",
150+
"voice": "alloy"
151+
},
152+
"output_path": "audio_summary.mp3",
147153
}
148154

149-
# Create the SmartScraperGraph instance
150-
smart_scraper_graph = SmartScraperGraph(
151-
prompt="Make a detailed audio summary of the projects on this page",
152-
source="https://perinim.github.io/projects",
153-
config=graph_config
155+
# ************************************************
156+
# Create the SpeechGraph instance and run it
157+
# ************************************************
158+
159+
speech_graph = SpeechGraph(
160+
prompt="Make a detailed audio summary of the projects.",
161+
source="https://perinim.github.io/projects/",
162+
config=graph_config,
154163
)
155164

156-
# Run the graph
157-
result = smart_scraper_graph.run()
165+
result = speech_graph.run()
158166
print(result)
167+
159168
```
160169

161170
The output will be an audio file with the summary of the projects on the page.

0 commit comments

Comments
 (0)