assemblyai 3.0.1 → 3.1.0
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/README.md +15 -3
- package/dist/index.d.ts +1 -1
- package/dist/index.esm.js +20 -10
- package/dist/index.js +20 -10
- package/dist/services/transcripts/index.d.ts +4 -3
- package/dist/types/asyncapi.generated.d.ts +20 -17
- package/dist/types/index.d.ts +6 -6
- package/dist/types/openapi.generated.d.ts +116 -99
- package/dist/types/services/index.d.ts +1 -1
- package/dist/types/transcripts/index.d.ts +16 -2
- package/package.json +1 -1
- package/src/index.ts +1 -1
- package/src/services/transcripts/index.ts +25 -12
- package/src/types/asyncapi.generated.ts +20 -17
- package/src/types/index.ts +6 -6
- package/src/types/openapi.generated.ts +117 -99
- package/src/types/services/index.ts +1 -1
- package/src/types/transcripts/index.ts +16 -2
|
@@ -14,7 +14,7 @@ type OneOf<T extends any[]> = T extends [infer Only]
|
|
|
14
14
|
: never;
|
|
15
15
|
|
|
16
16
|
/**
|
|
17
|
-
* @description
|
|
17
|
+
* @description Either success, or unavailable in the rare case that the model failed
|
|
18
18
|
* @enum {string}
|
|
19
19
|
*/
|
|
20
20
|
export type AudioIntelligenceModelStatus = "success" | "unavailable";
|
|
@@ -34,13 +34,13 @@ export type AutoHighlightResult = {
|
|
|
34
34
|
};
|
|
35
35
|
|
|
36
36
|
/**
|
|
37
|
-
* @description An array of results for the Key Phrases model, if it
|
|
37
|
+
* @description An array of results for the Key Phrases model, if it is enabled.
|
|
38
38
|
* See [Key phrases](https://www.assemblyai.com/docs/Models/key_phrases) for more information.
|
|
39
39
|
*/
|
|
40
40
|
export type AutoHighlightsResult = {
|
|
41
41
|
/** @description A temporally-sequential array of Key Phrases */
|
|
42
42
|
results: AutoHighlightResult[];
|
|
43
|
-
}
|
|
43
|
+
};
|
|
44
44
|
|
|
45
45
|
/** @description Chapter of the audio file */
|
|
46
46
|
export type Chapter = {
|
|
@@ -72,7 +72,7 @@ export type ContentSafetyLabel = {
|
|
|
72
72
|
};
|
|
73
73
|
|
|
74
74
|
export type ContentSafetyLabelResult = {
|
|
75
|
-
/** @description An array of
|
|
75
|
+
/** @description An array of safety labels, one per sensitive topic that was detected in the section */
|
|
76
76
|
labels: ContentSafetyLabel[];
|
|
77
77
|
/** @description The sentence index at which the section ends */
|
|
78
78
|
sentences_idx_end: number;
|
|
@@ -84,22 +84,26 @@ export type ContentSafetyLabelResult = {
|
|
|
84
84
|
timestamp: Timestamp;
|
|
85
85
|
};
|
|
86
86
|
|
|
87
|
+
/**
|
|
88
|
+
* @description An array of results for the Content Moderation model, if it is enabled.
|
|
89
|
+
* See [Content moderation](https://www.assemblyai.com/docs/Models/content_moderation) for more information.
|
|
90
|
+
*/
|
|
87
91
|
export type ContentSafetyLabelsResult = {
|
|
88
92
|
results: ContentSafetyLabelResult[];
|
|
89
93
|
/** @description A summary of the Content Moderation severity results for the entire audio file */
|
|
90
94
|
severity_score_summary: {
|
|
91
95
|
[key: string]: SeverityScoreSummary;
|
|
92
96
|
};
|
|
93
|
-
/** @description
|
|
97
|
+
/** @description The status of the Content Moderation model. Either success, or unavailable in the rare case that the model failed. */
|
|
94
98
|
status: AudioIntelligenceModelStatus;
|
|
95
99
|
/** @description A summary of the Content Moderation confidence results for the entire audio file */
|
|
96
100
|
summary: {
|
|
97
101
|
[key: string]: number;
|
|
98
102
|
};
|
|
99
|
-
}
|
|
103
|
+
};
|
|
100
104
|
|
|
101
105
|
export type CreateRealtimeTemporaryTokenParameters = {
|
|
102
|
-
/** @description The amount of time until the token expires in seconds
|
|
106
|
+
/** @description The amount of time until the token expires in seconds */
|
|
103
107
|
expires_in: number;
|
|
104
108
|
};
|
|
105
109
|
|
|
@@ -107,29 +111,29 @@ export type CreateRealtimeTemporaryTokenParameters = {
|
|
|
107
111
|
export type CreateTranscriptOptionalParameters = {
|
|
108
112
|
/** @description The point in time, in milliseconds, to stop transcribing in your media file */
|
|
109
113
|
audio_end_at?: number;
|
|
110
|
-
/** @description The point in time, in milliseconds, to begin
|
|
114
|
+
/** @description The point in time, in milliseconds, to begin transcribing in your media file */
|
|
111
115
|
audio_start_from?: number;
|
|
112
116
|
/** @description Enable [Auto Chapters](https://www.assemblyai.com/docs/Models/auto_chapters), can be true or false */
|
|
113
117
|
auto_chapters?: boolean;
|
|
114
|
-
/** @description Whether Key Phrases
|
|
118
|
+
/** @description Whether Key Phrases is enabled, either true or false */
|
|
115
119
|
auto_highlights?: boolean;
|
|
116
|
-
/** @description The word boost parameter value
|
|
120
|
+
/** @description The word boost parameter value */
|
|
117
121
|
boost_param?: TranscriptBoostParam;
|
|
118
122
|
/** @description Enable [Content Moderation](https://www.assemblyai.com/docs/Models/content_moderation), can be true or false */
|
|
119
123
|
content_safety?: boolean;
|
|
120
124
|
/** @description Customize how words are spelled and formatted using to and from values */
|
|
121
125
|
custom_spelling?: TranscriptCustomSpelling[];
|
|
122
|
-
/** @description Whether custom topics
|
|
126
|
+
/** @description Whether custom topics is enabled, either true or false */
|
|
123
127
|
custom_topics?: boolean;
|
|
124
|
-
/** @description Transcribe Filler Words, like "umm", in your media file; can be true or false
|
|
128
|
+
/** @description Transcribe Filler Words, like "umm", in your media file; can be true or false */
|
|
125
129
|
disfluencies?: boolean;
|
|
126
|
-
/** @description Enable [Dual Channel](https://assemblyai.com/docs/Models/speech_recognition#dual-channel-transcription) transcription, can be true or false
|
|
130
|
+
/** @description Enable [Dual Channel](https://assemblyai.com/docs/Models/speech_recognition#dual-channel-transcription) transcription, can be true or false */
|
|
127
131
|
dual_channel?: boolean;
|
|
128
132
|
/** @description Enable [Entity Detection](https://www.assemblyai.com/docs/Models/entity_detection), can be true or false */
|
|
129
133
|
entity_detection?: boolean;
|
|
130
|
-
/** @description Filter profanity from the transcribed text, can be true or false
|
|
134
|
+
/** @description Filter profanity from the transcribed text, can be true or false */
|
|
131
135
|
filter_profanity?: boolean;
|
|
132
|
-
/** @description Enable Text Formatting, can be true or false
|
|
136
|
+
/** @description Enable Text Formatting, can be true or false */
|
|
133
137
|
format_text?: boolean;
|
|
134
138
|
/** @description Enable [Topic Detection](https://www.assemblyai.com/docs/Models/iab_classification), can be true or false */
|
|
135
139
|
iab_categories?: boolean;
|
|
@@ -137,10 +141,10 @@ export type CreateTranscriptOptionalParameters = {
|
|
|
137
141
|
* @description The language of your audio file. Possible values are found in [Supported Languages](https://www.assemblyai.com/docs/Concepts/supported_languages).
|
|
138
142
|
* The default value is 'en_us'.
|
|
139
143
|
*/
|
|
140
|
-
language_code?: TranscriptLanguageCode;
|
|
141
|
-
/** @description Whether [Automatic language detection](https://www.assemblyai.com/docs/Models/speech_recognition#automatic-language-detection)
|
|
144
|
+
language_code?: TranscriptLanguageCode | null;
|
|
145
|
+
/** @description Whether [Automatic language detection](https://www.assemblyai.com/docs/Models/speech_recognition#automatic-language-detection) is enabled, either true or false */
|
|
142
146
|
language_detection?: boolean;
|
|
143
|
-
/** @description Enable Automatic Punctuation, can be true or false
|
|
147
|
+
/** @description Enable Automatic Punctuation, can be true or false */
|
|
144
148
|
punctuate?: boolean;
|
|
145
149
|
/** @description Redact PII from the transcribed text using the Redact PII model, can be true or false */
|
|
146
150
|
redact_pii?: boolean;
|
|
@@ -154,13 +158,13 @@ export type CreateTranscriptOptionalParameters = {
|
|
|
154
158
|
/** @description The list of PII Redaction policies to enable. See [PII redaction](https://www.assemblyai.com/docs/Models/pii_redaction) for more details. */
|
|
155
159
|
redact_pii_policies?: PiiPolicy[];
|
|
156
160
|
/** @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. */
|
|
157
|
-
redact_pii_sub?: SubstitutionPolicy;
|
|
161
|
+
redact_pii_sub?: SubstitutionPolicy | null;
|
|
158
162
|
/** @description Enable [Sentiment Analysis](https://www.assemblyai.com/docs/Models/sentiment_analysis), can be true or false */
|
|
159
163
|
sentiment_analysis?: boolean;
|
|
160
164
|
/** @description Enable [Speaker diarization](https://www.assemblyai.com/docs/Models/speaker_diarization), can be true or false */
|
|
161
165
|
speaker_labels?: boolean;
|
|
162
166
|
/**
|
|
163
|
-
* @description
|
|
167
|
+
* @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.
|
|
164
168
|
* @default null
|
|
165
169
|
*/
|
|
166
170
|
speakers_expected?: number | null;
|
|
@@ -184,21 +188,21 @@ export type CreateTranscriptOptionalParameters = {
|
|
|
184
188
|
* @default bullets
|
|
185
189
|
*/
|
|
186
190
|
summary_type?: SummaryType;
|
|
187
|
-
/** @description The list of custom topics provided if custom topics
|
|
191
|
+
/** @description The list of custom topics provided, if custom topics is enabled */
|
|
188
192
|
topics?: string[];
|
|
189
193
|
/**
|
|
190
|
-
* @description The header name which should be sent back with webhook calls
|
|
194
|
+
* @description The header name which should be sent back with webhook calls
|
|
191
195
|
* @default null
|
|
192
196
|
*/
|
|
193
197
|
webhook_auth_header_name?: string | null;
|
|
194
198
|
/**
|
|
195
|
-
* @description
|
|
199
|
+
* @description Specify a header name and value to send back with a webhook call for added security
|
|
196
200
|
* @default null
|
|
197
201
|
*/
|
|
198
202
|
webhook_auth_header_value?: string | null;
|
|
199
|
-
/** @description The URL to which
|
|
203
|
+
/** @description The URL to which AssemblyAI send webhooks upon trancription completion */
|
|
200
204
|
webhook_url?: string;
|
|
201
|
-
/** @description The list of custom vocabulary to boost transcription probability for
|
|
205
|
+
/** @description The list of custom vocabulary to boost transcription probability for */
|
|
202
206
|
word_boost?: string[];
|
|
203
207
|
};
|
|
204
208
|
|
|
@@ -265,7 +269,7 @@ export type Error = {
|
|
|
265
269
|
export type LemurActionItemsParameters = LemurBaseParameters;
|
|
266
270
|
|
|
267
271
|
export type LemurActionItemsResponse = LemurBaseResponse & {
|
|
268
|
-
/** @description The response generated by LeMUR
|
|
272
|
+
/** @description The response generated by LeMUR */
|
|
269
273
|
response: string;
|
|
270
274
|
};
|
|
271
275
|
|
|
@@ -280,7 +284,12 @@ export type LemurBaseParameters = {
|
|
|
280
284
|
]
|
|
281
285
|
>;
|
|
282
286
|
final_model?: LemurModel;
|
|
283
|
-
/**
|
|
287
|
+
/**
|
|
288
|
+
* @description Custom formatted transcript data. Maximum size is the context limit of the selected model, which defaults to 100000.
|
|
289
|
+
* Use either transcript_ids or input_text as input into LeMUR.
|
|
290
|
+
*/
|
|
291
|
+
input_text?: string;
|
|
292
|
+
/** @description Max output size in tokens, up to 4000 */
|
|
284
293
|
max_output_size?: number;
|
|
285
294
|
/**
|
|
286
295
|
* Format: float
|
|
@@ -289,8 +298,11 @@ export type LemurBaseParameters = {
|
|
|
289
298
|
* Can be any value between 0.0 and 1.0 inclusive.
|
|
290
299
|
*/
|
|
291
300
|
temperature?: number;
|
|
292
|
-
/**
|
|
293
|
-
|
|
301
|
+
/**
|
|
302
|
+
* @description A list of completed transcripts with text. Up to a maximum of 100 files or 100 hours, whichever is lower.
|
|
303
|
+
* Use either transcript_ids or input_text as input into LeMUR.
|
|
304
|
+
*/
|
|
305
|
+
transcript_ids?: string[];
|
|
294
306
|
};
|
|
295
307
|
|
|
296
308
|
export type LemurBaseResponse = {
|
|
@@ -310,7 +322,7 @@ export type LemurQuestion = {
|
|
|
310
322
|
answer_format?: string;
|
|
311
323
|
/** @description What discrete options to return. Useful for precise responses. Can't be used with answer_format. Example: ["Yes", "No"] */
|
|
312
324
|
answer_options?: string[];
|
|
313
|
-
/** @description Any context about the transcripts you wish to provide. This can be a string
|
|
325
|
+
/** @description Any context about the transcripts you wish to provide. This can be a string or any object. */
|
|
314
326
|
context?: OneOf<
|
|
315
327
|
[
|
|
316
328
|
string,
|
|
@@ -323,21 +335,21 @@ export type LemurQuestion = {
|
|
|
323
335
|
question: string;
|
|
324
336
|
};
|
|
325
337
|
|
|
326
|
-
/** @description An answer generated by LeMUR and its question
|
|
338
|
+
/** @description An answer generated by LeMUR and its question */
|
|
327
339
|
export type LemurQuestionAnswer = {
|
|
328
|
-
/** @description The answer generated by LeMUR
|
|
340
|
+
/** @description The answer generated by LeMUR */
|
|
329
341
|
answer: string;
|
|
330
|
-
/** @description The question for LeMUR to answer
|
|
342
|
+
/** @description The question for LeMUR to answer */
|
|
331
343
|
question: string;
|
|
332
344
|
};
|
|
333
345
|
|
|
334
346
|
export type LemurQuestionAnswerParameters = LemurBaseParameters & {
|
|
335
|
-
/** @description A list of questions to ask
|
|
347
|
+
/** @description A list of questions to ask */
|
|
336
348
|
questions: LemurQuestion[];
|
|
337
349
|
};
|
|
338
350
|
|
|
339
351
|
export type LemurQuestionAnswerResponse = LemurBaseResponse & {
|
|
340
|
-
/** @description The answers generated by LeMUR and their questions
|
|
352
|
+
/** @description The answers generated by LeMUR and their questions */
|
|
341
353
|
response: LemurQuestionAnswer[];
|
|
342
354
|
};
|
|
343
355
|
|
|
@@ -347,7 +359,7 @@ export type LemurSummaryParameters = LemurBaseParameters & {
|
|
|
347
359
|
};
|
|
348
360
|
|
|
349
361
|
export type LemurSummaryResponse = LemurBaseResponse & {
|
|
350
|
-
/** @description The response generated by LeMUR
|
|
362
|
+
/** @description The response generated by LeMUR */
|
|
351
363
|
response: string;
|
|
352
364
|
};
|
|
353
365
|
|
|
@@ -357,7 +369,7 @@ export type LemurTaskParameters = LemurBaseParameters & {
|
|
|
357
369
|
};
|
|
358
370
|
|
|
359
371
|
export type LemurTaskResponse = LemurBaseResponse & {
|
|
360
|
-
/** @description The response generated by LeMUR
|
|
372
|
+
/** @description The response generated by LeMUR */
|
|
361
373
|
response: string;
|
|
362
374
|
};
|
|
363
375
|
|
|
@@ -408,11 +420,11 @@ export type PiiPolicy =
|
|
|
408
420
|
| "banking_information";
|
|
409
421
|
|
|
410
422
|
export type PurgeLemurRequestDataResponse = {
|
|
411
|
-
/** @description Whether the request data was deleted
|
|
423
|
+
/** @description Whether the request data was deleted */
|
|
412
424
|
deleted: boolean;
|
|
413
|
-
/** @description The ID of the LeMUR request */
|
|
414
|
-
request_id: string;
|
|
415
425
|
/** @description The ID of the deletion request of the LeMUR request */
|
|
426
|
+
request_id: string;
|
|
427
|
+
/** @description The ID of the LeMUR request to purge the data for */
|
|
416
428
|
request_id_to_purge: string;
|
|
417
429
|
};
|
|
418
430
|
|
|
@@ -445,7 +457,7 @@ export type SentencesResponse = {
|
|
|
445
457
|
/** @enum {unknown} */
|
|
446
458
|
export type Sentiment = "POSITIVE" | "NEUTRAL" | "NEGATIVE";
|
|
447
459
|
|
|
448
|
-
/** @description The result of the sentiment analysis model
|
|
460
|
+
/** @description The result of the sentiment analysis model */
|
|
449
461
|
export type SentimentAnalysisResult = {
|
|
450
462
|
/**
|
|
451
463
|
* Format: double
|
|
@@ -475,7 +487,7 @@ export type SeverityScoreSummary = {
|
|
|
475
487
|
|
|
476
488
|
/**
|
|
477
489
|
* @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.
|
|
478
|
-
* @enum {string
|
|
490
|
+
* @enum {string}
|
|
479
491
|
*/
|
|
480
492
|
export type SubstitutionPolicy = "entity_type" | "hash";
|
|
481
493
|
|
|
@@ -504,7 +516,7 @@ export type SummaryType =
|
|
|
504
516
|
| "headline"
|
|
505
517
|
| "paragraph";
|
|
506
518
|
|
|
507
|
-
/** @description Timestamp containing a start and end property in milliseconds
|
|
519
|
+
/** @description Timestamp containing a start and end property in milliseconds */
|
|
508
520
|
export type Timestamp = {
|
|
509
521
|
/** @description The end time in milliseconds */
|
|
510
522
|
end: number;
|
|
@@ -512,7 +524,22 @@ export type Timestamp = {
|
|
|
512
524
|
start: number;
|
|
513
525
|
};
|
|
514
526
|
|
|
515
|
-
/**
|
|
527
|
+
/**
|
|
528
|
+
* @description The result of the Topic Detection model, if it is enabled.
|
|
529
|
+
* See [Topic Detection](https://www.assemblyai.com/docs/Models/iab_classification) for more information.
|
|
530
|
+
*/
|
|
531
|
+
export type TopicDetectionModelResult = {
|
|
532
|
+
/** @description An array of results for the Topic Detection model */
|
|
533
|
+
results: TopicDetectionResult[];
|
|
534
|
+
/** @description The status of the Topic Detection model. Either success, or unavailable in the rare case that the model failed. */
|
|
535
|
+
status: AudioIntelligenceModelStatus;
|
|
536
|
+
/** @description The overall relevance of topic to the entire audio file */
|
|
537
|
+
summary: {
|
|
538
|
+
[key: string]: number;
|
|
539
|
+
};
|
|
540
|
+
};
|
|
541
|
+
|
|
542
|
+
/** @description The result of the topic detection model */
|
|
516
543
|
export type TopicDetectionResult = {
|
|
517
544
|
labels?: {
|
|
518
545
|
/** @description The IAB taxonomical label for the label of the detected topic, where > denotes supertopic/subtopic relationship */
|
|
@@ -532,7 +559,7 @@ export type TopicDetectionResult = {
|
|
|
532
559
|
export type Transcript = {
|
|
533
560
|
/**
|
|
534
561
|
* @deprecated
|
|
535
|
-
* @description The acoustic model that was used for the
|
|
562
|
+
* @description The acoustic model that was used for the transcript
|
|
536
563
|
*/
|
|
537
564
|
acoustic_model: string;
|
|
538
565
|
/**
|
|
@@ -540,22 +567,22 @@ export type Transcript = {
|
|
|
540
567
|
* @description The duration of this transcript object's media file, in seconds
|
|
541
568
|
*/
|
|
542
569
|
audio_duration?: number | null;
|
|
543
|
-
/** @description The point in time, in milliseconds, in the file at which the transcription was terminated
|
|
570
|
+
/** @description The point in time, in milliseconds, in the file at which the transcription was terminated */
|
|
544
571
|
audio_end_at?: number | null;
|
|
545
|
-
/** @description The point in time, in milliseconds, in the file at which the transcription was started
|
|
572
|
+
/** @description The point in time, in milliseconds, in the file at which the transcription was started */
|
|
546
573
|
audio_start_from?: number | null;
|
|
547
574
|
/** @description The URL of the media that was transcribed */
|
|
548
575
|
audio_url: string;
|
|
549
|
-
/** @description
|
|
576
|
+
/** @description Whether [Auto Chapters](https://www.assemblyai.com/docs/Models/auto_chapters) is enabled, can be true or false */
|
|
550
577
|
auto_chapters?: boolean | null;
|
|
551
|
-
/** @description Whether Key Phrases
|
|
578
|
+
/** @description Whether Key Phrases is enabled, either true or false */
|
|
552
579
|
auto_highlights: boolean;
|
|
553
580
|
/**
|
|
554
|
-
* @description An array of results for the Key Phrases model, if it
|
|
581
|
+
* @description An array of results for the Key Phrases model, if it is enabled.
|
|
555
582
|
* See [Key phrases](https://www.assemblyai.com/docs/Models/key_phrases) for more information.
|
|
556
583
|
*/
|
|
557
|
-
auto_highlights_result?: AutoHighlightsResult;
|
|
558
|
-
/** @description The word boost parameter value
|
|
584
|
+
auto_highlights_result?: AutoHighlightsResult | null;
|
|
585
|
+
/** @description The word boost parameter value */
|
|
559
586
|
boost_param?: string | null;
|
|
560
587
|
/** @description An array of temporally sequential chapters for the audio file */
|
|
561
588
|
chapters?: Chapter[] | null;
|
|
@@ -564,51 +591,42 @@ export type Transcript = {
|
|
|
564
591
|
* @description The confidence score for the transcript, between 0.0 (low confidence) and 1.0 (high confidence)
|
|
565
592
|
*/
|
|
566
593
|
confidence?: number | null;
|
|
567
|
-
/** @description
|
|
594
|
+
/** @description Whether [Content Moderation](https://www.assemblyai.com/docs/Models/content_moderation) is enabled, can be true or false */
|
|
568
595
|
content_safety?: boolean | null;
|
|
569
596
|
/**
|
|
570
|
-
* @description An array of results for the Content Moderation model, if it
|
|
597
|
+
* @description An array of results for the Content Moderation model, if it is enabled.
|
|
571
598
|
* See [Content moderation](https://www.assemblyai.com/docs/Models/content_moderation) for more information.
|
|
572
599
|
*/
|
|
573
|
-
content_safety_labels?: ContentSafetyLabelsResult;
|
|
600
|
+
content_safety_labels?: ContentSafetyLabelsResult | null;
|
|
574
601
|
/** @description Customize how words are spelled and formatted using to and from values */
|
|
575
602
|
custom_spelling?: TranscriptCustomSpelling[] | null;
|
|
576
|
-
/** @description Whether custom topics
|
|
603
|
+
/** @description Whether custom topics is enabled, either true or false */
|
|
577
604
|
custom_topics?: boolean | null;
|
|
578
605
|
/** @description Transcribe Filler Words, like "umm", in your media file; can be true or false */
|
|
579
606
|
disfluencies?: boolean | null;
|
|
580
|
-
/** @description Whether [Dual channel transcription](https://www.assemblyai.com/docs/Models/speech_recognition#dual-channel-transcription)
|
|
607
|
+
/** @description Whether [Dual channel transcription](https://www.assemblyai.com/docs/Models/speech_recognition#dual-channel-transcription) is enabled, either true or false */
|
|
581
608
|
dual_channel?: boolean | null;
|
|
582
609
|
/**
|
|
583
|
-
* @description An array of results for the Entity Detection model, if it
|
|
610
|
+
* @description An array of results for the Entity Detection model, if it is enabled.
|
|
584
611
|
* See [Entity detection](https://www.assemblyai.com/docs/Models/entity_detection) for more information.
|
|
585
612
|
*/
|
|
586
613
|
entities?: Entity[] | null;
|
|
587
|
-
/** @description
|
|
614
|
+
/** @description Whether [Entity Detection](https://www.assemblyai.com/docs/Models/entity_detection) is enabled, can be true or false */
|
|
588
615
|
entity_detection?: boolean | null;
|
|
589
616
|
/** @description Error message of why the transcript failed */
|
|
590
617
|
error?: string;
|
|
591
|
-
/** @description Whether [Profanity Filtering](https://www.assemblyai.com/docs/Models/speech_recognition#profanity-filtering)
|
|
618
|
+
/** @description Whether [Profanity Filtering](https://www.assemblyai.com/docs/Models/speech_recognition#profanity-filtering) is enabled, either true or false */
|
|
592
619
|
filter_profanity?: boolean | null;
|
|
593
|
-
/** @description Whether Text Formatting
|
|
620
|
+
/** @description Whether Text Formatting is enabled, either true or false */
|
|
594
621
|
format_text?: boolean | null;
|
|
595
|
-
/** @description
|
|
622
|
+
/** @description Whether [Topic Detection](https://www.assemblyai.com/docs/Models/iab_classification) is enabled, can be true or false */
|
|
596
623
|
iab_categories?: boolean | null;
|
|
597
624
|
/**
|
|
598
|
-
* @description The result of the Topic Detection model, if it
|
|
625
|
+
* @description The result of the Topic Detection model, if it is enabled.
|
|
599
626
|
* See [Topic Detection](https://www.assemblyai.com/docs/Models/iab_classification) for more information.
|
|
600
627
|
*/
|
|
601
|
-
iab_categories_result?:
|
|
602
|
-
|
|
603
|
-
results: TopicDetectionResult[];
|
|
604
|
-
/** @description Will be either success, or unavailable in the rare case that the Content Moderation model failed. */
|
|
605
|
-
status: AudioIntelligenceModelStatus;
|
|
606
|
-
/** @description The overall relevance of topic to the entire audio file */
|
|
607
|
-
summary: {
|
|
608
|
-
[key: string]: number;
|
|
609
|
-
};
|
|
610
|
-
} | null;
|
|
611
|
-
/** @description The unique identifier of your transcription */
|
|
628
|
+
iab_categories_result?: TopicDetectionModelResult | null;
|
|
629
|
+
/** @description The unique identifier of your transcript */
|
|
612
630
|
id: string;
|
|
613
631
|
/**
|
|
614
632
|
* @description The language of your audio file.
|
|
@@ -616,24 +634,24 @@ export type Transcript = {
|
|
|
616
634
|
* The default value is 'en_us'.
|
|
617
635
|
*/
|
|
618
636
|
language_code?: TranscriptLanguageCode;
|
|
619
|
-
/** @description Whether [Automatic language detection](https://www.assemblyai.com/docs/Models/speech_recognition#automatic-language-detection)
|
|
637
|
+
/** @description Whether [Automatic language detection](https://www.assemblyai.com/docs/Models/speech_recognition#automatic-language-detection) is enabled, either true or false */
|
|
620
638
|
language_detection?: boolean | null;
|
|
621
639
|
/**
|
|
622
640
|
* @deprecated
|
|
623
|
-
* @description The language model that was used for the
|
|
641
|
+
* @description The language model that was used for the transcript
|
|
624
642
|
*/
|
|
625
643
|
language_model: string;
|
|
626
|
-
/** @description Whether Automatic Punctuation
|
|
644
|
+
/** @description Whether Automatic Punctuation is enabled, either true or false */
|
|
627
645
|
punctuate?: boolean | null;
|
|
628
|
-
/** @description Whether [PII Redaction](https://www.assemblyai.com/docs/Models/pii_redaction)
|
|
646
|
+
/** @description Whether [PII Redaction](https://www.assemblyai.com/docs/Models/pii_redaction) is enabled, either true or false */
|
|
629
647
|
redact_pii: boolean;
|
|
630
648
|
/**
|
|
631
|
-
* @description Whether a redacted version of the audio file was generated
|
|
649
|
+
* @description Whether a redacted version of the audio file was generated,
|
|
632
650
|
* either true or false. See [PII redaction](https://www.assemblyai.com/docs/Models/pii_redaction) for more information.
|
|
633
651
|
*/
|
|
634
652
|
redact_pii_audio?: boolean | null;
|
|
635
653
|
/**
|
|
636
|
-
* @description The audio quality of the PII-redacted audio file, if
|
|
654
|
+
* @description The audio quality of the PII-redacted audio file, if redact_pii_audio is enabled.
|
|
637
655
|
* See [PII redaction](https://www.assemblyai.com/docs/Models/pii_redaction) for more information.
|
|
638
656
|
*/
|
|
639
657
|
redact_pii_audio_quality?: string | null;
|
|
@@ -644,16 +662,16 @@ export type Transcript = {
|
|
|
644
662
|
redact_pii_policies?: PiiPolicy[] | null;
|
|
645
663
|
/** @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. */
|
|
646
664
|
redact_pii_sub?: SubstitutionPolicy;
|
|
647
|
-
/** @description
|
|
665
|
+
/** @description Whether [Sentiment Analysis](https://www.assemblyai.com/docs/Models/sentiment_analysis) is enabled, can be true or false */
|
|
648
666
|
sentiment_analysis?: boolean | null;
|
|
649
667
|
/**
|
|
650
|
-
* @description An array of results for the Sentiment Analysis model, if it
|
|
668
|
+
* @description An array of results for the Sentiment Analysis model, if it is enabled.
|
|
651
669
|
* See [Sentiment analysis](https://www.assemblyai.com/docs/Models/sentiment_analysis) for more information.
|
|
652
670
|
*/
|
|
653
671
|
sentiment_analysis_results?: SentimentAnalysisResult[] | null;
|
|
654
|
-
/** @description
|
|
672
|
+
/** @description Whether [Speaker diarization](https://www.assemblyai.com/docs/Models/speaker_diarization) is enabled, can be true or false */
|
|
655
673
|
speaker_labels?: boolean | null;
|
|
656
|
-
/** @description
|
|
674
|
+
/** @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. */
|
|
657
675
|
speakers_expected?: number | null;
|
|
658
676
|
/**
|
|
659
677
|
* Format: float
|
|
@@ -663,42 +681,42 @@ export type Transcript = {
|
|
|
663
681
|
speech_threshold?: number | null;
|
|
664
682
|
/**
|
|
665
683
|
* @deprecated
|
|
666
|
-
* @description Whether speed boost
|
|
684
|
+
* @description Whether speed boost is enabled
|
|
667
685
|
*/
|
|
668
686
|
speed_boost?: boolean | null;
|
|
669
|
-
/** @description The status of your
|
|
687
|
+
/** @description The status of your transcript. Possible values are queued, processing, completed, or error. */
|
|
670
688
|
status: TranscriptStatus;
|
|
671
|
-
/** @description Whether [Summarization](https://www.assemblyai.com/docs/Models/summarization)
|
|
689
|
+
/** @description Whether [Summarization](https://www.assemblyai.com/docs/Models/summarization) is enabled, either true or false */
|
|
672
690
|
summarization: boolean;
|
|
673
|
-
/** @description The generated summary of the media file, if [Summarization](https://www.assemblyai.com/docs/Models/summarization)
|
|
691
|
+
/** @description The generated summary of the media file, if [Summarization](https://www.assemblyai.com/docs/Models/summarization) is enabled */
|
|
674
692
|
summary?: string | null;
|
|
675
693
|
/**
|
|
676
694
|
* @description The Summarization model used to generate the summary,
|
|
677
|
-
* if [Summarization](https://www.assemblyai.com/docs/Models/summarization)
|
|
695
|
+
* if [Summarization](https://www.assemblyai.com/docs/Models/summarization) is enabled
|
|
678
696
|
*/
|
|
679
697
|
summary_model?: string | null;
|
|
680
|
-
/** @description The type of summary generated, if [Summarization](https://www.assemblyai.com/docs/Models/summarization)
|
|
698
|
+
/** @description The type of summary generated, if [Summarization](https://www.assemblyai.com/docs/Models/summarization) is enabled */
|
|
681
699
|
summary_type?: string | null;
|
|
682
700
|
/** @description The textual transcript of your media file */
|
|
683
701
|
text?: string | null;
|
|
684
702
|
/** @description True while a request is throttled and false when a request is no longer throttled */
|
|
685
703
|
throttled?: boolean | null;
|
|
686
|
-
/** @description The list of custom topics provided if custom topics
|
|
704
|
+
/** @description The list of custom topics provided if custom topics is enabled */
|
|
687
705
|
topics?: string[];
|
|
688
706
|
/**
|
|
689
707
|
* @description When dual_channel or speaker_labels is enabled, a list of turn-by-turn utterance objects.
|
|
690
708
|
* See [Speaker diarization](https://www.assemblyai.com/docs/Models/speaker_diarization) for more information.
|
|
691
709
|
*/
|
|
692
710
|
utterances?: TranscriptUtterance[] | null;
|
|
693
|
-
/** @description Whether webhook authentication details were provided
|
|
711
|
+
/** @description Whether webhook authentication details were provided */
|
|
694
712
|
webhook_auth: boolean;
|
|
695
|
-
/** @description The header name which should be sent back with webhook calls
|
|
713
|
+
/** @description The header name which should be sent back with webhook calls */
|
|
696
714
|
webhook_auth_header_name?: string | null;
|
|
697
|
-
/** @description The status code we received from your server when delivering your webhook, if a webhook URL was provided
|
|
715
|
+
/** @description The status code we received from your server when delivering your webhook, if a webhook URL was provided */
|
|
698
716
|
webhook_status_code?: number | null;
|
|
699
|
-
/** @description The URL to which we send webhooks upon trancription completion
|
|
717
|
+
/** @description The URL to which we send webhooks upon trancription completion */
|
|
700
718
|
webhook_url?: string | null;
|
|
701
|
-
/** @description The list of custom vocabulary to boost transcription probability for
|
|
719
|
+
/** @description The list of custom vocabulary to boost transcription probability for */
|
|
702
720
|
word_boost?: string[];
|
|
703
721
|
/**
|
|
704
722
|
* @description An array of temporally-sequential word objects, one for each word in the transcript.
|
|
@@ -708,7 +726,7 @@ export type Transcript = {
|
|
|
708
726
|
};
|
|
709
727
|
|
|
710
728
|
/**
|
|
711
|
-
* @description The word boost parameter value
|
|
729
|
+
* @description The word boost parameter value
|
|
712
730
|
* @enum {string}
|
|
713
731
|
*/
|
|
714
732
|
export type TranscriptBoostParam = "low" | "default" | "high";
|
|
@@ -726,7 +744,7 @@ export type TranscriptCustomSpelling = {
|
|
|
726
744
|
* The default value is 'en_us'.
|
|
727
745
|
*
|
|
728
746
|
* @default en_us
|
|
729
|
-
* @enum {string
|
|
747
|
+
* @enum {string}
|
|
730
748
|
*/
|
|
731
749
|
export type TranscriptLanguageCode =
|
|
732
750
|
| "en"
|
|
@@ -805,7 +823,7 @@ export type TranscriptSentence = {
|
|
|
805
823
|
};
|
|
806
824
|
|
|
807
825
|
/**
|
|
808
|
-
* @description The status of your
|
|
826
|
+
* @description The status of your transcript. Possible values are queued, processing, completed, or error.
|
|
809
827
|
* @enum {string}
|
|
810
828
|
*/
|
|
811
829
|
export type TranscriptStatus = "queued" | "processing" | "completed" | "error";
|
|
@@ -1,5 +1,19 @@
|
|
|
1
|
-
export type
|
|
2
|
-
|
|
1
|
+
export type PollingOptions = {
|
|
2
|
+
/**
|
|
3
|
+
* The amount of time to wait between polling requests.
|
|
4
|
+
* @default 3000 or every 3 seconds
|
|
5
|
+
*/
|
|
3
6
|
pollingInterval?: number;
|
|
7
|
+
/**
|
|
8
|
+
* The maximum amount of time to wait for the transcript to be ready.
|
|
9
|
+
* @default -1 which means wait forever
|
|
10
|
+
*/
|
|
4
11
|
pollingTimeout?: number;
|
|
5
12
|
};
|
|
13
|
+
export type CreateTranscriptOptions = {
|
|
14
|
+
/**
|
|
15
|
+
* Whether to poll the transcript until it is ready.
|
|
16
|
+
* @default true
|
|
17
|
+
*/
|
|
18
|
+
poll?: boolean;
|
|
19
|
+
} & PollingOptions;
|