Spaces:
Paused
Paused
Julian Bilcke
commited on
Commit
·
3e9f9ed
1
Parent(s):
25b858c
quick
Browse files
src/production/generateAudio.mts
CHANGED
|
@@ -18,7 +18,7 @@ export async function generateAudio(prompt: string, audioFileName: string) {
|
|
| 18 |
|
| 19 |
const browser = await puppeteer.launch({
|
| 20 |
headless: true,
|
| 21 |
-
protocolTimeout:
|
| 22 |
})
|
| 23 |
|
| 24 |
const page = await browser.newPage()
|
|
@@ -40,7 +40,7 @@ export async function generateAudio(prompt: string, audioFileName: string) {
|
|
| 40 |
await submitButton.click()
|
| 41 |
|
| 42 |
await page.waitForSelector("a[download]", {
|
| 43 |
-
timeout:
|
| 44 |
})
|
| 45 |
|
| 46 |
const audioRemoteUrl = await page.$$eval("a[download]", el => el.map(x => x.getAttribute("href"))[0])
|
|
|
|
| 18 |
|
| 19 |
const browser = await puppeteer.launch({
|
| 20 |
headless: true,
|
| 21 |
+
protocolTimeout: 120000,
|
| 22 |
})
|
| 23 |
|
| 24 |
const page = await browser.newPage()
|
|
|
|
| 40 |
await submitButton.click()
|
| 41 |
|
| 42 |
await page.waitForSelector("a[download]", {
|
| 43 |
+
timeout: 120000, // no need to wait for too long, generation is quick
|
| 44 |
})
|
| 45 |
|
| 46 |
const audioRemoteUrl = await page.$$eval("a[download]", el => el.map(x => x.getAttribute("href"))[0])
|