assemblyai 4.3.2 → 4.3.4

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.
@@ -11,8 +11,8 @@ type XOR<T, U> = T | U extends object
11
11
  type OneOf<T extends any[]> = T extends [infer Only]
12
12
  ? Only
13
13
  : T extends [infer A, infer B, ...infer Rest]
14
- ? OneOf<[XOR<A, B>, ...Rest]>
15
- : never;
14
+ ? OneOf<[XOR<A, B>, ...Rest]>
15
+ : never;
16
16
 
17
17
  /* eslint-enable */
18
18
 
@@ -58,7 +58,7 @@ export type AutoHighlightResult = {
58
58
 
59
59
  /**
60
60
  * An array of results for the Key Phrases model, if it is enabled.
61
- * See [Key phrases](https://www.assemblyai.com/docs/models/key-phrases) for more information.
61
+ * See {@link https://www.assemblyai.com/docs/models/key-phrases | Key phrases } for more information.
62
62
  *
63
63
  * @example
64
64
  * ```js
@@ -380,7 +380,7 @@ export type ContentSafetyLabelResult = {
380
380
 
381
381
  /**
382
382
  * An array of results for the Content Moderation model, if it is enabled.
383
- * See [Content moderation](https://www.assemblyai.com/docs/models/content-moderation) for more information.
383
+ * See {@link https://www.assemblyai.com/docs/models/content-moderation | Content moderation } for more information.
384
384
  *
385
385
  * @example
386
386
  * ```js
@@ -585,7 +585,8 @@ export type LemurActionItemsResponse = LemurBaseResponse & {
585
585
  * ```js
586
586
  * {
587
587
  * "transcript_ids": [
588
- * "64nygnr62k-405c-4ae8-8a6b-d90b40ff3cce"
588
+ * "85f9b381-e90c-46ed-beca-7d76245d375e",
589
+ * "7c3acd18-df4d-4432-88f5-1e89f8827eea"
589
590
  * ],
590
591
  * "context": "This is an interview about wildfires.",
591
592
  * "final_model": "default",
@@ -603,7 +604,7 @@ export type LemurBaseParams = {
603
604
  string,
604
605
  {
605
606
  [key: string]: unknown;
606
- }
607
+ },
607
608
  ]
608
609
  >;
609
610
  /**
@@ -686,7 +687,7 @@ export type LemurQuestion = {
686
687
  string,
687
688
  {
688
689
  [key: string]: unknown;
689
- }
690
+ },
690
691
  ]
691
692
  >;
692
693
  /**
@@ -831,12 +832,12 @@ export type LemurSummaryResponse = LemurBaseResponse & {
831
832
  * }
832
833
  * ```
833
834
  */
834
- export type LemurTaskParams = LemurBaseParams & {
835
+ export type LemurTaskParams = {
835
836
  /**
836
837
  * Your text to prompt the model to produce a desired output, including any context you want to pass into the model.
837
838
  */
838
839
  prompt: string;
839
- };
840
+ } & LemurBaseParams;
840
841
 
841
842
  /**
842
843
  * @example
@@ -847,12 +848,12 @@ export type LemurTaskParams = LemurBaseParams & {
847
848
  * }
848
849
  * ```
849
850
  */
850
- export type LemurTaskResponse = LemurBaseResponse & {
851
+ export type LemurTaskResponse = {
851
852
  /**
852
853
  * The response generated by LeMUR.
853
854
  */
854
855
  response: string;
855
- };
856
+ } & LemurBaseResponse;
856
857
 
857
858
  /**
858
859
  * @example
@@ -896,6 +897,8 @@ export type ListTranscriptParams = {
896
897
  };
897
898
 
898
899
  /**
900
+ * Details of the transcript page.
901
+ * Details of the transcript page. Transcripts are sorted from newest to oldest. The previous URL always points to a page with older transcripts.
899
902
  * @example
900
903
  * ```js
901
904
  * {
@@ -908,10 +911,27 @@ export type ListTranscriptParams = {
908
911
  * ```
909
912
  */
910
913
  export type PageDetails = {
914
+ /**
915
+ * The URL used to retrieve the current page of transcripts
916
+ */
911
917
  current_url: string;
918
+ /**
919
+ * The number of results this page is limited to
920
+ */
912
921
  limit: number;
913
- next_url?: string | null;
914
- prev_url: string;
922
+ /**
923
+ * The URL to the next page of transcripts
924
+ * The URL to the next page of transcripts. The next URL always points to a page with newer transcripts.
925
+ */
926
+ next_url: string | null;
927
+ /**
928
+ * The URL to the previous page of transcripts
929
+ * The URL to the next page of transcripts. The previous URL always points to a page with older transcripts.
930
+ */
931
+ prev_url: string | null;
932
+ /**
933
+ * The actual number of results in the page
934
+ */
915
935
  result_count: number;
916
936
  };
917
937
 
@@ -1063,7 +1083,7 @@ export type PurgeLemurRequestDataResponse = {
1063
1083
  */
1064
1084
  export type RealtimeTemporaryTokenResponse = {
1065
1085
  /**
1066
- * The temporary authentication token for real-time transcription
1086
+ * The temporary authentication token for Streaming Speech-to-Text
1067
1087
  */
1068
1088
  token: string;
1069
1089
  };
@@ -1094,7 +1114,7 @@ export type RedactedAudioResponse = {
1094
1114
  export type RedactedAudioStatus = "redacted_audio_ready";
1095
1115
 
1096
1116
  /**
1097
- * 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.
1117
+ * Controls the filetype of the audio created by redact_pii_audio. Currently supports mp3 (default) and wav. See {@link https://www.assemblyai.com/docs/models/pii-redaction | PII redaction } for more details.
1098
1118
  * @defaultValue "mp3"
1099
1119
  * @example "mp3"
1100
1120
  */
@@ -1237,7 +1257,7 @@ export type SentimentAnalysisResult = {
1237
1257
  */
1238
1258
  sentiment: Sentiment;
1239
1259
  /**
1240
- * The speaker of the sentence if [Speaker Diarization](https://www.assemblyai.com/docs/models/speaker-diarization) is enabled, else null
1260
+ * The speaker of the sentence if {@link https://www.assemblyai.com/docs/models/speaker-diarization | Speaker Diarization } is enabled, else null
1241
1261
  */
1242
1262
  speaker?: string | null;
1243
1263
  /**
@@ -1269,12 +1289,12 @@ export type SeverityScoreSummary = {
1269
1289
  /**
1270
1290
  * The speech model to use for the transcription.
1271
1291
  */
1272
- export type SpeechModel = "nano";
1292
+ export type SpeechModel = "best" | "nano" | "conformer-2";
1273
1293
 
1274
1294
  /**
1275
- * 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.
1295
+ * The replacement logic for detected PII, can be "entity_name" or "hash". See {@link https://www.assemblyai.com/docs/models/pii-redaction | PII redaction } for more details.
1276
1296
  */
1277
- export type SubstitutionPolicy = "entity_type" | "hash";
1297
+ export type SubstitutionPolicy = "entity_name" | "hash";
1278
1298
 
1279
1299
  /**
1280
1300
  * Format of the subtitles
@@ -1321,7 +1341,7 @@ export type Timestamp = {
1321
1341
 
1322
1342
  /**
1323
1343
  * The result of the Topic Detection model, if it is enabled.
1324
- * See [Topic Detection](https://www.assemblyai.com/docs/models/topic-detection) for more information.
1344
+ * See {@link https://www.assemblyai.com/docs/models/topic-detection | Topic Detection } for more information.
1325
1345
  *
1326
1346
  * @example
1327
1347
  * ```js
@@ -1734,7 +1754,7 @@ export type TopicDetectionResult = {
1734
1754
  * "punctuate": true,
1735
1755
  * "format_text": true,
1736
1756
  * "dual_channel": false,
1737
- * "webhook_url": "https://your-webhook-url/path",
1757
+ * "webhook_url": "https://your-webhook-url.tld/path",
1738
1758
  * "webhook_status_code": 200,
1739
1759
  * "webhook_auth": true,
1740
1760
  * "webhook_auth_header_name": "webhook-secret",
@@ -2206,7 +2226,7 @@ export type Transcript = {
2206
2226
  */
2207
2227
  audio_url: string;
2208
2228
  /**
2209
- * Whether [Auto Chapters](https://www.assemblyai.com/docs/models/auto-chapters) is enabled, can be true or false
2229
+ * Whether {@link https://www.assemblyai.com/docs/models/auto-chapters | Auto Chapters } is enabled, can be true or false
2210
2230
  */
2211
2231
  auto_chapters?: boolean | null;
2212
2232
  /**
@@ -2215,7 +2235,7 @@ export type Transcript = {
2215
2235
  auto_highlights: boolean;
2216
2236
  /**
2217
2237
  * An array of results for the Key Phrases model, if it is enabled.
2218
- * See [Key phrases](https://www.assemblyai.com/docs/models/key-phrases) for more information.
2238
+ * See {@link https://www.assemblyai.com/docs/models/key-phrases | Key phrases } for more information.
2219
2239
  */
2220
2240
  auto_highlights_result?: AutoHighlightsResult | null;
2221
2241
  /**
@@ -2231,12 +2251,12 @@ export type Transcript = {
2231
2251
  */
2232
2252
  confidence?: number | null;
2233
2253
  /**
2234
- * Whether [Content Moderation](https://www.assemblyai.com/docs/models/content-moderation) is enabled, can be true or false
2254
+ * Whether {@link https://www.assemblyai.com/docs/models/content-moderation | Content Moderation } is enabled, can be true or false
2235
2255
  */
2236
2256
  content_safety?: boolean | null;
2237
2257
  /**
2238
2258
  * An array of results for the Content Moderation model, if it is enabled.
2239
- * See [Content moderation](https://www.assemblyai.com/docs/models/content-moderation) for more information.
2259
+ * See {@link https://www.assemblyai.com/docs/models/content-moderation | Content moderation } for more information.
2240
2260
  */
2241
2261
  content_safety_labels?: ContentSafetyLabelsResult | null;
2242
2262
  /**
@@ -2252,16 +2272,16 @@ export type Transcript = {
2252
2272
  */
2253
2273
  disfluencies?: boolean | null;
2254
2274
  /**
2255
- * 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
2275
+ * Whether {@link https://www.assemblyai.com/docs/models/speech-recognition#dual-channel-transcription | Dual channel transcription } was enabled in the transcription request, either true or false
2256
2276
  */
2257
2277
  dual_channel?: boolean | null;
2258
2278
  /**
2259
2279
  * An array of results for the Entity Detection model, if it is enabled.
2260
- * See [Entity detection](https://www.assemblyai.com/docs/models/entity-detection) for more information.
2280
+ * See {@link https://www.assemblyai.com/docs/models/entity-detection | Entity detection } for more information.
2261
2281
  */
2262
2282
  entities?: Entity[] | null;
2263
2283
  /**
2264
- * Whether [Entity Detection](https://www.assemblyai.com/docs/models/entity-detection) is enabled, can be true or false
2284
+ * Whether {@link https://www.assemblyai.com/docs/models/entity-detection | Entity Detection } is enabled, can be true or false
2265
2285
  */
2266
2286
  entity_detection?: boolean | null;
2267
2287
  /**
@@ -2269,7 +2289,7 @@ export type Transcript = {
2269
2289
  */
2270
2290
  error?: string;
2271
2291
  /**
2272
- * Whether [Profanity Filtering](https://www.assemblyai.com/docs/models/speech-recognition#profanity-filtering) is enabled, either true or false
2292
+ * Whether {@link https://www.assemblyai.com/docs/models/speech-recognition#profanity-filtering | Profanity Filtering } is enabled, either true or false
2273
2293
  */
2274
2294
  filter_profanity?: boolean | null;
2275
2295
  /**
@@ -2277,12 +2297,12 @@ export type Transcript = {
2277
2297
  */
2278
2298
  format_text?: boolean | null;
2279
2299
  /**
2280
- * Whether [Topic Detection](https://www.assemblyai.com/docs/models/topic-detection) is enabled, can be true or false
2300
+ * Whether {@link https://www.assemblyai.com/docs/models/topic-detection | Topic Detection } is enabled, can be true or false
2281
2301
  */
2282
2302
  iab_categories?: boolean | null;
2283
2303
  /**
2284
2304
  * The result of the Topic Detection model, if it is enabled.
2285
- * See [Topic Detection](https://www.assemblyai.com/docs/models/topic-detection) for more information.
2305
+ * See {@link https://www.assemblyai.com/docs/models/topic-detection | Topic Detection } for more information.
2286
2306
  */
2287
2307
  iab_categories_result?: TopicDetectionModelResult | null;
2288
2308
  /**
@@ -2291,12 +2311,12 @@ export type Transcript = {
2291
2311
  id: string;
2292
2312
  /**
2293
2313
  * The language of your audio file.
2294
- * Possible values are found in [Supported Languages](https://www.assemblyai.com/docs/concepts/supported-languages).
2314
+ * Possible values are found in {@link https://www.assemblyai.com/docs/concepts/supported-languages | Supported Languages }.
2295
2315
  * The default value is 'en_us'.
2296
2316
  */
2297
- language_code?: TranscriptLanguageCode;
2317
+ language_code?: LiteralUnion<TranscriptLanguageCode, string>;
2298
2318
  /**
2299
- * Whether [Automatic language detection](https://www.assemblyai.com/docs/models/speech-recognition#automatic-language-detection) is enabled, either true or false
2319
+ * Whether {@link https://www.assemblyai.com/docs/models/speech-recognition#automatic-language-detection | Automatic language detection } is enabled, either true or false
2300
2320
  */
2301
2321
  language_detection?: boolean | null;
2302
2322
  /**
@@ -2309,43 +2329,43 @@ export type Transcript = {
2309
2329
  */
2310
2330
  punctuate?: boolean | null;
2311
2331
  /**
2312
- * Whether [PII Redaction](https://www.assemblyai.com/docs/models/pii-redaction) is enabled, either true or false
2332
+ * Whether {@link https://www.assemblyai.com/docs/models/pii-redaction | PII Redaction } is enabled, either true or false
2313
2333
  */
2314
2334
  redact_pii: boolean;
2315
2335
  /**
2316
2336
  * Whether a redacted version of the audio file was generated,
2317
- * either true or false. See [PII redaction](https://www.assemblyai.com/docs/models/pii-redaction) for more information.
2337
+ * either true or false. See {@link https://www.assemblyai.com/docs/models/pii-redaction | PII redaction } for more information.
2318
2338
  */
2319
2339
  redact_pii_audio?: boolean | null;
2320
2340
  /**
2321
2341
  * The audio quality of the PII-redacted audio file, if redact_pii_audio is enabled.
2322
- * See [PII redaction](https://www.assemblyai.com/docs/models/pii-redaction) for more information.
2342
+ * See {@link https://www.assemblyai.com/docs/models/pii-redaction | PII redaction } for more information.
2323
2343
  */
2324
2344
  redact_pii_audio_quality?: RedactPiiAudioQuality | null;
2325
2345
  /**
2326
2346
  * The list of PII Redaction policies that were enabled, if PII Redaction is enabled.
2327
- * See [PII redaction](https://www.assemblyai.com/docs/models/pii-redaction) for more information.
2347
+ * See {@link https://www.assemblyai.com/docs/models/pii-redaction | PII redaction } for more information.
2328
2348
  */
2329
2349
  redact_pii_policies?: PiiPolicy[] | null;
2330
2350
  /**
2331
- * 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.
2351
+ * The replacement logic for detected PII, can be "entity_type" or "hash". See {@link https://www.assemblyai.com/docs/models/pii-redaction | PII redaction } for more details.
2332
2352
  */
2333
2353
  redact_pii_sub?: SubstitutionPolicy;
2334
2354
  /**
2335
- * Whether [Sentiment Analysis](https://www.assemblyai.com/docs/models/sentiment-analysis) is enabled, can be true or false
2355
+ * Whether {@link https://www.assemblyai.com/docs/models/sentiment-analysis | Sentiment Analysis } is enabled, can be true or false
2336
2356
  */
2337
2357
  sentiment_analysis?: boolean | null;
2338
2358
  /**
2339
2359
  * An array of results for the Sentiment Analysis model, if it is enabled.
2340
- * See [Sentiment analysis](https://www.assemblyai.com/docs/models/sentiment-analysis) for more information.
2360
+ * See {@link https://www.assemblyai.com/docs/models/sentiment-analysis | Sentiment analysis } for more information.
2341
2361
  */
2342
2362
  sentiment_analysis_results?: SentimentAnalysisResult[] | null;
2343
2363
  /**
2344
- * Whether [Speaker diarization](https://www.assemblyai.com/docs/models/speaker-diarization) is enabled, can be true or false
2364
+ * Whether {@link https://www.assemblyai.com/docs/models/speaker-diarization | Speaker diarization } is enabled, can be true or false
2345
2365
  */
2346
2366
  speaker_labels?: boolean | null;
2347
2367
  /**
2348
- * 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.
2368
+ * Tell the speaker label model how many speakers it should attempt to identify, up to 10. See {@link https://www.assemblyai.com/docs/models/speaker-diarization | Speaker diarization } for more details.
2349
2369
  */
2350
2370
  speakers_expected?: number | null;
2351
2371
  /**
@@ -2368,20 +2388,20 @@ export type Transcript = {
2368
2388
  */
2369
2389
  status: TranscriptStatus;
2370
2390
  /**
2371
- * Whether [Summarization](https://www.assemblyai.com/docs/models/summarization) is enabled, either true or false
2391
+ * Whether {@link https://www.assemblyai.com/docs/models/summarization | Summarization } is enabled, either true or false
2372
2392
  */
2373
2393
  summarization: boolean;
2374
2394
  /**
2375
- * The generated summary of the media file, if [Summarization](https://www.assemblyai.com/docs/models/summarization) is enabled
2395
+ * The generated summary of the media file, if {@link https://www.assemblyai.com/docs/models/summarization | Summarization } is enabled
2376
2396
  */
2377
2397
  summary?: string | null;
2378
2398
  /**
2379
2399
  * The Summarization model used to generate the summary,
2380
- * if [Summarization](https://www.assemblyai.com/docs/models/summarization) is enabled
2400
+ * if {@link https://www.assemblyai.com/docs/models/summarization | Summarization } is enabled
2381
2401
  */
2382
2402
  summary_model?: string | null;
2383
2403
  /**
2384
- * The type of summary generated, if [Summarization](https://www.assemblyai.com/docs/models/summarization) is enabled
2404
+ * The type of summary generated, if {@link https://www.assemblyai.com/docs/models/summarization | Summarization } is enabled
2385
2405
  */
2386
2406
  summary_type?: string | null;
2387
2407
  /**
@@ -2398,7 +2418,7 @@ export type Transcript = {
2398
2418
  topics?: string[];
2399
2419
  /**
2400
2420
  * When dual_channel or speaker_labels is enabled, a list of turn-by-turn utterance objects.
2401
- * See [Speaker diarization](https://www.assemblyai.com/docs/models/speaker-diarization) for more information.
2421
+ * See {@link https://www.assemblyai.com/docs/models/speaker-diarization | Speaker diarization } for more information.
2402
2422
  */
2403
2423
  utterances?: TranscriptUtterance[] | null;
2404
2424
  /**
@@ -2423,7 +2443,7 @@ export type Transcript = {
2423
2443
  word_boost?: string[];
2424
2444
  /**
2425
2445
  * An array of temporally-sequential word objects, one for each word in the transcript.
2426
- * See [Speech recognition](https://www.assemblyai.com/docs/models/speech-recognition) for more information.
2446
+ * See {@link https://www.assemblyai.com/docs/models/speech-recognition | Speech recognition } for more information.
2427
2447
  */
2428
2448
  words?: TranscriptWord[] | null;
2429
2449
  };
@@ -2457,7 +2477,7 @@ export type TranscriptCustomSpelling = {
2457
2477
  };
2458
2478
 
2459
2479
  /**
2460
- * The language of your audio file. Possible values are found in [Supported Languages](https://www.assemblyai.com/docs/concepts/supported-languages).
2480
+ * The language of your audio file. Possible values are found in {@link https://www.assemblyai.com/docs/concepts/supported-languages | Supported Languages }.
2461
2481
  * The default value is 'en_us'.
2462
2482
  *
2463
2483
  * @defaultValue "en_us
@@ -2485,32 +2505,45 @@ export type TranscriptLanguageCode =
2485
2505
  | "vi";
2486
2506
 
2487
2507
  /**
2508
+ * A list of transcripts
2509
+ * A list of transcripts. Transcripts are sorted from newest to oldest. The previous URL always points to a page with older transcripts.
2488
2510
  * @example
2489
2511
  * ```js
2490
2512
  * {
2491
2513
  * "page_details": {
2492
- * "limit": 2",
2493
- * "result_count": 2,
2494
- * "current_url": "https://api.assemblyai.com/v2/transcript?limit=2",
2495
- * "prev_url": "https://api.assemblyai.com/v2/transcript?limit=2&before_id=62npeahu2b-a8ea-4112-854c-69542c20d90c",
2496
- * "next_url": "https://api.assemblyai.com/v2/transcript?limit=2&after_id=62nfw3mlar-01ad-4631-92f6-629929496eed"
2514
+ * "limit": 3",
2515
+ * "result_count": 3,
2516
+ * "current_url": "https://api.assemblyai.com/v2/transcript?limit=3",
2517
+ * "prev_url": "https://api.assemblyai.com/v2/transcript?limit=3&before_id=28a73d01-98db-41dd-9e98-2533ba0af117",
2518
+ * "next_url": "https://api.assemblyai.com/v2/transcript?limit=3&after_id=b33f4691-85b7-4f31-be12-a87cef1c1229"
2497
2519
  * },
2498
2520
  * "transcripts": [
2499
2521
  * {
2500
- * "id": "9ea68fd3-f953-42c1-9742-976c447fb463",
2501
- * "resource_url": "https://api.assemblyai.com/v2/transcript/9ea68fd3-f953-42c1-9742-976c447fb463",
2522
+ * "id": "b33f4691-85b7-4f31-be12-a87cef1c1229",
2523
+ * "resource_url": "https://api.assemblyai.com/v2/transcript/b33f4691-85b7-4f31-be12-a87cef1c1229",
2502
2524
  * "status": "completed",
2503
- * "created": "2023-11-02T21:49:25.586965",
2504
- * "completed": "2023-11-02T21:49:25.586965",
2505
- * "audio_url": "https://github.com/AssemblyAI-Examples/audio-examples/raw/main/20230607_me_canadian_wildfires.mp3"
2525
+ * "created": "2024-03-11T21:29:59.936851",
2526
+ * "completed": "2024-03-11T21:30:07.314223",
2527
+ * "audio_url": "http://deleted_by_user",
2528
+ * "error": null
2506
2529
  * },
2507
2530
  * {
2508
- * "id": "d5a3d302-066e-43fb-b63b-8f57baf185db",
2509
- * "resource_url": "https://api.assemblyai.com/v2/transcript/d5a3d302-066e-43fb-b63b-8f57baf185db",
2531
+ * "id": "ce522f10-d204-42e8-a838-6b95098145cc",
2532
+ * "resource_url": "https://api.assemblyai.com/v2/transcript/ce522f10-d204-42e8-a838-6b95098145cc",
2533
+ * "status": "error",
2534
+ * "created": "2024-03-11T21:23:59.979420",
2535
+ * "completed": null,
2536
+ * "audio_url": "https://storage.googleapis.com/client-docs-samples/nbc.mp3",
2537
+ * "error": "Download error, unable to download https://storage.googleapis.com/client-docs-samples/nbc.mp3. Please make sure the file exists and is accessible from the internet."
2538
+ * },
2539
+ * {
2540
+ * "id": "28a73d01-98db-41dd-9e98-2533ba0af117",
2541
+ * "resource_url": "https://api.assemblyai.com/v2/transcript/28a73d01-98db-41dd-9e98-2533ba0af117",
2510
2542
  * "status": "completed",
2511
- * "created": "2023-11-02T21:49:25.586965",
2512
- * "completed": "2023-11-02T21:49:25.586965",
2513
- * "audio_url": "http://deleted_by_user"
2543
+ * "created": "2024-03-11T21:12:57.372215",
2544
+ * "completed": "2024-03-11T21:13:03.267020",
2545
+ * "audio_url": "https://storage.googleapis.com/aai-docs-samples/nbc.mp3",
2546
+ * "error": null
2514
2547
  * }
2515
2548
  * ]
2516
2549
  * }
@@ -2530,7 +2563,8 @@ export type TranscriptList = {
2530
2563
  * "status": "completed",
2531
2564
  * "created": "2023-11-02T21:49:25.586965",
2532
2565
  * "completed": "2023-11-02T21:49:25.586965",
2533
- * "audio_url": "https://github.com/AssemblyAI-Examples/audio-examples/raw/main/20230607_me_canadian_wildfires.mp3"
2566
+ * "audio_url": "https://github.com/AssemblyAI-Examples/audio-examples/raw/main/20230607_me_canadian_wildfires.mp3",
2567
+ * "error": null
2534
2568
  * }
2535
2569
  * ```
2536
2570
  */
@@ -2538,6 +2572,10 @@ export type TranscriptListItem = {
2538
2572
  audio_url: string;
2539
2573
  completed: Date | null;
2540
2574
  created: Date;
2575
+ /**
2576
+ * Error message of why the transcript failed
2577
+ */
2578
+ error: string | null;
2541
2579
  id: string;
2542
2580
  resource_url: string;
2543
2581
  status: TranscriptStatus;
@@ -2553,7 +2591,7 @@ export type TranscriptListItem = {
2553
2591
  * "punctuate": true,
2554
2592
  * "format_text": true,
2555
2593
  * "dual_channel": true,
2556
- * "webhook_url": "https://your-webhook-url/path",
2594
+ * "webhook_url": "https://your-webhook-url.tld/path",
2557
2595
  * "webhook_auth_header_name": "webhook-secret",
2558
2596
  * "webhook_auth_header_value": "webhook-secret-value",
2559
2597
  * "auto_highlights": true,
@@ -2603,7 +2641,7 @@ export type TranscriptOptionalParams = {
2603
2641
  */
2604
2642
  audio_start_from?: number;
2605
2643
  /**
2606
- * Enable [Auto Chapters](https://www.assemblyai.com/docs/models/auto-chapters), can be true or false
2644
+ * Enable {@link https://www.assemblyai.com/docs/models/auto-chapters | Auto Chapters }, can be true or false
2607
2645
  */
2608
2646
  auto_chapters?: boolean;
2609
2647
  /**
@@ -2615,7 +2653,7 @@ export type TranscriptOptionalParams = {
2615
2653
  */
2616
2654
  boost_param?: TranscriptBoostParam;
2617
2655
  /**
2618
- * Enable [Content Moderation](https://www.assemblyai.com/docs/models/content-moderation), can be true or false
2656
+ * Enable {@link https://www.assemblyai.com/docs/models/content-moderation | Content Moderation }, can be true or false
2619
2657
  */
2620
2658
  content_safety?: boolean;
2621
2659
  /**
@@ -2635,11 +2673,11 @@ export type TranscriptOptionalParams = {
2635
2673
  */
2636
2674
  disfluencies?: boolean;
2637
2675
  /**
2638
- * Enable [Dual Channel](https://www.assemblyai.com/docs/models/speech-recognition#dual-channel-transcription) transcription, can be true or false.
2676
+ * Enable {@link https://www.assemblyai.com/docs/models/speech-recognition#dual-channel-transcription | Dual Channel } transcription, can be true or false.
2639
2677
  */
2640
2678
  dual_channel?: boolean;
2641
2679
  /**
2642
- * Enable [Entity Detection](https://www.assemblyai.com/docs/models/entity-detection), can be true or false
2680
+ * Enable {@link https://www.assemblyai.com/docs/models/entity-detection | Entity Detection }, can be true or false
2643
2681
  */
2644
2682
  entity_detection?: boolean;
2645
2683
  /**
@@ -2651,16 +2689,16 @@ export type TranscriptOptionalParams = {
2651
2689
  */
2652
2690
  format_text?: boolean;
2653
2691
  /**
2654
- * Enable [Topic Detection](https://www.assemblyai.com/docs/models/topic-detection), can be true or false
2692
+ * Enable {@link https://www.assemblyai.com/docs/models/topic-detection | Topic Detection }, can be true or false
2655
2693
  */
2656
2694
  iab_categories?: boolean;
2657
2695
  /**
2658
- * The language of your audio file. Possible values are found in [Supported Languages](https://www.assemblyai.com/docs/concepts/supported-languages).
2696
+ * The language of your audio file. Possible values are found in {@link https://www.assemblyai.com/docs/concepts/supported-languages | Supported Languages }.
2659
2697
  * The default value is 'en_us'.
2660
2698
  */
2661
- language_code?: TranscriptLanguageCode | null;
2699
+ language_code?: LiteralUnion<TranscriptLanguageCode, string> | null;
2662
2700
  /**
2663
- * 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.
2701
+ * Whether {@link https://www.assemblyai.com/docs/models/speech-recognition#automatic-language-detection | Automatic language detection } was enabled in the transcription request, either true or false.
2664
2702
  */
2665
2703
  language_detection?: boolean;
2666
2704
  /**
@@ -2672,32 +2710,32 @@ export type TranscriptOptionalParams = {
2672
2710
  */
2673
2711
  redact_pii?: boolean;
2674
2712
  /**
2675
- * 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.
2713
+ * Generate a copy of the original media file with spoken PII "beeped" out, can be true or false. See {@link https://www.assemblyai.com/docs/models/pii-redaction | PII redaction } for more details.
2676
2714
  */
2677
2715
  redact_pii_audio?: boolean;
2678
2716
  /**
2679
- * 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.
2717
+ * Controls the filetype of the audio created by redact_pii_audio. Currently supports mp3 (default) and wav. See {@link https://www.assemblyai.com/docs/models/pii-redaction | PII redaction } for more details.
2680
2718
  * @defaultValue "mp3"
2681
2719
  */
2682
2720
  redact_pii_audio_quality?: RedactPiiAudioQuality;
2683
2721
  /**
2684
- * The list of PII Redaction policies to enable. See [PII redaction](https://www.assemblyai.com/docs/models/pii-redaction) for more details.
2722
+ * The list of PII Redaction policies to enable. See {@link https://www.assemblyai.com/docs/models/pii-redaction | PII redaction } for more details.
2685
2723
  */
2686
2724
  redact_pii_policies?: PiiPolicy[];
2687
2725
  /**
2688
- * 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.
2726
+ * The replacement logic for detected PII, can be "entity_type" or "hash". See {@link https://www.assemblyai.com/docs/models/pii-redaction | PII redaction } for more details.
2689
2727
  */
2690
2728
  redact_pii_sub?: SubstitutionPolicy | null;
2691
2729
  /**
2692
- * Enable [Sentiment Analysis](https://www.assemblyai.com/docs/models/sentiment-analysis), can be true or false
2730
+ * Enable {@link https://www.assemblyai.com/docs/models/sentiment-analysis | Sentiment Analysis }, can be true or false
2693
2731
  */
2694
2732
  sentiment_analysis?: boolean;
2695
2733
  /**
2696
- * Enable [Speaker diarization](https://www.assemblyai.com/docs/models/speaker-diarization), can be true or false
2734
+ * Enable {@link https://www.assemblyai.com/docs/models/speaker-diarization | Speaker diarization }, can be true or false
2697
2735
  */
2698
2736
  speaker_labels?: boolean;
2699
2737
  /**
2700
- * 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.
2738
+ * Tells the speaker label model how many speakers it should attempt to identify, up to 10. See {@link https://www.assemblyai.com/docs/models/speaker-diarization | Speaker diarization } for more details.
2701
2739
  * @defaultValue "null
2702
2740
  */
2703
2741
  speakers_expected?: number | null;
@@ -2714,7 +2752,7 @@ export type TranscriptOptionalParams = {
2714
2752
  */
2715
2753
  speech_threshold?: number | null;
2716
2754
  /**
2717
- * Enable [Summarization](https://www.assemblyai.com/docs/models/summarization), can be true or false
2755
+ * Enable {@link https://www.assemblyai.com/docs/models/summarization | Summarization }, can be true or false
2718
2756
  */
2719
2757
  summarization?: boolean;
2720
2758
  /**
@@ -2796,7 +2834,7 @@ export type TranscriptParagraph = {
2796
2834
  confidence: number;
2797
2835
  end: number;
2798
2836
  /**
2799
- * The speaker of the sentence if [Speaker Diarization](https://www.assemblyai.com/docs/models/speaker-diarization) is enabled, else null
2837
+ * The speaker of the sentence if {@link https://www.assemblyai.com/docs/models/speaker-diarization | Speaker Diarization } is enabled, else null
2800
2838
  */
2801
2839
  speaker?: string | null;
2802
2840
  start: number;
@@ -2806,13 +2844,61 @@ export type TranscriptParagraph = {
2806
2844
 
2807
2845
  /**
2808
2846
  * The parameters for creating a transcript
2847
+ * @example
2848
+ * ```js
2849
+ * {
2850
+ * "speech_model": null,
2851
+ * "language_code": "en_us",
2852
+ * "audio_url": "https://github.com/AssemblyAI-Examples/audio-examples/raw/main/20230607_me_canadian_wildfires.mp3",
2853
+ * "punctuate": true,
2854
+ * "format_text": true,
2855
+ * "dual_channel": true,
2856
+ * "webhook_url": "https://your-webhook-url/path",
2857
+ * "webhook_auth_header_name": "webhook-secret",
2858
+ * "webhook_auth_header_value": "webhook-secret-value",
2859
+ * "auto_highlights": true,
2860
+ * "audio_start_from": 10,
2861
+ * "audio_end_at": 280,
2862
+ * "word_boost": [
2863
+ * "aws",
2864
+ * "azure",
2865
+ * "google cloud"
2866
+ * ],
2867
+ * "boost_param": "high",
2868
+ * "filter_profanity": true,
2869
+ * "redact_pii": true,
2870
+ * "redact_pii_audio": true,
2871
+ * "redact_pii_audio_quality": "mp3",
2872
+ * "redact_pii_policies": [
2873
+ * "us_social_security_number",
2874
+ * "credit_card_number"
2875
+ * ],
2876
+ * "redact_pii_sub": "hash",
2877
+ * "speaker_labels": true,
2878
+ * "speakers_expected": 2,
2879
+ * "content_safety": true,
2880
+ * "iab_categories": true,
2881
+ * "language_detection": false,
2882
+ * "custom_spelling": [],
2883
+ * "disfluencies": false,
2884
+ * "sentiment_analysis": true,
2885
+ * "auto_chapters": true,
2886
+ * "entity_detection": true,
2887
+ * "speech_threshold": 0.5,
2888
+ * "summarization": true,
2889
+ * "summary_model": "informative",
2890
+ * "summary_type": "bullets",
2891
+ * "custom_topics": true,
2892
+ * "topics": []
2893
+ * }
2894
+ * ```
2809
2895
  */
2810
- export type TranscriptParams = TranscriptOptionalParams & {
2896
+ export type TranscriptParams = {
2811
2897
  /**
2812
2898
  * The URL of the audio or video file to transcribe.
2813
2899
  */
2814
2900
  audio_url: string;
2815
- };
2901
+ } & TranscriptOptionalParams;
2816
2902
 
2817
2903
  /**
2818
2904
  * The notification when the transcript status is completed or error.
@@ -2886,7 +2972,7 @@ export type TranscriptSentence = {
2886
2972
  confidence: number;
2887
2973
  end: number;
2888
2974
  /**
2889
- * The speaker of the sentence if [Speaker Diarization](https://www.assemblyai.com/docs/models/speaker-diarization) is enabled, else null
2975
+ * The speaker of the sentence if {@link https://www.assemblyai.com/docs/models/speaker-diarization | Speaker Diarization } is enabled, else null
2890
2976
  */
2891
2977
  speaker?: string | null;
2892
2978
  start: number;
@@ -3061,7 +3147,7 @@ export type TranscriptWord = {
3061
3147
  confidence: number;
3062
3148
  end: number;
3063
3149
  /**
3064
- * The speaker of the sentence if [Speaker Diarization](https://www.assemblyai.com/docs/models/speaker-diarization) is enabled, else null
3150
+ * The speaker of the sentence if {@link https://www.assemblyai.com/docs/models/speaker-diarization | Speaker Diarization } is enabled, else null
3065
3151
  */
3066
3152
  speaker?: string | null;
3067
3153
  start: number;