@ai-sdk/google-vertex 5.0.65 → 5.0.66
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 +8 -0
- package/dist/anthropic/edge/index.js +1 -1
- package/dist/edge/index.d.ts +7 -1
- package/dist/edge/index.js +571 -45
- package/dist/edge/index.js.map +1 -1
- package/dist/index.d.ts +67 -3
- package/dist/index.js +572 -45
- package/dist/index.js.map +1 -1
- package/dist/maas/edge/index.js +1 -1
- package/dist/xai/edge/index.js +1 -1
- package/package.json +2 -2
- package/src/gemini-transcription/google-vertex-gemini-transcription-model-options.ts +51 -0
- package/src/gemini-transcription/google-vertex-gemini-transcription-model.ts +709 -0
- package/src/google-vertex-provider-base.ts +25 -0
- package/src/index.ts +5 -0
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { z } from 'zod/v4';
|
|
2
|
+
|
|
3
|
+
export type GoogleVertexGeminiTranscriptionModelId =
|
|
4
|
+
| 'gemini-3.5-transcribe'
|
|
5
|
+
| 'gemini-3.5-transcribe-live'
|
|
6
|
+
| (string & {});
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Speech recognition options for Gemini transcription models on Vertex,
|
|
10
|
+
* shared by unary (`gemini-3.5-transcribe`) and live
|
|
11
|
+
* (`gemini-3.5-transcribe-live`) variants. Maps onto Google's
|
|
12
|
+
* `AudioTranscriptionConfig`.
|
|
13
|
+
*/
|
|
14
|
+
export const googleVertexGeminiTranscriptionModelOptions = z.object({
|
|
15
|
+
/**
|
|
16
|
+
* BCP-47 language codes providing hints about the languages present in the
|
|
17
|
+
* audio. If omitted or empty, defaults to automatic language detection.
|
|
18
|
+
*/
|
|
19
|
+
languageCodes: z.array(z.string()).optional(),
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Custom vocabulary phrases, which bias the speech recognition model
|
|
23
|
+
* toward recognizing specific terms.
|
|
24
|
+
*/
|
|
25
|
+
customVocabulary: z.array(z.string()).optional(),
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* Enables word-level timestamp generation.
|
|
29
|
+
*/
|
|
30
|
+
wordTimestamp: z.boolean().optional(),
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* Enables speaker diarization.
|
|
34
|
+
*/
|
|
35
|
+
diarization: z.boolean().optional(),
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* Transcription output formatting mode.
|
|
39
|
+
*
|
|
40
|
+
* - `VERBATIM` (default): exact literal transcript preserving filler
|
|
41
|
+
* words, repetitions, and false starts.
|
|
42
|
+
* - `SMART`: cleans up and structures the transcript in real time —
|
|
43
|
+
* disfluency removal, inline self-corrections, structured formatting
|
|
44
|
+
* (lists, numbers, dates, paragraph breaks), and grammar/casing polish.
|
|
45
|
+
*/
|
|
46
|
+
mode: z.enum(['SMART', 'VERBATIM']).optional(),
|
|
47
|
+
});
|
|
48
|
+
|
|
49
|
+
export type GoogleVertexTranscriptionModelGeminiOptions = z.infer<
|
|
50
|
+
typeof googleVertexGeminiTranscriptionModelOptions
|
|
51
|
+
>;
|