vargai 0.4.0-alpha64 → 0.4.0-alpha66
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/package.json +1 -1
- package/src/ai-sdk/file.ts +5 -0
- package/src/ai-sdk/index.ts +1 -0
- package/src/ai-sdk/providers/elevenlabs.ts +8 -2
- package/bun.lock +0 -1455
package/package.json
CHANGED
package/src/ai-sdk/file.ts
CHANGED
|
@@ -268,6 +268,8 @@ export class File {
|
|
|
268
268
|
"video/mp4": ".mp4",
|
|
269
269
|
"video/webm": ".webm",
|
|
270
270
|
"video/quicktime": ".mov",
|
|
271
|
+
"text/x-ssa": ".ass",
|
|
272
|
+
"application/x-subrip": ".srt",
|
|
271
273
|
};
|
|
272
274
|
return extMap[this._mediaType] ?? "";
|
|
273
275
|
}
|
|
@@ -290,6 +292,9 @@ function inferMediaType(path: string): string {
|
|
|
290
292
|
mp4: "video/mp4",
|
|
291
293
|
webm: "video/webm",
|
|
292
294
|
mov: "video/quicktime",
|
|
295
|
+
ass: "text/x-ssa",
|
|
296
|
+
ssa: "text/x-ssa",
|
|
297
|
+
srt: "application/x-subrip",
|
|
293
298
|
};
|
|
294
299
|
return mimeTypes[ext ?? ""] ?? "application/octet-stream";
|
|
295
300
|
}
|
package/src/ai-sdk/index.ts
CHANGED
|
@@ -168,6 +168,12 @@ export interface ElevenLabsProviderSettings {
|
|
|
168
168
|
apiKey?: string;
|
|
169
169
|
}
|
|
170
170
|
|
|
171
|
+
/** Default model IDs used when callers omit the modelId argument. */
|
|
172
|
+
export const ELEVENLABS_DEFAULTS = {
|
|
173
|
+
speechModel: "eleven_turbo_v2",
|
|
174
|
+
musicModel: "music_v1",
|
|
175
|
+
} as const;
|
|
176
|
+
|
|
171
177
|
export interface ElevenLabsProvider extends ProviderV3 {
|
|
172
178
|
speechModel(modelId?: string): SpeechModelV3;
|
|
173
179
|
musicModel(modelId?: string): MusicModelV3;
|
|
@@ -184,10 +190,10 @@ export function createElevenLabs(
|
|
|
184
190
|
|
|
185
191
|
return {
|
|
186
192
|
specificationVersion: "v3",
|
|
187
|
-
speechModel(modelId =
|
|
193
|
+
speechModel(modelId = ELEVENLABS_DEFAULTS.speechModel) {
|
|
188
194
|
return new ElevenLabsSpeechModel(modelId, client);
|
|
189
195
|
},
|
|
190
|
-
musicModel(modelId =
|
|
196
|
+
musicModel(modelId = ELEVENLABS_DEFAULTS.musicModel) {
|
|
191
197
|
return new ElevenLabsMusicModel(modelId, client);
|
|
192
198
|
},
|
|
193
199
|
languageModel(modelId: string): LanguageModelV3 {
|