voice-router-dev 0.8.3 → 0.8.5

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.
@@ -1396,23 +1396,173 @@ import { z as zod3 } from "zod";
1396
1396
  var uploadFileResponse = zod3.object({
1397
1397
  upload_url: zod3.string().describe("A URL that points to your audio file, accessible only by AssemblyAI's servers\n")
1398
1398
  });
1399
- var createTranscriptBodyLanguageCodeDefault = "en_us";
1400
- var createTranscriptBodyLanguageConfidenceThresholdMin = 0;
1401
- var createTranscriptBodyLanguageConfidenceThresholdMax = 1;
1402
- var createTranscriptBodySpeechModelDefault = "best";
1403
- var createTranscriptBodyPunctuateDefault = true;
1404
- var createTranscriptBodyFormatTextDefault = true;
1405
- var createTranscriptBodyRedactPiiSubDefault = "hash";
1406
1399
  var createTranscriptBodyContentSafetyConfidenceDefault = 50;
1407
- var createTranscriptBodyContentSafetyConfidenceMin = 25;
1408
- var createTranscriptBodyContentSafetyConfidenceMax = 100;
1409
- var createTranscriptBodySpeechThresholdMin = 0;
1410
- var createTranscriptBodySpeechThresholdMax = 1;
1400
+ var createTranscriptBodyFormatTextDefault = true;
1401
+ var createTranscriptBodyLanguageDetectionOptionsFallbackLanguageDefault = "auto";
1402
+ var createTranscriptBodyLanguageDetectionOptionsCodeSwitchingConfidenceThresholdDefault = 0.3;
1403
+ var createTranscriptBodyPunctuateDefault = true;
1404
+ var createTranscriptBodySpeakerOptionsMinSpeakersExpectedDefault = 1;
1405
+ var createTranscriptBodySpeechUnderstandingRequestTranslationFormalDefault = true;
1411
1406
  var createTranscriptBody = zod3.object({
1412
- audio_url: zod3.string().describe("The URL of the audio or video file to transcribe.")
1413
- }).and(
1414
- zod3.object({
1415
- language_code: zod3.enum([
1407
+ audio_end_at: zod3.number().optional().describe(
1408
+ "The point in time, in milliseconds, to stop transcribing in your media file. See [Set the start and end of the transcript](https://www.assemblyai.com/docs/pre-recorded-audio/set-the-start-and-end-of-the-transcript) for more details."
1409
+ ),
1410
+ audio_start_from: zod3.number().optional().describe(
1411
+ "The point in time, in milliseconds, to begin transcribing in your media file. See [Set the start and end of the transcript](https://www.assemblyai.com/docs/pre-recorded-audio/set-the-start-and-end-of-the-transcript) for more details."
1412
+ ),
1413
+ auto_chapters: zod3.boolean().optional().describe(
1414
+ "Enable [Auto Chapters](https://www.assemblyai.com/docs/speech-understanding/auto-chapters), can be true or false. Deprecated - use [LLM Gateway](https://www.assemblyai.com/docs/llm-gateway/overview) instead for more flexible chapter summaries. See the [updated Auto Chapters page](https://www.assemblyai.com/docs/speech-understanding/auto-chapters) for details.\n\nNote: This parameter is only supported for the Universal-2 model.\n"
1415
+ ),
1416
+ auto_highlights: zod3.boolean().optional().describe(
1417
+ "Enable [Key Phrases](https://www.assemblyai.com/docs/speech-understanding/key-phrases), either true or false"
1418
+ ),
1419
+ content_safety: zod3.boolean().optional().describe(
1420
+ "Enable [Content Moderation](https://www.assemblyai.com/docs/content-moderation), can be true or false"
1421
+ ),
1422
+ content_safety_confidence: zod3.number().default(createTranscriptBodyContentSafetyConfidenceDefault).describe(
1423
+ "The confidence threshold for the [Content Moderation](https://www.assemblyai.com/docs/content-moderation) model. Values must be between 25 and 100."
1424
+ ),
1425
+ custom_spelling: zod3.array(
1426
+ zod3.object({
1427
+ from: zod3.array(zod3.string()).describe("Words or phrases to replace"),
1428
+ to: zod3.string().describe("Word to replace with")
1429
+ }).describe(
1430
+ "Object containing words or phrases to replace, and the word or phrase to replace with"
1431
+ )
1432
+ ).optional().describe(
1433
+ "Customize how words are spelled and formatted using to and from values. See [Custom Spelling](https://www.assemblyai.com/docs/pre-recorded-audio/custom-spelling) for more details."
1434
+ ),
1435
+ disfluencies: zod3.boolean().optional().describe(
1436
+ 'Transcribe [Filler Words](https://www.assemblyai.com/docs/pre-recorded-audio/filler-words), like "umm", in your media file; can be true or false'
1437
+ ),
1438
+ domain: zod3.string().nullish().describe(
1439
+ 'Enable domain-specific transcription models to improve accuracy for specialized terminology. Set to `"medical-v1"` to enable [Medical Mode](https://www.assemblyai.com/docs/pre-recorded-audio/medical-mode) for improved accuracy of medical terms such as medications, procedures, conditions, and dosages.\n\nSupported languages: English (`en`), Spanish (`es`), German (`de`), French (`fr`). If used with an unsupported language, the parameter is ignored and a warning is returned.\n'
1440
+ ),
1441
+ entity_detection: zod3.boolean().optional().describe(
1442
+ "Enable [Entity Detection](https://www.assemblyai.com/docs/speech-understanding/entity-detection), can be true or false"
1443
+ ),
1444
+ filter_profanity: zod3.boolean().optional().describe(
1445
+ "Filter profanity from the transcribed text, can be true or false. See [Profanity Filtering](https://www.assemblyai.com/docs/profanity-filtering) for more details."
1446
+ ),
1447
+ format_text: zod3.boolean().default(createTranscriptBodyFormatTextDefault).describe(
1448
+ "Enable [Text Formatting](https://www.assemblyai.com/docs/pre-recorded-audio), can be true or false"
1449
+ ),
1450
+ iab_categories: zod3.boolean().optional().describe(
1451
+ "Enable [Topic Detection](https://www.assemblyai.com/docs/speech-understanding/topic-detection), can be true or false"
1452
+ ),
1453
+ keyterms_prompt: zod3.array(zod3.string()).optional().describe(
1454
+ "Improve accuracy with up to 200 (for Universal-2) or 1000 (for Universal-3 Pro) domain-specific words or phrases (maximum 6 words per phrase). See [Keyterms Prompting](https://www.assemblyai.com/docs/pre-recorded-audio/keyterms-prompting) for more details.\n"
1455
+ ),
1456
+ language_code: zod3.enum([
1457
+ "en",
1458
+ "en_au",
1459
+ "en_uk",
1460
+ "en_us",
1461
+ "es",
1462
+ "fr",
1463
+ "de",
1464
+ "it",
1465
+ "pt",
1466
+ "nl",
1467
+ "af",
1468
+ "sq",
1469
+ "am",
1470
+ "ar",
1471
+ "hy",
1472
+ "as",
1473
+ "az",
1474
+ "ba",
1475
+ "eu",
1476
+ "be",
1477
+ "bn",
1478
+ "bs",
1479
+ "br",
1480
+ "bg",
1481
+ "my",
1482
+ "ca",
1483
+ "zh",
1484
+ "hr",
1485
+ "cs",
1486
+ "da",
1487
+ "et",
1488
+ "fo",
1489
+ "fi",
1490
+ "gl",
1491
+ "ka",
1492
+ "el",
1493
+ "gu",
1494
+ "ht",
1495
+ "ha",
1496
+ "haw",
1497
+ "he",
1498
+ "hi",
1499
+ "hu",
1500
+ "is",
1501
+ "id",
1502
+ "ja",
1503
+ "jw",
1504
+ "kn",
1505
+ "kk",
1506
+ "km",
1507
+ "ko",
1508
+ "lo",
1509
+ "la",
1510
+ "lv",
1511
+ "ln",
1512
+ "lt",
1513
+ "lb",
1514
+ "mk",
1515
+ "mg",
1516
+ "ms",
1517
+ "ml",
1518
+ "mt",
1519
+ "mi",
1520
+ "mr",
1521
+ "mn",
1522
+ "ne",
1523
+ "no",
1524
+ "nn",
1525
+ "oc",
1526
+ "pa",
1527
+ "ps",
1528
+ "fa",
1529
+ "pl",
1530
+ "ro",
1531
+ "ru",
1532
+ "sa",
1533
+ "sr",
1534
+ "sn",
1535
+ "sd",
1536
+ "si",
1537
+ "sk",
1538
+ "sl",
1539
+ "so",
1540
+ "su",
1541
+ "sw",
1542
+ "sv",
1543
+ "tl",
1544
+ "tg",
1545
+ "ta",
1546
+ "tt",
1547
+ "te",
1548
+ "th",
1549
+ "bo",
1550
+ "tr",
1551
+ "tk",
1552
+ "uk",
1553
+ "ur",
1554
+ "uz",
1555
+ "vi",
1556
+ "cy",
1557
+ "yi",
1558
+ "yo"
1559
+ ]).describe(
1560
+ "The language of your audio file. Possible values are found in [Supported Languages](https://www.assemblyai.com/docs/pre-recorded-audio/supported-languages).\nThe default value is 'en_us'.\n"
1561
+ ).or(zod3.null()).optional().describe(
1562
+ "The language of your audio file. Possible values are found in [Supported Languages](https://www.assemblyai.com/docs/pre-recorded-audio/supported-languages).\nThe default value is 'en_us'.\n"
1563
+ ),
1564
+ language_codes: zod3.array(
1565
+ zod3.enum([
1416
1566
  "en",
1417
1567
  "en_au",
1418
1568
  "en_uk",
@@ -1516,429 +1666,62 @@ var createTranscriptBody = zod3.object({
1516
1666
  "yi",
1517
1667
  "yo"
1518
1668
  ]).describe(
1519
- "The language of your audio file. Possible values are found in [Supported Languages](https://www.assemblyai.com/docs/concepts/supported-languages).\nThe default value is 'en_us'.\n"
1520
- ).or(zod3.string()).or(zod3.null()).default(createTranscriptBodyLanguageCodeDefault).describe(
1521
- "The language of your audio file. Possible values are found in [Supported Languages](https://www.assemblyai.com/docs/concepts/supported-languages).\nThe default value is 'en_us'.\n"
1522
- ),
1523
- language_detection: zod3.boolean().optional().describe(
1524
- "Enable [Automatic language detection](https://www.assemblyai.com/docs/models/speech-recognition#automatic-language-detection), either true or false."
1525
- ),
1526
- language_confidence_threshold: zod3.number().min(createTranscriptBodyLanguageConfidenceThresholdMin).max(createTranscriptBodyLanguageConfidenceThresholdMax).optional().describe(
1527
- "The confidence threshold for the automatically detected language.\nAn error will be returned if the language confidence is below this threshold.\nDefaults to 0.\n"
1528
- ),
1529
- speech_model: zod3.enum(["best", "slam-1", "universal"]).describe("The speech model to use for the transcription.").or(zod3.null()).default(createTranscriptBodySpeechModelDefault).describe(
1530
- 'The speech model to use for the transcription. When `null`, the "best" model is used.'
1531
- ),
1532
- punctuate: zod3.boolean().default(createTranscriptBodyPunctuateDefault).describe("Enable Automatic Punctuation, can be true or false"),
1533
- format_text: zod3.boolean().default(createTranscriptBodyFormatTextDefault).describe("Enable Text Formatting, can be true or false"),
1534
- disfluencies: zod3.boolean().optional().describe(
1535
- 'Transcribe Filler Words, like "umm", in your media file; can be true or false'
1536
- ),
1537
- multichannel: zod3.boolean().optional().describe(
1538
- "Enable [Multichannel](https://www.assemblyai.com/docs/models/speech-recognition#multichannel-transcription) transcription, can be true or false."
1539
- ),
1540
- webhook_url: zod3.string().optional().describe(
1541
- "The URL to which we send webhook requests.\nWe sends two different types of webhook requests.\nOne request when a transcript is completed or failed, and one request when the redacted audio is ready if redact_pii_audio is enabled.\n"
1542
- ),
1543
- webhook_auth_header_name: zod3.string().nullish().describe(
1544
- "The header name to be sent with the transcript completed or failed webhook requests"
1545
- ),
1546
- webhook_auth_header_value: zod3.string().nullish().describe(
1547
- "The header value to send back with the transcript completed or failed webhook requests for added security"
1548
- ),
1549
- auto_highlights: zod3.boolean().optional().describe("Enable Key Phrases, either true or false"),
1550
- audio_start_from: zod3.number().optional().describe("The point in time, in milliseconds, to begin transcribing in your media file"),
1551
- audio_end_at: zod3.number().optional().describe("The point in time, in milliseconds, to stop transcribing in your media file"),
1552
- word_boost: zod3.array(zod3.string()).optional().describe("The list of custom vocabulary to boost transcription probability for"),
1553
- boost_param: zod3.enum(["low", "default", "high"]).optional().describe("How much to boost specified words"),
1554
- filter_profanity: zod3.boolean().optional().describe("Filter profanity from the transcribed text, can be true or false"),
1555
- redact_pii: zod3.boolean().optional().describe(
1556
- "Redact PII from the transcribed text using the Redact PII model, can be true or false"
1557
- ),
1558
- redact_pii_audio: zod3.boolean().optional().describe(
1559
- '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.'
1560
- ),
1561
- redact_pii_audio_quality: zod3.enum(["mp3", "wav"]).optional().describe(
1562
- "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."
1563
- ),
1564
- redact_pii_policies: zod3.array(
1565
- zod3.enum([
1566
- "account_number",
1567
- "banking_information",
1568
- "blood_type",
1569
- "credit_card_cvv",
1570
- "credit_card_expiration",
1571
- "credit_card_number",
1572
- "date",
1573
- "date_interval",
1574
- "date_of_birth",
1575
- "drivers_license",
1576
- "drug",
1577
- "duration",
1578
- "email_address",
1579
- "event",
1580
- "filename",
1581
- "gender_sexuality",
1582
- "healthcare_number",
1583
- "injury",
1584
- "ip_address",
1585
- "language",
1586
- "location",
1587
- "marital_status",
1588
- "medical_condition",
1589
- "medical_process",
1590
- "money_amount",
1591
- "nationality",
1592
- "number_sequence",
1593
- "occupation",
1594
- "organization",
1595
- "passport_number",
1596
- "password",
1597
- "person_age",
1598
- "person_name",
1599
- "phone_number",
1600
- "physical_attribute",
1601
- "political_affiliation",
1602
- "religion",
1603
- "statistics",
1604
- "time",
1605
- "url",
1606
- "us_social_security_number",
1607
- "username",
1608
- "vehicle_id",
1609
- "zodiac_sign"
1610
- ]).describe("The type of PII to redact")
1611
- ).optional().describe(
1612
- "The list of PII Redaction policies to enable. See [PII redaction](https://www.assemblyai.com/docs/models/pii-redaction) for more details."
1613
- ),
1614
- redact_pii_sub: zod3.enum(["entity_name", "hash"]).describe(
1615
- 'The replacement logic for detected PII, can be "entity_name" or "hash". See [PII redaction](https://www.assemblyai.com/docs/models/pii-redaction) for more details.'
1616
- ).or(zod3.null()).default(createTranscriptBodyRedactPiiSubDefault).describe(
1617
- '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.'
1618
- ),
1619
- speaker_labels: zod3.boolean().optional().describe(
1620
- "Enable [Speaker diarization](https://www.assemblyai.com/docs/models/speaker-diarization), can be true or false"
1621
- ),
1622
- speakers_expected: zod3.number().nullish().describe(
1623
- "Tells the speaker label model how many speakers it should attempt to identify. See [Speaker diarization](https://www.assemblyai.com/docs/models/speaker-diarization) for more details."
1624
- ),
1625
- content_safety: zod3.boolean().optional().describe(
1626
- "Enable [Content Moderation](https://www.assemblyai.com/docs/models/content-moderation), can be true or false"
1627
- ),
1628
- content_safety_confidence: zod3.number().min(createTranscriptBodyContentSafetyConfidenceMin).max(createTranscriptBodyContentSafetyConfidenceMax).default(createTranscriptBodyContentSafetyConfidenceDefault).describe(
1629
- "The confidence threshold for the Content Moderation model. Values must be between 25 and 100."
1630
- ),
1631
- iab_categories: zod3.boolean().optional().describe(
1632
- "Enable [Topic Detection](https://www.assemblyai.com/docs/models/topic-detection), can be true or false"
1633
- ),
1634
- custom_spelling: zod3.array(
1635
- zod3.object({
1636
- from: zod3.array(zod3.string().describe("Word or phrase to replace")).describe("Words or phrases to replace"),
1637
- to: zod3.string().describe("Word to replace with")
1638
- }).describe(
1639
- "Object containing words or phrases to replace, and the word or phrase to replace with"
1640
- )
1641
- ).optional().describe("Customize how words are spelled and formatted using to and from values"),
1642
- keyterms_prompt: zod3.array(zod3.string()).optional().describe(
1643
- "<Warning>`keyterms_prompt` is only supported when the `speech_model` is specified as `slam-1`</Warning>\nImprove accuracy with up to 1000 domain-specific words or phrases (maximum 6 words per phrase).\n"
1644
- ),
1645
- prompt: zod3.string().optional().describe("This parameter does not currently have any functionality attached to it."),
1646
- sentiment_analysis: zod3.boolean().optional().describe(
1647
- "Enable [Sentiment Analysis](https://www.assemblyai.com/docs/models/sentiment-analysis), can be true or false"
1648
- ),
1649
- auto_chapters: zod3.boolean().optional().describe(
1650
- "Enable [Auto Chapters](https://www.assemblyai.com/docs/models/auto-chapters), can be true or false"
1669
+ "The language of your audio file. Possible values are found in [Supported Languages](https://www.assemblyai.com/docs/pre-recorded-audio/supported-languages).\nThe default value is 'en_us'.\n"
1670
+ )
1671
+ ).nullish().describe(
1672
+ "The language codes of your audio file. Used for [Code switching](/docs/speech-to-text/pre-recorded-audio/code-switching)\nOne of the values specified must be `en`.\n"
1673
+ ),
1674
+ language_confidence_threshold: zod3.number().optional().describe(
1675
+ "The confidence threshold for the automatically detected language.\nAn error will be returned if the language confidence is below this threshold.\nDefaults to 0. See [Automatic Language Detection](https://www.assemblyai.com/docs/pre-recorded-audio/language-detection) for more details.\n"
1676
+ ),
1677
+ language_detection: zod3.boolean().optional().describe(
1678
+ "Enable [Automatic language detection](https://www.assemblyai.com/docs/pre-recorded-audio/language-detection), either true or false."
1679
+ ),
1680
+ language_detection_options: zod3.object({
1681
+ expected_languages: zod3.array(zod3.string()).optional().describe(
1682
+ 'List of languages expected in the audio file. Defaults to `["all"]` when unspecified. See [Automatic Language Detection](https://www.assemblyai.com/docs/pre-recorded-audio/language-detection) for more details.'
1651
1683
  ),
1652
- entity_detection: zod3.boolean().optional().describe(
1653
- "Enable [Entity Detection](https://www.assemblyai.com/docs/models/entity-detection), can be true or false"
1684
+ fallback_language: zod3.string().default(createTranscriptBodyLanguageDetectionOptionsFallbackLanguageDefault).describe(
1685
+ 'If the detected language of the audio file is not in the list of expected languages, the `fallback_language` is used. Specify `["auto"]` to let our model choose the fallback language from `expected_languages` with the highest confidence score. See [Automatic Language Detection](https://www.assemblyai.com/docs/pre-recorded-audio/language-detection) for more details.\n'
1654
1686
  ),
1655
- speech_threshold: zod3.number().min(createTranscriptBodySpeechThresholdMin).max(createTranscriptBodySpeechThresholdMax).nullish().describe(
1656
- "Reject audio files that contain less than this fraction of speech.\nValid values are in the range [0, 1] inclusive.\n"
1687
+ code_switching: zod3.boolean().optional().describe(
1688
+ "Whether [code switching](/docs/speech-to-text/pre-recorded-audio/code-switching) should be detected.\n"
1657
1689
  ),
1658
- summarization: zod3.boolean().optional().describe(
1659
- "Enable [Summarization](https://www.assemblyai.com/docs/models/summarization), can be true or false"
1690
+ code_switching_confidence_threshold: zod3.number().default(
1691
+ createTranscriptBodyLanguageDetectionOptionsCodeSwitchingConfidenceThresholdDefault
1692
+ ).describe(
1693
+ "The confidence threshold for [code switching](/docs/speech-to-text/pre-recorded-audio/code-switching) detection. If the code switching confidence is below this threshold, the transcript will be processed in the language with the highest `language_detection_confidence` score.\n"
1694
+ )
1695
+ }).optional().describe(
1696
+ "Specify options for [Automatic Language Detection](https://www.assemblyai.com/docs/pre-recorded-audio/language-detection)."
1697
+ ),
1698
+ multichannel: zod3.boolean().optional().describe(
1699
+ "Enable [Multichannel](https://www.assemblyai.com/docs/pre-recorded-audio/multichannel) transcription, can be true or false."
1700
+ ),
1701
+ prompt: zod3.string().optional().describe(
1702
+ "Provide natural language prompting of up to 1,500 words of contextual information to the model. See the [Prompting Guide](https://www.assemblyai.com/docs/pre-recorded-audio/prompting) for best practices.\n\nNote: This parameter is only supported for the Universal-3 Pro model.\n"
1703
+ ),
1704
+ punctuate: zod3.boolean().default(createTranscriptBodyPunctuateDefault).describe(
1705
+ "Enable [Automatic Punctuation](https://www.assemblyai.com/docs/pre-recorded-audio), can be true or false"
1706
+ ),
1707
+ redact_pii: zod3.boolean().optional().describe(
1708
+ "Redact PII from the transcribed text using the Redact PII model, can be true or false. See [PII Redaction](https://www.assemblyai.com/docs/pii-redaction) for more details."
1709
+ ),
1710
+ redact_pii_audio: zod3.boolean().optional().describe(
1711
+ '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/pii-redaction#request-for-redacted-audio) for more details.'
1712
+ ),
1713
+ redact_pii_audio_options: zod3.object({
1714
+ return_redacted_no_speech_audio: zod3.boolean().optional().describe(
1715
+ "By default, audio redaction provides redacted audio URLs only when speech is detected. However, if your use-case specifically requires redacted audio files even for silent audio files without any dialogue, you can opt to receive these URLs by setting this parameter to `true`."
1660
1716
  ),
1661
- summary_model: zod3.enum(["informative", "conversational", "catchy"]).optional().describe("The model to summarize the transcript"),
1662
- summary_type: zod3.enum(["bullets", "bullets_verbose", "gist", "headline", "paragraph"]).optional().describe("The type of summary"),
1663
- custom_topics: zod3.boolean().optional().describe("Enable custom topics, either true or false"),
1664
- topics: zod3.array(zod3.string()).optional().describe("The list of custom topics")
1665
- }).describe("The parameters for creating a transcript")
1666
- ).describe("The parameters for creating a transcript");
1667
- var createTranscriptResponseLanguageConfidenceThresholdMin = 0;
1668
- var createTranscriptResponseLanguageConfidenceThresholdMax = 1;
1669
- var createTranscriptResponseLanguageConfidenceMin = 0;
1670
- var createTranscriptResponseLanguageConfidenceMax = 1;
1671
- var createTranscriptResponseWordsItemConfidenceMin = 0;
1672
- var createTranscriptResponseWordsItemConfidenceMax = 1;
1673
- var createTranscriptResponseUtterancesItemConfidenceMin = 0;
1674
- var createTranscriptResponseUtterancesItemConfidenceMax = 1;
1675
- var createTranscriptResponseUtterancesItemWordsItemConfidenceMin = 0;
1676
- var createTranscriptResponseUtterancesItemWordsItemConfidenceMax = 1;
1677
- var createTranscriptResponseConfidenceMin = 0;
1678
- var createTranscriptResponseConfidenceMax = 1;
1679
- var createTranscriptResponseAutoHighlightsResultResultsItemRankMin = 0;
1680
- var createTranscriptResponseAutoHighlightsResultResultsItemRankMax = 1;
1681
- var createTranscriptResponseContentSafetyLabelsResultsItemLabelsItemConfidenceMin = 0;
1682
- var createTranscriptResponseContentSafetyLabelsResultsItemLabelsItemConfidenceMax = 1;
1683
- var createTranscriptResponseContentSafetyLabelsResultsItemLabelsItemSeverityMin = 0;
1684
- var createTranscriptResponseContentSafetyLabelsResultsItemLabelsItemSeverityMax = 1;
1685
- var createTranscriptResponseContentSafetyLabelsSummaryMinOne = 0;
1686
- var createTranscriptResponseContentSafetyLabelsSummaryMaxOne = 1;
1687
- var createTranscriptResponseContentSafetyLabelsSeverityScoreSummaryLowMin = 0;
1688
- var createTranscriptResponseContentSafetyLabelsSeverityScoreSummaryLowMax = 1;
1689
- var createTranscriptResponseContentSafetyLabelsSeverityScoreSummaryMediumMin = 0;
1690
- var createTranscriptResponseContentSafetyLabelsSeverityScoreSummaryMediumMax = 1;
1691
- var createTranscriptResponseContentSafetyLabelsSeverityScoreSummaryHighMin = 0;
1692
- var createTranscriptResponseContentSafetyLabelsSeverityScoreSummaryHighMax = 1;
1693
- var createTranscriptResponseIabCategoriesResultResultsItemLabelsItemRelevanceMin = 0;
1694
- var createTranscriptResponseIabCategoriesResultResultsItemLabelsItemRelevanceMax = 1;
1695
- var createTranscriptResponseIabCategoriesResultSummaryMinOne = 0;
1696
- var createTranscriptResponseIabCategoriesResultSummaryMaxOne = 1;
1697
- var createTranscriptResponseSentimentAnalysisResultsItemConfidenceMin = 0;
1698
- var createTranscriptResponseSentimentAnalysisResultsItemConfidenceMax = 1;
1699
- var createTranscriptResponseSpeechThresholdMin = 0;
1700
- var createTranscriptResponseSpeechThresholdMax = 1;
1701
- var createTranscriptResponse = zod3.object({
1702
- id: zod3.string().uuid().describe("The unique identifier of your transcript"),
1703
- audio_url: zod3.string().describe("The URL of the media that was transcribed"),
1704
- status: zod3.enum(["queued", "processing", "completed", "error"]).describe(
1705
- "The status of your transcript. Possible values are queued, processing, completed, or error."
1717
+ override_audio_redaction_method: zod3.enum(["silence"]).optional().describe(
1718
+ "Specify the method used to redact audio. By default, redacted audio uses a beep sound. Set to `silence` to replace PII with silence instead of a beep."
1719
+ )
1720
+ }).optional().describe(
1721
+ "Specify options for [PII redacted audio](https://www.assemblyai.com/docs/pii-redaction#request-for-redacted-audio) files."
1706
1722
  ),
1707
- language_code: zod3.enum([
1708
- "en",
1709
- "en_au",
1710
- "en_uk",
1711
- "en_us",
1712
- "es",
1713
- "fr",
1714
- "de",
1715
- "it",
1716
- "pt",
1717
- "nl",
1718
- "af",
1719
- "sq",
1720
- "am",
1721
- "ar",
1722
- "hy",
1723
- "as",
1724
- "az",
1725
- "ba",
1726
- "eu",
1727
- "be",
1728
- "bn",
1729
- "bs",
1730
- "br",
1731
- "bg",
1732
- "my",
1733
- "ca",
1734
- "zh",
1735
- "hr",
1736
- "cs",
1737
- "da",
1738
- "et",
1739
- "fo",
1740
- "fi",
1741
- "gl",
1742
- "ka",
1743
- "el",
1744
- "gu",
1745
- "ht",
1746
- "ha",
1747
- "haw",
1748
- "he",
1749
- "hi",
1750
- "hu",
1751
- "is",
1752
- "id",
1753
- "ja",
1754
- "jw",
1755
- "kn",
1756
- "kk",
1757
- "km",
1758
- "ko",
1759
- "lo",
1760
- "la",
1761
- "lv",
1762
- "ln",
1763
- "lt",
1764
- "lb",
1765
- "mk",
1766
- "mg",
1767
- "ms",
1768
- "ml",
1769
- "mt",
1770
- "mi",
1771
- "mr",
1772
- "mn",
1773
- "ne",
1774
- "no",
1775
- "nn",
1776
- "oc",
1777
- "pa",
1778
- "ps",
1779
- "fa",
1780
- "pl",
1781
- "ro",
1782
- "ru",
1783
- "sa",
1784
- "sr",
1785
- "sn",
1786
- "sd",
1787
- "si",
1788
- "sk",
1789
- "sl",
1790
- "so",
1791
- "su",
1792
- "sw",
1793
- "sv",
1794
- "tl",
1795
- "tg",
1796
- "ta",
1797
- "tt",
1798
- "te",
1799
- "th",
1800
- "bo",
1801
- "tr",
1802
- "tk",
1803
- "uk",
1804
- "ur",
1805
- "uz",
1806
- "vi",
1807
- "cy",
1808
- "yi",
1809
- "yo"
1810
- ]).describe(
1811
- "The language of your audio file. Possible values are found in [Supported Languages](https://www.assemblyai.com/docs/concepts/supported-languages).\nThe default value is 'en_us'.\n"
1812
- ).or(zod3.string()).optional().describe(
1813
- "The language of your audio file.\nPossible values are found in [Supported Languages](https://www.assemblyai.com/docs/concepts/supported-languages).\nThe default value is 'en_us'.\n"
1814
- ),
1815
- language_detection: zod3.boolean().nullish().describe(
1816
- "Whether [Automatic language detection](https://www.assemblyai.com/docs/models/speech-recognition#automatic-language-detection) is enabled, either true or false"
1817
- ),
1818
- language_confidence_threshold: zod3.number().min(createTranscriptResponseLanguageConfidenceThresholdMin).max(createTranscriptResponseLanguageConfidenceThresholdMax).nullable().describe(
1819
- "The confidence threshold for the automatically detected language.\nAn error will be returned if the language confidence is below this threshold.\n"
1820
- ),
1821
- language_confidence: zod3.number().min(createTranscriptResponseLanguageConfidenceMin).max(createTranscriptResponseLanguageConfidenceMax).nullable().describe(
1822
- "The confidence score for the detected language, between 0.0 (low confidence) and 1.0 (high confidence)"
1823
- ),
1824
- speech_model: zod3.enum(["best", "slam-1", "universal"]).describe("The speech model to use for the transcription.").or(zod3.null()).describe(
1825
- "The speech model used for the transcription. When `null`, the default model is used."
1826
- ),
1827
- text: zod3.string().nullish().describe("The textual transcript of your media file"),
1828
- words: zod3.array(
1829
- zod3.object({
1830
- confidence: zod3.number().min(createTranscriptResponseWordsItemConfidenceMin).max(createTranscriptResponseWordsItemConfidenceMax).describe("The confidence score for the transcript of this word"),
1831
- start: zod3.number().describe("The starting time, in milliseconds, for the word"),
1832
- end: zod3.number().describe("The ending time, in milliseconds, for the word"),
1833
- text: zod3.string().describe("The text of the word"),
1834
- channel: zod3.string().nullish().describe(
1835
- "The channel of the word. The left and right channels are channels 1 and 2. Additional channels increment the channel number sequentially."
1836
- ),
1837
- speaker: zod3.string().nullable().describe(
1838
- "The speaker of the word if [Speaker Diarization](https://www.assemblyai.com/docs/models/speaker-diarization) is enabled, else null"
1839
- )
1840
- })
1841
- ).nullish().describe(
1842
- "An array of temporally-sequential word objects, one for each word in the transcript.\nSee [Speech recognition](https://www.assemblyai.com/docs/models/speech-recognition) for more information.\n"
1843
- ),
1844
- utterances: zod3.array(
1845
- zod3.object({
1846
- confidence: zod3.number().min(createTranscriptResponseUtterancesItemConfidenceMin).max(createTranscriptResponseUtterancesItemConfidenceMax).describe("The confidence score for the transcript of this utterance"),
1847
- start: zod3.number().describe("The starting time, in milliseconds, of the utterance in the audio file"),
1848
- end: zod3.number().describe("The ending time, in milliseconds, of the utterance in the audio file"),
1849
- text: zod3.string().describe("The text for this utterance"),
1850
- words: zod3.array(
1851
- zod3.object({
1852
- confidence: zod3.number().min(createTranscriptResponseUtterancesItemWordsItemConfidenceMin).max(createTranscriptResponseUtterancesItemWordsItemConfidenceMax).describe("The confidence score for the transcript of this word"),
1853
- start: zod3.number().describe("The starting time, in milliseconds, for the word"),
1854
- end: zod3.number().describe("The ending time, in milliseconds, for the word"),
1855
- text: zod3.string().describe("The text of the word"),
1856
- channel: zod3.string().nullish().describe(
1857
- "The channel of the word. The left and right channels are channels 1 and 2. Additional channels increment the channel number sequentially."
1858
- ),
1859
- speaker: zod3.string().nullable().describe(
1860
- "The speaker of the word if [Speaker Diarization](https://www.assemblyai.com/docs/models/speaker-diarization) is enabled, else null"
1861
- )
1862
- })
1863
- ).describe("The words in the utterance."),
1864
- channel: zod3.string().nullish().describe(
1865
- "The channel of this utterance. The left and right channels are channels 1 and 2. Additional channels increment the channel number sequentially."
1866
- ),
1867
- speaker: zod3.string().describe(
1868
- 'The speaker of this utterance, where each speaker is assigned a sequential capital letter - e.g. "A" for Speaker A, "B" for Speaker B, etc.'
1869
- )
1870
- })
1871
- ).nullish().describe(
1872
- "When multichannel or speaker_labels is enabled, a list of turn-by-turn utterance objects.\nSee [Speaker diarization](https://www.assemblyai.com/docs/speech-to-text/speaker-diarization) and [Multichannel transcription](https://www.assemblyai.com/docs/speech-to-text/speech-recognition#multichannel-transcription) for more information.\n"
1873
- ),
1874
- confidence: zod3.number().min(createTranscriptResponseConfidenceMin).max(createTranscriptResponseConfidenceMax).nullish().describe(
1875
- "The confidence score for the transcript, between 0.0 (low confidence) and 1.0 (high confidence)"
1876
- ),
1877
- audio_duration: zod3.number().nullish().describe("The duration of this transcript object's media file, in seconds"),
1878
- punctuate: zod3.boolean().nullish().describe("Whether Automatic Punctuation is enabled, either true or false"),
1879
- format_text: zod3.boolean().nullish().describe("Whether Text Formatting is enabled, either true or false"),
1880
- disfluencies: zod3.boolean().nullish().describe('Transcribe Filler Words, like "umm", in your media file; can be true or false'),
1881
- multichannel: zod3.boolean().nullish().describe(
1882
- "Whether [Multichannel transcription](https://www.assemblyai.com/docs/models/speech-recognition#multichannel-transcription) was enabled in the transcription request, either true or false"
1883
- ),
1884
- audio_channels: zod3.number().optional().describe(
1885
- "The number of audio channels in the audio file. This is only present when multichannel is enabled."
1886
- ),
1887
- webhook_url: zod3.string().nullish().describe(
1888
- "The URL to which we send webhook requests.\nWe sends two different types of webhook requests.\nOne request when a transcript is completed or failed, and one request when the redacted audio is ready if redact_pii_audio is enabled.\n"
1889
- ),
1890
- webhook_status_code: zod3.number().nullish().describe(
1891
- "The status code we received from your server when delivering the transcript completed or failed webhook request, if a webhook URL was provided"
1892
- ),
1893
- webhook_auth: zod3.boolean().describe("Whether webhook authentication details were provided"),
1894
- webhook_auth_header_name: zod3.string().nullish().describe(
1895
- "The header name to be sent with the transcript completed or failed webhook requests"
1896
- ),
1897
- speed_boost: zod3.boolean().nullish().describe("Whether speed boost is enabled"),
1898
- auto_highlights: zod3.boolean().describe("Whether Key Phrases is enabled, either true or false"),
1899
- auto_highlights_result: zod3.object({
1900
- status: zod3.enum(["success", "unavailable"]).describe("Either success, or unavailable in the rare case that the model failed"),
1901
- results: zod3.array(
1902
- zod3.object({
1903
- count: zod3.number().describe("The total number of times the key phrase appears in the audio file"),
1904
- rank: zod3.number().min(createTranscriptResponseAutoHighlightsResultResultsItemRankMin).max(createTranscriptResponseAutoHighlightsResultResultsItemRankMax).describe(
1905
- "The total relevancy to the overall audio file of this key phrase - a greater number means more relevant"
1906
- ),
1907
- text: zod3.string().describe("The text itself of the key phrase"),
1908
- timestamps: zod3.array(
1909
- zod3.object({
1910
- start: zod3.number().describe("The start time in milliseconds"),
1911
- end: zod3.number().describe("The end time in milliseconds")
1912
- }).describe("Timestamp containing a start and end property in milliseconds")
1913
- ).describe("The timestamp of the of the key phrase")
1914
- })
1915
- ).describe("A temporally-sequential array of Key Phrases")
1916
- }).describe(
1917
- "An array of results for the Key Phrases model, if it is enabled.\nSee [Key phrases](https://www.assemblyai.com/docs/models/key-phrases) for more information.\n"
1918
- ).or(zod3.null()).optional().describe(
1919
- "An array of results for the Key Phrases model, if it is enabled.\nSee [Key Phrases](https://www.assemblyai.com/docs/models/key-phrases) for more information.\n"
1920
- ),
1921
- audio_start_from: zod3.number().nullish().describe(
1922
- "The point in time, in milliseconds, in the file at which the transcription was started"
1923
- ),
1924
- audio_end_at: zod3.number().nullish().describe(
1925
- "The point in time, in milliseconds, in the file at which the transcription was terminated"
1926
- ),
1927
- word_boost: zod3.array(zod3.string()).optional().describe("The list of custom vocabulary to boost transcription probability for"),
1928
- boost_param: zod3.string().nullish().describe("The word boost parameter value"),
1929
- filter_profanity: zod3.boolean().nullish().describe(
1930
- "Whether [Profanity Filtering](https://www.assemblyai.com/docs/models/speech-recognition#profanity-filtering) is enabled, either true or false"
1931
- ),
1932
- redact_pii: zod3.boolean().describe(
1933
- "Whether [PII Redaction](https://www.assemblyai.com/docs/models/pii-redaction) is enabled, either true or false"
1934
- ),
1935
- redact_pii_audio: zod3.boolean().nullish().describe(
1936
- "Whether a redacted version of the audio file was generated,\neither true or false. See [PII redaction](https://www.assemblyai.com/docs/models/pii-redaction) for more information.\n"
1937
- ),
1938
- redact_pii_audio_quality: zod3.enum(["mp3", "wav"]).describe(
1939
- "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."
1940
- ).or(zod3.null()).optional().describe(
1941
- "The audio quality of the PII-redacted audio file, if redact_pii_audio is enabled.\nSee [PII redaction](https://www.assemblyai.com/docs/models/pii-redaction) for more information.\n"
1723
+ redact_pii_audio_quality: zod3.enum(["mp3", "wav"]).optional().describe(
1724
+ "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/pii-redaction#request-for-redacted-audio) for more details."
1942
1725
  ),
1943
1726
  redact_pii_policies: zod3.array(
1944
1727
  zod3.enum([
@@ -1987,123 +1770,174 @@ var createTranscriptResponse = zod3.object({
1987
1770
  "vehicle_id",
1988
1771
  "zodiac_sign"
1989
1772
  ]).describe("The type of PII to redact")
1990
- ).nullish().describe(
1991
- "The list of PII Redaction policies that were enabled, if PII Redaction is enabled.\nSee [PII redaction](https://www.assemblyai.com/docs/models/pii-redaction) for more information.\n"
1773
+ ).optional().describe(
1774
+ "The list of PII Redaction policies to enable. See [PII redaction](https://www.assemblyai.com/docs/pii-redaction) for more details."
1992
1775
  ),
1993
- redact_pii_sub: zod3.enum(["entity_name", "hash"]).optional().describe(
1994
- 'The replacement logic for detected PII, can be "entity_name" or "hash". See [PII redaction](https://www.assemblyai.com/docs/models/pii-redaction) for more details.'
1776
+ redact_pii_sub: zod3.enum(["entity_name", "hash"]).describe(
1777
+ "The replacement logic for detected PII, can be `entity_name` or `hash`. See [PII redaction](https://www.assemblyai.com/docs/pii-redaction) for more details."
1778
+ ).or(zod3.null()).optional().describe(
1779
+ "The replacement logic for detected PII, can be `entity_type` or `hash`. See [PII redaction](https://www.assemblyai.com/docs/pii-redaction) for more details."
1995
1780
  ),
1996
- speaker_labels: zod3.boolean().nullish().describe(
1997
- "Whether [Speaker diarization](https://www.assemblyai.com/docs/models/speaker-diarization) is enabled, can be true or false"
1781
+ sentiment_analysis: zod3.boolean().optional().describe(
1782
+ "Enable [Sentiment Analysis](https://www.assemblyai.com/docs/speech-understanding/sentiment-analysis), can be true or false"
1783
+ ),
1784
+ speaker_labels: zod3.boolean().optional().describe(
1785
+ "Enable [Speaker diarization](https://www.assemblyai.com/docs/pre-recorded-audio/speaker-diarization), can be true or false"
1786
+ ),
1787
+ speaker_options: zod3.object({
1788
+ min_speakers_expected: zod3.number().default(createTranscriptBodySpeakerOptionsMinSpeakersExpectedDefault).describe(
1789
+ "The minimum number of speakers expected in the audio file. See [Set a range of possible speakers](https://www.assemblyai.com/docs/pre-recorded-audio/speaker-diarization#set-a-range-of-possible-speakers) for more details."
1790
+ ),
1791
+ max_speakers_expected: zod3.number().optional().describe(
1792
+ "<Warning>Setting this parameter too high may hurt model accuracy</Warning>\nThe maximum number of speakers expected in the audio file. The default depends on audio duration: no limit for 0-2 minutes, 10 for 2-10 minutes, and 30 for 10+ minutes. See [Set a range of possible speakers](https://www.assemblyai.com/docs/pre-recorded-audio/speaker-diarization#set-a-range-of-possible-speakers) for more details.\n"
1793
+ )
1794
+ }).optional().describe(
1795
+ "Specify options for [Speaker diarization](https://www.assemblyai.com/docs/pre-recorded-audio/speaker-diarization#set-a-range-of-possible-speakers). Use this to set a range of possible speakers."
1998
1796
  ),
1999
1797
  speakers_expected: zod3.number().nullish().describe(
2000
- "Tell the speaker label model how many speakers it should attempt to identify. See [Speaker diarization](https://www.assemblyai.com/docs/models/speaker-diarization) for more details."
1798
+ "Tells the speaker label model how many speakers it should attempt to identify. See [Set number of speakers expected](https://www.assemblyai.com/docs/pre-recorded-audio/speaker-diarization#set-number-of-speakers-expected) for more details."
2001
1799
  ),
2002
- content_safety: zod3.boolean().nullish().describe(
2003
- "Whether [Content Moderation](https://www.assemblyai.com/docs/models/content-moderation) is enabled, can be true or false"
1800
+ speech_models: zod3.array(
1801
+ zod3.string().describe(
1802
+ "The speech model to use for the transcription. See [Model Selection](https://www.assemblyai.com/docs/pre-recorded-audio/select-the-speech-model) for available models."
1803
+ )
1804
+ ).describe(
1805
+ "List multiple speech models in priority order, allowing our system to automatically route your audio to the best available option. See [Model Selection](https://www.assemblyai.com/docs/pre-recorded-audio/select-the-speech-model) for available models and routing behavior.\n"
2004
1806
  ),
2005
- content_safety_labels: zod3.object({
2006
- status: zod3.enum(["success", "unavailable"]).describe("Either success, or unavailable in the rare case that the model failed"),
2007
- results: zod3.array(
2008
- zod3.object({
2009
- text: zod3.string().describe("The transcript of the section flagged by the Content Moderation model"),
2010
- labels: zod3.array(
2011
- zod3.object({
2012
- label: zod3.string().describe("The label of the sensitive topic"),
2013
- confidence: zod3.number().min(
2014
- createTranscriptResponseContentSafetyLabelsResultsItemLabelsItemConfidenceMin
2015
- ).max(
2016
- createTranscriptResponseContentSafetyLabelsResultsItemLabelsItemConfidenceMax
2017
- ).describe("The confidence score for the topic being discussed, from 0 to 1"),
2018
- severity: zod3.number().min(
2019
- createTranscriptResponseContentSafetyLabelsResultsItemLabelsItemSeverityMin
2020
- ).max(
2021
- createTranscriptResponseContentSafetyLabelsResultsItemLabelsItemSeverityMax
2022
- ).describe("How severely the topic is discussed in the section, from 0 to 1")
2023
- })
2024
- ).describe(
2025
- "An array of safety labels, one per sensitive topic that was detected in the section"
1807
+ speech_threshold: zod3.number().nullish().describe(
1808
+ "Reject audio files that contain less than this fraction of speech.\nValid values are in the range [0, 1] inclusive. See [Speech Threshold](https://www.assemblyai.com/docs/speech-threshold) for more details.\n"
1809
+ ),
1810
+ speech_understanding: zod3.object({
1811
+ request: zod3.object({
1812
+ translation: zod3.object({
1813
+ target_languages: zod3.array(zod3.string()).describe(
1814
+ 'List of target language codes (e.g., `["es", "de"]`). See [Translation](https://www.assemblyai.com/docs/speech-understanding/translation) for supported languages.'
2026
1815
  ),
2027
- sentences_idx_start: zod3.number().describe("The sentence index at which the section begins"),
2028
- sentences_idx_end: zod3.number().describe("The sentence index at which the section ends"),
2029
- timestamp: zod3.object({
2030
- start: zod3.number().describe("The start time in milliseconds"),
2031
- end: zod3.number().describe("The end time in milliseconds")
2032
- }).describe("Timestamp containing a start and end property in milliseconds")
1816
+ formal: zod3.boolean().default(createTranscriptBodySpeechUnderstandingRequestTranslationFormalDefault).describe(
1817
+ "Use formal language style. See [Translation](https://www.assemblyai.com/docs/speech-understanding/translation) for more details."
1818
+ ),
1819
+ match_original_utterance: zod3.boolean().optional().describe(
1820
+ "When enabled with Speaker Labels, returns translated text in the utterances array. Each utterance will include a `translated_texts` key containing translations for each target language."
1821
+ )
2033
1822
  })
2034
- ).describe("An array of results for the Content Moderation model"),
2035
- summary: zod3.record(
2036
- zod3.string(),
2037
- zod3.number().min(createTranscriptResponseContentSafetyLabelsSummaryMinOne).max(createTranscriptResponseContentSafetyLabelsSummaryMaxOne).describe(
2038
- 'A confidence score for the presence of the sensitive topic "topic" across the entire audio file'
1823
+ }).describe(
1824
+ "Request body for [Translation](https://www.assemblyai.com/docs/speech-understanding/translation)."
1825
+ ).or(
1826
+ zod3.object({
1827
+ speaker_identification: zod3.object({
1828
+ speaker_type: zod3.enum(["role", "name"]).describe(
1829
+ "Type of speaker identification. See [Speaker Identification](https://www.assemblyai.com/docs/speech-understanding/speaker-identification) for details on each type."
1830
+ ),
1831
+ known_values: zod3.array(zod3.string()).optional().describe(
1832
+ 'Required if speaker_type is "role". Each value must be 35 characters or less.'
1833
+ ),
1834
+ speakers: zod3.array(
1835
+ zod3.object({
1836
+ role: zod3.string().optional().describe(
1837
+ 'The role of the speaker. Required when `speaker_type` is "role".'
1838
+ ),
1839
+ name: zod3.string().optional().describe(
1840
+ 'The name of the speaker. Required when `speaker_type` is "name".'
1841
+ ),
1842
+ description: zod3.string().optional().describe(
1843
+ "A description of the speaker to help the model identify them based on conversational context."
1844
+ )
1845
+ })
1846
+ ).optional().describe(
1847
+ "An array of speaker objects with metadata to improve identification accuracy. Each object should include a `role` or `name` (depending on `speaker_type`) and an optional `description` to help the model identify the speaker. You can also include any additional custom properties (e.g., `company`, `title`) to provide more context. Use this as an alternative to `known_values` when you want to provide additional context about each speaker."
1848
+ )
1849
+ })
1850
+ }).describe(
1851
+ "Request body for [Speaker Identification](https://www.assemblyai.com/docs/speech-understanding/speaker-identification)."
2039
1852
  )
2040
- ).describe(
2041
- "A summary of the Content Moderation confidence results for the entire audio file"
2042
- ),
2043
- severity_score_summary: zod3.record(
2044
- zod3.string(),
1853
+ ).or(
2045
1854
  zod3.object({
2046
- low: zod3.number().min(createTranscriptResponseContentSafetyLabelsSeverityScoreSummaryLowMin).max(createTranscriptResponseContentSafetyLabelsSeverityScoreSummaryLowMax),
2047
- medium: zod3.number().min(createTranscriptResponseContentSafetyLabelsSeverityScoreSummaryMediumMin).max(createTranscriptResponseContentSafetyLabelsSeverityScoreSummaryMediumMax),
2048
- high: zod3.number().min(createTranscriptResponseContentSafetyLabelsSeverityScoreSummaryHighMin).max(createTranscriptResponseContentSafetyLabelsSeverityScoreSummaryHighMax)
2049
- })
2050
- ).describe(
2051
- "A summary of the Content Moderation severity results for the entire audio file"
1855
+ custom_formatting: zod3.object({
1856
+ date: zod3.string().optional().describe(
1857
+ 'Date format pattern (e.g., `"mm/dd/yyyy"`). See [Custom Formatting](https://www.assemblyai.com/docs/speech-understanding/custom-formatting) for more details.'
1858
+ ),
1859
+ phone_number: zod3.string().optional().describe(
1860
+ 'Phone number format pattern (e.g., `"(xxx)xxx-xxxx"`). See [Custom Formatting](https://www.assemblyai.com/docs/speech-understanding/custom-formatting) for more details.'
1861
+ ),
1862
+ email: zod3.string().optional().describe(
1863
+ 'Email format pattern (e.g., `"username@domain.com"`). See [Custom Formatting](https://www.assemblyai.com/docs/speech-understanding/custom-formatting) for more details.'
1864
+ )
1865
+ })
1866
+ }).describe(
1867
+ "Request body for [Custom Formatting](https://www.assemblyai.com/docs/speech-understanding/custom-formatting)."
1868
+ )
2052
1869
  )
2053
- }).describe(
2054
- "An array of results for the Content Moderation model, if it is enabled.\nSee [Content moderation](https://www.assemblyai.com/docs/models/content-moderation) for more information.\n"
1870
+ }).optional().describe(
1871
+ "Enable speech understanding tasks like [Translation](https://www.assemblyai.com/docs/speech-understanding/translation), [Speaker Identification](https://www.assemblyai.com/docs/speech-understanding/speaker-identification), and [Custom Formatting](https://www.assemblyai.com/docs/speech-understanding/custom-formatting). See the task-specific docs for available options and configuration.\n"
1872
+ ),
1873
+ summarization: zod3.boolean().optional().describe(
1874
+ "Enable [Summarization](https://www.assemblyai.com/docs/speech-understanding/summarization), can be true or false. Deprecated - use [LLM Gateway](https://www.assemblyai.com/docs/llm-gateway/overview) instead for more flexible summaries. See the [updated Summarization page](https://www.assemblyai.com/docs/speech-understanding/summarization) for details.\n\nNote: This parameter is only supported for the Universal-2 model.\n"
1875
+ ),
1876
+ summary_model: zod3.enum(["informative", "conversational", "catchy"]).optional().describe("The model to summarize the transcript"),
1877
+ summary_type: zod3.enum(["bullets", "bullets_verbose", "gist", "headline", "paragraph"]).optional().describe("The type of summary"),
1878
+ remove_audio_tags: zod3.enum(["all"]).describe(
1879
+ 'Remove [audio event tags](https://www.assemblyai.com/docs/pre-recorded-audio/universal-3-pro#audio-event-tags) from the transcript text. Set to `"all"` to remove all audio tags.\n\nNote: This parameter is only supported for the Universal-3 Pro model.\n'
2055
1880
  ).or(zod3.null()).optional().describe(
2056
- "An array of results for the Content Moderation model, if it is enabled.\nSee [Content moderation](https://www.assemblyai.com/docs/models/content-moderation) for more information.\n"
1881
+ 'Remove [audio event tags](https://www.assemblyai.com/docs/pre-recorded-audio/universal-3-pro#audio-event-tags) from the transcript text. Set to `"all"` to remove all audio tags.\n\nNote: This parameter is only supported for the Universal-3 Pro model.\n'
2057
1882
  ),
2058
- iab_categories: zod3.boolean().nullish().describe(
2059
- "Whether [Topic Detection](https://www.assemblyai.com/docs/models/topic-detection) is enabled, can be true or false"
1883
+ temperature: zod3.number().optional().describe(
1884
+ "Control the amount of randomness injected into the model's response. See the [Prompting Guide](https://www.assemblyai.com/docs/pre-recorded-audio/prompting) for more details.\n\nNote: This parameter can only be used with the Universal-3 Pro model.\n"
2060
1885
  ),
2061
- iab_categories_result: zod3.object({
1886
+ webhook_auth_header_name: zod3.string().nullish().describe(
1887
+ "The header name to be sent with the transcript completed or failed [webhook](https://www.assemblyai.com/docs/deployment/webhooks-for-pre-recorded-audio) requests"
1888
+ ),
1889
+ webhook_auth_header_value: zod3.string().nullish().describe(
1890
+ "The header value to send back with the transcript completed or failed [webhook](https://www.assemblyai.com/docs/deployment/webhooks-for-pre-recorded-audio) requests for added security"
1891
+ ),
1892
+ webhook_url: zod3.string().optional().describe(
1893
+ "The URL to which we send [webhook](https://www.assemblyai.com/docs/deployment/webhooks-for-pre-recorded-audio) requests.\n"
1894
+ ),
1895
+ custom_topics: zod3.boolean().optional().describe("This parameter does not currently have any functionality attached to it."),
1896
+ topics: zod3.array(zod3.string()).optional().describe("This parameter does not currently have any functionality attached to it."),
1897
+ audio_url: zod3.string().describe("The URL of the audio or video file to transcribe.")
1898
+ }).describe("The parameters for creating a transcript");
1899
+ var createTranscriptResponseLanguageDetectionOptionsFallbackLanguageDefault = "auto";
1900
+ var createTranscriptResponseLanguageDetectionOptionsCodeSwitchingConfidenceThresholdDefault = 0.3;
1901
+ var createTranscriptResponseSpeechUnderstandingRequestTranslationFormalDefault = true;
1902
+ var createTranscriptResponse = zod3.object({
1903
+ audio_channels: zod3.number().optional().describe(
1904
+ "The number of audio channels in the audio file. This is only present when [multichannel](https://www.assemblyai.com/docs/pre-recorded-audio/multichannel) is enabled."
1905
+ ),
1906
+ audio_duration: zod3.number().nullish().describe("The duration of this transcript object's media file, in seconds"),
1907
+ audio_end_at: zod3.number().nullish().describe(
1908
+ "The point in time, in milliseconds, in the file at which the transcription was terminated. See [Set the start and end of the transcript](https://www.assemblyai.com/docs/pre-recorded-audio/set-the-start-and-end-of-the-transcript) for more details."
1909
+ ),
1910
+ audio_start_from: zod3.number().nullish().describe(
1911
+ "The point in time, in milliseconds, in the file at which the transcription was started. See [Set the start and end of the transcript](https://www.assemblyai.com/docs/pre-recorded-audio/set-the-start-and-end-of-the-transcript) for more details."
1912
+ ),
1913
+ audio_url: zod3.string().describe("The URL of the media that was transcribed"),
1914
+ auto_chapters: zod3.boolean().nullish().describe(
1915
+ "Whether [Auto Chapters](https://www.assemblyai.com/docs/speech-understanding/auto-chapters) is enabled, can be true or false. Deprecated - use [LLM Gateway](https://www.assemblyai.com/docs/llm-gateway/overview) instead for more flexible chapter summaries. See the [updated Auto Chapters page](https://www.assemblyai.com/docs/speech-understanding/auto-chapters) for details.\n\nNote: This parameter is only supported for the Universal-2 model.\n"
1916
+ ),
1917
+ auto_highlights: zod3.boolean().describe(
1918
+ "Whether [Key Phrases](https://www.assemblyai.com/docs/speech-understanding/key-phrases) is enabled, either true or false"
1919
+ ),
1920
+ auto_highlights_result: zod3.object({
2062
1921
  status: zod3.enum(["success", "unavailable"]).describe("Either success, or unavailable in the rare case that the model failed"),
2063
1922
  results: zod3.array(
2064
1923
  zod3.object({
2065
- text: zod3.string().describe("The text in the transcript in which a detected topic occurs"),
2066
- labels: zod3.array(
2067
- zod3.object({
2068
- relevance: zod3.number().min(
2069
- createTranscriptResponseIabCategoriesResultResultsItemLabelsItemRelevanceMin
2070
- ).max(
2071
- createTranscriptResponseIabCategoriesResultResultsItemLabelsItemRelevanceMax
2072
- ).describe("How relevant the detected topic is of a detected topic"),
2073
- label: zod3.string().describe(
2074
- "The IAB taxonomical label for the label of the detected topic, where > denotes supertopic/subtopic relationship"
2075
- )
2076
- })
2077
- ).optional().describe("An array of detected topics in the text"),
2078
- timestamp: zod3.object({
2079
- start: zod3.number().describe("The start time in milliseconds"),
2080
- end: zod3.number().describe("The end time in milliseconds")
2081
- }).optional().describe("Timestamp containing a start and end property in milliseconds")
2082
- }).describe("The result of the topic detection model")
2083
- ).describe("An array of results for the Topic Detection model"),
2084
- summary: zod3.record(
2085
- zod3.string(),
2086
- zod3.number().min(createTranscriptResponseIabCategoriesResultSummaryMinOne).max(createTranscriptResponseIabCategoriesResultSummaryMaxOne)
2087
- ).describe("The overall relevance of topic to the entire audio file")
1924
+ count: zod3.number().describe("The total number of times the key phrase appears in the audio file"),
1925
+ rank: zod3.number().describe(
1926
+ "The total relevancy to the overall audio file of this key phrase - a greater number means more relevant"
1927
+ ),
1928
+ text: zod3.string().describe("The text itself of the key phrase"),
1929
+ timestamps: zod3.array(
1930
+ zod3.object({
1931
+ start: zod3.number().describe("The start time in milliseconds"),
1932
+ end: zod3.number().describe("The end time in milliseconds")
1933
+ }).describe("Timestamp containing a start and end property in milliseconds")
1934
+ ).describe("The timestamp of the of the key phrase")
1935
+ })
1936
+ ).describe("A temporally-sequential array of Key Phrases")
2088
1937
  }).describe(
2089
- "The result of the Topic Detection model, if it is enabled.\nSee [Topic Detection](https://www.assemblyai.com/docs/models/topic-detection) for more information.\n"
1938
+ "An array of results for the Key Phrases model, if it is enabled.\nSee [Key phrases](https://www.assemblyai.com/docs/speech-understanding/key-phrases) for more information.\n"
2090
1939
  ).or(zod3.null()).optional().describe(
2091
- "The result of the Topic Detection model, if it is enabled.\nSee [Topic Detection](https://www.assemblyai.com/docs/models/topic-detection) for more information.\n"
2092
- ),
2093
- custom_spelling: zod3.array(
2094
- zod3.object({
2095
- from: zod3.array(zod3.string().describe("Word or phrase to replace")).describe("Words or phrases to replace"),
2096
- to: zod3.string().describe("Word to replace with")
2097
- }).describe(
2098
- "Object containing words or phrases to replace, and the word or phrase to replace with"
2099
- )
2100
- ).nullish().describe("Customize how words are spelled and formatted using to and from values"),
2101
- keyterms_prompt: zod3.array(zod3.string()).optional().describe(
2102
- "Improve accuracy with up to 1000 domain-specific words or phrases (maximum 6 words per phrase).\n"
2103
- ),
2104
- prompt: zod3.string().optional().describe("This parameter does not currently have any functionality attached to it."),
2105
- auto_chapters: zod3.boolean().nullish().describe(
2106
- "Whether [Auto Chapters](https://www.assemblyai.com/docs/models/auto-chapters) is enabled, can be true or false"
1940
+ "An array of results for the Key Phrases model, if it is enabled.\nSee [Key Phrases](https://www.assemblyai.com/docs/speech-understanding/key-phrases) for more information.\n"
2107
1941
  ),
2108
1942
  chapters: zod3.array(
2109
1943
  zod3.object({
@@ -2115,45 +1949,70 @@ var createTranscriptResponse = zod3.object({
2115
1949
  start: zod3.number().describe("The starting time, in milliseconds, for the chapter"),
2116
1950
  end: zod3.number().describe("The starting time, in milliseconds, for the chapter")
2117
1951
  }).describe("Chapter of the audio file")
2118
- ).nullish().describe("An array of temporally sequential chapters for the audio file"),
2119
- summarization: zod3.boolean().describe(
2120
- "Whether [Summarization](https://www.assemblyai.com/docs/models/summarization) is enabled, either true or false"
2121
- ),
2122
- summary_type: zod3.string().nullish().describe(
2123
- "The type of summary generated, if [Summarization](https://www.assemblyai.com/docs/models/summarization) is enabled"
1952
+ ).nullish().describe(
1953
+ "An array of temporally sequential chapters for the audio file. See [Auto Chapters](https://www.assemblyai.com/docs/speech-understanding/auto-chapters) for more information."
2124
1954
  ),
2125
- summary_model: zod3.string().nullish().describe(
2126
- "The Summarization model used to generate the summary,\nif [Summarization](https://www.assemblyai.com/docs/models/summarization) is enabled\n"
1955
+ confidence: zod3.number().nullish().describe(
1956
+ "The confidence score for the transcript, between 0.0 (low confidence) and 1.0 (high confidence)"
2127
1957
  ),
2128
- summary: zod3.string().nullish().describe(
2129
- "The generated summary of the media file, if [Summarization](https://www.assemblyai.com/docs/models/summarization) is enabled"
1958
+ content_safety: zod3.boolean().nullish().describe(
1959
+ "Whether [Content Moderation](https://www.assemblyai.com/docs/content-moderation) is enabled, can be true or false"
2130
1960
  ),
2131
- custom_topics: zod3.boolean().nullish().describe("Whether custom topics is enabled, either true or false"),
2132
- topics: zod3.array(zod3.string()).optional().describe("The list of custom topics provided if custom topics is enabled"),
2133
- sentiment_analysis: zod3.boolean().nullish().describe(
2134
- "Whether [Sentiment Analysis](https://www.assemblyai.com/docs/models/sentiment-analysis) is enabled, can be true or false"
1961
+ content_safety_labels: zod3.object({
1962
+ status: zod3.enum(["success", "unavailable"]).describe("Either success, or unavailable in the rare case that the model failed"),
1963
+ results: zod3.array(
1964
+ zod3.object({
1965
+ text: zod3.string().describe("The transcript of the section flagged by the Content Moderation model"),
1966
+ labels: zod3.array(
1967
+ zod3.object({
1968
+ label: zod3.string().describe("The label of the sensitive topic"),
1969
+ confidence: zod3.number().describe("The confidence score for the topic being discussed, from 0 to 1"),
1970
+ severity: zod3.number().describe("How severely the topic is discussed in the section, from 0 to 1")
1971
+ })
1972
+ ).describe(
1973
+ "An array of safety labels, one per sensitive topic that was detected in the section"
1974
+ ),
1975
+ sentences_idx_start: zod3.number().describe("The sentence index at which the section begins"),
1976
+ sentences_idx_end: zod3.number().describe("The sentence index at which the section ends"),
1977
+ timestamp: zod3.object({
1978
+ start: zod3.number().describe("The start time in milliseconds"),
1979
+ end: zod3.number().describe("The end time in milliseconds")
1980
+ }).describe("Timestamp containing a start and end property in milliseconds")
1981
+ })
1982
+ ).describe("An array of results for the Content Moderation model"),
1983
+ summary: zod3.record(zod3.string(), zod3.number()).describe(
1984
+ "A summary of the Content Moderation confidence results for the entire audio file"
1985
+ ),
1986
+ severity_score_summary: zod3.record(
1987
+ zod3.string(),
1988
+ zod3.object({
1989
+ low: zod3.number(),
1990
+ medium: zod3.number(),
1991
+ high: zod3.number()
1992
+ })
1993
+ ).describe(
1994
+ "A summary of the Content Moderation severity results for the entire audio file"
1995
+ )
1996
+ }).describe(
1997
+ "An array of results for the Content Moderation model, if it is enabled.\nSee [Content moderation](https://www.assemblyai.com/docs/content-moderation) for more information.\n"
1998
+ ).or(zod3.null()).optional().describe(
1999
+ "An array of results for the Content Moderation model, if it is enabled.\nSee [Content moderation](https://www.assemblyai.com/docs/content-moderation) for more information.\n"
2135
2000
  ),
2136
- sentiment_analysis_results: zod3.array(
2001
+ custom_spelling: zod3.array(
2137
2002
  zod3.object({
2138
- text: zod3.string().describe("The transcript of the sentence"),
2139
- start: zod3.number().describe("The starting time, in milliseconds, of the sentence"),
2140
- end: zod3.number().describe("The ending time, in milliseconds, of the sentence"),
2141
- sentiment: zod3.enum(["POSITIVE", "NEUTRAL", "NEGATIVE"]),
2142
- confidence: zod3.number().min(createTranscriptResponseSentimentAnalysisResultsItemConfidenceMin).max(createTranscriptResponseSentimentAnalysisResultsItemConfidenceMax).describe(
2143
- "The confidence score for the detected sentiment of the sentence, from 0 to 1"
2144
- ),
2145
- channel: zod3.string().nullish().describe(
2146
- "The channel of this utterance. The left and right channels are channels 1 and 2. Additional channels increment the channel number sequentially."
2147
- ),
2148
- speaker: zod3.string().nullable().describe(
2149
- "The speaker of the sentence if [Speaker Diarization](https://www.assemblyai.com/docs/models/speaker-diarization) is enabled, else null"
2150
- )
2151
- }).describe("The result of the Sentiment Analysis model")
2003
+ from: zod3.array(zod3.string()).describe("Words or phrases to replace"),
2004
+ to: zod3.string().describe("Word to replace with")
2005
+ }).describe(
2006
+ "Object containing words or phrases to replace, and the word or phrase to replace with"
2007
+ )
2152
2008
  ).nullish().describe(
2153
- "An array of results for the Sentiment Analysis model, if it is enabled.\nSee [Sentiment Analysis](https://www.assemblyai.com/docs/models/sentiment-analysis) for more information.\n"
2009
+ "Customize how words are spelled and formatted using to and from values. See [Custom Spelling](https://www.assemblyai.com/docs/pre-recorded-audio/custom-spelling) for more details."
2154
2010
  ),
2155
- entity_detection: zod3.boolean().nullish().describe(
2156
- "Whether [Entity Detection](https://www.assemblyai.com/docs/models/entity-detection) is enabled, can be true or false"
2011
+ disfluencies: zod3.boolean().nullish().describe(
2012
+ 'Transcribe [Filler Words](https://www.assemblyai.com/docs/pre-recorded-audio/filler-words), like "umm", in your media file; can be true or false'
2013
+ ),
2014
+ domain: zod3.string().nullish().describe(
2015
+ 'The domain-specific model applied to the transcript. When set to `"medical-v1"`, [Medical Mode](https://www.assemblyai.com/docs/pre-recorded-audio/medical-mode) was used to improve accuracy for medical terminology.\n'
2157
2016
  ),
2158
2017
  entities: zod3.array(
2159
2018
  zod3.object({
@@ -2212,106 +2071,49 @@ var createTranscriptResponse = zod3.object({
2212
2071
  )
2213
2072
  }).describe("A detected entity")
2214
2073
  ).nullish().describe(
2215
- "An array of results for the Entity Detection model, if it is enabled.\nSee [Entity detection](https://www.assemblyai.com/docs/models/entity-detection) for more information.\n"
2216
- ),
2217
- speech_threshold: zod3.number().min(createTranscriptResponseSpeechThresholdMin).max(createTranscriptResponseSpeechThresholdMax).nullish().describe(
2218
- "Defaults to null. Reject audio files that contain less than this fraction of speech.\nValid values are in the range [0, 1] inclusive.\n"
2074
+ "An array of results for the Entity Detection model, if it is enabled.\nSee [Entity detection](https://www.assemblyai.com/docs/speech-understanding/entity-detection) for more information.\n"
2219
2075
  ),
2220
- throttled: zod3.boolean().nullish().describe(
2221
- "True while a request is throttled and false when a request is no longer throttled"
2076
+ entity_detection: zod3.boolean().nullish().describe(
2077
+ "Whether [Entity Detection](https://www.assemblyai.com/docs/speech-understanding/entity-detection) is enabled, can be true or false"
2222
2078
  ),
2223
2079
  error: zod3.string().optional().describe("Error message of why the transcript failed"),
2224
- language_model: zod3.string().describe("The language model that was used for the transcript"),
2225
- acoustic_model: zod3.string().describe("The acoustic model that was used for the transcript")
2226
- }).describe("A transcript object");
2227
- var listTranscriptsQueryLimitDefault = 10;
2228
- var listTranscriptsQueryLimitMax = 200;
2229
- var listTranscriptsQueryParams = zod3.object({
2230
- limit: zod3.number().min(1).max(listTranscriptsQueryLimitMax).default(listTranscriptsQueryLimitDefault).describe("Maximum amount of transcripts to retrieve"),
2231
- status: zod3.enum(["queued", "processing", "completed", "error"]).optional().describe("Filter by transcript status"),
2232
- created_on: zod3.string().date().optional().describe("Only get transcripts created on this date"),
2233
- before_id: zod3.string().uuid().optional().describe("Get transcripts that were created before this transcript ID"),
2234
- after_id: zod3.string().uuid().optional().describe("Get transcripts that were created after this transcript ID"),
2235
- throttled_only: zod3.boolean().optional().describe("Only get throttled transcripts, overrides the status filter")
2236
- });
2237
- var listTranscriptsResponseTranscriptsItemCreatedRegExp = new RegExp(
2238
- "^(?:(\\d{4}-\\d{2}-\\d{2})T(\\d{2}:\\d{2}:\\d{2}(?:\\.\\d+)?))$"
2239
- );
2240
- var listTranscriptsResponseTranscriptsItemCompletedRegExp = new RegExp(
2241
- "^(?:(\\d{4}-\\d{2}-\\d{2})T(\\d{2}:\\d{2}:\\d{2}(?:\\.\\d+)?))$"
2242
- );
2243
- var listTranscriptsResponse = zod3.object({
2244
- page_details: zod3.object({
2245
- limit: zod3.number().describe("The number of results this page is limited to"),
2246
- result_count: zod3.number().describe("The actual number of results in the page"),
2247
- current_url: zod3.string().describe("The URL used to retrieve the current page of transcripts"),
2248
- prev_url: zod3.string().nullable().describe(
2249
- "The URL to the next page of transcripts. The previous URL always points to a page with older transcripts."
2250
- ),
2251
- next_url: zod3.string().nullable().describe(
2252
- "The URL to the next page of transcripts. The next URL always points to a page with newer transcripts."
2253
- )
2080
+ filter_profanity: zod3.boolean().nullish().describe(
2081
+ "Whether [Profanity Filtering](https://www.assemblyai.com/docs/profanity-filtering) is enabled, either true or false"
2082
+ ),
2083
+ format_text: zod3.boolean().nullish().describe(
2084
+ "Whether [Text Formatting](https://www.assemblyai.com/docs/pre-recorded-audio) is enabled, either true or false"
2085
+ ),
2086
+ iab_categories: zod3.boolean().nullish().describe(
2087
+ "Whether [Topic Detection](https://www.assemblyai.com/docs/speech-understanding/topic-detection) is enabled, can be true or false"
2088
+ ),
2089
+ iab_categories_result: zod3.object({
2090
+ status: zod3.enum(["success", "unavailable"]).describe("Either success, or unavailable in the rare case that the model failed"),
2091
+ results: zod3.array(
2092
+ zod3.object({
2093
+ text: zod3.string().describe("The text in the transcript in which a detected topic occurs"),
2094
+ labels: zod3.array(
2095
+ zod3.object({
2096
+ relevance: zod3.number().describe("How relevant the detected topic is of a detected topic"),
2097
+ label: zod3.string().describe(
2098
+ "The IAB taxonomical label for the label of the detected topic, where > denotes supertopic/subtopic relationship"
2099
+ )
2100
+ })
2101
+ ).optional().describe("An array of detected topics in the text"),
2102
+ timestamp: zod3.object({
2103
+ start: zod3.number().describe("The start time in milliseconds"),
2104
+ end: zod3.number().describe("The end time in milliseconds")
2105
+ }).optional().describe("Timestamp containing a start and end property in milliseconds")
2106
+ }).describe("The result of the topic detection model")
2107
+ ).describe("An array of results for the Topic Detection model"),
2108
+ summary: zod3.record(zod3.string(), zod3.number()).describe("The overall relevance of topic to the entire audio file")
2254
2109
  }).describe(
2255
- "Details of the transcript page. Transcripts are sorted from newest to oldest. The previous URL always points to a page with older transcripts."
2110
+ "The result of the Topic Detection model, if it is enabled.\nSee [Topic Detection](https://www.assemblyai.com/docs/speech-understanding/topic-detection) for more information.\n"
2111
+ ).or(zod3.null()).optional().describe(
2112
+ "The result of the Topic Detection model, if it is enabled.\nSee [Topic Detection](https://www.assemblyai.com/docs/speech-understanding/topic-detection) for more information.\n"
2256
2113
  ),
2257
- transcripts: zod3.array(
2258
- zod3.object({
2259
- id: zod3.string().uuid().describe("The unique identifier for the transcript"),
2260
- resource_url: zod3.string().describe("The URL to retrieve the transcript"),
2261
- status: zod3.enum(["queued", "processing", "completed", "error"]).describe(
2262
- "The status of your transcript. Possible values are queued, processing, completed, or error."
2263
- ),
2264
- created: zod3.string().regex(listTranscriptsResponseTranscriptsItemCreatedRegExp).describe("The date and time the transcript was created"),
2265
- completed: zod3.string().regex(listTranscriptsResponseTranscriptsItemCompletedRegExp).nullable().describe("The date and time the transcript was completed"),
2266
- audio_url: zod3.string().describe("The URL to the audio file"),
2267
- error: zod3.string().nullable().describe("Error message of why the transcript failed")
2268
- })
2269
- ).describe("An array of transcripts")
2270
- }).describe(
2271
- "A list of transcripts. Transcripts are sorted from newest to oldest. The previous URL always points to a page with older transcripts."
2272
- );
2273
- var getTranscriptParams = zod3.object({
2274
- transcript_id: zod3.string().describe("ID of the transcript")
2275
- });
2276
- var getTranscriptResponseLanguageConfidenceThresholdMin = 0;
2277
- var getTranscriptResponseLanguageConfidenceThresholdMax = 1;
2278
- var getTranscriptResponseLanguageConfidenceMin = 0;
2279
- var getTranscriptResponseLanguageConfidenceMax = 1;
2280
- var getTranscriptResponseWordsItemConfidenceMin = 0;
2281
- var getTranscriptResponseWordsItemConfidenceMax = 1;
2282
- var getTranscriptResponseUtterancesItemConfidenceMin = 0;
2283
- var getTranscriptResponseUtterancesItemConfidenceMax = 1;
2284
- var getTranscriptResponseUtterancesItemWordsItemConfidenceMin = 0;
2285
- var getTranscriptResponseUtterancesItemWordsItemConfidenceMax = 1;
2286
- var getTranscriptResponseConfidenceMin = 0;
2287
- var getTranscriptResponseConfidenceMax = 1;
2288
- var getTranscriptResponseAutoHighlightsResultResultsItemRankMin = 0;
2289
- var getTranscriptResponseAutoHighlightsResultResultsItemRankMax = 1;
2290
- var getTranscriptResponseContentSafetyLabelsResultsItemLabelsItemConfidenceMin = 0;
2291
- var getTranscriptResponseContentSafetyLabelsResultsItemLabelsItemConfidenceMax = 1;
2292
- var getTranscriptResponseContentSafetyLabelsResultsItemLabelsItemSeverityMin = 0;
2293
- var getTranscriptResponseContentSafetyLabelsResultsItemLabelsItemSeverityMax = 1;
2294
- var getTranscriptResponseContentSafetyLabelsSummaryMinOne = 0;
2295
- var getTranscriptResponseContentSafetyLabelsSummaryMaxOne = 1;
2296
- var getTranscriptResponseContentSafetyLabelsSeverityScoreSummaryLowMin = 0;
2297
- var getTranscriptResponseContentSafetyLabelsSeverityScoreSummaryLowMax = 1;
2298
- var getTranscriptResponseContentSafetyLabelsSeverityScoreSummaryMediumMin = 0;
2299
- var getTranscriptResponseContentSafetyLabelsSeverityScoreSummaryMediumMax = 1;
2300
- var getTranscriptResponseContentSafetyLabelsSeverityScoreSummaryHighMin = 0;
2301
- var getTranscriptResponseContentSafetyLabelsSeverityScoreSummaryHighMax = 1;
2302
- var getTranscriptResponseIabCategoriesResultResultsItemLabelsItemRelevanceMin = 0;
2303
- var getTranscriptResponseIabCategoriesResultResultsItemLabelsItemRelevanceMax = 1;
2304
- var getTranscriptResponseIabCategoriesResultSummaryMinOne = 0;
2305
- var getTranscriptResponseIabCategoriesResultSummaryMaxOne = 1;
2306
- var getTranscriptResponseSentimentAnalysisResultsItemConfidenceMin = 0;
2307
- var getTranscriptResponseSentimentAnalysisResultsItemConfidenceMax = 1;
2308
- var getTranscriptResponseSpeechThresholdMin = 0;
2309
- var getTranscriptResponseSpeechThresholdMax = 1;
2310
- var getTranscriptResponse = zod3.object({
2311
2114
  id: zod3.string().uuid().describe("The unique identifier of your transcript"),
2312
- audio_url: zod3.string().describe("The URL of the media that was transcribed"),
2313
- status: zod3.enum(["queued", "processing", "completed", "error"]).describe(
2314
- "The status of your transcript. Possible values are queued, processing, completed, or error."
2115
+ keyterms_prompt: zod3.array(zod3.string()).optional().describe(
2116
+ "Improve accuracy with up to 200 (for Universal-2) or 1000 (for Universal-3 Pro) domain-specific words or phrases (maximum 6 words per phrase). See [Keyterms Prompting](https://www.assemblyai.com/docs/pre-recorded-audio/keyterms-prompting) for more details.\n"
2315
2117
  ),
2316
2118
  language_code: zod3.enum([
2317
2119
  "en",
@@ -2416,138 +2218,175 @@ var getTranscriptResponse = zod3.object({
2416
2218
  "cy",
2417
2219
  "yi",
2418
2220
  "yo"
2419
- ]).describe(
2420
- "The language of your audio file. Possible values are found in [Supported Languages](https://www.assemblyai.com/docs/concepts/supported-languages).\nThe default value is 'en_us'.\n"
2421
- ).or(zod3.string()).optional().describe(
2422
- "The language of your audio file.\nPossible values are found in [Supported Languages](https://www.assemblyai.com/docs/concepts/supported-languages).\nThe default value is 'en_us'.\n"
2423
- ),
2424
- language_detection: zod3.boolean().nullish().describe(
2425
- "Whether [Automatic language detection](https://www.assemblyai.com/docs/models/speech-recognition#automatic-language-detection) is enabled, either true or false"
2426
- ),
2427
- language_confidence_threshold: zod3.number().min(getTranscriptResponseLanguageConfidenceThresholdMin).max(getTranscriptResponseLanguageConfidenceThresholdMax).nullable().describe(
2428
- "The confidence threshold for the automatically detected language.\nAn error will be returned if the language confidence is below this threshold.\n"
2429
- ),
2430
- language_confidence: zod3.number().min(getTranscriptResponseLanguageConfidenceMin).max(getTranscriptResponseLanguageConfidenceMax).nullable().describe(
2431
- "The confidence score for the detected language, between 0.0 (low confidence) and 1.0 (high confidence)"
2432
- ),
2433
- speech_model: zod3.enum(["best", "slam-1", "universal"]).describe("The speech model to use for the transcription.").or(zod3.null()).describe(
2434
- "The speech model used for the transcription. When `null`, the default model is used."
2435
- ),
2436
- text: zod3.string().nullish().describe("The textual transcript of your media file"),
2437
- words: zod3.array(
2438
- zod3.object({
2439
- confidence: zod3.number().min(getTranscriptResponseWordsItemConfidenceMin).max(getTranscriptResponseWordsItemConfidenceMax).describe("The confidence score for the transcript of this word"),
2440
- start: zod3.number().describe("The starting time, in milliseconds, for the word"),
2441
- end: zod3.number().describe("The ending time, in milliseconds, for the word"),
2442
- text: zod3.string().describe("The text of the word"),
2443
- channel: zod3.string().nullish().describe(
2444
- "The channel of the word. The left and right channels are channels 1 and 2. Additional channels increment the channel number sequentially."
2445
- ),
2446
- speaker: zod3.string().nullable().describe(
2447
- "The speaker of the word if [Speaker Diarization](https://www.assemblyai.com/docs/models/speaker-diarization) is enabled, else null"
2448
- )
2449
- })
2450
- ).nullish().describe(
2451
- "An array of temporally-sequential word objects, one for each word in the transcript.\nSee [Speech recognition](https://www.assemblyai.com/docs/models/speech-recognition) for more information.\n"
2452
- ),
2453
- utterances: zod3.array(
2454
- zod3.object({
2455
- confidence: zod3.number().min(getTranscriptResponseUtterancesItemConfidenceMin).max(getTranscriptResponseUtterancesItemConfidenceMax).describe("The confidence score for the transcript of this utterance"),
2456
- start: zod3.number().describe("The starting time, in milliseconds, of the utterance in the audio file"),
2457
- end: zod3.number().describe("The ending time, in milliseconds, of the utterance in the audio file"),
2458
- text: zod3.string().describe("The text for this utterance"),
2459
- words: zod3.array(
2460
- zod3.object({
2461
- confidence: zod3.number().min(getTranscriptResponseUtterancesItemWordsItemConfidenceMin).max(getTranscriptResponseUtterancesItemWordsItemConfidenceMax).describe("The confidence score for the transcript of this word"),
2462
- start: zod3.number().describe("The starting time, in milliseconds, for the word"),
2463
- end: zod3.number().describe("The ending time, in milliseconds, for the word"),
2464
- text: zod3.string().describe("The text of the word"),
2465
- channel: zod3.string().nullish().describe(
2466
- "The channel of the word. The left and right channels are channels 1 and 2. Additional channels increment the channel number sequentially."
2467
- ),
2468
- speaker: zod3.string().nullable().describe(
2469
- "The speaker of the word if [Speaker Diarization](https://www.assemblyai.com/docs/models/speaker-diarization) is enabled, else null"
2470
- )
2471
- })
2472
- ).describe("The words in the utterance."),
2473
- channel: zod3.string().nullish().describe(
2474
- "The channel of this utterance. The left and right channels are channels 1 and 2. Additional channels increment the channel number sequentially."
2475
- ),
2476
- speaker: zod3.string().describe(
2477
- 'The speaker of this utterance, where each speaker is assigned a sequential capital letter - e.g. "A" for Speaker A, "B" for Speaker B, etc.'
2478
- )
2479
- })
2480
- ).nullish().describe(
2481
- "When multichannel or speaker_labels is enabled, a list of turn-by-turn utterance objects.\nSee [Speaker diarization](https://www.assemblyai.com/docs/speech-to-text/speaker-diarization) and [Multichannel transcription](https://www.assemblyai.com/docs/speech-to-text/speech-recognition#multichannel-transcription) for more information.\n"
2482
- ),
2483
- confidence: zod3.number().min(getTranscriptResponseConfidenceMin).max(getTranscriptResponseConfidenceMax).nullish().describe(
2484
- "The confidence score for the transcript, between 0.0 (low confidence) and 1.0 (high confidence)"
2485
- ),
2486
- audio_duration: zod3.number().nullish().describe("The duration of this transcript object's media file, in seconds"),
2487
- punctuate: zod3.boolean().nullish().describe("Whether Automatic Punctuation is enabled, either true or false"),
2488
- format_text: zod3.boolean().nullish().describe("Whether Text Formatting is enabled, either true or false"),
2489
- disfluencies: zod3.boolean().nullish().describe('Transcribe Filler Words, like "umm", in your media file; can be true or false'),
2490
- multichannel: zod3.boolean().nullish().describe(
2491
- "Whether [Multichannel transcription](https://www.assemblyai.com/docs/models/speech-recognition#multichannel-transcription) was enabled in the transcription request, either true or false"
2492
- ),
2493
- audio_channels: zod3.number().optional().describe(
2494
- "The number of audio channels in the audio file. This is only present when multichannel is enabled."
2495
- ),
2496
- webhook_url: zod3.string().nullish().describe(
2497
- "The URL to which we send webhook requests.\nWe sends two different types of webhook requests.\nOne request when a transcript is completed or failed, and one request when the redacted audio is ready if redact_pii_audio is enabled.\n"
2498
- ),
2499
- webhook_status_code: zod3.number().nullish().describe(
2500
- "The status code we received from your server when delivering the transcript completed or failed webhook request, if a webhook URL was provided"
2501
- ),
2502
- webhook_auth: zod3.boolean().describe("Whether webhook authentication details were provided"),
2503
- webhook_auth_header_name: zod3.string().nullish().describe(
2504
- "The header name to be sent with the transcript completed or failed webhook requests"
2505
- ),
2506
- speed_boost: zod3.boolean().nullish().describe("Whether speed boost is enabled"),
2507
- auto_highlights: zod3.boolean().describe("Whether Key Phrases is enabled, either true or false"),
2508
- auto_highlights_result: zod3.object({
2509
- status: zod3.enum(["success", "unavailable"]).describe("Either success, or unavailable in the rare case that the model failed"),
2510
- results: zod3.array(
2511
- zod3.object({
2512
- count: zod3.number().describe("The total number of times the key phrase appears in the audio file"),
2513
- rank: zod3.number().min(getTranscriptResponseAutoHighlightsResultResultsItemRankMin).max(getTranscriptResponseAutoHighlightsResultResultsItemRankMax).describe(
2514
- "The total relevancy to the overall audio file of this key phrase - a greater number means more relevant"
2515
- ),
2516
- text: zod3.string().describe("The text itself of the key phrase"),
2517
- timestamps: zod3.array(
2518
- zod3.object({
2519
- start: zod3.number().describe("The start time in milliseconds"),
2520
- end: zod3.number().describe("The end time in milliseconds")
2521
- }).describe("Timestamp containing a start and end property in milliseconds")
2522
- ).describe("The timestamp of the of the key phrase")
2523
- })
2524
- ).describe("A temporally-sequential array of Key Phrases")
2525
- }).describe(
2526
- "An array of results for the Key Phrases model, if it is enabled.\nSee [Key phrases](https://www.assemblyai.com/docs/models/key-phrases) for more information.\n"
2527
- ).or(zod3.null()).optional().describe(
2528
- "An array of results for the Key Phrases model, if it is enabled.\nSee [Key Phrases](https://www.assemblyai.com/docs/models/key-phrases) for more information.\n"
2529
- ),
2530
- audio_start_from: zod3.number().nullish().describe(
2531
- "The point in time, in milliseconds, in the file at which the transcription was started"
2532
- ),
2533
- audio_end_at: zod3.number().nullish().describe(
2534
- "The point in time, in milliseconds, in the file at which the transcription was terminated"
2535
- ),
2536
- word_boost: zod3.array(zod3.string()).optional().describe("The list of custom vocabulary to boost transcription probability for"),
2537
- boost_param: zod3.string().nullish().describe("The word boost parameter value"),
2538
- filter_profanity: zod3.boolean().nullish().describe(
2539
- "Whether [Profanity Filtering](https://www.assemblyai.com/docs/models/speech-recognition#profanity-filtering) is enabled, either true or false"
2540
- ),
2541
- redact_pii: zod3.boolean().describe(
2542
- "Whether [PII Redaction](https://www.assemblyai.com/docs/models/pii-redaction) is enabled, either true or false"
2543
- ),
2544
- redact_pii_audio: zod3.boolean().nullish().describe(
2545
- "Whether a redacted version of the audio file was generated,\neither true or false. See [PII redaction](https://www.assemblyai.com/docs/models/pii-redaction) for more information.\n"
2221
+ ]).optional().describe(
2222
+ "The language of your audio file. Possible values are found in [Supported Languages](https://www.assemblyai.com/docs/pre-recorded-audio/supported-languages).\nThe default value is 'en_us'.\n"
2546
2223
  ),
2547
- redact_pii_audio_quality: zod3.enum(["mp3", "wav"]).describe(
2548
- "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."
2224
+ language_codes: zod3.array(
2225
+ zod3.enum([
2226
+ "en",
2227
+ "en_au",
2228
+ "en_uk",
2229
+ "en_us",
2230
+ "es",
2231
+ "fr",
2232
+ "de",
2233
+ "it",
2234
+ "pt",
2235
+ "nl",
2236
+ "af",
2237
+ "sq",
2238
+ "am",
2239
+ "ar",
2240
+ "hy",
2241
+ "as",
2242
+ "az",
2243
+ "ba",
2244
+ "eu",
2245
+ "be",
2246
+ "bn",
2247
+ "bs",
2248
+ "br",
2249
+ "bg",
2250
+ "my",
2251
+ "ca",
2252
+ "zh",
2253
+ "hr",
2254
+ "cs",
2255
+ "da",
2256
+ "et",
2257
+ "fo",
2258
+ "fi",
2259
+ "gl",
2260
+ "ka",
2261
+ "el",
2262
+ "gu",
2263
+ "ht",
2264
+ "ha",
2265
+ "haw",
2266
+ "he",
2267
+ "hi",
2268
+ "hu",
2269
+ "is",
2270
+ "id",
2271
+ "ja",
2272
+ "jw",
2273
+ "kn",
2274
+ "kk",
2275
+ "km",
2276
+ "ko",
2277
+ "lo",
2278
+ "la",
2279
+ "lv",
2280
+ "ln",
2281
+ "lt",
2282
+ "lb",
2283
+ "mk",
2284
+ "mg",
2285
+ "ms",
2286
+ "ml",
2287
+ "mt",
2288
+ "mi",
2289
+ "mr",
2290
+ "mn",
2291
+ "ne",
2292
+ "no",
2293
+ "nn",
2294
+ "oc",
2295
+ "pa",
2296
+ "ps",
2297
+ "fa",
2298
+ "pl",
2299
+ "ro",
2300
+ "ru",
2301
+ "sa",
2302
+ "sr",
2303
+ "sn",
2304
+ "sd",
2305
+ "si",
2306
+ "sk",
2307
+ "sl",
2308
+ "so",
2309
+ "su",
2310
+ "sw",
2311
+ "sv",
2312
+ "tl",
2313
+ "tg",
2314
+ "ta",
2315
+ "tt",
2316
+ "te",
2317
+ "th",
2318
+ "bo",
2319
+ "tr",
2320
+ "tk",
2321
+ "uk",
2322
+ "ur",
2323
+ "uz",
2324
+ "vi",
2325
+ "cy",
2326
+ "yi",
2327
+ "yo"
2328
+ ]).describe(
2329
+ "The language of your audio file. Possible values are found in [Supported Languages](https://www.assemblyai.com/docs/pre-recorded-audio/supported-languages).\nThe default value is 'en_us'.\n"
2330
+ )
2331
+ ).nullish().describe(
2332
+ "The language codes of your audio file. Used for [Code switching](/docs/speech-to-text/pre-recorded-audio/code-switching)\nOne of the values specified must be `en`.\n"
2333
+ ),
2334
+ language_confidence: zod3.number().nullable().describe(
2335
+ "The confidence score for the detected language, between 0.0 (low confidence) and 1.0 (high confidence). See [Automatic Language Detection](https://www.assemblyai.com/docs/pre-recorded-audio/language-detection) for more details."
2336
+ ),
2337
+ language_confidence_threshold: zod3.number().nullable().describe(
2338
+ "The confidence threshold for the automatically detected language.\nAn error will be returned if the language confidence is below this threshold.\nSee [Automatic Language Detection](https://www.assemblyai.com/docs/pre-recorded-audio/language-detection) for more details.\n"
2339
+ ),
2340
+ language_detection: zod3.boolean().nullish().describe(
2341
+ "Whether [Automatic language detection](/docs/pre-recorded-audio/automatic-language-detection) is enabled, either true or false"
2342
+ ),
2343
+ language_detection_options: zod3.object({
2344
+ expected_languages: zod3.array(zod3.string()).optional().describe(
2345
+ 'List of languages expected in the audio file. Defaults to `["all"]` when unspecified. See [Automatic Language Detection](https://www.assemblyai.com/docs/pre-recorded-audio/language-detection) for more details.'
2346
+ ),
2347
+ fallback_language: zod3.string().default(createTranscriptResponseLanguageDetectionOptionsFallbackLanguageDefault).describe(
2348
+ 'If the detected language of the audio file is not in the list of expected languages, the `fallback_language` is used. Specify `["auto"]` to let our model choose the fallback language from `expected_languages` with the highest confidence score. See [Automatic Language Detection](https://www.assemblyai.com/docs/pre-recorded-audio/language-detection) for more details.\n'
2349
+ ),
2350
+ code_switching: zod3.boolean().optional().describe(
2351
+ "Whether [code switching](/docs/speech-to-text/pre-recorded-audio/code-switching) should be detected.\n"
2352
+ ),
2353
+ code_switching_confidence_threshold: zod3.number().default(
2354
+ createTranscriptResponseLanguageDetectionOptionsCodeSwitchingConfidenceThresholdDefault
2355
+ ).describe(
2356
+ "The confidence threshold for [code switching](/docs/speech-to-text/pre-recorded-audio/code-switching) detection. If the code switching confidence is below this threshold, the transcript will be processed in the language with the highest `language_detection_confidence` score.\n"
2357
+ )
2358
+ }).optional().describe(
2359
+ "Specify options for [Automatic Language Detection](https://www.assemblyai.com/docs/pre-recorded-audio/language-detection)."
2360
+ ),
2361
+ multichannel: zod3.boolean().nullish().describe(
2362
+ "Whether [Multichannel transcription](https://www.assemblyai.com/docs/pre-recorded-audio/multichannel) was enabled in the transcription request, either true or false"
2363
+ ),
2364
+ prompt: zod3.string().optional().describe(
2365
+ "Provide natural language prompting of up to 1,500 words of contextual information to the model. See the [Prompting Guide](https://www.assemblyai.com/docs/pre-recorded-audio/prompting) for best practices.\n\nNote: This parameter is only supported for the Universal-3 Pro model.\n"
2366
+ ),
2367
+ punctuate: zod3.boolean().nullish().describe(
2368
+ "Whether [Automatic Punctuation](https://www.assemblyai.com/docs/pre-recorded-audio) is enabled, either true or false"
2369
+ ),
2370
+ redact_pii: zod3.boolean().describe(
2371
+ "Whether [PII Redaction](https://www.assemblyai.com/docs/pii-redaction) is enabled, either true or false"
2372
+ ),
2373
+ redact_pii_audio: zod3.boolean().nullish().describe(
2374
+ "Whether a redacted version of the audio file was generated,\neither true or false. See [PII redaction](https://www.assemblyai.com/docs/pii-redaction#request-for-redacted-audio) for more information.\n"
2375
+ ),
2376
+ redact_pii_audio_options: zod3.object({
2377
+ return_redacted_no_speech_audio: zod3.boolean().optional().describe(
2378
+ "By default, audio redaction provides redacted audio URLs only when speech is detected. However, if your use-case specifically requires redacted audio files even for silent audio files without any dialogue, you can opt to receive these URLs by setting this parameter to `true`."
2379
+ ),
2380
+ override_audio_redaction_method: zod3.enum(["silence"]).optional().describe(
2381
+ "Specify the method used to redact audio. By default, redacted audio uses a beep sound. Set to `silence` to replace PII with silence instead of a beep."
2382
+ )
2383
+ }).optional().describe(
2384
+ "The options for PII-redacted audio, if redact_pii_audio is enabled.\nSee [PII redaction](https://www.assemblyai.com/docs/pii-redaction#request-for-redacted-audio) for more information.\n"
2385
+ ),
2386
+ redact_pii_audio_quality: zod3.enum(["mp3", "wav"]).describe(
2387
+ "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/pii-redaction#request-for-redacted-audio) for more details."
2549
2388
  ).or(zod3.null()).optional().describe(
2550
- "The audio quality of the PII-redacted audio file, if redact_pii_audio is enabled.\nSee [PII redaction](https://www.assemblyai.com/docs/models/pii-redaction) for more information.\n"
2389
+ "The audio quality of the PII-redacted audio file, if redact_pii_audio is enabled.\nSee [PII redaction](https://www.assemblyai.com/docs/pii-redaction#request-for-redacted-audio) for more information.\n"
2551
2390
  ),
2552
2391
  redact_pii_policies: zod3.array(
2553
2392
  zod3.enum([
@@ -2597,146 +2436,13 @@ var getTranscriptResponse = zod3.object({
2597
2436
  "zodiac_sign"
2598
2437
  ]).describe("The type of PII to redact")
2599
2438
  ).nullish().describe(
2600
- "The list of PII Redaction policies that were enabled, if PII Redaction is enabled.\nSee [PII redaction](https://www.assemblyai.com/docs/models/pii-redaction) for more information.\n"
2439
+ "The list of PII Redaction policies that were enabled, if PII Redaction is enabled.\nSee [PII redaction](https://www.assemblyai.com/docs/pii-redaction) for more information.\n"
2601
2440
  ),
2602
2441
  redact_pii_sub: zod3.enum(["entity_name", "hash"]).optional().describe(
2603
- 'The replacement logic for detected PII, can be "entity_name" or "hash". See [PII redaction](https://www.assemblyai.com/docs/models/pii-redaction) for more details.'
2604
- ),
2605
- speaker_labels: zod3.boolean().nullish().describe(
2606
- "Whether [Speaker diarization](https://www.assemblyai.com/docs/models/speaker-diarization) is enabled, can be true or false"
2607
- ),
2608
- speakers_expected: zod3.number().nullish().describe(
2609
- "Tell the speaker label model how many speakers it should attempt to identify. See [Speaker diarization](https://www.assemblyai.com/docs/models/speaker-diarization) for more details."
2610
- ),
2611
- content_safety: zod3.boolean().nullish().describe(
2612
- "Whether [Content Moderation](https://www.assemblyai.com/docs/models/content-moderation) is enabled, can be true or false"
2613
- ),
2614
- content_safety_labels: zod3.object({
2615
- status: zod3.enum(["success", "unavailable"]).describe("Either success, or unavailable in the rare case that the model failed"),
2616
- results: zod3.array(
2617
- zod3.object({
2618
- text: zod3.string().describe("The transcript of the section flagged by the Content Moderation model"),
2619
- labels: zod3.array(
2620
- zod3.object({
2621
- label: zod3.string().describe("The label of the sensitive topic"),
2622
- confidence: zod3.number().min(
2623
- getTranscriptResponseContentSafetyLabelsResultsItemLabelsItemConfidenceMin
2624
- ).max(
2625
- getTranscriptResponseContentSafetyLabelsResultsItemLabelsItemConfidenceMax
2626
- ).describe("The confidence score for the topic being discussed, from 0 to 1"),
2627
- severity: zod3.number().min(getTranscriptResponseContentSafetyLabelsResultsItemLabelsItemSeverityMin).max(getTranscriptResponseContentSafetyLabelsResultsItemLabelsItemSeverityMax).describe("How severely the topic is discussed in the section, from 0 to 1")
2628
- })
2629
- ).describe(
2630
- "An array of safety labels, one per sensitive topic that was detected in the section"
2631
- ),
2632
- sentences_idx_start: zod3.number().describe("The sentence index at which the section begins"),
2633
- sentences_idx_end: zod3.number().describe("The sentence index at which the section ends"),
2634
- timestamp: zod3.object({
2635
- start: zod3.number().describe("The start time in milliseconds"),
2636
- end: zod3.number().describe("The end time in milliseconds")
2637
- }).describe("Timestamp containing a start and end property in milliseconds")
2638
- })
2639
- ).describe("An array of results for the Content Moderation model"),
2640
- summary: zod3.record(
2641
- zod3.string(),
2642
- zod3.number().min(getTranscriptResponseContentSafetyLabelsSummaryMinOne).max(getTranscriptResponseContentSafetyLabelsSummaryMaxOne).describe(
2643
- 'A confidence score for the presence of the sensitive topic "topic" across the entire audio file'
2644
- )
2645
- ).describe(
2646
- "A summary of the Content Moderation confidence results for the entire audio file"
2647
- ),
2648
- severity_score_summary: zod3.record(
2649
- zod3.string(),
2650
- zod3.object({
2651
- low: zod3.number().min(getTranscriptResponseContentSafetyLabelsSeverityScoreSummaryLowMin).max(getTranscriptResponseContentSafetyLabelsSeverityScoreSummaryLowMax),
2652
- medium: zod3.number().min(getTranscriptResponseContentSafetyLabelsSeverityScoreSummaryMediumMin).max(getTranscriptResponseContentSafetyLabelsSeverityScoreSummaryMediumMax),
2653
- high: zod3.number().min(getTranscriptResponseContentSafetyLabelsSeverityScoreSummaryHighMin).max(getTranscriptResponseContentSafetyLabelsSeverityScoreSummaryHighMax)
2654
- })
2655
- ).describe(
2656
- "A summary of the Content Moderation severity results for the entire audio file"
2657
- )
2658
- }).describe(
2659
- "An array of results for the Content Moderation model, if it is enabled.\nSee [Content moderation](https://www.assemblyai.com/docs/models/content-moderation) for more information.\n"
2660
- ).or(zod3.null()).optional().describe(
2661
- "An array of results for the Content Moderation model, if it is enabled.\nSee [Content moderation](https://www.assemblyai.com/docs/models/content-moderation) for more information.\n"
2662
- ),
2663
- iab_categories: zod3.boolean().nullish().describe(
2664
- "Whether [Topic Detection](https://www.assemblyai.com/docs/models/topic-detection) is enabled, can be true or false"
2665
- ),
2666
- iab_categories_result: zod3.object({
2667
- status: zod3.enum(["success", "unavailable"]).describe("Either success, or unavailable in the rare case that the model failed"),
2668
- results: zod3.array(
2669
- zod3.object({
2670
- text: zod3.string().describe("The text in the transcript in which a detected topic occurs"),
2671
- labels: zod3.array(
2672
- zod3.object({
2673
- relevance: zod3.number().min(
2674
- getTranscriptResponseIabCategoriesResultResultsItemLabelsItemRelevanceMin
2675
- ).max(
2676
- getTranscriptResponseIabCategoriesResultResultsItemLabelsItemRelevanceMax
2677
- ).describe("How relevant the detected topic is of a detected topic"),
2678
- label: zod3.string().describe(
2679
- "The IAB taxonomical label for the label of the detected topic, where > denotes supertopic/subtopic relationship"
2680
- )
2681
- })
2682
- ).optional().describe("An array of detected topics in the text"),
2683
- timestamp: zod3.object({
2684
- start: zod3.number().describe("The start time in milliseconds"),
2685
- end: zod3.number().describe("The end time in milliseconds")
2686
- }).optional().describe("Timestamp containing a start and end property in milliseconds")
2687
- }).describe("The result of the topic detection model")
2688
- ).describe("An array of results for the Topic Detection model"),
2689
- summary: zod3.record(
2690
- zod3.string(),
2691
- zod3.number().min(getTranscriptResponseIabCategoriesResultSummaryMinOne).max(getTranscriptResponseIabCategoriesResultSummaryMaxOne)
2692
- ).describe("The overall relevance of topic to the entire audio file")
2693
- }).describe(
2694
- "The result of the Topic Detection model, if it is enabled.\nSee [Topic Detection](https://www.assemblyai.com/docs/models/topic-detection) for more information.\n"
2695
- ).or(zod3.null()).optional().describe(
2696
- "The result of the Topic Detection model, if it is enabled.\nSee [Topic Detection](https://www.assemblyai.com/docs/models/topic-detection) for more information.\n"
2697
- ),
2698
- custom_spelling: zod3.array(
2699
- zod3.object({
2700
- from: zod3.array(zod3.string().describe("Word or phrase to replace")).describe("Words or phrases to replace"),
2701
- to: zod3.string().describe("Word to replace with")
2702
- }).describe(
2703
- "Object containing words or phrases to replace, and the word or phrase to replace with"
2704
- )
2705
- ).nullish().describe("Customize how words are spelled and formatted using to and from values"),
2706
- keyterms_prompt: zod3.array(zod3.string()).optional().describe(
2707
- "Improve accuracy with up to 1000 domain-specific words or phrases (maximum 6 words per phrase).\n"
2708
- ),
2709
- prompt: zod3.string().optional().describe("This parameter does not currently have any functionality attached to it."),
2710
- auto_chapters: zod3.boolean().nullish().describe(
2711
- "Whether [Auto Chapters](https://www.assemblyai.com/docs/models/auto-chapters) is enabled, can be true or false"
2712
- ),
2713
- chapters: zod3.array(
2714
- zod3.object({
2715
- gist: zod3.string().describe(
2716
- "An ultra-short summary (just a few words) of the content spoken in the chapter"
2717
- ),
2718
- headline: zod3.string().describe("A single sentence summary of the content spoken during the chapter"),
2719
- summary: zod3.string().describe("A one paragraph summary of the content spoken during the chapter"),
2720
- start: zod3.number().describe("The starting time, in milliseconds, for the chapter"),
2721
- end: zod3.number().describe("The starting time, in milliseconds, for the chapter")
2722
- }).describe("Chapter of the audio file")
2723
- ).nullish().describe("An array of temporally sequential chapters for the audio file"),
2724
- summarization: zod3.boolean().describe(
2725
- "Whether [Summarization](https://www.assemblyai.com/docs/models/summarization) is enabled, either true or false"
2726
- ),
2727
- summary_type: zod3.string().nullish().describe(
2728
- "The type of summary generated, if [Summarization](https://www.assemblyai.com/docs/models/summarization) is enabled"
2729
- ),
2730
- summary_model: zod3.string().nullish().describe(
2731
- "The Summarization model used to generate the summary,\nif [Summarization](https://www.assemblyai.com/docs/models/summarization) is enabled\n"
2442
+ "The replacement logic for detected PII, can be `entity_name` or `hash`. See [PII redaction](https://www.assemblyai.com/docs/pii-redaction) for more details."
2732
2443
  ),
2733
- summary: zod3.string().nullish().describe(
2734
- "The generated summary of the media file, if [Summarization](https://www.assemblyai.com/docs/models/summarization) is enabled"
2735
- ),
2736
- custom_topics: zod3.boolean().nullish().describe("Whether custom topics is enabled, either true or false"),
2737
- topics: zod3.array(zod3.string()).optional().describe("The list of custom topics provided if custom topics is enabled"),
2738
2444
  sentiment_analysis: zod3.boolean().nullish().describe(
2739
- "Whether [Sentiment Analysis](https://www.assemblyai.com/docs/models/sentiment-analysis) is enabled, can be true or false"
2445
+ "Whether [Sentiment Analysis](https://www.assemblyai.com/docs/speech-understanding/sentiment-analysis) is enabled, can be true or false"
2740
2446
  ),
2741
2447
  sentiment_analysis_results: zod3.array(
2742
2448
  zod3.object({
@@ -2744,280 +2450,158 @@ var getTranscriptResponse = zod3.object({
2744
2450
  start: zod3.number().describe("The starting time, in milliseconds, of the sentence"),
2745
2451
  end: zod3.number().describe("The ending time, in milliseconds, of the sentence"),
2746
2452
  sentiment: zod3.enum(["POSITIVE", "NEUTRAL", "NEGATIVE"]),
2747
- confidence: zod3.number().min(getTranscriptResponseSentimentAnalysisResultsItemConfidenceMin).max(getTranscriptResponseSentimentAnalysisResultsItemConfidenceMax).describe(
2453
+ confidence: zod3.number().describe(
2748
2454
  "The confidence score for the detected sentiment of the sentence, from 0 to 1"
2749
2455
  ),
2750
2456
  channel: zod3.string().nullish().describe(
2751
2457
  "The channel of this utterance. The left and right channels are channels 1 and 2. Additional channels increment the channel number sequentially."
2752
2458
  ),
2753
2459
  speaker: zod3.string().nullable().describe(
2754
- "The speaker of the sentence if [Speaker Diarization](https://www.assemblyai.com/docs/models/speaker-diarization) is enabled, else null"
2460
+ "The speaker of the sentence if [Speaker Diarization](https://www.assemblyai.com/docs/pre-recorded-audio/speaker-diarization) is enabled, else null"
2755
2461
  )
2756
2462
  }).describe("The result of the Sentiment Analysis model")
2757
2463
  ).nullish().describe(
2758
- "An array of results for the Sentiment Analysis model, if it is enabled.\nSee [Sentiment Analysis](https://www.assemblyai.com/docs/models/sentiment-analysis) for more information.\n"
2464
+ "An array of results for the Sentiment Analysis model, if it is enabled.\nSee [Sentiment Analysis](https://www.assemblyai.com/docs/speech-understanding/sentiment-analysis) for more information.\n"
2759
2465
  ),
2760
- entity_detection: zod3.boolean().nullish().describe(
2761
- "Whether [Entity Detection](https://www.assemblyai.com/docs/models/entity-detection) is enabled, can be true or false"
2466
+ speaker_labels: zod3.boolean().nullish().describe(
2467
+ "Whether [Speaker diarization](https://www.assemblyai.com/docs/pre-recorded-audio/speaker-diarization) is enabled, can be true or false"
2762
2468
  ),
2763
- entities: zod3.array(
2764
- zod3.object({
2765
- entity_type: zod3.enum([
2766
- "account_number",
2767
- "banking_information",
2768
- "blood_type",
2769
- "credit_card_cvv",
2770
- "credit_card_expiration",
2771
- "credit_card_number",
2772
- "date",
2773
- "date_interval",
2774
- "date_of_birth",
2775
- "drivers_license",
2776
- "drug",
2777
- "duration",
2778
- "email_address",
2779
- "event",
2780
- "filename",
2781
- "gender_sexuality",
2782
- "healthcare_number",
2783
- "injury",
2784
- "ip_address",
2785
- "language",
2786
- "location",
2787
- "marital_status",
2788
- "medical_condition",
2789
- "medical_process",
2790
- "money_amount",
2791
- "nationality",
2792
- "number_sequence",
2793
- "occupation",
2794
- "organization",
2795
- "passport_number",
2796
- "password",
2797
- "person_age",
2798
- "person_name",
2799
- "phone_number",
2800
- "physical_attribute",
2801
- "political_affiliation",
2802
- "religion",
2803
- "statistics",
2804
- "time",
2805
- "url",
2806
- "us_social_security_number",
2807
- "username",
2808
- "vehicle_id",
2809
- "zodiac_sign"
2810
- ]).describe("The type of entity for the detected entity"),
2811
- text: zod3.string().describe("The text for the detected entity"),
2812
- start: zod3.number().describe(
2813
- "The starting time, in milliseconds, at which the detected entity appears in the audio file"
2814
- ),
2815
- end: zod3.number().describe(
2816
- "The ending time, in milliseconds, for the detected entity in the audio file"
2817
- )
2818
- }).describe("A detected entity")
2469
+ speakers_expected: zod3.number().nullish().describe(
2470
+ "Tell the speaker label model how many speakers it should attempt to identify. See [Set number of speakers expected](https://www.assemblyai.com/docs/pre-recorded-audio/speaker-diarization#set-number-of-speakers-expected) for more details."
2471
+ ),
2472
+ speech_model_used: zod3.string().optional().describe(
2473
+ "The speech model to use for the transcription. See [Model Selection](https://www.assemblyai.com/docs/pre-recorded-audio/select-the-speech-model) for available models."
2474
+ ),
2475
+ speech_models: zod3.array(
2476
+ zod3.string().describe(
2477
+ "The speech model to use for the transcription. See [Model Selection](https://www.assemblyai.com/docs/pre-recorded-audio/select-the-speech-model) for available models."
2478
+ )
2819
2479
  ).nullish().describe(
2820
- "An array of results for the Entity Detection model, if it is enabled.\nSee [Entity detection](https://www.assemblyai.com/docs/models/entity-detection) for more information.\n"
2480
+ "List multiple speech models in priority order, allowing our system to automatically route your audio to the best available option. See [Model Selection](https://www.assemblyai.com/docs/pre-recorded-audio/select-the-speech-model) for available models and routing behavior.\n"
2821
2481
  ),
2822
- speech_threshold: zod3.number().min(getTranscriptResponseSpeechThresholdMin).max(getTranscriptResponseSpeechThresholdMax).nullish().describe(
2823
- "Defaults to null. Reject audio files that contain less than this fraction of speech.\nValid values are in the range [0, 1] inclusive.\n"
2482
+ speech_threshold: zod3.number().nullish().describe(
2483
+ "Defaults to null. Reject audio files that contain less than this fraction of speech.\nValid values are in the range [0, 1] inclusive. See [Speech Threshold](https://www.assemblyai.com/docs/speech-threshold) for more details.\n"
2824
2484
  ),
2825
- throttled: zod3.boolean().nullish().describe(
2826
- "True while a request is throttled and false when a request is no longer throttled"
2485
+ speech_understanding: zod3.object({
2486
+ request: zod3.object({
2487
+ translation: zod3.object({
2488
+ target_languages: zod3.array(zod3.string()).describe(
2489
+ 'List of target language codes (e.g., `["es", "de"]`). See [Translation](https://www.assemblyai.com/docs/speech-understanding/translation) for supported languages.'
2490
+ ),
2491
+ formal: zod3.boolean().default(createTranscriptResponseSpeechUnderstandingRequestTranslationFormalDefault).describe(
2492
+ "Use formal language style. See [Translation](https://www.assemblyai.com/docs/speech-understanding/translation) for more details."
2493
+ ),
2494
+ match_original_utterance: zod3.boolean().optional().describe(
2495
+ "When enabled with Speaker Labels, returns translated text in the utterances array. Each utterance will include a `translated_texts` key containing translations for each target language."
2496
+ )
2497
+ })
2498
+ }).describe(
2499
+ "Request body for [Translation](https://www.assemblyai.com/docs/speech-understanding/translation)."
2500
+ ).or(
2501
+ zod3.object({
2502
+ speaker_identification: zod3.object({
2503
+ speaker_type: zod3.enum(["role", "name"]).describe(
2504
+ "Type of speaker identification. See [Speaker Identification](https://www.assemblyai.com/docs/speech-understanding/speaker-identification) for details on each type."
2505
+ ),
2506
+ known_values: zod3.array(zod3.string()).optional().describe(
2507
+ 'Required if speaker_type is "role". Each value must be 35 characters or less.'
2508
+ ),
2509
+ speakers: zod3.array(
2510
+ zod3.object({
2511
+ role: zod3.string().optional().describe(
2512
+ 'The role of the speaker. Required when `speaker_type` is "role".'
2513
+ ),
2514
+ name: zod3.string().optional().describe(
2515
+ 'The name of the speaker. Required when `speaker_type` is "name".'
2516
+ ),
2517
+ description: zod3.string().optional().describe(
2518
+ "A description of the speaker to help the model identify them based on conversational context."
2519
+ )
2520
+ })
2521
+ ).optional().describe(
2522
+ "An array of speaker objects with metadata to improve identification accuracy. Each object should include a `role` or `name` (depending on `speaker_type`) and an optional `description` to help the model identify the speaker. You can also include any additional custom properties (e.g., `company`, `title`) to provide more context. Use this as an alternative to `known_values` when you want to provide additional context about each speaker."
2523
+ )
2524
+ })
2525
+ }).describe(
2526
+ "Request body for [Speaker Identification](https://www.assemblyai.com/docs/speech-understanding/speaker-identification)."
2527
+ )
2528
+ ).or(
2529
+ zod3.object({
2530
+ custom_formatting: zod3.object({
2531
+ date: zod3.string().optional().describe(
2532
+ 'Date format pattern (e.g., `"mm/dd/yyyy"`). See [Custom Formatting](https://www.assemblyai.com/docs/speech-understanding/custom-formatting) for more details.'
2533
+ ),
2534
+ phone_number: zod3.string().optional().describe(
2535
+ 'Phone number format pattern (e.g., `"(xxx)xxx-xxxx"`). See [Custom Formatting](https://www.assemblyai.com/docs/speech-understanding/custom-formatting) for more details.'
2536
+ ),
2537
+ email: zod3.string().optional().describe(
2538
+ 'Email format pattern (e.g., `"username@domain.com"`). See [Custom Formatting](https://www.assemblyai.com/docs/speech-understanding/custom-formatting) for more details.'
2539
+ )
2540
+ })
2541
+ }).describe(
2542
+ "Request body for [Custom Formatting](https://www.assemblyai.com/docs/speech-understanding/custom-formatting)."
2543
+ )
2544
+ ).optional(),
2545
+ response: zod3.object({
2546
+ translation: zod3.object({
2547
+ status: zod3.string().optional()
2548
+ }).optional()
2549
+ }).or(
2550
+ zod3.object({
2551
+ speaker_identification: zod3.object({
2552
+ mapping: zod3.record(zod3.string(), zod3.string()).optional().describe(
2553
+ 'A mapping of the original generic speaker labels (e.g., "A", "B") to the identified speaker names or roles.'
2554
+ ),
2555
+ status: zod3.string().optional()
2556
+ }).optional()
2557
+ })
2558
+ ).or(
2559
+ zod3.object({
2560
+ custom_formatting: zod3.object({
2561
+ mapping: zod3.record(zod3.string(), zod3.string()).optional(),
2562
+ formatted_text: zod3.string().optional()
2563
+ }).optional()
2564
+ })
2565
+ ).optional()
2566
+ }).optional().describe(
2567
+ "Speech understanding tasks like [Translation](https://www.assemblyai.com/docs/speech-understanding/translation), [Speaker Identification](https://www.assemblyai.com/docs/speech-understanding/speaker-identification), and [Custom Formatting](https://www.assemblyai.com/docs/speech-understanding/custom-formatting). See the task-specific docs for available options and configuration.\n"
2827
2568
  ),
2828
- error: zod3.string().optional().describe("Error message of why the transcript failed"),
2829
- language_model: zod3.string().describe("The language model that was used for the transcript"),
2830
- acoustic_model: zod3.string().describe("The acoustic model that was used for the transcript")
2831
- }).describe("A transcript object");
2832
- var deleteTranscriptParams = zod3.object({
2833
- transcript_id: zod3.string().describe("ID of the transcript")
2834
- });
2835
- var deleteTranscriptResponseLanguageConfidenceThresholdMin = 0;
2836
- var deleteTranscriptResponseLanguageConfidenceThresholdMax = 1;
2837
- var deleteTranscriptResponseLanguageConfidenceMin = 0;
2838
- var deleteTranscriptResponseLanguageConfidenceMax = 1;
2839
- var deleteTranscriptResponseWordsItemConfidenceMin = 0;
2840
- var deleteTranscriptResponseWordsItemConfidenceMax = 1;
2841
- var deleteTranscriptResponseUtterancesItemConfidenceMin = 0;
2842
- var deleteTranscriptResponseUtterancesItemConfidenceMax = 1;
2843
- var deleteTranscriptResponseUtterancesItemWordsItemConfidenceMin = 0;
2844
- var deleteTranscriptResponseUtterancesItemWordsItemConfidenceMax = 1;
2845
- var deleteTranscriptResponseConfidenceMin = 0;
2846
- var deleteTranscriptResponseConfidenceMax = 1;
2847
- var deleteTranscriptResponseAutoHighlightsResultResultsItemRankMin = 0;
2848
- var deleteTranscriptResponseAutoHighlightsResultResultsItemRankMax = 1;
2849
- var deleteTranscriptResponseContentSafetyLabelsResultsItemLabelsItemConfidenceMin = 0;
2850
- var deleteTranscriptResponseContentSafetyLabelsResultsItemLabelsItemConfidenceMax = 1;
2851
- var deleteTranscriptResponseContentSafetyLabelsResultsItemLabelsItemSeverityMin = 0;
2852
- var deleteTranscriptResponseContentSafetyLabelsResultsItemLabelsItemSeverityMax = 1;
2853
- var deleteTranscriptResponseContentSafetyLabelsSummaryMinOne = 0;
2854
- var deleteTranscriptResponseContentSafetyLabelsSummaryMaxOne = 1;
2855
- var deleteTranscriptResponseContentSafetyLabelsSeverityScoreSummaryLowMin = 0;
2856
- var deleteTranscriptResponseContentSafetyLabelsSeverityScoreSummaryLowMax = 1;
2857
- var deleteTranscriptResponseContentSafetyLabelsSeverityScoreSummaryMediumMin = 0;
2858
- var deleteTranscriptResponseContentSafetyLabelsSeverityScoreSummaryMediumMax = 1;
2859
- var deleteTranscriptResponseContentSafetyLabelsSeverityScoreSummaryHighMin = 0;
2860
- var deleteTranscriptResponseContentSafetyLabelsSeverityScoreSummaryHighMax = 1;
2861
- var deleteTranscriptResponseIabCategoriesResultResultsItemLabelsItemRelevanceMin = 0;
2862
- var deleteTranscriptResponseIabCategoriesResultResultsItemLabelsItemRelevanceMax = 1;
2863
- var deleteTranscriptResponseIabCategoriesResultSummaryMinOne = 0;
2864
- var deleteTranscriptResponseIabCategoriesResultSummaryMaxOne = 1;
2865
- var deleteTranscriptResponseSentimentAnalysisResultsItemConfidenceMin = 0;
2866
- var deleteTranscriptResponseSentimentAnalysisResultsItemConfidenceMax = 1;
2867
- var deleteTranscriptResponseSpeechThresholdMin = 0;
2868
- var deleteTranscriptResponseSpeechThresholdMax = 1;
2869
- var deleteTranscriptResponse = zod3.object({
2870
- id: zod3.string().uuid().describe("The unique identifier of your transcript"),
2871
- audio_url: zod3.string().describe("The URL of the media that was transcribed"),
2872
2569
  status: zod3.enum(["queued", "processing", "completed", "error"]).describe(
2873
2570
  "The status of your transcript. Possible values are queued, processing, completed, or error."
2874
2571
  ),
2875
- language_code: zod3.enum([
2876
- "en",
2877
- "en_au",
2878
- "en_uk",
2879
- "en_us",
2880
- "es",
2881
- "fr",
2882
- "de",
2883
- "it",
2884
- "pt",
2885
- "nl",
2886
- "af",
2887
- "sq",
2888
- "am",
2889
- "ar",
2890
- "hy",
2891
- "as",
2892
- "az",
2893
- "ba",
2894
- "eu",
2895
- "be",
2896
- "bn",
2897
- "bs",
2898
- "br",
2899
- "bg",
2900
- "my",
2901
- "ca",
2902
- "zh",
2903
- "hr",
2904
- "cs",
2905
- "da",
2906
- "et",
2907
- "fo",
2908
- "fi",
2909
- "gl",
2910
- "ka",
2911
- "el",
2912
- "gu",
2913
- "ht",
2914
- "ha",
2915
- "haw",
2916
- "he",
2917
- "hi",
2918
- "hu",
2919
- "is",
2920
- "id",
2921
- "ja",
2922
- "jw",
2923
- "kn",
2924
- "kk",
2925
- "km",
2926
- "ko",
2927
- "lo",
2928
- "la",
2929
- "lv",
2930
- "ln",
2931
- "lt",
2932
- "lb",
2933
- "mk",
2934
- "mg",
2935
- "ms",
2936
- "ml",
2937
- "mt",
2938
- "mi",
2939
- "mr",
2940
- "mn",
2941
- "ne",
2942
- "no",
2943
- "nn",
2944
- "oc",
2945
- "pa",
2946
- "ps",
2947
- "fa",
2948
- "pl",
2949
- "ro",
2950
- "ru",
2951
- "sa",
2952
- "sr",
2953
- "sn",
2954
- "sd",
2955
- "si",
2956
- "sk",
2957
- "sl",
2958
- "so",
2959
- "su",
2960
- "sw",
2961
- "sv",
2962
- "tl",
2963
- "tg",
2964
- "ta",
2965
- "tt",
2966
- "te",
2967
- "th",
2968
- "bo",
2969
- "tr",
2970
- "tk",
2971
- "uk",
2972
- "ur",
2973
- "uz",
2974
- "vi",
2975
- "cy",
2976
- "yi",
2977
- "yo"
2978
- ]).describe(
2979
- "The language of your audio file. Possible values are found in [Supported Languages](https://www.assemblyai.com/docs/concepts/supported-languages).\nThe default value is 'en_us'.\n"
2980
- ).or(zod3.string()).optional().describe(
2981
- "The language of your audio file.\nPossible values are found in [Supported Languages](https://www.assemblyai.com/docs/concepts/supported-languages).\nThe default value is 'en_us'.\n"
2572
+ summarization: zod3.boolean().describe(
2573
+ "Whether [Summarization](https://www.assemblyai.com/docs/speech-understanding/summarization) is enabled, either true or false. Deprecated - use [LLM Gateway](https://www.assemblyai.com/docs/llm-gateway/overview) instead for more flexible summaries. See the [updated Summarization page](https://www.assemblyai.com/docs/speech-understanding/summarization) for details.\n\nNote: This parameter is only supported for the Universal-2 model.\n"
2982
2574
  ),
2983
- language_detection: zod3.boolean().nullish().describe(
2984
- "Whether [Automatic language detection](https://www.assemblyai.com/docs/models/speech-recognition#automatic-language-detection) is enabled, either true or false"
2575
+ summary: zod3.string().nullish().describe(
2576
+ "The generated summary of the media file, if [Summarization](https://www.assemblyai.com/docs/speech-understanding/summarization) is enabled. Deprecated - use [LLM Gateway](https://www.assemblyai.com/docs/llm-gateway/overview) instead for more flexible summaries. See the [updated Summarization page](https://www.assemblyai.com/docs/speech-understanding/summarization) for details."
2577
+ ),
2578
+ summary_model: zod3.string().nullish().describe(
2579
+ "The Summarization model used to generate the summary,\nif [Summarization](https://www.assemblyai.com/docs/speech-understanding/summarization#summary-models) is enabled. Deprecated - use [LLM Gateway](https://www.assemblyai.com/docs/llm-gateway/overview) instead for more flexible summaries. See the [updated Summarization page](https://www.assemblyai.com/docs/speech-understanding/summarization) for details.\n"
2985
2580
  ),
2986
- language_confidence_threshold: zod3.number().min(deleteTranscriptResponseLanguageConfidenceThresholdMin).max(deleteTranscriptResponseLanguageConfidenceThresholdMax).nullable().describe(
2987
- "The confidence threshold for the automatically detected language.\nAn error will be returned if the language confidence is below this threshold.\n"
2581
+ summary_type: zod3.string().nullish().describe(
2582
+ "The type of summary generated, if [Summarization](https://www.assemblyai.com/docs/speech-understanding/summarization#summary-types) is enabled. Deprecated - use [LLM Gateway](https://www.assemblyai.com/docs/llm-gateway/overview) instead for more flexible summaries. See the [updated Summarization page](https://www.assemblyai.com/docs/speech-understanding/summarization) for details."
2988
2583
  ),
2989
- language_confidence: zod3.number().min(deleteTranscriptResponseLanguageConfidenceMin).max(deleteTranscriptResponseLanguageConfidenceMax).nullable().describe(
2990
- "The confidence score for the detected language, between 0.0 (low confidence) and 1.0 (high confidence)"
2584
+ remove_audio_tags: zod3.enum(["all"]).describe(
2585
+ "Whether [audio event tags](https://www.assemblyai.com/docs/pre-recorded-audio/universal-3-pro#audio-event-tags) were removed from the transcript text.\n\nNote: This parameter is only supported for the Universal-3 Pro model.\n"
2586
+ ).or(zod3.null()).optional().describe(
2587
+ "Whether [audio event tags](https://www.assemblyai.com/docs/pre-recorded-audio/universal-3-pro#audio-event-tags) were removed from the transcript text.\n\nNote: This parameter is only supported for the Universal-3 Pro model.\n"
2991
2588
  ),
2992
- speech_model: zod3.enum(["best", "slam-1", "universal"]).describe("The speech model to use for the transcription.").or(zod3.null()).describe(
2993
- "The speech model used for the transcription. When `null`, the default model is used."
2589
+ temperature: zod3.number().nullish().describe(
2590
+ "The temperature that was used for the model's response. See the [Prompting Guide](https://www.assemblyai.com/docs/pre-recorded-audio/prompting) for more details.\n\nNote: This parameter can only be used with the Universal-3 Pro model.\n"
2994
2591
  ),
2995
2592
  text: zod3.string().nullish().describe("The textual transcript of your media file"),
2996
- words: zod3.array(
2997
- zod3.object({
2998
- confidence: zod3.number().min(deleteTranscriptResponseWordsItemConfidenceMin).max(deleteTranscriptResponseWordsItemConfidenceMax).describe("The confidence score for the transcript of this word"),
2999
- start: zod3.number().describe("The starting time, in milliseconds, for the word"),
3000
- end: zod3.number().describe("The ending time, in milliseconds, for the word"),
3001
- text: zod3.string().describe("The text of the word"),
3002
- channel: zod3.string().nullish().describe(
3003
- "The channel of the word. The left and right channels are channels 1 and 2. Additional channels increment the channel number sequentially."
3004
- ),
3005
- speaker: zod3.string().nullable().describe(
3006
- "The speaker of the word if [Speaker Diarization](https://www.assemblyai.com/docs/models/speaker-diarization) is enabled, else null"
3007
- )
3008
- })
3009
- ).nullish().describe(
3010
- "An array of temporally-sequential word objects, one for each word in the transcript.\nSee [Speech recognition](https://www.assemblyai.com/docs/models/speech-recognition) for more information.\n"
2593
+ throttled: zod3.boolean().nullish().describe(
2594
+ "True while a request is throttled and false when a request is no longer throttled"
3011
2595
  ),
3012
2596
  utterances: zod3.array(
3013
2597
  zod3.object({
3014
- confidence: zod3.number().min(deleteTranscriptResponseUtterancesItemConfidenceMin).max(deleteTranscriptResponseUtterancesItemConfidenceMax).describe("The confidence score for the transcript of this utterance"),
2598
+ confidence: zod3.number().describe("The confidence score for the transcript of this utterance"),
3015
2599
  start: zod3.number().describe("The starting time, in milliseconds, of the utterance in the audio file"),
3016
2600
  end: zod3.number().describe("The ending time, in milliseconds, of the utterance in the audio file"),
3017
2601
  text: zod3.string().describe("The text for this utterance"),
3018
2602
  words: zod3.array(
3019
2603
  zod3.object({
3020
- confidence: zod3.number().min(deleteTranscriptResponseUtterancesItemWordsItemConfidenceMin).max(deleteTranscriptResponseUtterancesItemWordsItemConfidenceMax).describe("The confidence score for the transcript of this word"),
2604
+ confidence: zod3.number().describe("The confidence score for the transcript of this word"),
3021
2605
  start: zod3.number().describe("The starting time, in milliseconds, for the word"),
3022
2606
  end: zod3.number().describe("The ending time, in milliseconds, for the word"),
3023
2607
  text: zod3.string().describe("The text of the word"),
@@ -3025,7 +2609,7 @@ var deleteTranscriptResponse = zod3.object({
3025
2609
  "The channel of the word. The left and right channels are channels 1 and 2. Additional channels increment the channel number sequentially."
3026
2610
  ),
3027
2611
  speaker: zod3.string().nullable().describe(
3028
- "The speaker of the word if [Speaker Diarization](https://www.assemblyai.com/docs/models/speaker-diarization) is enabled, else null"
2612
+ "The speaker of the word if [Speaker Diarization](https://www.assemblyai.com/docs/pre-recorded-audio/speaker-diarization) is enabled, else null"
3029
2613
  )
3030
2614
  })
3031
2615
  ).describe("The words in the utterance."),
@@ -3034,42 +2618,127 @@ var deleteTranscriptResponse = zod3.object({
3034
2618
  ),
3035
2619
  speaker: zod3.string().describe(
3036
2620
  'The speaker of this utterance, where each speaker is assigned a sequential capital letter - e.g. "A" for Speaker A, "B" for Speaker B, etc.'
2621
+ ),
2622
+ translated_texts: zod3.record(zod3.string(), zod3.string()).optional().describe(
2623
+ 'Translations keyed by language code (e.g., `{"es": "Texto traducido", "de": "\xDCbersetzter Text"}`). Only present when `match_original_utterance` is enabled with translation.'
3037
2624
  )
3038
2625
  })
3039
2626
  ).nullish().describe(
3040
- "When multichannel or speaker_labels is enabled, a list of turn-by-turn utterance objects.\nSee [Speaker diarization](https://www.assemblyai.com/docs/speech-to-text/speaker-diarization) and [Multichannel transcription](https://www.assemblyai.com/docs/speech-to-text/speech-recognition#multichannel-transcription) for more information.\n"
2627
+ "When multichannel or speaker_labels is enabled, a list of turn-by-turn utterance objects.\nSee [Speaker diarization](https://www.assemblyai.com/docs/pre-recorded-audio/speaker-diarization) and [Multichannel transcription](https://www.assemblyai.com/docs/pre-recorded-audio/multichannel) for more information.\n"
3041
2628
  ),
3042
- confidence: zod3.number().min(deleteTranscriptResponseConfidenceMin).max(deleteTranscriptResponseConfidenceMax).nullish().describe(
3043
- "The confidence score for the transcript, between 0.0 (low confidence) and 1.0 (high confidence)"
2629
+ webhook_auth: zod3.boolean().describe(
2630
+ "Whether [webhook](https://www.assemblyai.com/docs/deployment/webhooks-for-pre-recorded-audio) authentication details were provided"
3044
2631
  ),
3045
- audio_duration: zod3.number().nullish().describe("The duration of this transcript object's media file, in seconds"),
3046
- punctuate: zod3.boolean().nullish().describe("Whether Automatic Punctuation is enabled, either true or false"),
3047
- format_text: zod3.boolean().nullish().describe("Whether Text Formatting is enabled, either true or false"),
3048
- disfluencies: zod3.boolean().nullish().describe('Transcribe Filler Words, like "umm", in your media file; can be true or false'),
3049
- multichannel: zod3.boolean().nullish().describe(
3050
- "Whether [Multichannel transcription](https://www.assemblyai.com/docs/models/speech-recognition#multichannel-transcription) was enabled in the transcription request, either true or false"
2632
+ webhook_auth_header_name: zod3.string().nullish().describe(
2633
+ "The header name to be sent with the transcript completed or failed [webhook](https://www.assemblyai.com/docs/deployment/webhooks-for-pre-recorded-audio) requests"
3051
2634
  ),
3052
- audio_channels: zod3.number().optional().describe(
3053
- "The number of audio channels in the audio file. This is only present when multichannel is enabled."
2635
+ webhook_status_code: zod3.number().nullish().describe(
2636
+ "The status code we received from your server when delivering the transcript completed or failed [webhook](https://www.assemblyai.com/docs/deployment/webhooks-for-pre-recorded-audio) request, if a webhook URL was provided"
3054
2637
  ),
3055
2638
  webhook_url: zod3.string().nullish().describe(
3056
- "The URL to which we send webhook requests.\nWe sends two different types of webhook requests.\nOne request when a transcript is completed or failed, and one request when the redacted audio is ready if redact_pii_audio is enabled.\n"
2639
+ "The URL to which we send [webhook](https://www.assemblyai.com/docs/deployment/webhooks-for-pre-recorded-audio) requests.\n"
3057
2640
  ),
3058
- webhook_status_code: zod3.number().nullish().describe(
3059
- "The status code we received from your server when delivering the transcript completed or failed webhook request, if a webhook URL was provided"
3060
- ),
3061
- webhook_auth: zod3.boolean().describe("Whether webhook authentication details were provided"),
3062
- webhook_auth_header_name: zod3.string().nullish().describe(
3063
- "The header name to be sent with the transcript completed or failed webhook requests"
2641
+ words: zod3.array(
2642
+ zod3.object({
2643
+ confidence: zod3.number().describe("The confidence score for the transcript of this word"),
2644
+ start: zod3.number().describe("The starting time, in milliseconds, for the word"),
2645
+ end: zod3.number().describe("The ending time, in milliseconds, for the word"),
2646
+ text: zod3.string().describe("The text of the word"),
2647
+ channel: zod3.string().nullish().describe(
2648
+ "The channel of the word. The left and right channels are channels 1 and 2. Additional channels increment the channel number sequentially."
2649
+ ),
2650
+ speaker: zod3.string().nullable().describe(
2651
+ "The speaker of the word if [Speaker Diarization](https://www.assemblyai.com/docs/pre-recorded-audio/speaker-diarization) is enabled, else null"
2652
+ )
2653
+ })
2654
+ ).nullish().describe(
2655
+ "An array of temporally-sequential word objects, one for each word in the transcript.\n"
2656
+ ),
2657
+ acoustic_model: zod3.string().describe("This parameter does not currently have any functionality attached to it."),
2658
+ custom_topics: zod3.boolean().nullish().describe("This parameter does not currently have any functionality attached to it."),
2659
+ language_model: zod3.string().describe("This parameter does not currently have any functionality attached to it."),
2660
+ speech_model: zod3.string().describe(
2661
+ "The speech model to use for the transcription. See [Model Selection](https://www.assemblyai.com/docs/pre-recorded-audio/select-the-speech-model) for available models."
2662
+ ).or(zod3.null()).describe(
2663
+ "This parameter has been replaced with the `speech_models` parameter, learn more about the `speech_models` parameter [here](https://www.assemblyai.com/docs/pre-recorded-audio/select-the-speech-model).\n"
2664
+ ),
2665
+ speed_boost: zod3.boolean().nullish().describe("This parameter does not currently have any functionality attached to it."),
2666
+ topics: zod3.array(zod3.string()).optional().describe("This parameter does not currently have any functionality attached to it."),
2667
+ translated_texts: zod3.object({
2668
+ language_code: zod3.string().optional().describe("Translated text for this language code")
2669
+ }).optional().describe(
2670
+ "Translated text keyed by language code. See [Translation](https://www.assemblyai.com/docs/speech-understanding/translation) for more details."
2671
+ )
2672
+ }).describe("A transcript object");
2673
+ var listTranscriptsQueryLimitDefault = 10;
2674
+ var listTranscriptsQueryParams = zod3.object({
2675
+ limit: zod3.number().default(listTranscriptsQueryLimitDefault).describe("Maximum amount of transcripts to retrieve"),
2676
+ status: zod3.enum(["queued", "processing", "completed", "error"]).optional().describe("Filter by transcript status"),
2677
+ created_on: zod3.string().date().optional().describe("Only get transcripts created on this date"),
2678
+ before_id: zod3.string().uuid().optional().describe("Get transcripts that were created before this transcript ID"),
2679
+ after_id: zod3.string().uuid().optional().describe("Get transcripts that were created after this transcript ID"),
2680
+ throttled_only: zod3.boolean().optional().describe("Only get throttled transcripts, overrides the status filter")
2681
+ });
2682
+ var listTranscriptsResponse = zod3.object({
2683
+ page_details: zod3.object({
2684
+ limit: zod3.number().describe("The number of results this page is limited to"),
2685
+ result_count: zod3.number().describe("The actual number of results in the page"),
2686
+ current_url: zod3.string().describe("The URL used to retrieve the current page of transcripts"),
2687
+ prev_url: zod3.string().nullable().describe(
2688
+ "The URL to the next page of transcripts. The previous URL always points to a page with older transcripts."
2689
+ ),
2690
+ next_url: zod3.string().nullable().describe(
2691
+ "The URL to the next page of transcripts. The next URL always points to a page with newer transcripts."
2692
+ )
2693
+ }).describe(
2694
+ "Details of the transcript page. Transcripts are sorted from newest to oldest. The previous URL always points to a page with older transcripts."
3064
2695
  ),
3065
- speed_boost: zod3.boolean().nullish().describe("Whether speed boost is enabled"),
3066
- auto_highlights: zod3.boolean().describe("Whether Key Phrases is enabled, either true or false"),
3067
- auto_highlights_result: zod3.object({
3068
- status: zod3.enum(["success", "unavailable"]).describe("Either success, or unavailable in the rare case that the model failed"),
3069
- results: zod3.array(
3070
- zod3.object({
3071
- count: zod3.number().describe("The total number of times the key phrase appears in the audio file"),
3072
- rank: zod3.number().min(deleteTranscriptResponseAutoHighlightsResultResultsItemRankMin).max(deleteTranscriptResponseAutoHighlightsResultResultsItemRankMax).describe(
2696
+ transcripts: zod3.array(
2697
+ zod3.object({
2698
+ id: zod3.string().uuid().describe("The unique identifier for the transcript"),
2699
+ resource_url: zod3.string().describe("The URL to retrieve the transcript"),
2700
+ status: zod3.enum(["queued", "processing", "completed", "error"]).describe(
2701
+ "The status of your transcript. Possible values are queued, processing, completed, or error."
2702
+ ),
2703
+ created: zod3.string().datetime({}).describe("The date and time the transcript was created"),
2704
+ completed: zod3.string().datetime({}).optional().describe("The date and time the transcript was completed"),
2705
+ audio_url: zod3.string().describe("The URL to the audio file"),
2706
+ error: zod3.string().nullable().describe("Error message of why the transcript failed")
2707
+ })
2708
+ ).describe("An array of transcripts")
2709
+ }).describe(
2710
+ "A list of transcripts. Transcripts are sorted from newest to oldest. The previous URL always points to a page with older transcripts."
2711
+ );
2712
+ var getTranscriptParams = zod3.object({
2713
+ transcript_id: zod3.string().describe("ID of the transcript")
2714
+ });
2715
+ var getTranscriptResponseLanguageDetectionOptionsFallbackLanguageDefault = "auto";
2716
+ var getTranscriptResponseLanguageDetectionOptionsCodeSwitchingConfidenceThresholdDefault = 0.3;
2717
+ var getTranscriptResponseSpeechUnderstandingRequestTranslationFormalDefault = true;
2718
+ var getTranscriptResponse = zod3.object({
2719
+ audio_channels: zod3.number().optional().describe(
2720
+ "The number of audio channels in the audio file. This is only present when [multichannel](https://www.assemblyai.com/docs/pre-recorded-audio/multichannel) is enabled."
2721
+ ),
2722
+ audio_duration: zod3.number().nullish().describe("The duration of this transcript object's media file, in seconds"),
2723
+ audio_end_at: zod3.number().nullish().describe(
2724
+ "The point in time, in milliseconds, in the file at which the transcription was terminated. See [Set the start and end of the transcript](https://www.assemblyai.com/docs/pre-recorded-audio/set-the-start-and-end-of-the-transcript) for more details."
2725
+ ),
2726
+ audio_start_from: zod3.number().nullish().describe(
2727
+ "The point in time, in milliseconds, in the file at which the transcription was started. See [Set the start and end of the transcript](https://www.assemblyai.com/docs/pre-recorded-audio/set-the-start-and-end-of-the-transcript) for more details."
2728
+ ),
2729
+ audio_url: zod3.string().describe("The URL of the media that was transcribed"),
2730
+ auto_chapters: zod3.boolean().nullish().describe(
2731
+ "Whether [Auto Chapters](https://www.assemblyai.com/docs/speech-understanding/auto-chapters) is enabled, can be true or false. Deprecated - use [LLM Gateway](https://www.assemblyai.com/docs/llm-gateway/overview) instead for more flexible chapter summaries. See the [updated Auto Chapters page](https://www.assemblyai.com/docs/speech-understanding/auto-chapters) for details.\n\nNote: This parameter is only supported for the Universal-2 model.\n"
2732
+ ),
2733
+ auto_highlights: zod3.boolean().describe(
2734
+ "Whether [Key Phrases](https://www.assemblyai.com/docs/speech-understanding/key-phrases) is enabled, either true or false"
2735
+ ),
2736
+ auto_highlights_result: zod3.object({
2737
+ status: zod3.enum(["success", "unavailable"]).describe("Either success, or unavailable in the rare case that the model failed"),
2738
+ results: zod3.array(
2739
+ zod3.object({
2740
+ count: zod3.number().describe("The total number of times the key phrase appears in the audio file"),
2741
+ rank: zod3.number().describe(
3073
2742
  "The total relevancy to the overall audio file of this key phrase - a greater number means more relevant"
3074
2743
  ),
3075
2744
  text: zod3.string().describe("The text itself of the key phrase"),
@@ -3082,93 +2751,28 @@ var deleteTranscriptResponse = zod3.object({
3082
2751
  })
3083
2752
  ).describe("A temporally-sequential array of Key Phrases")
3084
2753
  }).describe(
3085
- "An array of results for the Key Phrases model, if it is enabled.\nSee [Key phrases](https://www.assemblyai.com/docs/models/key-phrases) for more information.\n"
3086
- ).or(zod3.null()).optional().describe(
3087
- "An array of results for the Key Phrases model, if it is enabled.\nSee [Key Phrases](https://www.assemblyai.com/docs/models/key-phrases) for more information.\n"
3088
- ),
3089
- audio_start_from: zod3.number().nullish().describe(
3090
- "The point in time, in milliseconds, in the file at which the transcription was started"
3091
- ),
3092
- audio_end_at: zod3.number().nullish().describe(
3093
- "The point in time, in milliseconds, in the file at which the transcription was terminated"
3094
- ),
3095
- word_boost: zod3.array(zod3.string()).optional().describe("The list of custom vocabulary to boost transcription probability for"),
3096
- boost_param: zod3.string().nullish().describe("The word boost parameter value"),
3097
- filter_profanity: zod3.boolean().nullish().describe(
3098
- "Whether [Profanity Filtering](https://www.assemblyai.com/docs/models/speech-recognition#profanity-filtering) is enabled, either true or false"
3099
- ),
3100
- redact_pii: zod3.boolean().describe(
3101
- "Whether [PII Redaction](https://www.assemblyai.com/docs/models/pii-redaction) is enabled, either true or false"
3102
- ),
3103
- redact_pii_audio: zod3.boolean().nullish().describe(
3104
- "Whether a redacted version of the audio file was generated,\neither true or false. See [PII redaction](https://www.assemblyai.com/docs/models/pii-redaction) for more information.\n"
3105
- ),
3106
- redact_pii_audio_quality: zod3.enum(["mp3", "wav"]).describe(
3107
- "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."
2754
+ "An array of results for the Key Phrases model, if it is enabled.\nSee [Key phrases](https://www.assemblyai.com/docs/speech-understanding/key-phrases) for more information.\n"
3108
2755
  ).or(zod3.null()).optional().describe(
3109
- "The audio quality of the PII-redacted audio file, if redact_pii_audio is enabled.\nSee [PII redaction](https://www.assemblyai.com/docs/models/pii-redaction) for more information.\n"
2756
+ "An array of results for the Key Phrases model, if it is enabled.\nSee [Key Phrases](https://www.assemblyai.com/docs/speech-understanding/key-phrases) for more information.\n"
3110
2757
  ),
3111
- redact_pii_policies: zod3.array(
3112
- zod3.enum([
3113
- "account_number",
3114
- "banking_information",
3115
- "blood_type",
3116
- "credit_card_cvv",
3117
- "credit_card_expiration",
3118
- "credit_card_number",
3119
- "date",
3120
- "date_interval",
3121
- "date_of_birth",
3122
- "drivers_license",
3123
- "drug",
3124
- "duration",
3125
- "email_address",
3126
- "event",
3127
- "filename",
3128
- "gender_sexuality",
3129
- "healthcare_number",
3130
- "injury",
3131
- "ip_address",
3132
- "language",
3133
- "location",
3134
- "marital_status",
3135
- "medical_condition",
3136
- "medical_process",
3137
- "money_amount",
3138
- "nationality",
3139
- "number_sequence",
3140
- "occupation",
3141
- "organization",
3142
- "passport_number",
3143
- "password",
3144
- "person_age",
3145
- "person_name",
3146
- "phone_number",
3147
- "physical_attribute",
3148
- "political_affiliation",
3149
- "religion",
3150
- "statistics",
3151
- "time",
3152
- "url",
3153
- "us_social_security_number",
3154
- "username",
3155
- "vehicle_id",
3156
- "zodiac_sign"
3157
- ]).describe("The type of PII to redact")
2758
+ chapters: zod3.array(
2759
+ zod3.object({
2760
+ gist: zod3.string().describe(
2761
+ "An ultra-short summary (just a few words) of the content spoken in the chapter"
2762
+ ),
2763
+ headline: zod3.string().describe("A single sentence summary of the content spoken during the chapter"),
2764
+ summary: zod3.string().describe("A one paragraph summary of the content spoken during the chapter"),
2765
+ start: zod3.number().describe("The starting time, in milliseconds, for the chapter"),
2766
+ end: zod3.number().describe("The starting time, in milliseconds, for the chapter")
2767
+ }).describe("Chapter of the audio file")
3158
2768
  ).nullish().describe(
3159
- "The list of PII Redaction policies that were enabled, if PII Redaction is enabled.\nSee [PII redaction](https://www.assemblyai.com/docs/models/pii-redaction) for more information.\n"
2769
+ "An array of temporally sequential chapters for the audio file. See [Auto Chapters](https://www.assemblyai.com/docs/speech-understanding/auto-chapters) for more information."
3160
2770
  ),
3161
- redact_pii_sub: zod3.enum(["entity_name", "hash"]).optional().describe(
3162
- 'The replacement logic for detected PII, can be "entity_name" or "hash". See [PII redaction](https://www.assemblyai.com/docs/models/pii-redaction) for more details.'
3163
- ),
3164
- speaker_labels: zod3.boolean().nullish().describe(
3165
- "Whether [Speaker diarization](https://www.assemblyai.com/docs/models/speaker-diarization) is enabled, can be true or false"
3166
- ),
3167
- speakers_expected: zod3.number().nullish().describe(
3168
- "Tell the speaker label model how many speakers it should attempt to identify. See [Speaker diarization](https://www.assemblyai.com/docs/models/speaker-diarization) for more details."
2771
+ confidence: zod3.number().nullish().describe(
2772
+ "The confidence score for the transcript, between 0.0 (low confidence) and 1.0 (high confidence)"
3169
2773
  ),
3170
2774
  content_safety: zod3.boolean().nullish().describe(
3171
- "Whether [Content Moderation](https://www.assemblyai.com/docs/models/content-moderation) is enabled, can be true or false"
2775
+ "Whether [Content Moderation](https://www.assemblyai.com/docs/content-moderation) is enabled, can be true or false"
3172
2776
  ),
3173
2777
  content_safety_labels: zod3.object({
3174
2778
  status: zod3.enum(["success", "unavailable"]).describe("Either success, or unavailable in the rare case that the model failed"),
@@ -3178,16 +2782,8 @@ var deleteTranscriptResponse = zod3.object({
3178
2782
  labels: zod3.array(
3179
2783
  zod3.object({
3180
2784
  label: zod3.string().describe("The label of the sensitive topic"),
3181
- confidence: zod3.number().min(
3182
- deleteTranscriptResponseContentSafetyLabelsResultsItemLabelsItemConfidenceMin
3183
- ).max(
3184
- deleteTranscriptResponseContentSafetyLabelsResultsItemLabelsItemConfidenceMax
3185
- ).describe("The confidence score for the topic being discussed, from 0 to 1"),
3186
- severity: zod3.number().min(
3187
- deleteTranscriptResponseContentSafetyLabelsResultsItemLabelsItemSeverityMin
3188
- ).max(
3189
- deleteTranscriptResponseContentSafetyLabelsResultsItemLabelsItemSeverityMax
3190
- ).describe("How severely the topic is discussed in the section, from 0 to 1")
2785
+ confidence: zod3.number().describe("The confidence score for the topic being discussed, from 0 to 1"),
2786
+ severity: zod3.number().describe("How severely the topic is discussed in the section, from 0 to 1")
3191
2787
  })
3192
2788
  ).describe(
3193
2789
  "An array of safety labels, one per sensitive topic that was detected in the section"
@@ -3200,31 +2796,111 @@ var deleteTranscriptResponse = zod3.object({
3200
2796
  }).describe("Timestamp containing a start and end property in milliseconds")
3201
2797
  })
3202
2798
  ).describe("An array of results for the Content Moderation model"),
3203
- summary: zod3.record(
3204
- zod3.string(),
3205
- zod3.number().min(deleteTranscriptResponseContentSafetyLabelsSummaryMinOne).max(deleteTranscriptResponseContentSafetyLabelsSummaryMaxOne).describe(
3206
- 'A confidence score for the presence of the sensitive topic "topic" across the entire audio file'
3207
- )
3208
- ).describe(
2799
+ summary: zod3.record(zod3.string(), zod3.number()).describe(
3209
2800
  "A summary of the Content Moderation confidence results for the entire audio file"
3210
2801
  ),
3211
2802
  severity_score_summary: zod3.record(
3212
2803
  zod3.string(),
3213
2804
  zod3.object({
3214
- low: zod3.number().min(deleteTranscriptResponseContentSafetyLabelsSeverityScoreSummaryLowMin).max(deleteTranscriptResponseContentSafetyLabelsSeverityScoreSummaryLowMax),
3215
- medium: zod3.number().min(deleteTranscriptResponseContentSafetyLabelsSeverityScoreSummaryMediumMin).max(deleteTranscriptResponseContentSafetyLabelsSeverityScoreSummaryMediumMax),
3216
- high: zod3.number().min(deleteTranscriptResponseContentSafetyLabelsSeverityScoreSummaryHighMin).max(deleteTranscriptResponseContentSafetyLabelsSeverityScoreSummaryHighMax)
2805
+ low: zod3.number(),
2806
+ medium: zod3.number(),
2807
+ high: zod3.number()
3217
2808
  })
3218
2809
  ).describe(
3219
2810
  "A summary of the Content Moderation severity results for the entire audio file"
3220
2811
  )
3221
2812
  }).describe(
3222
- "An array of results for the Content Moderation model, if it is enabled.\nSee [Content moderation](https://www.assemblyai.com/docs/models/content-moderation) for more information.\n"
2813
+ "An array of results for the Content Moderation model, if it is enabled.\nSee [Content moderation](https://www.assemblyai.com/docs/content-moderation) for more information.\n"
3223
2814
  ).or(zod3.null()).optional().describe(
3224
- "An array of results for the Content Moderation model, if it is enabled.\nSee [Content moderation](https://www.assemblyai.com/docs/models/content-moderation) for more information.\n"
2815
+ "An array of results for the Content Moderation model, if it is enabled.\nSee [Content moderation](https://www.assemblyai.com/docs/content-moderation) for more information.\n"
2816
+ ),
2817
+ custom_spelling: zod3.array(
2818
+ zod3.object({
2819
+ from: zod3.array(zod3.string()).describe("Words or phrases to replace"),
2820
+ to: zod3.string().describe("Word to replace with")
2821
+ }).describe(
2822
+ "Object containing words or phrases to replace, and the word or phrase to replace with"
2823
+ )
2824
+ ).nullish().describe(
2825
+ "Customize how words are spelled and formatted using to and from values. See [Custom Spelling](https://www.assemblyai.com/docs/pre-recorded-audio/custom-spelling) for more details."
2826
+ ),
2827
+ disfluencies: zod3.boolean().nullish().describe(
2828
+ 'Transcribe [Filler Words](https://www.assemblyai.com/docs/pre-recorded-audio/filler-words), like "umm", in your media file; can be true or false'
2829
+ ),
2830
+ domain: zod3.string().nullish().describe(
2831
+ 'The domain-specific model applied to the transcript. When set to `"medical-v1"`, [Medical Mode](https://www.assemblyai.com/docs/pre-recorded-audio/medical-mode) was used to improve accuracy for medical terminology.\n'
2832
+ ),
2833
+ entities: zod3.array(
2834
+ zod3.object({
2835
+ entity_type: zod3.enum([
2836
+ "account_number",
2837
+ "banking_information",
2838
+ "blood_type",
2839
+ "credit_card_cvv",
2840
+ "credit_card_expiration",
2841
+ "credit_card_number",
2842
+ "date",
2843
+ "date_interval",
2844
+ "date_of_birth",
2845
+ "drivers_license",
2846
+ "drug",
2847
+ "duration",
2848
+ "email_address",
2849
+ "event",
2850
+ "filename",
2851
+ "gender_sexuality",
2852
+ "healthcare_number",
2853
+ "injury",
2854
+ "ip_address",
2855
+ "language",
2856
+ "location",
2857
+ "marital_status",
2858
+ "medical_condition",
2859
+ "medical_process",
2860
+ "money_amount",
2861
+ "nationality",
2862
+ "number_sequence",
2863
+ "occupation",
2864
+ "organization",
2865
+ "passport_number",
2866
+ "password",
2867
+ "person_age",
2868
+ "person_name",
2869
+ "phone_number",
2870
+ "physical_attribute",
2871
+ "political_affiliation",
2872
+ "religion",
2873
+ "statistics",
2874
+ "time",
2875
+ "url",
2876
+ "us_social_security_number",
2877
+ "username",
2878
+ "vehicle_id",
2879
+ "zodiac_sign"
2880
+ ]).describe("The type of entity for the detected entity"),
2881
+ text: zod3.string().describe("The text for the detected entity"),
2882
+ start: zod3.number().describe(
2883
+ "The starting time, in milliseconds, at which the detected entity appears in the audio file"
2884
+ ),
2885
+ end: zod3.number().describe(
2886
+ "The ending time, in milliseconds, for the detected entity in the audio file"
2887
+ )
2888
+ }).describe("A detected entity")
2889
+ ).nullish().describe(
2890
+ "An array of results for the Entity Detection model, if it is enabled.\nSee [Entity detection](https://www.assemblyai.com/docs/speech-understanding/entity-detection) for more information.\n"
2891
+ ),
2892
+ entity_detection: zod3.boolean().nullish().describe(
2893
+ "Whether [Entity Detection](https://www.assemblyai.com/docs/speech-understanding/entity-detection) is enabled, can be true or false"
2894
+ ),
2895
+ error: zod3.string().optional().describe("Error message of why the transcript failed"),
2896
+ filter_profanity: zod3.boolean().nullish().describe(
2897
+ "Whether [Profanity Filtering](https://www.assemblyai.com/docs/profanity-filtering) is enabled, either true or false"
2898
+ ),
2899
+ format_text: zod3.boolean().nullish().describe(
2900
+ "Whether [Text Formatting](https://www.assemblyai.com/docs/pre-recorded-audio) is enabled, either true or false"
3225
2901
  ),
3226
2902
  iab_categories: zod3.boolean().nullish().describe(
3227
- "Whether [Topic Detection](https://www.assemblyai.com/docs/models/topic-detection) is enabled, can be true or false"
2903
+ "Whether [Topic Detection](https://www.assemblyai.com/docs/speech-understanding/topic-detection) is enabled, can be true or false"
3228
2904
  ),
3229
2905
  iab_categories_result: zod3.object({
3230
2906
  status: zod3.enum(["success", "unavailable"]).describe("Either success, or unavailable in the rare case that the model failed"),
@@ -3233,11 +2909,7 @@ var deleteTranscriptResponse = zod3.object({
3233
2909
  text: zod3.string().describe("The text in the transcript in which a detected topic occurs"),
3234
2910
  labels: zod3.array(
3235
2911
  zod3.object({
3236
- relevance: zod3.number().min(
3237
- deleteTranscriptResponseIabCategoriesResultResultsItemLabelsItemRelevanceMin
3238
- ).max(
3239
- deleteTranscriptResponseIabCategoriesResultResultsItemLabelsItemRelevanceMax
3240
- ).describe("How relevant the detected topic is of a detected topic"),
2912
+ relevance: zod3.number().describe("How relevant the detected topic is of a detected topic"),
3241
2913
  label: zod3.string().describe(
3242
2914
  "The IAB taxonomical label for the label of the detected topic, where > denotes supertopic/subtopic relationship"
3243
2915
  )
@@ -3249,57 +2921,1121 @@ var deleteTranscriptResponse = zod3.object({
3249
2921
  }).optional().describe("Timestamp containing a start and end property in milliseconds")
3250
2922
  }).describe("The result of the topic detection model")
3251
2923
  ).describe("An array of results for the Topic Detection model"),
3252
- summary: zod3.record(
3253
- zod3.string(),
3254
- zod3.number().min(deleteTranscriptResponseIabCategoriesResultSummaryMinOne).max(deleteTranscriptResponseIabCategoriesResultSummaryMaxOne)
3255
- ).describe("The overall relevance of topic to the entire audio file")
2924
+ summary: zod3.record(zod3.string(), zod3.number()).describe("The overall relevance of topic to the entire audio file")
3256
2925
  }).describe(
3257
- "The result of the Topic Detection model, if it is enabled.\nSee [Topic Detection](https://www.assemblyai.com/docs/models/topic-detection) for more information.\n"
2926
+ "The result of the Topic Detection model, if it is enabled.\nSee [Topic Detection](https://www.assemblyai.com/docs/speech-understanding/topic-detection) for more information.\n"
3258
2927
  ).or(zod3.null()).optional().describe(
3259
- "The result of the Topic Detection model, if it is enabled.\nSee [Topic Detection](https://www.assemblyai.com/docs/models/topic-detection) for more information.\n"
2928
+ "The result of the Topic Detection model, if it is enabled.\nSee [Topic Detection](https://www.assemblyai.com/docs/speech-understanding/topic-detection) for more information.\n"
3260
2929
  ),
3261
- custom_spelling: zod3.array(
3262
- zod3.object({
3263
- from: zod3.array(zod3.string().describe("Word or phrase to replace")).describe("Words or phrases to replace"),
3264
- to: zod3.string().describe("Word to replace with")
3265
- }).describe(
3266
- "Object containing words or phrases to replace, and the word or phrase to replace with"
3267
- )
3268
- ).nullish().describe("Customize how words are spelled and formatted using to and from values"),
2930
+ id: zod3.string().uuid().describe("The unique identifier of your transcript"),
3269
2931
  keyterms_prompt: zod3.array(zod3.string()).optional().describe(
3270
- "Improve accuracy with up to 1000 domain-specific words or phrases (maximum 6 words per phrase).\n"
3271
- ),
3272
- prompt: zod3.string().optional().describe("This parameter does not currently have any functionality attached to it."),
3273
- auto_chapters: zod3.boolean().nullish().describe(
3274
- "Whether [Auto Chapters](https://www.assemblyai.com/docs/models/auto-chapters) is enabled, can be true or false"
3275
- ),
3276
- chapters: zod3.array(
3277
- zod3.object({
3278
- gist: zod3.string().describe(
3279
- "An ultra-short summary (just a few words) of the content spoken in the chapter"
3280
- ),
3281
- headline: zod3.string().describe("A single sentence summary of the content spoken during the chapter"),
3282
- summary: zod3.string().describe("A one paragraph summary of the content spoken during the chapter"),
3283
- start: zod3.number().describe("The starting time, in milliseconds, for the chapter"),
3284
- end: zod3.number().describe("The starting time, in milliseconds, for the chapter")
3285
- }).describe("Chapter of the audio file")
3286
- ).nullish().describe("An array of temporally sequential chapters for the audio file"),
3287
- summarization: zod3.boolean().describe(
3288
- "Whether [Summarization](https://www.assemblyai.com/docs/models/summarization) is enabled, either true or false"
2932
+ "Improve accuracy with up to 200 (for Universal-2) or 1000 (for Universal-3 Pro) domain-specific words or phrases (maximum 6 words per phrase). See [Keyterms Prompting](https://www.assemblyai.com/docs/pre-recorded-audio/keyterms-prompting) for more details.\n"
3289
2933
  ),
3290
- summary_type: zod3.string().nullish().describe(
3291
- "The type of summary generated, if [Summarization](https://www.assemblyai.com/docs/models/summarization) is enabled"
3292
- ),
3293
- summary_model: zod3.string().nullish().describe(
3294
- "The Summarization model used to generate the summary,\nif [Summarization](https://www.assemblyai.com/docs/models/summarization) is enabled\n"
2934
+ language_code: zod3.enum([
2935
+ "en",
2936
+ "en_au",
2937
+ "en_uk",
2938
+ "en_us",
2939
+ "es",
2940
+ "fr",
2941
+ "de",
2942
+ "it",
2943
+ "pt",
2944
+ "nl",
2945
+ "af",
2946
+ "sq",
2947
+ "am",
2948
+ "ar",
2949
+ "hy",
2950
+ "as",
2951
+ "az",
2952
+ "ba",
2953
+ "eu",
2954
+ "be",
2955
+ "bn",
2956
+ "bs",
2957
+ "br",
2958
+ "bg",
2959
+ "my",
2960
+ "ca",
2961
+ "zh",
2962
+ "hr",
2963
+ "cs",
2964
+ "da",
2965
+ "et",
2966
+ "fo",
2967
+ "fi",
2968
+ "gl",
2969
+ "ka",
2970
+ "el",
2971
+ "gu",
2972
+ "ht",
2973
+ "ha",
2974
+ "haw",
2975
+ "he",
2976
+ "hi",
2977
+ "hu",
2978
+ "is",
2979
+ "id",
2980
+ "ja",
2981
+ "jw",
2982
+ "kn",
2983
+ "kk",
2984
+ "km",
2985
+ "ko",
2986
+ "lo",
2987
+ "la",
2988
+ "lv",
2989
+ "ln",
2990
+ "lt",
2991
+ "lb",
2992
+ "mk",
2993
+ "mg",
2994
+ "ms",
2995
+ "ml",
2996
+ "mt",
2997
+ "mi",
2998
+ "mr",
2999
+ "mn",
3000
+ "ne",
3001
+ "no",
3002
+ "nn",
3003
+ "oc",
3004
+ "pa",
3005
+ "ps",
3006
+ "fa",
3007
+ "pl",
3008
+ "ro",
3009
+ "ru",
3010
+ "sa",
3011
+ "sr",
3012
+ "sn",
3013
+ "sd",
3014
+ "si",
3015
+ "sk",
3016
+ "sl",
3017
+ "so",
3018
+ "su",
3019
+ "sw",
3020
+ "sv",
3021
+ "tl",
3022
+ "tg",
3023
+ "ta",
3024
+ "tt",
3025
+ "te",
3026
+ "th",
3027
+ "bo",
3028
+ "tr",
3029
+ "tk",
3030
+ "uk",
3031
+ "ur",
3032
+ "uz",
3033
+ "vi",
3034
+ "cy",
3035
+ "yi",
3036
+ "yo"
3037
+ ]).optional().describe(
3038
+ "The language of your audio file. Possible values are found in [Supported Languages](https://www.assemblyai.com/docs/pre-recorded-audio/supported-languages).\nThe default value is 'en_us'.\n"
3039
+ ),
3040
+ language_codes: zod3.array(
3041
+ zod3.enum([
3042
+ "en",
3043
+ "en_au",
3044
+ "en_uk",
3045
+ "en_us",
3046
+ "es",
3047
+ "fr",
3048
+ "de",
3049
+ "it",
3050
+ "pt",
3051
+ "nl",
3052
+ "af",
3053
+ "sq",
3054
+ "am",
3055
+ "ar",
3056
+ "hy",
3057
+ "as",
3058
+ "az",
3059
+ "ba",
3060
+ "eu",
3061
+ "be",
3062
+ "bn",
3063
+ "bs",
3064
+ "br",
3065
+ "bg",
3066
+ "my",
3067
+ "ca",
3068
+ "zh",
3069
+ "hr",
3070
+ "cs",
3071
+ "da",
3072
+ "et",
3073
+ "fo",
3074
+ "fi",
3075
+ "gl",
3076
+ "ka",
3077
+ "el",
3078
+ "gu",
3079
+ "ht",
3080
+ "ha",
3081
+ "haw",
3082
+ "he",
3083
+ "hi",
3084
+ "hu",
3085
+ "is",
3086
+ "id",
3087
+ "ja",
3088
+ "jw",
3089
+ "kn",
3090
+ "kk",
3091
+ "km",
3092
+ "ko",
3093
+ "lo",
3094
+ "la",
3095
+ "lv",
3096
+ "ln",
3097
+ "lt",
3098
+ "lb",
3099
+ "mk",
3100
+ "mg",
3101
+ "ms",
3102
+ "ml",
3103
+ "mt",
3104
+ "mi",
3105
+ "mr",
3106
+ "mn",
3107
+ "ne",
3108
+ "no",
3109
+ "nn",
3110
+ "oc",
3111
+ "pa",
3112
+ "ps",
3113
+ "fa",
3114
+ "pl",
3115
+ "ro",
3116
+ "ru",
3117
+ "sa",
3118
+ "sr",
3119
+ "sn",
3120
+ "sd",
3121
+ "si",
3122
+ "sk",
3123
+ "sl",
3124
+ "so",
3125
+ "su",
3126
+ "sw",
3127
+ "sv",
3128
+ "tl",
3129
+ "tg",
3130
+ "ta",
3131
+ "tt",
3132
+ "te",
3133
+ "th",
3134
+ "bo",
3135
+ "tr",
3136
+ "tk",
3137
+ "uk",
3138
+ "ur",
3139
+ "uz",
3140
+ "vi",
3141
+ "cy",
3142
+ "yi",
3143
+ "yo"
3144
+ ]).describe(
3145
+ "The language of your audio file. Possible values are found in [Supported Languages](https://www.assemblyai.com/docs/pre-recorded-audio/supported-languages).\nThe default value is 'en_us'.\n"
3146
+ )
3147
+ ).nullish().describe(
3148
+ "The language codes of your audio file. Used for [Code switching](/docs/speech-to-text/pre-recorded-audio/code-switching)\nOne of the values specified must be `en`.\n"
3149
+ ),
3150
+ language_confidence: zod3.number().nullable().describe(
3151
+ "The confidence score for the detected language, between 0.0 (low confidence) and 1.0 (high confidence). See [Automatic Language Detection](https://www.assemblyai.com/docs/pre-recorded-audio/language-detection) for more details."
3152
+ ),
3153
+ language_confidence_threshold: zod3.number().nullable().describe(
3154
+ "The confidence threshold for the automatically detected language.\nAn error will be returned if the language confidence is below this threshold.\nSee [Automatic Language Detection](https://www.assemblyai.com/docs/pre-recorded-audio/language-detection) for more details.\n"
3155
+ ),
3156
+ language_detection: zod3.boolean().nullish().describe(
3157
+ "Whether [Automatic language detection](/docs/pre-recorded-audio/automatic-language-detection) is enabled, either true or false"
3158
+ ),
3159
+ language_detection_options: zod3.object({
3160
+ expected_languages: zod3.array(zod3.string()).optional().describe(
3161
+ 'List of languages expected in the audio file. Defaults to `["all"]` when unspecified. See [Automatic Language Detection](https://www.assemblyai.com/docs/pre-recorded-audio/language-detection) for more details.'
3162
+ ),
3163
+ fallback_language: zod3.string().default(getTranscriptResponseLanguageDetectionOptionsFallbackLanguageDefault).describe(
3164
+ 'If the detected language of the audio file is not in the list of expected languages, the `fallback_language` is used. Specify `["auto"]` to let our model choose the fallback language from `expected_languages` with the highest confidence score. See [Automatic Language Detection](https://www.assemblyai.com/docs/pre-recorded-audio/language-detection) for more details.\n'
3165
+ ),
3166
+ code_switching: zod3.boolean().optional().describe(
3167
+ "Whether [code switching](/docs/speech-to-text/pre-recorded-audio/code-switching) should be detected.\n"
3168
+ ),
3169
+ code_switching_confidence_threshold: zod3.number().default(
3170
+ getTranscriptResponseLanguageDetectionOptionsCodeSwitchingConfidenceThresholdDefault
3171
+ ).describe(
3172
+ "The confidence threshold for [code switching](/docs/speech-to-text/pre-recorded-audio/code-switching) detection. If the code switching confidence is below this threshold, the transcript will be processed in the language with the highest `language_detection_confidence` score.\n"
3173
+ )
3174
+ }).optional().describe(
3175
+ "Specify options for [Automatic Language Detection](https://www.assemblyai.com/docs/pre-recorded-audio/language-detection)."
3176
+ ),
3177
+ multichannel: zod3.boolean().nullish().describe(
3178
+ "Whether [Multichannel transcription](https://www.assemblyai.com/docs/pre-recorded-audio/multichannel) was enabled in the transcription request, either true or false"
3179
+ ),
3180
+ prompt: zod3.string().optional().describe(
3181
+ "Provide natural language prompting of up to 1,500 words of contextual information to the model. See the [Prompting Guide](https://www.assemblyai.com/docs/pre-recorded-audio/prompting) for best practices.\n\nNote: This parameter is only supported for the Universal-3 Pro model.\n"
3182
+ ),
3183
+ punctuate: zod3.boolean().nullish().describe(
3184
+ "Whether [Automatic Punctuation](https://www.assemblyai.com/docs/pre-recorded-audio) is enabled, either true or false"
3185
+ ),
3186
+ redact_pii: zod3.boolean().describe(
3187
+ "Whether [PII Redaction](https://www.assemblyai.com/docs/pii-redaction) is enabled, either true or false"
3188
+ ),
3189
+ redact_pii_audio: zod3.boolean().nullish().describe(
3190
+ "Whether a redacted version of the audio file was generated,\neither true or false. See [PII redaction](https://www.assemblyai.com/docs/pii-redaction#request-for-redacted-audio) for more information.\n"
3191
+ ),
3192
+ redact_pii_audio_options: zod3.object({
3193
+ return_redacted_no_speech_audio: zod3.boolean().optional().describe(
3194
+ "By default, audio redaction provides redacted audio URLs only when speech is detected. However, if your use-case specifically requires redacted audio files even for silent audio files without any dialogue, you can opt to receive these URLs by setting this parameter to `true`."
3195
+ ),
3196
+ override_audio_redaction_method: zod3.enum(["silence"]).optional().describe(
3197
+ "Specify the method used to redact audio. By default, redacted audio uses a beep sound. Set to `silence` to replace PII with silence instead of a beep."
3198
+ )
3199
+ }).optional().describe(
3200
+ "The options for PII-redacted audio, if redact_pii_audio is enabled.\nSee [PII redaction](https://www.assemblyai.com/docs/pii-redaction#request-for-redacted-audio) for more information.\n"
3201
+ ),
3202
+ redact_pii_audio_quality: zod3.enum(["mp3", "wav"]).describe(
3203
+ "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/pii-redaction#request-for-redacted-audio) for more details."
3204
+ ).or(zod3.null()).optional().describe(
3205
+ "The audio quality of the PII-redacted audio file, if redact_pii_audio is enabled.\nSee [PII redaction](https://www.assemblyai.com/docs/pii-redaction#request-for-redacted-audio) for more information.\n"
3206
+ ),
3207
+ redact_pii_policies: zod3.array(
3208
+ zod3.enum([
3209
+ "account_number",
3210
+ "banking_information",
3211
+ "blood_type",
3212
+ "credit_card_cvv",
3213
+ "credit_card_expiration",
3214
+ "credit_card_number",
3215
+ "date",
3216
+ "date_interval",
3217
+ "date_of_birth",
3218
+ "drivers_license",
3219
+ "drug",
3220
+ "duration",
3221
+ "email_address",
3222
+ "event",
3223
+ "filename",
3224
+ "gender_sexuality",
3225
+ "healthcare_number",
3226
+ "injury",
3227
+ "ip_address",
3228
+ "language",
3229
+ "location",
3230
+ "marital_status",
3231
+ "medical_condition",
3232
+ "medical_process",
3233
+ "money_amount",
3234
+ "nationality",
3235
+ "number_sequence",
3236
+ "occupation",
3237
+ "organization",
3238
+ "passport_number",
3239
+ "password",
3240
+ "person_age",
3241
+ "person_name",
3242
+ "phone_number",
3243
+ "physical_attribute",
3244
+ "political_affiliation",
3245
+ "religion",
3246
+ "statistics",
3247
+ "time",
3248
+ "url",
3249
+ "us_social_security_number",
3250
+ "username",
3251
+ "vehicle_id",
3252
+ "zodiac_sign"
3253
+ ]).describe("The type of PII to redact")
3254
+ ).nullish().describe(
3255
+ "The list of PII Redaction policies that were enabled, if PII Redaction is enabled.\nSee [PII redaction](https://www.assemblyai.com/docs/pii-redaction) for more information.\n"
3256
+ ),
3257
+ redact_pii_sub: zod3.enum(["entity_name", "hash"]).optional().describe(
3258
+ "The replacement logic for detected PII, can be `entity_name` or `hash`. See [PII redaction](https://www.assemblyai.com/docs/pii-redaction) for more details."
3259
+ ),
3260
+ sentiment_analysis: zod3.boolean().nullish().describe(
3261
+ "Whether [Sentiment Analysis](https://www.assemblyai.com/docs/speech-understanding/sentiment-analysis) is enabled, can be true or false"
3262
+ ),
3263
+ sentiment_analysis_results: zod3.array(
3264
+ zod3.object({
3265
+ text: zod3.string().describe("The transcript of the sentence"),
3266
+ start: zod3.number().describe("The starting time, in milliseconds, of the sentence"),
3267
+ end: zod3.number().describe("The ending time, in milliseconds, of the sentence"),
3268
+ sentiment: zod3.enum(["POSITIVE", "NEUTRAL", "NEGATIVE"]),
3269
+ confidence: zod3.number().describe(
3270
+ "The confidence score for the detected sentiment of the sentence, from 0 to 1"
3271
+ ),
3272
+ channel: zod3.string().nullish().describe(
3273
+ "The channel of this utterance. The left and right channels are channels 1 and 2. Additional channels increment the channel number sequentially."
3274
+ ),
3275
+ speaker: zod3.string().nullable().describe(
3276
+ "The speaker of the sentence if [Speaker Diarization](https://www.assemblyai.com/docs/pre-recorded-audio/speaker-diarization) is enabled, else null"
3277
+ )
3278
+ }).describe("The result of the Sentiment Analysis model")
3279
+ ).nullish().describe(
3280
+ "An array of results for the Sentiment Analysis model, if it is enabled.\nSee [Sentiment Analysis](https://www.assemblyai.com/docs/speech-understanding/sentiment-analysis) for more information.\n"
3281
+ ),
3282
+ speaker_labels: zod3.boolean().nullish().describe(
3283
+ "Whether [Speaker diarization](https://www.assemblyai.com/docs/pre-recorded-audio/speaker-diarization) is enabled, can be true or false"
3284
+ ),
3285
+ speakers_expected: zod3.number().nullish().describe(
3286
+ "Tell the speaker label model how many speakers it should attempt to identify. See [Set number of speakers expected](https://www.assemblyai.com/docs/pre-recorded-audio/speaker-diarization#set-number-of-speakers-expected) for more details."
3287
+ ),
3288
+ speech_model_used: zod3.string().optional().describe(
3289
+ "The speech model to use for the transcription. See [Model Selection](https://www.assemblyai.com/docs/pre-recorded-audio/select-the-speech-model) for available models."
3290
+ ),
3291
+ speech_models: zod3.array(
3292
+ zod3.string().describe(
3293
+ "The speech model to use for the transcription. See [Model Selection](https://www.assemblyai.com/docs/pre-recorded-audio/select-the-speech-model) for available models."
3294
+ )
3295
+ ).nullish().describe(
3296
+ "List multiple speech models in priority order, allowing our system to automatically route your audio to the best available option. See [Model Selection](https://www.assemblyai.com/docs/pre-recorded-audio/select-the-speech-model) for available models and routing behavior.\n"
3297
+ ),
3298
+ speech_threshold: zod3.number().nullish().describe(
3299
+ "Defaults to null. Reject audio files that contain less than this fraction of speech.\nValid values are in the range [0, 1] inclusive. See [Speech Threshold](https://www.assemblyai.com/docs/speech-threshold) for more details.\n"
3300
+ ),
3301
+ speech_understanding: zod3.object({
3302
+ request: zod3.object({
3303
+ translation: zod3.object({
3304
+ target_languages: zod3.array(zod3.string()).describe(
3305
+ 'List of target language codes (e.g., `["es", "de"]`). See [Translation](https://www.assemblyai.com/docs/speech-understanding/translation) for supported languages.'
3306
+ ),
3307
+ formal: zod3.boolean().default(getTranscriptResponseSpeechUnderstandingRequestTranslationFormalDefault).describe(
3308
+ "Use formal language style. See [Translation](https://www.assemblyai.com/docs/speech-understanding/translation) for more details."
3309
+ ),
3310
+ match_original_utterance: zod3.boolean().optional().describe(
3311
+ "When enabled with Speaker Labels, returns translated text in the utterances array. Each utterance will include a `translated_texts` key containing translations for each target language."
3312
+ )
3313
+ })
3314
+ }).describe(
3315
+ "Request body for [Translation](https://www.assemblyai.com/docs/speech-understanding/translation)."
3316
+ ).or(
3317
+ zod3.object({
3318
+ speaker_identification: zod3.object({
3319
+ speaker_type: zod3.enum(["role", "name"]).describe(
3320
+ "Type of speaker identification. See [Speaker Identification](https://www.assemblyai.com/docs/speech-understanding/speaker-identification) for details on each type."
3321
+ ),
3322
+ known_values: zod3.array(zod3.string()).optional().describe(
3323
+ 'Required if speaker_type is "role". Each value must be 35 characters or less.'
3324
+ ),
3325
+ speakers: zod3.array(
3326
+ zod3.object({
3327
+ role: zod3.string().optional().describe(
3328
+ 'The role of the speaker. Required when `speaker_type` is "role".'
3329
+ ),
3330
+ name: zod3.string().optional().describe(
3331
+ 'The name of the speaker. Required when `speaker_type` is "name".'
3332
+ ),
3333
+ description: zod3.string().optional().describe(
3334
+ "A description of the speaker to help the model identify them based on conversational context."
3335
+ )
3336
+ })
3337
+ ).optional().describe(
3338
+ "An array of speaker objects with metadata to improve identification accuracy. Each object should include a `role` or `name` (depending on `speaker_type`) and an optional `description` to help the model identify the speaker. You can also include any additional custom properties (e.g., `company`, `title`) to provide more context. Use this as an alternative to `known_values` when you want to provide additional context about each speaker."
3339
+ )
3340
+ })
3341
+ }).describe(
3342
+ "Request body for [Speaker Identification](https://www.assemblyai.com/docs/speech-understanding/speaker-identification)."
3343
+ )
3344
+ ).or(
3345
+ zod3.object({
3346
+ custom_formatting: zod3.object({
3347
+ date: zod3.string().optional().describe(
3348
+ 'Date format pattern (e.g., `"mm/dd/yyyy"`). See [Custom Formatting](https://www.assemblyai.com/docs/speech-understanding/custom-formatting) for more details.'
3349
+ ),
3350
+ phone_number: zod3.string().optional().describe(
3351
+ 'Phone number format pattern (e.g., `"(xxx)xxx-xxxx"`). See [Custom Formatting](https://www.assemblyai.com/docs/speech-understanding/custom-formatting) for more details.'
3352
+ ),
3353
+ email: zod3.string().optional().describe(
3354
+ 'Email format pattern (e.g., `"username@domain.com"`). See [Custom Formatting](https://www.assemblyai.com/docs/speech-understanding/custom-formatting) for more details.'
3355
+ )
3356
+ })
3357
+ }).describe(
3358
+ "Request body for [Custom Formatting](https://www.assemblyai.com/docs/speech-understanding/custom-formatting)."
3359
+ )
3360
+ ).optional(),
3361
+ response: zod3.object({
3362
+ translation: zod3.object({
3363
+ status: zod3.string().optional()
3364
+ }).optional()
3365
+ }).or(
3366
+ zod3.object({
3367
+ speaker_identification: zod3.object({
3368
+ mapping: zod3.record(zod3.string(), zod3.string()).optional().describe(
3369
+ 'A mapping of the original generic speaker labels (e.g., "A", "B") to the identified speaker names or roles.'
3370
+ ),
3371
+ status: zod3.string().optional()
3372
+ }).optional()
3373
+ })
3374
+ ).or(
3375
+ zod3.object({
3376
+ custom_formatting: zod3.object({
3377
+ mapping: zod3.record(zod3.string(), zod3.string()).optional(),
3378
+ formatted_text: zod3.string().optional()
3379
+ }).optional()
3380
+ })
3381
+ ).optional()
3382
+ }).optional().describe(
3383
+ "Speech understanding tasks like [Translation](https://www.assemblyai.com/docs/speech-understanding/translation), [Speaker Identification](https://www.assemblyai.com/docs/speech-understanding/speaker-identification), and [Custom Formatting](https://www.assemblyai.com/docs/speech-understanding/custom-formatting). See the task-specific docs for available options and configuration.\n"
3384
+ ),
3385
+ status: zod3.enum(["queued", "processing", "completed", "error"]).describe(
3386
+ "The status of your transcript. Possible values are queued, processing, completed, or error."
3387
+ ),
3388
+ summarization: zod3.boolean().describe(
3389
+ "Whether [Summarization](https://www.assemblyai.com/docs/speech-understanding/summarization) is enabled, either true or false. Deprecated - use [LLM Gateway](https://www.assemblyai.com/docs/llm-gateway/overview) instead for more flexible summaries. See the [updated Summarization page](https://www.assemblyai.com/docs/speech-understanding/summarization) for details.\n\nNote: This parameter is only supported for the Universal-2 model.\n"
3390
+ ),
3391
+ summary: zod3.string().nullish().describe(
3392
+ "The generated summary of the media file, if [Summarization](https://www.assemblyai.com/docs/speech-understanding/summarization) is enabled. Deprecated - use [LLM Gateway](https://www.assemblyai.com/docs/llm-gateway/overview) instead for more flexible summaries. See the [updated Summarization page](https://www.assemblyai.com/docs/speech-understanding/summarization) for details."
3393
+ ),
3394
+ summary_model: zod3.string().nullish().describe(
3395
+ "The Summarization model used to generate the summary,\nif [Summarization](https://www.assemblyai.com/docs/speech-understanding/summarization#summary-models) is enabled. Deprecated - use [LLM Gateway](https://www.assemblyai.com/docs/llm-gateway/overview) instead for more flexible summaries. See the [updated Summarization page](https://www.assemblyai.com/docs/speech-understanding/summarization) for details.\n"
3396
+ ),
3397
+ summary_type: zod3.string().nullish().describe(
3398
+ "The type of summary generated, if [Summarization](https://www.assemblyai.com/docs/speech-understanding/summarization#summary-types) is enabled. Deprecated - use [LLM Gateway](https://www.assemblyai.com/docs/llm-gateway/overview) instead for more flexible summaries. See the [updated Summarization page](https://www.assemblyai.com/docs/speech-understanding/summarization) for details."
3399
+ ),
3400
+ remove_audio_tags: zod3.enum(["all"]).describe(
3401
+ "Whether [audio event tags](https://www.assemblyai.com/docs/pre-recorded-audio/universal-3-pro#audio-event-tags) were removed from the transcript text.\n\nNote: This parameter is only supported for the Universal-3 Pro model.\n"
3402
+ ).or(zod3.null()).optional().describe(
3403
+ "Whether [audio event tags](https://www.assemblyai.com/docs/pre-recorded-audio/universal-3-pro#audio-event-tags) were removed from the transcript text.\n\nNote: This parameter is only supported for the Universal-3 Pro model.\n"
3404
+ ),
3405
+ temperature: zod3.number().nullish().describe(
3406
+ "The temperature that was used for the model's response. See the [Prompting Guide](https://www.assemblyai.com/docs/pre-recorded-audio/prompting) for more details.\n\nNote: This parameter can only be used with the Universal-3 Pro model.\n"
3407
+ ),
3408
+ text: zod3.string().nullish().describe("The textual transcript of your media file"),
3409
+ throttled: zod3.boolean().nullish().describe(
3410
+ "True while a request is throttled and false when a request is no longer throttled"
3411
+ ),
3412
+ utterances: zod3.array(
3413
+ zod3.object({
3414
+ confidence: zod3.number().describe("The confidence score for the transcript of this utterance"),
3415
+ start: zod3.number().describe("The starting time, in milliseconds, of the utterance in the audio file"),
3416
+ end: zod3.number().describe("The ending time, in milliseconds, of the utterance in the audio file"),
3417
+ text: zod3.string().describe("The text for this utterance"),
3418
+ words: zod3.array(
3419
+ zod3.object({
3420
+ confidence: zod3.number().describe("The confidence score for the transcript of this word"),
3421
+ start: zod3.number().describe("The starting time, in milliseconds, for the word"),
3422
+ end: zod3.number().describe("The ending time, in milliseconds, for the word"),
3423
+ text: zod3.string().describe("The text of the word"),
3424
+ channel: zod3.string().nullish().describe(
3425
+ "The channel of the word. The left and right channels are channels 1 and 2. Additional channels increment the channel number sequentially."
3426
+ ),
3427
+ speaker: zod3.string().nullable().describe(
3428
+ "The speaker of the word if [Speaker Diarization](https://www.assemblyai.com/docs/pre-recorded-audio/speaker-diarization) is enabled, else null"
3429
+ )
3430
+ })
3431
+ ).describe("The words in the utterance."),
3432
+ channel: zod3.string().nullish().describe(
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
+ speaker: zod3.string().describe(
3436
+ 'The speaker of this utterance, where each speaker is assigned a sequential capital letter - e.g. "A" for Speaker A, "B" for Speaker B, etc.'
3437
+ ),
3438
+ translated_texts: zod3.record(zod3.string(), zod3.string()).optional().describe(
3439
+ 'Translations keyed by language code (e.g., `{"es": "Texto traducido", "de": "\xDCbersetzter Text"}`). Only present when `match_original_utterance` is enabled with translation.'
3440
+ )
3441
+ })
3442
+ ).nullish().describe(
3443
+ "When multichannel or speaker_labels is enabled, a list of turn-by-turn utterance objects.\nSee [Speaker diarization](https://www.assemblyai.com/docs/pre-recorded-audio/speaker-diarization) and [Multichannel transcription](https://www.assemblyai.com/docs/pre-recorded-audio/multichannel) for more information.\n"
3444
+ ),
3445
+ webhook_auth: zod3.boolean().describe(
3446
+ "Whether [webhook](https://www.assemblyai.com/docs/deployment/webhooks-for-pre-recorded-audio) authentication details were provided"
3447
+ ),
3448
+ webhook_auth_header_name: zod3.string().nullish().describe(
3449
+ "The header name to be sent with the transcript completed or failed [webhook](https://www.assemblyai.com/docs/deployment/webhooks-for-pre-recorded-audio) requests"
3450
+ ),
3451
+ webhook_status_code: zod3.number().nullish().describe(
3452
+ "The status code we received from your server when delivering the transcript completed or failed [webhook](https://www.assemblyai.com/docs/deployment/webhooks-for-pre-recorded-audio) request, if a webhook URL was provided"
3453
+ ),
3454
+ webhook_url: zod3.string().nullish().describe(
3455
+ "The URL to which we send [webhook](https://www.assemblyai.com/docs/deployment/webhooks-for-pre-recorded-audio) requests.\n"
3456
+ ),
3457
+ words: zod3.array(
3458
+ zod3.object({
3459
+ confidence: zod3.number().describe("The confidence score for the transcript of this word"),
3460
+ start: zod3.number().describe("The starting time, in milliseconds, for the word"),
3461
+ end: zod3.number().describe("The ending time, in milliseconds, for the word"),
3462
+ text: zod3.string().describe("The text of the word"),
3463
+ channel: zod3.string().nullish().describe(
3464
+ "The channel of the word. The left and right channels are channels 1 and 2. Additional channels increment the channel number sequentially."
3465
+ ),
3466
+ speaker: zod3.string().nullable().describe(
3467
+ "The speaker of the word if [Speaker Diarization](https://www.assemblyai.com/docs/pre-recorded-audio/speaker-diarization) is enabled, else null"
3468
+ )
3469
+ })
3470
+ ).nullish().describe(
3471
+ "An array of temporally-sequential word objects, one for each word in the transcript.\n"
3472
+ ),
3473
+ acoustic_model: zod3.string().describe("This parameter does not currently have any functionality attached to it."),
3474
+ custom_topics: zod3.boolean().nullish().describe("This parameter does not currently have any functionality attached to it."),
3475
+ language_model: zod3.string().describe("This parameter does not currently have any functionality attached to it."),
3476
+ speech_model: zod3.string().describe(
3477
+ "The speech model to use for the transcription. See [Model Selection](https://www.assemblyai.com/docs/pre-recorded-audio/select-the-speech-model) for available models."
3478
+ ).or(zod3.null()).describe(
3479
+ "This parameter has been replaced with the `speech_models` parameter, learn more about the `speech_models` parameter [here](https://www.assemblyai.com/docs/pre-recorded-audio/select-the-speech-model).\n"
3480
+ ),
3481
+ speed_boost: zod3.boolean().nullish().describe("This parameter does not currently have any functionality attached to it."),
3482
+ topics: zod3.array(zod3.string()).optional().describe("This parameter does not currently have any functionality attached to it."),
3483
+ translated_texts: zod3.object({
3484
+ language_code: zod3.string().optional().describe("Translated text for this language code")
3485
+ }).optional().describe(
3486
+ "Translated text keyed by language code. See [Translation](https://www.assemblyai.com/docs/speech-understanding/translation) for more details."
3487
+ )
3488
+ }).describe("A transcript object");
3489
+ var deleteTranscriptParams = zod3.object({
3490
+ transcript_id: zod3.string().describe("ID of the transcript")
3491
+ });
3492
+ var deleteTranscriptResponseLanguageDetectionOptionsFallbackLanguageDefault = "auto";
3493
+ var deleteTranscriptResponseLanguageDetectionOptionsCodeSwitchingConfidenceThresholdDefault = 0.3;
3494
+ var deleteTranscriptResponseSpeechUnderstandingRequestTranslationFormalDefault = true;
3495
+ var deleteTranscriptResponse = zod3.object({
3496
+ audio_channels: zod3.number().optional().describe(
3497
+ "The number of audio channels in the audio file. This is only present when [multichannel](https://www.assemblyai.com/docs/pre-recorded-audio/multichannel) is enabled."
3498
+ ),
3499
+ audio_duration: zod3.number().nullish().describe("The duration of this transcript object's media file, in seconds"),
3500
+ audio_end_at: zod3.number().nullish().describe(
3501
+ "The point in time, in milliseconds, in the file at which the transcription was terminated. See [Set the start and end of the transcript](https://www.assemblyai.com/docs/pre-recorded-audio/set-the-start-and-end-of-the-transcript) for more details."
3502
+ ),
3503
+ audio_start_from: zod3.number().nullish().describe(
3504
+ "The point in time, in milliseconds, in the file at which the transcription was started. See [Set the start and end of the transcript](https://www.assemblyai.com/docs/pre-recorded-audio/set-the-start-and-end-of-the-transcript) for more details."
3505
+ ),
3506
+ audio_url: zod3.string().describe("The URL of the media that was transcribed"),
3507
+ auto_chapters: zod3.boolean().nullish().describe(
3508
+ "Whether [Auto Chapters](https://www.assemblyai.com/docs/speech-understanding/auto-chapters) is enabled, can be true or false. Deprecated - use [LLM Gateway](https://www.assemblyai.com/docs/llm-gateway/overview) instead for more flexible chapter summaries. See the [updated Auto Chapters page](https://www.assemblyai.com/docs/speech-understanding/auto-chapters) for details.\n\nNote: This parameter is only supported for the Universal-2 model.\n"
3509
+ ),
3510
+ auto_highlights: zod3.boolean().describe(
3511
+ "Whether [Key Phrases](https://www.assemblyai.com/docs/speech-understanding/key-phrases) is enabled, either true or false"
3512
+ ),
3513
+ auto_highlights_result: zod3.object({
3514
+ status: zod3.enum(["success", "unavailable"]).describe("Either success, or unavailable in the rare case that the model failed"),
3515
+ results: zod3.array(
3516
+ zod3.object({
3517
+ count: zod3.number().describe("The total number of times the key phrase appears in the audio file"),
3518
+ rank: zod3.number().describe(
3519
+ "The total relevancy to the overall audio file of this key phrase - a greater number means more relevant"
3520
+ ),
3521
+ text: zod3.string().describe("The text itself of the key phrase"),
3522
+ timestamps: zod3.array(
3523
+ zod3.object({
3524
+ start: zod3.number().describe("The start time in milliseconds"),
3525
+ end: zod3.number().describe("The end time in milliseconds")
3526
+ }).describe("Timestamp containing a start and end property in milliseconds")
3527
+ ).describe("The timestamp of the of the key phrase")
3528
+ })
3529
+ ).describe("A temporally-sequential array of Key Phrases")
3530
+ }).describe(
3531
+ "An array of results for the Key Phrases model, if it is enabled.\nSee [Key phrases](https://www.assemblyai.com/docs/speech-understanding/key-phrases) for more information.\n"
3532
+ ).or(zod3.null()).optional().describe(
3533
+ "An array of results for the Key Phrases model, if it is enabled.\nSee [Key Phrases](https://www.assemblyai.com/docs/speech-understanding/key-phrases) for more information.\n"
3534
+ ),
3535
+ chapters: zod3.array(
3536
+ zod3.object({
3537
+ gist: zod3.string().describe(
3538
+ "An ultra-short summary (just a few words) of the content spoken in the chapter"
3539
+ ),
3540
+ headline: zod3.string().describe("A single sentence summary of the content spoken during the chapter"),
3541
+ summary: zod3.string().describe("A one paragraph summary of the content spoken during the chapter"),
3542
+ start: zod3.number().describe("The starting time, in milliseconds, for the chapter"),
3543
+ end: zod3.number().describe("The starting time, in milliseconds, for the chapter")
3544
+ }).describe("Chapter of the audio file")
3545
+ ).nullish().describe(
3546
+ "An array of temporally sequential chapters for the audio file. See [Auto Chapters](https://www.assemblyai.com/docs/speech-understanding/auto-chapters) for more information."
3547
+ ),
3548
+ confidence: zod3.number().nullish().describe(
3549
+ "The confidence score for the transcript, between 0.0 (low confidence) and 1.0 (high confidence)"
3550
+ ),
3551
+ content_safety: zod3.boolean().nullish().describe(
3552
+ "Whether [Content Moderation](https://www.assemblyai.com/docs/content-moderation) is enabled, can be true or false"
3553
+ ),
3554
+ content_safety_labels: zod3.object({
3555
+ status: zod3.enum(["success", "unavailable"]).describe("Either success, or unavailable in the rare case that the model failed"),
3556
+ results: zod3.array(
3557
+ zod3.object({
3558
+ text: zod3.string().describe("The transcript of the section flagged by the Content Moderation model"),
3559
+ labels: zod3.array(
3560
+ zod3.object({
3561
+ label: zod3.string().describe("The label of the sensitive topic"),
3562
+ confidence: zod3.number().describe("The confidence score for the topic being discussed, from 0 to 1"),
3563
+ severity: zod3.number().describe("How severely the topic is discussed in the section, from 0 to 1")
3564
+ })
3565
+ ).describe(
3566
+ "An array of safety labels, one per sensitive topic that was detected in the section"
3567
+ ),
3568
+ sentences_idx_start: zod3.number().describe("The sentence index at which the section begins"),
3569
+ sentences_idx_end: zod3.number().describe("The sentence index at which the section ends"),
3570
+ timestamp: zod3.object({
3571
+ start: zod3.number().describe("The start time in milliseconds"),
3572
+ end: zod3.number().describe("The end time in milliseconds")
3573
+ }).describe("Timestamp containing a start and end property in milliseconds")
3574
+ })
3575
+ ).describe("An array of results for the Content Moderation model"),
3576
+ summary: zod3.record(zod3.string(), zod3.number()).describe(
3577
+ "A summary of the Content Moderation confidence results for the entire audio file"
3578
+ ),
3579
+ severity_score_summary: zod3.record(
3580
+ zod3.string(),
3581
+ zod3.object({
3582
+ low: zod3.number(),
3583
+ medium: zod3.number(),
3584
+ high: zod3.number()
3585
+ })
3586
+ ).describe(
3587
+ "A summary of the Content Moderation severity results for the entire audio file"
3588
+ )
3589
+ }).describe(
3590
+ "An array of results for the Content Moderation model, if it is enabled.\nSee [Content moderation](https://www.assemblyai.com/docs/content-moderation) for more information.\n"
3591
+ ).or(zod3.null()).optional().describe(
3592
+ "An array of results for the Content Moderation model, if it is enabled.\nSee [Content moderation](https://www.assemblyai.com/docs/content-moderation) for more information.\n"
3593
+ ),
3594
+ custom_spelling: zod3.array(
3595
+ zod3.object({
3596
+ from: zod3.array(zod3.string()).describe("Words or phrases to replace"),
3597
+ to: zod3.string().describe("Word to replace with")
3598
+ }).describe(
3599
+ "Object containing words or phrases to replace, and the word or phrase to replace with"
3600
+ )
3601
+ ).nullish().describe(
3602
+ "Customize how words are spelled and formatted using to and from values. See [Custom Spelling](https://www.assemblyai.com/docs/pre-recorded-audio/custom-spelling) for more details."
3603
+ ),
3604
+ disfluencies: zod3.boolean().nullish().describe(
3605
+ 'Transcribe [Filler Words](https://www.assemblyai.com/docs/pre-recorded-audio/filler-words), like "umm", in your media file; can be true or false'
3606
+ ),
3607
+ domain: zod3.string().nullish().describe(
3608
+ 'The domain-specific model applied to the transcript. When set to `"medical-v1"`, [Medical Mode](https://www.assemblyai.com/docs/pre-recorded-audio/medical-mode) was used to improve accuracy for medical terminology.\n'
3609
+ ),
3610
+ entities: zod3.array(
3611
+ zod3.object({
3612
+ entity_type: zod3.enum([
3613
+ "account_number",
3614
+ "banking_information",
3615
+ "blood_type",
3616
+ "credit_card_cvv",
3617
+ "credit_card_expiration",
3618
+ "credit_card_number",
3619
+ "date",
3620
+ "date_interval",
3621
+ "date_of_birth",
3622
+ "drivers_license",
3623
+ "drug",
3624
+ "duration",
3625
+ "email_address",
3626
+ "event",
3627
+ "filename",
3628
+ "gender_sexuality",
3629
+ "healthcare_number",
3630
+ "injury",
3631
+ "ip_address",
3632
+ "language",
3633
+ "location",
3634
+ "marital_status",
3635
+ "medical_condition",
3636
+ "medical_process",
3637
+ "money_amount",
3638
+ "nationality",
3639
+ "number_sequence",
3640
+ "occupation",
3641
+ "organization",
3642
+ "passport_number",
3643
+ "password",
3644
+ "person_age",
3645
+ "person_name",
3646
+ "phone_number",
3647
+ "physical_attribute",
3648
+ "political_affiliation",
3649
+ "religion",
3650
+ "statistics",
3651
+ "time",
3652
+ "url",
3653
+ "us_social_security_number",
3654
+ "username",
3655
+ "vehicle_id",
3656
+ "zodiac_sign"
3657
+ ]).describe("The type of entity for the detected entity"),
3658
+ text: zod3.string().describe("The text for the detected entity"),
3659
+ start: zod3.number().describe(
3660
+ "The starting time, in milliseconds, at which the detected entity appears in the audio file"
3661
+ ),
3662
+ end: zod3.number().describe(
3663
+ "The ending time, in milliseconds, for the detected entity in the audio file"
3664
+ )
3665
+ }).describe("A detected entity")
3666
+ ).nullish().describe(
3667
+ "An array of results for the Entity Detection model, if it is enabled.\nSee [Entity detection](https://www.assemblyai.com/docs/speech-understanding/entity-detection) for more information.\n"
3668
+ ),
3669
+ entity_detection: zod3.boolean().nullish().describe(
3670
+ "Whether [Entity Detection](https://www.assemblyai.com/docs/speech-understanding/entity-detection) is enabled, can be true or false"
3671
+ ),
3672
+ error: zod3.string().optional().describe("Error message of why the transcript failed"),
3673
+ filter_profanity: zod3.boolean().nullish().describe(
3674
+ "Whether [Profanity Filtering](https://www.assemblyai.com/docs/profanity-filtering) is enabled, either true or false"
3675
+ ),
3676
+ format_text: zod3.boolean().nullish().describe(
3677
+ "Whether [Text Formatting](https://www.assemblyai.com/docs/pre-recorded-audio) is enabled, either true or false"
3678
+ ),
3679
+ iab_categories: zod3.boolean().nullish().describe(
3680
+ "Whether [Topic Detection](https://www.assemblyai.com/docs/speech-understanding/topic-detection) is enabled, can be true or false"
3681
+ ),
3682
+ iab_categories_result: zod3.object({
3683
+ status: zod3.enum(["success", "unavailable"]).describe("Either success, or unavailable in the rare case that the model failed"),
3684
+ results: zod3.array(
3685
+ zod3.object({
3686
+ text: zod3.string().describe("The text in the transcript in which a detected topic occurs"),
3687
+ labels: zod3.array(
3688
+ zod3.object({
3689
+ relevance: zod3.number().describe("How relevant the detected topic is of a detected topic"),
3690
+ label: zod3.string().describe(
3691
+ "The IAB taxonomical label for the label of the detected topic, where > denotes supertopic/subtopic relationship"
3692
+ )
3693
+ })
3694
+ ).optional().describe("An array of detected topics in the text"),
3695
+ timestamp: zod3.object({
3696
+ start: zod3.number().describe("The start time in milliseconds"),
3697
+ end: zod3.number().describe("The end time in milliseconds")
3698
+ }).optional().describe("Timestamp containing a start and end property in milliseconds")
3699
+ }).describe("The result of the topic detection model")
3700
+ ).describe("An array of results for the Topic Detection model"),
3701
+ summary: zod3.record(zod3.string(), zod3.number()).describe("The overall relevance of topic to the entire audio file")
3702
+ }).describe(
3703
+ "The result of the Topic Detection model, if it is enabled.\nSee [Topic Detection](https://www.assemblyai.com/docs/speech-understanding/topic-detection) for more information.\n"
3704
+ ).or(zod3.null()).optional().describe(
3705
+ "The result of the Topic Detection model, if it is enabled.\nSee [Topic Detection](https://www.assemblyai.com/docs/speech-understanding/topic-detection) for more information.\n"
3706
+ ),
3707
+ id: zod3.string().uuid().describe("The unique identifier of your transcript"),
3708
+ keyterms_prompt: zod3.array(zod3.string()).optional().describe(
3709
+ "Improve accuracy with up to 200 (for Universal-2) or 1000 (for Universal-3 Pro) domain-specific words or phrases (maximum 6 words per phrase). See [Keyterms Prompting](https://www.assemblyai.com/docs/pre-recorded-audio/keyterms-prompting) for more details.\n"
3710
+ ),
3711
+ language_code: zod3.enum([
3712
+ "en",
3713
+ "en_au",
3714
+ "en_uk",
3715
+ "en_us",
3716
+ "es",
3717
+ "fr",
3718
+ "de",
3719
+ "it",
3720
+ "pt",
3721
+ "nl",
3722
+ "af",
3723
+ "sq",
3724
+ "am",
3725
+ "ar",
3726
+ "hy",
3727
+ "as",
3728
+ "az",
3729
+ "ba",
3730
+ "eu",
3731
+ "be",
3732
+ "bn",
3733
+ "bs",
3734
+ "br",
3735
+ "bg",
3736
+ "my",
3737
+ "ca",
3738
+ "zh",
3739
+ "hr",
3740
+ "cs",
3741
+ "da",
3742
+ "et",
3743
+ "fo",
3744
+ "fi",
3745
+ "gl",
3746
+ "ka",
3747
+ "el",
3748
+ "gu",
3749
+ "ht",
3750
+ "ha",
3751
+ "haw",
3752
+ "he",
3753
+ "hi",
3754
+ "hu",
3755
+ "is",
3756
+ "id",
3757
+ "ja",
3758
+ "jw",
3759
+ "kn",
3760
+ "kk",
3761
+ "km",
3762
+ "ko",
3763
+ "lo",
3764
+ "la",
3765
+ "lv",
3766
+ "ln",
3767
+ "lt",
3768
+ "lb",
3769
+ "mk",
3770
+ "mg",
3771
+ "ms",
3772
+ "ml",
3773
+ "mt",
3774
+ "mi",
3775
+ "mr",
3776
+ "mn",
3777
+ "ne",
3778
+ "no",
3779
+ "nn",
3780
+ "oc",
3781
+ "pa",
3782
+ "ps",
3783
+ "fa",
3784
+ "pl",
3785
+ "ro",
3786
+ "ru",
3787
+ "sa",
3788
+ "sr",
3789
+ "sn",
3790
+ "sd",
3791
+ "si",
3792
+ "sk",
3793
+ "sl",
3794
+ "so",
3795
+ "su",
3796
+ "sw",
3797
+ "sv",
3798
+ "tl",
3799
+ "tg",
3800
+ "ta",
3801
+ "tt",
3802
+ "te",
3803
+ "th",
3804
+ "bo",
3805
+ "tr",
3806
+ "tk",
3807
+ "uk",
3808
+ "ur",
3809
+ "uz",
3810
+ "vi",
3811
+ "cy",
3812
+ "yi",
3813
+ "yo"
3814
+ ]).optional().describe(
3815
+ "The language of your audio file. Possible values are found in [Supported Languages](https://www.assemblyai.com/docs/pre-recorded-audio/supported-languages).\nThe default value is 'en_us'.\n"
3816
+ ),
3817
+ language_codes: zod3.array(
3818
+ zod3.enum([
3819
+ "en",
3820
+ "en_au",
3821
+ "en_uk",
3822
+ "en_us",
3823
+ "es",
3824
+ "fr",
3825
+ "de",
3826
+ "it",
3827
+ "pt",
3828
+ "nl",
3829
+ "af",
3830
+ "sq",
3831
+ "am",
3832
+ "ar",
3833
+ "hy",
3834
+ "as",
3835
+ "az",
3836
+ "ba",
3837
+ "eu",
3838
+ "be",
3839
+ "bn",
3840
+ "bs",
3841
+ "br",
3842
+ "bg",
3843
+ "my",
3844
+ "ca",
3845
+ "zh",
3846
+ "hr",
3847
+ "cs",
3848
+ "da",
3849
+ "et",
3850
+ "fo",
3851
+ "fi",
3852
+ "gl",
3853
+ "ka",
3854
+ "el",
3855
+ "gu",
3856
+ "ht",
3857
+ "ha",
3858
+ "haw",
3859
+ "he",
3860
+ "hi",
3861
+ "hu",
3862
+ "is",
3863
+ "id",
3864
+ "ja",
3865
+ "jw",
3866
+ "kn",
3867
+ "kk",
3868
+ "km",
3869
+ "ko",
3870
+ "lo",
3871
+ "la",
3872
+ "lv",
3873
+ "ln",
3874
+ "lt",
3875
+ "lb",
3876
+ "mk",
3877
+ "mg",
3878
+ "ms",
3879
+ "ml",
3880
+ "mt",
3881
+ "mi",
3882
+ "mr",
3883
+ "mn",
3884
+ "ne",
3885
+ "no",
3886
+ "nn",
3887
+ "oc",
3888
+ "pa",
3889
+ "ps",
3890
+ "fa",
3891
+ "pl",
3892
+ "ro",
3893
+ "ru",
3894
+ "sa",
3895
+ "sr",
3896
+ "sn",
3897
+ "sd",
3898
+ "si",
3899
+ "sk",
3900
+ "sl",
3901
+ "so",
3902
+ "su",
3903
+ "sw",
3904
+ "sv",
3905
+ "tl",
3906
+ "tg",
3907
+ "ta",
3908
+ "tt",
3909
+ "te",
3910
+ "th",
3911
+ "bo",
3912
+ "tr",
3913
+ "tk",
3914
+ "uk",
3915
+ "ur",
3916
+ "uz",
3917
+ "vi",
3918
+ "cy",
3919
+ "yi",
3920
+ "yo"
3921
+ ]).describe(
3922
+ "The language of your audio file. Possible values are found in [Supported Languages](https://www.assemblyai.com/docs/pre-recorded-audio/supported-languages).\nThe default value is 'en_us'.\n"
3923
+ )
3924
+ ).nullish().describe(
3925
+ "The language codes of your audio file. Used for [Code switching](/docs/speech-to-text/pre-recorded-audio/code-switching)\nOne of the values specified must be `en`.\n"
3926
+ ),
3927
+ language_confidence: zod3.number().nullable().describe(
3928
+ "The confidence score for the detected language, between 0.0 (low confidence) and 1.0 (high confidence). See [Automatic Language Detection](https://www.assemblyai.com/docs/pre-recorded-audio/language-detection) for more details."
3929
+ ),
3930
+ language_confidence_threshold: zod3.number().nullable().describe(
3931
+ "The confidence threshold for the automatically detected language.\nAn error will be returned if the language confidence is below this threshold.\nSee [Automatic Language Detection](https://www.assemblyai.com/docs/pre-recorded-audio/language-detection) for more details.\n"
3932
+ ),
3933
+ language_detection: zod3.boolean().nullish().describe(
3934
+ "Whether [Automatic language detection](/docs/pre-recorded-audio/automatic-language-detection) is enabled, either true or false"
3935
+ ),
3936
+ language_detection_options: zod3.object({
3937
+ expected_languages: zod3.array(zod3.string()).optional().describe(
3938
+ 'List of languages expected in the audio file. Defaults to `["all"]` when unspecified. See [Automatic Language Detection](https://www.assemblyai.com/docs/pre-recorded-audio/language-detection) for more details.'
3939
+ ),
3940
+ fallback_language: zod3.string().default(deleteTranscriptResponseLanguageDetectionOptionsFallbackLanguageDefault).describe(
3941
+ 'If the detected language of the audio file is not in the list of expected languages, the `fallback_language` is used. Specify `["auto"]` to let our model choose the fallback language from `expected_languages` with the highest confidence score. See [Automatic Language Detection](https://www.assemblyai.com/docs/pre-recorded-audio/language-detection) for more details.\n'
3942
+ ),
3943
+ code_switching: zod3.boolean().optional().describe(
3944
+ "Whether [code switching](/docs/speech-to-text/pre-recorded-audio/code-switching) should be detected.\n"
3945
+ ),
3946
+ code_switching_confidence_threshold: zod3.number().default(
3947
+ deleteTranscriptResponseLanguageDetectionOptionsCodeSwitchingConfidenceThresholdDefault
3948
+ ).describe(
3949
+ "The confidence threshold for [code switching](/docs/speech-to-text/pre-recorded-audio/code-switching) detection. If the code switching confidence is below this threshold, the transcript will be processed in the language with the highest `language_detection_confidence` score.\n"
3950
+ )
3951
+ }).optional().describe(
3952
+ "Specify options for [Automatic Language Detection](https://www.assemblyai.com/docs/pre-recorded-audio/language-detection)."
3953
+ ),
3954
+ multichannel: zod3.boolean().nullish().describe(
3955
+ "Whether [Multichannel transcription](https://www.assemblyai.com/docs/pre-recorded-audio/multichannel) was enabled in the transcription request, either true or false"
3956
+ ),
3957
+ prompt: zod3.string().optional().describe(
3958
+ "Provide natural language prompting of up to 1,500 words of contextual information to the model. See the [Prompting Guide](https://www.assemblyai.com/docs/pre-recorded-audio/prompting) for best practices.\n\nNote: This parameter is only supported for the Universal-3 Pro model.\n"
3959
+ ),
3960
+ punctuate: zod3.boolean().nullish().describe(
3961
+ "Whether [Automatic Punctuation](https://www.assemblyai.com/docs/pre-recorded-audio) is enabled, either true or false"
3962
+ ),
3963
+ redact_pii: zod3.boolean().describe(
3964
+ "Whether [PII Redaction](https://www.assemblyai.com/docs/pii-redaction) is enabled, either true or false"
3965
+ ),
3966
+ redact_pii_audio: zod3.boolean().nullish().describe(
3967
+ "Whether a redacted version of the audio file was generated,\neither true or false. See [PII redaction](https://www.assemblyai.com/docs/pii-redaction#request-for-redacted-audio) for more information.\n"
3968
+ ),
3969
+ redact_pii_audio_options: zod3.object({
3970
+ return_redacted_no_speech_audio: zod3.boolean().optional().describe(
3971
+ "By default, audio redaction provides redacted audio URLs only when speech is detected. However, if your use-case specifically requires redacted audio files even for silent audio files without any dialogue, you can opt to receive these URLs by setting this parameter to `true`."
3972
+ ),
3973
+ override_audio_redaction_method: zod3.enum(["silence"]).optional().describe(
3974
+ "Specify the method used to redact audio. By default, redacted audio uses a beep sound. Set to `silence` to replace PII with silence instead of a beep."
3975
+ )
3976
+ }).optional().describe(
3977
+ "The options for PII-redacted audio, if redact_pii_audio is enabled.\nSee [PII redaction](https://www.assemblyai.com/docs/pii-redaction#request-for-redacted-audio) for more information.\n"
3978
+ ),
3979
+ redact_pii_audio_quality: zod3.enum(["mp3", "wav"]).describe(
3980
+ "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/pii-redaction#request-for-redacted-audio) for more details."
3981
+ ).or(zod3.null()).optional().describe(
3982
+ "The audio quality of the PII-redacted audio file, if redact_pii_audio is enabled.\nSee [PII redaction](https://www.assemblyai.com/docs/pii-redaction#request-for-redacted-audio) for more information.\n"
3983
+ ),
3984
+ redact_pii_policies: zod3.array(
3985
+ zod3.enum([
3986
+ "account_number",
3987
+ "banking_information",
3988
+ "blood_type",
3989
+ "credit_card_cvv",
3990
+ "credit_card_expiration",
3991
+ "credit_card_number",
3992
+ "date",
3993
+ "date_interval",
3994
+ "date_of_birth",
3995
+ "drivers_license",
3996
+ "drug",
3997
+ "duration",
3998
+ "email_address",
3999
+ "event",
4000
+ "filename",
4001
+ "gender_sexuality",
4002
+ "healthcare_number",
4003
+ "injury",
4004
+ "ip_address",
4005
+ "language",
4006
+ "location",
4007
+ "marital_status",
4008
+ "medical_condition",
4009
+ "medical_process",
4010
+ "money_amount",
4011
+ "nationality",
4012
+ "number_sequence",
4013
+ "occupation",
4014
+ "organization",
4015
+ "passport_number",
4016
+ "password",
4017
+ "person_age",
4018
+ "person_name",
4019
+ "phone_number",
4020
+ "physical_attribute",
4021
+ "political_affiliation",
4022
+ "religion",
4023
+ "statistics",
4024
+ "time",
4025
+ "url",
4026
+ "us_social_security_number",
4027
+ "username",
4028
+ "vehicle_id",
4029
+ "zodiac_sign"
4030
+ ]).describe("The type of PII to redact")
4031
+ ).nullish().describe(
4032
+ "The list of PII Redaction policies that were enabled, if PII Redaction is enabled.\nSee [PII redaction](https://www.assemblyai.com/docs/pii-redaction) for more information.\n"
3295
4033
  ),
3296
- summary: zod3.string().nullish().describe(
3297
- "The generated summary of the media file, if [Summarization](https://www.assemblyai.com/docs/models/summarization) is enabled"
4034
+ redact_pii_sub: zod3.enum(["entity_name", "hash"]).optional().describe(
4035
+ "The replacement logic for detected PII, can be `entity_name` or `hash`. See [PII redaction](https://www.assemblyai.com/docs/pii-redaction) for more details."
3298
4036
  ),
3299
- custom_topics: zod3.boolean().nullish().describe("Whether custom topics is enabled, either true or false"),
3300
- topics: zod3.array(zod3.string()).optional().describe("The list of custom topics provided if custom topics is enabled"),
3301
4037
  sentiment_analysis: zod3.boolean().nullish().describe(
3302
- "Whether [Sentiment Analysis](https://www.assemblyai.com/docs/models/sentiment-analysis) is enabled, can be true or false"
4038
+ "Whether [Sentiment Analysis](https://www.assemblyai.com/docs/speech-understanding/sentiment-analysis) is enabled, can be true or false"
3303
4039
  ),
3304
4040
  sentiment_analysis_results: zod3.array(
3305
4041
  zod3.object({
@@ -3307,120 +4043,242 @@ var deleteTranscriptResponse = zod3.object({
3307
4043
  start: zod3.number().describe("The starting time, in milliseconds, of the sentence"),
3308
4044
  end: zod3.number().describe("The ending time, in milliseconds, of the sentence"),
3309
4045
  sentiment: zod3.enum(["POSITIVE", "NEUTRAL", "NEGATIVE"]),
3310
- confidence: zod3.number().min(deleteTranscriptResponseSentimentAnalysisResultsItemConfidenceMin).max(deleteTranscriptResponseSentimentAnalysisResultsItemConfidenceMax).describe(
4046
+ confidence: zod3.number().describe(
3311
4047
  "The confidence score for the detected sentiment of the sentence, from 0 to 1"
3312
4048
  ),
3313
4049
  channel: zod3.string().nullish().describe(
3314
4050
  "The channel of this utterance. The left and right channels are channels 1 and 2. Additional channels increment the channel number sequentially."
3315
4051
  ),
3316
4052
  speaker: zod3.string().nullable().describe(
3317
- "The speaker of the sentence if [Speaker Diarization](https://www.assemblyai.com/docs/models/speaker-diarization) is enabled, else null"
4053
+ "The speaker of the sentence if [Speaker Diarization](https://www.assemblyai.com/docs/pre-recorded-audio/speaker-diarization) is enabled, else null"
3318
4054
  )
3319
4055
  }).describe("The result of the Sentiment Analysis model")
3320
4056
  ).nullish().describe(
3321
- "An array of results for the Sentiment Analysis model, if it is enabled.\nSee [Sentiment Analysis](https://www.assemblyai.com/docs/models/sentiment-analysis) for more information.\n"
4057
+ "An array of results for the Sentiment Analysis model, if it is enabled.\nSee [Sentiment Analysis](https://www.assemblyai.com/docs/speech-understanding/sentiment-analysis) for more information.\n"
3322
4058
  ),
3323
- entity_detection: zod3.boolean().nullish().describe(
3324
- "Whether [Entity Detection](https://www.assemblyai.com/docs/models/entity-detection) is enabled, can be true or false"
4059
+ speaker_labels: zod3.boolean().nullish().describe(
4060
+ "Whether [Speaker diarization](https://www.assemblyai.com/docs/pre-recorded-audio/speaker-diarization) is enabled, can be true or false"
3325
4061
  ),
3326
- entities: zod3.array(
4062
+ speakers_expected: zod3.number().nullish().describe(
4063
+ "Tell the speaker label model how many speakers it should attempt to identify. See [Set number of speakers expected](https://www.assemblyai.com/docs/pre-recorded-audio/speaker-diarization#set-number-of-speakers-expected) for more details."
4064
+ ),
4065
+ speech_model_used: zod3.string().optional().describe(
4066
+ "The speech model to use for the transcription. See [Model Selection](https://www.assemblyai.com/docs/pre-recorded-audio/select-the-speech-model) for available models."
4067
+ ),
4068
+ speech_models: zod3.array(
4069
+ zod3.string().describe(
4070
+ "The speech model to use for the transcription. See [Model Selection](https://www.assemblyai.com/docs/pre-recorded-audio/select-the-speech-model) for available models."
4071
+ )
4072
+ ).nullish().describe(
4073
+ "List multiple speech models in priority order, allowing our system to automatically route your audio to the best available option. See [Model Selection](https://www.assemblyai.com/docs/pre-recorded-audio/select-the-speech-model) for available models and routing behavior.\n"
4074
+ ),
4075
+ speech_threshold: zod3.number().nullish().describe(
4076
+ "Defaults to null. Reject audio files that contain less than this fraction of speech.\nValid values are in the range [0, 1] inclusive. See [Speech Threshold](https://www.assemblyai.com/docs/speech-threshold) for more details.\n"
4077
+ ),
4078
+ speech_understanding: zod3.object({
4079
+ request: zod3.object({
4080
+ translation: zod3.object({
4081
+ target_languages: zod3.array(zod3.string()).describe(
4082
+ 'List of target language codes (e.g., `["es", "de"]`). See [Translation](https://www.assemblyai.com/docs/speech-understanding/translation) for supported languages.'
4083
+ ),
4084
+ formal: zod3.boolean().default(deleteTranscriptResponseSpeechUnderstandingRequestTranslationFormalDefault).describe(
4085
+ "Use formal language style. See [Translation](https://www.assemblyai.com/docs/speech-understanding/translation) for more details."
4086
+ ),
4087
+ match_original_utterance: zod3.boolean().optional().describe(
4088
+ "When enabled with Speaker Labels, returns translated text in the utterances array. Each utterance will include a `translated_texts` key containing translations for each target language."
4089
+ )
4090
+ })
4091
+ }).describe(
4092
+ "Request body for [Translation](https://www.assemblyai.com/docs/speech-understanding/translation)."
4093
+ ).or(
4094
+ zod3.object({
4095
+ speaker_identification: zod3.object({
4096
+ speaker_type: zod3.enum(["role", "name"]).describe(
4097
+ "Type of speaker identification. See [Speaker Identification](https://www.assemblyai.com/docs/speech-understanding/speaker-identification) for details on each type."
4098
+ ),
4099
+ known_values: zod3.array(zod3.string()).optional().describe(
4100
+ 'Required if speaker_type is "role". Each value must be 35 characters or less.'
4101
+ ),
4102
+ speakers: zod3.array(
4103
+ zod3.object({
4104
+ role: zod3.string().optional().describe(
4105
+ 'The role of the speaker. Required when `speaker_type` is "role".'
4106
+ ),
4107
+ name: zod3.string().optional().describe(
4108
+ 'The name of the speaker. Required when `speaker_type` is "name".'
4109
+ ),
4110
+ description: zod3.string().optional().describe(
4111
+ "A description of the speaker to help the model identify them based on conversational context."
4112
+ )
4113
+ })
4114
+ ).optional().describe(
4115
+ "An array of speaker objects with metadata to improve identification accuracy. Each object should include a `role` or `name` (depending on `speaker_type`) and an optional `description` to help the model identify the speaker. You can also include any additional custom properties (e.g., `company`, `title`) to provide more context. Use this as an alternative to `known_values` when you want to provide additional context about each speaker."
4116
+ )
4117
+ })
4118
+ }).describe(
4119
+ "Request body for [Speaker Identification](https://www.assemblyai.com/docs/speech-understanding/speaker-identification)."
4120
+ )
4121
+ ).or(
4122
+ zod3.object({
4123
+ custom_formatting: zod3.object({
4124
+ date: zod3.string().optional().describe(
4125
+ 'Date format pattern (e.g., `"mm/dd/yyyy"`). See [Custom Formatting](https://www.assemblyai.com/docs/speech-understanding/custom-formatting) for more details.'
4126
+ ),
4127
+ phone_number: zod3.string().optional().describe(
4128
+ 'Phone number format pattern (e.g., `"(xxx)xxx-xxxx"`). See [Custom Formatting](https://www.assemblyai.com/docs/speech-understanding/custom-formatting) for more details.'
4129
+ ),
4130
+ email: zod3.string().optional().describe(
4131
+ 'Email format pattern (e.g., `"username@domain.com"`). See [Custom Formatting](https://www.assemblyai.com/docs/speech-understanding/custom-formatting) for more details.'
4132
+ )
4133
+ })
4134
+ }).describe(
4135
+ "Request body for [Custom Formatting](https://www.assemblyai.com/docs/speech-understanding/custom-formatting)."
4136
+ )
4137
+ ).optional(),
4138
+ response: zod3.object({
4139
+ translation: zod3.object({
4140
+ status: zod3.string().optional()
4141
+ }).optional()
4142
+ }).or(
4143
+ zod3.object({
4144
+ speaker_identification: zod3.object({
4145
+ mapping: zod3.record(zod3.string(), zod3.string()).optional().describe(
4146
+ 'A mapping of the original generic speaker labels (e.g., "A", "B") to the identified speaker names or roles.'
4147
+ ),
4148
+ status: zod3.string().optional()
4149
+ }).optional()
4150
+ })
4151
+ ).or(
4152
+ zod3.object({
4153
+ custom_formatting: zod3.object({
4154
+ mapping: zod3.record(zod3.string(), zod3.string()).optional(),
4155
+ formatted_text: zod3.string().optional()
4156
+ }).optional()
4157
+ })
4158
+ ).optional()
4159
+ }).optional().describe(
4160
+ "Speech understanding tasks like [Translation](https://www.assemblyai.com/docs/speech-understanding/translation), [Speaker Identification](https://www.assemblyai.com/docs/speech-understanding/speaker-identification), and [Custom Formatting](https://www.assemblyai.com/docs/speech-understanding/custom-formatting). See the task-specific docs for available options and configuration.\n"
4161
+ ),
4162
+ status: zod3.enum(["queued", "processing", "completed", "error"]).describe(
4163
+ "The status of your transcript. Possible values are queued, processing, completed, or error."
4164
+ ),
4165
+ summarization: zod3.boolean().describe(
4166
+ "Whether [Summarization](https://www.assemblyai.com/docs/speech-understanding/summarization) is enabled, either true or false. Deprecated - use [LLM Gateway](https://www.assemblyai.com/docs/llm-gateway/overview) instead for more flexible summaries. See the [updated Summarization page](https://www.assemblyai.com/docs/speech-understanding/summarization) for details.\n\nNote: This parameter is only supported for the Universal-2 model.\n"
4167
+ ),
4168
+ summary: zod3.string().nullish().describe(
4169
+ "The generated summary of the media file, if [Summarization](https://www.assemblyai.com/docs/speech-understanding/summarization) is enabled. Deprecated - use [LLM Gateway](https://www.assemblyai.com/docs/llm-gateway/overview) instead for more flexible summaries. See the [updated Summarization page](https://www.assemblyai.com/docs/speech-understanding/summarization) for details."
4170
+ ),
4171
+ summary_model: zod3.string().nullish().describe(
4172
+ "The Summarization model used to generate the summary,\nif [Summarization](https://www.assemblyai.com/docs/speech-understanding/summarization#summary-models) is enabled. Deprecated - use [LLM Gateway](https://www.assemblyai.com/docs/llm-gateway/overview) instead for more flexible summaries. See the [updated Summarization page](https://www.assemblyai.com/docs/speech-understanding/summarization) for details.\n"
4173
+ ),
4174
+ summary_type: zod3.string().nullish().describe(
4175
+ "The type of summary generated, if [Summarization](https://www.assemblyai.com/docs/speech-understanding/summarization#summary-types) is enabled. Deprecated - use [LLM Gateway](https://www.assemblyai.com/docs/llm-gateway/overview) instead for more flexible summaries. See the [updated Summarization page](https://www.assemblyai.com/docs/speech-understanding/summarization) for details."
4176
+ ),
4177
+ remove_audio_tags: zod3.enum(["all"]).describe(
4178
+ "Whether [audio event tags](https://www.assemblyai.com/docs/pre-recorded-audio/universal-3-pro#audio-event-tags) were removed from the transcript text.\n\nNote: This parameter is only supported for the Universal-3 Pro model.\n"
4179
+ ).or(zod3.null()).optional().describe(
4180
+ "Whether [audio event tags](https://www.assemblyai.com/docs/pre-recorded-audio/universal-3-pro#audio-event-tags) were removed from the transcript text.\n\nNote: This parameter is only supported for the Universal-3 Pro model.\n"
4181
+ ),
4182
+ temperature: zod3.number().nullish().describe(
4183
+ "The temperature that was used for the model's response. See the [Prompting Guide](https://www.assemblyai.com/docs/pre-recorded-audio/prompting) for more details.\n\nNote: This parameter can only be used with the Universal-3 Pro model.\n"
4184
+ ),
4185
+ text: zod3.string().nullish().describe("The textual transcript of your media file"),
4186
+ throttled: zod3.boolean().nullish().describe(
4187
+ "True while a request is throttled and false when a request is no longer throttled"
4188
+ ),
4189
+ utterances: zod3.array(
3327
4190
  zod3.object({
3328
- entity_type: zod3.enum([
3329
- "account_number",
3330
- "banking_information",
3331
- "blood_type",
3332
- "credit_card_cvv",
3333
- "credit_card_expiration",
3334
- "credit_card_number",
3335
- "date",
3336
- "date_interval",
3337
- "date_of_birth",
3338
- "drivers_license",
3339
- "drug",
3340
- "duration",
3341
- "email_address",
3342
- "event",
3343
- "filename",
3344
- "gender_sexuality",
3345
- "healthcare_number",
3346
- "injury",
3347
- "ip_address",
3348
- "language",
3349
- "location",
3350
- "marital_status",
3351
- "medical_condition",
3352
- "medical_process",
3353
- "money_amount",
3354
- "nationality",
3355
- "number_sequence",
3356
- "occupation",
3357
- "organization",
3358
- "passport_number",
3359
- "password",
3360
- "person_age",
3361
- "person_name",
3362
- "phone_number",
3363
- "physical_attribute",
3364
- "political_affiliation",
3365
- "religion",
3366
- "statistics",
3367
- "time",
3368
- "url",
3369
- "us_social_security_number",
3370
- "username",
3371
- "vehicle_id",
3372
- "zodiac_sign"
3373
- ]).describe("The type of entity for the detected entity"),
3374
- text: zod3.string().describe("The text for the detected entity"),
3375
- start: zod3.number().describe(
3376
- "The starting time, in milliseconds, at which the detected entity appears in the audio file"
4191
+ confidence: zod3.number().describe("The confidence score for the transcript of this utterance"),
4192
+ start: zod3.number().describe("The starting time, in milliseconds, of the utterance in the audio file"),
4193
+ end: zod3.number().describe("The ending time, in milliseconds, of the utterance in the audio file"),
4194
+ text: zod3.string().describe("The text for this utterance"),
4195
+ words: zod3.array(
4196
+ zod3.object({
4197
+ confidence: zod3.number().describe("The confidence score for the transcript of this word"),
4198
+ start: zod3.number().describe("The starting time, in milliseconds, for the word"),
4199
+ end: zod3.number().describe("The ending time, in milliseconds, for the word"),
4200
+ text: zod3.string().describe("The text of the word"),
4201
+ channel: zod3.string().nullish().describe(
4202
+ "The channel of the word. The left and right channels are channels 1 and 2. Additional channels increment the channel number sequentially."
4203
+ ),
4204
+ speaker: zod3.string().nullable().describe(
4205
+ "The speaker of the word if [Speaker Diarization](https://www.assemblyai.com/docs/pre-recorded-audio/speaker-diarization) is enabled, else null"
4206
+ )
4207
+ })
4208
+ ).describe("The words in the utterance."),
4209
+ channel: zod3.string().nullish().describe(
4210
+ "The channel of this utterance. The left and right channels are channels 1 and 2. Additional channels increment the channel number sequentially."
3377
4211
  ),
3378
- end: zod3.number().describe(
3379
- "The ending time, in milliseconds, for the detected entity in the audio file"
4212
+ speaker: zod3.string().describe(
4213
+ 'The speaker of this utterance, where each speaker is assigned a sequential capital letter - e.g. "A" for Speaker A, "B" for Speaker B, etc.'
4214
+ ),
4215
+ translated_texts: zod3.record(zod3.string(), zod3.string()).optional().describe(
4216
+ 'Translations keyed by language code (e.g., `{"es": "Texto traducido", "de": "\xDCbersetzter Text"}`). Only present when `match_original_utterance` is enabled with translation.'
3380
4217
  )
3381
- }).describe("A detected entity")
4218
+ })
3382
4219
  ).nullish().describe(
3383
- "An array of results for the Entity Detection model, if it is enabled.\nSee [Entity detection](https://www.assemblyai.com/docs/models/entity-detection) for more information.\n"
4220
+ "When multichannel or speaker_labels is enabled, a list of turn-by-turn utterance objects.\nSee [Speaker diarization](https://www.assemblyai.com/docs/pre-recorded-audio/speaker-diarization) and [Multichannel transcription](https://www.assemblyai.com/docs/pre-recorded-audio/multichannel) for more information.\n"
3384
4221
  ),
3385
- speech_threshold: zod3.number().min(deleteTranscriptResponseSpeechThresholdMin).max(deleteTranscriptResponseSpeechThresholdMax).nullish().describe(
3386
- "Defaults to null. Reject audio files that contain less than this fraction of speech.\nValid values are in the range [0, 1] inclusive.\n"
4222
+ webhook_auth: zod3.boolean().describe(
4223
+ "Whether [webhook](https://www.assemblyai.com/docs/deployment/webhooks-for-pre-recorded-audio) authentication details were provided"
3387
4224
  ),
3388
- throttled: zod3.boolean().nullish().describe(
3389
- "True while a request is throttled and false when a request is no longer throttled"
4225
+ webhook_auth_header_name: zod3.string().nullish().describe(
4226
+ "The header name to be sent with the transcript completed or failed [webhook](https://www.assemblyai.com/docs/deployment/webhooks-for-pre-recorded-audio) requests"
3390
4227
  ),
3391
- error: zod3.string().optional().describe("Error message of why the transcript failed"),
3392
- language_model: zod3.string().describe("The language model that was used for the transcript"),
3393
- acoustic_model: zod3.string().describe("The acoustic model that was used for the transcript")
4228
+ webhook_status_code: zod3.number().nullish().describe(
4229
+ "The status code we received from your server when delivering the transcript completed or failed [webhook](https://www.assemblyai.com/docs/deployment/webhooks-for-pre-recorded-audio) request, if a webhook URL was provided"
4230
+ ),
4231
+ webhook_url: zod3.string().nullish().describe(
4232
+ "The URL to which we send [webhook](https://www.assemblyai.com/docs/deployment/webhooks-for-pre-recorded-audio) requests.\n"
4233
+ ),
4234
+ words: zod3.array(
4235
+ zod3.object({
4236
+ confidence: zod3.number().describe("The confidence score for the transcript of this word"),
4237
+ start: zod3.number().describe("The starting time, in milliseconds, for the word"),
4238
+ end: zod3.number().describe("The ending time, in milliseconds, for the word"),
4239
+ text: zod3.string().describe("The text of the word"),
4240
+ channel: zod3.string().nullish().describe(
4241
+ "The channel of the word. The left and right channels are channels 1 and 2. Additional channels increment the channel number sequentially."
4242
+ ),
4243
+ speaker: zod3.string().nullable().describe(
4244
+ "The speaker of the word if [Speaker Diarization](https://www.assemblyai.com/docs/pre-recorded-audio/speaker-diarization) is enabled, else null"
4245
+ )
4246
+ })
4247
+ ).nullish().describe(
4248
+ "An array of temporally-sequential word objects, one for each word in the transcript.\n"
4249
+ ),
4250
+ acoustic_model: zod3.string().describe("This parameter does not currently have any functionality attached to it."),
4251
+ custom_topics: zod3.boolean().nullish().describe("This parameter does not currently have any functionality attached to it."),
4252
+ language_model: zod3.string().describe("This parameter does not currently have any functionality attached to it."),
4253
+ speech_model: zod3.string().describe(
4254
+ "The speech model to use for the transcription. See [Model Selection](https://www.assemblyai.com/docs/pre-recorded-audio/select-the-speech-model) for available models."
4255
+ ).or(zod3.null()).describe(
4256
+ "This parameter has been replaced with the `speech_models` parameter, learn more about the `speech_models` parameter [here](https://www.assemblyai.com/docs/pre-recorded-audio/select-the-speech-model).\n"
4257
+ ),
4258
+ speed_boost: zod3.boolean().nullish().describe("This parameter does not currently have any functionality attached to it."),
4259
+ topics: zod3.array(zod3.string()).optional().describe("This parameter does not currently have any functionality attached to it."),
4260
+ translated_texts: zod3.object({
4261
+ language_code: zod3.string().optional().describe("Translated text for this language code")
4262
+ }).optional().describe(
4263
+ "Translated text keyed by language code. See [Translation](https://www.assemblyai.com/docs/speech-understanding/translation) for more details."
4264
+ )
3394
4265
  }).describe("A transcript object");
3395
- var getSubtitlesParams = zod3.object({
3396
- transcript_id: zod3.string().describe("ID of the transcript"),
3397
- subtitle_format: zod3.enum(["srt", "vtt"]).describe("The format of the captions")
3398
- });
3399
- var getSubtitlesQueryParams = zod3.object({
3400
- chars_per_caption: zod3.number().optional().describe("The maximum number of characters per caption")
3401
- });
3402
4266
  var getTranscriptSentencesParams = zod3.object({
3403
4267
  transcript_id: zod3.string().describe("ID of the transcript")
3404
4268
  });
3405
- var getTranscriptSentencesResponseConfidenceMin = 0;
3406
- var getTranscriptSentencesResponseConfidenceMax = 1;
3407
- var getTranscriptSentencesResponseSentencesItemConfidenceMin = 0;
3408
- var getTranscriptSentencesResponseSentencesItemConfidenceMax = 1;
3409
- var getTranscriptSentencesResponseSentencesItemWordsItemConfidenceMin = 0;
3410
- var getTranscriptSentencesResponseSentencesItemWordsItemConfidenceMax = 1;
3411
4269
  var getTranscriptSentencesResponse = zod3.object({
3412
4270
  id: zod3.string().uuid().describe("The unique identifier for the transcript"),
3413
- confidence: zod3.number().min(getTranscriptSentencesResponseConfidenceMin).max(getTranscriptSentencesResponseConfidenceMax).describe("The confidence score for the transcript"),
4271
+ confidence: zod3.number().describe("The confidence score for the transcript"),
3414
4272
  audio_duration: zod3.number().describe("The duration of the audio file in seconds"),
3415
4273
  sentences: zod3.array(
3416
4274
  zod3.object({
3417
4275
  text: zod3.string().describe("The transcript of the sentence"),
3418
4276
  start: zod3.number().describe("The starting time, in milliseconds, for the sentence"),
3419
4277
  end: zod3.number().describe("The ending time, in milliseconds, for the sentence"),
3420
- confidence: zod3.number().min(getTranscriptSentencesResponseSentencesItemConfidenceMin).max(getTranscriptSentencesResponseSentencesItemConfidenceMax).describe("The confidence score for the transcript of this sentence"),
4278
+ confidence: zod3.number().describe("The confidence score for the transcript of this sentence"),
3421
4279
  words: zod3.array(
3422
4280
  zod3.object({
3423
- confidence: zod3.number().min(getTranscriptSentencesResponseSentencesItemWordsItemConfidenceMin).max(getTranscriptSentencesResponseSentencesItemWordsItemConfidenceMax).describe("The confidence score for the transcript of this word"),
4281
+ confidence: zod3.number().describe("The confidence score for the transcript of this word"),
3424
4282
  start: zod3.number().describe("The starting time, in milliseconds, for the word"),
3425
4283
  end: zod3.number().describe("The ending time, in milliseconds, for the word"),
3426
4284
  text: zod3.string().describe("The text of the word"),
@@ -3428,7 +4286,7 @@ var getTranscriptSentencesResponse = zod3.object({
3428
4286
  "The channel of the word. The left and right channels are channels 1 and 2. Additional channels increment the channel number sequentially."
3429
4287
  ),
3430
4288
  speaker: zod3.string().nullable().describe(
3431
- "The speaker of the word if [Speaker Diarization](https://www.assemblyai.com/docs/models/speaker-diarization) is enabled, else null"
4289
+ "The speaker of the word if [Speaker Diarization](https://www.assemblyai.com/docs/pre-recorded-audio/speaker-diarization) is enabled, else null"
3432
4290
  )
3433
4291
  })
3434
4292
  ).describe("An array of words in the sentence"),
@@ -3436,7 +4294,7 @@ var getTranscriptSentencesResponse = zod3.object({
3436
4294
  "The channel of the sentence. The left and right channels are channels 1 and 2. Additional channels increment the channel number sequentially."
3437
4295
  ),
3438
4296
  speaker: zod3.string().nullable().describe(
3439
- "The speaker of the sentence if [Speaker Diarization](https://www.assemblyai.com/docs/models/speaker-diarization) is enabled, else null"
4297
+ "The speaker of the sentence if [Speaker Diarization](https://www.assemblyai.com/docs/pre-recorded-audio/speaker-diarization) is enabled, else null"
3440
4298
  )
3441
4299
  })
3442
4300
  ).describe("An array of sentences in the transcript")
@@ -3444,25 +4302,19 @@ var getTranscriptSentencesResponse = zod3.object({
3444
4302
  var getTranscriptParagraphsParams = zod3.object({
3445
4303
  transcript_id: zod3.string().describe("ID of the transcript")
3446
4304
  });
3447
- var getTranscriptParagraphsResponseConfidenceMin = 0;
3448
- var getTranscriptParagraphsResponseConfidenceMax = 1;
3449
- var getTranscriptParagraphsResponseParagraphsItemConfidenceMin = 0;
3450
- var getTranscriptParagraphsResponseParagraphsItemConfidenceMax = 1;
3451
- var getTranscriptParagraphsResponseParagraphsItemWordsItemConfidenceMin = 0;
3452
- var getTranscriptParagraphsResponseParagraphsItemWordsItemConfidenceMax = 1;
3453
4305
  var getTranscriptParagraphsResponse = zod3.object({
3454
4306
  id: zod3.string().uuid().describe("The unique identifier of your transcript"),
3455
- confidence: zod3.number().min(getTranscriptParagraphsResponseConfidenceMin).max(getTranscriptParagraphsResponseConfidenceMax).describe("The confidence score for the transcript"),
4307
+ confidence: zod3.number().describe("The confidence score for the transcript"),
3456
4308
  audio_duration: zod3.number().describe("The duration of the audio file in seconds"),
3457
4309
  paragraphs: zod3.array(
3458
4310
  zod3.object({
3459
4311
  text: zod3.string().describe("The transcript of the paragraph"),
3460
4312
  start: zod3.number().describe("The starting time, in milliseconds, of the paragraph"),
3461
4313
  end: zod3.number().describe("The ending time, in milliseconds, of the paragraph"),
3462
- confidence: zod3.number().min(getTranscriptParagraphsResponseParagraphsItemConfidenceMin).max(getTranscriptParagraphsResponseParagraphsItemConfidenceMax).describe("The confidence score for the transcript of this paragraph"),
4314
+ confidence: zod3.number().describe("The confidence score for the transcript of this paragraph"),
3463
4315
  words: zod3.array(
3464
4316
  zod3.object({
3465
- confidence: zod3.number().min(getTranscriptParagraphsResponseParagraphsItemWordsItemConfidenceMin).max(getTranscriptParagraphsResponseParagraphsItemWordsItemConfidenceMax).describe("The confidence score for the transcript of this word"),
4317
+ confidence: zod3.number().describe("The confidence score for the transcript of this word"),
3466
4318
  start: zod3.number().describe("The starting time, in milliseconds, for the word"),
3467
4319
  end: zod3.number().describe("The ending time, in milliseconds, for the word"),
3468
4320
  text: zod3.string().describe("The text of the word"),
@@ -3470,13 +4322,28 @@ var getTranscriptParagraphsResponse = zod3.object({
3470
4322
  "The channel of the word. The left and right channels are channels 1 and 2. Additional channels increment the channel number sequentially."
3471
4323
  ),
3472
4324
  speaker: zod3.string().nullable().describe(
3473
- "The speaker of the word if [Speaker Diarization](https://www.assemblyai.com/docs/models/speaker-diarization) is enabled, else null"
4325
+ "The speaker of the word if [Speaker Diarization](https://www.assemblyai.com/docs/pre-recorded-audio/speaker-diarization) is enabled, else null"
3474
4326
  )
3475
4327
  })
3476
4328
  ).describe("An array of words in the paragraph")
3477
4329
  })
3478
4330
  ).describe("An array of paragraphs in the transcript")
3479
4331
  });
4332
+ var getSubtitlesParams = zod3.object({
4333
+ transcript_id: zod3.string().describe("ID of the transcript"),
4334
+ subtitle_format: zod3.enum(["srt", "vtt"]).describe("The format of the captions")
4335
+ });
4336
+ var getSubtitlesQueryParams = zod3.object({
4337
+ chars_per_caption: zod3.number().optional().describe("The maximum number of characters per caption")
4338
+ });
4339
+ var getSubtitlesResponse = zod3.object({});
4340
+ var getRedactedAudioParams = zod3.object({
4341
+ transcript_id: zod3.string().describe("ID of the transcript")
4342
+ });
4343
+ var getRedactedAudioResponse = zod3.object({
4344
+ status: zod3.enum(["redacted_audio_ready"]).describe("The status of the redacted audio"),
4345
+ redacted_audio_url: zod3.string().describe("The URL of the redacted audio file")
4346
+ });
3480
4347
  var wordSearchParams = zod3.object({
3481
4348
  transcript_id: zod3.string().describe("ID of the transcript")
3482
4349
  });
@@ -3493,7 +4360,7 @@ var wordSearchResponse = zod3.object({
3493
4360
  text: zod3.string().describe("The matched word"),
3494
4361
  count: zod3.number().describe("The total amount of times the word is in the transcript"),
3495
4362
  timestamps: zod3.array(
3496
- zod3.array(zod3.number().describe("Timestamp in milliseconds")).describe(
4363
+ zod3.array(zod3.number()).describe(
3497
4364
  "An array of timestamps structured as [`start_time`, `end_time`] in milliseconds"
3498
4365
  )
3499
4366
  ).describe("An array of timestamps"),
@@ -3503,199 +4370,6 @@ var wordSearchResponse = zod3.object({
3503
4370
  })
3504
4371
  ).describe("The matches of the search")
3505
4372
  });
3506
- var getRedactedAudioParams = zod3.object({
3507
- transcript_id: zod3.string().describe("ID of the transcript")
3508
- });
3509
- var getRedactedAudioResponse = zod3.object({
3510
- status: zod3.enum(["redacted_audio_ready"]).describe("The status of the redacted audio"),
3511
- redacted_audio_url: zod3.string().describe("The URL of the redacted audio file")
3512
- });
3513
- var createTemporaryTokenBodyExpiresInMin = 60;
3514
- var createTemporaryTokenBody = zod3.object({
3515
- expires_in: zod3.number().min(createTemporaryTokenBodyExpiresInMin).describe("The amount of time until the token expires in seconds")
3516
- });
3517
- var createTemporaryTokenResponse = zod3.object({
3518
- token: zod3.string().describe("The temporary authentication token for Streaming Speech-to-Text")
3519
- });
3520
- var lemurTaskBodyMaxOutputSizeDefault = 2e3;
3521
- var lemurTaskBodyTemperatureMin = 0;
3522
- var lemurTaskBodyTemperatureMax = 1;
3523
- var lemurTaskBody = zod3.object({
3524
- prompt: zod3.string().describe(
3525
- "Your text to prompt the model to produce a desired output, including any context you want to pass into the model."
3526
- )
3527
- }).and(
3528
- zod3.object({
3529
- transcript_ids: zod3.array(zod3.string().uuid()).optional().describe(
3530
- "A list of completed transcripts with text. Up to a maximum of 100 hours of audio.\nUse either transcript_ids or input_text as input into LeMUR.\n"
3531
- ),
3532
- input_text: zod3.string().optional().describe(
3533
- "Custom formatted transcript data. Maximum size is the context limit of the selected model.\nUse either transcript_ids or input_text as input into LeMUR.\n"
3534
- ),
3535
- context: zod3.string().or(zod3.record(zod3.string(), zod3.any())).optional().describe("Context to provide the model. This can be a string or a free-form JSON value."),
3536
- final_model: zod3.enum([
3537
- "anthropic/claude-3-5-sonnet",
3538
- "anthropic/claude-3-opus",
3539
- "anthropic/claude-3-haiku"
3540
- ]).describe("The model that is used for the final prompt after compression is performed.\n").or(zod3.string()).describe("The model that is used for the final prompt after compression is performed.\n"),
3541
- max_output_size: zod3.number().default(lemurTaskBodyMaxOutputSizeDefault).describe("Max output size in tokens."),
3542
- temperature: zod3.number().min(lemurTaskBodyTemperatureMin).max(lemurTaskBodyTemperatureMax).optional().describe(
3543
- "The temperature to use for the model.\nHigher values result in answers that are more creative, lower values are more conservative.\nCan be any value between 0.0 and 1.0 inclusive.\n"
3544
- )
3545
- })
3546
- );
3547
- var lemurTaskResponseUsageInputTokensMin = 0;
3548
- var lemurTaskResponseUsageOutputTokensMin = 0;
3549
- var lemurTaskResponse = zod3.object({
3550
- response: zod3.string().describe("The response generated by LeMUR.")
3551
- }).and(
3552
- zod3.object({
3553
- request_id: zod3.string().uuid().describe("The ID of the LeMUR request"),
3554
- usage: zod3.object({
3555
- input_tokens: zod3.number().min(lemurTaskResponseUsageInputTokensMin).describe("The number of input tokens used by the model"),
3556
- output_tokens: zod3.number().min(lemurTaskResponseUsageOutputTokensMin).describe("The number of output tokens generated by the model")
3557
- }).describe("The usage numbers for the LeMUR request")
3558
- })
3559
- );
3560
- var lemurSummaryBodyMaxOutputSizeDefault = 2e3;
3561
- var lemurSummaryBodyTemperatureMin = 0;
3562
- var lemurSummaryBodyTemperatureMax = 1;
3563
- var lemurSummaryBody = zod3.object({
3564
- transcript_ids: zod3.array(zod3.string().uuid()).optional().describe(
3565
- "A list of completed transcripts with text. Up to a maximum of 100 hours of audio.\nUse either transcript_ids or input_text as input into LeMUR.\n"
3566
- ),
3567
- input_text: zod3.string().optional().describe(
3568
- "Custom formatted transcript data. Maximum size is the context limit of the selected model.\nUse either transcript_ids or input_text as input into LeMUR.\n"
3569
- ),
3570
- context: zod3.string().or(zod3.record(zod3.string(), zod3.any())).optional().describe("Context to provide the model. This can be a string or a free-form JSON value."),
3571
- final_model: zod3.enum(["anthropic/claude-3-5-sonnet", "anthropic/claude-3-opus", "anthropic/claude-3-haiku"]).describe("The model that is used for the final prompt after compression is performed.\n").or(zod3.string()).describe("The model that is used for the final prompt after compression is performed.\n"),
3572
- max_output_size: zod3.number().default(lemurSummaryBodyMaxOutputSizeDefault).describe("Max output size in tokens."),
3573
- temperature: zod3.number().min(lemurSummaryBodyTemperatureMin).max(lemurSummaryBodyTemperatureMax).optional().describe(
3574
- "The temperature to use for the model.\nHigher values result in answers that are more creative, lower values are more conservative.\nCan be any value between 0.0 and 1.0 inclusive.\n"
3575
- )
3576
- }).and(
3577
- zod3.object({
3578
- answer_format: zod3.string().optional().describe(
3579
- 'How you want the summary to be returned. This can be any text. Examples: "TLDR", "bullet points"\n'
3580
- )
3581
- })
3582
- );
3583
- var lemurSummaryResponseUsageInputTokensMin = 0;
3584
- var lemurSummaryResponseUsageOutputTokensMin = 0;
3585
- var lemurSummaryResponse = zod3.object({
3586
- response: zod3.string().describe("The response generated by LeMUR.")
3587
- }).and(
3588
- zod3.object({
3589
- request_id: zod3.string().uuid().describe("The ID of the LeMUR request"),
3590
- usage: zod3.object({
3591
- input_tokens: zod3.number().min(lemurSummaryResponseUsageInputTokensMin).describe("The number of input tokens used by the model"),
3592
- output_tokens: zod3.number().min(lemurSummaryResponseUsageOutputTokensMin).describe("The number of output tokens generated by the model")
3593
- }).describe("The usage numbers for the LeMUR request")
3594
- })
3595
- );
3596
- var lemurQuestionAnswerBodyMaxOutputSizeDefault = 2e3;
3597
- var lemurQuestionAnswerBodyTemperatureMin = 0;
3598
- var lemurQuestionAnswerBodyTemperatureMax = 1;
3599
- var lemurQuestionAnswerBody = zod3.object({
3600
- transcript_ids: zod3.array(zod3.string().uuid()).optional().describe(
3601
- "A list of completed transcripts with text. Up to a maximum of 100 hours of audio.\nUse either transcript_ids or input_text as input into LeMUR.\n"
3602
- ),
3603
- input_text: zod3.string().optional().describe(
3604
- "Custom formatted transcript data. Maximum size is the context limit of the selected model.\nUse either transcript_ids or input_text as input into LeMUR.\n"
3605
- ),
3606
- context: zod3.string().or(zod3.record(zod3.string(), zod3.any())).optional().describe("Context to provide the model. This can be a string or a free-form JSON value."),
3607
- final_model: zod3.enum(["anthropic/claude-3-5-sonnet", "anthropic/claude-3-opus", "anthropic/claude-3-haiku"]).describe("The model that is used for the final prompt after compression is performed.\n").or(zod3.string()).describe("The model that is used for the final prompt after compression is performed.\n"),
3608
- max_output_size: zod3.number().default(lemurQuestionAnswerBodyMaxOutputSizeDefault).describe("Max output size in tokens."),
3609
- temperature: zod3.number().min(lemurQuestionAnswerBodyTemperatureMin).max(lemurQuestionAnswerBodyTemperatureMax).optional().describe(
3610
- "The temperature to use for the model.\nHigher values result in answers that are more creative, lower values are more conservative.\nCan be any value between 0.0 and 1.0 inclusive.\n"
3611
- )
3612
- }).and(
3613
- zod3.object({
3614
- questions: zod3.array(
3615
- zod3.object({
3616
- question: zod3.string().describe(
3617
- "The question you wish to ask. For more complex questions use default model."
3618
- ),
3619
- context: zod3.string().or(zod3.record(zod3.string(), zod3.any())).optional().describe(
3620
- "Any context about the transcripts you wish to provide. This can be a string or any object."
3621
- ),
3622
- answer_format: zod3.string().optional().describe(
3623
- `How you want the answer to be returned. This can be any text. Can't be used with answer_options. Examples: "short sentence", "bullet points"
3624
- `
3625
- ),
3626
- answer_options: zod3.array(zod3.string()).optional().describe(
3627
- `What discrete options to return. Useful for precise responses. Can't be used with answer_format. Example: ["Yes", "No"]
3628
- `
3629
- )
3630
- })
3631
- ).describe("A list of questions to ask")
3632
- })
3633
- );
3634
- var lemurQuestionAnswerResponseUsageInputTokensMin = 0;
3635
- var lemurQuestionAnswerResponseUsageOutputTokensMin = 0;
3636
- var lemurQuestionAnswerResponse = zod3.object({
3637
- request_id: zod3.string().uuid().describe("The ID of the LeMUR request"),
3638
- usage: zod3.object({
3639
- input_tokens: zod3.number().min(lemurQuestionAnswerResponseUsageInputTokensMin).describe("The number of input tokens used by the model"),
3640
- output_tokens: zod3.number().min(lemurQuestionAnswerResponseUsageOutputTokensMin).describe("The number of output tokens generated by the model")
3641
- }).describe("The usage numbers for the LeMUR request")
3642
- }).and(
3643
- zod3.object({
3644
- response: zod3.array(
3645
- zod3.object({
3646
- question: zod3.string().describe("The question for LeMUR to answer"),
3647
- answer: zod3.string().describe("The answer generated by LeMUR")
3648
- }).describe("An answer generated by LeMUR and its question")
3649
- ).describe("The answers generated by LeMUR and their questions")
3650
- })
3651
- );
3652
- var getLemurResponseParams = zod3.object({
3653
- request_id: zod3.string().describe(
3654
- "The ID of the LeMUR request you previously made.\nThis would be found in the response of the original request.\n"
3655
- )
3656
- });
3657
- var getLemurResponseResponseUsageInputTokensMin = 0;
3658
- var getLemurResponseResponseUsageOutputTokensMin = 0;
3659
- var getLemurResponseResponseUsageInputTokensMinOne = 0;
3660
- var getLemurResponseResponseUsageOutputTokensMinOne = 0;
3661
- var getLemurResponseResponse = zod3.object({
3662
- response: zod3.string().describe("The response generated by LeMUR.")
3663
- }).and(
3664
- zod3.object({
3665
- request_id: zod3.string().uuid().describe("The ID of the LeMUR request"),
3666
- usage: zod3.object({
3667
- input_tokens: zod3.number().min(getLemurResponseResponseUsageInputTokensMin).describe("The number of input tokens used by the model"),
3668
- output_tokens: zod3.number().min(getLemurResponseResponseUsageOutputTokensMin).describe("The number of output tokens generated by the model")
3669
- }).describe("The usage numbers for the LeMUR request")
3670
- })
3671
- ).or(
3672
- zod3.object({
3673
- request_id: zod3.string().uuid().describe("The ID of the LeMUR request"),
3674
- usage: zod3.object({
3675
- input_tokens: zod3.number().min(getLemurResponseResponseUsageInputTokensMinOne).describe("The number of input tokens used by the model"),
3676
- output_tokens: zod3.number().min(getLemurResponseResponseUsageOutputTokensMinOne).describe("The number of output tokens generated by the model")
3677
- }).describe("The usage numbers for the LeMUR request")
3678
- }).and(
3679
- zod3.object({
3680
- response: zod3.array(
3681
- zod3.object({
3682
- question: zod3.string().describe("The question for LeMUR to answer"),
3683
- answer: zod3.string().describe("The answer generated by LeMUR")
3684
- }).describe("An answer generated by LeMUR and its question")
3685
- ).describe("The answers generated by LeMUR and their questions")
3686
- })
3687
- )
3688
- );
3689
- var purgeLemurRequestDataParams = zod3.object({
3690
- request_id: zod3.string().describe(
3691
- "The ID of the LeMUR request whose data you want to delete. This would be found in the response of the original request."
3692
- )
3693
- });
3694
- var purgeLemurRequestDataResponse = zod3.object({
3695
- request_id: zod3.string().uuid().describe("The ID of the deletion request of the LeMUR request"),
3696
- request_id_to_purge: zod3.string().uuid().describe("The ID of the LeMUR request to purge the data for"),
3697
- deleted: zod3.boolean().describe("Whether the request data was deleted")
3698
- });
3699
4373
 
3700
4374
  // src/generated/assemblyai/streaming-types.zod.ts
3701
4375
  import { z as zod4 } from "zod";
@@ -3710,25 +4384,37 @@ var streamingTranscriberParams = zod4.object({
3710
4384
  enableExtraSessionInformation: zod4.boolean().optional().describe(
3711
4385
  "Set to true to receive the SessionInformation message before the session ends. Defaults to false."
3712
4386
  ),
4387
+ domain: zod4.string().optional().describe(
4388
+ 'Enable domain-specific transcription models to improve accuracy for specialized terminology. Set to `"medical-v1"` to enable [Medical Mode](https://www.assemblyai.com/docs/streaming/medical-mode) for improved accuracy of medical terms such as medications, procedures, conditions, and dosages. Supported languages: English (`en`), Spanish (`es`), German (`de`), French (`fr`). If used with an unsupported language, the parameter is ignored and a warning is returned.'
4389
+ ),
3713
4390
  endOfTurnConfidenceThreshold: zod4.number().optional().describe("From SDK v3"),
3714
4391
  minEndOfTurnSilenceWhenConfident: zod4.number().optional().describe("From SDK v3"),
4392
+ minTurnSilence: zod4.number().optional().describe("From SDK v3"),
3715
4393
  maxTurnSilence: zod4.number().optional().describe("From SDK v3"),
3716
4394
  vadThreshold: zod4.number().optional().describe("From SDK v3"),
3717
4395
  formatTurns: zod4.boolean().optional().describe("From SDK v3"),
3718
4396
  filterProfanity: zod4.boolean().optional().describe("From SDK v3"),
3719
4397
  keyterms: zod4.array(zod4.string()).optional().describe("From SDK v3"),
3720
4398
  keytermsPrompt: zod4.array(zod4.string()).optional().describe("From SDK v3"),
3721
- speechModel: zod4.enum(["universal-streaming-english", "universal-streaming-multilingual"]).optional().describe("From SDK v3"),
4399
+ prompt: zod4.string().optional().describe("From SDK v3"),
4400
+ speechModel: zod4.enum(["universal-streaming-english", "universal-streaming-multilingual"]).describe("From SDK v3"),
3722
4401
  languageDetection: zod4.boolean().optional().describe("From SDK v3"),
3723
- inactivityTimeout: zod4.number().optional().describe("From SDK v3")
4402
+ inactivityTimeout: zod4.number().optional().describe("From SDK v3"),
4403
+ speakerLabels: zod4.boolean().optional().describe("From SDK v3"),
4404
+ maxSpeakers: zod4.number().optional().describe("From SDK v3"),
4405
+ llmGateway: zod4.unknown().optional().describe("From SDK v3")
3724
4406
  });
3725
4407
  var streamingUpdateConfigParams = zod4.object({
3726
4408
  end_utterance_silence_threshold: zod4.number().min(0).max(2e4).optional().describe("The duration threshold in milliseconds"),
3727
4409
  end_of_turn_confidence_threshold: zod4.number().optional().describe("From SDK v3"),
3728
4410
  min_end_of_turn_silence_when_confident: zod4.number().optional().describe("From SDK v3"),
4411
+ min_turn_silence: zod4.number().optional().describe("From SDK v3"),
3729
4412
  max_turn_silence: zod4.number().optional().describe("From SDK v3"),
3730
4413
  vad_threshold: zod4.number().optional().describe("From SDK v3"),
3731
- format_turns: zod4.boolean().optional().describe("From SDK v3")
4414
+ format_turns: zod4.boolean().optional().describe("From SDK v3"),
4415
+ keyterms_prompt: zod4.array(zod4.string()).optional().describe("From SDK v3"),
4416
+ prompt: zod4.string().optional().describe("From SDK v3"),
4417
+ filter_profanity: zod4.boolean().optional().describe("From SDK v3")
3732
4418
  });
3733
4419
 
3734
4420
  // src/generated/gladia/api/gladiaControlAPI.zod.ts