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:StartTranscriptionJob` — kick off an
7 * asynchronous batch transcription of an audio/video file stored in S3.
8 *
9 * Transcribe batch jobs are account-scoped (no resource to manage): the
10 * binding takes no arguments and grants the function
11 * `transcribe:StartTranscriptionJob` (the action has no resource-level IAM).
12 * The input `Media.MediaFileUri` and the output bucket are S3 locations —
13 * grant the function S3 access to those buckets separately. Poll the job to
14 * completion with {@link GetTranscriptionJob}.
15 *
16 * ### Starting a Transcription Job
17 * **Example:** Transcribe an S3 Audio File
18 * ```typescript
19 * // init
20 * const startJob = yield* AWS.Transcribe.StartTranscriptionJob();
21 *
22 * // runtime
23 * const { TranscriptionJob } = yield* startJob({
24 * TranscriptionJobName: "my-job",
25 * LanguageCode: "en-US",
26 * Media: { MediaFileUri: "s3://my-bucket/audio/sample.wav" },
27 * OutputBucketName: "my-output-bucket",
28 * });
29 * ```
30 *
31 * @binding
32 */
33export interface StartTranscriptionJob extends Binding.Service<
34 StartTranscriptionJob,
35 "AWS.Transcribe.StartTranscriptionJob",
36 () => Effect.Effect<
37 (
38 request: transcribe.StartTranscriptionJobRequest,
39 ) => Effect.Effect<
40 transcribe.StartTranscriptionJobResponse,
41 transcribe.StartTranscriptionJobError
42 >
43 >
44> {}
45export const StartTranscriptionJob = Binding.Service<StartTranscriptionJob>(
46 "AWS.Transcribe.StartTranscriptionJob",
47);