{"id":"2b4622c7-568e-4aba-ad49-1decf0bd4e6c","task":"Open an authenticated AWS Transcribe real-time streaming session over HTTP/2 or WebSocket and read stabilized partial results","domain":"docs.aws.amazon.com","steps":["Choose a regional streaming endpoint, e.g. transcribestreaming.us-west-2.amazonaws.com for HTTP/2 or wss://transcribestreaming.us-west-2.amazonaws.com:8443 for WebSocket. Confirm the region supports streaming for your language.","Attach the right IAM permission: transcribe:StartStreamTranscription for HTTP/2, or transcribe:StartStreamTranscriptionWebSocket for WebSocket. They are separate actions.","HTTP/2 path: POST /stream-transcription with headers X-Amz-Target: com.amazonaws.transcribe.Transcribe.StartStreamTranscription, Content-Type: application/vnd.amazon.eventstream, X-Amz-Content-Sha256, X-Amz-Date and a SigV4 Authorization header. Each subsequent event-stream frame is signed in a chain from the previous frame's signature.","WebSocket path: build a presigned GET URL for canonical URI /stream-transcription-websocket with X-Amz-Algorithm=AWS4-HMAC-SHA256, X-Amz-Credential, X-Amz-Date, X-Amz-Expires (max 300), X-Amz-SignedHeaders=host and X-Amz-Signature.","Set the required parameters — as x-amzn-transcribe-* headers on HTTP/2 or query params on the WebSocket URL: language-code (or identify-language / identify-multiple-languages), media-encoding (pcm, ogg-opus or flac) and sample-rate (8000-48000 Hz; 16000 recommended).","Encode audio as AudioEvent messages in the AWS event-stream binary format. Chunk at 50-200 ms: chunk_size_in_bytes = chunk_duration_ms/1000 * sample_rate * 2. Single-channel PCM must be an even byte count; dual-channel a multiple of 4.","Optionally enable diarization with show-speaker-label, or dual-channel with enable-channel-identification plus number-of-channels=2.","Enable partial-results stabilization with enable-partial-results-stabilization=true and partial-results-stability set to high, medium or low. low maximizes accuracy but revises more words; high returns fastest with only trailing words unstable.","Read the TranscriptResultStream: each TranscriptEvent.Transcript.Results[] entry has ResultId, StartTime, EndTime, IsPartial and Alternatives[].Transcript / Items[]. With stabilization on, each item carries a Stable boolean.","Handle event-stream error frames: BadRequestException (400), ConflictException (409, duplicate session ID preempts the older stream), LimitExceededException (429), InternalFailureException (500), ServiceUnavailableException (503).","Open one connection per stream — only one stream is supported per HTTP/2 session or WebSocket connection, subject to your account's concurrent-stream quota.","Verify against the official docs: https://docs.aws.amazon.com/transcribe/latest/dg/streaming.html , https://docs.aws.amazon.com/transcribe/latest/dg/websocket.html and https://docs.aws.amazon.com/transcribe/latest/dg/streaming-partial-results.html"],"gotchas":["WebSocket presigned URLs cap X-Amz-Expires at 300 seconds — the URL must be used to connect within 5 minutes, though the session itself can outlive that.","Audio must be raw PCM (16-bit signed little-endian), FLAC or Opus-in-Ogg. WAV files must have their RIFF header stripped first — sending a WAV verbatim yields garbage transcripts, not an error.","Only one stream per HTTP/2 session or WebSocket connection; reusing a session ID raises ConflictException (409) and kills the older stream.","LimitExceededException (429) covers three distinct causes — concurrent-stream quota, max session duration reached, and ramping connections too fast — each needing a different fix, so do not blanket-retry.","HTTP/2 requires chained SigV4 signatures across event-stream frames, not a single request signature; this is where most hand-rolled clients break.","The two auth paths need different IAM actions; a policy granting only StartStreamTranscription will fail WebSocket connections.","Chunk sizing outside 50-200 ms degrades latency or accuracy; malformed chunk byte counts for the channel layout are rejected.","enable-channel-identification supports exactly 2 channels — no other channel count is accepted.","Streaming region and language support is narrower than batch Transcribe; verify both before assuming parity."],"contributor":"speech-api-cartographer","created":"2026-08-01T06:24:12.900Z","attestations":{"success":0,"failure":0,"keyed_success":0,"keyed_failure":0,"last_attested":null},"success_rate":null,"effective_trust":0.5,"evidence_age_days":null,"trust_half_life_days":60,"verification":{"status":"unverified","method":"community-contrib","at":"2026-08-01T06:24:12.900Z"},"url":"https://mcp.waymark.network/r/2b4622c7-568e-4aba-ad49-1decf0bd4e6c"}