@ai-sdk/revai 3.0.51 → 3.0.53
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/CHANGELOG.md +18 -0
- package/dist/index.d.ts +141 -136
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +423 -509
- package/dist/index.js.map +1 -1
- package/docs/160-revai.mdx +1 -1
- package/package.json +8 -8
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# @ai-sdk/revai
|
|
2
2
|
|
|
3
|
+
## 3.0.53
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies [8c65988]
|
|
8
|
+
- Updated dependencies [527a163]
|
|
9
|
+
- @ai-sdk/provider@4.0.21
|
|
10
|
+
- @ai-sdk/provider-utils@5.0.53
|
|
11
|
+
|
|
12
|
+
## 3.0.52
|
|
13
|
+
|
|
14
|
+
### Patch Changes
|
|
15
|
+
|
|
16
|
+
- ede5b89: chore: migrate package builds from tsup to tsdown
|
|
17
|
+
- Updated dependencies [ede5b89]
|
|
18
|
+
- @ai-sdk/provider@4.0.20
|
|
19
|
+
- @ai-sdk/provider-utils@5.0.52
|
|
20
|
+
|
|
3
21
|
## 3.0.51
|
|
4
22
|
|
|
5
23
|
### Patch Changes
|
package/dist/index.d.ts
CHANGED
|
@@ -1,158 +1,163 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import { ProviderV4, TranscriptionModelV4 } from "@ai-sdk/provider";
|
|
2
|
+
import { FetchFunction, WORKFLOW_DESERIALIZE, WORKFLOW_SERIALIZE } from "@ai-sdk/provider-utils";
|
|
3
|
+
import { z } from "zod/v4";
|
|
4
|
+
//#region src/revai-config.d.ts
|
|
6
5
|
type RevaiConfig = {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
6
|
+
provider: string;
|
|
7
|
+
url: (options: {
|
|
8
|
+
modelId: string;
|
|
9
|
+
path: string;
|
|
10
|
+
}) => string;
|
|
11
|
+
headers?: () => Record<string, string | undefined>;
|
|
12
|
+
fetch?: FetchFunction;
|
|
13
|
+
generateId?: () => string;
|
|
15
14
|
};
|
|
16
|
-
|
|
15
|
+
//#endregion
|
|
16
|
+
//#region src/revai-transcription-options.d.ts
|
|
17
17
|
type RevaiTranscriptionModelId = 'machine' | 'low_cost' | 'fusion';
|
|
18
|
-
|
|
18
|
+
//#endregion
|
|
19
|
+
//#region src/revai-transcription-model.d.ts
|
|
19
20
|
interface RevaiTranscriptionModelConfig extends RevaiConfig {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
21
|
+
_internal?: {
|
|
22
|
+
currentDate?: () => Date;
|
|
23
|
+
};
|
|
23
24
|
}
|
|
24
25
|
declare class RevaiTranscriptionModel implements TranscriptionModelV4 {
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
26
|
+
readonly modelId: RevaiTranscriptionModelId;
|
|
27
|
+
private readonly config;
|
|
28
|
+
readonly specificationVersion = "v4";
|
|
29
|
+
get provider(): string;
|
|
30
|
+
static [WORKFLOW_SERIALIZE](model: RevaiTranscriptionModel): {
|
|
31
|
+
modelId: string;
|
|
32
|
+
config: import("@ai-sdk/provider").JSONObject;
|
|
33
|
+
};
|
|
34
|
+
static [WORKFLOW_DESERIALIZE](options: {
|
|
35
|
+
modelId: RevaiTranscriptionModelId;
|
|
36
|
+
config: RevaiTranscriptionModelConfig;
|
|
37
|
+
}): RevaiTranscriptionModel;
|
|
38
|
+
constructor(modelId: RevaiTranscriptionModelId, config: RevaiTranscriptionModelConfig);
|
|
39
|
+
private getArgs;
|
|
40
|
+
doGenerate(options: Parameters<TranscriptionModelV4['doGenerate']>[0]): Promise<Awaited<ReturnType<TranscriptionModelV4['doGenerate']>>>;
|
|
40
41
|
}
|
|
41
|
-
|
|
42
|
+
//#endregion
|
|
43
|
+
//#region src/revai-provider.d.ts
|
|
42
44
|
interface RevaiProvider extends ProviderV4 {
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
45
|
+
(modelId: 'machine', settings?: {}): {
|
|
46
|
+
transcription: RevaiTranscriptionModel;
|
|
47
|
+
};
|
|
48
|
+
/**
|
|
49
|
+
* Creates a model for transcription.
|
|
50
|
+
*/
|
|
51
|
+
transcription(modelId: RevaiTranscriptionModelId): TranscriptionModelV4;
|
|
52
|
+
/**
|
|
53
|
+
* @deprecated Use `embeddingModel` instead.
|
|
54
|
+
*/
|
|
55
|
+
textEmbeddingModel(modelId: string): never;
|
|
54
56
|
}
|
|
55
57
|
interface RevaiProviderSettings {
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
58
|
+
/**
|
|
59
|
+
* API key for authenticating requests.
|
|
60
|
+
*/
|
|
61
|
+
apiKey?: string;
|
|
62
|
+
/**
|
|
63
|
+
* Custom headers to include in the requests.
|
|
64
|
+
*/
|
|
65
|
+
headers?: Record<string, string>;
|
|
66
|
+
/**
|
|
67
|
+
* Custom fetch implementation. You can use it as a middleware to intercept requests,
|
|
68
|
+
* or to provide a custom fetch implementation for e.g. testing.
|
|
69
|
+
*/
|
|
70
|
+
fetch?: FetchFunction;
|
|
69
71
|
}
|
|
70
72
|
/**
|
|
71
73
|
* Create a Rev.ai provider instance.
|
|
72
74
|
*/
|
|
73
|
-
declare function createRevai(options?: RevaiProviderSettings): RevaiProvider;
|
|
75
|
+
export declare function createRevai(options?: RevaiProviderSettings): RevaiProvider;
|
|
74
76
|
/**
|
|
75
77
|
* Default Rev.ai provider instance.
|
|
76
78
|
*/
|
|
77
|
-
declare const revai: RevaiProvider;
|
|
78
|
-
|
|
79
|
+
export declare const revai: RevaiProvider;
|
|
80
|
+
//#endregion
|
|
81
|
+
//#region src/revai-transcription-model-options.d.ts
|
|
79
82
|
declare const revaiTranscriptionModelOptionsSchema: z.ZodObject<{
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
}, z.core.$strip>>>;
|
|
83
|
+
metadata: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
84
|
+
notification_config: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
85
|
+
url: z.ZodString;
|
|
86
|
+
auth_headers: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
87
|
+
Authorization: z.ZodString;
|
|
86
88
|
}, z.core.$strip>>>;
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
89
|
+
}, z.core.$strip>>>;
|
|
90
|
+
delete_after_seconds: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
91
|
+
verbatim: z.ZodOptional<z.ZodBoolean>;
|
|
92
|
+
rush: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodBoolean>>>;
|
|
93
|
+
test_mode: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodBoolean>>>;
|
|
94
|
+
segments_to_transcribe: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
95
|
+
start: z.ZodNumber;
|
|
96
|
+
end: z.ZodNumber;
|
|
97
|
+
}, z.core.$strip>>>>;
|
|
98
|
+
speaker_names: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
99
|
+
display_name: z.ZodString;
|
|
100
|
+
}, z.core.$strip>>>>;
|
|
101
|
+
skip_diarization: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodBoolean>>>;
|
|
102
|
+
skip_postprocessing: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodBoolean>>>;
|
|
103
|
+
skip_punctuation: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodBoolean>>>;
|
|
104
|
+
remove_disfluencies: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodBoolean>>>;
|
|
105
|
+
remove_atmospherics: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodBoolean>>>;
|
|
106
|
+
filter_profanity: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodBoolean>>>;
|
|
107
|
+
speaker_channels_count: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
108
|
+
speakers_count: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
109
|
+
diarization_type: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
110
|
+
standard: "standard";
|
|
111
|
+
premium: "premium";
|
|
112
|
+
}>>>>;
|
|
113
|
+
custom_vocabulary_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
114
|
+
custom_vocabularies: z.ZodOptional<z.ZodArray<z.ZodObject<{}, z.core.$strip>>>;
|
|
115
|
+
strict_custom_vocabulary: z.ZodOptional<z.ZodBoolean>;
|
|
116
|
+
summarization_config: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
117
|
+
model: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
118
|
+
standard: "standard";
|
|
119
|
+
premium: "premium";
|
|
109
120
|
}>>>>;
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
}, z.core.$strip>>;
|
|
146
|
-
model: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
147
|
-
standard: "standard";
|
|
148
|
-
premium: "premium";
|
|
149
|
-
}>>>>;
|
|
150
|
-
}, z.core.$strip>>>;
|
|
151
|
-
language: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
|
|
152
|
-
forced_alignment: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodBoolean>>>;
|
|
121
|
+
type: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
122
|
+
paragraph: "paragraph";
|
|
123
|
+
bullets: "bullets";
|
|
124
|
+
}>>>>;
|
|
125
|
+
prompt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
126
|
+
}, z.core.$strip>>>;
|
|
127
|
+
translation_config: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
128
|
+
target_languages: z.ZodArray<z.ZodObject<{
|
|
129
|
+
language: z.ZodEnum<{
|
|
130
|
+
en: "en";
|
|
131
|
+
"en-us": "en-us";
|
|
132
|
+
"en-gb": "en-gb";
|
|
133
|
+
ar: "ar";
|
|
134
|
+
pt: "pt";
|
|
135
|
+
"pt-br": "pt-br";
|
|
136
|
+
"pt-pt": "pt-pt";
|
|
137
|
+
fr: "fr";
|
|
138
|
+
"fr-ca": "fr-ca";
|
|
139
|
+
es: "es";
|
|
140
|
+
"es-es": "es-es";
|
|
141
|
+
"es-la": "es-la";
|
|
142
|
+
it: "it";
|
|
143
|
+
ja: "ja";
|
|
144
|
+
ko: "ko";
|
|
145
|
+
de: "de";
|
|
146
|
+
ru: "ru";
|
|
147
|
+
}>;
|
|
148
|
+
}, z.core.$strip>>;
|
|
149
|
+
model: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
150
|
+
standard: "standard";
|
|
151
|
+
premium: "premium";
|
|
152
|
+
}>>>>;
|
|
153
|
+
}, z.core.$strip>>>;
|
|
154
|
+
language: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
|
|
155
|
+
forced_alignment: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodBoolean>>>;
|
|
153
156
|
}, z.core.$strip>;
|
|
154
157
|
type RevaiTranscriptionModelOptions = z.infer<typeof revaiTranscriptionModelOptionsSchema>;
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
158
|
+
//#endregion
|
|
159
|
+
//#region src/version.d.ts
|
|
160
|
+
export declare const VERSION: string;
|
|
161
|
+
//#endregion
|
|
162
|
+
export type { RevaiProvider, RevaiProviderSettings, RevaiTranscriptionModelOptions };
|
|
163
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","names":[],"sources":["../src/revai-config.ts","../src/revai-transcription-options.ts","../src/revai-transcription-model.ts","../src/revai-provider.ts","../src/revai-transcription-model-options.ts","../src/version.ts"],"mappings":";;;;KAEY;EACV;EACA,MAAM;IAAW;IAAiB;;EAClC,gBAAgB;EAChB,QAAQ;EACR;;;;KCPU;;;UCyBF,sCAAsC;EAC9C;IACE,oBAAoB;;;cAIX,mCAAmC;WAsBnC,SAAS;mBACD;WAtBV;MAEL;UAII,oBAAoB,OAAO;;;;UAO3B,sBAAsB;IAC5B,SAAS;IACT,QAAQ;MACT;EAKU,YAAA,SAAS,2BACD,QAAQ;UAGb;EAiFR,WACJ,SAAS,WAAW,yCACnB,QAAQ,QAAQ,WAAW;;;;UC9Hf,sBAAsB;GAEnC,oBACA;IAEA,eAAe;;;;;EAMjB,cAAc,SAAS,4BAA4B;;;;EAKnD,mBAAmB;;UAGJ;;;;EAIf;;;;EAKA,UAAU;;;;;EAMV,QAAQ;;;;;wBAMM,YACd,UAAS,wBACR;;;;qBA+DU,OAAK;;;cCpHL,sCAAoC,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4L/C,EAAA,KAAA;KAEU,iCAAiC,EAAE,aACtC;;;qBChMI"}
|