assemblyai 3.0.1 → 3.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -14,7 +14,7 @@ type OneOf<T extends any[]> = T extends [infer Only]
14
14
  : never;
15
15
 
16
16
  /**
17
- * @description Will be either success, or unavailable in the rare case that the model failed.
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 was enabled during the transcription request.
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
- } | null;
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 objects, one per sensitive topic that was detected in the section */
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,128 +84,27 @@ 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 Will be either success, or unavailable in the rare case that the Content Moderation model failed. */
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
- } | null;
100
-
101
- export type CreateRealtimeTemporaryTokenParameters = {
102
- /** @description The amount of time until the token expires in seconds. */
103
- expires_in: number;
104
103
  };
105
104
 
106
- /** @description The parameters for creating a transcript */
107
- export type CreateTranscriptOptionalParameters = {
108
- /** @description The point in time, in milliseconds, to stop transcribing in your media file */
109
- audio_end_at?: number;
110
- /** @description The point in time, in milliseconds, to begin transcription from in your media file */
111
- audio_start_from?: number;
112
- /** @description Enable [Auto Chapters](https://www.assemblyai.com/docs/Models/auto_chapters), can be true or false */
113
- auto_chapters?: boolean;
114
- /** @description Whether Key Phrases was enabled in the transcription request, either true or false */
115
- auto_highlights?: boolean;
116
- /** @description The word boost parameter value, if provided in the transcription request. */
117
- boost_param?: TranscriptBoostParam;
118
- /** @description Enable [Content Moderation](https://www.assemblyai.com/docs/Models/content_moderation), can be true or false */
119
- content_safety?: boolean;
120
- /** @description Customize how words are spelled and formatted using to and from values */
121
- custom_spelling?: TranscriptCustomSpelling[];
122
- /** @description Whether custom topics was enabled in the transcription request, either true or false */
123
- custom_topics?: boolean;
124
- /** @description Transcribe Filler Words, like "umm", in your media file; can be true or false. */
125
- disfluencies?: boolean;
126
- /** @description Enable [Dual Channel](https://assemblyai.com/docs/Models/speech_recognition#dual-channel-transcription) transcription, can be true or false. */
127
- dual_channel?: boolean;
128
- /** @description Enable [Entity Detection](https://www.assemblyai.com/docs/Models/entity_detection), can be true or false */
129
- entity_detection?: boolean;
130
- /** @description Filter profanity from the transcribed text, can be true or false. */
131
- filter_profanity?: boolean;
132
- /** @description Enable Text Formatting, can be true or false. */
133
- format_text?: boolean;
134
- /** @description Enable [Topic Detection](https://www.assemblyai.com/docs/Models/iab_classification), can be true or false */
135
- iab_categories?: boolean;
136
- /**
137
- * @description The language of your audio file. Possible values are found in [Supported Languages](https://www.assemblyai.com/docs/Concepts/supported_languages).
138
- * The default value is 'en_us'.
139
- */
140
- language_code?: TranscriptLanguageCode;
141
- /** @description Whether [Automatic language detection](https://www.assemblyai.com/docs/Models/speech_recognition#automatic-language-detection) was enabled in the transcription request, either true or false. */
142
- language_detection?: boolean;
143
- /** @description Enable Automatic Punctuation, can be true or false. */
144
- punctuate?: boolean;
145
- /** @description Redact PII from the transcribed text using the Redact PII model, can be true or false */
146
- redact_pii?: boolean;
147
- /** @description Generate a copy of the original media file with spoken PII "beeped" out, can be true or false. See [PII redaction](https://www.assemblyai.com/docs/Models/pii_redaction) for more details. */
148
- redact_pii_audio?: boolean;
149
- /**
150
- * @description Controls the filetype of the audio created by redact_pii_audio. Currently supports mp3 (default) and wav. See [PII redaction](https://www.assemblyai.com/docs/Models/pii_redaction) for more details.
151
- * @default mp3
152
- */
153
- redact_pii_audio_quality?: string;
154
- /** @description The list of PII Redaction policies to enable. See [PII redaction](https://www.assemblyai.com/docs/Models/pii_redaction) for more details. */
155
- redact_pii_policies?: PiiPolicy[];
156
- /** @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;
158
- /** @description Enable [Sentiment Analysis](https://www.assemblyai.com/docs/Models/sentiment_analysis), can be true or false */
159
- sentiment_analysis?: boolean;
160
- /** @description Enable [Speaker diarization](https://www.assemblyai.com/docs/Models/speaker_diarization), can be true or false */
161
- speaker_labels?: boolean;
162
- /**
163
- * @description Tells the speaker label model how many speakers it should attempt to identify, up to 10. See [Speaker diarization](https://www.assemblyai.com/docs/Models/speaker_diarization) for more details.
164
- * @default null
165
- */
166
- speakers_expected?: number | null;
167
- /**
168
- * Format: float
169
- * @description Reject audio files that contain less than this fraction of speech.
170
- * Valid values are in the range [0, 1] inclusive.
171
- *
172
- * @default null
173
- */
174
- speech_threshold?: number | null;
175
- /** @description Enable [Summarization](https://www.assemblyai.com/docs/Models/summarization), can be true or false */
176
- summarization?: boolean;
177
- /**
178
- * @description The model to summarize the transcript
179
- * @default informative
180
- */
181
- summary_model?: SummaryModel;
182
- /**
183
- * @description The type of summary
184
- * @default bullets
185
- */
186
- summary_type?: SummaryType;
187
- /** @description The list of custom topics provided if custom topics was enabled in the transcription request */
188
- topics?: string[];
189
- /**
190
- * @description The header name which should be sent back with webhook calls, if provided in the transcription request.
191
- * @default null
192
- */
193
- webhook_auth_header_name?: string | null;
194
- /**
195
- * @description Defaults to null. Optionally allows a user to specify a header name and value to send back with a webhook call for added security.
196
- * @default null
197
- */
198
- webhook_auth_header_value?: string | null;
199
- /** @description The URL to which we send webhooks upon trancription completion, if provided in the transcription request. */
200
- webhook_url?: string;
201
- /** @description The list of custom vocabulary to boost transcription probability for, if provided in the transcription request. */
202
- word_boost?: string[];
203
- };
204
-
205
- /** @description The parameters for creating a transcript */
206
- export type CreateTranscriptParameters = CreateTranscriptOptionalParameters & {
207
- /** @description The URL of the audio or video file to transcribe. */
208
- audio_url: string;
105
+ export type CreateRealtimeTemporaryTokenParams = {
106
+ /** @description The amount of time until the token expires in seconds */
107
+ expires_in: number;
209
108
  };
210
109
 
211
110
  /** @description A detected entity */
@@ -262,14 +161,14 @@ export type Error = {
262
161
  status?: "error";
263
162
  };
264
163
 
265
- export type LemurActionItemsParameters = LemurBaseParameters;
164
+ export type LemurActionItemsParams = LemurBaseParams;
266
165
 
267
166
  export type LemurActionItemsResponse = LemurBaseResponse & {
268
- /** @description The response generated by LeMUR. */
167
+ /** @description The response generated by LeMUR */
269
168
  response: string;
270
169
  };
271
170
 
272
- export type LemurBaseParameters = {
171
+ export type LemurBaseParams = {
273
172
  /** @description Context to provide the model. This can be a string or a free-form JSON value. */
274
173
  context?: OneOf<
275
174
  [
@@ -280,7 +179,12 @@ export type LemurBaseParameters = {
280
179
  ]
281
180
  >;
282
181
  final_model?: LemurModel;
283
- /** @description Max output size in tokens. Up to 4000 allowed. */
182
+ /**
183
+ * @description Custom formatted transcript data. Maximum size is the context limit of the selected model, which defaults to 100000.
184
+ * Use either transcript_ids or input_text as input into LeMUR.
185
+ */
186
+ input_text?: string;
187
+ /** @description Max output size in tokens, up to 4000 */
284
188
  max_output_size?: number;
285
189
  /**
286
190
  * Format: float
@@ -289,8 +193,11 @@ export type LemurBaseParameters = {
289
193
  * Can be any value between 0.0 and 1.0 inclusive.
290
194
  */
291
195
  temperature?: number;
292
- /** @description A list of completed transcripts with text. Up to 100 files max, or 100 hours max. Whichever is lower. */
293
- transcript_ids: string[];
196
+ /**
197
+ * @description A list of completed transcripts with text. Up to a maximum of 100 files or 100 hours, whichever is lower.
198
+ * Use either transcript_ids or input_text as input into LeMUR.
199
+ */
200
+ transcript_ids?: string[];
294
201
  };
295
202
 
296
203
  export type LemurBaseResponse = {
@@ -310,7 +217,7 @@ export type LemurQuestion = {
310
217
  answer_format?: string;
311
218
  /** @description What discrete options to return. Useful for precise responses. Can't be used with answer_format. Example: ["Yes", "No"] */
312
219
  answer_options?: string[];
313
- /** @description Any context about the transcripts you wish to provide. This can be a string, or free-form JSON. */
220
+ /** @description Any context about the transcripts you wish to provide. This can be a string or any object. */
314
221
  context?: OneOf<
315
222
  [
316
223
  string,
@@ -323,44 +230,66 @@ export type LemurQuestion = {
323
230
  question: string;
324
231
  };
325
232
 
326
- /** @description An answer generated by LeMUR and its question. */
233
+ /** @description An answer generated by LeMUR and its question */
327
234
  export type LemurQuestionAnswer = {
328
- /** @description The answer generated by LeMUR. */
235
+ /** @description The answer generated by LeMUR */
329
236
  answer: string;
330
- /** @description The question for LeMUR to answer. */
237
+ /** @description The question for LeMUR to answer */
331
238
  question: string;
332
239
  };
333
240
 
334
- export type LemurQuestionAnswerParameters = LemurBaseParameters & {
335
- /** @description A list of questions to ask. */
241
+ export type LemurQuestionAnswerParams = LemurBaseParams & {
242
+ /** @description A list of questions to ask */
336
243
  questions: LemurQuestion[];
337
244
  };
338
245
 
339
246
  export type LemurQuestionAnswerResponse = LemurBaseResponse & {
340
- /** @description The answers generated by LeMUR and their questions. */
247
+ /** @description The answers generated by LeMUR and their questions */
341
248
  response: LemurQuestionAnswer[];
342
249
  };
343
250
 
344
- export type LemurSummaryParameters = LemurBaseParameters & {
251
+ export type LemurSummaryParams = LemurBaseParams & {
345
252
  /** @description How you want the summary to be returned. This can be any text. Examples: "TLDR", "bullet points" */
346
253
  answer_format?: string;
347
254
  };
348
255
 
349
256
  export type LemurSummaryResponse = LemurBaseResponse & {
350
- /** @description The response generated by LeMUR. */
257
+ /** @description The response generated by LeMUR */
351
258
  response: string;
352
259
  };
353
260
 
354
- export type LemurTaskParameters = LemurBaseParameters & {
261
+ export type LemurTaskParams = LemurBaseParams & {
355
262
  /** @description Your text to prompt the model to produce a desired output, including any context you want to pass into the model. */
356
263
  prompt: string;
357
264
  };
358
265
 
359
266
  export type LemurTaskResponse = LemurBaseResponse & {
360
- /** @description The response generated by LeMUR. */
267
+ /** @description The response generated by LeMUR */
361
268
  response: string;
362
269
  };
363
270
 
271
+ export type ListTranscriptParams = {
272
+ /** @description Get transcripts that were created after this transcript ID */
273
+ after_id?: string;
274
+ /** @description Get transcripts that were created before this transcript ID */
275
+ before_id?: string;
276
+ /**
277
+ * Format: date
278
+ * @description Only get transcripts created on this date
279
+ */
280
+ created_on?: string;
281
+ /**
282
+ * Format: int64
283
+ * @description Maximum amount of transcripts to retrieve
284
+ * @default 10
285
+ */
286
+ limit?: number;
287
+ /** @description Filter by transcript status */
288
+ status?: TranscriptStatus;
289
+ /** @description Only get throttled transcripts, overrides the status filter */
290
+ throttled_only?: boolean;
291
+ };
292
+
364
293
  export type PageDetails = {
365
294
  current_url: string;
366
295
  limit: number;
@@ -408,11 +337,11 @@ export type PiiPolicy =
408
337
  | "banking_information";
409
338
 
410
339
  export type PurgeLemurRequestDataResponse = {
411
- /** @description Whether the request data was deleted. */
340
+ /** @description Whether the request data was deleted */
412
341
  deleted: boolean;
413
- /** @description The ID of the LeMUR request */
414
- request_id: string;
415
342
  /** @description The ID of the deletion request of the LeMUR request */
343
+ request_id: string;
344
+ /** @description The ID of the LeMUR request to purge the data for */
416
345
  request_id_to_purge: string;
417
346
  };
418
347
 
@@ -445,7 +374,7 @@ export type SentencesResponse = {
445
374
  /** @enum {unknown} */
446
375
  export type Sentiment = "POSITIVE" | "NEUTRAL" | "NEGATIVE";
447
376
 
448
- /** @description The result of the sentiment analysis model. */
377
+ /** @description The result of the sentiment analysis model */
449
378
  export type SentimentAnalysisResult = {
450
379
  /**
451
380
  * Format: double
@@ -475,7 +404,7 @@ export type SeverityScoreSummary = {
475
404
 
476
405
  /**
477
406
  * @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|null}
407
+ * @enum {string}
479
408
  */
480
409
  export type SubstitutionPolicy = "entity_type" | "hash";
481
410
 
@@ -504,7 +433,7 @@ export type SummaryType =
504
433
  | "headline"
505
434
  | "paragraph";
506
435
 
507
- /** @description Timestamp containing a start and end property in milliseconds. */
436
+ /** @description Timestamp containing a start and end property in milliseconds */
508
437
  export type Timestamp = {
509
438
  /** @description The end time in milliseconds */
510
439
  end: number;
@@ -512,7 +441,22 @@ export type Timestamp = {
512
441
  start: number;
513
442
  };
514
443
 
515
- /** @description The result of the topic detection model. */
444
+ /**
445
+ * @description The result of the Topic Detection model, if it is enabled.
446
+ * See [Topic Detection](https://www.assemblyai.com/docs/Models/iab_classification) for more information.
447
+ */
448
+ export type TopicDetectionModelResult = {
449
+ /** @description An array of results for the Topic Detection model */
450
+ results: TopicDetectionResult[];
451
+ /** @description The status of the Topic Detection model. Either success, or unavailable in the rare case that the model failed. */
452
+ status: AudioIntelligenceModelStatus;
453
+ /** @description The overall relevance of topic to the entire audio file */
454
+ summary: {
455
+ [key: string]: number;
456
+ };
457
+ };
458
+
459
+ /** @description The result of the topic detection model */
516
460
  export type TopicDetectionResult = {
517
461
  labels?: {
518
462
  /** @description The IAB taxonomical label for the label of the detected topic, where > denotes supertopic/subtopic relationship */
@@ -532,7 +476,7 @@ export type TopicDetectionResult = {
532
476
  export type Transcript = {
533
477
  /**
534
478
  * @deprecated
535
- * @description The acoustic model that was used for the transcription
479
+ * @description The acoustic model that was used for the transcript
536
480
  */
537
481
  acoustic_model: string;
538
482
  /**
@@ -540,22 +484,22 @@ export type Transcript = {
540
484
  * @description The duration of this transcript object's media file, in seconds
541
485
  */
542
486
  audio_duration?: number | null;
543
- /** @description The point in time, in milliseconds, in the file at which the transcription was terminated, if provided in the transcription request */
487
+ /** @description The point in time, in milliseconds, in the file at which the transcription was terminated */
544
488
  audio_end_at?: number | null;
545
- /** @description The point in time, in milliseconds, in the file at which the transcription was started, if provided in the transcription request */
489
+ /** @description The point in time, in milliseconds, in the file at which the transcription was started */
546
490
  audio_start_from?: number | null;
547
491
  /** @description The URL of the media that was transcribed */
548
492
  audio_url: string;
549
- /** @description Enable [Auto Chapters](https://www.assemblyai.com/docs/Models/auto_chapters), can be true or false */
493
+ /** @description Whether [Auto Chapters](https://www.assemblyai.com/docs/Models/auto_chapters) is enabled, can be true or false */
550
494
  auto_chapters?: boolean | null;
551
- /** @description Whether Key Phrases was enabled in the transcription request, either true or false */
495
+ /** @description Whether Key Phrases is enabled, either true or false */
552
496
  auto_highlights: boolean;
553
497
  /**
554
- * @description An array of results for the Key Phrases model, if it was enabled during the transcription request.
498
+ * @description An array of results for the Key Phrases model, if it is enabled.
555
499
  * See [Key phrases](https://www.assemblyai.com/docs/Models/key_phrases) for more information.
556
500
  */
557
- auto_highlights_result?: AutoHighlightsResult;
558
- /** @description The word boost parameter value, if provided in the transcription request */
501
+ auto_highlights_result?: AutoHighlightsResult | null;
502
+ /** @description The word boost parameter value */
559
503
  boost_param?: string | null;
560
504
  /** @description An array of temporally sequential chapters for the audio file */
561
505
  chapters?: Chapter[] | null;
@@ -564,51 +508,42 @@ export type Transcript = {
564
508
  * @description The confidence score for the transcript, between 0.0 (low confidence) and 1.0 (high confidence)
565
509
  */
566
510
  confidence?: number | null;
567
- /** @description Enable [Content Moderation](https://www.assemblyai.com/docs/Models/content_moderation), can be true or false */
511
+ /** @description Whether [Content Moderation](https://www.assemblyai.com/docs/Models/content_moderation) is enabled, can be true or false */
568
512
  content_safety?: boolean | null;
569
513
  /**
570
- * @description An array of results for the Content Moderation model, if it was enabled during the transcription request.
514
+ * @description An array of results for the Content Moderation model, if it is enabled.
571
515
  * See [Content moderation](https://www.assemblyai.com/docs/Models/content_moderation) for more information.
572
516
  */
573
- content_safety_labels?: ContentSafetyLabelsResult;
517
+ content_safety_labels?: ContentSafetyLabelsResult | null;
574
518
  /** @description Customize how words are spelled and formatted using to and from values */
575
519
  custom_spelling?: TranscriptCustomSpelling[] | null;
576
- /** @description Whether custom topics was enabled in the transcription request, either true or false */
520
+ /** @description Whether custom topics is enabled, either true or false */
577
521
  custom_topics?: boolean | null;
578
522
  /** @description Transcribe Filler Words, like "umm", in your media file; can be true or false */
579
523
  disfluencies?: boolean | null;
580
- /** @description Whether [Dual channel transcription](https://www.assemblyai.com/docs/Models/speech_recognition#dual-channel-transcription) was enabled in the transcription request, either true or false */
524
+ /** @description Whether [Dual channel transcription](https://www.assemblyai.com/docs/Models/speech_recognition#dual-channel-transcription) is enabled, either true or false */
581
525
  dual_channel?: boolean | null;
582
526
  /**
583
- * @description An array of results for the Entity Detection model, if it was enabled during the transcription request.
527
+ * @description An array of results for the Entity Detection model, if it is enabled.
584
528
  * See [Entity detection](https://www.assemblyai.com/docs/Models/entity_detection) for more information.
585
529
  */
586
530
  entities?: Entity[] | null;
587
- /** @description Enable [Entity Detection](https://www.assemblyai.com/docs/Models/entity_detection), can be true or false */
531
+ /** @description Whether [Entity Detection](https://www.assemblyai.com/docs/Models/entity_detection) is enabled, can be true or false */
588
532
  entity_detection?: boolean | null;
589
533
  /** @description Error message of why the transcript failed */
590
534
  error?: string;
591
- /** @description Whether [Profanity Filtering](https://www.assemblyai.com/docs/Models/speech_recognition#profanity-filtering) was enabled in the transcription request, either true or false */
535
+ /** @description Whether [Profanity Filtering](https://www.assemblyai.com/docs/Models/speech_recognition#profanity-filtering) is enabled, either true or false */
592
536
  filter_profanity?: boolean | null;
593
- /** @description Whether Text Formatting was enabled in the transcription request, either true or false */
537
+ /** @description Whether Text Formatting is enabled, either true or false */
594
538
  format_text?: boolean | null;
595
- /** @description Enable [Topic Detection](https://www.assemblyai.com/docs/Models/iab_classification), can be true or false */
539
+ /** @description Whether [Topic Detection](https://www.assemblyai.com/docs/Models/iab_classification) is enabled, can be true or false */
596
540
  iab_categories?: boolean | null;
597
541
  /**
598
- * @description The result of the Topic Detection model, if it was enabled during the transcription request.
542
+ * @description The result of the Topic Detection model, if it is enabled.
599
543
  * See [Topic Detection](https://www.assemblyai.com/docs/Models/iab_classification) for more information.
600
544
  */
601
- iab_categories_result?: {
602
- /** @description An array of results for the Topic Detection model. */
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 */
545
+ iab_categories_result?: TopicDetectionModelResult | null;
546
+ /** @description The unique identifier of your transcript */
612
547
  id: string;
613
548
  /**
614
549
  * @description The language of your audio file.
@@ -616,24 +551,24 @@ export type Transcript = {
616
551
  * The default value is 'en_us'.
617
552
  */
618
553
  language_code?: TranscriptLanguageCode;
619
- /** @description Whether [Automatic language detection](https://www.assemblyai.com/docs/Models/speech_recognition#automatic-language-detection) was enabled in the transcription request, either true or false */
554
+ /** @description Whether [Automatic language detection](https://www.assemblyai.com/docs/Models/speech_recognition#automatic-language-detection) is enabled, either true or false */
620
555
  language_detection?: boolean | null;
621
556
  /**
622
557
  * @deprecated
623
- * @description The language model that was used for the transcription
558
+ * @description The language model that was used for the transcript
624
559
  */
625
560
  language_model: string;
626
- /** @description Whether Automatic Punctuation was enabled in the transcription request, either true or false. */
561
+ /** @description Whether Automatic Punctuation is enabled, either true or false */
627
562
  punctuate?: boolean | null;
628
- /** @description Whether [PII Redaction](https://www.assemblyai.com/docs/Models/pii_redaction) was enabled in the transcription request, either true or false */
563
+ /** @description Whether [PII Redaction](https://www.assemblyai.com/docs/Models/pii_redaction) is enabled, either true or false */
629
564
  redact_pii: boolean;
630
565
  /**
631
- * @description Whether a redacted version of the audio file was generated (enabled or disabled in the transcription request),
566
+ * @description Whether a redacted version of the audio file was generated,
632
567
  * either true or false. See [PII redaction](https://www.assemblyai.com/docs/Models/pii_redaction) for more information.
633
568
  */
634
569
  redact_pii_audio?: boolean | null;
635
570
  /**
636
- * @description The audio quality of the PII-redacted audio file, if enabled in the transcription request.
571
+ * @description The audio quality of the PII-redacted audio file, if redact_pii_audio is enabled.
637
572
  * See [PII redaction](https://www.assemblyai.com/docs/Models/pii_redaction) for more information.
638
573
  */
639
574
  redact_pii_audio_quality?: string | null;
@@ -644,16 +579,16 @@ export type Transcript = {
644
579
  redact_pii_policies?: PiiPolicy[] | null;
645
580
  /** @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
581
  redact_pii_sub?: SubstitutionPolicy;
647
- /** @description Enable [Sentiment Analysis](https://www.assemblyai.com/docs/Models/sentiment_analysis), can be true or false */
582
+ /** @description Whether [Sentiment Analysis](https://www.assemblyai.com/docs/Models/sentiment_analysis) is enabled, can be true or false */
648
583
  sentiment_analysis?: boolean | null;
649
584
  /**
650
- * @description An array of results for the Sentiment Analysis model, if it was enabled during the transcription request.
585
+ * @description An array of results for the Sentiment Analysis model, if it is enabled.
651
586
  * See [Sentiment analysis](https://www.assemblyai.com/docs/Models/sentiment_analysis) for more information.
652
587
  */
653
588
  sentiment_analysis_results?: SentimentAnalysisResult[] | null;
654
- /** @description Enable [Speaker diarization](https://www.assemblyai.com/docs/Models/speaker_diarization), can be true or false */
589
+ /** @description Whether [Speaker diarization](https://www.assemblyai.com/docs/Models/speaker_diarization) is enabled, can be true or false */
655
590
  speaker_labels?: boolean | null;
656
- /** @description Defaults to null. 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. */
591
+ /** @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
592
  speakers_expected?: number | null;
658
593
  /**
659
594
  * Format: float
@@ -663,42 +598,42 @@ export type Transcript = {
663
598
  speech_threshold?: number | null;
664
599
  /**
665
600
  * @deprecated
666
- * @description Whether speed boost was enabled in the transcription request
601
+ * @description Whether speed boost is enabled
667
602
  */
668
603
  speed_boost?: boolean | null;
669
- /** @description The status of your transcription. Possible values are queued, processing, completed, or error. */
604
+ /** @description The status of your transcript. Possible values are queued, processing, completed, or error. */
670
605
  status: TranscriptStatus;
671
- /** @description Whether [Summarization](https://www.assemblyai.com/docs/Models/summarization) was enabled in the transcription request, either true or false */
606
+ /** @description Whether [Summarization](https://www.assemblyai.com/docs/Models/summarization) is enabled, either true or false */
672
607
  summarization: boolean;
673
- /** @description The generated summary of the media file, if [Summarization](https://www.assemblyai.com/docs/Models/summarization) was enabled in the transcription request */
608
+ /** @description The generated summary of the media file, if [Summarization](https://www.assemblyai.com/docs/Models/summarization) is enabled */
674
609
  summary?: string | null;
675
610
  /**
676
611
  * @description The Summarization model used to generate the summary,
677
- * if [Summarization](https://www.assemblyai.com/docs/Models/summarization) was enabled in the transcription request
612
+ * if [Summarization](https://www.assemblyai.com/docs/Models/summarization) is enabled
678
613
  */
679
614
  summary_model?: string | null;
680
- /** @description The type of summary generated, if [Summarization](https://www.assemblyai.com/docs/Models/summarization) was enabled in the transcription request */
615
+ /** @description The type of summary generated, if [Summarization](https://www.assemblyai.com/docs/Models/summarization) is enabled */
681
616
  summary_type?: string | null;
682
617
  /** @description The textual transcript of your media file */
683
618
  text?: string | null;
684
619
  /** @description True while a request is throttled and false when a request is no longer throttled */
685
620
  throttled?: boolean | null;
686
- /** @description The list of custom topics provided if custom topics was enabled in the transcription request */
621
+ /** @description The list of custom topics provided if custom topics is enabled */
687
622
  topics?: string[];
688
623
  /**
689
624
  * @description When dual_channel or speaker_labels is enabled, a list of turn-by-turn utterance objects.
690
625
  * See [Speaker diarization](https://www.assemblyai.com/docs/Models/speaker_diarization) for more information.
691
626
  */
692
627
  utterances?: TranscriptUtterance[] | null;
693
- /** @description Whether webhook authentication details were provided in the transcription request */
628
+ /** @description Whether webhook authentication details were provided */
694
629
  webhook_auth: boolean;
695
- /** @description The header name which should be sent back with webhook calls, if provided in the transcription request */
630
+ /** @description The header name which should be sent back with webhook calls */
696
631
  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 in the transcription request */
632
+ /** @description The status code we received from your server when delivering your webhook, if a webhook URL was provided */
698
633
  webhook_status_code?: number | null;
699
- /** @description The URL to which we send webhooks upon trancription completion, if provided in the transcription request */
634
+ /** @description The URL to which we send webhooks upon trancription completion */
700
635
  webhook_url?: string | null;
701
- /** @description The list of custom vocabulary to boost transcription probability for, if provided in the transcription request */
636
+ /** @description The list of custom vocabulary to boost transcription probability for */
702
637
  word_boost?: string[];
703
638
  /**
704
639
  * @description An array of temporally-sequential word objects, one for each word in the transcript.
@@ -708,7 +643,7 @@ export type Transcript = {
708
643
  };
709
644
 
710
645
  /**
711
- * @description The word boost parameter value, if provided in the transcription request.
646
+ * @description The word boost parameter value
712
647
  * @enum {string}
713
648
  */
714
649
  export type TranscriptBoostParam = "low" | "default" | "high";
@@ -726,7 +661,7 @@ export type TranscriptCustomSpelling = {
726
661
  * The default value is 'en_us'.
727
662
  *
728
663
  * @default en_us
729
- * @enum {string|null}
664
+ * @enum {string}
730
665
  */
731
666
  export type TranscriptLanguageCode =
732
667
  | "en"
@@ -764,26 +699,103 @@ export type TranscriptListItem = {
764
699
  status: TranscriptStatus;
765
700
  };
766
701
 
767
- export type TranscriptListParameters = {
768
- /** @description Get transcripts that were created after this transcript ID */
769
- after_id?: string;
770
- /** @description Get transcripts that were created before this transcript ID */
771
- before_id?: string;
702
+ /** @description The parameters for creating a transcript */
703
+ export type TranscriptOptionalParams = {
704
+ /** @description The point in time, in milliseconds, to stop transcribing in your media file */
705
+ audio_end_at?: number;
706
+ /** @description The point in time, in milliseconds, to begin transcribing in your media file */
707
+ audio_start_from?: number;
708
+ /** @description Enable [Auto Chapters](https://www.assemblyai.com/docs/Models/auto_chapters), can be true or false */
709
+ auto_chapters?: boolean;
710
+ /** @description Whether Key Phrases is enabled, either true or false */
711
+ auto_highlights?: boolean;
712
+ /** @description The word boost parameter value */
713
+ boost_param?: TranscriptBoostParam;
714
+ /** @description Enable [Content Moderation](https://www.assemblyai.com/docs/Models/content_moderation), can be true or false */
715
+ content_safety?: boolean;
716
+ /** @description Customize how words are spelled and formatted using to and from values */
717
+ custom_spelling?: TranscriptCustomSpelling[];
718
+ /** @description Whether custom topics is enabled, either true or false */
719
+ custom_topics?: boolean;
720
+ /** @description Transcribe Filler Words, like "umm", in your media file; can be true or false */
721
+ disfluencies?: boolean;
722
+ /** @description Enable [Dual Channel](https://assemblyai.com/docs/Models/speech_recognition#dual-channel-transcription) transcription, can be true or false */
723
+ dual_channel?: boolean;
724
+ /** @description Enable [Entity Detection](https://www.assemblyai.com/docs/Models/entity_detection), can be true or false */
725
+ entity_detection?: boolean;
726
+ /** @description Filter profanity from the transcribed text, can be true or false */
727
+ filter_profanity?: boolean;
728
+ /** @description Enable Text Formatting, can be true or false */
729
+ format_text?: boolean;
730
+ /** @description Enable [Topic Detection](https://www.assemblyai.com/docs/Models/iab_classification), can be true or false */
731
+ iab_categories?: boolean;
772
732
  /**
773
- * Format: date
774
- * @description Only get transcripts created on this date
733
+ * @description The language of your audio file. Possible values are found in [Supported Languages](https://www.assemblyai.com/docs/Concepts/supported_languages).
734
+ * The default value is 'en_us'.
775
735
  */
776
- created_on?: string;
736
+ language_code?: TranscriptLanguageCode | null;
737
+ /** @description Whether [Automatic language detection](https://www.assemblyai.com/docs/Models/speech_recognition#automatic-language-detection) is enabled, either true or false */
738
+ language_detection?: boolean;
739
+ /** @description Enable Automatic Punctuation, can be true or false */
740
+ punctuate?: boolean;
741
+ /** @description Redact PII from the transcribed text using the Redact PII model, can be true or false */
742
+ redact_pii?: boolean;
743
+ /** @description Generate a copy of the original media file with spoken PII "beeped" out, can be true or false. See [PII redaction](https://www.assemblyai.com/docs/Models/pii_redaction) for more details. */
744
+ redact_pii_audio?: boolean;
777
745
  /**
778
- * Format: int64
779
- * @description Maximum amount of transcripts to retrieve
780
- * @default 10
746
+ * @description Controls the filetype of the audio created by redact_pii_audio. Currently supports mp3 (default) and wav. See [PII redaction](https://www.assemblyai.com/docs/Models/pii_redaction) for more details.
747
+ * @default mp3
781
748
  */
782
- limit?: number;
783
- /** @description Filter by transcript status */
784
- status?: TranscriptStatus;
785
- /** @description Only get throttled transcripts, overrides the status filter */
786
- throttled_only?: boolean;
749
+ redact_pii_audio_quality?: string;
750
+ /** @description The list of PII Redaction policies to enable. See [PII redaction](https://www.assemblyai.com/docs/Models/pii_redaction) for more details. */
751
+ redact_pii_policies?: PiiPolicy[];
752
+ /** @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. */
753
+ redact_pii_sub?: SubstitutionPolicy | null;
754
+ /** @description Enable [Sentiment Analysis](https://www.assemblyai.com/docs/Models/sentiment_analysis), can be true or false */
755
+ sentiment_analysis?: boolean;
756
+ /** @description Enable [Speaker diarization](https://www.assemblyai.com/docs/Models/speaker_diarization), can be true or false */
757
+ speaker_labels?: boolean;
758
+ /**
759
+ * @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.
760
+ * @default null
761
+ */
762
+ speakers_expected?: number | null;
763
+ /**
764
+ * Format: float
765
+ * @description Reject audio files that contain less than this fraction of speech.
766
+ * Valid values are in the range [0, 1] inclusive.
767
+ *
768
+ * @default null
769
+ */
770
+ speech_threshold?: number | null;
771
+ /** @description Enable [Summarization](https://www.assemblyai.com/docs/Models/summarization), can be true or false */
772
+ summarization?: boolean;
773
+ /**
774
+ * @description The model to summarize the transcript
775
+ * @default informative
776
+ */
777
+ summary_model?: SummaryModel;
778
+ /**
779
+ * @description The type of summary
780
+ * @default bullets
781
+ */
782
+ summary_type?: SummaryType;
783
+ /** @description The list of custom topics provided, if custom topics is enabled */
784
+ topics?: string[];
785
+ /**
786
+ * @description The header name which should be sent back with webhook calls
787
+ * @default null
788
+ */
789
+ webhook_auth_header_name?: string | null;
790
+ /**
791
+ * @description Specify a header name and value to send back with a webhook call for added security
792
+ * @default null
793
+ */
794
+ webhook_auth_header_value?: string | null;
795
+ /** @description The URL to which AssemblyAI send webhooks upon trancription completion */
796
+ webhook_url?: string;
797
+ /** @description The list of custom vocabulary to boost transcription probability for */
798
+ word_boost?: string[];
787
799
  };
788
800
 
789
801
  export type TranscriptParagraph = {
@@ -795,6 +807,12 @@ export type TranscriptParagraph = {
795
807
  words: TranscriptWord[];
796
808
  };
797
809
 
810
+ /** @description The parameters for creating a transcript */
811
+ export type TranscriptParams = TranscriptOptionalParams & {
812
+ /** @description The URL of the audio or video file to transcribe. */
813
+ audio_url: string;
814
+ };
815
+
798
816
  export type TranscriptSentence = {
799
817
  /** Format: double */
800
818
  confidence: number;
@@ -805,7 +823,7 @@ export type TranscriptSentence = {
805
823
  };
806
824
 
807
825
  /**
808
- * @description The status of your transcription. Possible values are queued, processing, completed, or error.
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";