@vibesdotdev/integrations-whisper 0.0.0-stage → 1.0.0-rc.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +126 -0
- package/README.md +10 -2
- package/dist/ai/index.d.ts +5 -0
- package/dist/ai/index.d.ts.map +1 -0
- package/dist/ai/index.js +5 -0
- package/dist/ai/index.js.map +1 -0
- package/dist/ai/provider.plugin.d.ts +6 -0
- package/dist/ai/provider.plugin.d.ts.map +1 -0
- package/dist/ai/provider.plugin.js +111 -0
- package/dist/ai/provider.plugin.js.map +1 -0
- package/dist/ai/providers/cloud/speech/whisper/config/config.whisper.descriptor.d.ts +4194 -0
- package/dist/ai/providers/cloud/speech/whisper/config/config.whisper.descriptor.d.ts.map +1 -0
- package/dist/ai/providers/cloud/speech/whisper/config/config.whisper.descriptor.js +54 -0
- package/dist/ai/providers/cloud/speech/whisper/config/config.whisper.descriptor.js.map +1 -0
- package/dist/ai/providers/cloud/speech/whisper/config/schemas/index.d.ts +12 -0
- package/dist/ai/providers/cloud/speech/whisper/config/schemas/index.d.ts.map +1 -0
- package/dist/ai/providers/cloud/speech/whisper/config/schemas/index.js +10 -0
- package/dist/ai/providers/cloud/speech/whisper/config/schemas/index.js.map +1 -0
- package/dist/ai/providers/cloud/speech/whisper/index.d.ts +5 -0
- package/dist/ai/providers/cloud/speech/whisper/index.d.ts.map +1 -0
- package/dist/ai/providers/cloud/speech/whisper/index.js +4 -0
- package/dist/ai/providers/cloud/speech/whisper/index.js.map +1 -0
- package/dist/ai/providers/cloud/speech/whisper/provider.whisper.descriptor.d.ts +183 -0
- package/dist/ai/providers/cloud/speech/whisper/provider.whisper.descriptor.d.ts.map +1 -0
- package/dist/ai/providers/cloud/speech/whisper/provider.whisper.descriptor.js +47 -0
- package/dist/ai/providers/cloud/speech/whisper/provider.whisper.descriptor.js.map +1 -0
- package/dist/ai/providers/whisper/detection/system.d.ts +17 -0
- package/dist/ai/providers/whisper/detection/system.d.ts.map +1 -0
- package/dist/ai/providers/whisper/detection/system.js +35 -0
- package/dist/ai/providers/whisper/detection/system.js.map +1 -0
- package/dist/ai/providers/whisper/recommendations.d.ts +27 -0
- package/dist/ai/providers/whisper/recommendations.d.ts.map +1 -0
- package/dist/ai/providers/whisper/recommendations.js +68 -0
- package/dist/ai/providers/whisper/recommendations.js.map +1 -0
- package/dist/ai/providers/whisper/whisper.provider.impl.d.ts +18 -0
- package/dist/ai/providers/whisper/whisper.provider.impl.d.ts.map +1 -0
- package/dist/ai/providers/whisper/whisper.provider.impl.js +63 -0
- package/dist/ai/providers/whisper/whisper.provider.impl.js.map +1 -0
- package/dist/ai/specs/whisper-cli/whisper-cli.spec.descriptor.d.ts +35 -0
- package/dist/ai/specs/whisper-cli/whisper-cli.spec.descriptor.d.ts.map +1 -0
- package/dist/ai/specs/whisper-cli/whisper-cli.spec.descriptor.js +24 -0
- package/dist/ai/specs/whisper-cli/whisper-cli.spec.descriptor.js.map +1 -0
- package/dist/ai/specs/whisper-cli/whisper-cli.spec.impl.d.ts +31 -0
- package/dist/ai/specs/whisper-cli/whisper-cli.spec.impl.d.ts.map +1 -0
- package/dist/ai/specs/whisper-cli/whisper-cli.spec.impl.js +60 -0
- package/dist/ai/specs/whisper-cli/whisper-cli.spec.impl.js.map +1 -0
- package/dist/ai/specs/whisper-hf-cli/whisper-hf-cli.spec.descriptor.d.ts +25 -0
- package/dist/ai/specs/whisper-hf-cli/whisper-hf-cli.spec.descriptor.d.ts.map +1 -0
- package/dist/ai/specs/whisper-hf-cli/whisper-hf-cli.spec.descriptor.js +14 -0
- package/dist/ai/specs/whisper-hf-cli/whisper-hf-cli.spec.descriptor.js.map +1 -0
- package/dist/ai/specs/whisper-hf-cli/whisper-hf-cli.spec.impl.d.ts +31 -0
- package/dist/ai/specs/whisper-hf-cli/whisper-hf-cli.spec.impl.d.ts.map +1 -0
- package/dist/ai/specs/whisper-hf-cli/whisper-hf-cli.spec.impl.js +52 -0
- package/dist/ai/specs/whisper-hf-cli/whisper-hf-cli.spec.impl.js.map +1 -0
- package/dist/ai/specs/wire.d.ts +545 -0
- package/dist/ai/specs/wire.d.ts.map +1 -0
- package/dist/ai/specs/wire.js +80 -0
- package/dist/ai/specs/wire.js.map +1 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +4 -0
- package/dist/index.js.map +1 -0
- package/dist/schemas/wire.d.ts +30 -0
- package/dist/schemas/wire.d.ts.map +1 -0
- package/dist/schemas/wire.js +20 -0
- package/dist/schemas/wire.js.map +1 -0
- package/package.json +71 -4
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.whisper.descriptor.d.ts","sourceRoot":"","sources":["../../../../../../../src/ai/providers/cloud/speech/whisper/config/config.whisper.descriptor.ts"],"names":[],"mappings":"AAIA,QAAA,MAAM,+BAA+B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;yBAmDq4pD,CAAC;;;;yBAA6V,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6BAAo8E,CAAC;;;;6BAA6W,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iCAAilF,CAAC;;;;iCAA6X,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6BAA2uF,CAAC;;;;6BAA6W,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iCAAgkF,CAAC;;;;iCAA6X,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;yBAA8vF,CAAC;;;;yBAA6V,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6BAAo7E,CAAC;;;;6BAA6W,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iCAAilF,CAAC;;;;iCAA6X,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6BAA4vF,CAAC;;;;6BAA6W,CAAC;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
|
|
2
|
+
import whisperProviderDescriptor from "../provider.whisper.descriptor.js";
|
|
3
|
+
import { whisperConnectionSchema } from "./schemas/index.js";
|
|
4
|
+
const whisperProviderConfigDescriptor = createProviderConfigDescriptor({
|
|
5
|
+
provider: whisperProviderDescriptor,
|
|
6
|
+
schema: whisperConnectionSchema,
|
|
7
|
+
optionLabel: 'Whisper (HuggingFace)',
|
|
8
|
+
optionDescription: 'OpenAI Whisper via HuggingFace Transformers for local transcription',
|
|
9
|
+
optionIcon: '🎤',
|
|
10
|
+
fields: {
|
|
11
|
+
'configuration.modelSize': {
|
|
12
|
+
ui: {
|
|
13
|
+
label: 'Model Size',
|
|
14
|
+
description: 'Whisper model size to load',
|
|
15
|
+
component: 'select',
|
|
16
|
+
group: 'model',
|
|
17
|
+
order: 10
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
'configuration.language': {
|
|
21
|
+
ui: {
|
|
22
|
+
label: 'Language',
|
|
23
|
+
description: 'Target language code (e.g., "en", "es", "fr")',
|
|
24
|
+
placeholder: 'auto-detect',
|
|
25
|
+
component: 'input',
|
|
26
|
+
group: 'model',
|
|
27
|
+
order: 11
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
'configuration.task': {
|
|
31
|
+
ui: {
|
|
32
|
+
label: 'Task',
|
|
33
|
+
description: 'Transcribe or translate to English',
|
|
34
|
+
component: 'select',
|
|
35
|
+
group: 'model',
|
|
36
|
+
order: 12
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
'configuration.authType': {
|
|
40
|
+
ui: {
|
|
41
|
+
label: 'Auth Type',
|
|
42
|
+
description: 'Authentication method',
|
|
43
|
+
component: 'select',
|
|
44
|
+
group: 'connection',
|
|
45
|
+
order: 20
|
|
46
|
+
},
|
|
47
|
+
rules: {
|
|
48
|
+
visibleWhen: { field: 'configuration.authType', operator: 'equals', value: '__never__' }
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
});
|
|
53
|
+
export default whisperProviderConfigDescriptor;
|
|
54
|
+
//# sourceMappingURL=config.whisper.descriptor.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.whisper.descriptor.js","sourceRoot":"","sources":["../../../../../../../src/ai/providers/cloud/speech/whisper/config/config.whisper.descriptor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,8BAA8B,EAAE,MAAM,0DAA0D,CAAC;AAC1G,OAAO,yBAAyB,MAAM,mCAAmC,CAAC;AAC1E,OAAO,EAAE,uBAAuB,EAAE,MAAM,oBAAoB,CAAC;AAE7D,MAAM,+BAA+B,GAAG,8BAA8B,CAAC;IACtE,QAAQ,EAAE,yBAAyB;IACnC,MAAM,EAAE,uBAAuB;IAC/B,WAAW,EAAE,uBAAuB;IACpC,iBAAiB,EAAE,qEAAqE;IACxF,UAAU,EAAE,IAAI;IAChB,MAAM,EAAE;QACP,yBAAyB,EAAE;YAC1B,EAAE,EAAE;gBACH,KAAK,EAAE,YAAY;gBACnB,WAAW,EAAE,4BAA4B;gBACzC,SAAS,EAAE,QAAQ;gBACnB,KAAK,EAAE,OAAO;gBACd,KAAK,EAAE,EAAE;aACT;SACD;QACD,wBAAwB,EAAE;YACzB,EAAE,EAAE;gBACH,KAAK,EAAE,UAAU;gBACjB,WAAW,EAAE,+CAA+C;gBAC5D,WAAW,EAAE,aAAa;gBAC1B,SAAS,EAAE,OAAO;gBAClB,KAAK,EAAE,OAAO;gBACd,KAAK,EAAE,EAAE;aACT;SACD;QACD,oBAAoB,EAAE;YACrB,EAAE,EAAE;gBACH,KAAK,EAAE,MAAM;gBACb,WAAW,EAAE,oCAAoC;gBACjD,SAAS,EAAE,QAAQ;gBACnB,KAAK,EAAE,OAAO;gBACd,KAAK,EAAE,EAAE;aACT;SACD;QACD,wBAAwB,EAAE;YACzB,EAAE,EAAE;gBACH,KAAK,EAAE,WAAW;gBAClB,WAAW,EAAE,uBAAuB;gBACpC,SAAS,EAAE,QAAQ;gBACnB,KAAK,EAAE,YAAY;gBACnB,KAAK,EAAE,EAAE;aACT;YACD,KAAK,EAAE;gBACN,WAAW,EAAE,EAAE,KAAK,EAAE,wBAAwB,EAAE,QAAQ,EAAE,QAAQ,EAAE,KAAK,EAAE,WAAW,EAAE;aACxF;SACD;KACD;CACD,CAAC,CAAC;AAEH,eAAe,+BAA+B,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import * as z from 'zod/v4';
|
|
2
|
+
export declare const whisperConnectionSchema: z.ZodObject<{
|
|
3
|
+
modelSize: z.ZodDefault<z.ZodString>;
|
|
4
|
+
language: z.ZodOptional<z.ZodString>;
|
|
5
|
+
task: z.ZodDefault<z.ZodEnum<{
|
|
6
|
+
transcribe: "transcribe";
|
|
7
|
+
translate: "translate";
|
|
8
|
+
}>>;
|
|
9
|
+
authType: z.ZodOptional<z.ZodLiteral<"none">>;
|
|
10
|
+
}, z.core.$strip>;
|
|
11
|
+
export type WhisperConnection = z.infer<typeof whisperConnectionSchema>;
|
|
12
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../../src/ai/providers/cloud/speech/whisper/config/schemas/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAE5B,eAAO,MAAM,uBAAuB;;;;;;;;iBAOlC,CAAC;AAEH,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import * as z from 'zod/v4';
|
|
2
|
+
export const whisperConnectionSchema = z.object({
|
|
3
|
+
modelSize: z
|
|
4
|
+
.string().trim().min(1)
|
|
5
|
+
.default('base'),
|
|
6
|
+
language: z.string().optional(),
|
|
7
|
+
task: z.enum(['transcribe', 'translate']).default('transcribe'),
|
|
8
|
+
authType: z.literal('none').optional()
|
|
9
|
+
});
|
|
10
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../../src/ai/providers/cloud/speech/whisper/config/schemas/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAE5B,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC/C,SAAS,EAAE,CAAC;SACV,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;SACtB,OAAO,CAAC,MAAM,CAAC;IACjB,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC/B,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,YAAY,EAAE,WAAW,CAAC,CAAC,CAAC,OAAO,CAAC,YAAY,CAAC;IAC/D,QAAQ,EAAE,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,QAAQ,EAAE;CACtC,CAAC,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { default as whisperProviderDescriptor } from './provider.whisper.descriptor.ts';
|
|
2
|
+
export { default as whisperProviderConfigDescriptor } from './config/config.whisper.descriptor.ts';
|
|
3
|
+
export { whisperConnectionSchema } from './config/schemas/index.ts';
|
|
4
|
+
export type { WhisperConnection } from './config/schemas/index.ts';
|
|
5
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/ai/providers/cloud/speech/whisper/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,yBAAyB,EAAE,MAAM,kCAAkC,CAAC;AACxF,OAAO,EAAE,OAAO,IAAI,+BAA+B,EAAE,MAAM,uCAAuC,CAAC;AACnG,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AACpE,YAAY,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { default as whisperProviderDescriptor } from "./provider.whisper.descriptor.js";
|
|
2
|
+
export { default as whisperProviderConfigDescriptor } from "./config/config.whisper.descriptor.js";
|
|
3
|
+
export { whisperConnectionSchema } from "./config/schemas/index.js";
|
|
4
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/ai/providers/cloud/speech/whisper/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,yBAAyB,EAAE,MAAM,kCAAkC,CAAC;AACxF,OAAO,EAAE,OAAO,IAAI,+BAA+B,EAAE,MAAM,uCAAuC,CAAC;AACnG,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC"}
|
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
id: string;
|
|
3
|
+
kind: "ai/provider";
|
|
4
|
+
name: string;
|
|
5
|
+
version: string;
|
|
6
|
+
connectionSchema: unknown;
|
|
7
|
+
priority: number;
|
|
8
|
+
enabled: boolean;
|
|
9
|
+
description?: string | undefined;
|
|
10
|
+
defaults?: Record<string, unknown> | undefined;
|
|
11
|
+
baseUrlTemplate?: string | undefined;
|
|
12
|
+
capabilities?: {
|
|
13
|
+
[x: string]: unknown;
|
|
14
|
+
modalities?: ("vision" | "image" | "text" | "audio" | "video" | "embedding" | "transcription" | "evaluation")[] | undefined;
|
|
15
|
+
authType?: "none" | "api_key" | "bearer" | "oauth" | "basic" | undefined;
|
|
16
|
+
authMethods?: {
|
|
17
|
+
[x: string]: unknown;
|
|
18
|
+
id: string;
|
|
19
|
+
type: "none" | "api_key" | "bearer" | "oauth" | "basic";
|
|
20
|
+
label: string;
|
|
21
|
+
credentialFields: string[];
|
|
22
|
+
enabled: boolean;
|
|
23
|
+
description?: string | undefined;
|
|
24
|
+
tokenSource?: "none" | "runtime" | "credential" | "oauth-browser" | "oauth-device-code" | undefined;
|
|
25
|
+
recommended?: boolean | undefined;
|
|
26
|
+
docsUrl?: string | undefined;
|
|
27
|
+
scopes?: string[] | undefined;
|
|
28
|
+
execution?: {
|
|
29
|
+
credentialCustodies: ("consumer" | "server")[];
|
|
30
|
+
billingOwners: ("user" | "organization" | "platform")[];
|
|
31
|
+
} | undefined;
|
|
32
|
+
}[] | undefined;
|
|
33
|
+
streaming?: boolean | undefined;
|
|
34
|
+
tools?: boolean | undefined;
|
|
35
|
+
vision?: boolean | undefined;
|
|
36
|
+
jsonMode?: boolean | undefined;
|
|
37
|
+
functionCalling?: boolean | undefined;
|
|
38
|
+
contextWindow?: number | undefined;
|
|
39
|
+
maxOutputTokens?: number | undefined;
|
|
40
|
+
} | undefined;
|
|
41
|
+
category?: "cloud" | "local" | "hybrid" | undefined;
|
|
42
|
+
hardware?: ("cloud" | "consumer")[] | undefined;
|
|
43
|
+
icon?: string | undefined;
|
|
44
|
+
branding?: {
|
|
45
|
+
[x: string]: unknown;
|
|
46
|
+
logo?: {
|
|
47
|
+
[x: string]: unknown;
|
|
48
|
+
kind: "wordmark" | "mark" | "lockup" | "badge";
|
|
49
|
+
format: "svg";
|
|
50
|
+
path: string;
|
|
51
|
+
sourceUrl: string;
|
|
52
|
+
sourcePageUrl: string;
|
|
53
|
+
source: "official-brand-page" | "official-brand-kit" | "official-homepage-inline" | "official-cdn" | "official-github";
|
|
54
|
+
theme: "any" | "light" | "dark";
|
|
55
|
+
usageNotes?: string | undefined;
|
|
56
|
+
licenseNotes?: string | undefined;
|
|
57
|
+
} | undefined;
|
|
58
|
+
darkLogo?: {
|
|
59
|
+
[x: string]: unknown;
|
|
60
|
+
kind: "wordmark" | "mark" | "lockup" | "badge";
|
|
61
|
+
format: "svg";
|
|
62
|
+
path: string;
|
|
63
|
+
sourceUrl: string;
|
|
64
|
+
sourcePageUrl: string;
|
|
65
|
+
source: "official-brand-page" | "official-brand-kit" | "official-homepage-inline" | "official-cdn" | "official-github";
|
|
66
|
+
theme: "any" | "light" | "dark";
|
|
67
|
+
usageNotes?: string | undefined;
|
|
68
|
+
licenseNotes?: string | undefined;
|
|
69
|
+
} | undefined;
|
|
70
|
+
wordmark?: {
|
|
71
|
+
[x: string]: unknown;
|
|
72
|
+
kind: "wordmark" | "mark" | "lockup" | "badge";
|
|
73
|
+
format: "svg";
|
|
74
|
+
path: string;
|
|
75
|
+
sourceUrl: string;
|
|
76
|
+
sourcePageUrl: string;
|
|
77
|
+
source: "official-brand-page" | "official-brand-kit" | "official-homepage-inline" | "official-cdn" | "official-github";
|
|
78
|
+
theme: "any" | "light" | "dark";
|
|
79
|
+
usageNotes?: string | undefined;
|
|
80
|
+
licenseNotes?: string | undefined;
|
|
81
|
+
} | undefined;
|
|
82
|
+
darkWordmark?: {
|
|
83
|
+
[x: string]: unknown;
|
|
84
|
+
kind: "wordmark" | "mark" | "lockup" | "badge";
|
|
85
|
+
format: "svg";
|
|
86
|
+
path: string;
|
|
87
|
+
sourceUrl: string;
|
|
88
|
+
sourcePageUrl: string;
|
|
89
|
+
source: "official-brand-page" | "official-brand-kit" | "official-homepage-inline" | "official-cdn" | "official-github";
|
|
90
|
+
theme: "any" | "light" | "dark";
|
|
91
|
+
usageNotes?: string | undefined;
|
|
92
|
+
licenseNotes?: string | undefined;
|
|
93
|
+
} | undefined;
|
|
94
|
+
sourcePageUrl?: string | undefined;
|
|
95
|
+
usageNotes?: string | undefined;
|
|
96
|
+
} | undefined;
|
|
97
|
+
docsUrl?: string | undefined;
|
|
98
|
+
tags?: string[] | undefined;
|
|
99
|
+
variants?: {
|
|
100
|
+
id: string;
|
|
101
|
+
label: string;
|
|
102
|
+
transport: string;
|
|
103
|
+
specId: string;
|
|
104
|
+
endpoint: string;
|
|
105
|
+
auth: {
|
|
106
|
+
kind: "none";
|
|
107
|
+
} | {
|
|
108
|
+
kind: "bearer";
|
|
109
|
+
token: string | {
|
|
110
|
+
source: "secret";
|
|
111
|
+
key: string;
|
|
112
|
+
store?: string | undefined;
|
|
113
|
+
};
|
|
114
|
+
scheme?: string | undefined;
|
|
115
|
+
} | {
|
|
116
|
+
kind: "api-key-header";
|
|
117
|
+
header: string;
|
|
118
|
+
value: string | {
|
|
119
|
+
source: "secret";
|
|
120
|
+
key: string;
|
|
121
|
+
store?: string | undefined;
|
|
122
|
+
};
|
|
123
|
+
} | {
|
|
124
|
+
kind: "basic";
|
|
125
|
+
username: string;
|
|
126
|
+
password: string | {
|
|
127
|
+
source: "secret";
|
|
128
|
+
key: string;
|
|
129
|
+
store?: string | undefined;
|
|
130
|
+
};
|
|
131
|
+
} | {
|
|
132
|
+
kind: "cf-binding";
|
|
133
|
+
bindingName: string;
|
|
134
|
+
};
|
|
135
|
+
modelIdRule: {
|
|
136
|
+
kind: "strip-prefix";
|
|
137
|
+
} | {
|
|
138
|
+
kind: "passthrough";
|
|
139
|
+
} | {
|
|
140
|
+
kind: "explicit";
|
|
141
|
+
modelMap: Record<string, string>;
|
|
142
|
+
};
|
|
143
|
+
priority: number;
|
|
144
|
+
enabled: boolean;
|
|
145
|
+
description?: string | undefined;
|
|
146
|
+
modalities?: ("image" | "text" | "audio" | "video" | "embedding" | "transcription" | "evaluation" | "speech" | "ocr")[] | undefined;
|
|
147
|
+
inheritEnv?: string[] | undefined;
|
|
148
|
+
requiredConfiguration?: string[] | undefined;
|
|
149
|
+
authMethodId?: string | undefined;
|
|
150
|
+
execution?: {
|
|
151
|
+
generationLocations: ("consumer" | "server")[];
|
|
152
|
+
headless: boolean;
|
|
153
|
+
} | undefined;
|
|
154
|
+
tags?: string[] | undefined;
|
|
155
|
+
models?: {
|
|
156
|
+
tags?: string[] | undefined;
|
|
157
|
+
} | undefined;
|
|
158
|
+
additionalHeaders?: Record<string, string> | undefined;
|
|
159
|
+
capabilities?: {
|
|
160
|
+
supportsToolChoiceRequired?: boolean | undefined;
|
|
161
|
+
} | undefined;
|
|
162
|
+
}[] | undefined;
|
|
163
|
+
localDiscovery?: {
|
|
164
|
+
defaultRootDir: string;
|
|
165
|
+
modelGlob: string;
|
|
166
|
+
descriptorFilename?: string | undefined;
|
|
167
|
+
} | undefined;
|
|
168
|
+
loadedModels?: {
|
|
169
|
+
path: string;
|
|
170
|
+
listPath: string;
|
|
171
|
+
idField: string;
|
|
172
|
+
loadedField: string;
|
|
173
|
+
loginPath?: string | undefined;
|
|
174
|
+
loginKeyField?: string | undefined;
|
|
175
|
+
} | undefined;
|
|
176
|
+
cloudStorageDiscovery?: {
|
|
177
|
+
requiredCapabilities: string[];
|
|
178
|
+
modelGlob?: string | undefined;
|
|
179
|
+
descriptorFilename?: string | undefined;
|
|
180
|
+
} | undefined;
|
|
181
|
+
};
|
|
182
|
+
export default _default;
|
|
183
|
+
//# sourceMappingURL=provider.whisper.descriptor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"provider.whisper.descriptor.d.ts","sourceRoot":"","sources":["../../../../../../src/ai/providers/cloud/speech/whisper/provider.whisper.descriptor.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGA,wBA4CG"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { createAIProviderTypeDescriptor } from '@vibesdotdev/ai/providers-runtime/core/type-descriptor';
|
|
2
|
+
import { whisperConnectionSchema } from "./config/schemas/index.js";
|
|
3
|
+
export default createAIProviderTypeDescriptor({
|
|
4
|
+
id: 'whisper',
|
|
5
|
+
version: '0.1.0-rc.0',
|
|
6
|
+
name: 'Whisper (HuggingFace)',
|
|
7
|
+
description: 'OpenAI Whisper transcription via HuggingFace transformers. ' +
|
|
8
|
+
'Local or self-hosted transcription with multiple model sizes.',
|
|
9
|
+
connectionSchema: whisperConnectionSchema,
|
|
10
|
+
defaults: {
|
|
11
|
+
modelSize: 'base',
|
|
12
|
+
task: 'transcribe',
|
|
13
|
+
authType: 'none'
|
|
14
|
+
},
|
|
15
|
+
capabilities: {
|
|
16
|
+
modalities: ['audio'],
|
|
17
|
+
authType: 'none',
|
|
18
|
+
streaming: false,
|
|
19
|
+
tools: false,
|
|
20
|
+
vision: false,
|
|
21
|
+
jsonMode: false,
|
|
22
|
+
functionCalling: false
|
|
23
|
+
},
|
|
24
|
+
category: 'local',
|
|
25
|
+
hardware: ['consumer'],
|
|
26
|
+
icon: '🎙️',
|
|
27
|
+
docsUrl: 'https://huggingface.co/openai/whisper-base',
|
|
28
|
+
priority: 60,
|
|
29
|
+
enabled: true,
|
|
30
|
+
tags: ['local', 'audio', 'transcription', 'whisper', 'huggingface'],
|
|
31
|
+
variants: [
|
|
32
|
+
{
|
|
33
|
+
id: 'whisper-hf-cli',
|
|
34
|
+
label: 'Whisper through HuggingFace Python',
|
|
35
|
+
description: 'Runs the selected HuggingFace Whisper model through local Python.',
|
|
36
|
+
transport: 'process',
|
|
37
|
+
specId: 'whisper-hf-cli',
|
|
38
|
+
modalities: ['transcription'],
|
|
39
|
+
endpoint: 'python3',
|
|
40
|
+
auth: { kind: 'none' },
|
|
41
|
+
modelIdRule: { kind: 'strip-prefix' },
|
|
42
|
+
priority: 10,
|
|
43
|
+
enabled: true
|
|
44
|
+
}
|
|
45
|
+
]
|
|
46
|
+
});
|
|
47
|
+
//# sourceMappingURL=provider.whisper.descriptor.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"provider.whisper.descriptor.js","sourceRoot":"","sources":["../../../../../../src/ai/providers/cloud/speech/whisper/provider.whisper.descriptor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,8BAA8B,EAAE,MAAM,wDAAwD,CAAC;AACxG,OAAO,EAAE,uB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+
import type { KindContext, VibesRuntime } from '@vibesdotdev/kernel';
|
|
3
|
+
import type { ProviderDetectionImplementation, AIProviderDetectionDescriptor } from '@vibesdotdev/ai/providers-runtime/schemas';
|
|
4
|
+
export interface WhisperDetectionServices {
|
|
5
|
+
probePython(): Promise<boolean>;
|
|
6
|
+
}
|
|
7
|
+
export declare function detectWhisperSystem(runtime: VibesRuntime, services?: WhisperDetectionServices): Promise<DetectedProvider | null>;
|
|
8
|
+
/**
|
|
9
|
+
* The `ai/provider-detection` implementation: the runtime constructs it with
|
|
10
|
+
* the kind context it resolved, and detection probes through that runtime.
|
|
11
|
+
*/
|
|
12
|
+
export declare class WhisperSystemDetection implements ProviderDetectionImplementation {
|
|
13
|
+
private readonly context;
|
|
14
|
+
constructor(_descriptor: AIProviderDetectionDescriptor, context: KindContext<VibesRuntime>);
|
|
15
|
+
detect(): Promise<DetectedProvider | null>;
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=system.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"system.d.ts","sourceRoot":"","sources":["../../../../../src/ai/providers/whisper/detection/system.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gDAAgD,CAAC;AAEvF,OAAO,KAAK,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACrE,OAAO,KAAK,EAAE,+BAA+B,EAAE,6BAA6B,EAAE,MAAM,2CAA2C,CAAC;AAEhI,MAAM,WAAW,wBAAwB;IACxC,WAAW,IAAI,OAAO,CAAC,OAAO,CAAC,CAAC;CAChC;AAED,wBAAsB,mBAAmB,CACxC,OAAO,EAAE,YAAY,EACrB,QAAQ,GAAE,wBAAkE,GAC1E,OAAO,CAAC,gBAAgB,GAAG,IAAI,CAAC,CAUlC;AAgBD;;;GAGG;AACH,qBAAa,sBAAuB,YAAW,+BAA+B;IAG5E,OAAO,CAAC,QAAQ,CAAC,OAAO;gBADxB,WAAW,EAAE,6BAA6B,EACzB,OAAO,EAAE,WAAW,CAAC,YAAY,CAAC;IAGpD,MAAM,IAAI,OAAO,CAAC,gBAAgB,GAAG,IAAI,CAAC;CAG1C"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { runRuntimeProcessProbe } from '@vibesdotdev/ai/providers-runtime/utils/process-probe';
|
|
2
|
+
export async function detectWhisperSystem(runtime, services = createRuntimeDetectionServices(runtime)) {
|
|
3
|
+
if (!(await services.probePython()))
|
|
4
|
+
return null;
|
|
5
|
+
return {
|
|
6
|
+
providerType: 'whisper',
|
|
7
|
+
name: 'Whisper (HuggingFace)',
|
|
8
|
+
description: 'Private local transcription through HuggingFace transformers',
|
|
9
|
+
status: 'available',
|
|
10
|
+
models: [],
|
|
11
|
+
configuration: { modelSize: 'base', task: 'transcribe', authType: 'none' }
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
function createRuntimeDetectionServices(runtime) {
|
|
15
|
+
return {
|
|
16
|
+
async probePython() {
|
|
17
|
+
const result = await runRuntimeProcessProbe({ runtime }, 'python3', ['-c', 'import transformers; import torch; print("ok")'], { timeoutMs: 3000, suppressStdout: true });
|
|
18
|
+
return result.ok;
|
|
19
|
+
}
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* The `ai/provider-detection` implementation: the runtime constructs it with
|
|
24
|
+
* the kind context it resolved, and detection probes through that runtime.
|
|
25
|
+
*/
|
|
26
|
+
export class WhisperSystemDetection {
|
|
27
|
+
context;
|
|
28
|
+
constructor(_descriptor, context) {
|
|
29
|
+
this.context = context;
|
|
30
|
+
}
|
|
31
|
+
detect() {
|
|
32
|
+
return detectWhisperSystem(this.context.runtime);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
//# sourceMappingURL=system.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"system.js","sourceRoot":"","sources":["../../../../../src/ai/providers/whisper/detection/system.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,sBAAsB,EAAE,MAAM,uDAAuD,CAAC;AAQ/F,MAAM,CAAC,KAAK,UAAU,mBAAmB,CACxC,OAAqB,EACrB,WAAqC,8BAA8B,CAAC,OAAO,CAAC;IAE5E,IAAI,CAAC,CAAC,MAAM,QAAQ,CAAC,WAAW,EAAE,CAAC;QAAE,OAAO,IAAI,CAAC;IACjD,OAAO;QACN,YAAY,EAAE,SAAS;QACvB,IAAI,EAAE,uBAAuB;QAC7B,WAAW,EAAE,8DAA8D;QAC3E,MAAM,EAAE,WAAW;QACnB,MAAM,EAAE,EAAE;QACV,aAAa,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,IAAI,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,EAAE;KAC1E,CAAC;AACH,CAAC;AAED,SAAS,8BAA8B,CAAC,OAAqB;IAC5D,OAAO;QACN,KAAK,CAAC,WAAW;YAChB,MAAM,MAAM,GAAG,MAAM,sBAAsB,CAC1C,EAAE,OAAO,EAAE,EACX,SAAS,EACT,CAAC,IAAI,EAAE,gDAAgD,CAAC,EACxD,EAAE,SAAS,EAAE,IAAI,EAAE,cAAc,EAAE,IAAI,EAAE,CACzC,CAAC;YACF,OAAO,MAAM,CAAC,EAAE,CAAC;QAClB,CAAC;KACD,CAAC;AACH,CAAC;AAED;;;GAGG;AACH,MAAM,OAAO,sBAAsB;IAGhB;IAFlB,YACC,WAA0C,EACzB,OAAkC;QAAlC,YAAO,GAAP,OAAO,CAA2B;IACjD,CAAC;IAEJ,MAAM;QACL,OAAO,mBAAmB,CAAC,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;IAClD,CAAC;CACD"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { ProviderRecommendation, type ModelAdapter } from '@vibesdotdev/ai/recommendations/base';
|
|
2
|
+
import type { ModelRecommendation, RecommendationContext, SetupMethod, SetupStep, UseCase } from '@vibesdotdev/ai/recommendations/schemas';
|
|
3
|
+
type WhisperModelRecommendation = ModelRecommendation & {
|
|
4
|
+
useCaseFit: number;
|
|
5
|
+
capabilities: string[];
|
|
6
|
+
};
|
|
7
|
+
/** The one Whisper model recommendation table; callers get independent copies. */
|
|
8
|
+
export declare function whisperModelRecommendations(): WhisperModelRecommendation[];
|
|
9
|
+
export declare class WhisperRecommendation extends ProviderRecommendation {
|
|
10
|
+
readonly providerType = "whisper";
|
|
11
|
+
readonly displayName = "Whisper (HuggingFace)";
|
|
12
|
+
getUseCaseScore(useCase: UseCase): number;
|
|
13
|
+
getReason(): string;
|
|
14
|
+
getStrengths(): string[];
|
|
15
|
+
getWeaknesses(): string[];
|
|
16
|
+
getSupportedSetupMethods(): SetupMethod[];
|
|
17
|
+
getSetupSteps(_method: SetupMethod): Promise<SetupStep[]>;
|
|
18
|
+
recommendModels(_adapter: ModelAdapter | null, _context: RecommendationContext): Promise<ModelRecommendation[]>;
|
|
19
|
+
getExecutionContext(): {
|
|
20
|
+
recommendModels: "client";
|
|
21
|
+
getSetupSteps: "client";
|
|
22
|
+
};
|
|
23
|
+
supportsLocal(): boolean;
|
|
24
|
+
requiresGPU(): boolean;
|
|
25
|
+
}
|
|
26
|
+
export {};
|
|
27
|
+
//# sourceMappingURL=recommendations.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"recommendations.d.ts","sourceRoot":"","sources":["../../../../src/ai/providers/whisper/recommendations.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,KAAK,YAAY,EAAE,MAAM,sCAAsC,CAAC;AACjG,OAAO,KAAK,EACX,mBAAmB,EACnB,qBAAqB,EACrB,WAAW,EACX,SAAS,EACT,OAAO,EACP,MAAM,yCAAyC,CAAC;AAEjD,KAAK,0BAA0B,GAAG,mBAAmB,GAAG;IAAE,UAAU,EAAE,MAAM,CAAC;IAAC,YAAY,EAAE,MAAM,EAAE,CAAA;CAAE,CAAC;AAyBvG,kFAAkF;AAClF,wBAAgB,2BAA2B,IAAI,0BAA0B,EAAE,CAE1E;AAED,qBAAa,qBAAsB,SAAQ,sBAAsB;IAChE,QAAQ,CAAC,YAAY,aAAa;IAClC,QAAQ,CAAC,WAAW,2BAA2B;IAC/C,eAAe,CAAC,OAAO,EAAE,OAAO,GAAG,MAAM;IAGzC,SAAS,IAAI,MAAM;IAGnB,YAAY,IAAI,MAAM,EAAE;IAGxB,aAAa,IAAI,MAAM,EAAE;IAGzB,wBAAwB,IAAI,WAAW,EAAE;IAGnC,aAAa,CAAC,OAAO,EAAE,WAAW,GAAG,OAAO,CAAC,SAAS,EAAE,CAAC;IASzD,eAAe,CACpB,QAAQ,EAAE,YAAY,GAAG,IAAI,EAC7B,QAAQ,EAAE,qBAAqB,GAC7B,OAAO,CAAC,mBAAmB,EAAE,CAAC;IAGjC,mBAAmB;;;;IAGnB,aAAa,IAAI,OAAO;IAGxB,WAAW,IAAI,OAAO;CAGtB"}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { ProviderRecommendation } from '@vibesdotdev/ai/recommendations/base';
|
|
2
|
+
const WHISPER_MODEL_RECOMMENDATIONS = [
|
|
3
|
+
{
|
|
4
|
+
modelId: 'base',
|
|
5
|
+
modelName: 'Whisper Base',
|
|
6
|
+
score: 85,
|
|
7
|
+
reason: 'Balanced local transcription speed and quality',
|
|
8
|
+
capabilities: ['transcription'],
|
|
9
|
+
isAvailable: true,
|
|
10
|
+
requiresUpgrade: false,
|
|
11
|
+
useCaseFit: 85
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
modelId: 'large-v3',
|
|
15
|
+
modelName: 'Whisper Large V3',
|
|
16
|
+
score: 96,
|
|
17
|
+
reason: 'Highest local transcription quality when hardware permits',
|
|
18
|
+
capabilities: ['transcription'],
|
|
19
|
+
isAvailable: true,
|
|
20
|
+
requiresUpgrade: false,
|
|
21
|
+
useCaseFit: 96
|
|
22
|
+
}
|
|
23
|
+
];
|
|
24
|
+
/** The one Whisper model recommendation table; callers get independent copies. */
|
|
25
|
+
export function whisperModelRecommendations() {
|
|
26
|
+
return WHISPER_MODEL_RECOMMENDATIONS.map((model) => ({ ...model, capabilities: [...model.capabilities] }));
|
|
27
|
+
}
|
|
28
|
+
export class WhisperRecommendation extends ProviderRecommendation {
|
|
29
|
+
providerType = 'whisper';
|
|
30
|
+
displayName = 'Whisper (HuggingFace)';
|
|
31
|
+
getUseCaseScore(useCase) {
|
|
32
|
+
return useCase === 'audio' ? WHISPER_MODEL_RECOMMENDATIONS[0].score : 0;
|
|
33
|
+
}
|
|
34
|
+
getReason() {
|
|
35
|
+
return 'Private local transcription through HuggingFace Whisper models';
|
|
36
|
+
}
|
|
37
|
+
getStrengths() {
|
|
38
|
+
return ['Offline transcription', 'Multiple model sizes', 'Translation support'];
|
|
39
|
+
}
|
|
40
|
+
getWeaknesses() {
|
|
41
|
+
return ['Requires Python transformers and model downloads'];
|
|
42
|
+
}
|
|
43
|
+
getSupportedSetupMethods() {
|
|
44
|
+
return ['local_scan'];
|
|
45
|
+
}
|
|
46
|
+
async getSetupSteps(_method) {
|
|
47
|
+
return [
|
|
48
|
+
{
|
|
49
|
+
step: 'Install Whisper (HuggingFace)',
|
|
50
|
+
description: 'Requires Python transformers and model downloads.',
|
|
51
|
+
action: 'https://huggingface.co/openai/whisper-base'
|
|
52
|
+
}
|
|
53
|
+
];
|
|
54
|
+
}
|
|
55
|
+
async recommendModels(_adapter, _context) {
|
|
56
|
+
return whisperModelRecommendations();
|
|
57
|
+
}
|
|
58
|
+
getExecutionContext() {
|
|
59
|
+
return { recommendModels: 'client', getSetupSteps: 'client' };
|
|
60
|
+
}
|
|
61
|
+
supportsLocal() {
|
|
62
|
+
return true;
|
|
63
|
+
}
|
|
64
|
+
requiresGPU() {
|
|
65
|
+
return false;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
//# sourceMappingURL=recommendations.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"recommendations.js","sourceRoot":"","sources":["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,CAAC,CAAC;IAC7D,CAAC;IACD,wBAAwB;QACvB,OAAO,CAAC,YAAY,CAAC,CAAC;IACvB,CAAC;IACD,KAAK,CAAC,aAAa,CAAC,OAAoB;QACvC,OAAO;YACN;gBACC,IAAI,EAAE,+BAA+B;gBACrC,WAAW,EAAE,mDAAmD;gBAChE,MAAM,EAAE,4CAA4C;aACpD;SACD,CAAC;IACH,CAAC;IACD,KAAK,CAAC,eAAe,CACpB,QAA6B,EAC7B,QAA+B;QAE/B,OAAO,2BAA2B,EAAE,CAAC;IACtC,CAAC;IACD,mBAAmB;QAClB,OAAO,EAAE,eAAe,EAAE,QAAiB,EAAE,aAAa,EAAE,QAAiB,EAAE,CAAC;IACjF,CAAC;IACD,aAAa;QACZ,OAAO,IAAI,CAAC;IACb,CAAC;IACD,WAAW;QACV,OAAO,KAAK,CAAC;IACd,CAAC;CACD"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { AIProviderTypeContext, AIProviderTypeInterface, ConnectionValidationResult, DetectedProviderInstance, ModelRecommendation, ProviderGenerateOptions, ProviderGenerateResult, ProviderHealthCheckResult } from '@vibesdotdev/ai/interfaces/provider-type';
|
|
2
|
+
import type { GenerationRequest } from '@vibesdotdev/ai/interfaces/adapter';
|
|
3
|
+
import type { AIModelDescriptor, Modality } from '@vibesdotdev/ai/models/schemas';
|
|
4
|
+
import type { AIProviderDescriptor } from '@vibesdotdev/ai/providers-runtime/schemas/provider-descriptor';
|
|
5
|
+
import type { AIProviderTypeDescriptor } from '@vibesdotdev/ai/providers-runtime/schemas/type-descriptor';
|
|
6
|
+
export declare class WhisperProviderType implements AIProviderTypeInterface {
|
|
7
|
+
readonly descriptor: AIProviderTypeDescriptor;
|
|
8
|
+
private readonly context;
|
|
9
|
+
constructor(descriptor: AIProviderTypeDescriptor, context: AIProviderTypeContext);
|
|
10
|
+
generate<T extends Modality>(provider: AIProviderDescriptor, model: AIModelDescriptor, request: GenerationRequest<T>, options?: ProviderGenerateOptions): Promise<ProviderGenerateResult<T>>;
|
|
11
|
+
detectInstalled(): Promise<DetectedProviderInstance[]>;
|
|
12
|
+
recommendModels(): Promise<ModelRecommendation[]>;
|
|
13
|
+
checkHealth(_config: Parameters<AIProviderTypeInterface['checkHealth']>[0], options?: Parameters<AIProviderTypeInterface['checkHealth']>[1]): Promise<ProviderHealthCheckResult>;
|
|
14
|
+
validateConnection(config: Parameters<AIProviderTypeInterface['validateConnection']>[0]): Promise<ConnectionValidationResult>;
|
|
15
|
+
dispose(): Promise<void>;
|
|
16
|
+
private probePython;
|
|
17
|
+
}
|
|
18
|
+
//# sourceMappingURL=whisper.provider.impl.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"whisper.provider.impl.d.ts","sourceRoot":"","sources":["../../../../src/ai/providers/whisper/whisper.provider.impl.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACX,qBAAqB,EACrB,uBAAuB,EACvB,0BAA0B,EAC1B,wBAAwB,EACxB,mBAAmB,EACnB,uBAAuB,EACvB,sBAAsB,EACtB,yBAAyB,EACzB,MAAM,0CAA0C,CAAC;AAClD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,oCAAoC,CAAC;AAC5E,OAAO,KAAK,EAAE,iBAAiB,EAAE,QAAQ,EAAE,MAAM,gCAAgC,CAAC;AAClF,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,+DAA+D,CAAC;AAC1G,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,2DAA2D,CAAC;AAM1G,qBAAa,mBAAoB,YAAW,uBAAuB;IAEjE,QAAQ,CAAC,UAAU,EAAE,wBAAwB;IAC7C,OAAO,CAAC,QAAQ,CAAC,OAAO;gBADf,UAAU,EAAE,wBAAwB,EAC5B,OAAO,EAAE,qBAAqB;IAGhD,QAAQ,CAAC,CAAC,SAAS,QAAQ,EAC1B,QAAQ,EAAE,oBAAoB,EAC9B,KAAK,EAAE,iBAAiB,EACxB,OAAO,EAAE,iBAAiB,CAAC,CAAC,CAAC,EAC7B,OAAO,CAAC,EAAE,uBAAuB,GAC/B,OAAO,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC;IAI/B,eAAe,IAAI,OAAO,CAAC,wBAAwB,EAAE,CAAC;IAatD,eAAe,IAAI,OAAO,CAAC,mBAAmB,EAAE,CAAC;IAIjD,WAAW,CAChB,OAAO,EAAE,UAAU,CAAC,uBAAuB,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,CAAC,EAC9D,OAAO,CAAC,EAAE,UAAU,CAAC,uBAAuB,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,CAAC,GAC7D,OAAO,CAAC,yBAAyB,CAAC;IAuB/B,kBAAkB,CAAC,MAAM,EAAE,UAAU,CAAC,uBAAuB,CAAC,oBAAoB,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,0BAA0B,CAAC;IAO7H,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC;IAE9B,OAAO,CAAC,WAAW;CAQnB"}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { executeGeneration } from '@vibesdotdev/ai/providers-runtime/utils/provider-type-helpers';
|
|
2
|
+
import { runRuntimeProcessProbe } from '@vibesdotdev/ai/providers-runtime/utils/process-probe';
|
|
3
|
+
import { whisperModelRecommendations } from "./recommendations.js";
|
|
4
|
+
import { whisperConnectionSchema } from "../cloud/speech/whisper/config/schemas/index.js";
|
|
5
|
+
export class WhisperProviderType {
|
|
6
|
+
descriptor;
|
|
7
|
+
context;
|
|
8
|
+
constructor(descriptor, context) {
|
|
9
|
+
this.descriptor = descriptor;
|
|
10
|
+
this.context = context;
|
|
11
|
+
}
|
|
12
|
+
generate(provider, model, request, options) {
|
|
13
|
+
return executeGeneration(this.context, provider, model, request, options);
|
|
14
|
+
}
|
|
15
|
+
async detectInstalled() {
|
|
16
|
+
const probe = await this.probePython();
|
|
17
|
+
return probe.ok
|
|
18
|
+
? [
|
|
19
|
+
{
|
|
20
|
+
name: 'Whisper (HuggingFace)',
|
|
21
|
+
source: 'system',
|
|
22
|
+
config: { modelSize: 'base', task: 'transcribe' }
|
|
23
|
+
}
|
|
24
|
+
]
|
|
25
|
+
: [];
|
|
26
|
+
}
|
|
27
|
+
async recommendModels() {
|
|
28
|
+
return whisperModelRecommendations();
|
|
29
|
+
}
|
|
30
|
+
async checkHealth(_config, options) {
|
|
31
|
+
const start = Date.now();
|
|
32
|
+
const probe = await this.probePython(options?.timeout ?? 5000);
|
|
33
|
+
return probe.ok
|
|
34
|
+
? {
|
|
35
|
+
healthy: true,
|
|
36
|
+
latencyMs: Date.now() - start,
|
|
37
|
+
message: 'HuggingFace Whisper dependencies are available',
|
|
38
|
+
availableModalities: ['transcription'],
|
|
39
|
+
checkedAt: new Date()
|
|
40
|
+
}
|
|
41
|
+
: {
|
|
42
|
+
healthy: false,
|
|
43
|
+
latencyMs: Date.now() - start,
|
|
44
|
+
message: 'HuggingFace Whisper dependencies are unavailable',
|
|
45
|
+
error: {
|
|
46
|
+
code: 'DEPENDENCIES_MISSING',
|
|
47
|
+
message: probe.error ?? 'python3 could not import transformers and torch'
|
|
48
|
+
},
|
|
49
|
+
checkedAt: new Date()
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
async validateConnection(config) {
|
|
53
|
+
const parsed = whisperConnectionSchema.safeParse(config);
|
|
54
|
+
return parsed.success
|
|
55
|
+
? { valid: true }
|
|
56
|
+
: { valid: false, errors: parsed.error.issues.map((issue) => issue.message) };
|
|
57
|
+
}
|
|
58
|
+
async dispose() { }
|
|
59
|
+
probePython(timeoutMs = 3000) {
|
|
60
|
+
return runRuntimeProcessProbe(this.context, 'python3', ['-c', 'import transformers; import torch; print("ok")'], { timeoutMs, suppressStdout: true });
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
//# sourceMappingURL=whisper.provider.impl.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"whisper.provider.impl.js","sourceR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