assemblyai 4.3.1 → 4.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +12 -0
- package/README.md +161 -86
- package/dist/assemblyai.umd.js +62 -56
- package/dist/assemblyai.umd.min.js +1 -1
- package/dist/bun.mjs +57 -51
- package/dist/deno.mjs +57 -51
- package/dist/index.cjs +62 -56
- package/dist/index.mjs +62 -56
- package/dist/node.cjs +57 -51
- package/dist/node.mjs +57 -51
- package/dist/services/base.d.ts +1 -1
- package/dist/services/files/index.d.ts +2 -2
- package/dist/services/index.d.ts +1 -1
- package/dist/services/lemur/index.d.ts +1 -1
- package/dist/services/realtime/service.d.ts +2 -2
- package/dist/services/transcripts/index.d.ts +26 -26
- package/dist/types/asyncapi.generated.d.ts +60 -39
- package/dist/types/openapi.generated.d.ts +722 -329
- package/dist/types/services/index.d.ts +0 -1
- package/dist/types/transcripts/index.d.ts +14 -5
- package/package.json +2 -1
- package/src/services/base.ts +1 -1
- package/src/services/files/index.ts +2 -2
- package/src/services/index.ts +1 -1
- package/src/services/lemur/index.ts +1 -1
- package/src/services/realtime/service.ts +3 -4
- package/src/services/transcripts/index.ts +47 -54
- package/src/types/asyncapi.generated.ts +62 -40
- package/src/types/openapi.generated.ts +726 -330
- package/src/types/services/index.ts +0 -1
- package/src/types/transcripts/index.ts +17 -7
- package/dist/types/services/abstractions.d.ts +0 -52
- package/src/types/services/abstractions.ts +0 -56
|
@@ -6,12 +6,13 @@ type Without<T, U> = {
|
|
|
6
6
|
type XOR<T, U> = T | U extends object ? (Without<T, U> & U) | (Without<U, T> & T) : T | U;
|
|
7
7
|
type OneOf<T extends any[]> = T extends [infer Only] ? Only : T extends [infer A, infer B, ...infer Rest] ? OneOf<[XOR<A, B>, ...Rest]> : never;
|
|
8
8
|
/**
|
|
9
|
-
*
|
|
10
|
-
* @enum {string}
|
|
9
|
+
* Either success, or unavailable in the rare case that the model failed
|
|
11
10
|
*/
|
|
12
11
|
export type AudioIntelligenceModelStatus = "success" | "unavailable";
|
|
13
12
|
/**
|
|
14
|
-
* @example
|
|
13
|
+
* @example
|
|
14
|
+
* ```js
|
|
15
|
+
* {
|
|
15
16
|
* "count": 1,
|
|
16
17
|
* "rank": 0.08,
|
|
17
18
|
* "text": "air quality alerts",
|
|
@@ -22,25 +23,33 @@ export type AudioIntelligenceModelStatus = "success" | "unavailable";
|
|
|
22
23
|
* }
|
|
23
24
|
* ]
|
|
24
25
|
* }
|
|
26
|
+
* ```
|
|
25
27
|
*/
|
|
26
28
|
export type AutoHighlightResult = {
|
|
27
|
-
/**
|
|
29
|
+
/**
|
|
30
|
+
* The total number of times the key phrase appears in the audio file
|
|
31
|
+
*/
|
|
28
32
|
count: number;
|
|
29
33
|
/**
|
|
30
|
-
*
|
|
31
|
-
* @description The total relevancy to the overall audio file of this key phrase - a greater number means more relevant
|
|
34
|
+
* The total relevancy to the overall audio file of this key phrase - a greater number means more relevant
|
|
32
35
|
*/
|
|
33
36
|
rank: number;
|
|
34
|
-
/**
|
|
37
|
+
/**
|
|
38
|
+
* The text itself of the key phrase
|
|
39
|
+
*/
|
|
35
40
|
text: string;
|
|
36
|
-
/**
|
|
41
|
+
/**
|
|
42
|
+
* The timestamp of the of the key phrase
|
|
43
|
+
*/
|
|
37
44
|
timestamps: Timestamp[];
|
|
38
45
|
};
|
|
39
46
|
/**
|
|
40
|
-
*
|
|
47
|
+
* An array of results for the Key Phrases model, if it is enabled.
|
|
41
48
|
* See [Key phrases](https://www.assemblyai.com/docs/models/key-phrases) for more information.
|
|
42
49
|
*
|
|
43
|
-
* @example
|
|
50
|
+
* @example
|
|
51
|
+
* ```js
|
|
52
|
+
* {
|
|
44
53
|
* "status": "success",
|
|
45
54
|
* "results": [
|
|
46
55
|
* {
|
|
@@ -242,56 +251,77 @@ export type AutoHighlightResult = {
|
|
|
242
251
|
* }
|
|
243
252
|
* ]
|
|
244
253
|
* }
|
|
254
|
+
* ```
|
|
245
255
|
*/
|
|
246
256
|
export type AutoHighlightsResult = {
|
|
247
|
-
/**
|
|
257
|
+
/**
|
|
258
|
+
* A temporally-sequential array of Key Phrases
|
|
259
|
+
*/
|
|
248
260
|
results: AutoHighlightResult[];
|
|
249
261
|
};
|
|
250
262
|
/**
|
|
251
|
-
*
|
|
252
|
-
* @example
|
|
263
|
+
* Chapter of the audio file
|
|
264
|
+
* @example
|
|
265
|
+
* ```js
|
|
266
|
+
* {
|
|
253
267
|
* "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.",
|
|
254
268
|
* "gist": "Smoggy air quality alerts across US",
|
|
255
269
|
* "headline": "Smoke from hundreds of wildfires in Canada is triggering air quality alerts across US",
|
|
256
270
|
* "start": 250,
|
|
257
271
|
* "end": 28840
|
|
258
272
|
* }
|
|
273
|
+
* ```
|
|
259
274
|
*/
|
|
260
275
|
export type Chapter = {
|
|
261
|
-
/**
|
|
276
|
+
/**
|
|
277
|
+
* The starting time, in milliseconds, for the chapter
|
|
278
|
+
*/
|
|
262
279
|
end: number;
|
|
263
|
-
/**
|
|
280
|
+
/**
|
|
281
|
+
* An ultra-short summary (just a few words) of the content spoken in the chapter
|
|
282
|
+
*/
|
|
264
283
|
gist: string;
|
|
265
|
-
/**
|
|
284
|
+
/**
|
|
285
|
+
* A single sentence summary of the content spoken during the chapter
|
|
286
|
+
*/
|
|
266
287
|
headline: string;
|
|
267
|
-
/**
|
|
288
|
+
/**
|
|
289
|
+
* The starting time, in milliseconds, for the chapter
|
|
290
|
+
*/
|
|
268
291
|
start: number;
|
|
269
|
-
/**
|
|
292
|
+
/**
|
|
293
|
+
* A one paragraph summary of the content spoken during the chapter
|
|
294
|
+
*/
|
|
270
295
|
summary: string;
|
|
271
296
|
};
|
|
272
297
|
/**
|
|
273
|
-
* @example
|
|
298
|
+
* @example
|
|
299
|
+
* ```js
|
|
300
|
+
* {
|
|
274
301
|
* "label": "disasters",
|
|
275
302
|
* "confidence": 0.8142836093902588,
|
|
276
303
|
* "severity": 0.4093044400215149
|
|
277
304
|
* }
|
|
305
|
+
* ```
|
|
278
306
|
*/
|
|
279
307
|
export type ContentSafetyLabel = {
|
|
280
308
|
/**
|
|
281
|
-
*
|
|
282
|
-
* @description The confidence score for the topic being discussed, from 0 to 1
|
|
309
|
+
* The confidence score for the topic being discussed, from 0 to 1
|
|
283
310
|
*/
|
|
284
311
|
confidence: number;
|
|
285
|
-
/**
|
|
312
|
+
/**
|
|
313
|
+
* The label of the sensitive topic
|
|
314
|
+
*/
|
|
286
315
|
label: string;
|
|
287
316
|
/**
|
|
288
|
-
*
|
|
289
|
-
* @description How severely the topic is discussed in the section, from 0 to 1
|
|
317
|
+
* How severely the topic is discussed in the section, from 0 to 1
|
|
290
318
|
*/
|
|
291
319
|
severity: number;
|
|
292
320
|
};
|
|
293
321
|
/**
|
|
294
|
-
* @example
|
|
322
|
+
* @example
|
|
323
|
+
* ```js
|
|
324
|
+
* {
|
|
295
325
|
* "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.",
|
|
296
326
|
* "labels": [
|
|
297
327
|
* {
|
|
@@ -307,24 +337,37 @@ export type ContentSafetyLabel = {
|
|
|
307
337
|
* "end": 28840
|
|
308
338
|
* }
|
|
309
339
|
* }
|
|
340
|
+
* ```
|
|
310
341
|
*/
|
|
311
342
|
export type ContentSafetyLabelResult = {
|
|
312
|
-
/**
|
|
343
|
+
/**
|
|
344
|
+
* An array of safety labels, one per sensitive topic that was detected in the section
|
|
345
|
+
*/
|
|
313
346
|
labels: ContentSafetyLabel[];
|
|
314
|
-
/**
|
|
347
|
+
/**
|
|
348
|
+
* The sentence index at which the section ends
|
|
349
|
+
*/
|
|
315
350
|
sentences_idx_end: number;
|
|
316
|
-
/**
|
|
351
|
+
/**
|
|
352
|
+
* The sentence index at which the section begins
|
|
353
|
+
*/
|
|
317
354
|
sentences_idx_start: number;
|
|
318
|
-
/**
|
|
355
|
+
/**
|
|
356
|
+
* The transcript of the section flagged by the Content Moderation model
|
|
357
|
+
*/
|
|
319
358
|
text: string;
|
|
320
|
-
/**
|
|
359
|
+
/**
|
|
360
|
+
* Timestamp information for the section
|
|
361
|
+
*/
|
|
321
362
|
timestamp: Timestamp;
|
|
322
363
|
};
|
|
323
364
|
/**
|
|
324
|
-
*
|
|
365
|
+
* An array of results for the Content Moderation model, if it is enabled.
|
|
325
366
|
* See [Content moderation](https://www.assemblyai.com/docs/models/content-moderation) for more information.
|
|
326
367
|
*
|
|
327
|
-
* @example
|
|
368
|
+
* @example
|
|
369
|
+
* ```js
|
|
370
|
+
* {
|
|
328
371
|
* "status": "success",
|
|
329
372
|
* "results": [
|
|
330
373
|
* {
|
|
@@ -361,66 +404,94 @@ export type ContentSafetyLabelResult = {
|
|
|
361
404
|
* }
|
|
362
405
|
* }
|
|
363
406
|
* }
|
|
407
|
+
* ```
|
|
364
408
|
*/
|
|
365
409
|
export type ContentSafetyLabelsResult = {
|
|
366
410
|
results: ContentSafetyLabelResult[];
|
|
367
|
-
/**
|
|
411
|
+
/**
|
|
412
|
+
* A summary of the Content Moderation severity results for the entire audio file
|
|
413
|
+
*/
|
|
368
414
|
severity_score_summary: {
|
|
369
415
|
[key: string]: SeverityScoreSummary;
|
|
370
416
|
};
|
|
371
|
-
/**
|
|
417
|
+
/**
|
|
418
|
+
* The status of the Content Moderation model. Either success, or unavailable in the rare case that the model failed.
|
|
419
|
+
*/
|
|
372
420
|
status: AudioIntelligenceModelStatus;
|
|
373
|
-
/**
|
|
421
|
+
/**
|
|
422
|
+
* A summary of the Content Moderation confidence results for the entire audio file
|
|
423
|
+
*/
|
|
374
424
|
summary: {
|
|
375
425
|
[key: string]: number;
|
|
376
426
|
};
|
|
377
427
|
};
|
|
378
428
|
/**
|
|
379
|
-
* @example
|
|
429
|
+
* @example
|
|
430
|
+
* ```js
|
|
431
|
+
* {
|
|
380
432
|
* "expires_in": 480
|
|
381
433
|
* }
|
|
434
|
+
* ```
|
|
382
435
|
*/
|
|
383
436
|
export type CreateRealtimeTemporaryTokenParams = {
|
|
384
|
-
/**
|
|
437
|
+
/**
|
|
438
|
+
* The amount of time until the token expires in seconds
|
|
439
|
+
*/
|
|
385
440
|
expires_in: number;
|
|
386
441
|
};
|
|
387
442
|
/**
|
|
388
|
-
*
|
|
389
|
-
* @example
|
|
443
|
+
* A detected entity
|
|
444
|
+
* @example
|
|
445
|
+
* ```js
|
|
446
|
+
* {
|
|
390
447
|
* "entity_type": "location",
|
|
391
448
|
* "text": "Canada",
|
|
392
449
|
* "start": 2548,
|
|
393
450
|
* "end": 3130
|
|
394
451
|
* }
|
|
452
|
+
* ```
|
|
395
453
|
*/
|
|
396
454
|
export type Entity = {
|
|
397
|
-
/**
|
|
455
|
+
/**
|
|
456
|
+
* The ending time, in milliseconds, for the detected entity in the audio file
|
|
457
|
+
*/
|
|
398
458
|
end: number;
|
|
399
|
-
/**
|
|
459
|
+
/**
|
|
460
|
+
* The type of entity for the detected entity
|
|
461
|
+
*/
|
|
400
462
|
entity_type: EntityType;
|
|
401
|
-
/**
|
|
463
|
+
/**
|
|
464
|
+
* The starting time, in milliseconds, at which the detected entity appears in the audio file
|
|
465
|
+
*/
|
|
402
466
|
start: number;
|
|
403
|
-
/**
|
|
467
|
+
/**
|
|
468
|
+
* The text for the detected entity
|
|
469
|
+
*/
|
|
404
470
|
text: string;
|
|
405
471
|
};
|
|
406
472
|
/**
|
|
407
|
-
*
|
|
408
|
-
* @enum {string}
|
|
473
|
+
* The type of entity for the detected entity
|
|
409
474
|
*/
|
|
410
475
|
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";
|
|
411
476
|
/**
|
|
412
|
-
* @example
|
|
477
|
+
* @example
|
|
478
|
+
* ```js
|
|
479
|
+
* {
|
|
413
480
|
* "error": "format_text must be a Boolean"
|
|
414
481
|
* }
|
|
482
|
+
* ```
|
|
415
483
|
*/
|
|
416
484
|
export type Error = {
|
|
417
|
-
/**
|
|
485
|
+
/**
|
|
486
|
+
* Error message
|
|
487
|
+
*/
|
|
418
488
|
error: string;
|
|
419
|
-
/** @constant */
|
|
420
489
|
status?: "error";
|
|
421
490
|
};
|
|
422
491
|
/**
|
|
423
|
-
* @example
|
|
492
|
+
* @example
|
|
493
|
+
* ```js
|
|
494
|
+
* {
|
|
424
495
|
* "transcript_ids": [
|
|
425
496
|
* "64nygnr62k-405c-4ae8-8a6b-d90b40ff3cce"
|
|
426
497
|
* ],
|
|
@@ -430,28 +501,36 @@ export type Error = {
|
|
|
430
501
|
* "temperature": 0,
|
|
431
502
|
* "max_output_size": 3000
|
|
432
503
|
* }
|
|
504
|
+
* ```
|
|
433
505
|
*/
|
|
434
506
|
export type LemurActionItemsParams = LemurBaseParams & {
|
|
435
507
|
/**
|
|
436
|
-
*
|
|
508
|
+
* How you want the action items to be returned. This can be any text.
|
|
437
509
|
* Defaults to "Bullet Points".
|
|
438
510
|
*
|
|
439
|
-
* @
|
|
511
|
+
* @defaultValue "Bullet Points
|
|
440
512
|
*/
|
|
441
513
|
answer_format?: string;
|
|
442
514
|
};
|
|
443
515
|
/**
|
|
444
|
-
* @example
|
|
445
|
-
*
|
|
516
|
+
* @example
|
|
517
|
+
* ```js
|
|
518
|
+
* {
|
|
519
|
+
* "request_id": "5"e1b27c2-691f-4414-8bc5-f14678442f9e",
|
|
446
520
|
* "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"
|
|
447
521
|
* }
|
|
522
|
+
* ```
|
|
448
523
|
*/
|
|
449
524
|
export type LemurActionItemsResponse = LemurBaseResponse & {
|
|
450
|
-
/**
|
|
525
|
+
/**
|
|
526
|
+
* The response generated by LeMUR
|
|
527
|
+
*/
|
|
451
528
|
response: string;
|
|
452
529
|
};
|
|
453
530
|
/**
|
|
454
|
-
* @example
|
|
531
|
+
* @example
|
|
532
|
+
* ```js
|
|
533
|
+
* {
|
|
455
534
|
* "transcript_ids": [
|
|
456
535
|
* "64nygnr62k-405c-4ae8-8a6b-d90b40ff3cce"
|
|
457
536
|
* ],
|
|
@@ -460,9 +539,12 @@ export type LemurActionItemsResponse = LemurBaseResponse & {
|
|
|
460
539
|
* "temperature": 0,
|
|
461
540
|
* "max_output_size": 3000
|
|
462
541
|
* }
|
|
542
|
+
* ```
|
|
463
543
|
*/
|
|
464
544
|
export type LemurBaseParams = {
|
|
465
|
-
/**
|
|
545
|
+
/**
|
|
546
|
+
* Context to provide the model. This can be a string or a free-form JSON value.
|
|
547
|
+
*/
|
|
466
548
|
context?: OneOf<[
|
|
467
549
|
string,
|
|
468
550
|
{
|
|
@@ -470,86 +552,108 @@ export type LemurBaseParams = {
|
|
|
470
552
|
}
|
|
471
553
|
]>;
|
|
472
554
|
/**
|
|
473
|
-
*
|
|
555
|
+
* The model that is used for the final prompt after compression is performed.
|
|
474
556
|
* Defaults to "default".
|
|
475
557
|
*
|
|
476
|
-
* @
|
|
558
|
+
* @defaultValue "default
|
|
477
559
|
*/
|
|
478
560
|
final_model?: LiteralUnion<LemurModel, string>;
|
|
479
561
|
/**
|
|
480
|
-
*
|
|
562
|
+
* Custom formatted transcript data. Maximum size is the context limit of the selected model, which defaults to 100000".
|
|
481
563
|
* Use either transcript_ids or input_text as input into LeMUR.
|
|
482
564
|
*/
|
|
483
565
|
input_text?: string;
|
|
484
|
-
/**
|
|
566
|
+
/**
|
|
567
|
+
* Max output size in tokens, up to 4000
|
|
568
|
+
*/
|
|
485
569
|
max_output_size?: number;
|
|
486
570
|
/**
|
|
487
|
-
*
|
|
488
|
-
* @description The temperature to use for the model.
|
|
571
|
+
* The temperature to use for the model.
|
|
489
572
|
* Higher values result in answers that are more creative, lower values are more conservative.
|
|
490
573
|
* Can be any value between 0.0 and 1.0 inclusive.
|
|
491
574
|
*/
|
|
492
575
|
temperature?: number;
|
|
493
576
|
/**
|
|
494
|
-
*
|
|
577
|
+
* A list of completed transcripts with text. Up to a maximum of 100 files or 100 hours, whichever is lower.
|
|
495
578
|
* Use either transcript_ids or input_text as input into LeMUR.
|
|
496
579
|
*/
|
|
497
580
|
transcript_ids?: string[];
|
|
498
581
|
};
|
|
499
582
|
/**
|
|
500
|
-
* @example
|
|
583
|
+
* @example
|
|
584
|
+
* ```js
|
|
585
|
+
* {
|
|
501
586
|
* "request_id": "5e1b27c2-691f-4414-8bc5-f14678442f9e"
|
|
502
587
|
* }
|
|
588
|
+
* ```
|
|
503
589
|
*/
|
|
504
590
|
export type LemurBaseResponse = {
|
|
505
591
|
/**
|
|
506
|
-
*
|
|
507
|
-
* @description The ID of the LeMUR request
|
|
592
|
+
* The ID of the LeMUR request
|
|
508
593
|
*/
|
|
509
594
|
request_id: string;
|
|
510
595
|
};
|
|
511
596
|
/**
|
|
512
|
-
*
|
|
597
|
+
* The model that is used for the final prompt after compression is performed.
|
|
513
598
|
*
|
|
514
|
-
* @enum {string}
|
|
515
599
|
*/
|
|
516
600
|
export type LemurModel = "default" | "basic" | "assemblyai/mistral-7b" | "anthropic/claude-2-1";
|
|
517
601
|
/**
|
|
518
|
-
* @example
|
|
602
|
+
* @example
|
|
603
|
+
* ```js
|
|
604
|
+
* {
|
|
519
605
|
* "question": "Where are there wildfires?",
|
|
520
606
|
* "answer_format": "List of countries in ISO 3166-1 alpha-2 format"
|
|
521
607
|
* }
|
|
608
|
+
* ```
|
|
522
609
|
*/
|
|
523
610
|
export type LemurQuestion = {
|
|
524
|
-
/**
|
|
611
|
+
/**
|
|
612
|
+
* 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"
|
|
613
|
+
*/
|
|
525
614
|
answer_format?: string;
|
|
526
|
-
/**
|
|
615
|
+
/**
|
|
616
|
+
* What discrete options to return. Useful for precise responses. Can't be used with answer_format. Example: ["Yes", "No"]
|
|
617
|
+
*/
|
|
527
618
|
answer_options?: string[];
|
|
528
|
-
/**
|
|
619
|
+
/**
|
|
620
|
+
* Any context about the transcripts you wish to provide. This can be a string or any object.
|
|
621
|
+
*/
|
|
529
622
|
context?: OneOf<[
|
|
530
623
|
string,
|
|
531
624
|
{
|
|
532
625
|
[key: string]: unknown;
|
|
533
626
|
}
|
|
534
627
|
]>;
|
|
535
|
-
/**
|
|
628
|
+
/**
|
|
629
|
+
* The question you wish to ask. For more complex questions use default model.
|
|
630
|
+
*/
|
|
536
631
|
question: string;
|
|
537
632
|
};
|
|
538
633
|
/**
|
|
539
|
-
*
|
|
540
|
-
* @example
|
|
634
|
+
* An answer generated by LeMUR and its question
|
|
635
|
+
* @example
|
|
636
|
+
* ```js
|
|
637
|
+
* {
|
|
541
638
|
* "answer": "CA, US",
|
|
542
639
|
* "question": "Where are there wildfires?"
|
|
543
640
|
* }
|
|
641
|
+
* ```
|
|
544
642
|
*/
|
|
545
643
|
export type LemurQuestionAnswer = {
|
|
546
|
-
/**
|
|
644
|
+
/**
|
|
645
|
+
* The answer generated by LeMUR
|
|
646
|
+
*/
|
|
547
647
|
answer: string;
|
|
548
|
-
/**
|
|
648
|
+
/**
|
|
649
|
+
* The question for LeMUR to answer
|
|
650
|
+
*/
|
|
549
651
|
question: string;
|
|
550
652
|
};
|
|
551
653
|
/**
|
|
552
|
-
* @example
|
|
654
|
+
* @example
|
|
655
|
+
* ```js
|
|
656
|
+
* {
|
|
553
657
|
* "transcript_ids": [
|
|
554
658
|
* "64nygnr62k-405c-4ae8-8a6b-d90b40ff3cce"
|
|
555
659
|
* ],
|
|
@@ -575,13 +679,18 @@ export type LemurQuestionAnswer = {
|
|
|
575
679
|
* "temperature": 0,
|
|
576
680
|
* "max_output_size": 3000
|
|
577
681
|
* }
|
|
682
|
+
* ```
|
|
578
683
|
*/
|
|
579
684
|
export type LemurQuestionAnswerParams = LemurBaseParams & {
|
|
580
|
-
/**
|
|
685
|
+
/**
|
|
686
|
+
* A list of questions to ask
|
|
687
|
+
*/
|
|
581
688
|
questions: LemurQuestion[];
|
|
582
689
|
};
|
|
583
690
|
/**
|
|
584
|
-
* @example
|
|
691
|
+
* @example
|
|
692
|
+
* ```js
|
|
693
|
+
* {
|
|
585
694
|
* "request_id": "5e1b27c2-691f-4414-8bc5-f14678442f9e",
|
|
586
695
|
* "response": [
|
|
587
696
|
* {
|
|
@@ -594,13 +703,18 @@ export type LemurQuestionAnswerParams = LemurBaseParams & {
|
|
|
594
703
|
* }
|
|
595
704
|
* ]
|
|
596
705
|
* }
|
|
706
|
+
* ```
|
|
597
707
|
*/
|
|
598
708
|
export type LemurQuestionAnswerResponse = LemurBaseResponse & {
|
|
599
|
-
/**
|
|
709
|
+
/**
|
|
710
|
+
* The answers generated by LeMUR and their questions
|
|
711
|
+
*/
|
|
600
712
|
response: LemurQuestionAnswer[];
|
|
601
713
|
};
|
|
602
714
|
/**
|
|
603
|
-
* @example
|
|
715
|
+
* @example
|
|
716
|
+
* ```js
|
|
717
|
+
* {
|
|
604
718
|
* "transcript_ids": [
|
|
605
719
|
* "64nygnr62k-405c-4ae8-8a6b-d90b40ff3cce"
|
|
606
720
|
* ],
|
|
@@ -609,23 +723,33 @@ export type LemurQuestionAnswerResponse = LemurBaseResponse & {
|
|
|
609
723
|
* "temperature": 0,
|
|
610
724
|
* "max_output_size": 3000
|
|
611
725
|
* }
|
|
726
|
+
* ```
|
|
612
727
|
*/
|
|
613
728
|
export type LemurSummaryParams = LemurBaseParams & {
|
|
614
|
-
/**
|
|
729
|
+
/**
|
|
730
|
+
* How you want the summary to be returned. This can be any text. Examples: "TLDR", "bullet points"
|
|
731
|
+
*/
|
|
615
732
|
answer_format?: string;
|
|
616
733
|
};
|
|
617
734
|
/**
|
|
618
|
-
* @example
|
|
735
|
+
* @example
|
|
736
|
+
* ```js
|
|
737
|
+
* {
|
|
619
738
|
* "request_id": "5e1b27c2-691f-4414-8bc5-f14678442f9e",
|
|
620
739
|
* "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"
|
|
621
740
|
* }
|
|
741
|
+
* ```
|
|
622
742
|
*/
|
|
623
743
|
export type LemurSummaryResponse = LemurBaseResponse & {
|
|
624
|
-
/**
|
|
744
|
+
/**
|
|
745
|
+
* The response generated by LeMUR
|
|
746
|
+
*/
|
|
625
747
|
response: string;
|
|
626
748
|
};
|
|
627
749
|
/**
|
|
628
|
-
* @example
|
|
750
|
+
* @example
|
|
751
|
+
* ```js
|
|
752
|
+
* {
|
|
629
753
|
* "transcript_ids": [
|
|
630
754
|
* "64nygnr62k-405c-4ae8-8a6b-d90b40ff3cce"
|
|
631
755
|
* ],
|
|
@@ -635,23 +759,33 @@ export type LemurSummaryResponse = LemurBaseResponse & {
|
|
|
635
759
|
* "temperature": 0,
|
|
636
760
|
* "max_output_size": 3000
|
|
637
761
|
* }
|
|
762
|
+
* ```
|
|
638
763
|
*/
|
|
639
764
|
export type LemurTaskParams = LemurBaseParams & {
|
|
640
|
-
/**
|
|
765
|
+
/**
|
|
766
|
+
* Your text to prompt the model to produce a desired output, including any context you want to pass into the model.
|
|
767
|
+
*/
|
|
641
768
|
prompt: string;
|
|
642
769
|
};
|
|
643
770
|
/**
|
|
644
|
-
* @example
|
|
771
|
+
* @example
|
|
772
|
+
* ```js
|
|
773
|
+
* {
|
|
645
774
|
* "request_id": "5e1b27c2-691f-4414-8bc5-f14678442f9e",
|
|
646
775
|
* "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"
|
|
647
776
|
* }
|
|
777
|
+
* ```
|
|
648
778
|
*/
|
|
649
779
|
export type LemurTaskResponse = LemurBaseResponse & {
|
|
650
|
-
/**
|
|
780
|
+
/**
|
|
781
|
+
* The response generated by LeMUR.
|
|
782
|
+
*/
|
|
651
783
|
response: string;
|
|
652
784
|
};
|
|
653
785
|
/**
|
|
654
|
-
* @example
|
|
786
|
+
* @example
|
|
787
|
+
* ```js
|
|
788
|
+
* {
|
|
655
789
|
* "after_id": "a7c5cafd-2c2e-4bdd-b0b2-69dade2f7a1b",
|
|
656
790
|
* "before_id": "9ea68fd3-f953-42c1-9742-976c447fb463",
|
|
657
791
|
* "created_on": "2023-11-03",
|
|
@@ -659,42 +793,46 @@ export type LemurTaskResponse = LemurBaseResponse & {
|
|
|
659
793
|
* "status": "completed",
|
|
660
794
|
* "throttled_only": false
|
|
661
795
|
* }
|
|
796
|
+
* ```
|
|
662
797
|
*/
|
|
663
798
|
export type ListTranscriptParams = {
|
|
664
799
|
/**
|
|
665
|
-
*
|
|
666
|
-
* @description Get transcripts that were created after this transcript ID
|
|
800
|
+
* Get transcripts that were created after this transcript ID
|
|
667
801
|
*/
|
|
668
802
|
after_id?: string;
|
|
669
803
|
/**
|
|
670
|
-
*
|
|
671
|
-
* @description Get transcripts that were created before this transcript ID
|
|
804
|
+
* Get transcripts that were created before this transcript ID
|
|
672
805
|
*/
|
|
673
806
|
before_id?: string;
|
|
674
807
|
/**
|
|
675
|
-
*
|
|
676
|
-
* @description Only get transcripts created on this date
|
|
808
|
+
* Only get transcripts created on this date
|
|
677
809
|
*/
|
|
678
810
|
created_on?: string;
|
|
679
811
|
/**
|
|
680
|
-
*
|
|
681
|
-
* @
|
|
682
|
-
* @default 10
|
|
812
|
+
* Maximum amount of transcripts to retrieve
|
|
813
|
+
* @defaultValue 10
|
|
683
814
|
*/
|
|
684
815
|
limit?: number;
|
|
685
|
-
/**
|
|
816
|
+
/**
|
|
817
|
+
* Filter by transcript status
|
|
818
|
+
*/
|
|
686
819
|
status?: TranscriptStatus;
|
|
687
|
-
/**
|
|
820
|
+
/**
|
|
821
|
+
* Only get throttled transcripts, overrides the status filter
|
|
822
|
+
*/
|
|
688
823
|
throttled_only?: boolean;
|
|
689
824
|
};
|
|
690
825
|
/**
|
|
691
|
-
* @example
|
|
826
|
+
* @example
|
|
827
|
+
* ```js
|
|
828
|
+
* {
|
|
692
829
|
* "limit": 10,
|
|
693
830
|
* "result_count": 10,
|
|
694
831
|
* "current_url": "https://api.assemblyai.com/v2/transcript?limit=10",
|
|
695
832
|
* "prev_url": "https://api.assemblyai.com/v2/transcript?limit=10&before_id=62npeahu2b-a8ea-4112-854c-69542c20d90c",
|
|
696
833
|
* "next_url": "https://api.assemblyai.com/v2/transcript?limit=10&after_id=62nfw3mlar-01ad-4631-92f6-629929496eed"
|
|
697
834
|
* }
|
|
835
|
+
* ```
|
|
698
836
|
*/
|
|
699
837
|
export type PageDetails = {
|
|
700
838
|
current_url: string;
|
|
@@ -704,7 +842,9 @@ export type PageDetails = {
|
|
|
704
842
|
result_count: number;
|
|
705
843
|
};
|
|
706
844
|
/**
|
|
707
|
-
* @example
|
|
845
|
+
* @example
|
|
846
|
+
* ```js
|
|
847
|
+
* {
|
|
708
848
|
* "paragraphs": [
|
|
709
849
|
* {
|
|
710
850
|
* "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.",
|
|
@@ -776,73 +916,86 @@ export type PageDetails = {
|
|
|
776
916
|
* "confidence": 0.9578730257009361,
|
|
777
917
|
* "audio_duration": 281
|
|
778
918
|
* }
|
|
919
|
+
* ```
|
|
779
920
|
*/
|
|
780
921
|
export type ParagraphsResponse = {
|
|
781
922
|
audio_duration: number;
|
|
782
|
-
/** Format: double */
|
|
783
923
|
confidence: number;
|
|
784
|
-
/** Format: uuid */
|
|
785
924
|
id: string;
|
|
786
925
|
paragraphs: TranscriptParagraph[];
|
|
787
926
|
};
|
|
788
|
-
/** @enum {string} */
|
|
789
927
|
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";
|
|
790
928
|
/**
|
|
791
|
-
* @example
|
|
929
|
+
* @example
|
|
930
|
+
* ```js
|
|
931
|
+
* {
|
|
792
932
|
* "request_id": "914fe7e4-f10a-4364-8946-34614c2873f6",
|
|
793
933
|
* "request_id_to_purge": "b7eb03ec-1650-4181-949b-75d9de317de1",
|
|
794
934
|
* "deleted": true
|
|
795
935
|
* }
|
|
936
|
+
* ```
|
|
796
937
|
*/
|
|
797
938
|
export type PurgeLemurRequestDataResponse = {
|
|
798
|
-
/**
|
|
939
|
+
/**
|
|
940
|
+
* Whether the request data was deleted
|
|
941
|
+
*/
|
|
799
942
|
deleted: boolean;
|
|
800
943
|
/**
|
|
801
|
-
*
|
|
802
|
-
* @description The ID of the deletion request of the LeMUR request
|
|
944
|
+
* The ID of the deletion request of the LeMUR request
|
|
803
945
|
*/
|
|
804
946
|
request_id: string;
|
|
805
947
|
/**
|
|
806
|
-
*
|
|
807
|
-
* @description The ID of the LeMUR request to purge the data for
|
|
948
|
+
* The ID of the LeMUR request to purge the data for
|
|
808
949
|
*/
|
|
809
950
|
request_id_to_purge: string;
|
|
810
951
|
};
|
|
811
952
|
/**
|
|
812
|
-
* @example
|
|
953
|
+
* @example
|
|
954
|
+
* ```js
|
|
955
|
+
* {
|
|
813
956
|
* "token": "fe4145dd1e7a2e149488dcd2d553a8018a89833fc5084837d66fd1bcf5a105d4"
|
|
814
957
|
* }
|
|
958
|
+
* ```
|
|
815
959
|
*/
|
|
816
960
|
export type RealtimeTemporaryTokenResponse = {
|
|
817
|
-
/**
|
|
961
|
+
/**
|
|
962
|
+
* The temporary authentication token for real-time transcription
|
|
963
|
+
*/
|
|
818
964
|
token: string;
|
|
819
965
|
};
|
|
820
966
|
/**
|
|
821
|
-
* @example
|
|
967
|
+
* @example
|
|
968
|
+
* ```js
|
|
969
|
+
* {
|
|
822
970
|
* "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",
|
|
823
971
|
* "status": "redacted_audio_ready"
|
|
824
972
|
* }
|
|
973
|
+
* ```
|
|
825
974
|
*/
|
|
826
975
|
export type RedactedAudioResponse = {
|
|
827
|
-
/**
|
|
976
|
+
/**
|
|
977
|
+
* The URL of the redacted audio file
|
|
978
|
+
*/
|
|
828
979
|
redacted_audio_url: string;
|
|
829
|
-
/**
|
|
980
|
+
/**
|
|
981
|
+
* The status of the redacted audio
|
|
982
|
+
*/
|
|
830
983
|
status: RedactedAudioStatus;
|
|
831
984
|
};
|
|
832
985
|
/**
|
|
833
|
-
*
|
|
834
|
-
* @enum {string}
|
|
986
|
+
* The status of the redacted audio
|
|
835
987
|
*/
|
|
836
988
|
export type RedactedAudioStatus = "redacted_audio_ready";
|
|
837
989
|
/**
|
|
838
|
-
*
|
|
839
|
-
* @
|
|
840
|
-
* @example mp3
|
|
841
|
-
* @enum {string}
|
|
990
|
+
* 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.
|
|
991
|
+
* @defaultValue "mp3"
|
|
992
|
+
* @example "mp3"
|
|
842
993
|
*/
|
|
843
994
|
export type RedactPiiAudioQuality = "mp3" | "wav";
|
|
844
995
|
/**
|
|
845
|
-
* @example
|
|
996
|
+
* @example
|
|
997
|
+
* ```js
|
|
998
|
+
* {
|
|
846
999
|
* "sentences": [
|
|
847
1000
|
* {
|
|
848
1001
|
* "text": "Smoke from hundreds of wildfires in Canada is triggering air quality alerts throughout the US.",
|
|
@@ -937,20 +1090,20 @@ export type RedactPiiAudioQuality = "mp3" | "wav";
|
|
|
937
1090
|
* "confidence": 0.9579390654205628,
|
|
938
1091
|
* "audio_duration": 281
|
|
939
1092
|
* }
|
|
1093
|
+
* ```
|
|
940
1094
|
*/
|
|
941
1095
|
export type SentencesResponse = {
|
|
942
1096
|
audio_duration: number;
|
|
943
|
-
/** Format: double */
|
|
944
1097
|
confidence: number;
|
|
945
|
-
/** Format: uuid */
|
|
946
1098
|
id: string;
|
|
947
1099
|
sentences: TranscriptSentence[];
|
|
948
1100
|
};
|
|
949
|
-
/** @enum {unknown} */
|
|
950
1101
|
export type Sentiment = "POSITIVE" | "NEUTRAL" | "NEGATIVE";
|
|
951
1102
|
/**
|
|
952
|
-
*
|
|
953
|
-
* @example
|
|
1103
|
+
* The result of the sentiment analysis model
|
|
1104
|
+
* @example
|
|
1105
|
+
* ```js
|
|
1106
|
+
* {
|
|
954
1107
|
* "text": "Smoke from hundreds of wildfires in Canada is triggering air quality alerts throughout the US.",
|
|
955
1108
|
* "start": 250,
|
|
956
1109
|
* "end": 6350,
|
|
@@ -958,84 +1111,98 @@ export type Sentiment = "POSITIVE" | "NEUTRAL" | "NEGATIVE";
|
|
|
958
1111
|
* "confidence": 0.8181032538414001,
|
|
959
1112
|
* "speaker": null
|
|
960
1113
|
* }
|
|
1114
|
+
* ```
|
|
961
1115
|
*/
|
|
962
1116
|
export type SentimentAnalysisResult = {
|
|
963
1117
|
/**
|
|
964
|
-
*
|
|
965
|
-
* @description The confidence score for the detected sentiment of the sentence, from 0 to 1
|
|
1118
|
+
* The confidence score for the detected sentiment of the sentence, from 0 to 1
|
|
966
1119
|
*/
|
|
967
1120
|
confidence: number;
|
|
968
|
-
/**
|
|
1121
|
+
/**
|
|
1122
|
+
* The ending time, in milliseconds, of the sentence
|
|
1123
|
+
*/
|
|
969
1124
|
end: number;
|
|
970
|
-
/**
|
|
1125
|
+
/**
|
|
1126
|
+
* The detected sentiment for the sentence, one of POSITIVE, NEUTRAL, NEGATIVE
|
|
1127
|
+
*/
|
|
971
1128
|
sentiment: Sentiment;
|
|
972
|
-
/**
|
|
1129
|
+
/**
|
|
1130
|
+
* The speaker of the sentence if [Speaker Diarization](https://www.assemblyai.com/docs/models/speaker-diarization) is enabled, else null
|
|
1131
|
+
*/
|
|
973
1132
|
speaker?: string | null;
|
|
974
|
-
/**
|
|
1133
|
+
/**
|
|
1134
|
+
* The starting time, in milliseconds, of the sentence
|
|
1135
|
+
*/
|
|
975
1136
|
start: number;
|
|
976
|
-
/**
|
|
1137
|
+
/**
|
|
1138
|
+
* The transcript of the sentence
|
|
1139
|
+
*/
|
|
977
1140
|
text: string;
|
|
978
1141
|
};
|
|
979
1142
|
/**
|
|
980
|
-
* @example
|
|
1143
|
+
* @example
|
|
1144
|
+
* ```js
|
|
1145
|
+
* {
|
|
981
1146
|
* "low": 0.5733263024656846,
|
|
982
1147
|
* "medium": 0.42667369753431533,
|
|
983
1148
|
* "high": 0
|
|
984
1149
|
* }
|
|
1150
|
+
* ```
|
|
985
1151
|
*/
|
|
986
1152
|
export type SeverityScoreSummary = {
|
|
987
|
-
/** Format: double */
|
|
988
1153
|
high: number;
|
|
989
|
-
/** Format: double */
|
|
990
1154
|
low: number;
|
|
991
|
-
/** Format: double */
|
|
992
1155
|
medium: number;
|
|
993
1156
|
};
|
|
994
1157
|
/**
|
|
995
|
-
*
|
|
996
|
-
* @enum {string}
|
|
1158
|
+
* The speech model to use for the transcription.
|
|
997
1159
|
*/
|
|
998
1160
|
export type SpeechModel = "nano";
|
|
999
1161
|
/**
|
|
1000
|
-
*
|
|
1001
|
-
* @enum {string}
|
|
1162
|
+
* 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.
|
|
1002
1163
|
*/
|
|
1003
1164
|
export type SubstitutionPolicy = "entity_type" | "hash";
|
|
1004
1165
|
/**
|
|
1005
|
-
*
|
|
1006
|
-
* @enum {string}
|
|
1166
|
+
* Format of the subtitles
|
|
1007
1167
|
*/
|
|
1008
1168
|
export type SubtitleFormat = "srt" | "vtt";
|
|
1009
1169
|
/**
|
|
1010
|
-
*
|
|
1011
|
-
* @
|
|
1012
|
-
* @enum {string}
|
|
1170
|
+
* The model to summarize the transcript
|
|
1171
|
+
* @defaultValue "informative
|
|
1013
1172
|
*/
|
|
1014
1173
|
export type SummaryModel = "informative" | "conversational" | "catchy";
|
|
1015
1174
|
/**
|
|
1016
|
-
*
|
|
1017
|
-
* @
|
|
1018
|
-
* @enum {string}
|
|
1175
|
+
* The type of summary
|
|
1176
|
+
* @defaultValue bullets
|
|
1019
1177
|
*/
|
|
1020
1178
|
export type SummaryType = "bullets" | "bullets_verbose" | "gist" | "headline" | "paragraph";
|
|
1021
1179
|
/**
|
|
1022
|
-
*
|
|
1023
|
-
* @example
|
|
1024
|
-
*
|
|
1180
|
+
* Timestamp containing a start and end property in milliseconds
|
|
1181
|
+
* @example
|
|
1182
|
+
* ```js
|
|
1183
|
+
* {
|
|
1184
|
+
* "start": 3978",
|
|
1025
1185
|
* "end": 5114
|
|
1026
1186
|
* }
|
|
1187
|
+
* ```
|
|
1027
1188
|
*/
|
|
1028
1189
|
export type Timestamp = {
|
|
1029
|
-
/**
|
|
1190
|
+
/**
|
|
1191
|
+
* The end time in milliseconds
|
|
1192
|
+
*/
|
|
1030
1193
|
end: number;
|
|
1031
|
-
/**
|
|
1194
|
+
/**
|
|
1195
|
+
* The start time in milliseconds
|
|
1196
|
+
*/
|
|
1032
1197
|
start: number;
|
|
1033
1198
|
};
|
|
1034
1199
|
/**
|
|
1035
|
-
*
|
|
1200
|
+
* The result of the Topic Detection model, if it is enabled.
|
|
1036
1201
|
* See [Topic Detection](https://www.assemblyai.com/docs/models/topic-detection) for more information.
|
|
1037
1202
|
*
|
|
1038
|
-
* @example
|
|
1203
|
+
* @example
|
|
1204
|
+
* ```js
|
|
1205
|
+
* {
|
|
1039
1206
|
* "status": "success",
|
|
1040
1207
|
* "results": [
|
|
1041
1208
|
* {
|
|
@@ -1111,20 +1278,29 @@ export type Timestamp = {
|
|
|
1111
1278
|
* "MedicalHealth>DiseasesAndConditions>Injuries>FirstAid": 0.0004885646631009877
|
|
1112
1279
|
* }
|
|
1113
1280
|
* }
|
|
1281
|
+
* ```
|
|
1114
1282
|
*/
|
|
1115
1283
|
export type TopicDetectionModelResult = {
|
|
1116
|
-
/**
|
|
1284
|
+
/**
|
|
1285
|
+
* An array of results for the Topic Detection model
|
|
1286
|
+
*/
|
|
1117
1287
|
results: TopicDetectionResult[];
|
|
1118
|
-
/**
|
|
1288
|
+
/**
|
|
1289
|
+
* The status of the Topic Detection model. Either success, or unavailable in the rare case that the model failed.
|
|
1290
|
+
*/
|
|
1119
1291
|
status: AudioIntelligenceModelStatus;
|
|
1120
|
-
/**
|
|
1292
|
+
/**
|
|
1293
|
+
* The overall relevance of topic to the entire audio file
|
|
1294
|
+
*/
|
|
1121
1295
|
summary: {
|
|
1122
1296
|
[key: string]: number;
|
|
1123
1297
|
};
|
|
1124
1298
|
};
|
|
1125
1299
|
/**
|
|
1126
|
-
*
|
|
1127
|
-
* @example
|
|
1300
|
+
* The result of the topic detection model
|
|
1301
|
+
* @example
|
|
1302
|
+
* ```js
|
|
1303
|
+
* {
|
|
1128
1304
|
* "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.",
|
|
1129
1305
|
* "labels": [
|
|
1130
1306
|
* {
|
|
@@ -1173,24 +1349,30 @@ export type TopicDetectionModelResult = {
|
|
|
1173
1349
|
* "end": 28840
|
|
1174
1350
|
* }
|
|
1175
1351
|
* }
|
|
1352
|
+
* ```
|
|
1176
1353
|
*/
|
|
1177
1354
|
export type TopicDetectionResult = {
|
|
1178
1355
|
labels?: {
|
|
1179
|
-
/**
|
|
1356
|
+
/**
|
|
1357
|
+
* The IAB taxonomical label for the label of the detected topic, where > denotes supertopic/subtopic relationship
|
|
1358
|
+
*/
|
|
1180
1359
|
label: string;
|
|
1181
1360
|
/**
|
|
1182
|
-
*
|
|
1183
|
-
* @description How relevant the detected topic is of a detected topic
|
|
1361
|
+
* How relevant the detected topic is of a detected topic
|
|
1184
1362
|
*/
|
|
1185
1363
|
relevance: number;
|
|
1186
1364
|
}[];
|
|
1187
|
-
/**
|
|
1365
|
+
/**
|
|
1366
|
+
* The text in the transcript in which a detected topic occurs
|
|
1367
|
+
*/
|
|
1188
1368
|
text: string;
|
|
1189
1369
|
timestamp?: Timestamp;
|
|
1190
1370
|
};
|
|
1191
1371
|
/**
|
|
1192
|
-
*
|
|
1193
|
-
* @example
|
|
1372
|
+
* A transcript object
|
|
1373
|
+
* @example
|
|
1374
|
+
* ```js
|
|
1375
|
+
* {
|
|
1194
1376
|
* "id": "9ea68fd3-f953-42c1-9742-976c447fb463",
|
|
1195
1377
|
* "speech_model": null,
|
|
1196
1378
|
* "language_model": "assemblyai_default",
|
|
@@ -1874,215 +2056,291 @@ export type TopicDetectionResult = {
|
|
|
1874
2056
|
* "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?",
|
|
1875
2057
|
* "speakers_expected": 2
|
|
1876
2058
|
* }
|
|
2059
|
+
* ```
|
|
1877
2060
|
*/
|
|
1878
2061
|
export type Transcript = {
|
|
1879
2062
|
/**
|
|
1880
2063
|
* @deprecated
|
|
1881
|
-
*
|
|
2064
|
+
* The acoustic model that was used for the transcript
|
|
1882
2065
|
*/
|
|
1883
2066
|
acoustic_model: string;
|
|
1884
2067
|
/**
|
|
1885
|
-
*
|
|
1886
|
-
* @description The duration of this transcript object's media file, in seconds
|
|
2068
|
+
* The duration of this transcript object's media file, in seconds
|
|
1887
2069
|
*/
|
|
1888
2070
|
audio_duration?: number | null;
|
|
1889
|
-
/**
|
|
2071
|
+
/**
|
|
2072
|
+
* The point in time, in milliseconds, in the file at which the transcription was terminated
|
|
2073
|
+
*/
|
|
1890
2074
|
audio_end_at?: number | null;
|
|
1891
|
-
/**
|
|
2075
|
+
/**
|
|
2076
|
+
* The point in time, in milliseconds, in the file at which the transcription was started
|
|
2077
|
+
*/
|
|
1892
2078
|
audio_start_from?: number | null;
|
|
1893
|
-
/**
|
|
2079
|
+
/**
|
|
2080
|
+
* The URL of the media that was transcribed
|
|
2081
|
+
*/
|
|
1894
2082
|
audio_url: string;
|
|
1895
|
-
/**
|
|
2083
|
+
/**
|
|
2084
|
+
* Whether [Auto Chapters](https://www.assemblyai.com/docs/models/auto-chapters) is enabled, can be true or false
|
|
2085
|
+
*/
|
|
1896
2086
|
auto_chapters?: boolean | null;
|
|
1897
|
-
/**
|
|
2087
|
+
/**
|
|
2088
|
+
* Whether Key Phrases is enabled, either true or false
|
|
2089
|
+
*/
|
|
1898
2090
|
auto_highlights: boolean;
|
|
1899
2091
|
/**
|
|
1900
|
-
*
|
|
2092
|
+
* An array of results for the Key Phrases model, if it is enabled.
|
|
1901
2093
|
* See [Key phrases](https://www.assemblyai.com/docs/models/key-phrases) for more information.
|
|
1902
2094
|
*/
|
|
1903
2095
|
auto_highlights_result?: AutoHighlightsResult | null;
|
|
1904
|
-
/**
|
|
2096
|
+
/**
|
|
2097
|
+
* The word boost parameter value
|
|
2098
|
+
*/
|
|
1905
2099
|
boost_param?: string | null;
|
|
1906
|
-
/**
|
|
2100
|
+
/**
|
|
2101
|
+
* An array of temporally sequential chapters for the audio file
|
|
2102
|
+
*/
|
|
1907
2103
|
chapters?: Chapter[] | null;
|
|
1908
2104
|
/**
|
|
1909
|
-
*
|
|
1910
|
-
* @description The confidence score for the transcript, between 0.0 (low confidence) and 1.0 (high confidence)
|
|
2105
|
+
* The confidence score for the transcript, between 0.0 (low confidence) and 1.0 (high confidence)
|
|
1911
2106
|
*/
|
|
1912
2107
|
confidence?: number | null;
|
|
1913
|
-
/**
|
|
2108
|
+
/**
|
|
2109
|
+
* Whether [Content Moderation](https://www.assemblyai.com/docs/models/content-moderation) is enabled, can be true or false
|
|
2110
|
+
*/
|
|
1914
2111
|
content_safety?: boolean | null;
|
|
1915
2112
|
/**
|
|
1916
|
-
*
|
|
2113
|
+
* An array of results for the Content Moderation model, if it is enabled.
|
|
1917
2114
|
* See [Content moderation](https://www.assemblyai.com/docs/models/content-moderation) for more information.
|
|
1918
2115
|
*/
|
|
1919
2116
|
content_safety_labels?: ContentSafetyLabelsResult | null;
|
|
1920
|
-
/**
|
|
2117
|
+
/**
|
|
2118
|
+
* Customize how words are spelled and formatted using to and from values
|
|
2119
|
+
*/
|
|
1921
2120
|
custom_spelling?: TranscriptCustomSpelling[] | null;
|
|
1922
|
-
/**
|
|
2121
|
+
/**
|
|
2122
|
+
* Whether custom topics is enabled, either true or false
|
|
2123
|
+
*/
|
|
1923
2124
|
custom_topics?: boolean | null;
|
|
1924
|
-
/**
|
|
2125
|
+
/**
|
|
2126
|
+
* Transcribe Filler Words, like "umm", in your media file; can be true or false
|
|
2127
|
+
*/
|
|
1925
2128
|
disfluencies?: boolean | null;
|
|
1926
|
-
/**
|
|
2129
|
+
/**
|
|
2130
|
+
* 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
|
|
2131
|
+
*/
|
|
1927
2132
|
dual_channel?: boolean | null;
|
|
1928
2133
|
/**
|
|
1929
|
-
*
|
|
2134
|
+
* An array of results for the Entity Detection model, if it is enabled.
|
|
1930
2135
|
* See [Entity detection](https://www.assemblyai.com/docs/models/entity-detection) for more information.
|
|
1931
2136
|
*/
|
|
1932
2137
|
entities?: Entity[] | null;
|
|
1933
|
-
/**
|
|
2138
|
+
/**
|
|
2139
|
+
* Whether [Entity Detection](https://www.assemblyai.com/docs/models/entity-detection) is enabled, can be true or false
|
|
2140
|
+
*/
|
|
1934
2141
|
entity_detection?: boolean | null;
|
|
1935
|
-
/**
|
|
2142
|
+
/**
|
|
2143
|
+
* Error message of why the transcript failed
|
|
2144
|
+
*/
|
|
1936
2145
|
error?: string;
|
|
1937
|
-
/**
|
|
2146
|
+
/**
|
|
2147
|
+
* Whether [Profanity Filtering](https://www.assemblyai.com/docs/models/speech-recognition#profanity-filtering) is enabled, either true or false
|
|
2148
|
+
*/
|
|
1938
2149
|
filter_profanity?: boolean | null;
|
|
1939
|
-
/**
|
|
2150
|
+
/**
|
|
2151
|
+
* Whether Text Formatting is enabled, either true or false
|
|
2152
|
+
*/
|
|
1940
2153
|
format_text?: boolean | null;
|
|
1941
|
-
/**
|
|
2154
|
+
/**
|
|
2155
|
+
* Whether [Topic Detection](https://www.assemblyai.com/docs/models/topic-detection) is enabled, can be true or false
|
|
2156
|
+
*/
|
|
1942
2157
|
iab_categories?: boolean | null;
|
|
1943
2158
|
/**
|
|
1944
|
-
*
|
|
2159
|
+
* The result of the Topic Detection model, if it is enabled.
|
|
1945
2160
|
* See [Topic Detection](https://www.assemblyai.com/docs/models/topic-detection) for more information.
|
|
1946
2161
|
*/
|
|
1947
2162
|
iab_categories_result?: TopicDetectionModelResult | null;
|
|
1948
2163
|
/**
|
|
1949
|
-
*
|
|
1950
|
-
* @description The unique identifier of your transcript
|
|
2164
|
+
* The unique identifier of your transcript
|
|
1951
2165
|
*/
|
|
1952
2166
|
id: string;
|
|
1953
2167
|
/**
|
|
1954
|
-
*
|
|
2168
|
+
* The language of your audio file.
|
|
1955
2169
|
* Possible values are found in [Supported Languages](https://www.assemblyai.com/docs/concepts/supported-languages).
|
|
1956
2170
|
* The default value is 'en_us'.
|
|
1957
2171
|
*/
|
|
1958
2172
|
language_code?: TranscriptLanguageCode;
|
|
1959
|
-
/**
|
|
2173
|
+
/**
|
|
2174
|
+
* Whether [Automatic language detection](https://www.assemblyai.com/docs/models/speech-recognition#automatic-language-detection) is enabled, either true or false
|
|
2175
|
+
*/
|
|
1960
2176
|
language_detection?: boolean | null;
|
|
1961
2177
|
/**
|
|
1962
2178
|
* @deprecated
|
|
1963
|
-
*
|
|
2179
|
+
* The language model that was used for the transcript
|
|
1964
2180
|
*/
|
|
1965
2181
|
language_model: string;
|
|
1966
|
-
/**
|
|
2182
|
+
/**
|
|
2183
|
+
* Whether Automatic Punctuation is enabled, either true or false
|
|
2184
|
+
*/
|
|
1967
2185
|
punctuate?: boolean | null;
|
|
1968
|
-
/**
|
|
2186
|
+
/**
|
|
2187
|
+
* Whether [PII Redaction](https://www.assemblyai.com/docs/models/pii-redaction) is enabled, either true or false
|
|
2188
|
+
*/
|
|
1969
2189
|
redact_pii: boolean;
|
|
1970
2190
|
/**
|
|
1971
|
-
*
|
|
2191
|
+
* Whether a redacted version of the audio file was generated,
|
|
1972
2192
|
* either true or false. See [PII redaction](https://www.assemblyai.com/docs/models/pii-redaction) for more information.
|
|
1973
2193
|
*/
|
|
1974
2194
|
redact_pii_audio?: boolean | null;
|
|
1975
2195
|
/**
|
|
1976
|
-
*
|
|
2196
|
+
* The audio quality of the PII-redacted audio file, if redact_pii_audio is enabled.
|
|
1977
2197
|
* See [PII redaction](https://www.assemblyai.com/docs/models/pii-redaction) for more information.
|
|
1978
2198
|
*/
|
|
1979
2199
|
redact_pii_audio_quality?: RedactPiiAudioQuality | null;
|
|
1980
2200
|
/**
|
|
1981
|
-
*
|
|
2201
|
+
* The list of PII Redaction policies that were enabled, if PII Redaction is enabled.
|
|
1982
2202
|
* See [PII redaction](https://www.assemblyai.com/docs/models/pii-redaction) for more information.
|
|
1983
2203
|
*/
|
|
1984
2204
|
redact_pii_policies?: PiiPolicy[] | null;
|
|
1985
|
-
/**
|
|
2205
|
+
/**
|
|
2206
|
+
* 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.
|
|
2207
|
+
*/
|
|
1986
2208
|
redact_pii_sub?: SubstitutionPolicy;
|
|
1987
|
-
/**
|
|
2209
|
+
/**
|
|
2210
|
+
* Whether [Sentiment Analysis](https://www.assemblyai.com/docs/models/sentiment-analysis) is enabled, can be true or false
|
|
2211
|
+
*/
|
|
1988
2212
|
sentiment_analysis?: boolean | null;
|
|
1989
2213
|
/**
|
|
1990
|
-
*
|
|
2214
|
+
* An array of results for the Sentiment Analysis model, if it is enabled.
|
|
1991
2215
|
* See [Sentiment analysis](https://www.assemblyai.com/docs/models/sentiment-analysis) for more information.
|
|
1992
2216
|
*/
|
|
1993
2217
|
sentiment_analysis_results?: SentimentAnalysisResult[] | null;
|
|
1994
|
-
/**
|
|
2218
|
+
/**
|
|
2219
|
+
* Whether [Speaker diarization](https://www.assemblyai.com/docs/models/speaker-diarization) is enabled, can be true or false
|
|
2220
|
+
*/
|
|
1995
2221
|
speaker_labels?: boolean | null;
|
|
1996
|
-
/**
|
|
2222
|
+
/**
|
|
2223
|
+
* 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.
|
|
2224
|
+
*/
|
|
1997
2225
|
speakers_expected?: number | null;
|
|
1998
2226
|
/**
|
|
1999
|
-
*
|
|
2000
|
-
* @
|
|
2227
|
+
* The speech model used for the transcription. When `null`, the default model is used.
|
|
2228
|
+
* @defaultValue "null
|
|
2001
2229
|
*/
|
|
2002
2230
|
speech_model: SpeechModel | null;
|
|
2003
2231
|
/**
|
|
2004
|
-
*
|
|
2005
|
-
*
|
|
2006
|
-
* Valid values are in the range [0, 1] inclusive.
|
|
2232
|
+
* Defaults to null. Reject audio files that contain less than this fraction of speech.
|
|
2233
|
+
* Valid values are in the range [0", 1] inclusive.
|
|
2007
2234
|
*/
|
|
2008
2235
|
speech_threshold?: number | null;
|
|
2009
2236
|
/**
|
|
2010
2237
|
* @deprecated
|
|
2011
|
-
*
|
|
2238
|
+
* Whether speed boost is enabled
|
|
2012
2239
|
*/
|
|
2013
2240
|
speed_boost?: boolean | null;
|
|
2014
|
-
/**
|
|
2241
|
+
/**
|
|
2242
|
+
* The status of your transcript. Possible values are queued, processing, completed, or error.
|
|
2243
|
+
*/
|
|
2015
2244
|
status: TranscriptStatus;
|
|
2016
|
-
/**
|
|
2245
|
+
/**
|
|
2246
|
+
* Whether [Summarization](https://www.assemblyai.com/docs/models/summarization) is enabled, either true or false
|
|
2247
|
+
*/
|
|
2017
2248
|
summarization: boolean;
|
|
2018
|
-
/**
|
|
2249
|
+
/**
|
|
2250
|
+
* The generated summary of the media file, if [Summarization](https://www.assemblyai.com/docs/models/summarization) is enabled
|
|
2251
|
+
*/
|
|
2019
2252
|
summary?: string | null;
|
|
2020
2253
|
/**
|
|
2021
|
-
*
|
|
2254
|
+
* The Summarization model used to generate the summary,
|
|
2022
2255
|
* if [Summarization](https://www.assemblyai.com/docs/models/summarization) is enabled
|
|
2023
2256
|
*/
|
|
2024
2257
|
summary_model?: string | null;
|
|
2025
|
-
/**
|
|
2258
|
+
/**
|
|
2259
|
+
* The type of summary generated, if [Summarization](https://www.assemblyai.com/docs/models/summarization) is enabled
|
|
2260
|
+
*/
|
|
2026
2261
|
summary_type?: string | null;
|
|
2027
|
-
/**
|
|
2262
|
+
/**
|
|
2263
|
+
* The textual transcript of your media file
|
|
2264
|
+
*/
|
|
2028
2265
|
text?: string | null;
|
|
2029
|
-
/**
|
|
2266
|
+
/**
|
|
2267
|
+
* True while a request is throttled and false when a request is no longer throttled
|
|
2268
|
+
*/
|
|
2030
2269
|
throttled?: boolean | null;
|
|
2031
|
-
/**
|
|
2270
|
+
/**
|
|
2271
|
+
* The list of custom topics provided if custom topics is enabled
|
|
2272
|
+
*/
|
|
2032
2273
|
topics?: string[];
|
|
2033
2274
|
/**
|
|
2034
|
-
*
|
|
2275
|
+
* When dual_channel or speaker_labels is enabled, a list of turn-by-turn utterance objects.
|
|
2035
2276
|
* See [Speaker diarization](https://www.assemblyai.com/docs/models/speaker-diarization) for more information.
|
|
2036
2277
|
*/
|
|
2037
2278
|
utterances?: TranscriptUtterance[] | null;
|
|
2038
|
-
/**
|
|
2279
|
+
/**
|
|
2280
|
+
* Whether webhook authentication details were provided
|
|
2281
|
+
*/
|
|
2039
2282
|
webhook_auth: boolean;
|
|
2040
|
-
/**
|
|
2283
|
+
/**
|
|
2284
|
+
* The header name which should be sent back with webhook calls
|
|
2285
|
+
*/
|
|
2041
2286
|
webhook_auth_header_name?: string | null;
|
|
2042
|
-
/**
|
|
2287
|
+
/**
|
|
2288
|
+
* The status code we received from your server when delivering your webhook, if a webhook URL was provided
|
|
2289
|
+
*/
|
|
2043
2290
|
webhook_status_code?: number | null;
|
|
2044
|
-
/**
|
|
2291
|
+
/**
|
|
2292
|
+
* The URL to which we send webhooks upon trancription completion
|
|
2293
|
+
*/
|
|
2045
2294
|
webhook_url?: string | null;
|
|
2046
|
-
/**
|
|
2295
|
+
/**
|
|
2296
|
+
* The list of custom vocabulary to boost transcription probability for
|
|
2297
|
+
*/
|
|
2047
2298
|
word_boost?: string[];
|
|
2048
2299
|
/**
|
|
2049
|
-
*
|
|
2300
|
+
* An array of temporally-sequential word objects, one for each word in the transcript.
|
|
2050
2301
|
* See [Speech recognition](https://www.assemblyai.com/docs/models/speech-recognition) for more information.
|
|
2051
2302
|
*/
|
|
2052
2303
|
words?: TranscriptWord[] | null;
|
|
2053
2304
|
};
|
|
2054
2305
|
/**
|
|
2055
|
-
*
|
|
2056
|
-
* @enum {string}
|
|
2306
|
+
* The word boost parameter value
|
|
2057
2307
|
*/
|
|
2058
2308
|
export type TranscriptBoostParam = "low" | "default" | "high";
|
|
2059
2309
|
/**
|
|
2060
|
-
*
|
|
2061
|
-
* @example
|
|
2310
|
+
* Object containing words or phrases to replace, and the word or phrase to replace with
|
|
2311
|
+
* @example
|
|
2312
|
+
* ```js
|
|
2313
|
+
* {
|
|
2062
2314
|
* "from": [
|
|
2063
2315
|
* "dicarlo"
|
|
2064
2316
|
* ],
|
|
2065
2317
|
* "to": "Decarlo"
|
|
2066
2318
|
* }
|
|
2319
|
+
* ```
|
|
2067
2320
|
*/
|
|
2068
2321
|
export type TranscriptCustomSpelling = {
|
|
2069
|
-
/**
|
|
2322
|
+
/**
|
|
2323
|
+
* Words or phrases to replace
|
|
2324
|
+
*/
|
|
2070
2325
|
from: string[];
|
|
2071
|
-
/**
|
|
2326
|
+
/**
|
|
2327
|
+
* Word or phrase to replace with
|
|
2328
|
+
*/
|
|
2072
2329
|
to: string;
|
|
2073
2330
|
};
|
|
2074
2331
|
/**
|
|
2075
|
-
*
|
|
2332
|
+
* The language of your audio file. Possible values are found in [Supported Languages](https://www.assemblyai.com/docs/concepts/supported-languages).
|
|
2076
2333
|
* The default value is 'en_us'.
|
|
2077
2334
|
*
|
|
2078
|
-
* @
|
|
2079
|
-
* @enum {string}
|
|
2335
|
+
* @defaultValue "en_us
|
|
2080
2336
|
*/
|
|
2081
2337
|
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";
|
|
2082
2338
|
/**
|
|
2083
|
-
* @example
|
|
2339
|
+
* @example
|
|
2340
|
+
* ```js
|
|
2341
|
+
* {
|
|
2084
2342
|
* "page_details": {
|
|
2085
|
-
* "limit": 2,
|
|
2343
|
+
* "limit": 2",
|
|
2086
2344
|
* "result_count": 2,
|
|
2087
2345
|
* "current_url": "https://api.assemblyai.com/v2/transcript?limit=2",
|
|
2088
2346
|
* "prev_url": "https://api.assemblyai.com/v2/transcript?limit=2&before_id=62npeahu2b-a8ea-4112-854c-69542c20d90c",
|
|
@@ -2107,13 +2365,16 @@ export type TranscriptLanguageCode = "en" | "en_au" | "en_uk" | "en_us" | "es" |
|
|
|
2107
2365
|
* }
|
|
2108
2366
|
* ]
|
|
2109
2367
|
* }
|
|
2368
|
+
* ```
|
|
2110
2369
|
*/
|
|
2111
2370
|
export type TranscriptList = {
|
|
2112
2371
|
page_details: PageDetails;
|
|
2113
2372
|
transcripts: TranscriptListItem[];
|
|
2114
2373
|
};
|
|
2115
2374
|
/**
|
|
2116
|
-
* @example
|
|
2375
|
+
* @example
|
|
2376
|
+
* ```js
|
|
2377
|
+
* {
|
|
2117
2378
|
* "id": "9ea68fd3-f953-42c1-9742-976c447fb463",
|
|
2118
2379
|
* "resource_url": "https://api.assemblyai.com/v2/transcript/9ea68fd3-f953-42c1-9742-976c447fb463",
|
|
2119
2380
|
* "status": "completed",
|
|
@@ -2121,19 +2382,21 @@ export type TranscriptList = {
|
|
|
2121
2382
|
* "completed": "2023-11-02T21:49:25.586965",
|
|
2122
2383
|
* "audio_url": "https://github.com/AssemblyAI-Examples/audio-examples/raw/main/20230607_me_canadian_wildfires.mp3"
|
|
2123
2384
|
* }
|
|
2385
|
+
* ```
|
|
2124
2386
|
*/
|
|
2125
2387
|
export type TranscriptListItem = {
|
|
2126
2388
|
audio_url: string;
|
|
2127
2389
|
completed: Date | null;
|
|
2128
2390
|
created: Date;
|
|
2129
|
-
/** Format: uuid */
|
|
2130
2391
|
id: string;
|
|
2131
2392
|
resource_url: string;
|
|
2132
2393
|
status: TranscriptStatus;
|
|
2133
2394
|
};
|
|
2134
2395
|
/**
|
|
2135
|
-
*
|
|
2136
|
-
* @example
|
|
2396
|
+
* The parameters for creating a transcript
|
|
2397
|
+
* @example
|
|
2398
|
+
* ```js
|
|
2399
|
+
* {
|
|
2137
2400
|
* "speech_model": null,
|
|
2138
2401
|
* "language_code": "en_us",
|
|
2139
2402
|
* "punctuate": true,
|
|
@@ -2177,115 +2440,171 @@ export type TranscriptListItem = {
|
|
|
2177
2440
|
* "custom_topics": true,
|
|
2178
2441
|
* "topics": []
|
|
2179
2442
|
* }
|
|
2443
|
+
* ```
|
|
2180
2444
|
*/
|
|
2181
2445
|
export type TranscriptOptionalParams = {
|
|
2182
|
-
/**
|
|
2446
|
+
/**
|
|
2447
|
+
* The point in time, in milliseconds, to stop transcribing in your media file
|
|
2448
|
+
*/
|
|
2183
2449
|
audio_end_at?: number;
|
|
2184
|
-
/**
|
|
2450
|
+
/**
|
|
2451
|
+
* The point in time, in milliseconds, to begin transcribing in your media file
|
|
2452
|
+
*/
|
|
2185
2453
|
audio_start_from?: number;
|
|
2186
|
-
/**
|
|
2454
|
+
/**
|
|
2455
|
+
* Enable [Auto Chapters](https://www.assemblyai.com/docs/models/auto-chapters), can be true or false
|
|
2456
|
+
*/
|
|
2187
2457
|
auto_chapters?: boolean;
|
|
2188
|
-
/**
|
|
2458
|
+
/**
|
|
2459
|
+
* Whether Key Phrases is enabled, either true or false
|
|
2460
|
+
*/
|
|
2189
2461
|
auto_highlights?: boolean;
|
|
2190
|
-
/**
|
|
2462
|
+
/**
|
|
2463
|
+
* The word boost parameter value
|
|
2464
|
+
*/
|
|
2191
2465
|
boost_param?: TranscriptBoostParam;
|
|
2192
|
-
/**
|
|
2466
|
+
/**
|
|
2467
|
+
* Enable [Content Moderation](https://www.assemblyai.com/docs/models/content-moderation), can be true or false
|
|
2468
|
+
*/
|
|
2193
2469
|
content_safety?: boolean;
|
|
2194
|
-
/**
|
|
2470
|
+
/**
|
|
2471
|
+
* The confidence threshold for content moderation. Values must be between 25 and 100.
|
|
2472
|
+
*/
|
|
2195
2473
|
content_safety_confidence?: number;
|
|
2196
|
-
/**
|
|
2474
|
+
/**
|
|
2475
|
+
* Customize how words are spelled and formatted using to and from values
|
|
2476
|
+
*/
|
|
2197
2477
|
custom_spelling?: TranscriptCustomSpelling[];
|
|
2198
|
-
/**
|
|
2478
|
+
/**
|
|
2479
|
+
* Whether custom topics is enabled, either true or false
|
|
2480
|
+
*/
|
|
2199
2481
|
custom_topics?: boolean;
|
|
2200
|
-
/**
|
|
2482
|
+
/**
|
|
2483
|
+
* Transcribe Filler Words, like "umm", in your media file; can be true or false
|
|
2484
|
+
*/
|
|
2201
2485
|
disfluencies?: boolean;
|
|
2202
|
-
/**
|
|
2486
|
+
/**
|
|
2487
|
+
* Enable [Dual Channel](https://www.assemblyai.com/docs/models/speech-recognition#dual-channel-transcription) transcription, can be true or false.
|
|
2488
|
+
*/
|
|
2203
2489
|
dual_channel?: boolean;
|
|
2204
|
-
/**
|
|
2490
|
+
/**
|
|
2491
|
+
* Enable [Entity Detection](https://www.assemblyai.com/docs/models/entity-detection), can be true or false
|
|
2492
|
+
*/
|
|
2205
2493
|
entity_detection?: boolean;
|
|
2206
|
-
/**
|
|
2494
|
+
/**
|
|
2495
|
+
* Filter profanity from the transcribed text, can be true or false
|
|
2496
|
+
*/
|
|
2207
2497
|
filter_profanity?: boolean;
|
|
2208
|
-
/**
|
|
2498
|
+
/**
|
|
2499
|
+
* Enable Text Formatting, can be true or false
|
|
2500
|
+
*/
|
|
2209
2501
|
format_text?: boolean;
|
|
2210
|
-
/**
|
|
2502
|
+
/**
|
|
2503
|
+
* Enable [Topic Detection](https://www.assemblyai.com/docs/models/topic-detection), can be true or false
|
|
2504
|
+
*/
|
|
2211
2505
|
iab_categories?: boolean;
|
|
2212
2506
|
/**
|
|
2213
|
-
*
|
|
2507
|
+
* The language of your audio file. Possible values are found in [Supported Languages](https://www.assemblyai.com/docs/concepts/supported-languages).
|
|
2214
2508
|
* The default value is 'en_us'.
|
|
2215
2509
|
*/
|
|
2216
2510
|
language_code?: TranscriptLanguageCode | null;
|
|
2217
|
-
/**
|
|
2511
|
+
/**
|
|
2512
|
+
* 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.
|
|
2513
|
+
*/
|
|
2218
2514
|
language_detection?: boolean;
|
|
2219
|
-
/**
|
|
2515
|
+
/**
|
|
2516
|
+
* Enable Automatic Punctuation, can be true or false
|
|
2517
|
+
*/
|
|
2220
2518
|
punctuate?: boolean;
|
|
2221
|
-
/**
|
|
2519
|
+
/**
|
|
2520
|
+
* Redact PII from the transcribed text using the Redact PII model, can be true or false
|
|
2521
|
+
*/
|
|
2222
2522
|
redact_pii?: boolean;
|
|
2223
|
-
/**
|
|
2523
|
+
/**
|
|
2524
|
+
* 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.
|
|
2525
|
+
*/
|
|
2224
2526
|
redact_pii_audio?: boolean;
|
|
2225
2527
|
/**
|
|
2226
|
-
*
|
|
2227
|
-
* @
|
|
2528
|
+
* 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.
|
|
2529
|
+
* @defaultValue "mp3"
|
|
2228
2530
|
*/
|
|
2229
2531
|
redact_pii_audio_quality?: RedactPiiAudioQuality;
|
|
2230
|
-
/**
|
|
2532
|
+
/**
|
|
2533
|
+
* The list of PII Redaction policies to enable. See [PII redaction](https://www.assemblyai.com/docs/models/pii-redaction) for more details.
|
|
2534
|
+
*/
|
|
2231
2535
|
redact_pii_policies?: PiiPolicy[];
|
|
2232
|
-
/**
|
|
2536
|
+
/**
|
|
2537
|
+
* 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.
|
|
2538
|
+
*/
|
|
2233
2539
|
redact_pii_sub?: SubstitutionPolicy | null;
|
|
2234
|
-
/**
|
|
2540
|
+
/**
|
|
2541
|
+
* Enable [Sentiment Analysis](https://www.assemblyai.com/docs/models/sentiment-analysis), can be true or false
|
|
2542
|
+
*/
|
|
2235
2543
|
sentiment_analysis?: boolean;
|
|
2236
|
-
/**
|
|
2544
|
+
/**
|
|
2545
|
+
* Enable [Speaker diarization](https://www.assemblyai.com/docs/models/speaker-diarization), can be true or false
|
|
2546
|
+
*/
|
|
2237
2547
|
speaker_labels?: boolean;
|
|
2238
2548
|
/**
|
|
2239
|
-
*
|
|
2240
|
-
* @
|
|
2549
|
+
* 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.
|
|
2550
|
+
* @defaultValue "null
|
|
2241
2551
|
*/
|
|
2242
2552
|
speakers_expected?: number | null;
|
|
2243
2553
|
/**
|
|
2244
|
-
*
|
|
2245
|
-
* @
|
|
2554
|
+
* The speech model to use for the transcription. When `null`, the default model is used.
|
|
2555
|
+
* @defaultValue null
|
|
2246
2556
|
*/
|
|
2247
2557
|
speech_model?: SpeechModel | null;
|
|
2248
2558
|
/**
|
|
2249
|
-
*
|
|
2250
|
-
*
|
|
2251
|
-
* Valid values are in the range [0, 1] inclusive.
|
|
2559
|
+
* Reject audio files that contain less than this fraction of speech.
|
|
2560
|
+
* Valid values are in the range [0", 1] inclusive.
|
|
2252
2561
|
*
|
|
2253
|
-
* @
|
|
2562
|
+
* @defaultValue "null
|
|
2254
2563
|
*/
|
|
2255
2564
|
speech_threshold?: number | null;
|
|
2256
|
-
/**
|
|
2565
|
+
/**
|
|
2566
|
+
* Enable [Summarization](https://www.assemblyai.com/docs/models/summarization), can be true or false
|
|
2567
|
+
*/
|
|
2257
2568
|
summarization?: boolean;
|
|
2258
2569
|
/**
|
|
2259
|
-
*
|
|
2260
|
-
* @
|
|
2570
|
+
* The model to summarize the transcript
|
|
2571
|
+
* @defaultValue informative
|
|
2261
2572
|
*/
|
|
2262
2573
|
summary_model?: SummaryModel;
|
|
2263
2574
|
/**
|
|
2264
|
-
*
|
|
2265
|
-
* @
|
|
2575
|
+
* The type of summary
|
|
2576
|
+
* @defaultValue bullets
|
|
2266
2577
|
*/
|
|
2267
2578
|
summary_type?: SummaryType;
|
|
2268
|
-
/**
|
|
2579
|
+
/**
|
|
2580
|
+
* The list of custom topics provided, if custom topics is enabled
|
|
2581
|
+
*/
|
|
2269
2582
|
topics?: string[];
|
|
2270
2583
|
/**
|
|
2271
|
-
*
|
|
2272
|
-
* @
|
|
2584
|
+
* The header name which should be sent back with webhook calls
|
|
2585
|
+
* @defaultValue null
|
|
2273
2586
|
*/
|
|
2274
2587
|
webhook_auth_header_name?: string | null;
|
|
2275
2588
|
/**
|
|
2276
|
-
*
|
|
2277
|
-
* @
|
|
2589
|
+
* Specify a header name and value to send back with a webhook call for added security
|
|
2590
|
+
* @defaultValue null
|
|
2278
2591
|
*/
|
|
2279
2592
|
webhook_auth_header_value?: string | null;
|
|
2280
|
-
/**
|
|
2593
|
+
/**
|
|
2594
|
+
* The URL to which AssemblyAI send webhooks upon trancription completion
|
|
2595
|
+
*/
|
|
2281
2596
|
webhook_url?: string;
|
|
2282
|
-
/**
|
|
2597
|
+
/**
|
|
2598
|
+
* The list of custom vocabulary to boost transcription probability for
|
|
2599
|
+
*/
|
|
2283
2600
|
word_boost?: string[];
|
|
2284
2601
|
};
|
|
2285
2602
|
/**
|
|
2286
|
-
* @example
|
|
2603
|
+
* @example
|
|
2604
|
+
* ```js
|
|
2605
|
+
* {
|
|
2287
2606
|
* "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.",
|
|
2288
|
-
* "start": 250,
|
|
2607
|
+
* "start": 250",
|
|
2289
2608
|
* "end": 26950,
|
|
2290
2609
|
* "confidence": 0.73033,
|
|
2291
2610
|
* "words": [
|
|
@@ -2319,24 +2638,56 @@ export type TranscriptOptionalParams = {
|
|
|
2319
2638
|
* }
|
|
2320
2639
|
* ]
|
|
2321
2640
|
* }
|
|
2641
|
+
* ```
|
|
2322
2642
|
*/
|
|
2323
2643
|
export type TranscriptParagraph = {
|
|
2324
|
-
/** Format: double */
|
|
2325
2644
|
confidence: number;
|
|
2326
2645
|
end: number;
|
|
2327
|
-
/**
|
|
2646
|
+
/**
|
|
2647
|
+
* The speaker of the sentence if [Speaker Diarization](https://www.assemblyai.com/docs/models/speaker-diarization) is enabled, else null
|
|
2648
|
+
*/
|
|
2328
2649
|
speaker?: string | null;
|
|
2329
2650
|
start: number;
|
|
2330
2651
|
text: string;
|
|
2331
2652
|
words: TranscriptWord[];
|
|
2332
2653
|
};
|
|
2333
|
-
/**
|
|
2654
|
+
/**
|
|
2655
|
+
* The parameters for creating a transcript
|
|
2656
|
+
*/
|
|
2334
2657
|
export type TranscriptParams = TranscriptOptionalParams & {
|
|
2335
|
-
/**
|
|
2658
|
+
/**
|
|
2659
|
+
* The URL of the audio or video file to transcribe.
|
|
2660
|
+
*/
|
|
2336
2661
|
audio_url: string;
|
|
2337
2662
|
};
|
|
2338
2663
|
/**
|
|
2339
|
-
*
|
|
2664
|
+
* The notification when the transcript status is completed or error.
|
|
2665
|
+
* @example
|
|
2666
|
+
* ```js
|
|
2667
|
+
* {
|
|
2668
|
+
* "transcript_id": "9ea68fd3-f953-42c1-9742-976c447fb463",
|
|
2669
|
+
* "status": "completed"
|
|
2670
|
+
* }
|
|
2671
|
+
* ```
|
|
2672
|
+
*/
|
|
2673
|
+
export type TranscriptReadyNotification = {
|
|
2674
|
+
/**
|
|
2675
|
+
* The status of the transcript. Either completed or error.
|
|
2676
|
+
*/
|
|
2677
|
+
status: TranscriptReadyStatus;
|
|
2678
|
+
/**
|
|
2679
|
+
* The ID of the transcript
|
|
2680
|
+
*/
|
|
2681
|
+
transcript_id: string;
|
|
2682
|
+
};
|
|
2683
|
+
/**
|
|
2684
|
+
* The status of the transcript. Either completed or error.
|
|
2685
|
+
*/
|
|
2686
|
+
export type TranscriptReadyStatus = "completed" | "error";
|
|
2687
|
+
/**
|
|
2688
|
+
* @example
|
|
2689
|
+
* ```js
|
|
2690
|
+
* {
|
|
2340
2691
|
* "text": "Smoke from hundreds of wildfires in Canada is triggering air quality alerts throughout the US.",
|
|
2341
2692
|
* "start": 250,
|
|
2342
2693
|
* "end": 6350,
|
|
@@ -2373,24 +2724,27 @@ export type TranscriptParams = TranscriptOptionalParams & {
|
|
|
2373
2724
|
* ],
|
|
2374
2725
|
* "speaker": null
|
|
2375
2726
|
* }
|
|
2727
|
+
* ```
|
|
2376
2728
|
*/
|
|
2377
2729
|
export type TranscriptSentence = {
|
|
2378
|
-
/** Format: double */
|
|
2379
2730
|
confidence: number;
|
|
2380
2731
|
end: number;
|
|
2381
|
-
/**
|
|
2732
|
+
/**
|
|
2733
|
+
* The speaker of the sentence if [Speaker Diarization](https://www.assemblyai.com/docs/models/speaker-diarization) is enabled, else null
|
|
2734
|
+
*/
|
|
2382
2735
|
speaker?: string | null;
|
|
2383
2736
|
start: number;
|
|
2384
2737
|
text: string;
|
|
2385
2738
|
words: TranscriptWord[];
|
|
2386
2739
|
};
|
|
2387
2740
|
/**
|
|
2388
|
-
*
|
|
2389
|
-
* @enum {string}
|
|
2741
|
+
* The status of your transcript. Possible values are queued, processing, completed, or error.
|
|
2390
2742
|
*/
|
|
2391
2743
|
export type TranscriptStatus = "queued" | "processing" | "completed" | "error";
|
|
2392
2744
|
/**
|
|
2393
|
-
* @example
|
|
2745
|
+
* @example
|
|
2746
|
+
* ```js
|
|
2747
|
+
* {
|
|
2394
2748
|
* "confidence": 0.9359033333333334,
|
|
2395
2749
|
* "end": 26950,
|
|
2396
2750
|
* "speaker": "A",
|
|
@@ -2504,53 +2858,74 @@ export type TranscriptStatus = "queued" | "processing" | "completed" | "error";
|
|
|
2504
2858
|
* }
|
|
2505
2859
|
* ]
|
|
2506
2860
|
* }
|
|
2861
|
+
* ```
|
|
2507
2862
|
*/
|
|
2508
2863
|
export type TranscriptUtterance = {
|
|
2509
2864
|
/**
|
|
2510
|
-
*
|
|
2511
|
-
* @description The confidence score for the transcript of this utterance
|
|
2865
|
+
* The confidence score for the transcript of this utterance
|
|
2512
2866
|
*/
|
|
2513
2867
|
confidence: number;
|
|
2514
|
-
/**
|
|
2868
|
+
/**
|
|
2869
|
+
* The ending time, in milliseconds, of the utterance in the audio file
|
|
2870
|
+
*/
|
|
2515
2871
|
end: number;
|
|
2516
|
-
/**
|
|
2872
|
+
/**
|
|
2873
|
+
* The speaker of this utterance, where each speaker is assigned a sequential capital letter - e.g. "A" for Speaker A, "B" for Speaker B, etc.
|
|
2874
|
+
*/
|
|
2517
2875
|
speaker: string;
|
|
2518
|
-
/**
|
|
2876
|
+
/**
|
|
2877
|
+
* The starting time, in milliseconds, of the utterance in the audio file
|
|
2878
|
+
*/
|
|
2519
2879
|
start: number;
|
|
2520
|
-
/**
|
|
2880
|
+
/**
|
|
2881
|
+
* The text for this utterance
|
|
2882
|
+
*/
|
|
2521
2883
|
text: string;
|
|
2522
|
-
/**
|
|
2884
|
+
/**
|
|
2885
|
+
* The words in the utterance.
|
|
2886
|
+
*/
|
|
2523
2887
|
words: TranscriptWord[];
|
|
2524
2888
|
};
|
|
2525
2889
|
/**
|
|
2526
|
-
* @example
|
|
2890
|
+
* @example
|
|
2891
|
+
* ```js
|
|
2892
|
+
* {
|
|
2527
2893
|
* "text": "Smoke",
|
|
2528
2894
|
* "start": 250,
|
|
2529
2895
|
* "end": 650,
|
|
2530
2896
|
* "confidence": 0.97465,
|
|
2531
2897
|
* "speaker": null
|
|
2532
2898
|
* }
|
|
2899
|
+
* ```
|
|
2533
2900
|
*/
|
|
2534
2901
|
export type TranscriptWord = {
|
|
2535
|
-
/** Format: double */
|
|
2536
2902
|
confidence: number;
|
|
2537
2903
|
end: number;
|
|
2538
|
-
/**
|
|
2904
|
+
/**
|
|
2905
|
+
* The speaker of the sentence if [Speaker Diarization](https://www.assemblyai.com/docs/models/speaker-diarization) is enabled, else null
|
|
2906
|
+
*/
|
|
2539
2907
|
speaker?: string | null;
|
|
2540
2908
|
start: number;
|
|
2541
2909
|
text: string;
|
|
2542
2910
|
};
|
|
2543
2911
|
/**
|
|
2544
|
-
* @example
|
|
2912
|
+
* @example
|
|
2913
|
+
* ```js
|
|
2914
|
+
* {
|
|
2545
2915
|
* "upload_url": "https://cdn.assemblyai.com/upload/f756988d-47e2-4ca3-96ce-04bb168f8f2a"
|
|
2546
2916
|
* }
|
|
2917
|
+
* ```
|
|
2547
2918
|
*/
|
|
2548
2919
|
export type UploadedFile = {
|
|
2549
|
-
/**
|
|
2920
|
+
/**
|
|
2921
|
+
* A URL that points to your audio file, accessible only by AssemblyAI's servers
|
|
2922
|
+
*/
|
|
2550
2923
|
upload_url: string;
|
|
2551
2924
|
};
|
|
2552
2925
|
/**
|
|
2553
|
-
* @example
|
|
2926
|
+
* @example
|
|
2927
|
+
* ```js
|
|
2928
|
+
* {
|
|
2554
2929
|
* "text": "smoke",
|
|
2555
2930
|
* "count": 6,
|
|
2556
2931
|
* "timestamps": [
|
|
@@ -2588,19 +2963,30 @@ export type UploadedFile = {
|
|
|
2588
2963
|
* 698
|
|
2589
2964
|
* ]
|
|
2590
2965
|
* }
|
|
2966
|
+
* ```
|
|
2591
2967
|
*/
|
|
2592
2968
|
export type WordSearchMatch = {
|
|
2593
|
-
/**
|
|
2969
|
+
/**
|
|
2970
|
+
* The total amount of times the word is in the transcript
|
|
2971
|
+
*/
|
|
2594
2972
|
count: number;
|
|
2595
|
-
/**
|
|
2973
|
+
/**
|
|
2974
|
+
* An array of all index locations for that word within the `words` array of the completed transcript
|
|
2975
|
+
*/
|
|
2596
2976
|
indexes: number[];
|
|
2597
|
-
/**
|
|
2977
|
+
/**
|
|
2978
|
+
* The matched word
|
|
2979
|
+
*/
|
|
2598
2980
|
text: string;
|
|
2599
|
-
/**
|
|
2981
|
+
/**
|
|
2982
|
+
* An array of timestamps
|
|
2983
|
+
*/
|
|
2600
2984
|
timestamps: WordSearchTimestamp[];
|
|
2601
2985
|
};
|
|
2602
2986
|
/**
|
|
2603
|
-
* @example
|
|
2987
|
+
* @example
|
|
2988
|
+
* ```js
|
|
2989
|
+
* {
|
|
2604
2990
|
* "id": "d5a3d302-066e-43fb-b63b-8f57baf185db",
|
|
2605
2991
|
* "total_count": 10,
|
|
2606
2992
|
* "matches": [
|
|
@@ -2672,24 +3058,31 @@ export type WordSearchMatch = {
|
|
|
2672
3058
|
* }
|
|
2673
3059
|
* ]
|
|
2674
3060
|
* }
|
|
3061
|
+
* ```
|
|
2675
3062
|
*/
|
|
2676
3063
|
export type WordSearchResponse = {
|
|
2677
3064
|
/**
|
|
2678
|
-
*
|
|
2679
|
-
* @description The ID of the transcript
|
|
3065
|
+
* The ID of the transcript
|
|
2680
3066
|
*/
|
|
2681
3067
|
id: string;
|
|
2682
|
-
/**
|
|
3068
|
+
/**
|
|
3069
|
+
* The matches of the search
|
|
3070
|
+
*/
|
|
2683
3071
|
matches: WordSearchMatch[];
|
|
2684
|
-
/**
|
|
3072
|
+
/**
|
|
3073
|
+
* 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.
|
|
3074
|
+
*/
|
|
2685
3075
|
total_count: number;
|
|
2686
3076
|
};
|
|
2687
3077
|
/**
|
|
2688
|
-
*
|
|
2689
|
-
* @example
|
|
3078
|
+
* An array of timestamps structured as [`start_time`, `end_time`] in milliseconds
|
|
3079
|
+
* @example
|
|
3080
|
+
* ```js
|
|
3081
|
+
* [
|
|
2690
3082
|
* 250,
|
|
2691
3083
|
* 650
|
|
2692
3084
|
* ]
|
|
3085
|
+
* ```
|
|
2693
3086
|
*/
|
|
2694
3087
|
export type WordSearchTimestamp = number[];
|
|
2695
3088
|
export {};
|