mirror of
https://github.com/CherryHQ/cherry-studio.git
synced 2025-12-27 21:01:32 +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 '.'
|
||||
|
||||
export const BuiltinOcrProviderIds = {
|
||||
@ -70,6 +72,10 @@ export type OcrProviderConfig = {
|
||||
enabled?: boolean
|
||||
}
|
||||
|
||||
export type OcrTesseractConfig = OcrProviderConfig & {
|
||||
langs: Record<Tesseract.LanguageCode, boolean>
|
||||
}
|
||||
|
||||
export type OcrProvider = {
|
||||
id: string
|
||||
name: string
|
||||
|
||||
Loading…
Reference in New Issue
Block a user