fix(apis/websocket): build and runtime issues

This commit is contained in:
PalmDevs
2024-07-23 20:53:56 +07:00
parent f142c2b82e
commit 89d8ab1ee5
3 changed files with 26 additions and 25 deletions

View File

@@ -55,12 +55,9 @@ export interface WitMessageResponse {
const TesseractWorkerDirPath = joinPath(import.meta.dir, 'worker')
const TesseractWorkerPath = joinPath(TesseractWorkerDirPath, 'index.js')
const TesseractCorePath = joinPath(TesseractWorkerDirPath, 'core')
export const tesseract = await createTesseractWorker(
'eng',
OEM.DEFAULT,
(await pathExists(TesseractWorkerDirPath))
? { workerPath: TesseractWorkerPath, corePath: TesseractCorePath }
: undefined,
(await pathExists(TesseractWorkerDirPath)) ? { workerPath: TesseractWorkerPath } : undefined,
)