Skip to content

Commit

Permalink
fix: 修改 OCR 脚本加载路径, 确保能够访问 work 和 core 脚本
Browse files Browse the repository at this point in the history
  • Loading branch information
enncy committed Apr 30, 2022
1 parent ffac156 commit 9b1544a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/core/src/script/cx/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,9 @@ export const CXScript = defineScript({
async onload() {
/** 文字识别 */
const ocr = new OCR({
langPath: 'https://cdn.ocs.enncy.cn/resources/tessdata'
langPath: 'https://cdn.ocs.enncy.cn/resources/tessdata',
corePath: 'https://cdn.ocs.enncy.cn/resources/tesseract/tesseract-core.wasm.js',
workerPath: 'https://cdn.ocs.enncy.cn/resources/tesseract/worker.min.js'
});

// 顶层初始化
Expand Down

0 comments on commit 9b1544a

Please sign in to comment.