We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5bfdba1 commit 05512a2Copy full SHA for 05512a2
1 file changed
scripts/tts_kokoro_worker.mjs
@@ -3,6 +3,7 @@ import { createRequire } from 'node:module'
3
import fsPromises from 'node:fs/promises'
4
import { basename } from 'node:path'
5
import { createInterface } from 'node:readline'
6
+import { pathToFileURL } from 'node:url'
7
8
console.log = (...args) => console.error(...args)
9
@@ -57,7 +58,7 @@ function assertUsableTokenization(inputIds) {
57
58
async function importKokoro(appPackageJson) {
59
if (appPackageJson) {
60
const requireFromApp = createRequire(appPackageJson)
- return import(requireFromApp.resolve('kokoro-js'))
61
+ return import(pathToFileURL(requireFromApp.resolve('kokoro-js')).href)
62
}
63
return import('kokoro-js')
64
0 commit comments