@ai-sdk/deepgram 3.0.0-beta.3 → 3.0.0-beta.30

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/dist/index.d.mts DELETED
@@ -1,128 +0,0 @@
1
- import { TranscriptionModelV3, ProviderV3, SpeechModelV3 } from '@ai-sdk/provider';
2
- import { FetchFunction } from '@ai-sdk/provider-utils';
3
- import { z } from 'zod/v4';
4
-
5
- type DeepgramConfig = {
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;
14
- };
15
-
16
- type DeepgramTranscriptionModelId = 'base' | 'base-general' | 'base-meeting' | 'base-phonecall' | 'base-finance' | 'base-conversationalai' | 'base-voicemail' | 'base-video' | 'enhanced' | 'enhanced-general' | 'enhanced-meeting' | 'enhanced-phonecall' | 'enhanced-finance' | 'nova' | 'nova-general' | 'nova-phonecall' | 'nova-medical' | 'nova-2' | 'nova-2-general' | 'nova-2-meeting' | 'nova-2-phonecall' | 'nova-2-finance' | 'nova-2-conversationalai' | 'nova-2-voicemail' | 'nova-2-video' | 'nova-2-medical' | 'nova-2-drivethru' | 'nova-2-automotive' | 'nova-2-atc' | 'nova-3' | 'nova-3-general' | 'nova-3-medical' | (string & {});
17
-
18
- declare const deepgramTranscriptionModelOptionsSchema: z.ZodObject<{
19
- language: z.ZodOptional<z.ZodNullable<z.ZodString>>;
20
- detectLanguage: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
21
- smartFormat: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
22
- punctuate: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
23
- paragraphs: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
24
- summarize: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodLiteral<"v2">, z.ZodLiteral<false>]>>>;
25
- topics: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
26
- intents: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
27
- sentiment: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
28
- detectEntities: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
29
- redact: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>>;
30
- replace: z.ZodOptional<z.ZodNullable<z.ZodString>>;
31
- search: z.ZodOptional<z.ZodNullable<z.ZodString>>;
32
- keyterm: z.ZodOptional<z.ZodNullable<z.ZodString>>;
33
- diarize: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
34
- utterances: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
35
- uttSplit: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
36
- fillerWords: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
37
- }, z.core.$strip>;
38
- type DeepgramTranscriptionModelOptions = z.infer<typeof deepgramTranscriptionModelOptionsSchema>;
39
- interface DeepgramTranscriptionModelConfig extends DeepgramConfig {
40
- _internal?: {
41
- currentDate?: () => Date;
42
- };
43
- }
44
- declare class DeepgramTranscriptionModel implements TranscriptionModelV3 {
45
- readonly modelId: DeepgramTranscriptionModelId;
46
- private readonly config;
47
- readonly specificationVersion = "v3";
48
- get provider(): string;
49
- constructor(modelId: DeepgramTranscriptionModelId, config: DeepgramTranscriptionModelConfig);
50
- private getArgs;
51
- doGenerate(options: Parameters<TranscriptionModelV3['doGenerate']>[0]): Promise<Awaited<ReturnType<TranscriptionModelV3['doGenerate']>>>;
52
- }
53
-
54
- type DeepgramSpeechModelId = 'aura-asteria-en' | 'aura-2-asteria-en' | 'aura-2-thalia-en' | 'aura-2-helena-en' | 'aura-2-orpheus-en' | 'aura-2-zeus-en' | 'aura-luna-en' | 'aura-stella-en' | (string & {});
55
-
56
- interface DeepgramProvider extends ProviderV3 {
57
- (modelId: 'nova-3', settings?: {}): {
58
- transcription: DeepgramTranscriptionModel;
59
- };
60
- /**
61
- * Creates a model for transcription.
62
- */
63
- transcription(modelId: DeepgramTranscriptionModelId): TranscriptionModelV3;
64
- /**
65
- * Creates a model for speech generation.
66
- */
67
- speech(modelId: DeepgramSpeechModelId): SpeechModelV3;
68
- /**
69
- * @deprecated Use `embeddingModel` instead.
70
- */
71
- textEmbeddingModel(modelId: string): never;
72
- }
73
- interface DeepgramProviderSettings {
74
- /**
75
- * API key for authenticating requests.
76
- */
77
- apiKey?: string;
78
- /**
79
- * Custom headers to include in the requests.
80
- */
81
- headers?: Record<string, string>;
82
- /**
83
- * Custom fetch implementation. You can use it as a middleware to intercept requests,
84
- * or to provide a custom fetch implementation for e.g. testing.
85
- */
86
- fetch?: FetchFunction;
87
- }
88
- /**
89
- * Create an Deepgram provider instance.
90
- */
91
- declare function createDeepgram(options?: DeepgramProviderSettings): DeepgramProvider;
92
- /**
93
- * Default Deepgram provider instance.
94
- */
95
- declare const deepgram: DeepgramProvider;
96
-
97
- declare const deepgramSpeechModelOptionsSchema: z.ZodObject<{
98
- bitRate: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>>;
99
- container: z.ZodOptional<z.ZodNullable<z.ZodString>>;
100
- encoding: z.ZodOptional<z.ZodNullable<z.ZodString>>;
101
- sampleRate: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
102
- callback: z.ZodOptional<z.ZodNullable<z.ZodString>>;
103
- callbackMethod: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
104
- POST: "POST";
105
- PUT: "PUT";
106
- }>>>;
107
- mipOptOut: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
108
- tag: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>>;
109
- }, z.core.$strip>;
110
- type DeepgramSpeechModelOptions = z.infer<typeof deepgramSpeechModelOptionsSchema>;
111
- interface DeepgramSpeechModelConfig extends DeepgramConfig {
112
- _internal?: {
113
- currentDate?: () => Date;
114
- };
115
- }
116
- declare class DeepgramSpeechModel implements SpeechModelV3 {
117
- readonly modelId: DeepgramSpeechModelId;
118
- private readonly config;
119
- readonly specificationVersion = "v3";
120
- get provider(): string;
121
- constructor(modelId: DeepgramSpeechModelId, config: DeepgramSpeechModelConfig);
122
- private getArgs;
123
- doGenerate(options: Parameters<SpeechModelV3['doGenerate']>[0]): Promise<Awaited<ReturnType<SpeechModelV3['doGenerate']>>>;
124
- }
125
-
126
- declare const VERSION: string;
127
-
128
- export { type DeepgramProvider, type DeepgramProviderSettings, type DeepgramSpeechModelOptions as DeepgramSpeechCallOptions, DeepgramSpeechModel, type DeepgramSpeechModelId, type DeepgramSpeechModelOptions, type DeepgramTranscriptionModelOptions, VERSION, createDeepgram, deepgram };