voice-router-dev 0.3.3 → 0.3.4
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 +160 -3
- package/dist/constants.d.mts +85 -1
- package/dist/constants.d.ts +85 -1
- package/dist/constants.js +36 -0
- package/dist/constants.js.map +1 -1
- package/dist/constants.mjs +32 -0
- package/dist/constants.mjs.map +1 -1
- package/dist/index.d.mts +541 -35
- package/dist/index.d.ts +541 -35
- package/dist/index.js +308 -20
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +308 -20
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -9,9 +9,70 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
9
9
|
|
|
10
10
|
### Added
|
|
11
11
|
|
|
12
|
+
#### Gladia Audio File Download
|
|
13
|
+
|
|
14
|
+
New `getAudioFile()` method for Gladia adapter - download the original audio used for transcription:
|
|
15
|
+
|
|
16
|
+
```typescript
|
|
17
|
+
// Download audio from a pre-recorded transcription
|
|
18
|
+
const result = await gladiaAdapter.getAudioFile('transcript-123')
|
|
19
|
+
if (result.success && result.data) {
|
|
20
|
+
// Save to file (Node.js)
|
|
21
|
+
const buffer = Buffer.from(await result.data.arrayBuffer())
|
|
22
|
+
fs.writeFileSync('audio.mp3', buffer)
|
|
23
|
+
|
|
24
|
+
// Or create download URL (browser)
|
|
25
|
+
const url = URL.createObjectURL(result.data)
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
// Download audio from a live/streaming session
|
|
29
|
+
const liveResult = await gladiaAdapter.getAudioFile('stream-456', 'streaming')
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
**Note:** This is a Gladia-specific feature. Other providers (Deepgram, AssemblyAI, Azure) do not store audio files after transcription.
|
|
33
|
+
|
|
34
|
+
New capability flag: `capabilities.getAudioFile` indicates provider support for audio retrieval.
|
|
35
|
+
|
|
36
|
+
#### Improved Metadata Clarity
|
|
37
|
+
|
|
38
|
+
New metadata fields for better discoverability:
|
|
39
|
+
|
|
40
|
+
```typescript
|
|
41
|
+
interface TranscriptMetadata {
|
|
42
|
+
/** Original audio URL you provided (echoed back) - renamed from audioUrl */
|
|
43
|
+
sourceAudioUrl?: string
|
|
44
|
+
|
|
45
|
+
/** True if getAudioFile() can retrieve the audio (Gladia only) */
|
|
46
|
+
audioFileAvailable?: boolean
|
|
47
|
+
// ...
|
|
48
|
+
}
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
Usage pattern:
|
|
52
|
+
```typescript
|
|
53
|
+
const { transcripts } = await router.listTranscripts('gladia')
|
|
54
|
+
|
|
55
|
+
transcripts.forEach(item => {
|
|
56
|
+
// What you sent
|
|
57
|
+
console.log(item.data?.metadata?.sourceAudioUrl) // "https://your-bucket.s3.amazonaws.com/audio.mp3"
|
|
58
|
+
|
|
59
|
+
// Can we download from provider?
|
|
60
|
+
if (item.data?.metadata?.audioFileAvailable) {
|
|
61
|
+
const audio = await gladiaAdapter.getAudioFile(item.data.id)
|
|
62
|
+
// audio.data is a Blob - actual file stored by Gladia
|
|
63
|
+
}
|
|
64
|
+
})
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
### Changed
|
|
68
|
+
|
|
69
|
+
- **BREAKING:** `metadata.audioUrl` renamed to `metadata.sourceAudioUrl` for clarity
|
|
70
|
+
- This field contains the URL you originally provided, not a provider-hosted URL
|
|
71
|
+
- `audioFileAvailable` is now set on all provider responses (derived from `capabilities.getAudioFile`)
|
|
72
|
+
|
|
12
73
|
#### listTranscripts Implementation
|
|
13
74
|
|
|
14
|
-
Full `listTranscripts()` support for AssemblyAI, Gladia, and
|
|
75
|
+
Full `listTranscripts()` support for AssemblyAI, Gladia, Azure, and Deepgram using only generated types:
|
|
15
76
|
|
|
16
77
|
```typescript
|
|
17
78
|
// List recent transcripts with filtering
|
|
@@ -31,6 +92,23 @@ const { transcripts } = await router.listTranscripts('gladia', {
|
|
|
31
92
|
const { transcripts } = await router.listTranscripts('assemblyai', {
|
|
32
93
|
assemblyai: { after_id: 'cursor-123' }
|
|
33
94
|
})
|
|
95
|
+
|
|
96
|
+
// Deepgram request history (requires projectId)
|
|
97
|
+
const adapter = new DeepgramAdapter()
|
|
98
|
+
adapter.initialize({
|
|
99
|
+
apiKey: process.env.DEEPGRAM_API_KEY,
|
|
100
|
+
projectId: process.env.DEEPGRAM_PROJECT_ID
|
|
101
|
+
})
|
|
102
|
+
|
|
103
|
+
// List requests (metadata only)
|
|
104
|
+
const { transcripts } = await adapter.listTranscripts({
|
|
105
|
+
status: 'succeeded',
|
|
106
|
+
afterDate: '2026-01-01'
|
|
107
|
+
})
|
|
108
|
+
|
|
109
|
+
// Get full transcript by request ID
|
|
110
|
+
const fullTranscript = await adapter.getTranscript(transcripts[0].data?.id)
|
|
111
|
+
console.log(fullTranscript.data?.text) // Full transcript!
|
|
34
112
|
```
|
|
35
113
|
|
|
36
114
|
#### Status Enums for Filtering
|
|
@@ -38,7 +116,7 @@ const { transcripts } = await router.listTranscripts('assemblyai', {
|
|
|
38
116
|
New status constants with IDE autocomplete:
|
|
39
117
|
|
|
40
118
|
```typescript
|
|
41
|
-
import { AssemblyAIStatus, GladiaStatus, AzureStatus } from 'voice-router-dev/constants'
|
|
119
|
+
import { AssemblyAIStatus, GladiaStatus, AzureStatus, DeepgramStatus } from 'voice-router-dev/constants'
|
|
42
120
|
|
|
43
121
|
await router.listTranscripts('assemblyai', {
|
|
44
122
|
status: AssemblyAIStatus.completed // queued | processing | completed | error
|
|
@@ -51,6 +129,11 @@ await router.listTranscripts('gladia', {
|
|
|
51
129
|
await router.listTranscripts('azure-stt', {
|
|
52
130
|
status: AzureStatus.Succeeded // NotStarted | Running | Succeeded | Failed
|
|
53
131
|
})
|
|
132
|
+
|
|
133
|
+
// Deepgram (request history - requires projectId)
|
|
134
|
+
await adapter.listTranscripts({
|
|
135
|
+
status: DeepgramStatus.succeeded // succeeded | failed
|
|
136
|
+
})
|
|
54
137
|
```
|
|
55
138
|
|
|
56
139
|
#### JSDoc Comments for All Constants
|
|
@@ -60,10 +143,84 @@ All constants now have JSDoc with:
|
|
|
60
143
|
- Usage examples
|
|
61
144
|
- Provider-specific notes
|
|
62
145
|
|
|
146
|
+
#### Typed Response Interfaces
|
|
147
|
+
|
|
148
|
+
New exported types for full autocomplete on transcript responses:
|
|
149
|
+
|
|
150
|
+
```typescript
|
|
151
|
+
import type {
|
|
152
|
+
TranscriptData,
|
|
153
|
+
TranscriptMetadata,
|
|
154
|
+
ListTranscriptsResponse
|
|
155
|
+
} from 'voice-router-dev';
|
|
156
|
+
|
|
157
|
+
const response: ListTranscriptsResponse = await router.listTranscripts('assemblyai', { limit: 20 });
|
|
158
|
+
|
|
159
|
+
response.transcripts.forEach(item => {
|
|
160
|
+
// Full autocomplete - no `as any` casts needed!
|
|
161
|
+
console.log(item.data?.id); // string
|
|
162
|
+
console.log(item.data?.status); // TranscriptionStatus
|
|
163
|
+
console.log(item.data?.metadata?.audioUrl); // string | undefined
|
|
164
|
+
console.log(item.data?.metadata?.createdAt); // string | undefined
|
|
165
|
+
});
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
**Note:** These are manual normalization types that unify different provider schemas.
|
|
169
|
+
For raw provider types, use `result.raw` with the generic parameter:
|
|
170
|
+
|
|
171
|
+
```typescript
|
|
172
|
+
const result: UnifiedTranscriptResponse<'assemblyai'> = await adapter.transcribe(audio);
|
|
173
|
+
// result.raw is typed as AssemblyAITranscript
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
#### DeepgramSampleRate Const
|
|
177
|
+
|
|
178
|
+
New convenience const for Deepgram sample rates (not in OpenAPI spec):
|
|
179
|
+
|
|
180
|
+
```typescript
|
|
181
|
+
import { DeepgramSampleRate } from 'voice-router-dev/constants'
|
|
182
|
+
|
|
183
|
+
{ sampleRate: DeepgramSampleRate.NUMBER_16000 }
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
#### Additional Deepgram OpenAPI Re-exports
|
|
187
|
+
|
|
188
|
+
New constants directly re-exported from OpenAPI-generated types:
|
|
189
|
+
|
|
190
|
+
```typescript
|
|
191
|
+
import { DeepgramIntentMode, DeepgramCallbackMethod } from 'voice-router-dev/constants'
|
|
192
|
+
|
|
193
|
+
// Intent detection mode
|
|
194
|
+
{ customIntentMode: DeepgramIntentMode.extended } // extended | strict
|
|
195
|
+
|
|
196
|
+
// Async callback method
|
|
197
|
+
{ callbackMethod: DeepgramCallbackMethod.POST } // POST | PUT
|
|
198
|
+
```
|
|
199
|
+
|
|
63
200
|
### Changed
|
|
64
201
|
|
|
65
202
|
- All adapter `listTranscripts()` implementations use generated API functions and types only
|
|
66
|
-
- Status mappings use generated enums (`TranscriptStatus`, `TranscriptionControllerListV2StatusItem`, `Status`)
|
|
203
|
+
- Status mappings use generated enums (`TranscriptStatus`, `TranscriptionControllerListV2StatusItem`, `Status`, `ManageV1FilterStatusParameter`)
|
|
204
|
+
- Deepgram adapter now supports `listTranscripts()` via request history API (metadata only)
|
|
205
|
+
- Deepgram `getTranscript()` now returns full transcript data from request history
|
|
206
|
+
|
|
207
|
+
### Fixed
|
|
208
|
+
|
|
209
|
+
- Gladia `listTranscripts()` now includes file metadata:
|
|
210
|
+
- `data.duration` - audio duration in seconds
|
|
211
|
+
- `metadata.audioUrl` - source URL (if audio_url was used)
|
|
212
|
+
- `metadata.filename` - original filename
|
|
213
|
+
- `metadata.audioDuration` - audio duration (also in metadata)
|
|
214
|
+
- `metadata.numberOfChannels` - number of audio channels
|
|
215
|
+
|
|
216
|
+
- All adapters now include `raw: item` in `listTranscripts()` responses for consistency:
|
|
217
|
+
- AssemblyAI: now includes `raw` field with original `TranscriptListItem`
|
|
218
|
+
- Azure: now includes `raw` field with original `Transcription` item
|
|
219
|
+
- Added `metadata.description` to Azure list responses
|
|
220
|
+
|
|
221
|
+
- Added clarifying comments in adapters about provider limitations:
|
|
222
|
+
- AssemblyAI: `audio_duration` only available in full `Transcript`, not `TranscriptListItem`
|
|
223
|
+
- Azure: `contentUrls` is write-only (not returned in list responses per API docs)
|
|
67
224
|
|
|
68
225
|
---
|
|
69
226
|
|
package/dist/constants.d.mts
CHANGED
|
@@ -69,6 +69,61 @@ declare const DeepgramTopicMode: {
|
|
|
69
69
|
readonly extended: "extended";
|
|
70
70
|
readonly strict: "strict";
|
|
71
71
|
};
|
|
72
|
+
/**
|
|
73
|
+
* Deepgram intent detection modes
|
|
74
|
+
*
|
|
75
|
+
* Values: `extended`, `strict`
|
|
76
|
+
*
|
|
77
|
+
* @example
|
|
78
|
+
* ```typescript
|
|
79
|
+
* import { DeepgramIntentMode } from 'voice-router-dev/constants'
|
|
80
|
+
*
|
|
81
|
+
* { customIntentMode: DeepgramIntentMode.extended }
|
|
82
|
+
* ```
|
|
83
|
+
*/
|
|
84
|
+
declare const DeepgramIntentMode: {
|
|
85
|
+
readonly extended: "extended";
|
|
86
|
+
readonly strict: "strict";
|
|
87
|
+
};
|
|
88
|
+
/**
|
|
89
|
+
* Deepgram callback HTTP methods for async transcription
|
|
90
|
+
*
|
|
91
|
+
* Values: `POST`, `PUT`
|
|
92
|
+
*
|
|
93
|
+
* @example
|
|
94
|
+
* ```typescript
|
|
95
|
+
* import { DeepgramCallbackMethod } from 'voice-router-dev/constants'
|
|
96
|
+
*
|
|
97
|
+
* { callbackMethod: DeepgramCallbackMethod.POST }
|
|
98
|
+
* ```
|
|
99
|
+
*/
|
|
100
|
+
declare const DeepgramCallbackMethod: {
|
|
101
|
+
readonly POST: "POST";
|
|
102
|
+
readonly PUT: "PUT";
|
|
103
|
+
};
|
|
104
|
+
/**
|
|
105
|
+
* Deepgram supported sample rates (Hz)
|
|
106
|
+
*
|
|
107
|
+
* **Note:** This const is NOT type-checked against a generated type.
|
|
108
|
+
* Deepgram's OpenAPI spec accepts any `number` for sampleRate.
|
|
109
|
+
* These values are from Deepgram documentation for convenience.
|
|
110
|
+
*
|
|
111
|
+
* Values: `8000`, `16000`, `32000`, `44100`, `48000`
|
|
112
|
+
*
|
|
113
|
+
* @example
|
|
114
|
+
* ```typescript
|
|
115
|
+
* import { DeepgramSampleRate } from 'voice-router-dev/constants'
|
|
116
|
+
*
|
|
117
|
+
* { sampleRate: DeepgramSampleRate.NUMBER_16000 }
|
|
118
|
+
* ```
|
|
119
|
+
*/
|
|
120
|
+
declare const DeepgramSampleRate: {
|
|
121
|
+
readonly NUMBER_8000: 8000;
|
|
122
|
+
readonly NUMBER_16000: 16000;
|
|
123
|
+
readonly NUMBER_32000: 32000;
|
|
124
|
+
readonly NUMBER_44100: 44100;
|
|
125
|
+
readonly NUMBER_48000: 48000;
|
|
126
|
+
};
|
|
72
127
|
/**
|
|
73
128
|
* Deepgram transcription models
|
|
74
129
|
*
|
|
@@ -525,12 +580,39 @@ declare const AzureStatus: {
|
|
|
525
580
|
readonly Succeeded: "Succeeded";
|
|
526
581
|
readonly Failed: "Failed";
|
|
527
582
|
};
|
|
583
|
+
/**
|
|
584
|
+
* Deepgram request history status values for filtering
|
|
585
|
+
*
|
|
586
|
+
* Values: `succeeded`, `failed`
|
|
587
|
+
*
|
|
588
|
+
* Note: Deepgram only stores request metadata, not transcript content.
|
|
589
|
+
* Requires `projectId` to be set during adapter initialization.
|
|
590
|
+
*
|
|
591
|
+
* @example
|
|
592
|
+
* ```typescript
|
|
593
|
+
* import { DeepgramStatus } from 'voice-router-dev/constants'
|
|
594
|
+
*
|
|
595
|
+
* await router.listTranscripts('deepgram', {
|
|
596
|
+
* status: DeepgramStatus.succeeded
|
|
597
|
+
* })
|
|
598
|
+
* ```
|
|
599
|
+
*/
|
|
600
|
+
declare const DeepgramStatus: {
|
|
601
|
+
readonly succeeded: "succeeded";
|
|
602
|
+
readonly failed: "failed";
|
|
603
|
+
};
|
|
528
604
|
/** Deepgram encoding type derived from const object */
|
|
529
605
|
type DeepgramEncodingType = (typeof DeepgramEncoding)[keyof typeof DeepgramEncoding];
|
|
530
606
|
/** Deepgram redaction type derived from const object */
|
|
531
607
|
type DeepgramRedactType = (typeof DeepgramRedact)[keyof typeof DeepgramRedact];
|
|
532
608
|
/** Deepgram topic mode type derived from const object */
|
|
533
609
|
type DeepgramTopicModeType = (typeof DeepgramTopicMode)[keyof typeof DeepgramTopicMode];
|
|
610
|
+
/** Deepgram intent mode type derived from const object */
|
|
611
|
+
type DeepgramIntentModeType = (typeof DeepgramIntentMode)[keyof typeof DeepgramIntentMode];
|
|
612
|
+
/** Deepgram callback method type derived from const object */
|
|
613
|
+
type DeepgramCallbackMethodType = (typeof DeepgramCallbackMethod)[keyof typeof DeepgramCallbackMethod];
|
|
614
|
+
/** Deepgram sample rate type derived from const object */
|
|
615
|
+
type DeepgramSampleRateType = (typeof DeepgramSampleRate)[keyof typeof DeepgramSampleRate];
|
|
534
616
|
/** Deepgram model type derived from const object */
|
|
535
617
|
type DeepgramModelType = (typeof DeepgramModel)[keyof typeof DeepgramModel];
|
|
536
618
|
/** Gladia encoding type derived from const object */
|
|
@@ -557,5 +639,7 @@ type AssemblyAIStatusType = (typeof AssemblyAIStatus)[keyof typeof AssemblyAISta
|
|
|
557
639
|
type GladiaStatusType = (typeof GladiaStatus)[keyof typeof GladiaStatus];
|
|
558
640
|
/** Azure status type derived from const object */
|
|
559
641
|
type AzureStatusType = (typeof AzureStatus)[keyof typeof AzureStatus];
|
|
642
|
+
/** Deepgram status type derived from const object */
|
|
643
|
+
type DeepgramStatusType = (typeof DeepgramStatus)[keyof typeof DeepgramStatus];
|
|
560
644
|
|
|
561
|
-
export { AssemblyAIEncoding, type AssemblyAIEncodingType, AssemblyAISampleRate, type AssemblyAISampleRateType, AssemblyAISpeechModel, type AssemblyAISpeechModelType, AssemblyAIStatus, type AssemblyAIStatusType, AzureStatus, type AzureStatusType, DeepgramEncoding, type DeepgramEncodingType, DeepgramModel, type DeepgramModelType, DeepgramRedact, type DeepgramRedactType, DeepgramTopicMode, type DeepgramTopicModeType, GladiaBitDepth, type GladiaBitDepthType, GladiaEncoding, type GladiaEncodingType, GladiaLanguage, type GladiaLanguageType, GladiaModel, type GladiaModelType, GladiaSampleRate, type GladiaSampleRateType, GladiaStatus, type GladiaStatusType, GladiaTranslationLanguage, type GladiaTranslationLanguageType };
|
|
645
|
+
export { AssemblyAIEncoding, type AssemblyAIEncodingType, AssemblyAISampleRate, type AssemblyAISampleRateType, AssemblyAISpeechModel, type AssemblyAISpeechModelType, AssemblyAIStatus, type AssemblyAIStatusType, AzureStatus, type AzureStatusType, DeepgramCallbackMethod, type DeepgramCallbackMethodType, DeepgramEncoding, type DeepgramEncodingType, DeepgramIntentMode, type DeepgramIntentModeType, DeepgramModel, type DeepgramModelType, DeepgramRedact, type DeepgramRedactType, DeepgramSampleRate, type DeepgramSampleRateType, DeepgramStatus, type DeepgramStatusType, DeepgramTopicMode, type DeepgramTopicModeType, GladiaBitDepth, type GladiaBitDepthType, GladiaEncoding, type GladiaEncodingType, GladiaLanguage, type GladiaLanguageType, GladiaModel, type GladiaModelType, GladiaSampleRate, type GladiaSampleRateType, GladiaStatus, type GladiaStatusType, GladiaTranslationLanguage, type GladiaTranslationLanguageType };
|
package/dist/constants.d.ts
CHANGED
|
@@ -69,6 +69,61 @@ declare const DeepgramTopicMode: {
|
|
|
69
69
|
readonly extended: "extended";
|
|
70
70
|
readonly strict: "strict";
|
|
71
71
|
};
|
|
72
|
+
/**
|
|
73
|
+
* Deepgram intent detection modes
|
|
74
|
+
*
|
|
75
|
+
* Values: `extended`, `strict`
|
|
76
|
+
*
|
|
77
|
+
* @example
|
|
78
|
+
* ```typescript
|
|
79
|
+
* import { DeepgramIntentMode } from 'voice-router-dev/constants'
|
|
80
|
+
*
|
|
81
|
+
* { customIntentMode: DeepgramIntentMode.extended }
|
|
82
|
+
* ```
|
|
83
|
+
*/
|
|
84
|
+
declare const DeepgramIntentMode: {
|
|
85
|
+
readonly extended: "extended";
|
|
86
|
+
readonly strict: "strict";
|
|
87
|
+
};
|
|
88
|
+
/**
|
|
89
|
+
* Deepgram callback HTTP methods for async transcription
|
|
90
|
+
*
|
|
91
|
+
* Values: `POST`, `PUT`
|
|
92
|
+
*
|
|
93
|
+
* @example
|
|
94
|
+
* ```typescript
|
|
95
|
+
* import { DeepgramCallbackMethod } from 'voice-router-dev/constants'
|
|
96
|
+
*
|
|
97
|
+
* { callbackMethod: DeepgramCallbackMethod.POST }
|
|
98
|
+
* ```
|
|
99
|
+
*/
|
|
100
|
+
declare const DeepgramCallbackMethod: {
|
|
101
|
+
readonly POST: "POST";
|
|
102
|
+
readonly PUT: "PUT";
|
|
103
|
+
};
|
|
104
|
+
/**
|
|
105
|
+
* Deepgram supported sample rates (Hz)
|
|
106
|
+
*
|
|
107
|
+
* **Note:** This const is NOT type-checked against a generated type.
|
|
108
|
+
* Deepgram's OpenAPI spec accepts any `number` for sampleRate.
|
|
109
|
+
* These values are from Deepgram documentation for convenience.
|
|
110
|
+
*
|
|
111
|
+
* Values: `8000`, `16000`, `32000`, `44100`, `48000`
|
|
112
|
+
*
|
|
113
|
+
* @example
|
|
114
|
+
* ```typescript
|
|
115
|
+
* import { DeepgramSampleRate } from 'voice-router-dev/constants'
|
|
116
|
+
*
|
|
117
|
+
* { sampleRate: DeepgramSampleRate.NUMBER_16000 }
|
|
118
|
+
* ```
|
|
119
|
+
*/
|
|
120
|
+
declare const DeepgramSampleRate: {
|
|
121
|
+
readonly NUMBER_8000: 8000;
|
|
122
|
+
readonly NUMBER_16000: 16000;
|
|
123
|
+
readonly NUMBER_32000: 32000;
|
|
124
|
+
readonly NUMBER_44100: 44100;
|
|
125
|
+
readonly NUMBER_48000: 48000;
|
|
126
|
+
};
|
|
72
127
|
/**
|
|
73
128
|
* Deepgram transcription models
|
|
74
129
|
*
|
|
@@ -525,12 +580,39 @@ declare const AzureStatus: {
|
|
|
525
580
|
readonly Succeeded: "Succeeded";
|
|
526
581
|
readonly Failed: "Failed";
|
|
527
582
|
};
|
|
583
|
+
/**
|
|
584
|
+
* Deepgram request history status values for filtering
|
|
585
|
+
*
|
|
586
|
+
* Values: `succeeded`, `failed`
|
|
587
|
+
*
|
|
588
|
+
* Note: Deepgram only stores request metadata, not transcript content.
|
|
589
|
+
* Requires `projectId` to be set during adapter initialization.
|
|
590
|
+
*
|
|
591
|
+
* @example
|
|
592
|
+
* ```typescript
|
|
593
|
+
* import { DeepgramStatus } from 'voice-router-dev/constants'
|
|
594
|
+
*
|
|
595
|
+
* await router.listTranscripts('deepgram', {
|
|
596
|
+
* status: DeepgramStatus.succeeded
|
|
597
|
+
* })
|
|
598
|
+
* ```
|
|
599
|
+
*/
|
|
600
|
+
declare const DeepgramStatus: {
|
|
601
|
+
readonly succeeded: "succeeded";
|
|
602
|
+
readonly failed: "failed";
|
|
603
|
+
};
|
|
528
604
|
/** Deepgram encoding type derived from const object */
|
|
529
605
|
type DeepgramEncodingType = (typeof DeepgramEncoding)[keyof typeof DeepgramEncoding];
|
|
530
606
|
/** Deepgram redaction type derived from const object */
|
|
531
607
|
type DeepgramRedactType = (typeof DeepgramRedact)[keyof typeof DeepgramRedact];
|
|
532
608
|
/** Deepgram topic mode type derived from const object */
|
|
533
609
|
type DeepgramTopicModeType = (typeof DeepgramTopicMode)[keyof typeof DeepgramTopicMode];
|
|
610
|
+
/** Deepgram intent mode type derived from const object */
|
|
611
|
+
type DeepgramIntentModeType = (typeof DeepgramIntentMode)[keyof typeof DeepgramIntentMode];
|
|
612
|
+
/** Deepgram callback method type derived from const object */
|
|
613
|
+
type DeepgramCallbackMethodType = (typeof DeepgramCallbackMethod)[keyof typeof DeepgramCallbackMethod];
|
|
614
|
+
/** Deepgram sample rate type derived from const object */
|
|
615
|
+
type DeepgramSampleRateType = (typeof DeepgramSampleRate)[keyof typeof DeepgramSampleRate];
|
|
534
616
|
/** Deepgram model type derived from const object */
|
|
535
617
|
type DeepgramModelType = (typeof DeepgramModel)[keyof typeof DeepgramModel];
|
|
536
618
|
/** Gladia encoding type derived from const object */
|
|
@@ -557,5 +639,7 @@ type AssemblyAIStatusType = (typeof AssemblyAIStatus)[keyof typeof AssemblyAISta
|
|
|
557
639
|
type GladiaStatusType = (typeof GladiaStatus)[keyof typeof GladiaStatus];
|
|
558
640
|
/** Azure status type derived from const object */
|
|
559
641
|
type AzureStatusType = (typeof AzureStatus)[keyof typeof AzureStatus];
|
|
642
|
+
/** Deepgram status type derived from const object */
|
|
643
|
+
type DeepgramStatusType = (typeof DeepgramStatus)[keyof typeof DeepgramStatus];
|
|
560
644
|
|
|
561
|
-
export { AssemblyAIEncoding, type AssemblyAIEncodingType, AssemblyAISampleRate, type AssemblyAISampleRateType, AssemblyAISpeechModel, type AssemblyAISpeechModelType, AssemblyAIStatus, type AssemblyAIStatusType, AzureStatus, type AzureStatusType, DeepgramEncoding, type DeepgramEncodingType, DeepgramModel, type DeepgramModelType, DeepgramRedact, type DeepgramRedactType, DeepgramTopicMode, type DeepgramTopicModeType, GladiaBitDepth, type GladiaBitDepthType, GladiaEncoding, type GladiaEncodingType, GladiaLanguage, type GladiaLanguageType, GladiaModel, type GladiaModelType, GladiaSampleRate, type GladiaSampleRateType, GladiaStatus, type GladiaStatusType, GladiaTranslationLanguage, type GladiaTranslationLanguageType };
|
|
645
|
+
export { AssemblyAIEncoding, type AssemblyAIEncodingType, AssemblyAISampleRate, type AssemblyAISampleRateType, AssemblyAISpeechModel, type AssemblyAISpeechModelType, AssemblyAIStatus, type AssemblyAIStatusType, AzureStatus, type AzureStatusType, DeepgramCallbackMethod, type DeepgramCallbackMethodType, DeepgramEncoding, type DeepgramEncodingType, DeepgramIntentMode, type DeepgramIntentModeType, DeepgramModel, type DeepgramModelType, DeepgramRedact, type DeepgramRedactType, DeepgramSampleRate, type DeepgramSampleRateType, DeepgramStatus, type DeepgramStatusType, DeepgramTopicMode, type DeepgramTopicModeType, GladiaBitDepth, type GladiaBitDepthType, GladiaEncoding, type GladiaEncodingType, GladiaLanguage, type GladiaLanguageType, GladiaModel, type GladiaModelType, GladiaSampleRate, type GladiaSampleRateType, GladiaStatus, type GladiaStatusType, GladiaTranslationLanguage, type GladiaTranslationLanguageType };
|
package/dist/constants.js
CHANGED
|
@@ -26,9 +26,13 @@ __export(constants_exports, {
|
|
|
26
26
|
AssemblyAISpeechModel: () => AssemblyAISpeechModel,
|
|
27
27
|
AssemblyAIStatus: () => AssemblyAIStatus,
|
|
28
28
|
AzureStatus: () => AzureStatus,
|
|
29
|
+
DeepgramCallbackMethod: () => DeepgramCallbackMethod,
|
|
29
30
|
DeepgramEncoding: () => DeepgramEncoding,
|
|
31
|
+
DeepgramIntentMode: () => DeepgramIntentMode,
|
|
30
32
|
DeepgramModel: () => DeepgramModel,
|
|
31
33
|
DeepgramRedact: () => DeepgramRedact,
|
|
34
|
+
DeepgramSampleRate: () => DeepgramSampleRate,
|
|
35
|
+
DeepgramStatus: () => DeepgramStatus,
|
|
32
36
|
DeepgramTopicMode: () => DeepgramTopicMode,
|
|
33
37
|
GladiaBitDepth: () => GladiaBitDepth,
|
|
34
38
|
GladiaEncoding: () => GladiaEncoding,
|
|
@@ -63,6 +67,18 @@ var SharedCustomTopicModeParameter = {
|
|
|
63
67
|
strict: "strict"
|
|
64
68
|
};
|
|
65
69
|
|
|
70
|
+
// src/generated/deepgram/schema/sharedCustomIntentModeParameter.ts
|
|
71
|
+
var SharedCustomIntentModeParameter = {
|
|
72
|
+
extended: "extended",
|
|
73
|
+
strict: "strict"
|
|
74
|
+
};
|
|
75
|
+
|
|
76
|
+
// src/generated/deepgram/schema/sharedCallbackMethodParameter.ts
|
|
77
|
+
var SharedCallbackMethodParameter = {
|
|
78
|
+
POST: "POST",
|
|
79
|
+
PUT: "PUT"
|
|
80
|
+
};
|
|
81
|
+
|
|
66
82
|
// src/generated/gladia/schema/streamingSupportedEncodingEnum.ts
|
|
67
83
|
var StreamingSupportedEncodingEnum = {
|
|
68
84
|
"wav/pcm": "wav/pcm",
|
|
@@ -323,10 +339,25 @@ var Status = {
|
|
|
323
339
|
Failed: "Failed"
|
|
324
340
|
};
|
|
325
341
|
|
|
342
|
+
// src/generated/deepgram/schema/manageV1FilterStatusParameter.ts
|
|
343
|
+
var ManageV1FilterStatusParameter = {
|
|
344
|
+
succeeded: "succeeded",
|
|
345
|
+
failed: "failed"
|
|
346
|
+
};
|
|
347
|
+
|
|
326
348
|
// src/constants.ts
|
|
327
349
|
var DeepgramEncoding = ListenV1EncodingParameter;
|
|
328
350
|
var DeepgramRedact = ListenV1RedactParameterOneOfItem;
|
|
329
351
|
var DeepgramTopicMode = SharedCustomTopicModeParameter;
|
|
352
|
+
var DeepgramIntentMode = SharedCustomIntentModeParameter;
|
|
353
|
+
var DeepgramCallbackMethod = SharedCallbackMethodParameter;
|
|
354
|
+
var DeepgramSampleRate = {
|
|
355
|
+
NUMBER_8000: 8e3,
|
|
356
|
+
NUMBER_16000: 16e3,
|
|
357
|
+
NUMBER_32000: 32e3,
|
|
358
|
+
NUMBER_44100: 44100,
|
|
359
|
+
NUMBER_48000: 48e3
|
|
360
|
+
};
|
|
330
361
|
var DeepgramModel = {
|
|
331
362
|
// Nova 3 models (latest)
|
|
332
363
|
"nova-3": "nova-3",
|
|
@@ -391,6 +422,7 @@ var AssemblyAISampleRate = {
|
|
|
391
422
|
var AssemblyAIStatus = TranscriptStatus;
|
|
392
423
|
var GladiaStatus = TranscriptionControllerListV2StatusItem;
|
|
393
424
|
var AzureStatus = Status;
|
|
425
|
+
var DeepgramStatus = ManageV1FilterStatusParameter;
|
|
394
426
|
// Annotate the CommonJS export names for ESM import in node:
|
|
395
427
|
0 && (module.exports = {
|
|
396
428
|
AssemblyAIEncoding,
|
|
@@ -398,9 +430,13 @@ var AzureStatus = Status;
|
|
|
398
430
|
AssemblyAISpeechModel,
|
|
399
431
|
AssemblyAIStatus,
|
|
400
432
|
AzureStatus,
|
|
433
|
+
DeepgramCallbackMethod,
|
|
401
434
|
DeepgramEncoding,
|
|
435
|
+
DeepgramIntentMode,
|
|
402
436
|
DeepgramModel,
|
|
403
437
|
DeepgramRedact,
|
|
438
|
+
DeepgramSampleRate,
|
|
439
|
+
DeepgramStatus,
|
|
404
440
|
DeepgramTopicMode,
|
|
405
441
|
GladiaBitDepth,
|
|
406
442
|
GladiaEncoding,
|