assemblyai 4.0.0 → 4.0.1
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 +12 -1
- package/dist/types/asyncapi.generated.d.ts +4 -1
- package/dist/types/openapi.generated.d.ts +1988 -67
- package/package.json +1 -1
- package/src/types/asyncapi.generated.ts +4 -1
- package/src/types/openapi.generated.ts +1988 -67
|
@@ -9,6 +9,19 @@ type OneOf<T extends any[]> = T extends [infer Only] ? Only : T extends [infer A
|
|
|
9
9
|
* @enum {string}
|
|
10
10
|
*/
|
|
11
11
|
export type AudioIntelligenceModelStatus = "success" | "unavailable";
|
|
12
|
+
/**
|
|
13
|
+
* @example {
|
|
14
|
+
* "count": 1,
|
|
15
|
+
* "rank": 0.08,
|
|
16
|
+
* "text": "air quality alerts",
|
|
17
|
+
* "timestamps": [
|
|
18
|
+
* {
|
|
19
|
+
* "start": 3978,
|
|
20
|
+
* "end": 5114
|
|
21
|
+
* }
|
|
22
|
+
* ]
|
|
23
|
+
* }
|
|
24
|
+
*/
|
|
12
25
|
export type AutoHighlightResult = {
|
|
13
26
|
/** @description The total number of times the key phrase appears in the audio file */
|
|
14
27
|
count: number;
|
|
@@ -24,13 +37,225 @@ export type AutoHighlightResult = {
|
|
|
24
37
|
};
|
|
25
38
|
/**
|
|
26
39
|
* @description An array of results for the Key Phrases model, if it is enabled.
|
|
27
|
-
* See [Key phrases](https://www.assemblyai.com/docs/
|
|
40
|
+
* See [Key phrases](https://www.assemblyai.com/docs/models/key-phrases) for more information.
|
|
41
|
+
*
|
|
42
|
+
* @example {
|
|
43
|
+
* "status": "success",
|
|
44
|
+
* "results": [
|
|
45
|
+
* {
|
|
46
|
+
* "count": 1,
|
|
47
|
+
* "rank": 0.08,
|
|
48
|
+
* "text": "air quality alerts",
|
|
49
|
+
* "timestamps": [
|
|
50
|
+
* {
|
|
51
|
+
* "start": 3978,
|
|
52
|
+
* "end": 5114
|
|
53
|
+
* }
|
|
54
|
+
* ]
|
|
55
|
+
* },
|
|
56
|
+
* {
|
|
57
|
+
* "count": 1,
|
|
58
|
+
* "rank": 0.08,
|
|
59
|
+
* "text": "wide ranging air quality consequences",
|
|
60
|
+
* "timestamps": [
|
|
61
|
+
* {
|
|
62
|
+
* "start": 235388,
|
|
63
|
+
* "end": 238694
|
|
64
|
+
* }
|
|
65
|
+
* ]
|
|
66
|
+
* },
|
|
67
|
+
* {
|
|
68
|
+
* "count": 1,
|
|
69
|
+
* "rank": 0.07,
|
|
70
|
+
* "text": "more wildfires",
|
|
71
|
+
* "timestamps": [
|
|
72
|
+
* {
|
|
73
|
+
* "start": 230972,
|
|
74
|
+
* "end": 232354
|
|
75
|
+
* }
|
|
76
|
+
* ]
|
|
77
|
+
* },
|
|
78
|
+
* {
|
|
79
|
+
* "count": 1,
|
|
80
|
+
* "rank": 0.07,
|
|
81
|
+
* "text": "air pollution",
|
|
82
|
+
* "timestamps": [
|
|
83
|
+
* {
|
|
84
|
+
* "start": 156004,
|
|
85
|
+
* "end": 156910
|
|
86
|
+
* }
|
|
87
|
+
* ]
|
|
88
|
+
* },
|
|
89
|
+
* {
|
|
90
|
+
* "count": 3,
|
|
91
|
+
* "rank": 0.07,
|
|
92
|
+
* "text": "weather systems",
|
|
93
|
+
* "timestamps": [
|
|
94
|
+
* {
|
|
95
|
+
* "start": 47344,
|
|
96
|
+
* "end": 47958
|
|
97
|
+
* },
|
|
98
|
+
* {
|
|
99
|
+
* "start": 205268,
|
|
100
|
+
* "end": 205818
|
|
101
|
+
* },
|
|
102
|
+
* {
|
|
103
|
+
* "start": 211588,
|
|
104
|
+
* "end": 213434
|
|
105
|
+
* }
|
|
106
|
+
* ]
|
|
107
|
+
* },
|
|
108
|
+
* {
|
|
109
|
+
* "count": 2,
|
|
110
|
+
* "rank": 0.06,
|
|
111
|
+
* "text": "high levels",
|
|
112
|
+
* "timestamps": [
|
|
113
|
+
* {
|
|
114
|
+
* "start": 121128,
|
|
115
|
+
* "end": 121646
|
|
116
|
+
* },
|
|
117
|
+
* {
|
|
118
|
+
* "start": 155412,
|
|
119
|
+
* "end": 155866
|
|
120
|
+
* }
|
|
121
|
+
* ]
|
|
122
|
+
* },
|
|
123
|
+
* {
|
|
124
|
+
* "count": 1,
|
|
125
|
+
* "rank": 0.06,
|
|
126
|
+
* "text": "health conditions",
|
|
127
|
+
* "timestamps": [
|
|
128
|
+
* {
|
|
129
|
+
* "start": 152138,
|
|
130
|
+
* "end": 152666
|
|
131
|
+
* }
|
|
132
|
+
* ]
|
|
133
|
+
* },
|
|
134
|
+
* {
|
|
135
|
+
* "count": 2,
|
|
136
|
+
* "rank": 0.06,
|
|
137
|
+
* "text": "Peter de Carlo",
|
|
138
|
+
* "timestamps": [
|
|
139
|
+
* {
|
|
140
|
+
* "start": 18948,
|
|
141
|
+
* "end": 19930
|
|
142
|
+
* },
|
|
143
|
+
* {
|
|
144
|
+
* "start": 268298,
|
|
145
|
+
* "end": 269194
|
|
146
|
+
* }
|
|
147
|
+
* ]
|
|
148
|
+
* },
|
|
149
|
+
* {
|
|
150
|
+
* "count": 1,
|
|
151
|
+
* "rank": 0.06,
|
|
152
|
+
* "text": "New York City",
|
|
153
|
+
* "timestamps": [
|
|
154
|
+
* {
|
|
155
|
+
* "start": 125768,
|
|
156
|
+
* "end": 126274
|
|
157
|
+
* }
|
|
158
|
+
* ]
|
|
159
|
+
* },
|
|
160
|
+
* {
|
|
161
|
+
* "count": 1,
|
|
162
|
+
* "rank": 0.05,
|
|
163
|
+
* "text": "respiratory conditions",
|
|
164
|
+
* "timestamps": [
|
|
165
|
+
* {
|
|
166
|
+
* "start": 152964,
|
|
167
|
+
* "end": 153786
|
|
168
|
+
* }
|
|
169
|
+
* ]
|
|
170
|
+
* },
|
|
171
|
+
* {
|
|
172
|
+
* "count": 3,
|
|
173
|
+
* "rank": 0.05,
|
|
174
|
+
* "text": "New York",
|
|
175
|
+
* "timestamps": [
|
|
176
|
+
* {
|
|
177
|
+
* "start": 125768,
|
|
178
|
+
* "end": 126034
|
|
179
|
+
* },
|
|
180
|
+
* {
|
|
181
|
+
* "start": 171448,
|
|
182
|
+
* "end": 171938
|
|
183
|
+
* },
|
|
184
|
+
* {
|
|
185
|
+
* "start": 176008,
|
|
186
|
+
* "end": 176322
|
|
187
|
+
* }
|
|
188
|
+
* ]
|
|
189
|
+
* },
|
|
190
|
+
* {
|
|
191
|
+
* "count": 3,
|
|
192
|
+
* "rank": 0.05,
|
|
193
|
+
* "text": "climate change",
|
|
194
|
+
* "timestamps": [
|
|
195
|
+
* {
|
|
196
|
+
* "start": 229548,
|
|
197
|
+
* "end": 230230
|
|
198
|
+
* },
|
|
199
|
+
* {
|
|
200
|
+
* "start": 244576,
|
|
201
|
+
* "end": 245162
|
|
202
|
+
* },
|
|
203
|
+
* {
|
|
204
|
+
* "start": 263348,
|
|
205
|
+
* "end": 263950
|
|
206
|
+
* }
|
|
207
|
+
* ]
|
|
208
|
+
* },
|
|
209
|
+
* {
|
|
210
|
+
* "count": 1,
|
|
211
|
+
* "rank": 0.05,
|
|
212
|
+
* "text": "Johns Hopkins University Varsity",
|
|
213
|
+
* "timestamps": [
|
|
214
|
+
* {
|
|
215
|
+
* "start": 23972,
|
|
216
|
+
* "end": 25490
|
|
217
|
+
* }
|
|
218
|
+
* ]
|
|
219
|
+
* },
|
|
220
|
+
* {
|
|
221
|
+
* "count": 1,
|
|
222
|
+
* "rank": 0.05,
|
|
223
|
+
* "text": "heart conditions",
|
|
224
|
+
* "timestamps": [
|
|
225
|
+
* {
|
|
226
|
+
* "start": 153988,
|
|
227
|
+
* "end": 154506
|
|
228
|
+
* }
|
|
229
|
+
* ]
|
|
230
|
+
* },
|
|
231
|
+
* {
|
|
232
|
+
* "count": 1,
|
|
233
|
+
* "rank": 0.05,
|
|
234
|
+
* "text": "air quality warnings",
|
|
235
|
+
* "timestamps": [
|
|
236
|
+
* {
|
|
237
|
+
* "start": 12308,
|
|
238
|
+
* "end": 13434
|
|
239
|
+
* }
|
|
240
|
+
* ]
|
|
241
|
+
* }
|
|
242
|
+
* ]
|
|
243
|
+
* }
|
|
28
244
|
*/
|
|
29
245
|
export type AutoHighlightsResult = {
|
|
30
246
|
/** @description A temporally-sequential array of Key Phrases */
|
|
31
247
|
results: AutoHighlightResult[];
|
|
32
248
|
};
|
|
33
|
-
/**
|
|
249
|
+
/**
|
|
250
|
+
* @description Chapter of the audio file
|
|
251
|
+
* @example {
|
|
252
|
+
* "summary": "Smoke from hundreds of wildfires in Canada is triggering air quality alerts throughout the US. Skylines from Maine to Maryland to Minnesota are gray and smoggy. In some places, the air quality warnings include the warning to stay inside.",
|
|
253
|
+
* "gist": "Smoggy air quality alerts across US",
|
|
254
|
+
* "headline": "Smoke from hundreds of wildfires in Canada is triggering air quality alerts across US",
|
|
255
|
+
* "start": 250,
|
|
256
|
+
* "end": 28840
|
|
257
|
+
* }
|
|
258
|
+
*/
|
|
34
259
|
export type Chapter = {
|
|
35
260
|
/** @description The starting time, in milliseconds, for the chapter */
|
|
36
261
|
end: number;
|
|
@@ -43,6 +268,13 @@ export type Chapter = {
|
|
|
43
268
|
/** @description A one paragraph summary of the content spoken during the chapter */
|
|
44
269
|
summary: string;
|
|
45
270
|
};
|
|
271
|
+
/**
|
|
272
|
+
* @example {
|
|
273
|
+
* "label": "disasters",
|
|
274
|
+
* "confidence": 0.8142836093902588,
|
|
275
|
+
* "severity": 0.4093044400215149
|
|
276
|
+
* }
|
|
277
|
+
*/
|
|
46
278
|
export type ContentSafetyLabel = {
|
|
47
279
|
/**
|
|
48
280
|
* Format: double
|
|
@@ -57,6 +289,24 @@ export type ContentSafetyLabel = {
|
|
|
57
289
|
*/
|
|
58
290
|
severity: number;
|
|
59
291
|
};
|
|
292
|
+
/**
|
|
293
|
+
* @example {
|
|
294
|
+
* "text": "Smoke from hundreds of wildfires in Canada is triggering air quality alerts throughout the US. Skylines from Maine to Maryland to Minnesota are gray and smoggy. And in some places, the air quality warnings include the warning to stay inside. We wanted to better understand what's happening here and why, so we called Peter de Carlo, an associate professor in the Department of Environmental Health and Engineering at Johns Hopkins University Varsity. Good morning, professor. Good morning.",
|
|
295
|
+
* "labels": [
|
|
296
|
+
* {
|
|
297
|
+
* "label": "disasters",
|
|
298
|
+
* "confidence": 0.8142836093902588,
|
|
299
|
+
* "severity": 0.4093044400215149
|
|
300
|
+
* }
|
|
301
|
+
* ],
|
|
302
|
+
* "sentences_idx_start": 0,
|
|
303
|
+
* "sentences_idx_end": 5,
|
|
304
|
+
* "timestamp": {
|
|
305
|
+
* "start": 250,
|
|
306
|
+
* "end": 28840
|
|
307
|
+
* }
|
|
308
|
+
* }
|
|
309
|
+
*/
|
|
60
310
|
export type ContentSafetyLabelResult = {
|
|
61
311
|
/** @description An array of safety labels, one per sensitive topic that was detected in the section */
|
|
62
312
|
labels: ContentSafetyLabel[];
|
|
@@ -71,7 +321,45 @@ export type ContentSafetyLabelResult = {
|
|
|
71
321
|
};
|
|
72
322
|
/**
|
|
73
323
|
* @description An array of results for the Content Moderation model, if it is enabled.
|
|
74
|
-
* See [Content moderation](https://www.assemblyai.com/docs/
|
|
324
|
+
* See [Content moderation](https://www.assemblyai.com/docs/models/content-moderation) for more information.
|
|
325
|
+
*
|
|
326
|
+
* @example {
|
|
327
|
+
* "status": "success",
|
|
328
|
+
* "results": [
|
|
329
|
+
* {
|
|
330
|
+
* "text": "Smoke from hundreds of wildfires in Canada is triggering air quality alerts throughout the US. Skylines from Maine to Maryland to Minnesota are gray and smoggy. And in some places, the air quality warnings include the warning to stay inside. We wanted to better understand what's happening here and why, so we called Peter de Carlo, an associate professor in the Department of Environmental Health and Engineering at Johns Hopkins University Varsity. Good morning, professor. Good morning.",
|
|
331
|
+
* "labels": [
|
|
332
|
+
* {
|
|
333
|
+
* "label": "disasters",
|
|
334
|
+
* "confidence": 0.8142836093902588,
|
|
335
|
+
* "severity": 0.4093044400215149
|
|
336
|
+
* }
|
|
337
|
+
* ],
|
|
338
|
+
* "sentences_idx_start": 0,
|
|
339
|
+
* "sentences_idx_end": 5,
|
|
340
|
+
* "timestamp": {
|
|
341
|
+
* "start": 250,
|
|
342
|
+
* "end": 28840
|
|
343
|
+
* }
|
|
344
|
+
* }
|
|
345
|
+
* ],
|
|
346
|
+
* "summary": {
|
|
347
|
+
* "disasters": 0.9940800441842205,
|
|
348
|
+
* "health_issues": 0.9216489289040967
|
|
349
|
+
* },
|
|
350
|
+
* "severity_score_summary": {
|
|
351
|
+
* "disasters": {
|
|
352
|
+
* "low": 0.5733263024656846,
|
|
353
|
+
* "medium": 0.42667369753431533,
|
|
354
|
+
* "high": 0
|
|
355
|
+
* },
|
|
356
|
+
* "health_issues": {
|
|
357
|
+
* "low": 0.22863814977924785,
|
|
358
|
+
* "medium": 0.45014154926938227,
|
|
359
|
+
* "high": 0.32122030095136983
|
|
360
|
+
* }
|
|
361
|
+
* }
|
|
362
|
+
* }
|
|
75
363
|
*/
|
|
76
364
|
export type ContentSafetyLabelsResult = {
|
|
77
365
|
results: ContentSafetyLabelResult[];
|
|
@@ -86,11 +374,24 @@ export type ContentSafetyLabelsResult = {
|
|
|
86
374
|
[key: string]: number;
|
|
87
375
|
};
|
|
88
376
|
};
|
|
377
|
+
/**
|
|
378
|
+
* @example {
|
|
379
|
+
* "expires_in": 480
|
|
380
|
+
* }
|
|
381
|
+
*/
|
|
89
382
|
export type CreateRealtimeTemporaryTokenParams = {
|
|
90
383
|
/** @description The amount of time until the token expires in seconds */
|
|
91
384
|
expires_in: number;
|
|
92
385
|
};
|
|
93
|
-
/**
|
|
386
|
+
/**
|
|
387
|
+
* @description A detected entity
|
|
388
|
+
* @example {
|
|
389
|
+
* "entity_type": "location",
|
|
390
|
+
* "text": "Canada",
|
|
391
|
+
* "start": 2548,
|
|
392
|
+
* "end": 3130
|
|
393
|
+
* }
|
|
394
|
+
*/
|
|
94
395
|
export type Entity = {
|
|
95
396
|
/** @description The ending time, in milliseconds, for the detected entity in the audio file */
|
|
96
397
|
end: number;
|
|
@@ -106,17 +407,50 @@ export type Entity = {
|
|
|
106
407
|
* @enum {string}
|
|
107
408
|
*/
|
|
108
409
|
export type EntityType = "banking_information" | "blood_type" | "credit_card_cvv" | "credit_card_expiration" | "credit_card_number" | "date" | "date_of_birth" | "drivers_license" | "drug" | "email_address" | "event" | "injury" | "language" | "location" | "medical_condition" | "medical_process" | "money_amount" | "nationality" | "occupation" | "organization" | "password" | "person_age" | "person_name" | "phone_number" | "political_affiliation" | "religion" | "time" | "url" | "us_social_security_number";
|
|
410
|
+
/**
|
|
411
|
+
* @example {
|
|
412
|
+
* "error": "format_text must be a Boolean"
|
|
413
|
+
* }
|
|
414
|
+
*/
|
|
109
415
|
export type Error = {
|
|
110
416
|
/** @description Error message */
|
|
111
417
|
error: string;
|
|
112
418
|
/** @constant */
|
|
113
419
|
status?: "error";
|
|
114
420
|
};
|
|
421
|
+
/**
|
|
422
|
+
* @example {
|
|
423
|
+
* "transcript_ids": [
|
|
424
|
+
* "64nygnr62k-405c-4ae8-8a6b-d90b40ff3cce"
|
|
425
|
+
* ],
|
|
426
|
+
* "context": "This is an interview about wildfires.",
|
|
427
|
+
* "final_model": "default",
|
|
428
|
+
* "temperature": 0,
|
|
429
|
+
* "max_output_size": 3000
|
|
430
|
+
* }
|
|
431
|
+
*/
|
|
115
432
|
export type LemurActionItemsParams = LemurBaseParams;
|
|
433
|
+
/**
|
|
434
|
+
* @example {
|
|
435
|
+
* "request_id": "5e1b27c2-691f-4414-8bc5-f14678442f9e",
|
|
436
|
+
* "response": "Here are some potential action items based on the transcript:\n\n- Monitor air quality levels in affected areas and issue warnings as needed.\n\n- Advise vulnerable populations like children, the elderly, and those with respiratory conditions to limit time outdoors.\n\n- Have schools cancel outdoor activities when air quality is poor.\n\n- Educate the public on health impacts of smoke inhalation and precautions to take.\n\n- Track progression of smoke plumes using weather and air quality monitoring systems.\n\n- Coordinate cross-regionally to manage smoke exposure as air masses shift.\n\n- Plan for likely increase in such events due to climate change. Expand monitoring and forecasting capabilities.\n\n- Conduct research to better understand health impacts of wildfire smoke and mitigation strategies.\n\n- Develop strategies to prevent and manage wildfires to limit air quality impacts.\n"
|
|
437
|
+
* }
|
|
438
|
+
*/
|
|
116
439
|
export type LemurActionItemsResponse = LemurBaseResponse & {
|
|
117
440
|
/** @description The response generated by LeMUR */
|
|
118
441
|
response: string;
|
|
119
442
|
};
|
|
443
|
+
/**
|
|
444
|
+
* @example {
|
|
445
|
+
* "transcript_ids": [
|
|
446
|
+
* "64nygnr62k-405c-4ae8-8a6b-d90b40ff3cce"
|
|
447
|
+
* ],
|
|
448
|
+
* "context": "This is an interview about wildfires.",
|
|
449
|
+
* "final_model": "default",
|
|
450
|
+
* "temperature": 0,
|
|
451
|
+
* "max_output_size": 3000
|
|
452
|
+
* }
|
|
453
|
+
*/
|
|
120
454
|
export type LemurBaseParams = {
|
|
121
455
|
/** @description Context to provide the model. This can be a string or a free-form JSON value. */
|
|
122
456
|
context?: OneOf<[
|
|
@@ -146,16 +480,30 @@ export type LemurBaseParams = {
|
|
|
146
480
|
*/
|
|
147
481
|
transcript_ids?: string[];
|
|
148
482
|
};
|
|
483
|
+
/**
|
|
484
|
+
* @example {
|
|
485
|
+
* "request_id": "5e1b27c2-691f-4414-8bc5-f14678442f9e"
|
|
486
|
+
* }
|
|
487
|
+
*/
|
|
149
488
|
export type LemurBaseResponse = {
|
|
150
|
-
/**
|
|
489
|
+
/**
|
|
490
|
+
* Format: uuid
|
|
491
|
+
* @description The ID of the LeMUR request
|
|
492
|
+
*/
|
|
151
493
|
request_id: string;
|
|
152
494
|
};
|
|
153
495
|
/**
|
|
154
|
-
* @description The model that is used for the final prompt after compression is performed
|
|
496
|
+
* @description The model that is used for the final prompt after compression is performed.
|
|
155
497
|
*
|
|
156
498
|
* @enum {string}
|
|
157
499
|
*/
|
|
158
|
-
export type LemurModel = "default" | "basic";
|
|
500
|
+
export type LemurModel = "default" | "basic" | "assemblyai/mistral-7b";
|
|
501
|
+
/**
|
|
502
|
+
* @example {
|
|
503
|
+
* "question": "Where are there wildfires?",
|
|
504
|
+
* "answer_format": "List of countries in ISO 3166-1 alpha-2 format"
|
|
505
|
+
* }
|
|
506
|
+
*/
|
|
159
507
|
export type LemurQuestion = {
|
|
160
508
|
/** @description How you want the answer to be returned. This can be any text. Can't be used with answer_options. Examples: "short sentence", "bullet points" */
|
|
161
509
|
answer_format?: string;
|
|
@@ -171,41 +519,141 @@ export type LemurQuestion = {
|
|
|
171
519
|
/** @description The question you wish to ask. For more complex questions use default model. */
|
|
172
520
|
question: string;
|
|
173
521
|
};
|
|
174
|
-
/**
|
|
522
|
+
/**
|
|
523
|
+
* @description An answer generated by LeMUR and its question
|
|
524
|
+
* @example {
|
|
525
|
+
* "answer": "CA, US",
|
|
526
|
+
* "question": "Where are there wildfires?"
|
|
527
|
+
* }
|
|
528
|
+
*/
|
|
175
529
|
export type LemurQuestionAnswer = {
|
|
176
530
|
/** @description The answer generated by LeMUR */
|
|
177
531
|
answer: string;
|
|
178
532
|
/** @description The question for LeMUR to answer */
|
|
179
533
|
question: string;
|
|
180
534
|
};
|
|
535
|
+
/**
|
|
536
|
+
* @example {
|
|
537
|
+
* "transcript_ids": [
|
|
538
|
+
* "64nygnr62k-405c-4ae8-8a6b-d90b40ff3cce"
|
|
539
|
+
* ],
|
|
540
|
+
* "context": "This is an interview about wildfires.",
|
|
541
|
+
* "questions": [
|
|
542
|
+
* {
|
|
543
|
+
* "question": "Where are there wildfires?",
|
|
544
|
+
* "answer_format": "List of countries in ISO 3166-1 alpha-2 format",
|
|
545
|
+
* "answer_options": [
|
|
546
|
+
* "US",
|
|
547
|
+
* "CA"
|
|
548
|
+
* ]
|
|
549
|
+
* },
|
|
550
|
+
* {
|
|
551
|
+
* "question": "Is global warming affecting wildfires?",
|
|
552
|
+
* "answer_options": [
|
|
553
|
+
* "yes",
|
|
554
|
+
* "no"
|
|
555
|
+
* ]
|
|
556
|
+
* }
|
|
557
|
+
* ],
|
|
558
|
+
* "final_model": "default",
|
|
559
|
+
* "temperature": 0,
|
|
560
|
+
* "max_output_size": 3000
|
|
561
|
+
* }
|
|
562
|
+
*/
|
|
181
563
|
export type LemurQuestionAnswerParams = LemurBaseParams & {
|
|
182
564
|
/** @description A list of questions to ask */
|
|
183
565
|
questions: LemurQuestion[];
|
|
184
566
|
};
|
|
567
|
+
/**
|
|
568
|
+
* @example {
|
|
569
|
+
* "request_id": "5e1b27c2-691f-4414-8bc5-f14678442f9e",
|
|
570
|
+
* "response": [
|
|
571
|
+
* {
|
|
572
|
+
* "answer": "CA, US",
|
|
573
|
+
* "question": "Where are there wildfires?"
|
|
574
|
+
* },
|
|
575
|
+
* {
|
|
576
|
+
* "answer": "yes",
|
|
577
|
+
* "question": "Is global warming affecting wildfires?"
|
|
578
|
+
* }
|
|
579
|
+
* ]
|
|
580
|
+
* }
|
|
581
|
+
*/
|
|
185
582
|
export type LemurQuestionAnswerResponse = LemurBaseResponse & {
|
|
186
583
|
/** @description The answers generated by LeMUR and their questions */
|
|
187
584
|
response: LemurQuestionAnswer[];
|
|
188
585
|
};
|
|
586
|
+
/**
|
|
587
|
+
* @example {
|
|
588
|
+
* "transcript_ids": [
|
|
589
|
+
* "64nygnr62k-405c-4ae8-8a6b-d90b40ff3cce"
|
|
590
|
+
* ],
|
|
591
|
+
* "context": "This is an interview about wildfires.",
|
|
592
|
+
* "final_model": "default",
|
|
593
|
+
* "temperature": 0,
|
|
594
|
+
* "max_output_size": 3000
|
|
595
|
+
* }
|
|
596
|
+
*/
|
|
189
597
|
export type LemurSummaryParams = LemurBaseParams & {
|
|
190
598
|
/** @description How you want the summary to be returned. This can be any text. Examples: "TLDR", "bullet points" */
|
|
191
599
|
answer_format?: string;
|
|
192
600
|
};
|
|
601
|
+
/**
|
|
602
|
+
* @example {
|
|
603
|
+
* "request_id": "5e1b27c2-691f-4414-8bc5-f14678442f9e",
|
|
604
|
+
* "response": "- Wildfires in Canada are sending smoke and air pollution across parts of the US, triggering air quality alerts from Maine to Minnesota. Concentrations of particulate matter have exceeded safety levels.\n\n- Weather systems are channeling the smoke through Pennsylvania into the Mid-Atlantic and Northeast regions. New York City has canceled outdoor activities to keep children and vulnerable groups indoors.\n\n- Very small particulate matter can enter the lungs and impact respiratory, cardiovascular and neurological health. Young children, the elderly and those with preexisting conditions are most at risk.\n\n- The conditions causing the poor air quality could get worse or shift to different areas in coming days depending on weather patterns. More wildfires may also contribute to higher concentrations.\n\n- Climate change is leading to longer and more severe fire seasons. Events of smoke traveling long distances and affecting air quality over wide areas will likely become more common in the future.\"\n"
|
|
605
|
+
* }
|
|
606
|
+
*/
|
|
193
607
|
export type LemurSummaryResponse = LemurBaseResponse & {
|
|
194
608
|
/** @description The response generated by LeMUR */
|
|
195
609
|
response: string;
|
|
196
610
|
};
|
|
611
|
+
/**
|
|
612
|
+
* @example {
|
|
613
|
+
* "transcript_ids": [
|
|
614
|
+
* "64nygnr62k-405c-4ae8-8a6b-d90b40ff3cce"
|
|
615
|
+
* ],
|
|
616
|
+
* "prompt": "List all the locations affected by wildfires.",
|
|
617
|
+
* "context": "This is an interview about wildfires.",
|
|
618
|
+
* "final_model": "default",
|
|
619
|
+
* "temperature": 0,
|
|
620
|
+
* "max_output_size": 3000
|
|
621
|
+
* }
|
|
622
|
+
*/
|
|
197
623
|
export type LemurTaskParams = LemurBaseParams & {
|
|
198
624
|
/** @description Your text to prompt the model to produce a desired output, including any context you want to pass into the model. */
|
|
199
625
|
prompt: string;
|
|
200
626
|
};
|
|
627
|
+
/**
|
|
628
|
+
* @example {
|
|
629
|
+
* "request_id": "5e1b27c2-691f-4414-8bc5-f14678442f9e",
|
|
630
|
+
* "response": "Based on the transcript, the following locations were mentioned as being affected by wildfire smoke from Canada:\n\n- Maine\n- Maryland\n- Minnesota\n- Mid Atlantic region\n- Northeast region\n- New York City\n- Baltimore\n"
|
|
631
|
+
* }
|
|
632
|
+
*/
|
|
201
633
|
export type LemurTaskResponse = LemurBaseResponse & {
|
|
202
|
-
/** @description The response generated by LeMUR */
|
|
634
|
+
/** @description The response generated by LeMUR. */
|
|
203
635
|
response: string;
|
|
204
636
|
};
|
|
637
|
+
/**
|
|
638
|
+
* @example {
|
|
639
|
+
* "after_id": "a7c5cafd-2c2e-4bdd-b0b2-69dade2f7a1b",
|
|
640
|
+
* "before_id": "9ea68fd3-f953-42c1-9742-976c447fb463",
|
|
641
|
+
* "created_on": "2023-11-03",
|
|
642
|
+
* "limit": 2,
|
|
643
|
+
* "status": "completed",
|
|
644
|
+
* "throttled_only": false
|
|
645
|
+
* }
|
|
646
|
+
*/
|
|
205
647
|
export type ListTranscriptParams = {
|
|
206
|
-
/**
|
|
648
|
+
/**
|
|
649
|
+
* Format: uuid
|
|
650
|
+
* @description Get transcripts that were created after this transcript ID
|
|
651
|
+
*/
|
|
207
652
|
after_id?: string;
|
|
208
|
-
/**
|
|
653
|
+
/**
|
|
654
|
+
* Format: uuid
|
|
655
|
+
* @description Get transcripts that were created before this transcript ID
|
|
656
|
+
*/
|
|
209
657
|
before_id?: string;
|
|
210
658
|
/**
|
|
211
659
|
* Format: date
|
|
@@ -223,6 +671,15 @@ export type ListTranscriptParams = {
|
|
|
223
671
|
/** @description Only get throttled transcripts, overrides the status filter */
|
|
224
672
|
throttled_only?: boolean;
|
|
225
673
|
};
|
|
674
|
+
/**
|
|
675
|
+
* @example {
|
|
676
|
+
* "limit": 10,
|
|
677
|
+
* "result_count": 10,
|
|
678
|
+
* "current_url": "https://api.assemblyai.com/v2/transcript?limit=10",
|
|
679
|
+
* "prev_url": "https://api.assemblyai.com/v2/transcript?limit=10&before_id=62npeahu2b-a8ea-4112-854c-69542c20d90c",
|
|
680
|
+
* "next_url": "https://api.assemblyai.com/v2/transcript?limit=10&after_id=62nfw3mlar-01ad-4631-92f6-629929496eed"
|
|
681
|
+
* }
|
|
682
|
+
*/
|
|
226
683
|
export type PageDetails = {
|
|
227
684
|
current_url: string;
|
|
228
685
|
limit: number;
|
|
@@ -230,27 +687,126 @@ export type PageDetails = {
|
|
|
230
687
|
prev_url: string;
|
|
231
688
|
result_count: number;
|
|
232
689
|
};
|
|
690
|
+
/**
|
|
691
|
+
* @example {
|
|
692
|
+
* "paragraphs": [
|
|
693
|
+
* {
|
|
694
|
+
* "text": "Smoke from hundreds of wildfires in Canada is triggering air quality alerts throughout the US. Skylines from Maine to Maryland to Minnesota are gray and smoggy. And in some places, the air quality warnings include the warning to stay inside. We wanted to better understand what's happening here and why, so we called Peter Decarlo, an associate professor in the Department of Environmental Health and Engineering at Johns Hopkins University. Good morning, professor.",
|
|
695
|
+
* "start": 250,
|
|
696
|
+
* "end": 26950,
|
|
697
|
+
* "confidence": 0.73033,
|
|
698
|
+
* "words": [
|
|
699
|
+
* {
|
|
700
|
+
* "text": "Smoke",
|
|
701
|
+
* "start": 250,
|
|
702
|
+
* "end": 650,
|
|
703
|
+
* "confidence": 0.73033,
|
|
704
|
+
* "speaker": null
|
|
705
|
+
* },
|
|
706
|
+
* {
|
|
707
|
+
* "text": "from",
|
|
708
|
+
* "start": 730,
|
|
709
|
+
* "end": 1022,
|
|
710
|
+
* "confidence": 1,
|
|
711
|
+
* "speaker": null
|
|
712
|
+
* },
|
|
713
|
+
* {
|
|
714
|
+
* "text": "hundreds",
|
|
715
|
+
* "start": 1076,
|
|
716
|
+
* "end": 1466,
|
|
717
|
+
* "confidence": 0.99992,
|
|
718
|
+
* "speaker": null
|
|
719
|
+
* },
|
|
720
|
+
* {
|
|
721
|
+
* "text": "of",
|
|
722
|
+
* "start": 1498,
|
|
723
|
+
* "end": 1646,
|
|
724
|
+
* "confidence": 1,
|
|
725
|
+
* "speaker": null
|
|
726
|
+
* }
|
|
727
|
+
* ]
|
|
728
|
+
* },
|
|
729
|
+
* {
|
|
730
|
+
* "text": "Good morning. So what is it about the conditions right now that have caused this round of wildfires to affect so many people so far away? Well, there's a couple of things. The season has been pretty dry already, and then the fact that we're getting hit in the US. Is because there's a couple of weather systems that are essentially channeling the smoke from those Canadian wildfires through Pennsylvania into the Mid Atlantic and the Northeast and kind of just dropping the smoke there.",
|
|
731
|
+
* "start": 27850,
|
|
732
|
+
* "end": 56190,
|
|
733
|
+
* "confidence": 0.99667,
|
|
734
|
+
* "words": [
|
|
735
|
+
* {
|
|
736
|
+
* "text": "Good",
|
|
737
|
+
* "start": 27850,
|
|
738
|
+
* "end": 28262,
|
|
739
|
+
* "confidence": 0.99667,
|
|
740
|
+
* "speaker": null
|
|
741
|
+
* },
|
|
742
|
+
* {
|
|
743
|
+
* "text": "morning.",
|
|
744
|
+
* "start": 28316,
|
|
745
|
+
* "end": 28920,
|
|
746
|
+
* "confidence": 0.99742,
|
|
747
|
+
* "speaker": null
|
|
748
|
+
* },
|
|
749
|
+
* {
|
|
750
|
+
* "text": "So",
|
|
751
|
+
* "start": 29290,
|
|
752
|
+
* "end": 29702,
|
|
753
|
+
* "confidence": 0.94736,
|
|
754
|
+
* "speaker": null
|
|
755
|
+
* }
|
|
756
|
+
* ]
|
|
757
|
+
* }
|
|
758
|
+
* ],
|
|
759
|
+
* "id": "d5a3d302-066e-43fb-b63b-8f57baf185db",
|
|
760
|
+
* "confidence": 0.9578730257009361,
|
|
761
|
+
* "audio_duration": 281
|
|
762
|
+
* }
|
|
763
|
+
*/
|
|
233
764
|
export type ParagraphsResponse = {
|
|
234
765
|
audio_duration: number;
|
|
235
766
|
/** Format: double */
|
|
236
767
|
confidence: number;
|
|
768
|
+
/** Format: uuid */
|
|
237
769
|
id: string;
|
|
238
770
|
paragraphs: TranscriptParagraph[];
|
|
239
771
|
};
|
|
240
772
|
/** @enum {string} */
|
|
241
773
|
export type PiiPolicy = "medical_process" | "medical_condition" | "blood_type" | "drug" | "injury" | "number_sequence" | "email_address" | "date_of_birth" | "phone_number" | "us_social_security_number" | "credit_card_number" | "credit_card_expiration" | "credit_card_cvv" | "date" | "nationality" | "event" | "language" | "location" | "money_amount" | "person_name" | "person_age" | "organization" | "political_affiliation" | "occupation" | "religion" | "drivers_license" | "banking_information";
|
|
774
|
+
/**
|
|
775
|
+
* @example {
|
|
776
|
+
* "request_id": "914fe7e4-f10a-4364-8946-34614c2873f6",
|
|
777
|
+
* "request_id_to_purge": "b7eb03ec-1650-4181-949b-75d9de317de1",
|
|
778
|
+
* "deleted": true
|
|
779
|
+
* }
|
|
780
|
+
*/
|
|
242
781
|
export type PurgeLemurRequestDataResponse = {
|
|
243
782
|
/** @description Whether the request data was deleted */
|
|
244
783
|
deleted: boolean;
|
|
245
|
-
/**
|
|
784
|
+
/**
|
|
785
|
+
* Format: uuid
|
|
786
|
+
* @description The ID of the deletion request of the LeMUR request
|
|
787
|
+
*/
|
|
246
788
|
request_id: string;
|
|
247
|
-
/**
|
|
789
|
+
/**
|
|
790
|
+
* Format: uuid
|
|
791
|
+
* @description The ID of the LeMUR request to purge the data for
|
|
792
|
+
*/
|
|
248
793
|
request_id_to_purge: string;
|
|
249
794
|
};
|
|
795
|
+
/**
|
|
796
|
+
* @example {
|
|
797
|
+
* "token": "fe4145dd1e7a2e149488dcd2d553a8018a89833fc5084837d66fd1bcf5a105d4"
|
|
798
|
+
* }
|
|
799
|
+
*/
|
|
250
800
|
export type RealtimeTemporaryTokenResponse = {
|
|
251
801
|
/** @description The temporary authentication token for real-time transcription */
|
|
252
802
|
token: string;
|
|
253
803
|
};
|
|
804
|
+
/**
|
|
805
|
+
* @example {
|
|
806
|
+
* "redacted_audio_url": "https://s3.us-west-2.amazonaws.com/api.assembly.ai.usw2/redacted-audio/785efd9e-0e20-45e1-967b-3db17770ed9f.wav?AWSAccessKeyId=ASIAVASQFLPGLUP5JD7Y&Signature=z1r2MOA46esiiAmk%2FreBkL8rl6g%3D&x-amz-security-token=IQoJb3JpZ2luX2VjEPv%2F%2F%2F%2F%2F%2F%2F%2F%2F%2FwEaCXVzLXdlc3QtMiJHMEUCIHxKoUJdd5P%2Fdy4WlfvRNppQtauTy7OuAb5azR2OIoYSAiEA8iPx4xAx0pbZztT4e7fGnzPS4phvNCnYKflIijUoxDsq%2BwMIMxAEGgwzNDQ4MzkyNDg4NDQiDJxsCgo0cDg789FV0CrYAwPK3CHbRHoNPFiQ%2FO6EdHZ4OSFRcS%2FDvDyHQRNnYNSwG4JB2mUMWEVw808JWTya%2But4wEcmPiUCVJMTvh70cxhILAxP84CBTuWGM%2Fszbj4tn1thjVsqovf9YZmP17OCFa77Bc9%2F9RwtRaABEqJ2eb6%2Bsir7w0MMzhe1z%2F%2B1PUKxicJAZasBv3Ova%2BTY2eNkPZHQ4Njie4X5sh05b%2BrKnz58E7GTQ1sHZQDYHZecwb5fP0B3LR0vuqNtK%2BdpMAxw5H7BinQ4rdccLmsLLMQeVn8jdRDZNEvsdmoeQL0y0qD%2BUcyGMJoAjMT4FnXhBhVxc3bgkVUbHlZMn48FNCYcmzM8UB9wGmSnr6iQoqEaFElfQVbvAzsW7lnlfLROZxMvGXyliobPYPSaYZlVYgHcIxeWuOAXRtEtmL2jbaX4ghCVgJBVO3BBzTgub2jB0KPU6lYZLLM4kf%2B8hKX8iyxSRc6ZVEefTcyruoDppjB028pA9q75hLH1CZwhfLoM%2F3z5f0aFCl05zQnaa10nbcKj0hERELf4FXqS8yWbSutlRcd7Rr9o8jN31QGUscpsuIvl%2FpyJcZmItX8nO%2FF0s1QjrIi11DLYD9YoOh7eVkN8eKKn5w4cHldVI2sw4NCPqgY6pQE%2BM9va2ad1%2BNrXeQ9t8K41lojTN0BFmM8ERD5fF77xcTlW8VdV%2FiJeLLHDvnYYWVKcga9hSROlmsqvMyn3Tmhz7KQbIepSAOKhcHM%2FyUaLfErvCtjXGwo8nsKForL7SKiGkaRCBmwfQtkSVP6m4tGT50YdGxakh54f8uyC55SbkElknRbpl5haiZ%2F82UddFBkdPcM3t0s7vwbEy%2BbilYyetOr6htc%3D&Expires=1698966551",
|
|
807
|
+
* "status": "redacted_audio_ready"
|
|
808
|
+
* }
|
|
809
|
+
*/
|
|
254
810
|
export type RedactedAudioResponse = {
|
|
255
811
|
/** @description The URL of the redacted audio file */
|
|
256
812
|
redacted_audio_url: string;
|
|
@@ -262,16 +818,124 @@ export type RedactedAudioResponse = {
|
|
|
262
818
|
* @enum {string}
|
|
263
819
|
*/
|
|
264
820
|
export type RedactedAudioStatus = "redacted_audio_ready";
|
|
821
|
+
/**
|
|
822
|
+
* @example {
|
|
823
|
+
* "sentences": [
|
|
824
|
+
* {
|
|
825
|
+
* "text": "Smoke from hundreds of wildfires in Canada is triggering air quality alerts throughout the US.",
|
|
826
|
+
* "start": 250,
|
|
827
|
+
* "end": 6350,
|
|
828
|
+
* "confidence": 0.72412,
|
|
829
|
+
* "words": [
|
|
830
|
+
* {
|
|
831
|
+
* "text": "Smoke",
|
|
832
|
+
* "start": 250,
|
|
833
|
+
* "end": 650,
|
|
834
|
+
* "confidence": 0.72412,
|
|
835
|
+
* "speaker": null
|
|
836
|
+
* },
|
|
837
|
+
* {
|
|
838
|
+
* "text": "from",
|
|
839
|
+
* "start": 730,
|
|
840
|
+
* "end": 1022,
|
|
841
|
+
* "confidence": 0.99996,
|
|
842
|
+
* "speaker": null
|
|
843
|
+
* },
|
|
844
|
+
* {
|
|
845
|
+
* "text": "hundreds",
|
|
846
|
+
* "start": 1076,
|
|
847
|
+
* "end": 1466,
|
|
848
|
+
* "confidence": 0.99992,
|
|
849
|
+
* "speaker": null
|
|
850
|
+
* },
|
|
851
|
+
* {
|
|
852
|
+
* "text": "of",
|
|
853
|
+
* "start": 1498,
|
|
854
|
+
* "end": 1646,
|
|
855
|
+
* "confidence": 1,
|
|
856
|
+
* "speaker": null
|
|
857
|
+
* }
|
|
858
|
+
* ],
|
|
859
|
+
* "speaker": null
|
|
860
|
+
* },
|
|
861
|
+
* {
|
|
862
|
+
* "text": "Skylines from Maine to Maryland to Minnesota are gray and smoggy.",
|
|
863
|
+
* "start": 6500,
|
|
864
|
+
* "end": 11050,
|
|
865
|
+
* "confidence": 0.99819,
|
|
866
|
+
* "words": [
|
|
867
|
+
* {
|
|
868
|
+
* "text": "Skylines",
|
|
869
|
+
* "start": 6500,
|
|
870
|
+
* "end": 7306,
|
|
871
|
+
* "confidence": 0.99819,
|
|
872
|
+
* "speaker": null
|
|
873
|
+
* },
|
|
874
|
+
* {
|
|
875
|
+
* "text": "from",
|
|
876
|
+
* "start": 7338,
|
|
877
|
+
* "end": 7534,
|
|
878
|
+
* "confidence": 0.99987,
|
|
879
|
+
* "speaker": null
|
|
880
|
+
* },
|
|
881
|
+
* {
|
|
882
|
+
* "text": "Maine",
|
|
883
|
+
* "start": 7572,
|
|
884
|
+
* "end": 7962,
|
|
885
|
+
* "confidence": 0.9972,
|
|
886
|
+
* "speaker": null
|
|
887
|
+
* },
|
|
888
|
+
* {
|
|
889
|
+
* "text": "to",
|
|
890
|
+
* "start": 8026,
|
|
891
|
+
* "end": 8206,
|
|
892
|
+
* "confidence": 1,
|
|
893
|
+
* "speaker": null
|
|
894
|
+
* },
|
|
895
|
+
* {
|
|
896
|
+
* "text": "Maryland",
|
|
897
|
+
* "start": 8228,
|
|
898
|
+
* "end": 8650,
|
|
899
|
+
* "confidence": 0.5192,
|
|
900
|
+
* "speaker": null
|
|
901
|
+
* },
|
|
902
|
+
* {
|
|
903
|
+
* "text": "to",
|
|
904
|
+
* "start": 8730,
|
|
905
|
+
* "end": 8926,
|
|
906
|
+
* "confidence": 1,
|
|
907
|
+
* "speaker": null
|
|
908
|
+
* }
|
|
909
|
+
* ],
|
|
910
|
+
* "speaker": null
|
|
911
|
+
* }
|
|
912
|
+
* ],
|
|
913
|
+
* "id": "d5a3d302-066e-43fb-b63b-8f57baf185db",
|
|
914
|
+
* "confidence": 0.9579390654205628,
|
|
915
|
+
* "audio_duration": 281
|
|
916
|
+
* }
|
|
917
|
+
*/
|
|
265
918
|
export type SentencesResponse = {
|
|
266
919
|
audio_duration: number;
|
|
267
920
|
/** Format: double */
|
|
268
921
|
confidence: number;
|
|
922
|
+
/** Format: uuid */
|
|
269
923
|
id: string;
|
|
270
924
|
sentences: TranscriptSentence[];
|
|
271
925
|
};
|
|
272
926
|
/** @enum {unknown} */
|
|
273
927
|
export type Sentiment = "POSITIVE" | "NEUTRAL" | "NEGATIVE";
|
|
274
|
-
/**
|
|
928
|
+
/**
|
|
929
|
+
* @description The result of the sentiment analysis model
|
|
930
|
+
* @example {
|
|
931
|
+
* "text": "Smoke from hundreds of wildfires in Canada is triggering air quality alerts throughout the US.",
|
|
932
|
+
* "start": 250,
|
|
933
|
+
* "end": 6350,
|
|
934
|
+
* "sentiment": "NEGATIVE",
|
|
935
|
+
* "confidence": 0.8181032538414001,
|
|
936
|
+
* "speaker": null
|
|
937
|
+
* }
|
|
938
|
+
*/
|
|
275
939
|
export type SentimentAnalysisResult = {
|
|
276
940
|
/**
|
|
277
941
|
* Format: double
|
|
@@ -289,6 +953,13 @@ export type SentimentAnalysisResult = {
|
|
|
289
953
|
/** @description The transcript of the sentence */
|
|
290
954
|
text: string;
|
|
291
955
|
};
|
|
956
|
+
/**
|
|
957
|
+
* @example {
|
|
958
|
+
* "low": 0.5733263024656846,
|
|
959
|
+
* "medium": 0.42667369753431533,
|
|
960
|
+
* "high": 0
|
|
961
|
+
* }
|
|
962
|
+
*/
|
|
292
963
|
export type SeverityScoreSummary = {
|
|
293
964
|
/** Format: double */
|
|
294
965
|
high: number;
|
|
@@ -298,7 +969,7 @@ export type SeverityScoreSummary = {
|
|
|
298
969
|
medium: number;
|
|
299
970
|
};
|
|
300
971
|
/**
|
|
301
|
-
* @description The replacement logic for detected PII, can be "entity_type" or "hash". See [PII redaction](https://www.assemblyai.com/docs/
|
|
972
|
+
* @description The replacement logic for detected PII, can be "entity_type" or "hash". See [PII redaction](https://www.assemblyai.com/docs/models/pii-redaction) for more details.
|
|
302
973
|
* @enum {string}
|
|
303
974
|
*/
|
|
304
975
|
export type SubstitutionPolicy = "entity_type" | "hash";
|
|
@@ -319,7 +990,13 @@ export type SummaryModel = "informative" | "conversational" | "catchy";
|
|
|
319
990
|
* @enum {string}
|
|
320
991
|
*/
|
|
321
992
|
export type SummaryType = "bullets" | "bullets_verbose" | "gist" | "headline" | "paragraph";
|
|
322
|
-
/**
|
|
993
|
+
/**
|
|
994
|
+
* @description Timestamp containing a start and end property in milliseconds
|
|
995
|
+
* @example {
|
|
996
|
+
* "start": 3978,
|
|
997
|
+
* "end": 5114
|
|
998
|
+
* }
|
|
999
|
+
*/
|
|
323
1000
|
export type Timestamp = {
|
|
324
1001
|
/** @description The end time in milliseconds */
|
|
325
1002
|
end: number;
|
|
@@ -328,7 +1005,84 @@ export type Timestamp = {
|
|
|
328
1005
|
};
|
|
329
1006
|
/**
|
|
330
1007
|
* @description The result of the Topic Detection model, if it is enabled.
|
|
331
|
-
* See [Topic Detection](https://www.assemblyai.com/docs/
|
|
1008
|
+
* See [Topic Detection](https://www.assemblyai.com/docs/models/topic-detection) for more information.
|
|
1009
|
+
*
|
|
1010
|
+
* @example {
|
|
1011
|
+
* "status": "success",
|
|
1012
|
+
* "results": [
|
|
1013
|
+
* {
|
|
1014
|
+
* "text": "Smoke from hundreds of wildfires in Canada is triggering air quality alerts throughout the US. Skylines from Maine to Maryland to Minnesota are gray and smoggy. And in some places, the air quality warnings include the warning to stay inside. We wanted to better understand what's happening here and why, so we called Peter de Carlo, an associate professor in the Department of Environmental Health and Engineering at Johns Hopkins University Varsity. Good morning, professor. Good morning.",
|
|
1015
|
+
* "labels": [
|
|
1016
|
+
* {
|
|
1017
|
+
* "relevance": 0.988274097442627,
|
|
1018
|
+
* "label": "Home&Garden>IndoorEnvironmentalQuality"
|
|
1019
|
+
* },
|
|
1020
|
+
* {
|
|
1021
|
+
* "relevance": 0.5821335911750793,
|
|
1022
|
+
* "label": "NewsAndPolitics>Weather"
|
|
1023
|
+
* },
|
|
1024
|
+
* {
|
|
1025
|
+
* "relevance": 0.0042327106930315495,
|
|
1026
|
+
* "label": "MedicalHealth>DiseasesAndConditions>LungAndRespiratoryHealth"
|
|
1027
|
+
* },
|
|
1028
|
+
* {
|
|
1029
|
+
* "relevance": 0.0033971222583204508,
|
|
1030
|
+
* "label": "NewsAndPolitics>Disasters"
|
|
1031
|
+
* },
|
|
1032
|
+
* {
|
|
1033
|
+
* "relevance": 0.002469958271831274,
|
|
1034
|
+
* "label": "BusinessAndFinance>Business>GreenSolutions"
|
|
1035
|
+
* },
|
|
1036
|
+
* {
|
|
1037
|
+
* "relevance": 0.0014376690378412604,
|
|
1038
|
+
* "label": "MedicalHealth>DiseasesAndConditions>Cancer"
|
|
1039
|
+
* },
|
|
1040
|
+
* {
|
|
1041
|
+
* "relevance": 0.0014294233405962586,
|
|
1042
|
+
* "label": "Science>Environment"
|
|
1043
|
+
* },
|
|
1044
|
+
* {
|
|
1045
|
+
* "relevance": 0.001234519761055708,
|
|
1046
|
+
* "label": "Travel>TravelLocations>PolarTravel"
|
|
1047
|
+
* },
|
|
1048
|
+
* {
|
|
1049
|
+
* "relevance": 0.0010231725173071027,
|
|
1050
|
+
* "label": "MedicalHealth>DiseasesAndConditions>ColdAndFlu"
|
|
1051
|
+
* },
|
|
1052
|
+
* {
|
|
1053
|
+
* "relevance": 0.0007445293595083058,
|
|
1054
|
+
* "label": "BusinessAndFinance>Industries>PowerAndEnergyIndustry"
|
|
1055
|
+
* }
|
|
1056
|
+
* ],
|
|
1057
|
+
* "timestamp": {
|
|
1058
|
+
* "start": 250,
|
|
1059
|
+
* "end": 28840
|
|
1060
|
+
* }
|
|
1061
|
+
* }
|
|
1062
|
+
* ],
|
|
1063
|
+
* "summary": {
|
|
1064
|
+
* "NewsAndPolitics>Weather": 1,
|
|
1065
|
+
* "Home&Garden>IndoorEnvironmentalQuality": 0.9043831825256348,
|
|
1066
|
+
* "Science>Environment": 0.16117265820503235,
|
|
1067
|
+
* "BusinessAndFinance>Industries>EnvironmentalServicesIndustry": 0.14393523335456848,
|
|
1068
|
+
* "MedicalHealth>DiseasesAndConditions>LungAndRespiratoryHealth": 0.11401086300611496,
|
|
1069
|
+
* "BusinessAndFinance>Business>GreenSolutions": 0.06348437070846558,
|
|
1070
|
+
* "NewsAndPolitics>Disasters": 0.05041387677192688,
|
|
1071
|
+
* "Travel>TravelLocations>PolarTravel": 0.01308488193899393,
|
|
1072
|
+
* "HealthyLiving": 0.008222488686442375,
|
|
1073
|
+
* "MedicalHealth>DiseasesAndConditions>ColdAndFlu": 0.0022315620444715023,
|
|
1074
|
+
* "MedicalHealth>DiseasesAndConditions>HeartAndCardiovascularDiseases": 0.00213034451007843,
|
|
1075
|
+
* "HealthyLiving>Wellness>SmokingCessation": 0.001540527562610805,
|
|
1076
|
+
* "MedicalHealth>DiseasesAndConditions>Injuries": 0.0013950627762824297,
|
|
1077
|
+
* "BusinessAndFinance>Industries>PowerAndEnergyIndustry": 0.0012570273829624057,
|
|
1078
|
+
* "MedicalHealth>DiseasesAndConditions>Cancer": 0.001097781932912767,
|
|
1079
|
+
* "MedicalHealth>DiseasesAndConditions>Allergies": 0.0010148967849090695,
|
|
1080
|
+
* "MedicalHealth>DiseasesAndConditions>MentalHealth": 0.000717321818228811,
|
|
1081
|
+
* "Style&Fashion>PersonalCare>DeodorantAndAntiperspirant": 0.0006022014422342181,
|
|
1082
|
+
* "Technology&Computing>Computing>ComputerNetworking": 0.0005461975233629346,
|
|
1083
|
+
* "MedicalHealth>DiseasesAndConditions>Injuries>FirstAid": 0.0004885646631009877
|
|
1084
|
+
* }
|
|
1085
|
+
* }
|
|
332
1086
|
*/
|
|
333
1087
|
export type TopicDetectionModelResult = {
|
|
334
1088
|
/** @description An array of results for the Topic Detection model */
|
|
@@ -340,7 +1094,58 @@ export type TopicDetectionModelResult = {
|
|
|
340
1094
|
[key: string]: number;
|
|
341
1095
|
};
|
|
342
1096
|
};
|
|
343
|
-
/**
|
|
1097
|
+
/**
|
|
1098
|
+
* @description The result of the topic detection model
|
|
1099
|
+
* @example {
|
|
1100
|
+
* "text": "Smoke from hundreds of wildfires in Canada is triggering air quality alerts throughout the US. Skylines from Maine to Maryland to Minnesota are gray and smoggy. And in some places, the air quality warnings include the warning to stay inside. We wanted to better understand what's happening here and why, so we called Peter de Carlo, an associate professor in the Department of Environmental Health and Engineering at Johns Hopkins University Varsity. Good morning, professor. Good morning.",
|
|
1101
|
+
* "labels": [
|
|
1102
|
+
* {
|
|
1103
|
+
* "relevance": 0.988274097442627,
|
|
1104
|
+
* "label": "Home&Garden>IndoorEnvironmentalQuality"
|
|
1105
|
+
* },
|
|
1106
|
+
* {
|
|
1107
|
+
* "relevance": 0.5821335911750793,
|
|
1108
|
+
* "label": "NewsAndPolitics>Weather"
|
|
1109
|
+
* },
|
|
1110
|
+
* {
|
|
1111
|
+
* "relevance": 0.0042327106930315495,
|
|
1112
|
+
* "label": "MedicalHealth>DiseasesAndConditions>LungAndRespiratoryHealth"
|
|
1113
|
+
* },
|
|
1114
|
+
* {
|
|
1115
|
+
* "relevance": 0.0033971222583204508,
|
|
1116
|
+
* "label": "NewsAndPolitics>Disasters"
|
|
1117
|
+
* },
|
|
1118
|
+
* {
|
|
1119
|
+
* "relevance": 0.002469958271831274,
|
|
1120
|
+
* "label": "BusinessAndFinance>Business>GreenSolutions"
|
|
1121
|
+
* },
|
|
1122
|
+
* {
|
|
1123
|
+
* "relevance": 0.0014376690378412604,
|
|
1124
|
+
* "label": "MedicalHealth>DiseasesAndConditions>Cancer"
|
|
1125
|
+
* },
|
|
1126
|
+
* {
|
|
1127
|
+
* "relevance": 0.0014294233405962586,
|
|
1128
|
+
* "label": "Science>Environment"
|
|
1129
|
+
* },
|
|
1130
|
+
* {
|
|
1131
|
+
* "relevance": 0.001234519761055708,
|
|
1132
|
+
* "label": "Travel>TravelLocations>PolarTravel"
|
|
1133
|
+
* },
|
|
1134
|
+
* {
|
|
1135
|
+
* "relevance": 0.0010231725173071027,
|
|
1136
|
+
* "label": "MedicalHealth>DiseasesAndConditions>ColdAndFlu"
|
|
1137
|
+
* },
|
|
1138
|
+
* {
|
|
1139
|
+
* "relevance": 0.0007445293595083058,
|
|
1140
|
+
* "label": "BusinessAndFinance>Industries>PowerAndEnergyIndustry"
|
|
1141
|
+
* }
|
|
1142
|
+
* ],
|
|
1143
|
+
* "timestamp": {
|
|
1144
|
+
* "start": 250,
|
|
1145
|
+
* "end": 28840
|
|
1146
|
+
* }
|
|
1147
|
+
* }
|
|
1148
|
+
*/
|
|
344
1149
|
export type TopicDetectionResult = {
|
|
345
1150
|
labels?: {
|
|
346
1151
|
/** @description The IAB taxonomical label for the label of the detected topic, where > denotes supertopic/subtopic relationship */
|
|
@@ -355,7 +1160,692 @@ export type TopicDetectionResult = {
|
|
|
355
1160
|
text: string;
|
|
356
1161
|
timestamp?: Timestamp;
|
|
357
1162
|
};
|
|
358
|
-
/**
|
|
1163
|
+
/**
|
|
1164
|
+
* @description A transcript object
|
|
1165
|
+
* @example {
|
|
1166
|
+
* "id": "9ea68fd3-f953-42c1-9742-976c447fb463",
|
|
1167
|
+
* "language_model": "assemblyai_default",
|
|
1168
|
+
* "acoustic_model": "assemblyai_default",
|
|
1169
|
+
* "language_code": "en_us",
|
|
1170
|
+
* "status": "completed",
|
|
1171
|
+
* "audio_url": "https://github.com/AssemblyAI-Examples/audio-examples/raw/main/20230607_me_canadian_wildfires.mp3",
|
|
1172
|
+
* "text": "Smoke from hundreds of wildfires in Canada is triggering air quality alerts throughout the US. Skylines from Maine to Maryland to Minnesota are gray and smoggy. And in some places, the air quality warnings include the warning to stay inside. We wanted to better understand what's happening here and why, so we called Peter de Carlo, an associate professor in the Department of Environmental Health and Engineering at Johns Hopkins University Varsity. Good morning, professor. Good morning. What is it about the conditions right now that have caused this round of wildfires to affect so many people so far away? Well, there's a couple of things. The season has been pretty dry already. And then the fact that we're getting hit in the US. Is because there's a couple of weather systems that are essentially channeling the smoke from those Canadian wildfires through Pennsylvania into the Mid Atlantic and the Northeast and kind of just dropping the smoke there. So what is it in this haze that makes it harmful? And I'm assuming it is harmful. It is. The levels outside right now in Baltimore are considered unhealthy. And most of that is due to what's called particulate matter, which are tiny particles, microscopic smaller than the width of your hair that can get into your lungs and impact your respiratory system, your cardiovascular system, and even your neurological your brain. What makes this particularly harmful? Is it the volume of particulant? Is it something in particular? What is it exactly? Can you just drill down on that a little bit more? Yeah. So the concentration of particulate matter I was looking at some of the monitors that we have was reaching levels of what are, in science, big 150 micrograms per meter cubed, which is more than ten times what the annual average should be and about four times higher than what you're supposed to have on a 24 hours average. And so the concentrations of these particles in the air are just much, much higher than we typically see. And exposure to those high levels can lead to a host of health problems. And who is most vulnerable? I noticed that in New York City, for example, they're canceling outdoor activities. And so here it is in the early days of summer, and they have to keep all the kids inside. So who tends to be vulnerable in a situation like this? It's the youngest. So children, obviously, whose bodies are still developing. The elderly, who are their bodies are more in decline and they're more susceptible to the health impacts of breathing, the poor air quality. And then people who have preexisting health conditions, people with respiratory conditions or heart conditions can be triggered by high levels of air pollution. Could this get worse? That's a good question. In some areas, it's much worse than others. And it just depends on kind of where the smoke is concentrated. I think New York has some of the higher concentrations right now, but that's going to change as that air moves away from the New York area. But over the course of the next few days, we will see different areas being hit at different times with the highest concentrations. I was going to ask you about more fires start burning. I don't expect the concentrations to go up too much higher. I was going to ask you how and you started to answer this, but how much longer could this last? Or forgive me if I'm asking you to speculate, but what do you think? Well, I think the fires are going to burn for a little bit longer, but the key for us in the US. Is the weather system changing. And so right now, it's kind of the weather systems that are pulling that air into our mid Atlantic and Northeast region. As those weather systems change and shift, we'll see that smoke going elsewhere and not impact us in this region as much. And so I think that's going to be the defining factor. And I think the next couple of days we're going to see a shift in that weather pattern and start to push the smoke away from where we are. And finally, with the impacts of climate change, we are seeing more wildfires. Will we be seeing more of these kinds of wide ranging air quality consequences or circumstances? I mean, that is one of the predictions for climate change. Looking into the future, the fire season is starting earlier and lasting longer, and we're seeing more frequent fires. So, yeah, this is probably something that we'll be seeing more frequently. This tends to be much more of an issue in the Western US. So the eastern US. Getting hit right now is a little bit new. But yeah, I think with climate change moving forward, this is something that is going to happen more frequently. That's Peter De Carlo, associate professor in the Department of Environmental Health and Engineering at Johns Hopkins University. Sergeant Carlo, thanks so much for joining us and sharing this expertise with us. Thank you for having me.",
|
|
1173
|
+
* "words": [
|
|
1174
|
+
* {
|
|
1175
|
+
* "text": "Smoke",
|
|
1176
|
+
* "start": 250,
|
|
1177
|
+
* "end": 650,
|
|
1178
|
+
* "confidence": 0.97465,
|
|
1179
|
+
* "speaker": null
|
|
1180
|
+
* },
|
|
1181
|
+
* {
|
|
1182
|
+
* "text": "from",
|
|
1183
|
+
* "start": 730,
|
|
1184
|
+
* "end": 1022,
|
|
1185
|
+
* "confidence": 0.99999,
|
|
1186
|
+
* "speaker": null
|
|
1187
|
+
* },
|
|
1188
|
+
* {
|
|
1189
|
+
* "text": "hundreds",
|
|
1190
|
+
* "start": 1076,
|
|
1191
|
+
* "end": 1418,
|
|
1192
|
+
* "confidence": 0.99844,
|
|
1193
|
+
* "speaker": null
|
|
1194
|
+
* },
|
|
1195
|
+
* {
|
|
1196
|
+
* "text": "of",
|
|
1197
|
+
* "start": 1434,
|
|
1198
|
+
* "end": 1614,
|
|
1199
|
+
* "confidence": 0.84,
|
|
1200
|
+
* "speaker": null
|
|
1201
|
+
* },
|
|
1202
|
+
* {
|
|
1203
|
+
* "text": "wildfires",
|
|
1204
|
+
* "start": 1652,
|
|
1205
|
+
* "end": 2346,
|
|
1206
|
+
* "confidence": 0.89572,
|
|
1207
|
+
* "speaker": null
|
|
1208
|
+
* },
|
|
1209
|
+
* {
|
|
1210
|
+
* "text": "in",
|
|
1211
|
+
* "start": 2378,
|
|
1212
|
+
* "end": 2526,
|
|
1213
|
+
* "confidence": 0.99994,
|
|
1214
|
+
* "speaker": null
|
|
1215
|
+
* },
|
|
1216
|
+
* {
|
|
1217
|
+
* "text": "Canada",
|
|
1218
|
+
* "start": 2548,
|
|
1219
|
+
* "end": 3130,
|
|
1220
|
+
* "confidence": 0.93953,
|
|
1221
|
+
* "speaker": null
|
|
1222
|
+
* },
|
|
1223
|
+
* {
|
|
1224
|
+
* "text": "is",
|
|
1225
|
+
* "start": 3210,
|
|
1226
|
+
* "end": 3454,
|
|
1227
|
+
* "confidence": 0.999,
|
|
1228
|
+
* "speaker": null
|
|
1229
|
+
* },
|
|
1230
|
+
* {
|
|
1231
|
+
* "text": "triggering",
|
|
1232
|
+
* "start": 3492,
|
|
1233
|
+
* "end": 3946,
|
|
1234
|
+
* "confidence": 0.74794,
|
|
1235
|
+
* "speaker": null
|
|
1236
|
+
* },
|
|
1237
|
+
* {
|
|
1238
|
+
* "text": "air",
|
|
1239
|
+
* "start": 3978,
|
|
1240
|
+
* "end": 4174,
|
|
1241
|
+
* "confidence": 1,
|
|
1242
|
+
* "speaker": null
|
|
1243
|
+
* },
|
|
1244
|
+
* {
|
|
1245
|
+
* "text": "quality",
|
|
1246
|
+
* "start": 4212,
|
|
1247
|
+
* "end": 4558,
|
|
1248
|
+
* "confidence": 0.88077,
|
|
1249
|
+
* "speaker": null
|
|
1250
|
+
* },
|
|
1251
|
+
* {
|
|
1252
|
+
* "text": "alerts",
|
|
1253
|
+
* "start": 4644,
|
|
1254
|
+
* "end": 5114,
|
|
1255
|
+
* "confidence": 0.94814,
|
|
1256
|
+
* "speaker": null
|
|
1257
|
+
* },
|
|
1258
|
+
* {
|
|
1259
|
+
* "text": "throughout",
|
|
1260
|
+
* "start": 5162,
|
|
1261
|
+
* "end": 5466,
|
|
1262
|
+
* "confidence": 0.99726,
|
|
1263
|
+
* "speaker": null
|
|
1264
|
+
* },
|
|
1265
|
+
* {
|
|
1266
|
+
* "text": "the",
|
|
1267
|
+
* "start": 5498,
|
|
1268
|
+
* "end": 5694,
|
|
1269
|
+
* "confidence": 0.79,
|
|
1270
|
+
* "speaker": null
|
|
1271
|
+
* },
|
|
1272
|
+
* {
|
|
1273
|
+
* "text": "US.",
|
|
1274
|
+
* "start": 5732,
|
|
1275
|
+
* "end": 6382,
|
|
1276
|
+
* "confidence": 0.89,
|
|
1277
|
+
* "speaker": null
|
|
1278
|
+
* }
|
|
1279
|
+
* ],
|
|
1280
|
+
* "utterances": [
|
|
1281
|
+
* {
|
|
1282
|
+
* "confidence": 0.9359033333333334,
|
|
1283
|
+
* "end": 26950,
|
|
1284
|
+
* "speaker": "A",
|
|
1285
|
+
* "start": 250,
|
|
1286
|
+
* "text": "Smoke from hundreds of wildfires in Canada is triggering air quality alerts throughout the US. Skylines from Maine to Maryland to Minnesota are gray and smoggy. And in some places, the air quality warnings include the warning to stay inside. We wanted to better understand what's happening here and why, so we called Peter de Carlo, an associate professor in the Department of Environmental Health and Engineering at Johns Hopkins University Varsity. Good morning, professor.",
|
|
1287
|
+
* "words": [
|
|
1288
|
+
* {
|
|
1289
|
+
* "text": "Smoke",
|
|
1290
|
+
* "start": 250,
|
|
1291
|
+
* "end": 650,
|
|
1292
|
+
* "confidence": 0.97503,
|
|
1293
|
+
* "speaker": "A"
|
|
1294
|
+
* },
|
|
1295
|
+
* {
|
|
1296
|
+
* "text": "from",
|
|
1297
|
+
* "start": 730,
|
|
1298
|
+
* "end": 1022,
|
|
1299
|
+
* "confidence": 0.99999,
|
|
1300
|
+
* "speaker": "A"
|
|
1301
|
+
* },
|
|
1302
|
+
* {
|
|
1303
|
+
* "text": "hundreds",
|
|
1304
|
+
* "start": 1076,
|
|
1305
|
+
* "end": 1418,
|
|
1306
|
+
* "confidence": 0.99843,
|
|
1307
|
+
* "speaker": "A"
|
|
1308
|
+
* },
|
|
1309
|
+
* {
|
|
1310
|
+
* "text": "of",
|
|
1311
|
+
* "start": 1434,
|
|
1312
|
+
* "end": 1614,
|
|
1313
|
+
* "confidence": 0.85,
|
|
1314
|
+
* "speaker": "A"
|
|
1315
|
+
* },
|
|
1316
|
+
* {
|
|
1317
|
+
* "text": "wildfires",
|
|
1318
|
+
* "start": 1652,
|
|
1319
|
+
* "end": 2346,
|
|
1320
|
+
* "confidence": 0.89657,
|
|
1321
|
+
* "speaker": "A"
|
|
1322
|
+
* },
|
|
1323
|
+
* {
|
|
1324
|
+
* "text": "in",
|
|
1325
|
+
* "start": 2378,
|
|
1326
|
+
* "end": 2526,
|
|
1327
|
+
* "confidence": 0.99994,
|
|
1328
|
+
* "speaker": "A"
|
|
1329
|
+
* },
|
|
1330
|
+
* {
|
|
1331
|
+
* "text": "Canada",
|
|
1332
|
+
* "start": 2548,
|
|
1333
|
+
* "end": 3130,
|
|
1334
|
+
* "confidence": 0.93864,
|
|
1335
|
+
* "speaker": "A"
|
|
1336
|
+
* },
|
|
1337
|
+
* {
|
|
1338
|
+
* "text": "is",
|
|
1339
|
+
* "start": 3210,
|
|
1340
|
+
* "end": 3454,
|
|
1341
|
+
* "confidence": 0.999,
|
|
1342
|
+
* "speaker": "A"
|
|
1343
|
+
* },
|
|
1344
|
+
* {
|
|
1345
|
+
* "text": "triggering",
|
|
1346
|
+
* "start": 3492,
|
|
1347
|
+
* "end": 3946,
|
|
1348
|
+
* "confidence": 0.75366,
|
|
1349
|
+
* "speaker": "A"
|
|
1350
|
+
* },
|
|
1351
|
+
* {
|
|
1352
|
+
* "text": "air",
|
|
1353
|
+
* "start": 3978,
|
|
1354
|
+
* "end": 4174,
|
|
1355
|
+
* "confidence": 1,
|
|
1356
|
+
* "speaker": "A"
|
|
1357
|
+
* },
|
|
1358
|
+
* {
|
|
1359
|
+
* "text": "quality",
|
|
1360
|
+
* "start": 4212,
|
|
1361
|
+
* "end": 4558,
|
|
1362
|
+
* "confidence": 0.87745,
|
|
1363
|
+
* "speaker": "A"
|
|
1364
|
+
* },
|
|
1365
|
+
* {
|
|
1366
|
+
* "text": "alerts",
|
|
1367
|
+
* "start": 4644,
|
|
1368
|
+
* "end": 5114,
|
|
1369
|
+
* "confidence": 0.94739,
|
|
1370
|
+
* "speaker": "A"
|
|
1371
|
+
* },
|
|
1372
|
+
* {
|
|
1373
|
+
* "text": "throughout",
|
|
1374
|
+
* "start": 5162,
|
|
1375
|
+
* "end": 5466,
|
|
1376
|
+
* "confidence": 0.99726,
|
|
1377
|
+
* "speaker": "A"
|
|
1378
|
+
* },
|
|
1379
|
+
* {
|
|
1380
|
+
* "text": "the",
|
|
1381
|
+
* "start": 5498,
|
|
1382
|
+
* "end": 5694,
|
|
1383
|
+
* "confidence": 0.79,
|
|
1384
|
+
* "speaker": "A"
|
|
1385
|
+
* },
|
|
1386
|
+
* {
|
|
1387
|
+
* "text": "US.",
|
|
1388
|
+
* "start": 5732,
|
|
1389
|
+
* "end": 6382,
|
|
1390
|
+
* "confidence": 0.88,
|
|
1391
|
+
* "speaker": "A"
|
|
1392
|
+
* }
|
|
1393
|
+
* ]
|
|
1394
|
+
* }
|
|
1395
|
+
* ],
|
|
1396
|
+
* "confidence": 0.9404651451800253,
|
|
1397
|
+
* "audio_duration": 281,
|
|
1398
|
+
* "punctuate": true,
|
|
1399
|
+
* "format_text": true,
|
|
1400
|
+
* "dual_channel": false,
|
|
1401
|
+
* "webhook_url": "https://your-webhook-url/path",
|
|
1402
|
+
* "webhook_status_code": 200,
|
|
1403
|
+
* "webhook_auth": true,
|
|
1404
|
+
* "webhook_auth_header_name": "webhook-secret",
|
|
1405
|
+
* "auto_highlights_result": {
|
|
1406
|
+
* "status": "success",
|
|
1407
|
+
* "results": [
|
|
1408
|
+
* {
|
|
1409
|
+
* "count": 1,
|
|
1410
|
+
* "rank": 0.08,
|
|
1411
|
+
* "text": "air quality alerts",
|
|
1412
|
+
* "timestamps": [
|
|
1413
|
+
* {
|
|
1414
|
+
* "start": 3978,
|
|
1415
|
+
* "end": 5114
|
|
1416
|
+
* }
|
|
1417
|
+
* ]
|
|
1418
|
+
* },
|
|
1419
|
+
* {
|
|
1420
|
+
* "count": 1,
|
|
1421
|
+
* "rank": 0.08,
|
|
1422
|
+
* "text": "wide ranging air quality consequences",
|
|
1423
|
+
* "timestamps": [
|
|
1424
|
+
* {
|
|
1425
|
+
* "start": 235388,
|
|
1426
|
+
* "end": 238694
|
|
1427
|
+
* }
|
|
1428
|
+
* ]
|
|
1429
|
+
* },
|
|
1430
|
+
* {
|
|
1431
|
+
* "count": 1,
|
|
1432
|
+
* "rank": 0.07,
|
|
1433
|
+
* "text": "more wildfires",
|
|
1434
|
+
* "timestamps": [
|
|
1435
|
+
* {
|
|
1436
|
+
* "start": 230972,
|
|
1437
|
+
* "end": 232354
|
|
1438
|
+
* }
|
|
1439
|
+
* ]
|
|
1440
|
+
* },
|
|
1441
|
+
* {
|
|
1442
|
+
* "count": 1,
|
|
1443
|
+
* "rank": 0.07,
|
|
1444
|
+
* "text": "air pollution",
|
|
1445
|
+
* "timestamps": [
|
|
1446
|
+
* {
|
|
1447
|
+
* "start": 156004,
|
|
1448
|
+
* "end": 156910
|
|
1449
|
+
* }
|
|
1450
|
+
* ]
|
|
1451
|
+
* },
|
|
1452
|
+
* {
|
|
1453
|
+
* "count": 3,
|
|
1454
|
+
* "rank": 0.07,
|
|
1455
|
+
* "text": "weather systems",
|
|
1456
|
+
* "timestamps": [
|
|
1457
|
+
* {
|
|
1458
|
+
* "start": 47344,
|
|
1459
|
+
* "end": 47958
|
|
1460
|
+
* },
|
|
1461
|
+
* {
|
|
1462
|
+
* "start": 205268,
|
|
1463
|
+
* "end": 205818
|
|
1464
|
+
* },
|
|
1465
|
+
* {
|
|
1466
|
+
* "start": 211588,
|
|
1467
|
+
* "end": 213434
|
|
1468
|
+
* }
|
|
1469
|
+
* ]
|
|
1470
|
+
* },
|
|
1471
|
+
* {
|
|
1472
|
+
* "count": 2,
|
|
1473
|
+
* "rank": 0.06,
|
|
1474
|
+
* "text": "high levels",
|
|
1475
|
+
* "timestamps": [
|
|
1476
|
+
* {
|
|
1477
|
+
* "start": 121128,
|
|
1478
|
+
* "end": 121646
|
|
1479
|
+
* },
|
|
1480
|
+
* {
|
|
1481
|
+
* "start": 155412,
|
|
1482
|
+
* "end": 155866
|
|
1483
|
+
* }
|
|
1484
|
+
* ]
|
|
1485
|
+
* },
|
|
1486
|
+
* {
|
|
1487
|
+
* "count": 1,
|
|
1488
|
+
* "rank": 0.06,
|
|
1489
|
+
* "text": "health conditions",
|
|
1490
|
+
* "timestamps": [
|
|
1491
|
+
* {
|
|
1492
|
+
* "start": 152138,
|
|
1493
|
+
* "end": 152666
|
|
1494
|
+
* }
|
|
1495
|
+
* ]
|
|
1496
|
+
* },
|
|
1497
|
+
* {
|
|
1498
|
+
* "count": 2,
|
|
1499
|
+
* "rank": 0.06,
|
|
1500
|
+
* "text": "Peter de Carlo",
|
|
1501
|
+
* "timestamps": [
|
|
1502
|
+
* {
|
|
1503
|
+
* "start": 18948,
|
|
1504
|
+
* "end": 19930
|
|
1505
|
+
* },
|
|
1506
|
+
* {
|
|
1507
|
+
* "start": 268298,
|
|
1508
|
+
* "end": 269194
|
|
1509
|
+
* }
|
|
1510
|
+
* ]
|
|
1511
|
+
* },
|
|
1512
|
+
* {
|
|
1513
|
+
* "count": 1,
|
|
1514
|
+
* "rank": 0.06,
|
|
1515
|
+
* "text": "New York City",
|
|
1516
|
+
* "timestamps": [
|
|
1517
|
+
* {
|
|
1518
|
+
* "start": 125768,
|
|
1519
|
+
* "end": 126274
|
|
1520
|
+
* }
|
|
1521
|
+
* ]
|
|
1522
|
+
* },
|
|
1523
|
+
* {
|
|
1524
|
+
* "count": 1,
|
|
1525
|
+
* "rank": 0.05,
|
|
1526
|
+
* "text": "respiratory conditions",
|
|
1527
|
+
* "timestamps": [
|
|
1528
|
+
* {
|
|
1529
|
+
* "start": 152964,
|
|
1530
|
+
* "end": 153786
|
|
1531
|
+
* }
|
|
1532
|
+
* ]
|
|
1533
|
+
* },
|
|
1534
|
+
* {
|
|
1535
|
+
* "count": 3,
|
|
1536
|
+
* "rank": 0.05,
|
|
1537
|
+
* "text": "New York",
|
|
1538
|
+
* "timestamps": [
|
|
1539
|
+
* {
|
|
1540
|
+
* "start": 125768,
|
|
1541
|
+
* "end": 126034
|
|
1542
|
+
* },
|
|
1543
|
+
* {
|
|
1544
|
+
* "start": 171448,
|
|
1545
|
+
* "end": 171938
|
|
1546
|
+
* },
|
|
1547
|
+
* {
|
|
1548
|
+
* "start": 176008,
|
|
1549
|
+
* "end": 176322
|
|
1550
|
+
* }
|
|
1551
|
+
* ]
|
|
1552
|
+
* },
|
|
1553
|
+
* {
|
|
1554
|
+
* "count": 3,
|
|
1555
|
+
* "rank": 0.05,
|
|
1556
|
+
* "text": "climate change",
|
|
1557
|
+
* "timestamps": [
|
|
1558
|
+
* {
|
|
1559
|
+
* "start": 229548,
|
|
1560
|
+
* "end": 230230
|
|
1561
|
+
* },
|
|
1562
|
+
* {
|
|
1563
|
+
* "start": 244576,
|
|
1564
|
+
* "end": 245162
|
|
1565
|
+
* },
|
|
1566
|
+
* {
|
|
1567
|
+
* "start": 263348,
|
|
1568
|
+
* "end": 263950
|
|
1569
|
+
* }
|
|
1570
|
+
* ]
|
|
1571
|
+
* },
|
|
1572
|
+
* {
|
|
1573
|
+
* "count": 1,
|
|
1574
|
+
* "rank": 0.05,
|
|
1575
|
+
* "text": "Johns Hopkins University Varsity",
|
|
1576
|
+
* "timestamps": [
|
|
1577
|
+
* {
|
|
1578
|
+
* "start": 23972,
|
|
1579
|
+
* "end": 25490
|
|
1580
|
+
* }
|
|
1581
|
+
* ]
|
|
1582
|
+
* },
|
|
1583
|
+
* {
|
|
1584
|
+
* "count": 1,
|
|
1585
|
+
* "rank": 0.05,
|
|
1586
|
+
* "text": "heart conditions",
|
|
1587
|
+
* "timestamps": [
|
|
1588
|
+
* {
|
|
1589
|
+
* "start": 153988,
|
|
1590
|
+
* "end": 154506
|
|
1591
|
+
* }
|
|
1592
|
+
* ]
|
|
1593
|
+
* },
|
|
1594
|
+
* {
|
|
1595
|
+
* "count": 1,
|
|
1596
|
+
* "rank": 0.05,
|
|
1597
|
+
* "text": "air quality warnings",
|
|
1598
|
+
* "timestamps": [
|
|
1599
|
+
* {
|
|
1600
|
+
* "start": 12308,
|
|
1601
|
+
* "end": 13434
|
|
1602
|
+
* }
|
|
1603
|
+
* ]
|
|
1604
|
+
* }
|
|
1605
|
+
* ]
|
|
1606
|
+
* },
|
|
1607
|
+
* "auto_highlights": true,
|
|
1608
|
+
* "audio_start_from": 10,
|
|
1609
|
+
* "audio_end_at": 280,
|
|
1610
|
+
* "word_boost": [
|
|
1611
|
+
* "aws",
|
|
1612
|
+
* "azure",
|
|
1613
|
+
* "google cloud"
|
|
1614
|
+
* ],
|
|
1615
|
+
* "boost_param": "high",
|
|
1616
|
+
* "filter_profanity": true,
|
|
1617
|
+
* "redact_pii": true,
|
|
1618
|
+
* "redact_pii_audio": true,
|
|
1619
|
+
* "redact_pii_audio_quality": "mp3",
|
|
1620
|
+
* "redact_pii_policies": [
|
|
1621
|
+
* "us_social_security_number",
|
|
1622
|
+
* "credit_card_number"
|
|
1623
|
+
* ],
|
|
1624
|
+
* "redact_pii_sub": "hash",
|
|
1625
|
+
* "speaker_labels": true,
|
|
1626
|
+
* "content_safety": true,
|
|
1627
|
+
* "iab_categories": true,
|
|
1628
|
+
* "content_safety_labels": {
|
|
1629
|
+
* "status": "success",
|
|
1630
|
+
* "results": [
|
|
1631
|
+
* {
|
|
1632
|
+
* "text": "Smoke from hundreds of wildfires in Canada is triggering air quality alerts throughout the US. Skylines from Maine to Maryland to Minnesota are gray and smoggy. And in some places, the air quality warnings include the warning to stay inside. We wanted to better understand what's happening here and why, so we called Peter de Carlo, an associate professor in the Department of Environmental Health and Engineering at Johns Hopkins University Varsity. Good morning, professor. Good morning.",
|
|
1633
|
+
* "labels": [
|
|
1634
|
+
* {
|
|
1635
|
+
* "label": "disasters",
|
|
1636
|
+
* "confidence": 0.8142836093902588,
|
|
1637
|
+
* "severity": 0.4093044400215149
|
|
1638
|
+
* }
|
|
1639
|
+
* ],
|
|
1640
|
+
* "sentences_idx_start": 0,
|
|
1641
|
+
* "sentences_idx_end": 5,
|
|
1642
|
+
* "timestamp": {
|
|
1643
|
+
* "start": 250,
|
|
1644
|
+
* "end": 28840
|
|
1645
|
+
* }
|
|
1646
|
+
* }
|
|
1647
|
+
* ],
|
|
1648
|
+
* "summary": {
|
|
1649
|
+
* "disasters": 0.9940800441842205,
|
|
1650
|
+
* "health_issues": 0.9216489289040967
|
|
1651
|
+
* },
|
|
1652
|
+
* "severity_score_summary": {
|
|
1653
|
+
* "disasters": {
|
|
1654
|
+
* "low": 0.5733263024656846,
|
|
1655
|
+
* "medium": 0.42667369753431533,
|
|
1656
|
+
* "high": 0
|
|
1657
|
+
* },
|
|
1658
|
+
* "health_issues": {
|
|
1659
|
+
* "low": 0.22863814977924785,
|
|
1660
|
+
* "medium": 0.45014154926938227,
|
|
1661
|
+
* "high": 0.32122030095136983
|
|
1662
|
+
* }
|
|
1663
|
+
* }
|
|
1664
|
+
* },
|
|
1665
|
+
* "iab_categories_result": {
|
|
1666
|
+
* "status": "success",
|
|
1667
|
+
* "results": [
|
|
1668
|
+
* {
|
|
1669
|
+
* "text": "Smoke from hundreds of wildfires in Canada is triggering air quality alerts throughout the US. Skylines from Maine to Maryland to Minnesota are gray and smoggy. And in some places, the air quality warnings include the warning to stay inside. We wanted to better understand what's happening here and why, so we called Peter de Carlo, an associate professor in the Department of Environmental Health and Engineering at Johns Hopkins University Varsity. Good morning, professor. Good morning.",
|
|
1670
|
+
* "labels": [
|
|
1671
|
+
* {
|
|
1672
|
+
* "relevance": 0.988274097442627,
|
|
1673
|
+
* "label": "Home&Garden>IndoorEnvironmentalQuality"
|
|
1674
|
+
* },
|
|
1675
|
+
* {
|
|
1676
|
+
* "relevance": 0.5821335911750793,
|
|
1677
|
+
* "label": "NewsAndPolitics>Weather"
|
|
1678
|
+
* },
|
|
1679
|
+
* {
|
|
1680
|
+
* "relevance": 0.0042327106930315495,
|
|
1681
|
+
* "label": "MedicalHealth>DiseasesAndConditions>LungAndRespiratoryHealth"
|
|
1682
|
+
* },
|
|
1683
|
+
* {
|
|
1684
|
+
* "relevance": 0.0033971222583204508,
|
|
1685
|
+
* "label": "NewsAndPolitics>Disasters"
|
|
1686
|
+
* },
|
|
1687
|
+
* {
|
|
1688
|
+
* "relevance": 0.002469958271831274,
|
|
1689
|
+
* "label": "BusinessAndFinance>Business>GreenSolutions"
|
|
1690
|
+
* },
|
|
1691
|
+
* {
|
|
1692
|
+
* "relevance": 0.0014376690378412604,
|
|
1693
|
+
* "label": "MedicalHealth>DiseasesAndConditions>Cancer"
|
|
1694
|
+
* },
|
|
1695
|
+
* {
|
|
1696
|
+
* "relevance": 0.0014294233405962586,
|
|
1697
|
+
* "label": "Science>Environment"
|
|
1698
|
+
* },
|
|
1699
|
+
* {
|
|
1700
|
+
* "relevance": 0.001234519761055708,
|
|
1701
|
+
* "label": "Travel>TravelLocations>PolarTravel"
|
|
1702
|
+
* },
|
|
1703
|
+
* {
|
|
1704
|
+
* "relevance": 0.0010231725173071027,
|
|
1705
|
+
* "label": "MedicalHealth>DiseasesAndConditions>ColdAndFlu"
|
|
1706
|
+
* },
|
|
1707
|
+
* {
|
|
1708
|
+
* "relevance": 0.0007445293595083058,
|
|
1709
|
+
* "label": "BusinessAndFinance>Industries>PowerAndEnergyIndustry"
|
|
1710
|
+
* }
|
|
1711
|
+
* ],
|
|
1712
|
+
* "timestamp": {
|
|
1713
|
+
* "start": 250,
|
|
1714
|
+
* "end": 28840
|
|
1715
|
+
* }
|
|
1716
|
+
* }
|
|
1717
|
+
* ],
|
|
1718
|
+
* "summary": {
|
|
1719
|
+
* "NewsAndPolitics>Weather": 1,
|
|
1720
|
+
* "Home&Garden>IndoorEnvironmentalQuality": 0.9043831825256348,
|
|
1721
|
+
* "Science>Environment": 0.16117265820503235,
|
|
1722
|
+
* "BusinessAndFinance>Industries>EnvironmentalServicesIndustry": 0.14393523335456848,
|
|
1723
|
+
* "MedicalHealth>DiseasesAndConditions>LungAndRespiratoryHealth": 0.11401086300611496,
|
|
1724
|
+
* "BusinessAndFinance>Business>GreenSolutions": 0.06348437070846558,
|
|
1725
|
+
* "NewsAndPolitics>Disasters": 0.05041387677192688,
|
|
1726
|
+
* "Travel>TravelLocations>PolarTravel": 0.01308488193899393,
|
|
1727
|
+
* "HealthyLiving": 0.008222488686442375,
|
|
1728
|
+
* "MedicalHealth>DiseasesAndConditions>ColdAndFlu": 0.0022315620444715023,
|
|
1729
|
+
* "MedicalHealth>DiseasesAndConditions>HeartAndCardiovascularDiseases": 0.00213034451007843,
|
|
1730
|
+
* "HealthyLiving>Wellness>SmokingCessation": 0.001540527562610805,
|
|
1731
|
+
* "MedicalHealth>DiseasesAndConditions>Injuries": 0.0013950627762824297,
|
|
1732
|
+
* "BusinessAndFinance>Industries>PowerAndEnergyIndustry": 0.0012570273829624057,
|
|
1733
|
+
* "MedicalHealth>DiseasesAndConditions>Cancer": 0.001097781932912767,
|
|
1734
|
+
* "MedicalHealth>DiseasesAndConditions>Allergies": 0.0010148967849090695,
|
|
1735
|
+
* "MedicalHealth>DiseasesAndConditions>MentalHealth": 0.000717321818228811,
|
|
1736
|
+
* "Style&Fashion>PersonalCare>DeodorantAndAntiperspirant": 0.0006022014422342181,
|
|
1737
|
+
* "Technology&Computing>Computing>ComputerNetworking": 0.0005461975233629346,
|
|
1738
|
+
* "MedicalHealth>DiseasesAndConditions>Injuries>FirstAid": 0.0004885646631009877
|
|
1739
|
+
* }
|
|
1740
|
+
* },
|
|
1741
|
+
* "language_detection": false,
|
|
1742
|
+
* "custom_spelling": null,
|
|
1743
|
+
* "throttled": null,
|
|
1744
|
+
* "auto_chapters": true,
|
|
1745
|
+
* "summarization": true,
|
|
1746
|
+
* "summary_type": "bullets",
|
|
1747
|
+
* "summary_model": "informative",
|
|
1748
|
+
* "custom_topics": true,
|
|
1749
|
+
* "topics": [],
|
|
1750
|
+
* "speech_threshold": 0.5,
|
|
1751
|
+
* "disfluencies": false,
|
|
1752
|
+
* "sentiment_analysis": true,
|
|
1753
|
+
* "chapters": [
|
|
1754
|
+
* {
|
|
1755
|
+
* "summary": "Smoke from hundreds of wildfires in Canada is triggering air quality alerts throughout the US. Skylines from Maine to Maryland to Minnesota are gray and smoggy. In some places, the air quality warnings include the warning to stay inside.",
|
|
1756
|
+
* "gist": "Smoggy air quality alerts across US",
|
|
1757
|
+
* "headline": "Smoke from hundreds of wildfires in Canada is triggering air quality alerts across US",
|
|
1758
|
+
* "start": 250,
|
|
1759
|
+
* "end": 28840
|
|
1760
|
+
* },
|
|
1761
|
+
* {
|
|
1762
|
+
* "summary": "Air pollution levels in Baltimore are considered unhealthy. Exposure to high levels can lead to a host of health problems. With climate change, we are seeing more wildfires. Will we be seeing more of these kinds of wide ranging air quality consequences?",
|
|
1763
|
+
* "gist": "What is it about the conditions right now that have caused this round",
|
|
1764
|
+
* "headline": "High particulate matter in wildfire smoke can lead to serious health problems",
|
|
1765
|
+
* "start": 29610,
|
|
1766
|
+
* "end": 280340
|
|
1767
|
+
* }
|
|
1768
|
+
* ],
|
|
1769
|
+
* "sentiment_analysis_results": null,
|
|
1770
|
+
* "entity_detection": true,
|
|
1771
|
+
* "entities": [
|
|
1772
|
+
* {
|
|
1773
|
+
* "entity_type": "location",
|
|
1774
|
+
* "text": "Canada",
|
|
1775
|
+
* "start": 2548,
|
|
1776
|
+
* "end": 3130
|
|
1777
|
+
* },
|
|
1778
|
+
* {
|
|
1779
|
+
* "entity_type": "location",
|
|
1780
|
+
* "text": "the US",
|
|
1781
|
+
* "start": 5498,
|
|
1782
|
+
* "end": 6382
|
|
1783
|
+
* },
|
|
1784
|
+
* {
|
|
1785
|
+
* "entity_type": "location",
|
|
1786
|
+
* "text": "Maine",
|
|
1787
|
+
* "start": 7492,
|
|
1788
|
+
* "end": 7914
|
|
1789
|
+
* },
|
|
1790
|
+
* {
|
|
1791
|
+
* "entity_type": "location",
|
|
1792
|
+
* "text": "Maryland",
|
|
1793
|
+
* "start": 8212,
|
|
1794
|
+
* "end": 8634
|
|
1795
|
+
* },
|
|
1796
|
+
* {
|
|
1797
|
+
* "entity_type": "location",
|
|
1798
|
+
* "text": "Minnesota",
|
|
1799
|
+
* "start": 8932,
|
|
1800
|
+
* "end": 9578
|
|
1801
|
+
* },
|
|
1802
|
+
* {
|
|
1803
|
+
* "entity_type": "person_name",
|
|
1804
|
+
* "text": "Peter de Carlo",
|
|
1805
|
+
* "start": 18948,
|
|
1806
|
+
* "end": 19930
|
|
1807
|
+
* },
|
|
1808
|
+
* {
|
|
1809
|
+
* "entity_type": "occupation",
|
|
1810
|
+
* "text": "associate professor",
|
|
1811
|
+
* "start": 20292,
|
|
1812
|
+
* "end": 21194
|
|
1813
|
+
* },
|
|
1814
|
+
* {
|
|
1815
|
+
* "entity_type": "organization",
|
|
1816
|
+
* "text": "Department of Environmental Health and Engineering",
|
|
1817
|
+
* "start": 21508,
|
|
1818
|
+
* "end": 23706
|
|
1819
|
+
* },
|
|
1820
|
+
* {
|
|
1821
|
+
* "entity_type": "organization",
|
|
1822
|
+
* "text": "Johns Hopkins University Varsity",
|
|
1823
|
+
* "start": 23972,
|
|
1824
|
+
* "end": 25490
|
|
1825
|
+
* },
|
|
1826
|
+
* {
|
|
1827
|
+
* "entity_type": "occupation",
|
|
1828
|
+
* "text": "professor",
|
|
1829
|
+
* "start": 26076,
|
|
1830
|
+
* "end": 26950
|
|
1831
|
+
* },
|
|
1832
|
+
* {
|
|
1833
|
+
* "entity_type": "location",
|
|
1834
|
+
* "text": "the US",
|
|
1835
|
+
* "start": 45184,
|
|
1836
|
+
* "end": 45898
|
|
1837
|
+
* },
|
|
1838
|
+
* {
|
|
1839
|
+
* "entity_type": "nationality",
|
|
1840
|
+
* "text": "Canadian",
|
|
1841
|
+
* "start": 49728,
|
|
1842
|
+
* "end": 50086
|
|
1843
|
+
* }
|
|
1844
|
+
* ],
|
|
1845
|
+
* "summary": "- Smoke from hundreds of wildfires in Canada is triggering air quality alerts throughout the US. Skylines from Maine to Maryland to Minnesota are gray and smoggy. In some places, the air quality warnings include the warning to stay inside.\\n- Air pollution levels in Baltimore are considered unhealthy. Exposure to high levels can lead to a host of health problems. With climate change, we are seeing more wildfires. Will we be seeing more of these kinds of wide ranging air quality consequences?",
|
|
1846
|
+
* "speakers_expected": 2
|
|
1847
|
+
* }
|
|
1848
|
+
*/
|
|
359
1849
|
export type Transcript = {
|
|
360
1850
|
/**
|
|
361
1851
|
* @deprecated
|
|
@@ -373,13 +1863,13 @@ export type Transcript = {
|
|
|
373
1863
|
audio_start_from?: number | null;
|
|
374
1864
|
/** @description The URL of the media that was transcribed */
|
|
375
1865
|
audio_url: string;
|
|
376
|
-
/** @description Whether [Auto Chapters](https://www.assemblyai.com/docs/
|
|
1866
|
+
/** @description Whether [Auto Chapters](https://www.assemblyai.com/docs/models/auto-chapters) is enabled, can be true or false */
|
|
377
1867
|
auto_chapters?: boolean | null;
|
|
378
1868
|
/** @description Whether Key Phrases is enabled, either true or false */
|
|
379
1869
|
auto_highlights: boolean;
|
|
380
1870
|
/**
|
|
381
1871
|
* @description An array of results for the Key Phrases model, if it is enabled.
|
|
382
|
-
* See [Key phrases](https://www.assemblyai.com/docs/
|
|
1872
|
+
* See [Key phrases](https://www.assemblyai.com/docs/models/key-phrases) for more information.
|
|
383
1873
|
*/
|
|
384
1874
|
auto_highlights_result?: AutoHighlightsResult | null;
|
|
385
1875
|
/** @description The word boost parameter value */
|
|
@@ -391,11 +1881,11 @@ export type Transcript = {
|
|
|
391
1881
|
* @description The confidence score for the transcript, between 0.0 (low confidence) and 1.0 (high confidence)
|
|
392
1882
|
*/
|
|
393
1883
|
confidence?: number | null;
|
|
394
|
-
/** @description Whether [Content Moderation](https://www.assemblyai.com/docs/
|
|
1884
|
+
/** @description Whether [Content Moderation](https://www.assemblyai.com/docs/models/content-moderation) is enabled, can be true or false */
|
|
395
1885
|
content_safety?: boolean | null;
|
|
396
1886
|
/**
|
|
397
1887
|
* @description An array of results for the Content Moderation model, if it is enabled.
|
|
398
|
-
* See [Content moderation](https://www.assemblyai.com/docs/
|
|
1888
|
+
* See [Content moderation](https://www.assemblyai.com/docs/models/content-moderation) for more information.
|
|
399
1889
|
*/
|
|
400
1890
|
content_safety_labels?: ContentSafetyLabelsResult | null;
|
|
401
1891
|
/** @description Customize how words are spelled and formatted using to and from values */
|
|
@@ -404,37 +1894,40 @@ export type Transcript = {
|
|
|
404
1894
|
custom_topics?: boolean | null;
|
|
405
1895
|
/** @description Transcribe Filler Words, like "umm", in your media file; can be true or false */
|
|
406
1896
|
disfluencies?: boolean | null;
|
|
407
|
-
/** @description Whether [Dual channel transcription](https://www.assemblyai.com/docs/
|
|
1897
|
+
/** @description Whether [Dual channel transcription](https://www.assemblyai.com/docs/models/speech-recognition#dual-channel-transcription) was enabled in the transcription request, either true or false */
|
|
408
1898
|
dual_channel?: boolean | null;
|
|
409
1899
|
/**
|
|
410
1900
|
* @description An array of results for the Entity Detection model, if it is enabled.
|
|
411
|
-
* See [Entity detection](https://www.assemblyai.com/docs/
|
|
1901
|
+
* See [Entity detection](https://www.assemblyai.com/docs/models/entity-detection) for more information.
|
|
412
1902
|
*/
|
|
413
1903
|
entities?: Entity[] | null;
|
|
414
|
-
/** @description Whether [Entity Detection](https://www.assemblyai.com/docs/
|
|
1904
|
+
/** @description Whether [Entity Detection](https://www.assemblyai.com/docs/models/entity-detection) is enabled, can be true or false */
|
|
415
1905
|
entity_detection?: boolean | null;
|
|
416
1906
|
/** @description Error message of why the transcript failed */
|
|
417
1907
|
error?: string;
|
|
418
|
-
/** @description Whether [Profanity Filtering](https://www.assemblyai.com/docs/
|
|
1908
|
+
/** @description Whether [Profanity Filtering](https://www.assemblyai.com/docs/models/speech-recognition#profanity-filtering) is enabled, either true or false */
|
|
419
1909
|
filter_profanity?: boolean | null;
|
|
420
1910
|
/** @description Whether Text Formatting is enabled, either true or false */
|
|
421
1911
|
format_text?: boolean | null;
|
|
422
|
-
/** @description Whether [Topic Detection](https://www.assemblyai.com/docs/
|
|
1912
|
+
/** @description Whether [Topic Detection](https://www.assemblyai.com/docs/models/topic-detection) is enabled, can be true or false */
|
|
423
1913
|
iab_categories?: boolean | null;
|
|
424
1914
|
/**
|
|
425
1915
|
* @description The result of the Topic Detection model, if it is enabled.
|
|
426
|
-
* See [Topic Detection](https://www.assemblyai.com/docs/
|
|
1916
|
+
* See [Topic Detection](https://www.assemblyai.com/docs/models/topic-detection) for more information.
|
|
427
1917
|
*/
|
|
428
1918
|
iab_categories_result?: TopicDetectionModelResult | null;
|
|
429
|
-
/**
|
|
1919
|
+
/**
|
|
1920
|
+
* Format: uuid
|
|
1921
|
+
* @description The unique identifier of your transcript
|
|
1922
|
+
*/
|
|
430
1923
|
id: string;
|
|
431
1924
|
/**
|
|
432
1925
|
* @description The language of your audio file.
|
|
433
|
-
* Possible values are found in [Supported Languages](https://www.assemblyai.com/docs/
|
|
1926
|
+
* Possible values are found in [Supported Languages](https://www.assemblyai.com/docs/concepts/supported-languages).
|
|
434
1927
|
* The default value is 'en_us'.
|
|
435
1928
|
*/
|
|
436
1929
|
language_code?: TranscriptLanguageCode;
|
|
437
|
-
/** @description Whether [Automatic language detection](https://www.assemblyai.com/docs/
|
|
1930
|
+
/** @description Whether [Automatic language detection](https://www.assemblyai.com/docs/models/speech-recognition#automatic-language-detection) is enabled, either true or false */
|
|
438
1931
|
language_detection?: boolean | null;
|
|
439
1932
|
/**
|
|
440
1933
|
* @deprecated
|
|
@@ -443,35 +1936,35 @@ export type Transcript = {
|
|
|
443
1936
|
language_model: string;
|
|
444
1937
|
/** @description Whether Automatic Punctuation is enabled, either true or false */
|
|
445
1938
|
punctuate?: boolean | null;
|
|
446
|
-
/** @description Whether [PII Redaction](https://www.assemblyai.com/docs/
|
|
1939
|
+
/** @description Whether [PII Redaction](https://www.assemblyai.com/docs/models/pii-redaction) is enabled, either true or false */
|
|
447
1940
|
redact_pii: boolean;
|
|
448
1941
|
/**
|
|
449
1942
|
* @description Whether a redacted version of the audio file was generated,
|
|
450
|
-
* either true or false. See [PII redaction](https://www.assemblyai.com/docs/
|
|
1943
|
+
* either true or false. See [PII redaction](https://www.assemblyai.com/docs/models/pii-redaction) for more information.
|
|
451
1944
|
*/
|
|
452
1945
|
redact_pii_audio?: boolean | null;
|
|
453
1946
|
/**
|
|
454
1947
|
* @description The audio quality of the PII-redacted audio file, if redact_pii_audio is enabled.
|
|
455
|
-
* See [PII redaction](https://www.assemblyai.com/docs/
|
|
1948
|
+
* See [PII redaction](https://www.assemblyai.com/docs/models/pii-redaction) for more information.
|
|
456
1949
|
*/
|
|
457
1950
|
redact_pii_audio_quality?: string | null;
|
|
458
1951
|
/**
|
|
459
1952
|
* @description The list of PII Redaction policies that were enabled, if PII Redaction is enabled.
|
|
460
|
-
* See [PII redaction](https://www.assemblyai.com/docs/
|
|
1953
|
+
* See [PII redaction](https://www.assemblyai.com/docs/models/pii-redaction) for more information.
|
|
461
1954
|
*/
|
|
462
1955
|
redact_pii_policies?: PiiPolicy[] | null;
|
|
463
|
-
/** @description The replacement logic for detected PII, can be "entity_type" or "hash". See [PII redaction](https://www.assemblyai.com/docs/
|
|
1956
|
+
/** @description The replacement logic for detected PII, can be "entity_type" or "hash". See [PII redaction](https://www.assemblyai.com/docs/models/pii-redaction) for more details. */
|
|
464
1957
|
redact_pii_sub?: SubstitutionPolicy;
|
|
465
|
-
/** @description Whether [Sentiment Analysis](https://www.assemblyai.com/docs/
|
|
1958
|
+
/** @description Whether [Sentiment Analysis](https://www.assemblyai.com/docs/models/sentiment-analysis) is enabled, can be true or false */
|
|
466
1959
|
sentiment_analysis?: boolean | null;
|
|
467
1960
|
/**
|
|
468
1961
|
* @description An array of results for the Sentiment Analysis model, if it is enabled.
|
|
469
|
-
* See [Sentiment analysis](https://www.assemblyai.com/docs/
|
|
1962
|
+
* See [Sentiment analysis](https://www.assemblyai.com/docs/models/sentiment-analysis) for more information.
|
|
470
1963
|
*/
|
|
471
1964
|
sentiment_analysis_results?: SentimentAnalysisResult[] | null;
|
|
472
|
-
/** @description Whether [Speaker diarization](https://www.assemblyai.com/docs/
|
|
1965
|
+
/** @description Whether [Speaker diarization](https://www.assemblyai.com/docs/models/speaker-diarization) is enabled, can be true or false */
|
|
473
1966
|
speaker_labels?: boolean | null;
|
|
474
|
-
/** @description Tell the speaker label model how many speakers it should attempt to identify, up to 10. See [Speaker diarization](https://www.assemblyai.com/docs/
|
|
1967
|
+
/** @description Tell the speaker label model how many speakers it should attempt to identify, up to 10. See [Speaker diarization](https://www.assemblyai.com/docs/models/speaker-diarization) for more details. */
|
|
475
1968
|
speakers_expected?: number | null;
|
|
476
1969
|
/**
|
|
477
1970
|
* Format: float
|
|
@@ -486,16 +1979,16 @@ export type Transcript = {
|
|
|
486
1979
|
speed_boost?: boolean | null;
|
|
487
1980
|
/** @description The status of your transcript. Possible values are queued, processing, completed, or error. */
|
|
488
1981
|
status: TranscriptStatus;
|
|
489
|
-
/** @description Whether [Summarization](https://www.assemblyai.com/docs/
|
|
1982
|
+
/** @description Whether [Summarization](https://www.assemblyai.com/docs/models/summarization) is enabled, either true or false */
|
|
490
1983
|
summarization: boolean;
|
|
491
|
-
/** @description The generated summary of the media file, if [Summarization](https://www.assemblyai.com/docs/
|
|
1984
|
+
/** @description The generated summary of the media file, if [Summarization](https://www.assemblyai.com/docs/models/summarization) is enabled */
|
|
492
1985
|
summary?: string | null;
|
|
493
1986
|
/**
|
|
494
1987
|
* @description The Summarization model used to generate the summary,
|
|
495
|
-
* if [Summarization](https://www.assemblyai.com/docs/
|
|
1988
|
+
* if [Summarization](https://www.assemblyai.com/docs/models/summarization) is enabled
|
|
496
1989
|
*/
|
|
497
1990
|
summary_model?: string | null;
|
|
498
|
-
/** @description The type of summary generated, if [Summarization](https://www.assemblyai.com/docs/
|
|
1991
|
+
/** @description The type of summary generated, if [Summarization](https://www.assemblyai.com/docs/models/summarization) is enabled */
|
|
499
1992
|
summary_type?: string | null;
|
|
500
1993
|
/** @description The textual transcript of your media file */
|
|
501
1994
|
text?: string | null;
|
|
@@ -505,7 +1998,7 @@ export type Transcript = {
|
|
|
505
1998
|
topics?: string[];
|
|
506
1999
|
/**
|
|
507
2000
|
* @description When dual_channel or speaker_labels is enabled, a list of turn-by-turn utterance objects.
|
|
508
|
-
* See [Speaker diarization](https://www.assemblyai.com/docs/
|
|
2001
|
+
* See [Speaker diarization](https://www.assemblyai.com/docs/models/speaker-diarization) for more information.
|
|
509
2002
|
*/
|
|
510
2003
|
utterances?: TranscriptUtterance[] | null;
|
|
511
2004
|
/** @description Whether webhook authentication details were provided */
|
|
@@ -520,7 +2013,7 @@ export type Transcript = {
|
|
|
520
2013
|
word_boost?: string[];
|
|
521
2014
|
/**
|
|
522
2015
|
* @description An array of temporally-sequential word objects, one for each word in the transcript.
|
|
523
|
-
* See [Speech recognition](https://www.assemblyai.com/docs/
|
|
2016
|
+
* See [Speech recognition](https://www.assemblyai.com/docs/models/speech-recognition) for more information.
|
|
524
2017
|
*/
|
|
525
2018
|
words?: TranscriptWord[] | null;
|
|
526
2019
|
};
|
|
@@ -529,7 +2022,15 @@ export type Transcript = {
|
|
|
529
2022
|
* @enum {string}
|
|
530
2023
|
*/
|
|
531
2024
|
export type TranscriptBoostParam = "low" | "default" | "high";
|
|
532
|
-
/**
|
|
2025
|
+
/**
|
|
2026
|
+
* @description Object containing words or phrases to replace, and the word or phrase to replace with
|
|
2027
|
+
* @example {
|
|
2028
|
+
* "from": [
|
|
2029
|
+
* "dicarlo"
|
|
2030
|
+
* ],
|
|
2031
|
+
* "to": "Decarlo"
|
|
2032
|
+
* }
|
|
2033
|
+
*/
|
|
533
2034
|
export type TranscriptCustomSpelling = {
|
|
534
2035
|
/** @description Words or phrases to replace */
|
|
535
2036
|
from: string[];
|
|
@@ -537,38 +2038,123 @@ export type TranscriptCustomSpelling = {
|
|
|
537
2038
|
to: string;
|
|
538
2039
|
};
|
|
539
2040
|
/**
|
|
540
|
-
* @description The language of your audio file. Possible values are found in [Supported Languages](https://www.assemblyai.com/docs/
|
|
2041
|
+
* @description The language of your audio file. Possible values are found in [Supported Languages](https://www.assemblyai.com/docs/concepts/supported-languages).
|
|
541
2042
|
* The default value is 'en_us'.
|
|
542
2043
|
*
|
|
543
2044
|
* @default en_us
|
|
544
2045
|
* @enum {string}
|
|
545
2046
|
*/
|
|
546
2047
|
export type TranscriptLanguageCode = "en" | "en_au" | "en_uk" | "en_us" | "es" | "fr" | "de" | "it" | "pt" | "nl" | "hi" | "ja" | "zh" | "fi" | "ko" | "pl" | "ru" | "tr" | "uk" | "vi";
|
|
2048
|
+
/**
|
|
2049
|
+
* @example {
|
|
2050
|
+
* "page_details": {
|
|
2051
|
+
* "limit": 2,
|
|
2052
|
+
* "result_count": 2,
|
|
2053
|
+
* "current_url": "https://api.assemblyai.com/v2/transcript?limit=2",
|
|
2054
|
+
* "prev_url": "https://api.assemblyai.com/v2/transcript?limit=2&before_id=62npeahu2b-a8ea-4112-854c-69542c20d90c",
|
|
2055
|
+
* "next_url": "https://api.assemblyai.com/v2/transcript?limit=2&after_id=62nfw3mlar-01ad-4631-92f6-629929496eed"
|
|
2056
|
+
* },
|
|
2057
|
+
* "transcripts": [
|
|
2058
|
+
* {
|
|
2059
|
+
* "id": "9ea68fd3-f953-42c1-9742-976c447fb463",
|
|
2060
|
+
* "resource_url": "https://api.assemblyai.com/v2/transcript/9ea68fd3-f953-42c1-9742-976c447fb463",
|
|
2061
|
+
* "status": "completed",
|
|
2062
|
+
* "created": "2023-11-02T21:49:25.586965",
|
|
2063
|
+
* "completed": "2023-11-02T21:49:25.586965",
|
|
2064
|
+
* "audio_url": "https://github.com/AssemblyAI-Examples/audio-examples/raw/main/20230607_me_canadian_wildfires.mp3"
|
|
2065
|
+
* },
|
|
2066
|
+
* {
|
|
2067
|
+
* "id": "d5a3d302-066e-43fb-b63b-8f57baf185db",
|
|
2068
|
+
* "resource_url": "https://api.assemblyai.com/v2/transcript/d5a3d302-066e-43fb-b63b-8f57baf185db",
|
|
2069
|
+
* "status": "completed",
|
|
2070
|
+
* "created": "2023-11-02T21:49:25.586965",
|
|
2071
|
+
* "completed": "2023-11-02T21:49:25.586965",
|
|
2072
|
+
* "audio_url": "http://deleted_by_user"
|
|
2073
|
+
* }
|
|
2074
|
+
* ]
|
|
2075
|
+
* }
|
|
2076
|
+
*/
|
|
547
2077
|
export type TranscriptList = {
|
|
548
2078
|
page_details: PageDetails;
|
|
549
2079
|
transcripts: TranscriptListItem[];
|
|
550
2080
|
};
|
|
2081
|
+
/**
|
|
2082
|
+
* @example {
|
|
2083
|
+
* "id": "9ea68fd3-f953-42c1-9742-976c447fb463",
|
|
2084
|
+
* "resource_url": "https://api.assemblyai.com/v2/transcript/9ea68fd3-f953-42c1-9742-976c447fb463",
|
|
2085
|
+
* "status": "completed",
|
|
2086
|
+
* "created": "2023-11-02T21:49:25.586965",
|
|
2087
|
+
* "completed": "2023-11-02T21:49:25.586965",
|
|
2088
|
+
* "audio_url": "https://github.com/AssemblyAI-Examples/audio-examples/raw/main/20230607_me_canadian_wildfires.mp3"
|
|
2089
|
+
* }
|
|
2090
|
+
*/
|
|
551
2091
|
export type TranscriptListItem = {
|
|
552
2092
|
audio_url: string;
|
|
553
2093
|
completed?: Date;
|
|
554
2094
|
created: Date;
|
|
2095
|
+
/** Format: uuid */
|
|
555
2096
|
id: string;
|
|
556
2097
|
resource_url: string;
|
|
557
2098
|
status: TranscriptStatus;
|
|
558
2099
|
};
|
|
559
|
-
/**
|
|
2100
|
+
/**
|
|
2101
|
+
* @description The parameters for creating a transcript
|
|
2102
|
+
* @example {
|
|
2103
|
+
* "language_code": "en_us",
|
|
2104
|
+
* "punctuate": true,
|
|
2105
|
+
* "format_text": true,
|
|
2106
|
+
* "dual_channel": true,
|
|
2107
|
+
* "webhook_url": "https://your-webhook-url/path",
|
|
2108
|
+
* "webhook_auth_header_name": "webhook-secret",
|
|
2109
|
+
* "webhook_auth_header_value": "webhook-secret-value",
|
|
2110
|
+
* "auto_highlights": true,
|
|
2111
|
+
* "audio_start_from": 10,
|
|
2112
|
+
* "audio_end_at": 280,
|
|
2113
|
+
* "word_boost": [
|
|
2114
|
+
* "aws",
|
|
2115
|
+
* "azure",
|
|
2116
|
+
* "google cloud"
|
|
2117
|
+
* ],
|
|
2118
|
+
* "boost_param": "high",
|
|
2119
|
+
* "filter_profanity": true,
|
|
2120
|
+
* "redact_pii": true,
|
|
2121
|
+
* "redact_pii_audio": true,
|
|
2122
|
+
* "redact_pii_audio_quality": "mp3",
|
|
2123
|
+
* "redact_pii_policies": [
|
|
2124
|
+
* "us_social_security_number",
|
|
2125
|
+
* "credit_card_number"
|
|
2126
|
+
* ],
|
|
2127
|
+
* "redact_pii_sub": "hash",
|
|
2128
|
+
* "speaker_labels": true,
|
|
2129
|
+
* "speakers_expected": 2,
|
|
2130
|
+
* "content_safety": true,
|
|
2131
|
+
* "iab_categories": true,
|
|
2132
|
+
* "language_detection": false,
|
|
2133
|
+
* "custom_spelling": [],
|
|
2134
|
+
* "disfluencies": false,
|
|
2135
|
+
* "sentiment_analysis": true,
|
|
2136
|
+
* "auto_chapters": true,
|
|
2137
|
+
* "entity_detection": true,
|
|
2138
|
+
* "speech_threshold": 0.5,
|
|
2139
|
+
* "summarization": true,
|
|
2140
|
+
* "summary_model": "informative",
|
|
2141
|
+
* "summary_type": "bullets",
|
|
2142
|
+
* "custom_topics": true,
|
|
2143
|
+
* "topics": []
|
|
2144
|
+
* }
|
|
2145
|
+
*/
|
|
560
2146
|
export type TranscriptOptionalParams = {
|
|
561
2147
|
/** @description The point in time, in milliseconds, to stop transcribing in your media file */
|
|
562
2148
|
audio_end_at?: number;
|
|
563
2149
|
/** @description The point in time, in milliseconds, to begin transcribing in your media file */
|
|
564
2150
|
audio_start_from?: number;
|
|
565
|
-
/** @description Enable [Auto Chapters](https://www.assemblyai.com/docs/
|
|
2151
|
+
/** @description Enable [Auto Chapters](https://www.assemblyai.com/docs/models/auto-chapters), can be true or false */
|
|
566
2152
|
auto_chapters?: boolean;
|
|
567
2153
|
/** @description Whether Key Phrases is enabled, either true or false */
|
|
568
2154
|
auto_highlights?: boolean;
|
|
569
2155
|
/** @description The word boost parameter value */
|
|
570
2156
|
boost_param?: TranscriptBoostParam;
|
|
571
|
-
/** @description Enable [Content Moderation](https://www.assemblyai.com/docs/
|
|
2157
|
+
/** @description Enable [Content Moderation](https://www.assemblyai.com/docs/models/content-moderation), can be true or false */
|
|
572
2158
|
content_safety?: boolean;
|
|
573
2159
|
/** @description Customize how words are spelled and formatted using to and from values */
|
|
574
2160
|
custom_spelling?: TranscriptCustomSpelling[];
|
|
@@ -576,44 +2162,44 @@ export type TranscriptOptionalParams = {
|
|
|
576
2162
|
custom_topics?: boolean;
|
|
577
2163
|
/** @description Transcribe Filler Words, like "umm", in your media file; can be true or false */
|
|
578
2164
|
disfluencies?: boolean;
|
|
579
|
-
/** @description Enable [Dual Channel](https://assemblyai.com/docs/
|
|
2165
|
+
/** @description Enable [Dual Channel](https://www.assemblyai.com/docs/models/speech-recognition#dual-channel-transcription) transcription, can be true or false. */
|
|
580
2166
|
dual_channel?: boolean;
|
|
581
|
-
/** @description Enable [Entity Detection](https://www.assemblyai.com/docs/
|
|
2167
|
+
/** @description Enable [Entity Detection](https://www.assemblyai.com/docs/models/entity-detection), can be true or false */
|
|
582
2168
|
entity_detection?: boolean;
|
|
583
2169
|
/** @description Filter profanity from the transcribed text, can be true or false */
|
|
584
2170
|
filter_profanity?: boolean;
|
|
585
2171
|
/** @description Enable Text Formatting, can be true or false */
|
|
586
2172
|
format_text?: boolean;
|
|
587
|
-
/** @description Enable [Topic Detection](https://www.assemblyai.com/docs/
|
|
2173
|
+
/** @description Enable [Topic Detection](https://www.assemblyai.com/docs/models/topic-detection), can be true or false */
|
|
588
2174
|
iab_categories?: boolean;
|
|
589
2175
|
/**
|
|
590
|
-
* @description The language of your audio file. Possible values are found in [Supported Languages](https://www.assemblyai.com/docs/
|
|
2176
|
+
* @description The language of your audio file. Possible values are found in [Supported Languages](https://www.assemblyai.com/docs/concepts/supported-languages).
|
|
591
2177
|
* The default value is 'en_us'.
|
|
592
2178
|
*/
|
|
593
2179
|
language_code?: TranscriptLanguageCode | null;
|
|
594
|
-
/** @description Whether [Automatic language detection](https://www.assemblyai.com/docs/
|
|
2180
|
+
/** @description Whether [Automatic language detection](https://www.assemblyai.com/docs/models/speech-recognition#automatic-language-detection) was enabled in the transcription request, either true or false. */
|
|
595
2181
|
language_detection?: boolean;
|
|
596
2182
|
/** @description Enable Automatic Punctuation, can be true or false */
|
|
597
2183
|
punctuate?: boolean;
|
|
598
2184
|
/** @description Redact PII from the transcribed text using the Redact PII model, can be true or false */
|
|
599
2185
|
redact_pii?: boolean;
|
|
600
|
-
/** @description Generate a copy of the original media file with spoken PII "beeped" out, can be true or false. See [PII redaction](https://www.assemblyai.com/docs/
|
|
2186
|
+
/** @description Generate a copy of the original media file with spoken PII "beeped" out, can be true or false. See [PII redaction](https://www.assemblyai.com/docs/models/pii-redaction) for more details. */
|
|
601
2187
|
redact_pii_audio?: boolean;
|
|
602
2188
|
/**
|
|
603
|
-
* @description Controls the filetype of the audio created by redact_pii_audio. Currently supports mp3 (default) and wav. See [PII redaction](https://www.assemblyai.com/docs/
|
|
2189
|
+
* @description Controls the filetype of the audio created by redact_pii_audio. Currently supports mp3 (default) and wav. See [PII redaction](https://www.assemblyai.com/docs/models/pii-redaction) for more details.
|
|
604
2190
|
* @default mp3
|
|
605
2191
|
*/
|
|
606
2192
|
redact_pii_audio_quality?: string;
|
|
607
|
-
/** @description The list of PII Redaction policies to enable. See [PII redaction](https://www.assemblyai.com/docs/
|
|
2193
|
+
/** @description The list of PII Redaction policies to enable. See [PII redaction](https://www.assemblyai.com/docs/models/pii-redaction) for more details. */
|
|
608
2194
|
redact_pii_policies?: PiiPolicy[];
|
|
609
|
-
/** @description The replacement logic for detected PII, can be "entity_type" or "hash". See [PII redaction](https://www.assemblyai.com/docs/
|
|
2195
|
+
/** @description The replacement logic for detected PII, can be "entity_type" or "hash". See [PII redaction](https://www.assemblyai.com/docs/models/pii-redaction) for more details. */
|
|
610
2196
|
redact_pii_sub?: SubstitutionPolicy | null;
|
|
611
|
-
/** @description Enable [Sentiment Analysis](https://www.assemblyai.com/docs/
|
|
2197
|
+
/** @description Enable [Sentiment Analysis](https://www.assemblyai.com/docs/models/sentiment-analysis), can be true or false */
|
|
612
2198
|
sentiment_analysis?: boolean;
|
|
613
|
-
/** @description Enable [Speaker diarization](https://www.assemblyai.com/docs/
|
|
2199
|
+
/** @description Enable [Speaker diarization](https://www.assemblyai.com/docs/models/speaker-diarization), can be true or false */
|
|
614
2200
|
speaker_labels?: boolean;
|
|
615
2201
|
/**
|
|
616
|
-
* @description
|
|
2202
|
+
* @description Tells the speaker label model how many speakers it should attempt to identify, up to 10. See [Speaker diarization](https://www.assemblyai.com/docs/models/speaker-diarization) for more details.
|
|
617
2203
|
* @default null
|
|
618
2204
|
*/
|
|
619
2205
|
speakers_expected?: number | null;
|
|
@@ -625,7 +2211,7 @@ export type TranscriptOptionalParams = {
|
|
|
625
2211
|
* @default null
|
|
626
2212
|
*/
|
|
627
2213
|
speech_threshold?: number | null;
|
|
628
|
-
/** @description Enable [Summarization](https://www.assemblyai.com/docs/
|
|
2214
|
+
/** @description Enable [Summarization](https://www.assemblyai.com/docs/models/summarization), can be true or false */
|
|
629
2215
|
summarization?: boolean;
|
|
630
2216
|
/**
|
|
631
2217
|
* @description The model to summarize the transcript
|
|
@@ -654,10 +2240,50 @@ export type TranscriptOptionalParams = {
|
|
|
654
2240
|
/** @description The list of custom vocabulary to boost transcription probability for */
|
|
655
2241
|
word_boost?: string[];
|
|
656
2242
|
};
|
|
2243
|
+
/**
|
|
2244
|
+
* @example {
|
|
2245
|
+
* "text": "Smoke from hundreds of wildfires in Canada is triggering air quality alerts throughout the US. Skylines from Maine to Maryland to Minnesota are gray and smoggy. And in some places, the air quality warnings include the warning to stay inside. We wanted to better understand what's happening here and why, so we called Peter Decarlo, an associate professor in the Department of Environmental Health and Engineering at Johns Hopkins University. Good morning, professor.",
|
|
2246
|
+
* "start": 250,
|
|
2247
|
+
* "end": 26950,
|
|
2248
|
+
* "confidence": 0.73033,
|
|
2249
|
+
* "words": [
|
|
2250
|
+
* {
|
|
2251
|
+
* "text": "Smoke",
|
|
2252
|
+
* "start": 250,
|
|
2253
|
+
* "end": 650,
|
|
2254
|
+
* "confidence": 0.73033,
|
|
2255
|
+
* "speaker": null
|
|
2256
|
+
* },
|
|
2257
|
+
* {
|
|
2258
|
+
* "text": "from",
|
|
2259
|
+
* "start": 730,
|
|
2260
|
+
* "end": 1022,
|
|
2261
|
+
* "confidence": 1,
|
|
2262
|
+
* "speaker": null
|
|
2263
|
+
* },
|
|
2264
|
+
* {
|
|
2265
|
+
* "text": "hundreds",
|
|
2266
|
+
* "start": 1076,
|
|
2267
|
+
* "end": 1466,
|
|
2268
|
+
* "confidence": 0.99992,
|
|
2269
|
+
* "speaker": null
|
|
2270
|
+
* },
|
|
2271
|
+
* {
|
|
2272
|
+
* "text": "of",
|
|
2273
|
+
* "start": 1498,
|
|
2274
|
+
* "end": 1646,
|
|
2275
|
+
* "confidence": 1,
|
|
2276
|
+
* "speaker": null
|
|
2277
|
+
* }
|
|
2278
|
+
* ]
|
|
2279
|
+
* }
|
|
2280
|
+
*/
|
|
657
2281
|
export type TranscriptParagraph = {
|
|
658
2282
|
/** Format: double */
|
|
659
2283
|
confidence: number;
|
|
660
2284
|
end: number;
|
|
2285
|
+
/** @description The speaker of the sentence if [Speaker Diarization](https://www.assemblyai.com/docs/models/speaker-diarization) is enabled, else null */
|
|
2286
|
+
speaker?: string | null;
|
|
661
2287
|
start: number;
|
|
662
2288
|
text: string;
|
|
663
2289
|
words: TranscriptWord[];
|
|
@@ -667,10 +2293,51 @@ export type TranscriptParams = TranscriptOptionalParams & {
|
|
|
667
2293
|
/** @description The URL of the audio or video file to transcribe. */
|
|
668
2294
|
audio_url: string;
|
|
669
2295
|
};
|
|
2296
|
+
/**
|
|
2297
|
+
* @example {
|
|
2298
|
+
* "text": "Smoke from hundreds of wildfires in Canada is triggering air quality alerts throughout the US.",
|
|
2299
|
+
* "start": 250,
|
|
2300
|
+
* "end": 6350,
|
|
2301
|
+
* "confidence": 0.72412,
|
|
2302
|
+
* "words": [
|
|
2303
|
+
* {
|
|
2304
|
+
* "text": "Smoke",
|
|
2305
|
+
* "start": 250,
|
|
2306
|
+
* "end": 650,
|
|
2307
|
+
* "confidence": 0.72412,
|
|
2308
|
+
* "speaker": null
|
|
2309
|
+
* },
|
|
2310
|
+
* {
|
|
2311
|
+
* "text": "from",
|
|
2312
|
+
* "start": 730,
|
|
2313
|
+
* "end": 1022,
|
|
2314
|
+
* "confidence": 0.99996,
|
|
2315
|
+
* "speaker": null
|
|
2316
|
+
* },
|
|
2317
|
+
* {
|
|
2318
|
+
* "text": "hundreds",
|
|
2319
|
+
* "start": 1076,
|
|
2320
|
+
* "end": 1466,
|
|
2321
|
+
* "confidence": 0.99992,
|
|
2322
|
+
* "speaker": null
|
|
2323
|
+
* },
|
|
2324
|
+
* {
|
|
2325
|
+
* "text": "of",
|
|
2326
|
+
* "start": 1498,
|
|
2327
|
+
* "end": 1646,
|
|
2328
|
+
* "confidence": 1,
|
|
2329
|
+
* "speaker": null
|
|
2330
|
+
* }
|
|
2331
|
+
* ],
|
|
2332
|
+
* "speaker": null
|
|
2333
|
+
* }
|
|
2334
|
+
*/
|
|
670
2335
|
export type TranscriptSentence = {
|
|
671
2336
|
/** Format: double */
|
|
672
2337
|
confidence: number;
|
|
673
2338
|
end: number;
|
|
2339
|
+
/** @description The speaker of the sentence if [Speaker Diarization](https://www.assemblyai.com/docs/models/speaker-diarization) is enabled, else null */
|
|
2340
|
+
speaker?: string | null;
|
|
674
2341
|
start: number;
|
|
675
2342
|
text: string;
|
|
676
2343
|
words: TranscriptWord[];
|
|
@@ -680,6 +2347,122 @@ export type TranscriptSentence = {
|
|
|
680
2347
|
* @enum {string}
|
|
681
2348
|
*/
|
|
682
2349
|
export type TranscriptStatus = "queued" | "processing" | "completed" | "error";
|
|
2350
|
+
/**
|
|
2351
|
+
* @example {
|
|
2352
|
+
* "confidence": 0.9359033333333334,
|
|
2353
|
+
* "end": 26950,
|
|
2354
|
+
* "speaker": "A",
|
|
2355
|
+
* "start": 250,
|
|
2356
|
+
* "text": "Smoke from hundreds of wildfires in Canada is triggering air quality alerts throughout the US. Skylines from Maine to Maryland to Minnesota are gray and smoggy. And in some places, the air quality warnings include the warning to stay inside. We wanted to better understand what's happening here and why, so we called Peter de Carlo, an associate professor in the Department of Environmental Health and Engineering at Johns Hopkins University Varsity. Good morning, professor.",
|
|
2357
|
+
* "words": [
|
|
2358
|
+
* {
|
|
2359
|
+
* "text": "Smoke",
|
|
2360
|
+
* "start": 250,
|
|
2361
|
+
* "end": 650,
|
|
2362
|
+
* "confidence": 0.97503,
|
|
2363
|
+
* "speaker": "A"
|
|
2364
|
+
* },
|
|
2365
|
+
* {
|
|
2366
|
+
* "text": "from",
|
|
2367
|
+
* "start": 730,
|
|
2368
|
+
* "end": 1022,
|
|
2369
|
+
* "confidence": 0.99999,
|
|
2370
|
+
* "speaker": "A"
|
|
2371
|
+
* },
|
|
2372
|
+
* {
|
|
2373
|
+
* "text": "hundreds",
|
|
2374
|
+
* "start": 1076,
|
|
2375
|
+
* "end": 1418,
|
|
2376
|
+
* "confidence": 0.99843,
|
|
2377
|
+
* "speaker": "A"
|
|
2378
|
+
* },
|
|
2379
|
+
* {
|
|
2380
|
+
* "text": "of",
|
|
2381
|
+
* "start": 1434,
|
|
2382
|
+
* "end": 1614,
|
|
2383
|
+
* "confidence": 0.85,
|
|
2384
|
+
* "speaker": "A"
|
|
2385
|
+
* },
|
|
2386
|
+
* {
|
|
2387
|
+
* "text": "wildfires",
|
|
2388
|
+
* "start": 1652,
|
|
2389
|
+
* "end": 2346,
|
|
2390
|
+
* "confidence": 0.89657,
|
|
2391
|
+
* "speaker": "A"
|
|
2392
|
+
* },
|
|
2393
|
+
* {
|
|
2394
|
+
* "text": "in",
|
|
2395
|
+
* "start": 2378,
|
|
2396
|
+
* "end": 2526,
|
|
2397
|
+
* "confidence": 0.99994,
|
|
2398
|
+
* "speaker": "A"
|
|
2399
|
+
* },
|
|
2400
|
+
* {
|
|
2401
|
+
* "text": "Canada",
|
|
2402
|
+
* "start": 2548,
|
|
2403
|
+
* "end": 3130,
|
|
2404
|
+
* "confidence": 0.93864,
|
|
2405
|
+
* "speaker": "A"
|
|
2406
|
+
* },
|
|
2407
|
+
* {
|
|
2408
|
+
* "text": "is",
|
|
2409
|
+
* "start": 3210,
|
|
2410
|
+
* "end": 3454,
|
|
2411
|
+
* "confidence": 0.999,
|
|
2412
|
+
* "speaker": "A"
|
|
2413
|
+
* },
|
|
2414
|
+
* {
|
|
2415
|
+
* "text": "triggering",
|
|
2416
|
+
* "start": 3492,
|
|
2417
|
+
* "end": 3946,
|
|
2418
|
+
* "confidence": 0.75366,
|
|
2419
|
+
* "speaker": "A"
|
|
2420
|
+
* },
|
|
2421
|
+
* {
|
|
2422
|
+
* "text": "air",
|
|
2423
|
+
* "start": 3978,
|
|
2424
|
+
* "end": 4174,
|
|
2425
|
+
* "confidence": 1,
|
|
2426
|
+
* "speaker": "A"
|
|
2427
|
+
* },
|
|
2428
|
+
* {
|
|
2429
|
+
* "text": "quality",
|
|
2430
|
+
* "start": 4212,
|
|
2431
|
+
* "end": 4558,
|
|
2432
|
+
* "confidence": 0.87745,
|
|
2433
|
+
* "speaker": "A"
|
|
2434
|
+
* },
|
|
2435
|
+
* {
|
|
2436
|
+
* "text": "alerts",
|
|
2437
|
+
* "start": 4644,
|
|
2438
|
+
* "end": 5114,
|
|
2439
|
+
* "confidence": 0.94739,
|
|
2440
|
+
* "speaker": "A"
|
|
2441
|
+
* },
|
|
2442
|
+
* {
|
|
2443
|
+
* "text": "throughout",
|
|
2444
|
+
* "start": 5162,
|
|
2445
|
+
* "end": 5466,
|
|
2446
|
+
* "confidence": 0.99726,
|
|
2447
|
+
* "speaker": "A"
|
|
2448
|
+
* },
|
|
2449
|
+
* {
|
|
2450
|
+
* "text": "the",
|
|
2451
|
+
* "start": 5498,
|
|
2452
|
+
* "end": 5694,
|
|
2453
|
+
* "confidence": 0.79,
|
|
2454
|
+
* "speaker": "A"
|
|
2455
|
+
* },
|
|
2456
|
+
* {
|
|
2457
|
+
* "text": "US.",
|
|
2458
|
+
* "start": 5732,
|
|
2459
|
+
* "end": 6382,
|
|
2460
|
+
* "confidence": 0.88,
|
|
2461
|
+
* "speaker": "A"
|
|
2462
|
+
* }
|
|
2463
|
+
* ]
|
|
2464
|
+
* }
|
|
2465
|
+
*/
|
|
683
2466
|
export type TranscriptUtterance = {
|
|
684
2467
|
/**
|
|
685
2468
|
* Format: double
|
|
@@ -697,18 +2480,73 @@ export type TranscriptUtterance = {
|
|
|
697
2480
|
/** @description The words in the utterance. */
|
|
698
2481
|
words: TranscriptWord[];
|
|
699
2482
|
};
|
|
2483
|
+
/**
|
|
2484
|
+
* @example {
|
|
2485
|
+
* "text": "Smoke",
|
|
2486
|
+
* "start": 250,
|
|
2487
|
+
* "end": 650,
|
|
2488
|
+
* "confidence": 0.97465,
|
|
2489
|
+
* "speaker": null
|
|
2490
|
+
* }
|
|
2491
|
+
*/
|
|
700
2492
|
export type TranscriptWord = {
|
|
701
2493
|
/** Format: double */
|
|
702
2494
|
confidence: number;
|
|
703
2495
|
end: number;
|
|
2496
|
+
/** @description The speaker of the sentence if [Speaker Diarization](https://www.assemblyai.com/docs/models/speaker-diarization) is enabled, else null */
|
|
704
2497
|
speaker?: string | null;
|
|
705
2498
|
start: number;
|
|
706
2499
|
text: string;
|
|
707
2500
|
};
|
|
2501
|
+
/**
|
|
2502
|
+
* @example {
|
|
2503
|
+
* "upload_url": "https://cdn.assemblyai.com/upload/f756988d-47e2-4ca3-96ce-04bb168f8f2a"
|
|
2504
|
+
* }
|
|
2505
|
+
*/
|
|
708
2506
|
export type UploadedFile = {
|
|
709
2507
|
/** @description A URL that points to your audio file, accessible only by AssemblyAI's servers */
|
|
710
2508
|
upload_url: string;
|
|
711
2509
|
};
|
|
2510
|
+
/**
|
|
2511
|
+
* @example {
|
|
2512
|
+
* "text": "smoke",
|
|
2513
|
+
* "count": 6,
|
|
2514
|
+
* "timestamps": [
|
|
2515
|
+
* [
|
|
2516
|
+
* 250,
|
|
2517
|
+
* 650
|
|
2518
|
+
* ],
|
|
2519
|
+
* [
|
|
2520
|
+
* 49168,
|
|
2521
|
+
* 49398
|
|
2522
|
+
* ],
|
|
2523
|
+
* [
|
|
2524
|
+
* 55284,
|
|
2525
|
+
* 55594
|
|
2526
|
+
* ],
|
|
2527
|
+
* [
|
|
2528
|
+
* 168888,
|
|
2529
|
+
* 169118
|
|
2530
|
+
* ],
|
|
2531
|
+
* [
|
|
2532
|
+
* 215108,
|
|
2533
|
+
* 215386
|
|
2534
|
+
* ],
|
|
2535
|
+
* [
|
|
2536
|
+
* 225944,
|
|
2537
|
+
* 226170
|
|
2538
|
+
* ]
|
|
2539
|
+
* ],
|
|
2540
|
+
* "indexes": [
|
|
2541
|
+
* 0,
|
|
2542
|
+
* 136,
|
|
2543
|
+
* 156,
|
|
2544
|
+
* 486,
|
|
2545
|
+
* 652,
|
|
2546
|
+
* 698
|
|
2547
|
+
* ]
|
|
2548
|
+
* }
|
|
2549
|
+
*/
|
|
712
2550
|
export type WordSearchMatch = {
|
|
713
2551
|
/** @description The total amount of times the word is in the transcript */
|
|
714
2552
|
count: number;
|
|
@@ -719,14 +2557,97 @@ export type WordSearchMatch = {
|
|
|
719
2557
|
/** @description An array of timestamps */
|
|
720
2558
|
timestamps: WordSearchTimestamp[];
|
|
721
2559
|
};
|
|
2560
|
+
/**
|
|
2561
|
+
* @example {
|
|
2562
|
+
* "id": "d5a3d302-066e-43fb-b63b-8f57baf185db",
|
|
2563
|
+
* "total_count": 10,
|
|
2564
|
+
* "matches": [
|
|
2565
|
+
* {
|
|
2566
|
+
* "text": "smoke",
|
|
2567
|
+
* "count": 6,
|
|
2568
|
+
* "timestamps": [
|
|
2569
|
+
* [
|
|
2570
|
+
* 250,
|
|
2571
|
+
* 650
|
|
2572
|
+
* ],
|
|
2573
|
+
* [
|
|
2574
|
+
* 49168,
|
|
2575
|
+
* 49398
|
|
2576
|
+
* ],
|
|
2577
|
+
* [
|
|
2578
|
+
* 55284,
|
|
2579
|
+
* 55594
|
|
2580
|
+
* ],
|
|
2581
|
+
* [
|
|
2582
|
+
* 168888,
|
|
2583
|
+
* 169118
|
|
2584
|
+
* ],
|
|
2585
|
+
* [
|
|
2586
|
+
* 215108,
|
|
2587
|
+
* 215386
|
|
2588
|
+
* ],
|
|
2589
|
+
* [
|
|
2590
|
+
* 225944,
|
|
2591
|
+
* 226170
|
|
2592
|
+
* ]
|
|
2593
|
+
* ],
|
|
2594
|
+
* "indexes": [
|
|
2595
|
+
* 0,
|
|
2596
|
+
* 136,
|
|
2597
|
+
* 156,
|
|
2598
|
+
* 486,
|
|
2599
|
+
* 652,
|
|
2600
|
+
* 698
|
|
2601
|
+
* ]
|
|
2602
|
+
* },
|
|
2603
|
+
* {
|
|
2604
|
+
* "text": "wildfires",
|
|
2605
|
+
* "count": 4,
|
|
2606
|
+
* "timestamps": [
|
|
2607
|
+
* [
|
|
2608
|
+
* 1668,
|
|
2609
|
+
* 2346
|
|
2610
|
+
* ],
|
|
2611
|
+
* [
|
|
2612
|
+
* 33852,
|
|
2613
|
+
* 34546
|
|
2614
|
+
* ],
|
|
2615
|
+
* [
|
|
2616
|
+
* 50118,
|
|
2617
|
+
* 51110
|
|
2618
|
+
* ],
|
|
2619
|
+
* [
|
|
2620
|
+
* 231356,
|
|
2621
|
+
* 232354
|
|
2622
|
+
* ]
|
|
2623
|
+
* ],
|
|
2624
|
+
* "indexes": [
|
|
2625
|
+
* 4,
|
|
2626
|
+
* 90,
|
|
2627
|
+
* 140,
|
|
2628
|
+
* 716
|
|
2629
|
+
* ]
|
|
2630
|
+
* }
|
|
2631
|
+
* ]
|
|
2632
|
+
* }
|
|
2633
|
+
*/
|
|
722
2634
|
export type WordSearchResponse = {
|
|
723
|
-
/**
|
|
2635
|
+
/**
|
|
2636
|
+
* Format: uuid
|
|
2637
|
+
* @description The ID of the transcript
|
|
2638
|
+
*/
|
|
724
2639
|
id: string;
|
|
725
2640
|
/** @description The matches of the search */
|
|
726
2641
|
matches: WordSearchMatch[];
|
|
727
2642
|
/** @description The total count of all matched instances. For e.g., word 1 matched 2 times, and word 2 matched 3 times, `total_count` will equal 5. */
|
|
728
2643
|
total_count: number;
|
|
729
2644
|
};
|
|
730
|
-
/**
|
|
2645
|
+
/**
|
|
2646
|
+
* @description An array of timestamps structured as [`start_time`, `end_time`] in milliseconds
|
|
2647
|
+
* @example [
|
|
2648
|
+
* 250,
|
|
2649
|
+
* 650
|
|
2650
|
+
* ]
|
|
2651
|
+
*/
|
|
731
2652
|
export type WordSearchTimestamp = number[];
|
|
732
2653
|
export {};
|