Transcribing with HTTP or WebSockets - Amazon Transcribe
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

Transcribing with HTTP or WebSockets

Amazon Transcribe supports HTTP for both batch (HTTP/1.1) and streaming (HTTP/2) transcriptions. WebSockets are supported for streaming transcriptions.

If you're transcribing a media file located in an Amazon S3 bucket, you're performing a batch transcription. If you're transcribing a real-time stream of audio data, you're performing a streaming transcription.

Both HTTP and WebSockets require you to authenticate your request using Amazon Signature Version 4 headers. Refer to Signing Amazon API requests for more information.

You can make a batch HTTP request using the following headers:

  • host

  • x-amz-target

  • content-type

  • x-amz-content-sha256

  • x-amz-date

  • authorization

Here's an example of a StartTranscriptionJob request:

POST /transcribe HTTP/1.1 host: transcribe.us-west-2.amazonaws.com x-amz-target: com.amazonaws.transcribe.Transcribe.StartTranscriptionJob content-type: application/x-amz-json-1.1 x-amz-content-sha256: string x-amz-date: YYYYMMDDTHHMMSSZ authorization: AWS4-HMAC-SHA256 Credential=access-key/YYYYMMSS/us-west-2/transcribe/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date;x-amz-target;x-amz-security-token, Signature=string { "TranscriptionJobName": "my-first-transcription-job", "LanguageCode": "en-US", "Media": { "MediaFileUri": "s3://DOC-EXAMPLE-BUCKET/my-input-files/my-media-file.flac" }, "OutputBucketName": "DOC-EXAMPLE-BUCKET", "OutputKey": "my-output-files/" }

Additional operations and parameters are listed in the API Reference; parameters common to all Amazon API operations are listed in the Common Parameters section. Other signature elements are detailed in Elements of an Amazon Signature Version 4 request.

Streaming transcriptions using HTTP/2 and WebSockets are more involved than using SDKs. We recommend reviewing the Setting up a streaming transcription section before setting up your first stream.

For more information on these methods, refer to Setting up an HTTP/2 stream or Setting up a WebSocket stream.

Note

We strongly recommend using an SDK for streaming transcriptions. For a list of supported SDKs, refer to Supported programming languages.