assemblyai 4.3.2 → 4.3.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,20 @@
1
1
  # Changelog
2
2
 
3
+ ## [4.3.3] - 2024-03-18
4
+
5
+ ### Added
6
+
7
+ - GitHub action to generate API reference
8
+ - Generate API reference with Typedoc and host on GitHub Pages
9
+
10
+ ### Changed
11
+
12
+ - Add `conformer-2` to `SpeechModel` type
13
+ - Change `language_code` field to accept any string
14
+ - Move from JSDoc to TSDoc
15
+ - Update `ws` to 8.13.0
16
+ - Update dev dependencies (no public facing changes)
17
+
3
18
  ## [4.3.2] - 2024-03-08
4
19
 
5
20
  ### Added
package/README.md CHANGED
@@ -19,6 +19,7 @@ It is written primarily for Node.js in TypeScript with all types exported, but a
19
19
  ## Documentation
20
20
 
21
21
  Visit the [AssemblyAI documentation](https://www.assemblyai.com/docs) for step-by-step instructions and a lot more details about our AI models and API.
22
+ Explore the [SDK API reference](https://assemblyai.github.io/assemblyai-node-sdk/) for more details on the SDK types, functions, and classes.
22
23
 
23
24
  ## Quickstart
24
25
 
@@ -240,9 +241,9 @@ You can configure the following events.
240
241
  ```typescript
241
242
  rt.on("open", ({ sessionId, expiresAt }) => console.log('Session ID:', sessionId, 'Expires at:', expiresAt));
242
243
  rt.on("close", (code: number, reason: string) => console.log('Closed', code, reason));
243
- rt.on("transcript", (transcript: TranscriptMessage) => console.log('Transcript:', transcript));
244
- rt.on("transcript.partial", (transcript: PartialTranscriptMessage) => console.log('Partial transcript:', transcript));
245
- rt.on("transcript.final", (transcript: FinalTranscriptMessage) => console.log('Final transcript:', transcript));
244
+ rt.on("transcript", (transcript: RealtimeTranscript) => console.log('Transcript:', transcript));
245
+ rt.on("transcript.partial", (transcript: PartialTranscript) => console.log('Partial transcript:', transcript));
246
+ rt.on("transcript.final", (transcript: FinalTranscript) => console.log('Final transcript:', transcript));
246
247
  rt.on("error", (error: Error) => console.error('Error', error));
247
248
  ```
248
249
 
@@ -45,7 +45,7 @@ export type AutoHighlightResult = {
45
45
  };
46
46
  /**
47
47
  * An array of results for the Key Phrases model, if it is enabled.
48
- * See [Key phrases](https://www.assemblyai.com/docs/models/key-phrases) for more information.
48
+ * See {@link https://www.assemblyai.com/docs/models/key-phrases | Key phrases } for more information.
49
49
  *
50
50
  * @example
51
51
  * ```js
@@ -363,7 +363,7 @@ export type ContentSafetyLabelResult = {
363
363
  };
364
364
  /**
365
365
  * An array of results for the Content Moderation model, if it is enabled.
366
- * See [Content moderation](https://www.assemblyai.com/docs/models/content-moderation) for more information.
366
+ * See {@link https://www.assemblyai.com/docs/models/content-moderation | Content moderation } for more information.
367
367
  *
368
368
  * @example
369
369
  * ```js
@@ -987,7 +987,7 @@ export type RedactedAudioResponse = {
987
987
  */
988
988
  export type RedactedAudioStatus = "redacted_audio_ready";
989
989
  /**
990
- * 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.
990
+ * Controls the filetype of the audio created by redact_pii_audio. Currently supports mp3 (default) and wav. See {@link https://www.assemblyai.com/docs/models/pii-redaction | PII redaction } for more details.
991
991
  * @defaultValue "mp3"
992
992
  * @example "mp3"
993
993
  */
@@ -1127,7 +1127,7 @@ export type SentimentAnalysisResult = {
1127
1127
  */
1128
1128
  sentiment: Sentiment;
1129
1129
  /**
1130
- * The speaker of the sentence if [Speaker Diarization](https://www.assemblyai.com/docs/models/speaker-diarization) is enabled, else null
1130
+ * The speaker of the sentence if {@link https://www.assemblyai.com/docs/models/speaker-diarization | Speaker Diarization } is enabled, else null
1131
1131
  */
1132
1132
  speaker?: string | null;
1133
1133
  /**
@@ -1157,9 +1157,9 @@ export type SeverityScoreSummary = {
1157
1157
  /**
1158
1158
  * The speech model to use for the transcription.
1159
1159
  */
1160
- export type SpeechModel = "nano";
1160
+ export type SpeechModel = "nano" | "conformer-2";
1161
1161
  /**
1162
- * 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.
1162
+ * The replacement logic for detected PII, can be "entity_type" or "hash". See {@link https://www.assemblyai.com/docs/models/pii-redaction | PII redaction } for more details.
1163
1163
  */
1164
1164
  export type SubstitutionPolicy = "entity_type" | "hash";
1165
1165
  /**
@@ -1198,7 +1198,7 @@ export type Timestamp = {
1198
1198
  };
1199
1199
  /**
1200
1200
  * The result of the Topic Detection model, if it is enabled.
1201
- * See [Topic Detection](https://www.assemblyai.com/docs/models/topic-detection) for more information.
1201
+ * See {@link https://www.assemblyai.com/docs/models/topic-detection | Topic Detection } for more information.
1202
1202
  *
1203
1203
  * @example
1204
1204
  * ```js
@@ -2081,7 +2081,7 @@ export type Transcript = {
2081
2081
  */
2082
2082
  audio_url: string;
2083
2083
  /**
2084
- * Whether [Auto Chapters](https://www.assemblyai.com/docs/models/auto-chapters) is enabled, can be true or false
2084
+ * Whether {@link https://www.assemblyai.com/docs/models/auto-chapters | Auto Chapters } is enabled, can be true or false
2085
2085
  */
2086
2086
  auto_chapters?: boolean | null;
2087
2087
  /**
@@ -2090,7 +2090,7 @@ export type Transcript = {
2090
2090
  auto_highlights: boolean;
2091
2091
  /**
2092
2092
  * An array of results for the Key Phrases model, if it is enabled.
2093
- * See [Key phrases](https://www.assemblyai.com/docs/models/key-phrases) for more information.
2093
+ * See {@link https://www.assemblyai.com/docs/models/key-phrases | Key phrases } for more information.
2094
2094
  */
2095
2095
  auto_highlights_result?: AutoHighlightsResult | null;
2096
2096
  /**
@@ -2106,12 +2106,12 @@ export type Transcript = {
2106
2106
  */
2107
2107
  confidence?: number | null;
2108
2108
  /**
2109
- * Whether [Content Moderation](https://www.assemblyai.com/docs/models/content-moderation) is enabled, can be true or false
2109
+ * Whether {@link https://www.assemblyai.com/docs/models/content-moderation | Content Moderation } is enabled, can be true or false
2110
2110
  */
2111
2111
  content_safety?: boolean | null;
2112
2112
  /**
2113
2113
  * An array of results for the Content Moderation model, if it is enabled.
2114
- * See [Content moderation](https://www.assemblyai.com/docs/models/content-moderation) for more information.
2114
+ * See {@link https://www.assemblyai.com/docs/models/content-moderation | Content moderation } for more information.
2115
2115
  */
2116
2116
  content_safety_labels?: ContentSafetyLabelsResult | null;
2117
2117
  /**
@@ -2127,16 +2127,16 @@ export type Transcript = {
2127
2127
  */
2128
2128
  disfluencies?: boolean | null;
2129
2129
  /**
2130
- * Whether [Dual channel transcription](https://www.assemblyai.com/docs/models/speech-recognition#dual-channel-transcription) was enabled in the transcription request, either true or false
2130
+ * Whether {@link https://www.assemblyai.com/docs/models/speech-recognition#dual-channel-transcription | Dual channel transcription } was enabled in the transcription request, either true or false
2131
2131
  */
2132
2132
  dual_channel?: boolean | null;
2133
2133
  /**
2134
2134
  * An array of results for the Entity Detection model, if it is enabled.
2135
- * See [Entity detection](https://www.assemblyai.com/docs/models/entity-detection) for more information.
2135
+ * See {@link https://www.assemblyai.com/docs/models/entity-detection | Entity detection } for more information.
2136
2136
  */
2137
2137
  entities?: Entity[] | null;
2138
2138
  /**
2139
- * Whether [Entity Detection](https://www.assemblyai.com/docs/models/entity-detection) is enabled, can be true or false
2139
+ * Whether {@link https://www.assemblyai.com/docs/models/entity-detection | Entity Detection } is enabled, can be true or false
2140
2140
  */
2141
2141
  entity_detection?: boolean | null;
2142
2142
  /**
@@ -2144,7 +2144,7 @@ export type Transcript = {
2144
2144
  */
2145
2145
  error?: string;
2146
2146
  /**
2147
- * Whether [Profanity Filtering](https://www.assemblyai.com/docs/models/speech-recognition#profanity-filtering) is enabled, either true or false
2147
+ * Whether {@link https://www.assemblyai.com/docs/models/speech-recognition#profanity-filtering | Profanity Filtering } is enabled, either true or false
2148
2148
  */
2149
2149
  filter_profanity?: boolean | null;
2150
2150
  /**
@@ -2152,12 +2152,12 @@ export type Transcript = {
2152
2152
  */
2153
2153
  format_text?: boolean | null;
2154
2154
  /**
2155
- * Whether [Topic Detection](https://www.assemblyai.com/docs/models/topic-detection) is enabled, can be true or false
2155
+ * Whether {@link https://www.assemblyai.com/docs/models/topic-detection | Topic Detection } is enabled, can be true or false
2156
2156
  */
2157
2157
  iab_categories?: boolean | null;
2158
2158
  /**
2159
2159
  * The result of the Topic Detection model, if it is enabled.
2160
- * See [Topic Detection](https://www.assemblyai.com/docs/models/topic-detection) for more information.
2160
+ * See {@link https://www.assemblyai.com/docs/models/topic-detection | Topic Detection } for more information.
2161
2161
  */
2162
2162
  iab_categories_result?: TopicDetectionModelResult | null;
2163
2163
  /**
@@ -2166,12 +2166,12 @@ export type Transcript = {
2166
2166
  id: string;
2167
2167
  /**
2168
2168
  * The language of your audio file.
2169
- * Possible values are found in [Supported Languages](https://www.assemblyai.com/docs/concepts/supported-languages).
2169
+ * Possible values are found in {@link https://www.assemblyai.com/docs/concepts/supported-languages | Supported Languages }.
2170
2170
  * The default value is 'en_us'.
2171
2171
  */
2172
- language_code?: TranscriptLanguageCode;
2172
+ language_code?: LiteralUnion<TranscriptLanguageCode, string>;
2173
2173
  /**
2174
- * Whether [Automatic language detection](https://www.assemblyai.com/docs/models/speech-recognition#automatic-language-detection) is enabled, either true or false
2174
+ * Whether {@link https://www.assemblyai.com/docs/models/speech-recognition#automatic-language-detection | Automatic language detection } is enabled, either true or false
2175
2175
  */
2176
2176
  language_detection?: boolean | null;
2177
2177
  /**
@@ -2184,43 +2184,43 @@ export type Transcript = {
2184
2184
  */
2185
2185
  punctuate?: boolean | null;
2186
2186
  /**
2187
- * Whether [PII Redaction](https://www.assemblyai.com/docs/models/pii-redaction) is enabled, either true or false
2187
+ * Whether {@link https://www.assemblyai.com/docs/models/pii-redaction | PII Redaction } is enabled, either true or false
2188
2188
  */
2189
2189
  redact_pii: boolean;
2190
2190
  /**
2191
2191
  * Whether a redacted version of the audio file was generated,
2192
- * either true or false. See [PII redaction](https://www.assemblyai.com/docs/models/pii-redaction) for more information.
2192
+ * either true or false. See {@link https://www.assemblyai.com/docs/models/pii-redaction | PII redaction } for more information.
2193
2193
  */
2194
2194
  redact_pii_audio?: boolean | null;
2195
2195
  /**
2196
2196
  * The audio quality of the PII-redacted audio file, if redact_pii_audio is enabled.
2197
- * See [PII redaction](https://www.assemblyai.com/docs/models/pii-redaction) for more information.
2197
+ * See {@link https://www.assemblyai.com/docs/models/pii-redaction | PII redaction } for more information.
2198
2198
  */
2199
2199
  redact_pii_audio_quality?: RedactPiiAudioQuality | null;
2200
2200
  /**
2201
2201
  * The list of PII Redaction policies that were enabled, if PII Redaction is enabled.
2202
- * See [PII redaction](https://www.assemblyai.com/docs/models/pii-redaction) for more information.
2202
+ * See {@link https://www.assemblyai.com/docs/models/pii-redaction | PII redaction } for more information.
2203
2203
  */
2204
2204
  redact_pii_policies?: PiiPolicy[] | null;
2205
2205
  /**
2206
- * 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.
2206
+ * The replacement logic for detected PII, can be "entity_type" or "hash". See {@link https://www.assemblyai.com/docs/models/pii-redaction | PII redaction } for more details.
2207
2207
  */
2208
2208
  redact_pii_sub?: SubstitutionPolicy;
2209
2209
  /**
2210
- * Whether [Sentiment Analysis](https://www.assemblyai.com/docs/models/sentiment-analysis) is enabled, can be true or false
2210
+ * Whether {@link https://www.assemblyai.com/docs/models/sentiment-analysis | Sentiment Analysis } is enabled, can be true or false
2211
2211
  */
2212
2212
  sentiment_analysis?: boolean | null;
2213
2213
  /**
2214
2214
  * An array of results for the Sentiment Analysis model, if it is enabled.
2215
- * See [Sentiment analysis](https://www.assemblyai.com/docs/models/sentiment-analysis) for more information.
2215
+ * See {@link https://www.assemblyai.com/docs/models/sentiment-analysis | Sentiment analysis } for more information.
2216
2216
  */
2217
2217
  sentiment_analysis_results?: SentimentAnalysisResult[] | null;
2218
2218
  /**
2219
- * Whether [Speaker diarization](https://www.assemblyai.com/docs/models/speaker-diarization) is enabled, can be true or false
2219
+ * Whether {@link https://www.assemblyai.com/docs/models/speaker-diarization | Speaker diarization } is enabled, can be true or false
2220
2220
  */
2221
2221
  speaker_labels?: boolean | null;
2222
2222
  /**
2223
- * Tell the speaker label model how many speakers it should attempt to identify, up to 10. See [Speaker diarization](https://www.assemblyai.com/docs/models/speaker-diarization) for more details.
2223
+ * Tell the speaker label model how many speakers it should attempt to identify, up to 10. See {@link https://www.assemblyai.com/docs/models/speaker-diarization | Speaker diarization } for more details.
2224
2224
  */
2225
2225
  speakers_expected?: number | null;
2226
2226
  /**
@@ -2243,20 +2243,20 @@ export type Transcript = {
2243
2243
  */
2244
2244
  status: TranscriptStatus;
2245
2245
  /**
2246
- * Whether [Summarization](https://www.assemblyai.com/docs/models/summarization) is enabled, either true or false
2246
+ * Whether {@link https://www.assemblyai.com/docs/models/summarization | Summarization } is enabled, either true or false
2247
2247
  */
2248
2248
  summarization: boolean;
2249
2249
  /**
2250
- * The generated summary of the media file, if [Summarization](https://www.assemblyai.com/docs/models/summarization) is enabled
2250
+ * The generated summary of the media file, if {@link https://www.assemblyai.com/docs/models/summarization | Summarization } is enabled
2251
2251
  */
2252
2252
  summary?: string | null;
2253
2253
  /**
2254
2254
  * The Summarization model used to generate the summary,
2255
- * if [Summarization](https://www.assemblyai.com/docs/models/summarization) is enabled
2255
+ * if {@link https://www.assemblyai.com/docs/models/summarization | Summarization } is enabled
2256
2256
  */
2257
2257
  summary_model?: string | null;
2258
2258
  /**
2259
- * The type of summary generated, if [Summarization](https://www.assemblyai.com/docs/models/summarization) is enabled
2259
+ * The type of summary generated, if {@link https://www.assemblyai.com/docs/models/summarization | Summarization } is enabled
2260
2260
  */
2261
2261
  summary_type?: string | null;
2262
2262
  /**
@@ -2273,7 +2273,7 @@ export type Transcript = {
2273
2273
  topics?: string[];
2274
2274
  /**
2275
2275
  * When dual_channel or speaker_labels is enabled, a list of turn-by-turn utterance objects.
2276
- * See [Speaker diarization](https://www.assemblyai.com/docs/models/speaker-diarization) for more information.
2276
+ * See {@link https://www.assemblyai.com/docs/models/speaker-diarization | Speaker diarization } for more information.
2277
2277
  */
2278
2278
  utterances?: TranscriptUtterance[] | null;
2279
2279
  /**
@@ -2298,7 +2298,7 @@ export type Transcript = {
2298
2298
  word_boost?: string[];
2299
2299
  /**
2300
2300
  * An array of temporally-sequential word objects, one for each word in the transcript.
2301
- * See [Speech recognition](https://www.assemblyai.com/docs/models/speech-recognition) for more information.
2301
+ * See {@link https://www.assemblyai.com/docs/models/speech-recognition | Speech recognition } for more information.
2302
2302
  */
2303
2303
  words?: TranscriptWord[] | null;
2304
2304
  };
@@ -2329,7 +2329,7 @@ export type TranscriptCustomSpelling = {
2329
2329
  to: string;
2330
2330
  };
2331
2331
  /**
2332
- * The language of your audio file. Possible values are found in [Supported Languages](https://www.assemblyai.com/docs/concepts/supported-languages).
2332
+ * The language of your audio file. Possible values are found in {@link https://www.assemblyai.com/docs/concepts/supported-languages | Supported Languages }.
2333
2333
  * The default value is 'en_us'.
2334
2334
  *
2335
2335
  * @defaultValue "en_us
@@ -2452,7 +2452,7 @@ export type TranscriptOptionalParams = {
2452
2452
  */
2453
2453
  audio_start_from?: number;
2454
2454
  /**
2455
- * Enable [Auto Chapters](https://www.assemblyai.com/docs/models/auto-chapters), can be true or false
2455
+ * Enable {@link https://www.assemblyai.com/docs/models/auto-chapters | Auto Chapters }, can be true or false
2456
2456
  */
2457
2457
  auto_chapters?: boolean;
2458
2458
  /**
@@ -2464,7 +2464,7 @@ export type TranscriptOptionalParams = {
2464
2464
  */
2465
2465
  boost_param?: TranscriptBoostParam;
2466
2466
  /**
2467
- * Enable [Content Moderation](https://www.assemblyai.com/docs/models/content-moderation), can be true or false
2467
+ * Enable {@link https://www.assemblyai.com/docs/models/content-moderation | Content Moderation }, can be true or false
2468
2468
  */
2469
2469
  content_safety?: boolean;
2470
2470
  /**
@@ -2484,11 +2484,11 @@ export type TranscriptOptionalParams = {
2484
2484
  */
2485
2485
  disfluencies?: boolean;
2486
2486
  /**
2487
- * Enable [Dual Channel](https://www.assemblyai.com/docs/models/speech-recognition#dual-channel-transcription) transcription, can be true or false.
2487
+ * Enable {@link https://www.assemblyai.com/docs/models/speech-recognition#dual-channel-transcription | Dual Channel } transcription, can be true or false.
2488
2488
  */
2489
2489
  dual_channel?: boolean;
2490
2490
  /**
2491
- * Enable [Entity Detection](https://www.assemblyai.com/docs/models/entity-detection), can be true or false
2491
+ * Enable {@link https://www.assemblyai.com/docs/models/entity-detection | Entity Detection }, can be true or false
2492
2492
  */
2493
2493
  entity_detection?: boolean;
2494
2494
  /**
@@ -2500,16 +2500,16 @@ export type TranscriptOptionalParams = {
2500
2500
  */
2501
2501
  format_text?: boolean;
2502
2502
  /**
2503
- * Enable [Topic Detection](https://www.assemblyai.com/docs/models/topic-detection), can be true or false
2503
+ * Enable {@link https://www.assemblyai.com/docs/models/topic-detection | Topic Detection }, can be true or false
2504
2504
  */
2505
2505
  iab_categories?: boolean;
2506
2506
  /**
2507
- * The language of your audio file. Possible values are found in [Supported Languages](https://www.assemblyai.com/docs/concepts/supported-languages).
2507
+ * The language of your audio file. Possible values are found in {@link https://www.assemblyai.com/docs/concepts/supported-languages | Supported Languages }.
2508
2508
  * The default value is 'en_us'.
2509
2509
  */
2510
- language_code?: TranscriptLanguageCode | null;
2510
+ language_code?: LiteralUnion<TranscriptLanguageCode, string> | null;
2511
2511
  /**
2512
- * Whether [Automatic language detection](https://www.assemblyai.com/docs/models/speech-recognition#automatic-language-detection) was enabled in the transcription request, either true or false.
2512
+ * Whether {@link https://www.assemblyai.com/docs/models/speech-recognition#automatic-language-detection | Automatic language detection } was enabled in the transcription request, either true or false.
2513
2513
  */
2514
2514
  language_detection?: boolean;
2515
2515
  /**
@@ -2521,32 +2521,32 @@ export type TranscriptOptionalParams = {
2521
2521
  */
2522
2522
  redact_pii?: boolean;
2523
2523
  /**
2524
- * 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.
2524
+ * Generate a copy of the original media file with spoken PII "beeped" out, can be true or false. See {@link https://www.assemblyai.com/docs/models/pii-redaction | PII redaction } for more details.
2525
2525
  */
2526
2526
  redact_pii_audio?: boolean;
2527
2527
  /**
2528
- * 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.
2528
+ * Controls the filetype of the audio created by redact_pii_audio. Currently supports mp3 (default) and wav. See {@link https://www.assemblyai.com/docs/models/pii-redaction | PII redaction } for more details.
2529
2529
  * @defaultValue "mp3"
2530
2530
  */
2531
2531
  redact_pii_audio_quality?: RedactPiiAudioQuality;
2532
2532
  /**
2533
- * The list of PII Redaction policies to enable. See [PII redaction](https://www.assemblyai.com/docs/models/pii-redaction) for more details.
2533
+ * The list of PII Redaction policies to enable. See {@link https://www.assemblyai.com/docs/models/pii-redaction | PII redaction } for more details.
2534
2534
  */
2535
2535
  redact_pii_policies?: PiiPolicy[];
2536
2536
  /**
2537
- * 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.
2537
+ * The replacement logic for detected PII, can be "entity_type" or "hash". See {@link https://www.assemblyai.com/docs/models/pii-redaction | PII redaction } for more details.
2538
2538
  */
2539
2539
  redact_pii_sub?: SubstitutionPolicy | null;
2540
2540
  /**
2541
- * Enable [Sentiment Analysis](https://www.assemblyai.com/docs/models/sentiment-analysis), can be true or false
2541
+ * Enable {@link https://www.assemblyai.com/docs/models/sentiment-analysis | Sentiment Analysis }, can be true or false
2542
2542
  */
2543
2543
  sentiment_analysis?: boolean;
2544
2544
  /**
2545
- * Enable [Speaker diarization](https://www.assemblyai.com/docs/models/speaker-diarization), can be true or false
2545
+ * Enable {@link https://www.assemblyai.com/docs/models/speaker-diarization | Speaker diarization }, can be true or false
2546
2546
  */
2547
2547
  speaker_labels?: boolean;
2548
2548
  /**
2549
- * Tells the speaker label model how many speakers it should attempt to identify, up to 10. See [Speaker diarization](https://www.assemblyai.com/docs/models/speaker-diarization) for more details.
2549
+ * Tells the speaker label model how many speakers it should attempt to identify, up to 10. See {@link https://www.assemblyai.com/docs/models/speaker-diarization | Speaker diarization } for more details.
2550
2550
  * @defaultValue "null
2551
2551
  */
2552
2552
  speakers_expected?: number | null;
@@ -2563,7 +2563,7 @@ export type TranscriptOptionalParams = {
2563
2563
  */
2564
2564
  speech_threshold?: number | null;
2565
2565
  /**
2566
- * Enable [Summarization](https://www.assemblyai.com/docs/models/summarization), can be true or false
2566
+ * Enable {@link https://www.assemblyai.com/docs/models/summarization | Summarization }, can be true or false
2567
2567
  */
2568
2568
  summarization?: boolean;
2569
2569
  /**
@@ -2644,7 +2644,7 @@ export type TranscriptParagraph = {
2644
2644
  confidence: number;
2645
2645
  end: number;
2646
2646
  /**
2647
- * The speaker of the sentence if [Speaker Diarization](https://www.assemblyai.com/docs/models/speaker-diarization) is enabled, else null
2647
+ * The speaker of the sentence if {@link https://www.assemblyai.com/docs/models/speaker-diarization | Speaker Diarization } is enabled, else null
2648
2648
  */
2649
2649
  speaker?: string | null;
2650
2650
  start: number;
@@ -2730,7 +2730,7 @@ export type TranscriptSentence = {
2730
2730
  confidence: number;
2731
2731
  end: number;
2732
2732
  /**
2733
- * The speaker of the sentence if [Speaker Diarization](https://www.assemblyai.com/docs/models/speaker-diarization) is enabled, else null
2733
+ * The speaker of the sentence if {@link https://www.assemblyai.com/docs/models/speaker-diarization | Speaker Diarization } is enabled, else null
2734
2734
  */
2735
2735
  speaker?: string | null;
2736
2736
  start: number;
@@ -2902,7 +2902,7 @@ export type TranscriptWord = {
2902
2902
  confidence: number;
2903
2903
  end: number;
2904
2904
  /**
2905
- * The speaker of the sentence if [Speaker Diarization](https://www.assemblyai.com/docs/models/speaker-diarization) is enabled, else null
2905
+ * The speaker of the sentence if {@link https://www.assemblyai.com/docs/models/speaker-diarization | Speaker Diarization } is enabled, else null
2906
2906
  */
2907
2907
  speaker?: string | null;
2908
2908
  start: number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "assemblyai",
3
- "version": "4.3.2",
3
+ "version": "4.3.3",
4
4
  "description": "The AssemblyAI JavaScript SDK provides an easy-to-use interface for interacting with the AssemblyAI API, which supports async and real-time transcription, as well as the latest LeMUR models.",
5
5
  "engines": {
6
6
  "node": ">=18"
@@ -67,8 +67,8 @@
67
67
  },
68
68
  "scripts": {
69
69
  "build": "pnpm clean && pnpm rollup -c",
70
- "clean": "rimraf dist/*",
71
- "lint": "eslint -c .eslintrc.json '{src,tests}/**/*.{js,ts}' && publint",
70
+ "clean": "rimraf dist/* && rimraf temp/* && rimraf temp-docs/*",
71
+ "lint": "eslint -c .eslintrc.json '{src,tests}/**/*.{js,ts}' && publint && tsc --noEmit -p tsconfig.json",
72
72
  "test": "jest --config jest.config.js",
73
73
  "format": "prettier '**/*' --write",
74
74
  "generate-types": "tsx ./scripts/generate-types.ts && pnpm format",
@@ -98,36 +98,36 @@
98
98
  "docs"
99
99
  ],
100
100
  "devDependencies": {
101
- "@babel/preset-env": "^7.23.5",
101
+ "@babel/preset-env": "^7.24.0",
102
102
  "@babel/preset-typescript": "^7.23.3",
103
103
  "@rollup/plugin-node-resolve": "^15.2.3",
104
104
  "@rollup/plugin-terser": "^0.4.4",
105
- "@rollup/plugin-typescript": "^11.1.5",
106
- "@types/jest": "^29.5.5",
107
- "@types/node": "^20.5.7",
108
- "@types/websocket": "^1.0.8",
109
- "@types/ws": "^8.5.5",
110
- "@typescript-eslint/eslint-plugin": "^6.7.5",
111
- "dotenv": "^16.3.1",
112
- "eslint": "^8.48.0",
105
+ "@rollup/plugin-typescript": "^11.1.6",
106
+ "@types/jest": "^29.5.12",
107
+ "@types/node": "^18.11.9",
108
+ "@types/websocket": "^1.0.10",
109
+ "@types/ws": "^8.5.10",
110
+ "@typescript-eslint/eslint-plugin": "^7.2.0",
111
+ "dotenv": "^16.4.5",
112
+ "eslint": "^8.57.0",
113
113
  "eslint-plugin-tsdoc": "^0.2.17",
114
- "jest": "^29.5.0",
115
- "jest-cli": "^29.5.0",
114
+ "jest": "^29.7.0",
115
+ "jest-cli": "^29.7.0",
116
116
  "jest-fetch-mock": "^3.0.3",
117
117
  "jest-junit": "^16.0.0",
118
- "jest-websocket-mock": "^2.4.1",
119
- "mock-socket": "^9.2.1",
120
- "npm": "^9.7.1",
121
- "openapi-typescript": "^6.6.1",
122
- "prettier": "^2.8.8",
123
- "publint": "^0.2.5",
124
- "rimraf": "^5.0.1",
125
- "rollup": "^3.25.1",
126
- "ts-jest": "^29.1.0",
118
+ "jest-websocket-mock": "^2.5.0",
119
+ "mock-socket": "^9.3.1",
120
+ "openapi-typescript": "^6.7.5",
121
+ "prettier": "^3.2.5",
122
+ "publint": "^0.2.7",
123
+ "rimraf": "^5.0.5",
124
+ "rollup": "^4.13.0",
125
+ "ts-jest": "^29.1.2",
127
126
  "tslib": "^2.5.3",
128
- "typescript": "^5.2.2"
127
+ "typescript": "^5.4.2",
128
+ "typedoc": "^0.25.12"
129
129
  },
130
130
  "dependencies": {
131
- "ws": "^8.13.0"
131
+ "ws": "^8.16.0"
132
132
  }
133
133
  }
@@ -1,8 +1,8 @@
1
1
  export const readFile = async function (
2
2
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
3
- path: string
3
+ path: string,
4
4
  ): Promise<ReadableStream<Uint8Array>> {
5
5
  throw new Error(
6
- "Interacting with the file system is not supported in this environment."
6
+ "Interacting with the file system is not supported in this environment.",
7
7
  );
8
8
  };
@@ -3,5 +3,5 @@ import { Readable } from "stream";
3
3
 
4
4
  export const readFile = async (path: string) =>
5
5
  Readable.toWeb(
6
- createReadStream(path)
6
+ createReadStream(path),
7
7
  ) as unknown as ReadableStream<Uint8Array>;
@@ -2,5 +2,5 @@ export const { WritableStream } =
2
2
  typeof window !== "undefined"
3
3
  ? window
4
4
  : typeof global !== "undefined"
5
- ? global
6
- : globalThis;
5
+ ? global
6
+ : globalThis;
@@ -12,7 +12,7 @@ export abstract class BaseService {
12
12
  constructor(private params: BaseServiceParams) {}
13
13
  protected async fetch(
14
14
  input: string,
15
- init?: RequestInit | undefined
15
+ init?: RequestInit | undefined,
16
16
  ): Promise<Response> {
17
17
  init = init ?? {};
18
18
  init.headers = init.headers ?? {};
@@ -45,7 +45,7 @@ export abstract class BaseService {
45
45
 
46
46
  protected async fetchJson<T>(
47
47
  input: string,
48
- init?: RequestInit | undefined
48
+ init?: RequestInit | undefined,
49
49
  ): Promise<T> {
50
50
  const response = await this.fetch(input, init);
51
51
  return response.json() as Promise<T>;
@@ -20,26 +20,26 @@ export class LemurService extends BaseService {
20
20
  }
21
21
 
22
22
  questionAnswer(
23
- params: LemurQuestionAnswerParams
23
+ params: LemurQuestionAnswerParams,
24
24
  ): Promise<LemurQuestionAnswerResponse> {
25
25
  return this.fetchJson<LemurQuestionAnswerResponse>(
26
26
  "/lemur/v3/generate/question-answer",
27
27
  {
28
28
  method: "POST",
29
29
  body: JSON.stringify(params),
30
- }
30
+ },
31
31
  );
32
32
  }
33
33
 
34
34
  actionItems(
35
- params: LemurActionItemsParams
35
+ params: LemurActionItemsParams,
36
36
  ): Promise<LemurActionItemsResponse> {
37
37
  return this.fetchJson<LemurActionItemsResponse>(
38
38
  "/lemur/v3/generate/action-items",
39
39
  {
40
40
  method: "POST",
41
41
  body: JSON.stringify(params),
42
- }
42
+ },
43
43
  );
44
44
  }
45
45
 
@@ -38,7 +38,7 @@ export class RealtimeTranscriberFactory extends BaseService {
38
38
  {
39
39
  method: "POST",
40
40
  body: JSON.stringify(params),
41
- }
41
+ },
42
42
  );
43
43
  return data.token;
44
44
  }
@@ -93,15 +93,15 @@ export class RealtimeTranscriber {
93
93
  on(event: "open", listener: (event: SessionBeginsEventData) => void): void;
94
94
  on(
95
95
  event: "transcript",
96
- listener: (transcript: RealtimeTranscript) => void
96
+ listener: (transcript: RealtimeTranscript) => void,
97
97
  ): void;
98
98
  on(
99
99
  event: "transcript.partial",
100
- listener: (transcript: PartialTranscript) => void
100
+ listener: (transcript: PartialTranscript) => void,
101
101
  ): void;
102
102
  on(
103
103
  event: "transcript.final",
104
- listener: (transcript: FinalTranscript) => void
104
+ listener: (transcript: FinalTranscript) => void,
105
105
  ): void;
106
106
  on(event: "error", listener: (error: Error) => void): void;
107
107
  on(event: "close", listener: (code: number, reason: string) => void): void;
@@ -135,7 +135,7 @@ export class RealtimeTranscriber {
135
135
  return;
136
136
  }
137
137
  this.configureEndUtteranceSilenceThreshold(
138
- this.endUtteranceSilenceThreshold
138
+ this.endUtteranceSilenceThreshold,
139
139
  );
140
140
  };
141
141
 
@@ -20,7 +20,10 @@ import { FileService } from "../files";
20
20
  import { getPath } from "../../utils/path";
21
21
 
22
22
  export class TranscriptService extends BaseService {
23
- constructor(params: BaseServiceParams, private files: FileService) {
23
+ constructor(
24
+ params: BaseServiceParams,
25
+ private files: FileService,
26
+ ) {
24
27
  super(params);
25
28
  }
26
29
 
@@ -32,7 +35,7 @@ export class TranscriptService extends BaseService {
32
35
  */
33
36
  async transcribe(
34
37
  params: TranscribeParams,
35
- options?: TranscribeOptions
38
+ options?: TranscribeOptions,
36
39
  ): Promise<Transcript> {
37
40
  const transcript = await this.submit(params);
38
41
  return await this.waitUntilReady(transcript.id, options);
@@ -82,7 +85,7 @@ export class TranscriptService extends BaseService {
82
85
  */
83
86
  async create(
84
87
  params: TranscriptParams,
85
- options?: CreateTranscriptOptions
88
+ options?: CreateTranscriptOptions,
86
89
  ): Promise<Transcript> {
87
90
  const path = getPath(params.audio_url);
88
91
  if (path !== null) {
@@ -110,7 +113,7 @@ export class TranscriptService extends BaseService {
110
113
  */
111
114
  async waitUntilReady(
112
115
  transcriptId: string,
113
- options?: PollingOptions
116
+ options?: PollingOptions,
114
117
  ): Promise<Transcript> {
115
118
  const pollingInterval = options?.pollingInterval ?? 3_000;
116
119
  const pollingTimeout = options?.pollingTimeout ?? -1;
@@ -153,7 +156,7 @@ export class TranscriptService extends BaseService {
153
156
  Object.keys(params).map((key) => [
154
157
  key,
155
158
  params[key as keyof ListTranscriptParams]?.toString() || "",
156
- ])
159
+ ]),
157
160
  )}`;
158
161
  }
159
162
  const data = await this.fetchJson<TranscriptList>(url);
@@ -186,7 +189,7 @@ export class TranscriptService extends BaseService {
186
189
  wordSearch(id: string, words: string[]): Promise<WordSearchResponse> {
187
190
  const params = new URLSearchParams({ words: words.join(",") });
188
191
  return this.fetchJson<WordSearchResponse>(
189
- `/v2/transcript/${id}/word-search?${params.toString()}`
192
+ `/v2/transcript/${id}/word-search?${params.toString()}`,
190
193
  );
191
194
  }
192
195
 
@@ -206,7 +209,7 @@ export class TranscriptService extends BaseService {
206
209
  */
207
210
  paragraphs(id: string): Promise<ParagraphsResponse> {
208
211
  return this.fetchJson<ParagraphsResponse>(
209
- `/v2/transcript/${id}/paragraphs`
212
+ `/v2/transcript/${id}/paragraphs`,
210
213
  );
211
214
  }
212
215
 
@@ -220,7 +223,7 @@ export class TranscriptService extends BaseService {
220
223
  async subtitles(
221
224
  id: string,
222
225
  format: SubtitleFormat = "srt",
223
- chars_per_caption?: number
226
+ chars_per_caption?: number,
224
227
  ): Promise<string> {
225
228
  let url = `/v2/transcript/${id}/${format}`;
226
229
  if (chars_per_caption) {
@@ -239,7 +242,7 @@ export class TranscriptService extends BaseService {
239
242
  */
240
243
  redactions(id: string): Promise<RedactedAudioResponse> {
241
244
  return this.fetchJson<RedactedAudioResponse>(
242
- `/v2/transcript/${id}/redacted-audio`
245
+ `/v2/transcript/${id}/redacted-audio`,
243
246
  );
244
247
  }
245
248
  }
@@ -11,8 +11,8 @@ type XOR<T, U> = T | U extends object
11
11
  type OneOf<T extends any[]> = T extends [infer Only]
12
12
  ? Only
13
13
  : T extends [infer A, infer B, ...infer Rest]
14
- ? OneOf<[XOR<A, B>, ...Rest]>
15
- : never;
14
+ ? OneOf<[XOR<A, B>, ...Rest]>
15
+ : never;
16
16
 
17
17
  /* eslint-enable */
18
18
 
@@ -11,8 +11,8 @@ type XOR<T, U> = T | U extends object
11
11
  type OneOf<T extends any[]> = T extends [infer Only]
12
12
  ? Only
13
13
  : T extends [infer A, infer B, ...infer Rest]
14
- ? OneOf<[XOR<A, B>, ...Rest]>
15
- : never;
14
+ ? OneOf<[XOR<A, B>, ...Rest]>
15
+ : never;
16
16
 
17
17
  /* eslint-enable */
18
18
 
@@ -58,7 +58,7 @@ export type AutoHighlightResult = {
58
58
 
59
59
  /**
60
60
  * An array of results for the Key Phrases model, if it is enabled.
61
- * See [Key phrases](https://www.assemblyai.com/docs/models/key-phrases) for more information.
61
+ * See {@link https://www.assemblyai.com/docs/models/key-phrases | Key phrases } for more information.
62
62
  *
63
63
  * @example
64
64
  * ```js
@@ -380,7 +380,7 @@ export type ContentSafetyLabelResult = {
380
380
 
381
381
  /**
382
382
  * An array of results for the Content Moderation model, if it is enabled.
383
- * See [Content moderation](https://www.assemblyai.com/docs/models/content-moderation) for more information.
383
+ * See {@link https://www.assemblyai.com/docs/models/content-moderation | Content moderation } for more information.
384
384
  *
385
385
  * @example
386
386
  * ```js
@@ -603,7 +603,7 @@ export type LemurBaseParams = {
603
603
  string,
604
604
  {
605
605
  [key: string]: unknown;
606
- }
606
+ },
607
607
  ]
608
608
  >;
609
609
  /**
@@ -686,7 +686,7 @@ export type LemurQuestion = {
686
686
  string,
687
687
  {
688
688
  [key: string]: unknown;
689
- }
689
+ },
690
690
  ]
691
691
  >;
692
692
  /**
@@ -1094,7 +1094,7 @@ export type RedactedAudioResponse = {
1094
1094
  export type RedactedAudioStatus = "redacted_audio_ready";
1095
1095
 
1096
1096
  /**
1097
- * Controls the filetype of the audio created by redact_pii_audio. Currently supports mp3 (default) and wav. See [PII redaction](https://www.assemblyai.com/docs/models/pii-redaction) for more details.
1097
+ * Controls the filetype of the audio created by redact_pii_audio. Currently supports mp3 (default) and wav. See {@link https://www.assemblyai.com/docs/models/pii-redaction | PII redaction } for more details.
1098
1098
  * @defaultValue "mp3"
1099
1099
  * @example "mp3"
1100
1100
  */
@@ -1237,7 +1237,7 @@ export type SentimentAnalysisResult = {
1237
1237
  */
1238
1238
  sentiment: Sentiment;
1239
1239
  /**
1240
- * The speaker of the sentence if [Speaker Diarization](https://www.assemblyai.com/docs/models/speaker-diarization) is enabled, else null
1240
+ * The speaker of the sentence if {@link https://www.assemblyai.com/docs/models/speaker-diarization | Speaker Diarization } is enabled, else null
1241
1241
  */
1242
1242
  speaker?: string | null;
1243
1243
  /**
@@ -1269,10 +1269,10 @@ export type SeverityScoreSummary = {
1269
1269
  /**
1270
1270
  * The speech model to use for the transcription.
1271
1271
  */
1272
- export type SpeechModel = "nano";
1272
+ export type SpeechModel = "nano" | "conformer-2";
1273
1273
 
1274
1274
  /**
1275
- * The replacement logic for detected PII, can be "entity_type" or "hash". See [PII redaction](https://www.assemblyai.com/docs/models/pii-redaction) for more details.
1275
+ * The replacement logic for detected PII, can be "entity_type" or "hash". See {@link https://www.assemblyai.com/docs/models/pii-redaction | PII redaction } for more details.
1276
1276
  */
1277
1277
  export type SubstitutionPolicy = "entity_type" | "hash";
1278
1278
 
@@ -1321,7 +1321,7 @@ export type Timestamp = {
1321
1321
 
1322
1322
  /**
1323
1323
  * The result of the Topic Detection model, if it is enabled.
1324
- * See [Topic Detection](https://www.assemblyai.com/docs/models/topic-detection) for more information.
1324
+ * See {@link https://www.assemblyai.com/docs/models/topic-detection | Topic Detection } for more information.
1325
1325
  *
1326
1326
  * @example
1327
1327
  * ```js
@@ -2206,7 +2206,7 @@ export type Transcript = {
2206
2206
  */
2207
2207
  audio_url: string;
2208
2208
  /**
2209
- * Whether [Auto Chapters](https://www.assemblyai.com/docs/models/auto-chapters) is enabled, can be true or false
2209
+ * Whether {@link https://www.assemblyai.com/docs/models/auto-chapters | Auto Chapters } is enabled, can be true or false
2210
2210
  */
2211
2211
  auto_chapters?: boolean | null;
2212
2212
  /**
@@ -2215,7 +2215,7 @@ export type Transcript = {
2215
2215
  auto_highlights: boolean;
2216
2216
  /**
2217
2217
  * An array of results for the Key Phrases model, if it is enabled.
2218
- * See [Key phrases](https://www.assemblyai.com/docs/models/key-phrases) for more information.
2218
+ * See {@link https://www.assemblyai.com/docs/models/key-phrases | Key phrases } for more information.
2219
2219
  */
2220
2220
  auto_highlights_result?: AutoHighlightsResult | null;
2221
2221
  /**
@@ -2231,12 +2231,12 @@ export type Transcript = {
2231
2231
  */
2232
2232
  confidence?: number | null;
2233
2233
  /**
2234
- * Whether [Content Moderation](https://www.assemblyai.com/docs/models/content-moderation) is enabled, can be true or false
2234
+ * Whether {@link https://www.assemblyai.com/docs/models/content-moderation | Content Moderation } is enabled, can be true or false
2235
2235
  */
2236
2236
  content_safety?: boolean | null;
2237
2237
  /**
2238
2238
  * An array of results for the Content Moderation model, if it is enabled.
2239
- * See [Content moderation](https://www.assemblyai.com/docs/models/content-moderation) for more information.
2239
+ * See {@link https://www.assemblyai.com/docs/models/content-moderation | Content moderation } for more information.
2240
2240
  */
2241
2241
  content_safety_labels?: ContentSafetyLabelsResult | null;
2242
2242
  /**
@@ -2252,16 +2252,16 @@ export type Transcript = {
2252
2252
  */
2253
2253
  disfluencies?: boolean | null;
2254
2254
  /**
2255
- * Whether [Dual channel transcription](https://www.assemblyai.com/docs/models/speech-recognition#dual-channel-transcription) was enabled in the transcription request, either true or false
2255
+ * Whether {@link https://www.assemblyai.com/docs/models/speech-recognition#dual-channel-transcription | Dual channel transcription } was enabled in the transcription request, either true or false
2256
2256
  */
2257
2257
  dual_channel?: boolean | null;
2258
2258
  /**
2259
2259
  * An array of results for the Entity Detection model, if it is enabled.
2260
- * See [Entity detection](https://www.assemblyai.com/docs/models/entity-detection) for more information.
2260
+ * See {@link https://www.assemblyai.com/docs/models/entity-detection | Entity detection } for more information.
2261
2261
  */
2262
2262
  entities?: Entity[] | null;
2263
2263
  /**
2264
- * Whether [Entity Detection](https://www.assemblyai.com/docs/models/entity-detection) is enabled, can be true or false
2264
+ * Whether {@link https://www.assemblyai.com/docs/models/entity-detection | Entity Detection } is enabled, can be true or false
2265
2265
  */
2266
2266
  entity_detection?: boolean | null;
2267
2267
  /**
@@ -2269,7 +2269,7 @@ export type Transcript = {
2269
2269
  */
2270
2270
  error?: string;
2271
2271
  /**
2272
- * Whether [Profanity Filtering](https://www.assemblyai.com/docs/models/speech-recognition#profanity-filtering) is enabled, either true or false
2272
+ * Whether {@link https://www.assemblyai.com/docs/models/speech-recognition#profanity-filtering | Profanity Filtering } is enabled, either true or false
2273
2273
  */
2274
2274
  filter_profanity?: boolean | null;
2275
2275
  /**
@@ -2277,12 +2277,12 @@ export type Transcript = {
2277
2277
  */
2278
2278
  format_text?: boolean | null;
2279
2279
  /**
2280
- * Whether [Topic Detection](https://www.assemblyai.com/docs/models/topic-detection) is enabled, can be true or false
2280
+ * Whether {@link https://www.assemblyai.com/docs/models/topic-detection | Topic Detection } is enabled, can be true or false
2281
2281
  */
2282
2282
  iab_categories?: boolean | null;
2283
2283
  /**
2284
2284
  * The result of the Topic Detection model, if it is enabled.
2285
- * See [Topic Detection](https://www.assemblyai.com/docs/models/topic-detection) for more information.
2285
+ * See {@link https://www.assemblyai.com/docs/models/topic-detection | Topic Detection } for more information.
2286
2286
  */
2287
2287
  iab_categories_result?: TopicDetectionModelResult | null;
2288
2288
  /**
@@ -2291,12 +2291,12 @@ export type Transcript = {
2291
2291
  id: string;
2292
2292
  /**
2293
2293
  * The language of your audio file.
2294
- * Possible values are found in [Supported Languages](https://www.assemblyai.com/docs/concepts/supported-languages).
2294
+ * Possible values are found in {@link https://www.assemblyai.com/docs/concepts/supported-languages | Supported Languages }.
2295
2295
  * The default value is 'en_us'.
2296
2296
  */
2297
- language_code?: TranscriptLanguageCode;
2297
+ language_code?: LiteralUnion<TranscriptLanguageCode, string>;
2298
2298
  /**
2299
- * Whether [Automatic language detection](https://www.assemblyai.com/docs/models/speech-recognition#automatic-language-detection) is enabled, either true or false
2299
+ * Whether {@link https://www.assemblyai.com/docs/models/speech-recognition#automatic-language-detection | Automatic language detection } is enabled, either true or false
2300
2300
  */
2301
2301
  language_detection?: boolean | null;
2302
2302
  /**
@@ -2309,43 +2309,43 @@ export type Transcript = {
2309
2309
  */
2310
2310
  punctuate?: boolean | null;
2311
2311
  /**
2312
- * Whether [PII Redaction](https://www.assemblyai.com/docs/models/pii-redaction) is enabled, either true or false
2312
+ * Whether {@link https://www.assemblyai.com/docs/models/pii-redaction | PII Redaction } is enabled, either true or false
2313
2313
  */
2314
2314
  redact_pii: boolean;
2315
2315
  /**
2316
2316
  * Whether a redacted version of the audio file was generated,
2317
- * either true or false. See [PII redaction](https://www.assemblyai.com/docs/models/pii-redaction) for more information.
2317
+ * either true or false. See {@link https://www.assemblyai.com/docs/models/pii-redaction | PII redaction } for more information.
2318
2318
  */
2319
2319
  redact_pii_audio?: boolean | null;
2320
2320
  /**
2321
2321
  * The audio quality of the PII-redacted audio file, if redact_pii_audio is enabled.
2322
- * See [PII redaction](https://www.assemblyai.com/docs/models/pii-redaction) for more information.
2322
+ * See {@link https://www.assemblyai.com/docs/models/pii-redaction | PII redaction } for more information.
2323
2323
  */
2324
2324
  redact_pii_audio_quality?: RedactPiiAudioQuality | null;
2325
2325
  /**
2326
2326
  * The list of PII Redaction policies that were enabled, if PII Redaction is enabled.
2327
- * See [PII redaction](https://www.assemblyai.com/docs/models/pii-redaction) for more information.
2327
+ * See {@link https://www.assemblyai.com/docs/models/pii-redaction | PII redaction } for more information.
2328
2328
  */
2329
2329
  redact_pii_policies?: PiiPolicy[] | null;
2330
2330
  /**
2331
- * The replacement logic for detected PII, can be "entity_type" or "hash". See [PII redaction](https://www.assemblyai.com/docs/models/pii-redaction) for more details.
2331
+ * The replacement logic for detected PII, can be "entity_type" or "hash". See {@link https://www.assemblyai.com/docs/models/pii-redaction | PII redaction } for more details.
2332
2332
  */
2333
2333
  redact_pii_sub?: SubstitutionPolicy;
2334
2334
  /**
2335
- * Whether [Sentiment Analysis](https://www.assemblyai.com/docs/models/sentiment-analysis) is enabled, can be true or false
2335
+ * Whether {@link https://www.assemblyai.com/docs/models/sentiment-analysis | Sentiment Analysis } is enabled, can be true or false
2336
2336
  */
2337
2337
  sentiment_analysis?: boolean | null;
2338
2338
  /**
2339
2339
  * An array of results for the Sentiment Analysis model, if it is enabled.
2340
- * See [Sentiment analysis](https://www.assemblyai.com/docs/models/sentiment-analysis) for more information.
2340
+ * See {@link https://www.assemblyai.com/docs/models/sentiment-analysis | Sentiment analysis } for more information.
2341
2341
  */
2342
2342
  sentiment_analysis_results?: SentimentAnalysisResult[] | null;
2343
2343
  /**
2344
- * Whether [Speaker diarization](https://www.assemblyai.com/docs/models/speaker-diarization) is enabled, can be true or false
2344
+ * Whether {@link https://www.assemblyai.com/docs/models/speaker-diarization | Speaker diarization } is enabled, can be true or false
2345
2345
  */
2346
2346
  speaker_labels?: boolean | null;
2347
2347
  /**
2348
- * Tell the speaker label model how many speakers it should attempt to identify, up to 10. See [Speaker diarization](https://www.assemblyai.com/docs/models/speaker-diarization) for more details.
2348
+ * Tell the speaker label model how many speakers it should attempt to identify, up to 10. See {@link https://www.assemblyai.com/docs/models/speaker-diarization | Speaker diarization } for more details.
2349
2349
  */
2350
2350
  speakers_expected?: number | null;
2351
2351
  /**
@@ -2368,20 +2368,20 @@ export type Transcript = {
2368
2368
  */
2369
2369
  status: TranscriptStatus;
2370
2370
  /**
2371
- * Whether [Summarization](https://www.assemblyai.com/docs/models/summarization) is enabled, either true or false
2371
+ * Whether {@link https://www.assemblyai.com/docs/models/summarization | Summarization } is enabled, either true or false
2372
2372
  */
2373
2373
  summarization: boolean;
2374
2374
  /**
2375
- * The generated summary of the media file, if [Summarization](https://www.assemblyai.com/docs/models/summarization) is enabled
2375
+ * The generated summary of the media file, if {@link https://www.assemblyai.com/docs/models/summarization | Summarization } is enabled
2376
2376
  */
2377
2377
  summary?: string | null;
2378
2378
  /**
2379
2379
  * The Summarization model used to generate the summary,
2380
- * if [Summarization](https://www.assemblyai.com/docs/models/summarization) is enabled
2380
+ * if {@link https://www.assemblyai.com/docs/models/summarization | Summarization } is enabled
2381
2381
  */
2382
2382
  summary_model?: string | null;
2383
2383
  /**
2384
- * The type of summary generated, if [Summarization](https://www.assemblyai.com/docs/models/summarization) is enabled
2384
+ * The type of summary generated, if {@link https://www.assemblyai.com/docs/models/summarization | Summarization } is enabled
2385
2385
  */
2386
2386
  summary_type?: string | null;
2387
2387
  /**
@@ -2398,7 +2398,7 @@ export type Transcript = {
2398
2398
  topics?: string[];
2399
2399
  /**
2400
2400
  * When dual_channel or speaker_labels is enabled, a list of turn-by-turn utterance objects.
2401
- * See [Speaker diarization](https://www.assemblyai.com/docs/models/speaker-diarization) for more information.
2401
+ * See {@link https://www.assemblyai.com/docs/models/speaker-diarization | Speaker diarization } for more information.
2402
2402
  */
2403
2403
  utterances?: TranscriptUtterance[] | null;
2404
2404
  /**
@@ -2423,7 +2423,7 @@ export type Transcript = {
2423
2423
  word_boost?: string[];
2424
2424
  /**
2425
2425
  * An array of temporally-sequential word objects, one for each word in the transcript.
2426
- * See [Speech recognition](https://www.assemblyai.com/docs/models/speech-recognition) for more information.
2426
+ * See {@link https://www.assemblyai.com/docs/models/speech-recognition | Speech recognition } for more information.
2427
2427
  */
2428
2428
  words?: TranscriptWord[] | null;
2429
2429
  };
@@ -2457,7 +2457,7 @@ export type TranscriptCustomSpelling = {
2457
2457
  };
2458
2458
 
2459
2459
  /**
2460
- * The language of your audio file. Possible values are found in [Supported Languages](https://www.assemblyai.com/docs/concepts/supported-languages).
2460
+ * The language of your audio file. Possible values are found in {@link https://www.assemblyai.com/docs/concepts/supported-languages | Supported Languages }.
2461
2461
  * The default value is 'en_us'.
2462
2462
  *
2463
2463
  * @defaultValue "en_us
@@ -2603,7 +2603,7 @@ export type TranscriptOptionalParams = {
2603
2603
  */
2604
2604
  audio_start_from?: number;
2605
2605
  /**
2606
- * Enable [Auto Chapters](https://www.assemblyai.com/docs/models/auto-chapters), can be true or false
2606
+ * Enable {@link https://www.assemblyai.com/docs/models/auto-chapters | Auto Chapters }, can be true or false
2607
2607
  */
2608
2608
  auto_chapters?: boolean;
2609
2609
  /**
@@ -2615,7 +2615,7 @@ export type TranscriptOptionalParams = {
2615
2615
  */
2616
2616
  boost_param?: TranscriptBoostParam;
2617
2617
  /**
2618
- * Enable [Content Moderation](https://www.assemblyai.com/docs/models/content-moderation), can be true or false
2618
+ * Enable {@link https://www.assemblyai.com/docs/models/content-moderation | Content Moderation }, can be true or false
2619
2619
  */
2620
2620
  content_safety?: boolean;
2621
2621
  /**
@@ -2635,11 +2635,11 @@ export type TranscriptOptionalParams = {
2635
2635
  */
2636
2636
  disfluencies?: boolean;
2637
2637
  /**
2638
- * Enable [Dual Channel](https://www.assemblyai.com/docs/models/speech-recognition#dual-channel-transcription) transcription, can be true or false.
2638
+ * Enable {@link https://www.assemblyai.com/docs/models/speech-recognition#dual-channel-transcription | Dual Channel } transcription, can be true or false.
2639
2639
  */
2640
2640
  dual_channel?: boolean;
2641
2641
  /**
2642
- * Enable [Entity Detection](https://www.assemblyai.com/docs/models/entity-detection), can be true or false
2642
+ * Enable {@link https://www.assemblyai.com/docs/models/entity-detection | Entity Detection }, can be true or false
2643
2643
  */
2644
2644
  entity_detection?: boolean;
2645
2645
  /**
@@ -2651,16 +2651,16 @@ export type TranscriptOptionalParams = {
2651
2651
  */
2652
2652
  format_text?: boolean;
2653
2653
  /**
2654
- * Enable [Topic Detection](https://www.assemblyai.com/docs/models/topic-detection), can be true or false
2654
+ * Enable {@link https://www.assemblyai.com/docs/models/topic-detection | Topic Detection }, can be true or false
2655
2655
  */
2656
2656
  iab_categories?: boolean;
2657
2657
  /**
2658
- * The language of your audio file. Possible values are found in [Supported Languages](https://www.assemblyai.com/docs/concepts/supported-languages).
2658
+ * The language of your audio file. Possible values are found in {@link https://www.assemblyai.com/docs/concepts/supported-languages | Supported Languages }.
2659
2659
  * The default value is 'en_us'.
2660
2660
  */
2661
- language_code?: TranscriptLanguageCode | null;
2661
+ language_code?: LiteralUnion<TranscriptLanguageCode, string> | null;
2662
2662
  /**
2663
- * Whether [Automatic language detection](https://www.assemblyai.com/docs/models/speech-recognition#automatic-language-detection) was enabled in the transcription request, either true or false.
2663
+ * Whether {@link https://www.assemblyai.com/docs/models/speech-recognition#automatic-language-detection | Automatic language detection } was enabled in the transcription request, either true or false.
2664
2664
  */
2665
2665
  language_detection?: boolean;
2666
2666
  /**
@@ -2672,32 +2672,32 @@ export type TranscriptOptionalParams = {
2672
2672
  */
2673
2673
  redact_pii?: boolean;
2674
2674
  /**
2675
- * Generate a copy of the original media file with spoken PII "beeped" out, can be true or false. See [PII redaction](https://www.assemblyai.com/docs/models/pii-redaction) for more details.
2675
+ * Generate a copy of the original media file with spoken PII "beeped" out, can be true or false. See {@link https://www.assemblyai.com/docs/models/pii-redaction | PII redaction } for more details.
2676
2676
  */
2677
2677
  redact_pii_audio?: boolean;
2678
2678
  /**
2679
- * Controls the filetype of the audio created by redact_pii_audio. Currently supports mp3 (default) and wav. See [PII redaction](https://www.assemblyai.com/docs/models/pii-redaction) for more details.
2679
+ * Controls the filetype of the audio created by redact_pii_audio. Currently supports mp3 (default) and wav. See {@link https://www.assemblyai.com/docs/models/pii-redaction | PII redaction } for more details.
2680
2680
  * @defaultValue "mp3"
2681
2681
  */
2682
2682
  redact_pii_audio_quality?: RedactPiiAudioQuality;
2683
2683
  /**
2684
- * The list of PII Redaction policies to enable. See [PII redaction](https://www.assemblyai.com/docs/models/pii-redaction) for more details.
2684
+ * The list of PII Redaction policies to enable. See {@link https://www.assemblyai.com/docs/models/pii-redaction | PII redaction } for more details.
2685
2685
  */
2686
2686
  redact_pii_policies?: PiiPolicy[];
2687
2687
  /**
2688
- * The replacement logic for detected PII, can be "entity_type" or "hash". See [PII redaction](https://www.assemblyai.com/docs/models/pii-redaction) for more details.
2688
+ * The replacement logic for detected PII, can be "entity_type" or "hash". See {@link https://www.assemblyai.com/docs/models/pii-redaction | PII redaction } for more details.
2689
2689
  */
2690
2690
  redact_pii_sub?: SubstitutionPolicy | null;
2691
2691
  /**
2692
- * Enable [Sentiment Analysis](https://www.assemblyai.com/docs/models/sentiment-analysis), can be true or false
2692
+ * Enable {@link https://www.assemblyai.com/docs/models/sentiment-analysis | Sentiment Analysis }, can be true or false
2693
2693
  */
2694
2694
  sentiment_analysis?: boolean;
2695
2695
  /**
2696
- * Enable [Speaker diarization](https://www.assemblyai.com/docs/models/speaker-diarization), can be true or false
2696
+ * Enable {@link https://www.assemblyai.com/docs/models/speaker-diarization | Speaker diarization }, can be true or false
2697
2697
  */
2698
2698
  speaker_labels?: boolean;
2699
2699
  /**
2700
- * Tells the speaker label model how many speakers it should attempt to identify, up to 10. See [Speaker diarization](https://www.assemblyai.com/docs/models/speaker-diarization) for more details.
2700
+ * Tells the speaker label model how many speakers it should attempt to identify, up to 10. See {@link https://www.assemblyai.com/docs/models/speaker-diarization | Speaker diarization } for more details.
2701
2701
  * @defaultValue "null
2702
2702
  */
2703
2703
  speakers_expected?: number | null;
@@ -2714,7 +2714,7 @@ export type TranscriptOptionalParams = {
2714
2714
  */
2715
2715
  speech_threshold?: number | null;
2716
2716
  /**
2717
- * Enable [Summarization](https://www.assemblyai.com/docs/models/summarization), can be true or false
2717
+ * Enable {@link https://www.assemblyai.com/docs/models/summarization | Summarization }, can be true or false
2718
2718
  */
2719
2719
  summarization?: boolean;
2720
2720
  /**
@@ -2796,7 +2796,7 @@ export type TranscriptParagraph = {
2796
2796
  confidence: number;
2797
2797
  end: number;
2798
2798
  /**
2799
- * The speaker of the sentence if [Speaker Diarization](https://www.assemblyai.com/docs/models/speaker-diarization) is enabled, else null
2799
+ * The speaker of the sentence if {@link https://www.assemblyai.com/docs/models/speaker-diarization | Speaker Diarization } is enabled, else null
2800
2800
  */
2801
2801
  speaker?: string | null;
2802
2802
  start: number;
@@ -2886,7 +2886,7 @@ export type TranscriptSentence = {
2886
2886
  confidence: number;
2887
2887
  end: number;
2888
2888
  /**
2889
- * The speaker of the sentence if [Speaker Diarization](https://www.assemblyai.com/docs/models/speaker-diarization) is enabled, else null
2889
+ * The speaker of the sentence if {@link https://www.assemblyai.com/docs/models/speaker-diarization | Speaker Diarization } is enabled, else null
2890
2890
  */
2891
2891
  speaker?: string | null;
2892
2892
  start: number;
@@ -3061,7 +3061,7 @@ export type TranscriptWord = {
3061
3061
  confidence: number;
3062
3062
  end: number;
3063
3063
  /**
3064
- * The speaker of the sentence if [Speaker Diarization](https://www.assemblyai.com/docs/models/speaker-diarization) is enabled, else null
3064
+ * The speaker of the sentence if {@link https://www.assemblyai.com/docs/models/speaker-diarization | Speaker Diarization } is enabled, else null
3065
3065
  */
3066
3066
  speaker?: string | null;
3067
3067
  start: number;