1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "scripts": [
12 {
13 "title": "Welcome message",
14 "text": "Welcome to Batch Voiceover Studio. This sample was generated entirely on a CPU, with no API key and no GPU."
15 },
16 {
17 "title": "Product teaser",
18 "text": "Turn a list of scripts into finished voiceovers in one run. One flat rate per thousand characters, thirty-seven voices to choose from, and audio files you can download straight away.",
19 "voice": "Easton"
20 }
21 ],
22 "voice": "Harper",
23 "outputFormat": "mp3"
24};
25
26
27const run = await client.actor("magnova/batch-voiceover-studio").call(input);
28
29
30console.log('Results from dataset');
31console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
32const { items } = await client.dataset(run.defaultDatasetId).listItems();
33items.forEach((item) => {
34 console.dir(item);
35});
36
37