mirror of
https://github.com/CherryHQ/cherry-studio.git
synced 2026-01-04 20:00:00 +08:00
feat(ocr): 添加 Tesseract OCR 配置类型
This commit is contained in:
parent
0e0796ca8b
commit
63bb26cae6
@ -1,3 +1,5 @@
|
|||||||
|
import Tesseract from 'tesseract.js'
|
||||||
|
|
||||||
import { FileMetadata, ImageFileMetadata, isImageFile } from '.'
|
import { FileMetadata, ImageFileMetadata, isImageFile } from '.'
|
||||||
|
|
||||||
export const BuiltinOcrProviderIds = {
|
export const BuiltinOcrProviderIds = {
|
||||||
@ -70,6 +72,10 @@ export type OcrProviderConfig = {
|
|||||||
enabled?: boolean
|
enabled?: boolean
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export type OcrTesseractConfig = OcrProviderConfig & {
|
||||||
|
langs: Record<Tesseract.LanguageCode, boolean>
|
||||||
|
}
|
||||||
|
|
||||||
export type OcrProvider = {
|
export type OcrProvider = {
|
||||||
id: string
|
id: string
|
||||||
name: string
|
name: string
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user