@wave-av/sdk 2.0.1 → 2.0.2
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 +1 -1
- package/README.md +27 -23
- package/dist/audience.js +93 -0
- package/dist/audience.mjs +9 -0
- package/dist/camera-control.js +95 -0
- package/dist/camera-control.mjs +71 -0
- package/dist/captions-types.js +18 -0
- package/dist/captions-types.mjs +0 -0
- package/dist/captions.js +266 -0
- package/dist/captions.mjs +9 -0
- package/dist/chapters-types.js +18 -0
- package/dist/chapters-types.mjs +0 -0
- package/dist/chapters.js +280 -0
- package/dist/chapters.mjs +9 -0
- package/dist/chunk-362MRITF.mjs +46 -0
- package/dist/chunk-3ZLK4J3V.mjs +69 -0
- package/dist/chunk-4DG4OBRD.mjs +52 -0
- package/dist/chunk-4G7FMCMJ.mjs +68 -0
- package/dist/chunk-4KD5F6E3.mjs +0 -0
- package/dist/chunk-7M6XVUUK.mjs +241 -0
- package/dist/chunk-A344OOT7.mjs +243 -0
- package/dist/chunk-AI64YR5W.mjs +173 -0
- package/dist/chunk-C2GQ756E.mjs +57 -0
- package/dist/chunk-CO2VB72Z.mjs +255 -0
- package/dist/chunk-DWXWAILB.mjs +44 -0
- package/dist/chunk-FLEFYLDM.mjs +71 -0
- package/dist/chunk-H2YYTNUH.mjs +266 -0
- package/dist/chunk-IGDBED5P.mjs +246 -0
- package/dist/chunk-IL2SGWBC.mjs +0 -0
- package/dist/chunk-IVFZ5X4W.mjs +68 -0
- package/dist/chunk-JC32PG3T.mjs +114 -0
- package/dist/chunk-K5X42NLD.mjs +54 -0
- package/dist/chunk-KCEPNS2U.mjs +276 -0
- package/dist/chunk-LVOVF6XC.mjs +54 -0
- package/dist/chunk-M4Z33V3N.mjs +247 -0
- package/dist/chunk-M6FKIX75.mjs +0 -0
- package/dist/chunk-M744Z327.mjs +244 -0
- package/dist/chunk-MRFDPPFK.mjs +61 -0
- package/dist/chunk-MXU3Q23F.mjs +68 -0
- package/dist/chunk-NCVUZ746.mjs +60 -0
- package/dist/chunk-NLQVD2LF.mjs +210 -0
- package/dist/chunk-O6DOGYP5.mjs +238 -0
- package/dist/chunk-S25NY5GE.mjs +124 -0
- package/dist/chunk-TFHXBICQ.mjs +305 -0
- package/dist/chunk-TXWOA2VR.mjs +57 -0
- package/dist/chunk-UCDSNV22.mjs +63 -0
- package/dist/chunk-V5DWA5P4.mjs +279 -0
- package/dist/chunk-VLQQDYGP.mjs +173 -0
- package/dist/chunk-VPKZUXZW.mjs +53 -0
- package/dist/chunk-WS3PEFYJ.mjs +60 -0
- package/dist/chunk-XGAYMWRH.mjs +74 -0
- package/dist/chunk-XMM5J57W.mjs +0 -0
- package/dist/chunk-XWABBOSX.mjs +278 -0
- package/dist/chunk-Y6FXYEAI.mjs +10 -0
- package/dist/chunk-YBLXHI3M.mjs +257 -0
- package/dist/chunk-YEK26SSO.mjs +100 -0
- package/dist/chunk-YLCQKCZL.mjs +0 -0
- package/dist/chunk-YRKO4XI7.mjs +0 -0
- package/dist/chunk-ZJO7AP4Q.mjs +0 -0
- package/dist/client-types.js +18 -0
- package/dist/client-types.mjs +0 -0
- package/dist/client.js +311 -0
- package/dist/client.mjs +14 -0
- package/dist/clips-types.js +18 -0
- package/dist/clips-types.mjs +0 -0
- package/dist/clips.js +198 -0
- package/dist/clips.mjs +9 -0
- package/dist/cloud-switcher.js +80 -0
- package/dist/cloud-switcher.mjs +56 -0
- package/dist/collab-types.js +18 -0
- package/dist/collab-types.mjs +1 -0
- package/dist/collab.js +304 -0
- package/dist/collab.mjs +10 -0
- package/dist/connect.js +85 -0
- package/dist/connect.mjs +9 -0
- package/dist/creator.js +79 -0
- package/dist/creator.mjs +9 -0
- package/dist/desktop.js +77 -0
- package/dist/desktop.mjs +9 -0
- package/dist/distribution.js +88 -0
- package/dist/distribution.mjs +9 -0
- package/dist/drm.js +85 -0
- package/dist/drm.mjs +9 -0
- package/dist/edge.js +93 -0
- package/dist/edge.mjs +9 -0
- package/dist/editor-types.js +18 -0
- package/dist/editor-types.mjs +1 -0
- package/dist/editor.js +330 -0
- package/dist/editor.mjs +10 -0
- package/dist/fleet.js +149 -0
- package/dist/fleet.mjs +9 -0
- package/dist/ghost.js +139 -0
- package/dist/ghost.mjs +9 -0
- package/dist/index.js +0 -250
- package/dist/index.mjs +161 -5445
- package/dist/marketplace.js +82 -0
- package/dist/marketplace.mjs +9 -0
- package/dist/mesh.js +198 -0
- package/dist/mesh.mjs +9 -0
- package/dist/notifications.js +79 -0
- package/dist/notifications.mjs +9 -0
- package/dist/phone-types.js +18 -0
- package/dist/phone-types.mjs +0 -0
- package/dist/phone.js +269 -0
- package/dist/phone.mjs +9 -0
- package/dist/pipeline-types.js +18 -0
- package/dist/pipeline-types.mjs +0 -0
- package/dist/pipeline.js +263 -0
- package/dist/pipeline.mjs +9 -0
- package/dist/podcast.js +94 -0
- package/dist/podcast.mjs +9 -0
- package/dist/prism.js +82 -0
- package/dist/prism.mjs +9 -0
- package/dist/prompter.js +99 -0
- package/dist/prompter.mjs +76 -0
- package/dist/pulse.js +99 -0
- package/dist/pulse.mjs +9 -0
- package/dist/qr.js +71 -0
- package/dist/qr.mjs +9 -0
- package/dist/replay.js +62 -0
- package/dist/replay.mjs +38 -0
- package/dist/scene-types.js +18 -0
- package/dist/scene-types.mjs +1 -0
- package/dist/scene.js +271 -0
- package/dist/scene.mjs +10 -0
- package/dist/search-types.js +18 -0
- package/dist/search-types.mjs +1 -0
- package/dist/search.js +268 -0
- package/dist/search.mjs +10 -0
- package/dist/sentiment-types.js +18 -0
- package/dist/sentiment-types.mjs +0 -0
- package/dist/sentiment.js +235 -0
- package/dist/sentiment.mjs +9 -0
- package/dist/signage.js +93 -0
- package/dist/signage.mjs +9 -0
- package/dist/slides.js +78 -0
- package/dist/slides.mjs +9 -0
- package/dist/studio-ai-types.js +18 -0
- package/dist/studio-ai-types.mjs +1 -0
- package/dist/studio-ai.js +301 -0
- package/dist/studio-ai.mjs +10 -0
- package/dist/studio-types.js +18 -0
- package/dist/studio-types.mjs +1 -0
- package/dist/studio.js +303 -0
- package/dist/studio.mjs +10 -0
- package/dist/telemetry.js +124 -0
- package/dist/telemetry.mjs +15 -0
- package/dist/transcribe-types.js +18 -0
- package/dist/transcribe-types.mjs +1 -0
- package/dist/transcribe.js +282 -0
- package/dist/transcribe.mjs +10 -0
- package/dist/usb.js +69 -0
- package/dist/usb.mjs +9 -0
- package/dist/vault.js +96 -0
- package/dist/vault.mjs +9 -0
- package/dist/voice-types.js +18 -0
- package/dist/voice-types.mjs +0 -0
- package/dist/voice.js +272 -0
- package/dist/voice.mjs +9 -0
- package/dist/zoom.js +86 -0
- package/dist/zoom.mjs +9 -0
- package/package.json +3 -3
- package/dist/audience.d.ts +0 -104
- package/dist/audience.d.ts.map +0 -1
- package/dist/camera-control.d.ts +0 -54
- package/dist/camera-control.d.ts.map +0 -1
- package/dist/captions.d.ts +0 -362
- package/dist/captions.d.ts.map +0 -1
- package/dist/chapters.d.ts +0 -315
- package/dist/chapters.d.ts.map +0 -1
- package/dist/client.d.ts +0 -191
- package/dist/client.d.ts.map +0 -1
- package/dist/clips.d.ts +0 -258
- package/dist/clips.d.ts.map +0 -1
- package/dist/cloud-switcher.d.ts +0 -65
- package/dist/cloud-switcher.d.ts.map +0 -1
- package/dist/collab-types.d.ts +0 -204
- package/dist/collab-types.d.ts.map +0 -1
- package/dist/collab.d.ts +0 -226
- package/dist/collab.d.ts.map +0 -1
- package/dist/connect.d.ts +0 -88
- package/dist/connect.d.ts.map +0 -1
- package/dist/creator.d.ts +0 -109
- package/dist/creator.d.ts.map +0 -1
- package/dist/desktop.d.ts +0 -95
- package/dist/desktop.d.ts.map +0 -1
- package/dist/distribution.d.ts +0 -92
- package/dist/distribution.d.ts.map +0 -1
- package/dist/drm.d.ts +0 -87
- package/dist/drm.d.ts.map +0 -1
- package/dist/edge.d.ts +0 -112
- package/dist/edge.d.ts.map +0 -1
- package/dist/editor-types.d.ts +0 -236
- package/dist/editor-types.d.ts.map +0 -1
- package/dist/editor.d.ts +0 -206
- package/dist/editor.d.ts.map +0 -1
- package/dist/fleet.d.ts +0 -207
- package/dist/fleet.d.ts.map +0 -1
- package/dist/ghost.d.ts +0 -213
- package/dist/ghost.d.ts.map +0 -1
- package/dist/index.d.ts +0 -144
- package/dist/index.d.ts.map +0 -1
- package/dist/marketplace.d.ts +0 -90
- package/dist/marketplace.d.ts.map +0 -1
- package/dist/mesh.d.ts +0 -237
- package/dist/mesh.d.ts.map +0 -1
- package/dist/notifications.d.ts +0 -82
- package/dist/notifications.d.ts.map +0 -1
- package/dist/phone.d.ts +0 -369
- package/dist/phone.d.ts.map +0 -1
- package/dist/pipeline.d.ts +0 -409
- package/dist/pipeline.d.ts.map +0 -1
- package/dist/podcast.d.ts +0 -113
- package/dist/podcast.d.ts.map +0 -1
- package/dist/prism.d.ts +0 -132
- package/dist/prism.d.ts.map +0 -1
- package/dist/prompter.d.ts +0 -184
- package/dist/prompter.d.ts.map +0 -1
- package/dist/pulse.d.ts +0 -156
- package/dist/pulse.d.ts.map +0 -1
- package/dist/qr.d.ts +0 -82
- package/dist/qr.d.ts.map +0 -1
- package/dist/replay.d.ts +0 -52
- package/dist/replay.d.ts.map +0 -1
- package/dist/scene-types.d.ts +0 -190
- package/dist/scene-types.d.ts.map +0 -1
- package/dist/scene.d.ts +0 -213
- package/dist/scene.d.ts.map +0 -1
- package/dist/search-types.d.ts +0 -210
- package/dist/search-types.d.ts.map +0 -1
- package/dist/search.d.ts +0 -250
- package/dist/search.d.ts.map +0 -1
- package/dist/sentiment.d.ts +0 -378
- package/dist/sentiment.d.ts.map +0 -1
- package/dist/signage.d.ts +0 -101
- package/dist/signage.d.ts.map +0 -1
- package/dist/slides.d.ts +0 -68
- package/dist/slides.d.ts.map +0 -1
- package/dist/studio-ai-types.d.ts +0 -198
- package/dist/studio-ai-types.d.ts.map +0 -1
- package/dist/studio-ai.d.ts +0 -218
- package/dist/studio-ai.d.ts.map +0 -1
- package/dist/studio-types.d.ts +0 -267
- package/dist/studio-types.d.ts.map +0 -1
- package/dist/studio.d.ts +0 -234
- package/dist/studio.d.ts.map +0 -1
- package/dist/telemetry.d.ts +0 -76
- package/dist/telemetry.d.ts.map +0 -1
- package/dist/transcribe-types.d.ts +0 -153
- package/dist/transcribe-types.d.ts.map +0 -1
- package/dist/transcribe.d.ts +0 -218
- package/dist/transcribe.d.ts.map +0 -1
- package/dist/usb.d.ts +0 -64
- package/dist/usb.d.ts.map +0 -1
- package/dist/vault.d.ts +0 -121
- package/dist/vault.d.ts.map +0 -1
- package/dist/voice.d.ts +0 -307
- package/dist/voice.d.ts.map +0 -1
- package/dist/zoom.d.ts +0 -91
- package/dist/zoom.d.ts.map +0 -1
|
@@ -0,0 +1,282 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// src/transcribe.ts
|
|
21
|
+
var transcribe_exports = {};
|
|
22
|
+
__export(transcribe_exports, {
|
|
23
|
+
TranscribeAPI: () => TranscribeAPI,
|
|
24
|
+
createTranscribeAPI: () => createTranscribeAPI
|
|
25
|
+
});
|
|
26
|
+
module.exports = __toCommonJS(transcribe_exports);
|
|
27
|
+
var TranscribeAPI = class {
|
|
28
|
+
client;
|
|
29
|
+
basePath = "/v1/transcribe";
|
|
30
|
+
constructor(client) {
|
|
31
|
+
this.client = client;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Create a transcription job
|
|
35
|
+
*
|
|
36
|
+
* Requires: transcribe:create permission
|
|
37
|
+
*/
|
|
38
|
+
async create(request) {
|
|
39
|
+
return this.client.post(this.basePath, request);
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Get a transcription by ID
|
|
43
|
+
*
|
|
44
|
+
* Requires: transcribe:read permission
|
|
45
|
+
*/
|
|
46
|
+
async get(transcriptionId) {
|
|
47
|
+
return this.client.get(`${this.basePath}/${transcriptionId}`);
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Update a transcription
|
|
51
|
+
*
|
|
52
|
+
* Requires: transcribe:update permission
|
|
53
|
+
*/
|
|
54
|
+
async update(transcriptionId, request) {
|
|
55
|
+
return this.client.patch(
|
|
56
|
+
`${this.basePath}/${transcriptionId}`,
|
|
57
|
+
request
|
|
58
|
+
);
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Remove a transcription
|
|
62
|
+
*
|
|
63
|
+
* Requires: transcribe:remove permission (server-side RBAC enforced)
|
|
64
|
+
*/
|
|
65
|
+
async remove(transcriptionId) {
|
|
66
|
+
await this.client.delete(
|
|
67
|
+
`${this.basePath}/${transcriptionId}`,
|
|
68
|
+
{ method: "DELETE" }
|
|
69
|
+
);
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* List transcriptions
|
|
73
|
+
*
|
|
74
|
+
* Requires: transcribe:read permission
|
|
75
|
+
*/
|
|
76
|
+
async list(params) {
|
|
77
|
+
return this.client.get(this.basePath, {
|
|
78
|
+
params
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* Get transcription segments
|
|
83
|
+
*
|
|
84
|
+
* Requires: transcribe:read permission
|
|
85
|
+
*/
|
|
86
|
+
async getSegments(transcriptionId, params) {
|
|
87
|
+
return this.client.get(
|
|
88
|
+
`${this.basePath}/${transcriptionId}/segments`,
|
|
89
|
+
{ params }
|
|
90
|
+
);
|
|
91
|
+
}
|
|
92
|
+
/**
|
|
93
|
+
* Update a segment
|
|
94
|
+
*
|
|
95
|
+
* Requires: transcribe:update permission
|
|
96
|
+
*/
|
|
97
|
+
async updateSegment(transcriptionId, segmentId, updates) {
|
|
98
|
+
return this.client.patch(
|
|
99
|
+
`${this.basePath}/${transcriptionId}/segments/${segmentId}`,
|
|
100
|
+
updates
|
|
101
|
+
);
|
|
102
|
+
}
|
|
103
|
+
/**
|
|
104
|
+
* Merge segments
|
|
105
|
+
*
|
|
106
|
+
* Requires: transcribe:update permission
|
|
107
|
+
*/
|
|
108
|
+
async mergeSegments(transcriptionId, segmentIds) {
|
|
109
|
+
return this.client.post(
|
|
110
|
+
`${this.basePath}/${transcriptionId}/segments/merge`,
|
|
111
|
+
{ segment_ids: segmentIds }
|
|
112
|
+
);
|
|
113
|
+
}
|
|
114
|
+
/**
|
|
115
|
+
* Split a segment
|
|
116
|
+
*
|
|
117
|
+
* Requires: transcribe:update permission
|
|
118
|
+
*/
|
|
119
|
+
async splitSegment(transcriptionId, segmentId, splitTime) {
|
|
120
|
+
return this.client.post(
|
|
121
|
+
`${this.basePath}/${transcriptionId}/segments/${segmentId}/split`,
|
|
122
|
+
{ split_time: splitTime }
|
|
123
|
+
);
|
|
124
|
+
}
|
|
125
|
+
/**
|
|
126
|
+
* Get speakers
|
|
127
|
+
*
|
|
128
|
+
* Requires: transcribe:read permission
|
|
129
|
+
*/
|
|
130
|
+
async getSpeakers(transcriptionId) {
|
|
131
|
+
return this.client.get(
|
|
132
|
+
`${this.basePath}/${transcriptionId}/speakers`
|
|
133
|
+
);
|
|
134
|
+
}
|
|
135
|
+
/**
|
|
136
|
+
* Update speaker label
|
|
137
|
+
*
|
|
138
|
+
* Requires: transcribe:update permission
|
|
139
|
+
*/
|
|
140
|
+
async updateSpeaker(transcriptionId, speakerId, label) {
|
|
141
|
+
return this.client.patch(
|
|
142
|
+
`${this.basePath}/${transcriptionId}/speakers/${speakerId}`,
|
|
143
|
+
{ label }
|
|
144
|
+
);
|
|
145
|
+
}
|
|
146
|
+
/**
|
|
147
|
+
* Merge speakers
|
|
148
|
+
*
|
|
149
|
+
* Requires: transcribe:update permission
|
|
150
|
+
*/
|
|
151
|
+
async mergeSpeakers(transcriptionId, speakerIds, newLabel) {
|
|
152
|
+
return this.client.post(
|
|
153
|
+
`${this.basePath}/${transcriptionId}/speakers/merge`,
|
|
154
|
+
{ speaker_ids: speakerIds, label: newLabel }
|
|
155
|
+
);
|
|
156
|
+
}
|
|
157
|
+
/**
|
|
158
|
+
* Export transcription
|
|
159
|
+
*
|
|
160
|
+
* Requires: transcribe:read permission
|
|
161
|
+
*/
|
|
162
|
+
async exportTranscription(transcriptionId, format, options) {
|
|
163
|
+
return this.client.post(`${this.basePath}/${transcriptionId}/export`, {
|
|
164
|
+
format,
|
|
165
|
+
...options
|
|
166
|
+
});
|
|
167
|
+
}
|
|
168
|
+
/**
|
|
169
|
+
* Get plain text transcript
|
|
170
|
+
*
|
|
171
|
+
* Requires: transcribe:read permission
|
|
172
|
+
*/
|
|
173
|
+
async getText(transcriptionId, options) {
|
|
174
|
+
const result = await this.client.get(
|
|
175
|
+
`${this.basePath}/${transcriptionId}/text`,
|
|
176
|
+
{ params: options }
|
|
177
|
+
);
|
|
178
|
+
return result.text;
|
|
179
|
+
}
|
|
180
|
+
/**
|
|
181
|
+
* Search within a transcription
|
|
182
|
+
*
|
|
183
|
+
* Requires: transcribe:read permission
|
|
184
|
+
*/
|
|
185
|
+
async search(transcriptionId, query, options) {
|
|
186
|
+
return this.client.post(`${this.basePath}/${transcriptionId}/search`, {
|
|
187
|
+
query,
|
|
188
|
+
...options
|
|
189
|
+
});
|
|
190
|
+
}
|
|
191
|
+
/**
|
|
192
|
+
* Start real-time transcription
|
|
193
|
+
*
|
|
194
|
+
* Requires: transcribe:realtime permission
|
|
195
|
+
*/
|
|
196
|
+
async startRealtime(streamId, options) {
|
|
197
|
+
return this.client.post(`${this.basePath}/realtime/start`, {
|
|
198
|
+
stream_id: streamId,
|
|
199
|
+
...options
|
|
200
|
+
});
|
|
201
|
+
}
|
|
202
|
+
/**
|
|
203
|
+
* Stop real-time transcription
|
|
204
|
+
*
|
|
205
|
+
* Requires: transcribe:realtime permission
|
|
206
|
+
*/
|
|
207
|
+
async stopRealtime(sessionId) {
|
|
208
|
+
return this.client.post(
|
|
209
|
+
`${this.basePath}/realtime/${sessionId}/stop`
|
|
210
|
+
);
|
|
211
|
+
}
|
|
212
|
+
/**
|
|
213
|
+
* Get real-time session status
|
|
214
|
+
*
|
|
215
|
+
* Requires: transcribe:read permission
|
|
216
|
+
*/
|
|
217
|
+
async getRealtimeStatus(sessionId) {
|
|
218
|
+
return this.client.get(`${this.basePath}/realtime/${sessionId}`);
|
|
219
|
+
}
|
|
220
|
+
/**
|
|
221
|
+
* Wait for transcription to complete
|
|
222
|
+
*/
|
|
223
|
+
async waitForReady(transcriptionId, options) {
|
|
224
|
+
const pollInterval = options?.pollInterval || 2e3;
|
|
225
|
+
const timeout = options?.timeout || 18e5;
|
|
226
|
+
const startTime = Date.now();
|
|
227
|
+
while (Date.now() - startTime < timeout) {
|
|
228
|
+
const transcription = await this.get(transcriptionId);
|
|
229
|
+
if (options?.onProgress) {
|
|
230
|
+
options.onProgress(transcription);
|
|
231
|
+
}
|
|
232
|
+
if (transcription.status === "ready") {
|
|
233
|
+
return transcription;
|
|
234
|
+
}
|
|
235
|
+
if (transcription.status === "failed") {
|
|
236
|
+
throw new Error(
|
|
237
|
+
`Transcription failed: ${transcription.error || "Unknown error"}`
|
|
238
|
+
);
|
|
239
|
+
}
|
|
240
|
+
await new Promise((resolve) => setTimeout(resolve, pollInterval));
|
|
241
|
+
}
|
|
242
|
+
throw new Error(`Transcription timed out after ${timeout}ms`);
|
|
243
|
+
}
|
|
244
|
+
/**
|
|
245
|
+
* Detect language from audio
|
|
246
|
+
*
|
|
247
|
+
* Requires: transcribe:read permission
|
|
248
|
+
*/
|
|
249
|
+
async detectLanguage(sourceUrl) {
|
|
250
|
+
return this.client.post(`${this.basePath}/detect-language`, {
|
|
251
|
+
source_url: sourceUrl
|
|
252
|
+
});
|
|
253
|
+
}
|
|
254
|
+
/**
|
|
255
|
+
* Get supported languages
|
|
256
|
+
*
|
|
257
|
+
* Requires: transcribe:read permission
|
|
258
|
+
*/
|
|
259
|
+
async getSupportedLanguages() {
|
|
260
|
+
return this.client.get(`${this.basePath}/languages`);
|
|
261
|
+
}
|
|
262
|
+
/**
|
|
263
|
+
* Estimate transcription cost
|
|
264
|
+
*
|
|
265
|
+
* Requires: transcribe:read permission
|
|
266
|
+
*/
|
|
267
|
+
async estimateCost(durationSeconds, model = "standard", options) {
|
|
268
|
+
return this.client.post(`${this.basePath}/estimate`, {
|
|
269
|
+
duration_seconds: durationSeconds,
|
|
270
|
+
model,
|
|
271
|
+
...options
|
|
272
|
+
});
|
|
273
|
+
}
|
|
274
|
+
};
|
|
275
|
+
function createTranscribeAPI(client) {
|
|
276
|
+
return new TranscribeAPI(client);
|
|
277
|
+
}
|
|
278
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
279
|
+
0 && (module.exports = {
|
|
280
|
+
TranscribeAPI,
|
|
281
|
+
createTranscribeAPI
|
|
282
|
+
});
|
package/dist/usb.js
ADDED
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// src/usb.ts
|
|
21
|
+
var usb_exports = {};
|
|
22
|
+
__export(usb_exports, {
|
|
23
|
+
UsbAPI: () => UsbAPI,
|
|
24
|
+
createUsbAPI: () => createUsbAPI
|
|
25
|
+
});
|
|
26
|
+
module.exports = __toCommonJS(usb_exports);
|
|
27
|
+
var UsbAPI = class {
|
|
28
|
+
client;
|
|
29
|
+
basePath = "/v1/usb";
|
|
30
|
+
constructor(client) {
|
|
31
|
+
this.client = client;
|
|
32
|
+
}
|
|
33
|
+
async list(params) {
|
|
34
|
+
return this.client.get(`${this.basePath}/devices`, {
|
|
35
|
+
params
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
async get(deviceId) {
|
|
39
|
+
return this.client.get(`${this.basePath}/devices/${deviceId}`);
|
|
40
|
+
}
|
|
41
|
+
async claim(deviceId, request) {
|
|
42
|
+
return this.client.post(`${this.basePath}/devices/${deviceId}/claim`, request);
|
|
43
|
+
}
|
|
44
|
+
async release(deviceId) {
|
|
45
|
+
return this.client.post(`${this.basePath}/devices/${deviceId}/release`);
|
|
46
|
+
}
|
|
47
|
+
async getCapabilities(deviceId) {
|
|
48
|
+
return this.client.get(
|
|
49
|
+
`${this.basePath}/devices/${deviceId}/capabilities`
|
|
50
|
+
);
|
|
51
|
+
}
|
|
52
|
+
async listByNode(nodeId, params) {
|
|
53
|
+
return this.client.get(
|
|
54
|
+
`${this.basePath}/nodes/${nodeId}/devices`,
|
|
55
|
+
{ params }
|
|
56
|
+
);
|
|
57
|
+
}
|
|
58
|
+
async configure(deviceId, config) {
|
|
59
|
+
return this.client.patch(`${this.basePath}/devices/${deviceId}/config`, config);
|
|
60
|
+
}
|
|
61
|
+
};
|
|
62
|
+
function createUsbAPI(client) {
|
|
63
|
+
return new UsbAPI(client);
|
|
64
|
+
}
|
|
65
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
66
|
+
0 && (module.exports = {
|
|
67
|
+
UsbAPI,
|
|
68
|
+
createUsbAPI
|
|
69
|
+
});
|
package/dist/usb.mjs
ADDED
package/dist/vault.js
ADDED
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// src/vault.ts
|
|
21
|
+
var vault_exports = {};
|
|
22
|
+
__export(vault_exports, {
|
|
23
|
+
VaultAPI: () => VaultAPI,
|
|
24
|
+
createVaultAPI: () => createVaultAPI
|
|
25
|
+
});
|
|
26
|
+
module.exports = __toCommonJS(vault_exports);
|
|
27
|
+
var VaultAPI = class {
|
|
28
|
+
client;
|
|
29
|
+
basePath = "/v1/vault";
|
|
30
|
+
constructor(client) {
|
|
31
|
+
this.client = client;
|
|
32
|
+
}
|
|
33
|
+
async list(params) {
|
|
34
|
+
return this.client.get(`${this.basePath}/recordings`, {
|
|
35
|
+
params
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
async get(recordingId) {
|
|
39
|
+
return this.client.get(`${this.basePath}/recordings/${recordingId}`);
|
|
40
|
+
}
|
|
41
|
+
async update(recordingId, updates) {
|
|
42
|
+
return this.client.patch(`${this.basePath}/recordings/${recordingId}`, updates);
|
|
43
|
+
}
|
|
44
|
+
async remove(recordingId) {
|
|
45
|
+
await this.client.delete(`${this.basePath}/recordings/${recordingId}`);
|
|
46
|
+
}
|
|
47
|
+
async getStorageUsage() {
|
|
48
|
+
return this.client.get(`${this.basePath}/storage`);
|
|
49
|
+
}
|
|
50
|
+
async createUpload(request) {
|
|
51
|
+
return this.client.post(`${this.basePath}/uploads`, request);
|
|
52
|
+
}
|
|
53
|
+
async completeUpload(uploadId) {
|
|
54
|
+
return this.client.post(`${this.basePath}/uploads/${uploadId}/complete`);
|
|
55
|
+
}
|
|
56
|
+
async startRecording(streamId, options) {
|
|
57
|
+
return this.client.post(`${this.basePath}/recordings`, {
|
|
58
|
+
stream_id: streamId,
|
|
59
|
+
...options
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
async stopRecording(streamId) {
|
|
63
|
+
return this.client.post(`${this.basePath}/recordings/stop`, { stream_id: streamId });
|
|
64
|
+
}
|
|
65
|
+
async transcode(recordingId, request) {
|
|
66
|
+
return this.client.post(
|
|
67
|
+
`${this.basePath}/recordings/${recordingId}/transcode`,
|
|
68
|
+
request
|
|
69
|
+
);
|
|
70
|
+
}
|
|
71
|
+
async getTranscodeJob(jobId) {
|
|
72
|
+
return this.client.get(`${this.basePath}/transcode/${jobId}`);
|
|
73
|
+
}
|
|
74
|
+
async createArchivePolicy(policy) {
|
|
75
|
+
return this.client.post(`${this.basePath}/policies`, policy);
|
|
76
|
+
}
|
|
77
|
+
async listArchivePolicies() {
|
|
78
|
+
return this.client.get(`${this.basePath}/policies`);
|
|
79
|
+
}
|
|
80
|
+
async removeArchivePolicy(policyId) {
|
|
81
|
+
await this.client.delete(`${this.basePath}/policies/${policyId}`);
|
|
82
|
+
}
|
|
83
|
+
async getDownloadUrl(recordingId) {
|
|
84
|
+
return this.client.get(
|
|
85
|
+
`${this.basePath}/recordings/${recordingId}/download`
|
|
86
|
+
);
|
|
87
|
+
}
|
|
88
|
+
};
|
|
89
|
+
function createVaultAPI(client) {
|
|
90
|
+
return new VaultAPI(client);
|
|
91
|
+
}
|
|
92
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
93
|
+
0 && (module.exports = {
|
|
94
|
+
VaultAPI,
|
|
95
|
+
createVaultAPI
|
|
96
|
+
});
|
package/dist/vault.mjs
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __copyProps = (to, from, except, desc) => {
|
|
7
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
8
|
+
for (let key of __getOwnPropNames(from))
|
|
9
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
10
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
11
|
+
}
|
|
12
|
+
return to;
|
|
13
|
+
};
|
|
14
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
15
|
+
|
|
16
|
+
// src/voice-types.ts
|
|
17
|
+
var voice_types_exports = {};
|
|
18
|
+
module.exports = __toCommonJS(voice_types_exports);
|
|
File without changes
|