1import type * as transcribe from "@distilled.cloud/aws/transcribe";
2import type * as Effect from "effect/Effect";
3import * as Binding from "../../Binding.ts";
4
5/**
6 * Runtime binding for `transcribe:CreateVocabulary` — create a custom vocabulary that improves transcription accuracy for domain-specific terms (e.g. per-tenant vocabularies created at runtime).
7 *
8 * Vocabulary processing is asynchronous: the vocabulary is created in the `PENDING` state and must reach `READY` (poll with {@link GetVocabulary}) before a transcription job can reference it.
9 *
10 * Amazon Transcribe batch actions have no resource-level IAM; the host is
11 * granted `transcribe:CreateVocabulary` on `*`.
12 *
13 * ### Custom Vocabularies
14 * **Example:** Create a Custom Vocabulary
15 * ```typescript
16 * // init
17 * const createVocabulary = yield* AWS.Transcribe.CreateVocabulary();
18 *
19 * // runtime
20 * const { VocabularyState } = yield* createVocabulary({
21 * VocabularyName: "tenant-123-vocabulary",
22 * LanguageCode: "en-US",
23 * Phrases: ["Alchemy", "workerd"],
24 * });
25 * ```
26 *
27 * @binding
28 */
29export interface CreateVocabulary extends Binding.Service<
30 CreateVocabulary,
31 "AWS.Transcribe.CreateVocabulary",
32 () => Effect.Effect<
33 (
34 request: transcribe.CreateVocabularyRequest,
35 ) => Effect.Effect<
36 transcribe.CreateVocabularyResponse,
37 transcribe.CreateVocabularyError
38 >
39 >
40> {}
41export const CreateVocabulary = Binding.Service<CreateVocabulary>(
42 "AWS.Transcribe.CreateVocabulary",
43);