voice-router-dev 0.7.7 → 0.7.9
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 +80 -0
- package/dist/constants.d.mts +1 -1
- package/dist/constants.d.ts +1 -1
- package/dist/{field-configs-hG07cSDF.d.mts → field-configs-CaXYfrJg.d.mts} +5484 -5484
- package/dist/{field-configs-hG07cSDF.d.ts → field-configs-CaXYfrJg.d.ts} +5484 -5484
- package/dist/field-configs.d.mts +1 -1
- package/dist/field-configs.d.ts +1 -1
- package/dist/field-configs.js +4 -0
- package/dist/field-configs.mjs +4 -0
- package/dist/field-equivalences.d.mts +90 -0
- package/dist/field-equivalences.d.ts +90 -0
- package/dist/field-equivalences.js +589 -0
- package/dist/field-equivalences.mjs +562 -0
- package/dist/field-metadata.d.mts +42 -18
- package/dist/field-metadata.d.ts +42 -18
- package/dist/field-metadata.js +51 -14
- package/dist/field-metadata.mjs +51 -14
- package/dist/index.d.mts +375 -375
- package/dist/index.d.ts +375 -375
- package/dist/index.js +4 -0
- package/dist/index.mjs +4 -0
- package/package.json +11 -2
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,86 @@ All notable changes to this project will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [0.7.9] - 2026-01-27
|
|
9
|
+
|
|
10
|
+
### Fixed
|
|
11
|
+
|
|
12
|
+
#### `custom_metadata` Now Correctly Typed as Object
|
|
13
|
+
|
|
14
|
+
The `custom_metadata` field in Gladia (and other providers) was incorrectly typed as `string` in field metadata. It's now correctly typed as `object` with `inputFormat: "json"`.
|
|
15
|
+
|
|
16
|
+
```typescript
|
|
17
|
+
// Before (0.7.8)
|
|
18
|
+
{ name: "custom_metadata", type: "string", ... }
|
|
19
|
+
|
|
20
|
+
// After (0.7.9)
|
|
21
|
+
{ name: "custom_metadata", type: "object", inputFormat: "json", ... }
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
This allows UI importers to properly handle nested properties like `custom_metadata.folder_id` instead of treating them as unrecognized fields.
|
|
25
|
+
|
|
26
|
+
**Technical fix:** Added `ZodRecord` handling in `zodToFieldConfigs()` - record types like `zod.record(zod.string(), zod.any())` are now recognized as objects with JSON input format.
|
|
27
|
+
|
|
28
|
+
---
|
|
29
|
+
|
|
30
|
+
## [0.7.8] - 2026-01-26
|
|
31
|
+
|
|
32
|
+
### Added
|
|
33
|
+
|
|
34
|
+
#### Field Equivalences Export for Cross-Provider Mapping
|
|
35
|
+
|
|
36
|
+
New `voice-router-dev/field-equivalences` export provides programmatic access to semantic field mappings across providers. Use this to build your own translation logic instead of relying on lossy auto-translation.
|
|
37
|
+
|
|
38
|
+
```typescript
|
|
39
|
+
import {
|
|
40
|
+
FIELD_EQUIVALENCES,
|
|
41
|
+
getEquivalentField,
|
|
42
|
+
getCategoryFields,
|
|
43
|
+
supportsCategory
|
|
44
|
+
} from 'voice-router-dev/field-equivalences'
|
|
45
|
+
|
|
46
|
+
// Get the diarization field for Deepgram
|
|
47
|
+
getEquivalentField('diarization', 'deepgram', 'transcription') // 'diarize'
|
|
48
|
+
getEquivalentField('diarization', 'assemblyai', 'transcription') // 'speaker_labels'
|
|
49
|
+
|
|
50
|
+
// Check if provider supports a feature
|
|
51
|
+
supportsCategory('sentiment', 'openai', 'transcription') // false
|
|
52
|
+
supportsCategory('sentiment', 'deepgram', 'transcription') // true
|
|
53
|
+
|
|
54
|
+
// Get all fields for a category
|
|
55
|
+
getCategoryFields('diarization', 'transcription')
|
|
56
|
+
// { deepgram: ['diarize'], gladia: ['diarization', ...], ... }
|
|
57
|
+
|
|
58
|
+
// Access full metadata with notes and non-equivalences
|
|
59
|
+
FIELD_EQUIVALENCES.diarization.notes
|
|
60
|
+
FIELD_EQUIVALENCES.diarization.nonEquivalences
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
**Categories covered:** diarization, punctuation, language, model, translation, sentiment, entities, profanity, redaction, timestamps, callback
|
|
64
|
+
|
|
65
|
+
**Also generates:** `docs/FIELD_EQUIVALENCES.md` - Human-readable documentation
|
|
66
|
+
|
|
67
|
+
Regenerate with: `pnpm docs:field-equivalences`
|
|
68
|
+
|
|
69
|
+
### Fixed
|
|
70
|
+
|
|
71
|
+
#### Gladia Streaming: Added Missing `words_accurate_timestamps` Field
|
|
72
|
+
|
|
73
|
+
The Gladia OpenAPI spec was missing the `words_accurate_timestamps` field in `RealtimeProcessingConfig`. This field exists in Gladia's V2 Live API (documented in their [V1→V2 migration guide](https://docs.gladia.io/chapters/live-stt/migration-from-v1)) but was not present in their published OpenAPI spec.
|
|
74
|
+
|
|
75
|
+
```typescript
|
|
76
|
+
// Now available in streaming config
|
|
77
|
+
await gladia.transcribeStream({
|
|
78
|
+
realtime_processing: {
|
|
79
|
+
words_accurate_timestamps: true // ✅ Now typed correctly
|
|
80
|
+
}
|
|
81
|
+
})
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
**Note:** `emotion_analysis` and `structured_data_extraction` do NOT exist in Gladia's streaming API - only in batch transcription.
|
|
85
|
+
|
|
86
|
+
---
|
|
87
|
+
|
|
8
88
|
## [0.7.7] - 2026-01-25
|
|
9
89
|
|
|
10
90
|
### Changed
|
package/dist/constants.d.mts
CHANGED
|
@@ -2793,7 +2793,7 @@ declare const OpenAIModel: {
|
|
|
2793
2793
|
readonly "whisper-1": "whisper-1";
|
|
2794
2794
|
};
|
|
2795
2795
|
declare const OpenAIModelCodes: readonly ["gpt-4o-mini-realtime-preview", "gpt-4o-mini-realtime-preview-2024-12-17", "gpt-4o-mini-transcribe", "gpt-4o-mini-transcribe-2025-12-15", "gpt-4o-realtime-preview", "gpt-4o-realtime-preview-2024-10-01", "gpt-4o-realtime-preview-2024-12-17", "gpt-4o-realtime-preview-2025-06-03", "gpt-4o-transcribe", "gpt-4o-transcribe-diarize", "gpt-audio-mini", "gpt-audio-mini-2025-10-06", "gpt-audio-mini-2025-12-15", "gpt-realtime", "gpt-realtime-2025-08-28", "gpt-realtime-mini", "gpt-realtime-mini-2025-10-06", "gpt-realtime-mini-2025-12-15", "whisper-1"];
|
|
2796
|
-
declare const OpenAIModelLabels: Record<"
|
|
2796
|
+
declare const OpenAIModelLabels: Record<"whisper-1" | "gpt-4o-transcribe" | "gpt-4o-mini-transcribe" | "gpt-4o-mini-transcribe-2025-12-15" | "gpt-4o-transcribe-diarize" | "gpt-4o-mini-realtime-preview" | "gpt-4o-mini-realtime-preview-2024-12-17" | "gpt-4o-realtime-preview" | "gpt-4o-realtime-preview-2024-10-01" | "gpt-4o-realtime-preview-2024-12-17" | "gpt-4o-realtime-preview-2025-06-03" | "gpt-audio-mini" | "gpt-audio-mini-2025-10-06" | "gpt-audio-mini-2025-12-15" | "gpt-realtime" | "gpt-realtime-2025-08-28" | "gpt-realtime-mini" | "gpt-realtime-mini-2025-10-06" | "gpt-realtime-mini-2025-12-15", string>;
|
|
2797
2797
|
/**
|
|
2798
2798
|
* OpenAI Realtime API models (streaming)
|
|
2799
2799
|
* @see scripts/generate-openai-models.js
|
package/dist/constants.d.ts
CHANGED
|
@@ -2793,7 +2793,7 @@ declare const OpenAIModel: {
|
|
|
2793
2793
|
readonly "whisper-1": "whisper-1";
|
|
2794
2794
|
};
|
|
2795
2795
|
declare const OpenAIModelCodes: readonly ["gpt-4o-mini-realtime-preview", "gpt-4o-mini-realtime-preview-2024-12-17", "gpt-4o-mini-transcribe", "gpt-4o-mini-transcribe-2025-12-15", "gpt-4o-realtime-preview", "gpt-4o-realtime-preview-2024-10-01", "gpt-4o-realtime-preview-2024-12-17", "gpt-4o-realtime-preview-2025-06-03", "gpt-4o-transcribe", "gpt-4o-transcribe-diarize", "gpt-audio-mini", "gpt-audio-mini-2025-10-06", "gpt-audio-mini-2025-12-15", "gpt-realtime", "gpt-realtime-2025-08-28", "gpt-realtime-mini", "gpt-realtime-mini-2025-10-06", "gpt-realtime-mini-2025-12-15", "whisper-1"];
|
|
2796
|
-
declare const OpenAIModelLabels: Record<"
|
|
2796
|
+
declare const OpenAIModelLabels: Record<"whisper-1" | "gpt-4o-transcribe" | "gpt-4o-mini-transcribe" | "gpt-4o-mini-transcribe-2025-12-15" | "gpt-4o-transcribe-diarize" | "gpt-4o-mini-realtime-preview" | "gpt-4o-mini-realtime-preview-2024-12-17" | "gpt-4o-realtime-preview" | "gpt-4o-realtime-preview-2024-10-01" | "gpt-4o-realtime-preview-2024-12-17" | "gpt-4o-realtime-preview-2025-06-03" | "gpt-audio-mini" | "gpt-audio-mini-2025-10-06" | "gpt-audio-mini-2025-12-15" | "gpt-realtime" | "gpt-realtime-2025-08-28" | "gpt-realtime-mini" | "gpt-realtime-mini-2025-10-06" | "gpt-realtime-mini-2025-12-15", string>;
|
|
2797
2797
|
/**
|
|
2798
2798
|
* OpenAI Realtime API models (streaming)
|
|
2799
2799
|
* @see scripts/generate-openai-models.js
|