voice-router-dev 0.8.2 → 0.8.4

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