assemblyai 4.7.1 → 4.9.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "assemblyai",
3
- "version": "4.7.1",
3
+ "version": "4.9.0",
4
4
  "description": "The AssemblyAI JavaScript SDK provides an easy-to-use interface for interacting with the AssemblyAI API, which supports async and real-time transcription, as well as the latest LeMUR models.",
5
5
  "engines": {
6
6
  "node": ">=18"
@@ -99,7 +99,9 @@
99
99
  "generate:types": "tsx ./scripts/generate-types.ts && prettier 'src/types/*.generated.ts' --write",
100
100
  "generate:reference": "typedoc",
101
101
  "copybara:dry-run": "./copybara.sh dry_run --init-history",
102
- "copybara:pr": "./copybara.sh sync_out --init-history"
102
+ "copybara:pr": "./copybara.sh sync_out --init-history",
103
+ "copybara:dry-run-in": "./copybara.sh dry_run_in --init-history",
104
+ "copybara:pr-in": "./copybara.sh sync_in --init-history"
103
105
  },
104
106
  "keywords": [
105
107
  "AssemblyAI",
@@ -428,6 +428,9 @@ export type ContentSafetyLabelResult = {
428
428
  * ```
429
429
  */
430
430
  export type ContentSafetyLabelsResult = {
431
+ /**
432
+ * An array of results for the Content Moderation model
433
+ */
431
434
  results: ContentSafetyLabelResult[];
432
435
  /**
433
436
  * A summary of the Content Moderation severity results for the entire audio file
@@ -556,6 +559,7 @@ export type Error = {
556
559
  */
557
560
  error: string;
558
561
  status?: "error";
562
+ [key: string]: unknown;
559
563
  };
560
564
 
561
565
  /**
@@ -567,7 +571,7 @@ export type Error = {
567
571
  * ],
568
572
  * "context": "This is an interview about wildfires.",
569
573
  * "answer_format": "Bullet Points",
570
- * "final_model": "default",
574
+ * "final_model": "anthropic/claude-3-5-sonnet",
571
575
  * "temperature": 0,
572
576
  * "max_output_size": 3000
573
577
  * }
@@ -607,7 +611,7 @@ export type LemurActionItemsResponse = LemurStringResponse;
607
611
  * "7c3acd18-df4d-4432-88f5-1e89f8827eea"
608
612
  * ],
609
613
  * "context": "This is an interview about wildfires.",
610
- * "final_model": "default",
614
+ * "final_model": "anthropic/claude-3-5-sonnet",
611
615
  * "temperature": 0,
612
616
  * "max_output_size": 3000
613
617
  * }
@@ -638,12 +642,15 @@ export type LemurBaseParams = {
638
642
  input_text?: string;
639
643
  /**
640
644
  * Max output size in tokens, up to 4000
645
+ * @defaultValue 2000
641
646
  */
642
647
  max_output_size?: number;
643
648
  /**
644
649
  * The temperature to use for the model.
645
650
  * Higher values result in answers that are more creative, lower values are more conservative.
646
651
  * Can be any value between 0.0 and 1.0 inclusive.
652
+ *
653
+ * @defaultValue 0
647
654
  */
648
655
  temperature?: number;
649
656
  /**
@@ -688,8 +695,6 @@ export type LemurModel =
688
695
  | "anthropic/claude-2-1"
689
696
  | "anthropic/claude-2"
690
697
  | "default"
691
- | "anthropic/claude-instant-1-2"
692
- | "basic"
693
698
  | "assemblyai/mistral-7b";
694
699
 
695
700
  /**
@@ -773,7 +778,7 @@ export type LemurQuestionAnswer = {
773
778
  * ]
774
779
  * }
775
780
  * ],
776
- * "final_model": "default",
781
+ * "final_model": "anthropic/claude-3-5-sonnet",
777
782
  * "temperature": 0,
778
783
  * "max_output_size": 3000
779
784
  * }
@@ -845,7 +850,7 @@ export type LemurStringResponse = {
845
850
  * "47b95ba5-8889-44d8-bc80-5de38306e582"
846
851
  * ],
847
852
  * "context": "This is an interview about wildfires.",
848
- * "final_model": "default",
853
+ * "final_model": "anthropic/claude-3-5-sonnet",
849
854
  * "temperature": 0,
850
855
  * "max_output_size": 3000
851
856
  * }
@@ -882,7 +887,7 @@ export type LemurSummaryResponse = LemurStringResponse;
882
887
  * ],
883
888
  * "prompt": "List all the locations affected by wildfires.",
884
889
  * "context": "This is an interview about wildfires.",
885
- * "final_model": "default",
890
+ * "final_model": "anthropic/claude-3-5-sonnet",
886
891
  * "temperature": 0,
887
892
  * "max_output_size": 3000
888
893
  * }
@@ -961,6 +966,7 @@ export type ListTranscriptParams = {
961
966
  status?: TranscriptStatus;
962
967
  /**
963
968
  * Only get throttled transcripts, overrides the status filter
969
+ * @defaultValue false
964
970
  */
965
971
  throttled_only?: boolean;
966
972
  };
@@ -1079,9 +1085,21 @@ export type PageDetails = {
1079
1085
  * ```
1080
1086
  */
1081
1087
  export type ParagraphsResponse = {
1088
+ /**
1089
+ * The duration of the audio file in seconds
1090
+ */
1082
1091
  audio_duration: number;
1092
+ /**
1093
+ * The confidence score for the transcript
1094
+ */
1083
1095
  confidence: number;
1096
+ /**
1097
+ * The unique identifier of your transcript
1098
+ */
1084
1099
  id: string;
1100
+ /**
1101
+ * An array of paragraphs in the transcript
1102
+ */
1085
1103
  paragraphs: TranscriptParagraph[];
1086
1104
  };
1087
1105
 
@@ -1183,7 +1201,7 @@ export type RedactedAudioNotification = RedactedAudioResponse;
1183
1201
  * @example
1184
1202
  * ```js
1185
1203
  * {
1186
- * "redacted_audio_url": "https://s3.us-west-2.amazonaws.com/api.assembly.ai.usw2/redacted-audio/785efd9e-0e20-45e1-967b-3db17770ed9f.wav?AWSAccessKeyId=ASIAVASQFLPGLUP5JD7Y&Signature=z1r2MOA46esiiAmk%2FreBkL8rl6g%3D&x-amz-security-token=IQoJb3JpZ2luX2VjEPv%2F%2F%2F%2F%2F%2F%2F%2F%2F%2FwEaCXVzLXdlc3QtMiJHMEUCIHxKoUJdd5P%2Fdy4WlfvRNppQtauTy7OuAb5azR2OIoYSAiEA8iPx4xAx0pbZztT4e7fGnzPS4phvNCnYKflIijUoxDsq%2BwMIMxAEGgwzNDQ4MzkyNDg4NDQiDJxsCgo0cDg789FV0CrYAwPK3CHbRHoNPFiQ%2FO6EdHZ4OSFRcS%2FDvDyHQRNnYNSwG4JB2mUMWEVw808JWTya%2But4wEcmPiUCVJMTvh70cxhILAxP84CBTuWGM%2Fszbj4tn1thjVsqovf9YZmP17OCFa77Bc9%2F9RwtRaABEqJ2eb6%2Bsir7w0MMzhe1z%2F%2B1PUKxicJAZasBv3Ova%2BTY2eNkPZHQ4Njie4X5sh05b%2BrKnz58E7GTQ1sHZQDYHZecwb5fP0B3LR0vuqNtK%2BdpMAxw5H7BinQ4rdccLmsLLMQeVn8jdRDZNEvsdmoeQL0y0qD%2BUcyGMJoAjMT4FnXhBhVxc3bgkVUbHlZMn48FNCYcmzM8UB9wGmSnr6iQoqEaFElfQVbvAzsW7lnlfLROZxMvGXyliobPYPSaYZlVYgHcIxeWuOAXRtEtmL2jbaX4ghCVgJBVO3BBzTgub2jB0KPU6lYZLLM4kf%2B8hKX8iyxSRc6ZVEefTcyruoDppjB028pA9q75hLH1CZwhfLoM%2F3z5f0aFCl05zQnaa10nbcKj0hERELf4FXqS8yWbSutlRcd7Rr9o8jN31QGUscpsuIvl%2FpyJcZmItX8nO%2FF0s1QjrIi11DLYD9YoOh7eVkN8eKKn5w4cHldVI2sw4NCPqgY6pQE%2BM9va2ad1%2BNrXeQ9t8K41lojTN0BFmM8ERD5fF77xcTlW8VdV%2FiJeLLHDvnYYWVKcga9hSROlmsqvMyn3Tmhz7KQbIepSAOKhcHM%2FyUaLfErvCtjXGwo8nsKForL7SKiGkaRCBmwfQtkSVP6m4tGT50YdGxakh54f8uyC55SbkElknRbpl5haiZ%2F82UddFBkdPcM3t0s7vwbEy%2BbilYyetOr6htc%3D&Expires=1698966551",
1204
+ * "redacted_audio_url": "https://s3.us-west-2.amazonaws.com/api.assembly.ai.usw2/redacted-audio/785efd9e-0e20-45e1-967b-3db17770ed9f.wav?AWSAccessKeyId=aws-access-key0id&Signature=signature&x-amz-security-token=security-token&Expires=1698966551",
1187
1205
  * "status": "redacted_audio_ready"
1188
1206
  * }
1189
1207
  * ```
@@ -1206,7 +1224,6 @@ export type RedactedAudioStatus = "redacted_audio_ready";
1206
1224
 
1207
1225
  /**
1208
1226
  * 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.
1209
- * @defaultValue "mp3"
1210
1227
  * @example "mp3"
1211
1228
  */
1212
1229
  export type RedactPiiAudioQuality = "mp3" | "wav";
@@ -1312,9 +1329,21 @@ export type RedactPiiAudioQuality = "mp3" | "wav";
1312
1329
  * ```
1313
1330
  */
1314
1331
  export type SentencesResponse = {
1332
+ /**
1333
+ * The duration of the audio file in seconds
1334
+ */
1315
1335
  audio_duration: number;
1336
+ /**
1337
+ * The confidence score for the transcript
1338
+ */
1316
1339
  confidence: number;
1340
+ /**
1341
+ * The unique identifier for the transcript
1342
+ */
1317
1343
  id: string;
1344
+ /**
1345
+ * An array of sentences in the transcript
1346
+ */
1318
1347
  sentences: TranscriptSentence[];
1319
1348
  };
1320
1349
 
@@ -1335,6 +1364,10 @@ export type Sentiment = "POSITIVE" | "NEUTRAL" | "NEGATIVE";
1335
1364
  * ```
1336
1365
  */
1337
1366
  export type SentimentAnalysisResult = {
1367
+ /**
1368
+ * The channel of this utterance. The left and right channels are channels 1 and 2. Additional channels increment the channel number sequentially.
1369
+ */
1370
+ channel?: string | null;
1338
1371
  /**
1339
1372
  * The confidence score for the detected sentiment of the sentence, from 0 to 1
1340
1373
  */
@@ -1350,7 +1383,7 @@ export type SentimentAnalysisResult = {
1350
1383
  /**
1351
1384
  * The speaker of the sentence if {@link https://www.assemblyai.com/docs/models/speaker-diarization | Speaker Diarization } is enabled, else null
1352
1385
  */
1353
- speaker?: string | null;
1386
+ speaker: string | null;
1354
1387
  /**
1355
1388
  * The starting time, in milliseconds, of the sentence
1356
1389
  */
@@ -1394,13 +1427,11 @@ export type SubtitleFormat = "srt" | "vtt";
1394
1427
 
1395
1428
  /**
1396
1429
  * The model to summarize the transcript
1397
- * @defaultValue "informative
1398
1430
  */
1399
1431
  export type SummaryModel = "informative" | "conversational" | "catchy";
1400
1432
 
1401
1433
  /**
1402
1434
  * The type of summary
1403
- * @defaultValue bullets
1404
1435
  */
1405
1436
  export type SummaryType =
1406
1437
  | "bullets"
@@ -1414,7 +1445,7 @@ export type SummaryType =
1414
1445
  * @example
1415
1446
  * ```js
1416
1447
  * {
1417
- * "start": 3978",
1448
+ * "start": 3978,
1418
1449
  * "end": 5114
1419
1450
  * }
1420
1451
  * ```
@@ -1587,6 +1618,9 @@ export type TopicDetectionModelResult = {
1587
1618
  * ```
1588
1619
  */
1589
1620
  export type TopicDetectionResult = {
1621
+ /**
1622
+ * An array of detected topics in the text
1623
+ */
1590
1624
  labels?: {
1591
1625
  /**
1592
1626
  * The IAB taxonomical label for the label of the detected topic, where > denotes supertopic/subtopic relationship
@@ -1614,6 +1648,9 @@ export type TopicDetectionResult = {
1614
1648
  * "language_model": "assemblyai_default",
1615
1649
  * "acoustic_model": "assemblyai_default",
1616
1650
  * "language_code": "en_us",
1651
+ * "language_detection": true,
1652
+ * "language_confidence_threshold": 0.7,
1653
+ * "language_confidence": 0.9959,
1617
1654
  * "status": "completed",
1618
1655
  * "audio_url": "https://assembly.ai/wildfires.mp3",
1619
1656
  * "text": "Smoke from hundreds of wildfires in Canada is triggering air quality alerts throughout the US. Skylines from Maine to Maryland to Minnesota are gray and smoggy. And in some places, the air quality warnings include the warning to stay inside. We wanted to better understand what's happening here and why, so we called Peter de Carlo, an associate professor in the Department of Environmental Health and Engineering at Johns Hopkins University Varsity. Good morning, professor. Good morning. What is it about the conditions right now that have caused this round of wildfires to affect so many people so far away? Well, there's a couple of things. The season has been pretty dry already. And then the fact that we're getting hit in the US. Is because there's a couple of weather systems that are essentially channeling the smoke from those Canadian wildfires through Pennsylvania into the Mid Atlantic and the Northeast and kind of just dropping the smoke there. So what is it in this haze that makes it harmful? And I'm assuming it is harmful. It is. The levels outside right now in Baltimore are considered unhealthy. And most of that is due to what's called particulate matter, which are tiny particles, microscopic smaller than the width of your hair that can get into your lungs and impact your respiratory system, your cardiovascular system, and even your neurological your brain. What makes this particularly harmful? Is it the volume of particulant? Is it something in particular? What is it exactly? Can you just drill down on that a little bit more? Yeah. So the concentration of particulate matter I was looking at some of the monitors that we have was reaching levels of what are, in science, big 150 micrograms per meter cubed, which is more than ten times what the annual average should be and about four times higher than what you're supposed to have on a 24 hours average. And so the concentrations of these particles in the air are just much, much higher than we typically see. And exposure to those high levels can lead to a host of health problems. And who is most vulnerable? I noticed that in New York City, for example, they're canceling outdoor activities. And so here it is in the early days of summer, and they have to keep all the kids inside. So who tends to be vulnerable in a situation like this? It's the youngest. So children, obviously, whose bodies are still developing. The elderly, who are their bodies are more in decline and they're more susceptible to the health impacts of breathing, the poor air quality. And then people who have preexisting health conditions, people with respiratory conditions or heart conditions can be triggered by high levels of air pollution. Could this get worse? That's a good question. In some areas, it's much worse than others. And it just depends on kind of where the smoke is concentrated. I think New York has some of the higher concentrations right now, but that's going to change as that air moves away from the New York area. But over the course of the next few days, we will see different areas being hit at different times with the highest concentrations. I was going to ask you about more fires start burning. I don't expect the concentrations to go up too much higher. I was going to ask you how and you started to answer this, but how much longer could this last? Or forgive me if I'm asking you to speculate, but what do you think? Well, I think the fires are going to burn for a little bit longer, but the key for us in the US. Is the weather system changing. And so right now, it's kind of the weather systems that are pulling that air into our mid Atlantic and Northeast region. As those weather systems change and shift, we'll see that smoke going elsewhere and not impact us in this region as much. And so I think that's going to be the defining factor. And I think the next couple of days we're going to see a shift in that weather pattern and start to push the smoke away from where we are. And finally, with the impacts of climate change, we are seeing more wildfires. Will we be seeing more of these kinds of wide ranging air quality consequences or circumstances? I mean, that is one of the predictions for climate change. Looking into the future, the fire season is starting earlier and lasting longer, and we're seeing more frequent fires. So, yeah, this is probably something that we'll be seeing more frequently. This tends to be much more of an issue in the Western US. So the eastern US. Getting hit right now is a little bit new. But yeah, I think with climate change moving forward, this is something that is going to happen more frequently. That's Peter De Carlo, associate professor in the Department of Environmental Health and Engineering at Johns Hopkins University. Sergeant Carlo, thanks so much for joining us and sharing this expertise with us. Thank you for having me.",
@@ -1844,6 +1881,7 @@ export type TopicDetectionResult = {
1844
1881
  * "audio_duration": 281,
1845
1882
  * "punctuate": true,
1846
1883
  * "format_text": true,
1884
+ * "multichannel": false,
1847
1885
  * "dual_channel": false,
1848
1886
  * "webhook_url": "https://your-webhook-url.tld/path",
1849
1887
  * "webhook_status_code": 200,
@@ -2185,7 +2223,6 @@ export type TopicDetectionResult = {
2185
2223
  * "MedicalHealth>DiseasesAndConditions>Injuries>FirstAid": 0.0004885646631009877
2186
2224
  * }
2187
2225
  * },
2188
- * "language_detection": false,
2189
2226
  * "custom_spelling": null,
2190
2227
  * "throttled": null,
2191
2228
  * "auto_chapters": true,
@@ -2300,6 +2337,10 @@ export type Transcript = {
2300
2337
  * The acoustic model that was used for the transcript
2301
2338
  */
2302
2339
  acoustic_model: string;
2340
+ /**
2341
+ * The number of audio channels in the audio file. This is only present when multichannel is enabled.
2342
+ */
2343
+ audio_channels?: number;
2303
2344
  /**
2304
2345
  * The duration of this transcript object's media file, in seconds
2305
2346
  */
@@ -2363,6 +2404,7 @@ export type Transcript = {
2363
2404
  */
2364
2405
  disfluencies?: boolean | null;
2365
2406
  /**
2407
+ * @deprecated
2366
2408
  * 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
2367
2409
  */
2368
2410
  dual_channel?: boolean | null;
@@ -2412,8 +2454,7 @@ export type Transcript = {
2412
2454
  language_confidence: number | null;
2413
2455
  /**
2414
2456
  * The confidence threshold for the automatically detected language.
2415
- * An error will be returned if the langauge confidence is below this threshold.
2416
- * Defaults to 0.
2457
+ * An error will be returned if the language confidence is below this threshold.
2417
2458
  */
2418
2459
  language_confidence_threshold: number | null;
2419
2460
  /**
@@ -2425,6 +2466,10 @@ export type Transcript = {
2425
2466
  * The language model that was used for the transcript
2426
2467
  */
2427
2468
  language_model: string;
2469
+ /**
2470
+ * Whether {@link https://www.assemblyai.com/docs/models/speech-recognition#multichannel-transcription | Multichannel transcription } was enabled in the transcription request, either true or false
2471
+ */
2472
+ multichannel?: boolean | null;
2428
2473
  /**
2429
2474
  * Whether Automatic Punctuation is enabled, either true or false
2430
2475
  */
@@ -2583,7 +2628,6 @@ export type TranscriptCustomSpelling = {
2583
2628
  * The language of your audio file. Possible values are found in {@link https://www.assemblyai.com/docs/concepts/supported-languages | Supported Languages }.
2584
2629
  * The default value is 'en_us'.
2585
2630
  *
2586
- * @defaultValue "en_us
2587
2631
  */
2588
2632
  export type TranscriptLanguageCode =
2589
2633
  | "en"
@@ -2695,7 +2739,7 @@ export type TranscriptLanguageCode =
2695
2739
  * ```js
2696
2740
  * {
2697
2741
  * "page_details": {
2698
- * "limit": 3",
2742
+ * "limit": 3,
2699
2743
  * "result_count": 3,
2700
2744
  * "current_url": "https://api.assemblyai.com/v2/transcript?limit=3",
2701
2745
  * "prev_url": "https://api.assemblyai.com/v2/transcript?limit=3&before_id=28a73d01-98db-41dd-9e98-2533ba0af117",
@@ -2734,7 +2778,13 @@ export type TranscriptLanguageCode =
2734
2778
  * ```
2735
2779
  */
2736
2780
  export type TranscriptList = {
2781
+ /**
2782
+ * Details of the transcript page
2783
+ */
2737
2784
  page_details: PageDetails;
2785
+ /**
2786
+ * An array of transcripts
2787
+ */
2738
2788
  transcripts: TranscriptListItem[];
2739
2789
  };
2740
2790
 
@@ -2753,15 +2803,33 @@ export type TranscriptList = {
2753
2803
  * ```
2754
2804
  */
2755
2805
  export type TranscriptListItem = {
2806
+ /**
2807
+ * The URL to the audio file
2808
+ */
2756
2809
  audio_url: string;
2810
+ /**
2811
+ * The date and time the transcript was completed
2812
+ */
2757
2813
  completed: Date | null;
2814
+ /**
2815
+ * The date and time the transcript was created
2816
+ */
2758
2817
  created: Date;
2759
2818
  /**
2760
2819
  * Error message of why the transcript failed
2761
2820
  */
2762
2821
  error: string | null;
2822
+ /**
2823
+ * The unique identifier for the transcript
2824
+ */
2763
2825
  id: string;
2826
+ /**
2827
+ * The URL to retrieve the transcript
2828
+ */
2764
2829
  resource_url: string;
2830
+ /**
2831
+ * The status of the transcript
2832
+ */
2765
2833
  status: TranscriptStatus;
2766
2834
  };
2767
2835
 
@@ -2772,9 +2840,12 @@ export type TranscriptListItem = {
2772
2840
  * {
2773
2841
  * "speech_model": null,
2774
2842
  * "language_code": "en_us",
2843
+ * "language_detection": true,
2844
+ * "language_confidence_threshold": 0.7,
2775
2845
  * "punctuate": true,
2776
2846
  * "format_text": true,
2777
- * "dual_channel": true,
2847
+ * "multichannel": true,
2848
+ * "dual_channel": false,
2778
2849
  * "webhook_url": "https://your-webhook-url.tld/path",
2779
2850
  * "webhook_auth_header_name": "webhook-secret",
2780
2851
  * "webhook_auth_header_value": "webhook-secret-value",
@@ -2800,7 +2871,6 @@ export type TranscriptListItem = {
2800
2871
  * "speakers_expected": 2,
2801
2872
  * "content_safety": true,
2802
2873
  * "iab_categories": true,
2803
- * "language_detection": false,
2804
2874
  * "custom_spelling": [],
2805
2875
  * "disfluencies": false,
2806
2876
  * "sentiment_analysis": true,
@@ -2826,22 +2896,27 @@ export type TranscriptOptionalParams = {
2826
2896
  audio_start_from?: number;
2827
2897
  /**
2828
2898
  * Enable {@link https://www.assemblyai.com/docs/models/auto-chapters | Auto Chapters }, can be true or false
2899
+ * @defaultValue false
2829
2900
  */
2830
2901
  auto_chapters?: boolean;
2831
2902
  /**
2832
2903
  * Enable Key Phrases, either true or false
2904
+ * @defaultValue false
2833
2905
  */
2834
2906
  auto_highlights?: boolean;
2835
2907
  /**
2836
2908
  * How much to boost specified words
2909
+ * @defaultValue default
2837
2910
  */
2838
2911
  boost_param?: TranscriptBoostParam;
2839
2912
  /**
2840
2913
  * Enable {@link https://www.assemblyai.com/docs/models/content-moderation | Content Moderation }, can be true or false
2914
+ * @defaultValue false
2841
2915
  */
2842
2916
  content_safety?: boolean;
2843
2917
  /**
2844
2918
  * The confidence threshold for the Content Moderation model. Values must be between 25 and 100.
2919
+ * @defaultValue 50
2845
2920
  */
2846
2921
  content_safety_confidence?: number;
2847
2922
  /**
@@ -2850,57 +2925,78 @@ export type TranscriptOptionalParams = {
2850
2925
  custom_spelling?: TranscriptCustomSpelling[];
2851
2926
  /**
2852
2927
  * Enable custom topics, either true or false
2928
+ * @defaultValue false
2853
2929
  */
2854
2930
  custom_topics?: boolean;
2855
2931
  /**
2856
2932
  * Transcribe Filler Words, like "umm", in your media file; can be true or false
2933
+ * @defaultValue false
2857
2934
  */
2858
2935
  disfluencies?: boolean;
2859
2936
  /**
2937
+ * @deprecated
2860
2938
  * Enable {@link https://www.assemblyai.com/docs/models/speech-recognition#dual-channel-transcription | Dual Channel } transcription, can be true or false.
2939
+ * @defaultValue false
2861
2940
  */
2862
2941
  dual_channel?: boolean;
2863
2942
  /**
2864
2943
  * Enable {@link https://www.assemblyai.com/docs/models/entity-detection | Entity Detection }, can be true or false
2944
+ * @defaultValue false
2865
2945
  */
2866
2946
  entity_detection?: boolean;
2867
2947
  /**
2868
2948
  * Filter profanity from the transcribed text, can be true or false
2949
+ * @defaultValue false
2869
2950
  */
2870
2951
  filter_profanity?: boolean;
2871
2952
  /**
2872
2953
  * Enable Text Formatting, can be true or false
2954
+ * @defaultValue true
2873
2955
  */
2874
2956
  format_text?: boolean;
2875
2957
  /**
2876
2958
  * Enable {@link https://www.assemblyai.com/docs/models/topic-detection | Topic Detection }, can be true or false
2959
+ * @defaultValue false
2877
2960
  */
2878
2961
  iab_categories?: boolean;
2879
2962
  /**
2880
2963
  * The language of your audio file. Possible values are found in {@link https://www.assemblyai.com/docs/concepts/supported-languages | Supported Languages }.
2881
2964
  * The default value is 'en_us'.
2965
+ *
2966
+ * @defaultValue en_us
2882
2967
  */
2883
2968
  language_code?: LiteralUnion<TranscriptLanguageCode, string> | null;
2884
2969
  /**
2885
2970
  * The confidence threshold for the automatically detected language.
2886
- * An error will be returned if the langauge confidence is below this threshold.
2971
+ * An error will be returned if the language confidence is below this threshold.
2887
2972
  * Defaults to 0.
2973
+ *
2974
+ * @defaultValue 0
2888
2975
  */
2889
2976
  language_confidence_threshold?: number;
2890
2977
  /**
2891
2978
  * Enable {@link https://www.assemblyai.com/docs/models/speech-recognition#automatic-language-detection | Automatic language detection }, either true or false.
2979
+ * @defaultValue false
2892
2980
  */
2893
2981
  language_detection?: boolean;
2982
+ /**
2983
+ * Enable {@link https://www.assemblyai.com/docs/models/speech-recognition#multichannel-transcription | Multichannel } transcription, can be true or false.
2984
+ * @defaultValue false
2985
+ */
2986
+ multichannel?: boolean;
2894
2987
  /**
2895
2988
  * Enable Automatic Punctuation, can be true or false
2989
+ * @defaultValue true
2896
2990
  */
2897
2991
  punctuate?: boolean;
2898
2992
  /**
2899
2993
  * Redact PII from the transcribed text using the Redact PII model, can be true or false
2994
+ * @defaultValue false
2900
2995
  */
2901
2996
  redact_pii?: boolean;
2902
2997
  /**
2903
2998
  * 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.
2999
+ * @defaultValue false
2904
3000
  */
2905
3001
  redact_pii_audio?: boolean;
2906
3002
  /**
@@ -2914,35 +3010,39 @@ export type TranscriptOptionalParams = {
2914
3010
  redact_pii_policies?: PiiPolicy[];
2915
3011
  /**
2916
3012
  * 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.
3013
+ * @defaultValue "hash"
2917
3014
  */
2918
3015
  redact_pii_sub?: SubstitutionPolicy | null;
2919
3016
  /**
2920
3017
  * Enable {@link https://www.assemblyai.com/docs/models/sentiment-analysis | Sentiment Analysis }, can be true or false
3018
+ * @defaultValue false
2921
3019
  */
2922
3020
  sentiment_analysis?: boolean;
2923
3021
  /**
2924
3022
  * Enable {@link https://www.assemblyai.com/docs/models/speaker-diarization | Speaker diarization }, can be true or false
3023
+ * @defaultValue false
2925
3024
  */
2926
3025
  speaker_labels?: boolean;
2927
3026
  /**
2928
- * 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.
3027
+ * 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.
2929
3028
  * @defaultValue "null
2930
3029
  */
2931
3030
  speakers_expected?: number | null;
2932
3031
  /**
2933
3032
  * The speech model to use for the transcription. When `null`, the "best" model is used.
2934
- * @defaultValue null
3033
+ * @defaultValue best
2935
3034
  */
2936
3035
  speech_model?: SpeechModel | null;
2937
3036
  /**
2938
3037
  * Reject audio files that contain less than this fraction of speech.
2939
3038
  * Valid values are in the range [0", 1] inclusive.
2940
3039
  *
2941
- * @defaultValue "null
3040
+ * @defaultValue 0
2942
3041
  */
2943
3042
  speech_threshold?: number | null;
2944
3043
  /**
2945
3044
  * Enable {@link https://www.assemblyai.com/docs/models/summarization | Summarization }, can be true or false
3045
+ * @defaultValue false
2946
3046
  */
2947
3047
  summarization?: boolean;
2948
3048
  /**
@@ -2970,7 +3070,9 @@ export type TranscriptOptionalParams = {
2970
3070
  */
2971
3071
  webhook_auth_header_value?: string | null;
2972
3072
  /**
2973
- * The URL to which we send webhook requests. We sends two different types of webhook requests. One request when a transcript is completed or failed, and one request when the redacted audio is ready if redact_pii_audio is enabled.
3073
+ * The URL to which we send webhook requests.
3074
+ * We sends two different types of webhook requests.
3075
+ * One request when a transcript is completed or failed, and one request when the redacted audio is ready if redact_pii_audio is enabled.
2974
3076
  */
2975
3077
  webhook_url?: string;
2976
3078
  /**
@@ -3021,14 +3123,25 @@ export type TranscriptOptionalParams = {
3021
3123
  * ```
3022
3124
  */
3023
3125
  export type TranscriptParagraph = {
3126
+ /**
3127
+ * The confidence score for the transcript of this paragraph
3128
+ */
3024
3129
  confidence: number;
3130
+ /**
3131
+ * The ending time, in milliseconds, of the paragraph
3132
+ */
3025
3133
  end: number;
3026
3134
  /**
3027
- * The speaker of the sentence if {@link https://www.assemblyai.com/docs/models/speaker-diarization | Speaker Diarization } is enabled, else null
3135
+ * The starting time, in milliseconds, of the paragraph
3028
3136
  */
3029
- speaker?: string | null;
3030
3137
  start: number;
3138
+ /**
3139
+ * The transcript of the paragraph
3140
+ */
3031
3141
  text: string;
3142
+ /**
3143
+ * An array of words in the paragraph
3144
+ */
3032
3145
  words: TranscriptWord[];
3033
3146
  };
3034
3147
 
@@ -3039,10 +3152,13 @@ export type TranscriptParagraph = {
3039
3152
  * {
3040
3153
  * "speech_model": null,
3041
3154
  * "language_code": "en_us",
3155
+ * "language_detection": true,
3156
+ * "language_confidence_threshold": 0.7,
3042
3157
  * "audio_url": "https://assembly.ai/wildfires.mp3",
3043
3158
  * "punctuate": true,
3044
3159
  * "format_text": true,
3045
- * "dual_channel": true,
3160
+ * "multichannel": true,
3161
+ * "dual_channel": false,
3046
3162
  * "webhook_url": "https://your-webhook-url/path",
3047
3163
  * "webhook_auth_header_name": "webhook-secret",
3048
3164
  * "webhook_auth_header_value": "webhook-secret-value",
@@ -3068,7 +3184,6 @@ export type TranscriptParagraph = {
3068
3184
  * "speakers_expected": 2,
3069
3185
  * "content_safety": true,
3070
3186
  * "iab_categories": true,
3071
- * "language_detection": false,
3072
3187
  * "custom_spelling": [],
3073
3188
  * "disfluencies": false,
3074
3189
  * "sentiment_analysis": true,
@@ -3159,14 +3274,33 @@ export type TranscriptReadyStatus = "completed" | "error";
3159
3274
  * ```
3160
3275
  */
3161
3276
  export type TranscriptSentence = {
3277
+ /**
3278
+ * The channel of the sentence. The left and right channels are channels 1 and 2. Additional channels increment the channel number sequentially.
3279
+ */
3280
+ channel?: string | null;
3281
+ /**
3282
+ * The confidence score for the transcript of this sentence
3283
+ */
3162
3284
  confidence: number;
3285
+ /**
3286
+ * The ending time, in milliseconds, for the sentence
3287
+ */
3163
3288
  end: number;
3164
3289
  /**
3165
3290
  * The speaker of the sentence if {@link https://www.assemblyai.com/docs/models/speaker-diarization | Speaker Diarization } is enabled, else null
3166
3291
  */
3167
- speaker?: string | null;
3292
+ speaker: string | null;
3293
+ /**
3294
+ * The starting time, in milliseconds, for the sentence
3295
+ */
3168
3296
  start: number;
3297
+ /**
3298
+ * The transcript of the sentence
3299
+ */
3169
3300
  text: string;
3301
+ /**
3302
+ * An array of words in the sentence
3303
+ */
3170
3304
  words: TranscriptWord[];
3171
3305
  };
3172
3306
 
@@ -3295,6 +3429,10 @@ export type TranscriptStatus = "queued" | "processing" | "completed" | "error";
3295
3429
  * ```
3296
3430
  */
3297
3431
  export type TranscriptUtterance = {
3432
+ /**
3433
+ * The channel of this utterance. The left and right channels are channels 1 and 2. Additional channels increment the channel number sequentially.
3434
+ */
3435
+ channel?: string | null;
3298
3436
  /**
3299
3437
  * The confidence score for the transcript of this utterance
3300
3438
  */
@@ -3336,18 +3474,35 @@ export type TranscriptWebhookNotification =
3336
3474
  * "start": 250,
3337
3475
  * "end": 650,
3338
3476
  * "confidence": 0.97465,
3477
+ * "channel": null,
3339
3478
  * "speaker": null
3340
3479
  * }
3341
3480
  * ```
3342
3481
  */
3343
3482
  export type TranscriptWord = {
3483
+ /**
3484
+ * The channel of the word. The left and right channels are channels 1 and 2. Additional channels increment the channel number sequentially.
3485
+ */
3486
+ channel?: string | null;
3487
+ /**
3488
+ * The confidence score for the transcript of this word
3489
+ */
3344
3490
  confidence: number;
3491
+ /**
3492
+ * The ending time, in milliseconds, for the word
3493
+ */
3345
3494
  end: number;
3346
3495
  /**
3347
- * The speaker of the sentence if {@link https://www.assemblyai.com/docs/models/speaker-diarization | Speaker Diarization } is enabled, else null
3496
+ * The speaker of the word if {@link https://www.assemblyai.com/docs/models/speaker-diarization | Speaker Diarization } is enabled, else null
3497
+ */
3498
+ speaker: string | null;
3499
+ /**
3500
+ * The starting time, in milliseconds, for the word
3348
3501
  */
3349
- speaker?: string | null;
3350
3502
  start: number;
3503
+ /**
3504
+ * The text of the word
3505
+ */
3351
3506
  text: string;
3352
3507
  };
3353
3508