1from apify_client import ApifyClient
2
3
4
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7
8run_input = { "text": """Chapter 1
9
10The morning fog lifted slowly from the harbour, and one by one the fishing boats came into view. Mara stood at the end of the pier with a cup of tea, counting them the way her grandfather had taught her.
11
12Chapter 2
13
14By noon the letter had arrived. It was short, written in a careful hand, and it changed everything she thought she knew about the old lighthouse.""" }
15
16
17run = client.actor("offerastudio/document-to-audiobook").call(run_input=run_input)
18
19
20print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
21for item in client.dataset(run.default_dataset_id).iterate_items():
22 print(item)
23
24