> ## Documentation Index
> Fetch the complete documentation index at: https://assemblyai.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Real-time STT on Amazon SageMaker

> Run AssemblyAI-STT-3.7-Realtime-Agent or Universal-3.6 Pro streaming speech-to-text on an Amazon SageMaker AI endpoint in your own AWS account.

AssemblyAI-STT-3.7-Realtime-Agent and Universal-3.6 Pro are available on AWS Marketplace as SageMaker AI model packages. You subscribe to a model on AWS Marketplace, deploy its model package to a SageMaker endpoint in your own AWS account, and stream audio to it over SageMaker's bidirectional streaming API. AWS runs the instances, and the AssemblyAI charge appears on your AWS bill.

The endpoint speaks the same [v3 streaming protocol](https://assemblyai.com/docs/streaming/message-sequence.md) as the hosted Real-time STT API: the same connection parameters, the same `Begin`, `Turn` and `Termination` messages, and the same turn detection. To decide between SageMaker, the hosted API and running the stack yourself, see [Compare deployment options](https://assemblyai.com/docs/self-hosted.md#compare-deployment-options).

> [accordion] Coding agent skill
>
> The `assemblyai-sagemaker` skill lets an AI coding agent such as Claude Code, Cursor or Copilot deploy, call, scale and troubleshoot the endpoint for you. Subscribe on AWS Marketplace and copy the model package ARN first; the agent can't subscribe for you.
>
> * Claude Code: `/plugin marketplace add AssemblyAI-Solutions/assemblyai-sagemaker-samples`, then `/plugin install assemblyai-sagemaker@assemblyai-sagemaker`
> * Cursor, Copilot and other agents that read skills: `npx skills add AssemblyAI-Solutions/assemblyai-sagemaker-samples`
> * Any other agent: copy [`SKILL.md`](https://github.com/AssemblyAI-Solutions/assemblyai-sagemaker-samples/blob/main/skills/assemblyai-sagemaker/SKILL.md) into its skills folder.
>
> Then start a new session and describe what you want.

## Models

| Model | `speech_model` | Best for |
| - | - | - |
| **AssemblyAI-STT-3.7-Realtime-Agent** | `assemblyai-stt-3-7-realtime-agent` | Voice agents. Our latest real-time model. |
| **Universal-3.6 Pro** | `universal-3-6-pro` | Existing integrations built on Universal-3.6 Pro. |

Both models are versions of one AWS Marketplace listing, each with its own model package: AssemblyAI-STT-3.7-Realtime-Agent is version 3.7.0, Universal-3.6 Pro the 1.0.x versions. An endpoint serves the model in the package you deploy. You don't need to pass `speech_model`; if you do, it must name that model. See [Model selection](https://assemblyai.com/docs/streaming/select-the-speech-model.md) for how the models compare.

## What one endpoint serves

* **Live streaming** over `InvokeEndpointWithBidirectionalStream`. Send audio as it's captured and receive partial and final transcripts as the speaker talks. See [Stream audio](#stream-audio).
* **Whole-file transcription** over `InvokeEndpoint`. Send a complete file of up to about a minute and receive every turn at once. See [Transcribe a file](#transcribe-a-file).
* **Batch transform** jobs over files in Amazon S3, from the same model package.

The endpoint runs in your AWS account. AWS Marketplace model packages run with network isolation: the container has no outbound network access and sends no data to AssemblyAI. Callers authenticate with AWS IAM, using `sagemaker:InvokeEndpointWithBidirectionalStream` and `sagemaker:InvokeEndpoint` on the endpoint's ARN. Logs and usage metrics go to Amazon CloudWatch in your account.

## Deploy the endpoint

You need an AWS account with IAM permissions for SageMaker (`AmazonSageMakerFullAccess`) and AWS Marketplace subscriptions (`AWSMarketplaceManageSubscriptions`), and the [AWS CLI v2](https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html).

**1. Subscribe and copy the model package ARN**

Open the AssemblyAI realtime listing on AWS Marketplace, choose **Continue to subscribe**, and accept the offer. Then choose **Continue to configuration**, select the version (3.7.0 for AssemblyAI-STT-3.7-Realtime-Agent) and Region, and copy the **model package ARN**. The ARN is specific to the Region; you can find it later under **Manage subscriptions**.

**2. Choose an instance type and check your quota**

`ml.g7e.2xlarge` (one NVIDIA RTX PRO 6000) is the recommended starting point. The model runs one copy on each GPU of an instance. The AWS Marketplace listing shows the types and Regions for each version; AssemblyAI-STT-3.7-Realtime-Agent doesn't run on `ml.g5` or `ml.p5`.

| GPUs per instance | Instance types |
| - | - |
| 1 | `ml.g7e.2xlarge`, `4xlarge`, `8xlarge` (RTX PRO 6000); `ml.g7.2xlarge`, `4xlarge`, `8xlarge` (RTX PRO 4500); `ml.g6e.xlarge`, `2xlarge`, `4xlarge`, `8xlarge`, `16xlarge` (L40S); `ml.g5.xlarge`, `2xlarge`, `4xlarge` (A10G, Universal-3.6 Pro only); `ml.p5.4xlarge` (H100, Universal-3.6 Pro only) |
| 2 | `ml.g7e.12xlarge`; `ml.g7.12xlarge` |
| 4 | `ml.g7e.24xlarge`; `ml.g7.24xlarge`; `ml.g6e.12xlarge`, `24xlarge`; `ml.g5.12xlarge`, `24xlarge` (Universal-3.6 Pro only) |
| 8 | `ml.g7e.48xlarge`; `ml.g7.48xlarge`; `ml.g6e.48xlarge`; `ml.g5.48xlarge` (Universal-3.6 Pro only); `ml.p5.48xlarge` (Universal-3.6 Pro only) |

SageMaker needs a quota for each instance type, named like `ml.g7e.2xlarge for endpoint usage`, in the [Service Quotas console](https://console.aws.amazon.com/servicequotas/home/services/sagemaker/quotas). New accounts often start at 0, so request an increase before you deploy.

**3. Find or create an execution role**

SageMaker assumes an execution role to run the model package. Any role that `sagemaker.amazonaws.com` can assume and that has `AmazonSageMakerFullAccess` works, and one role can serve every endpoint in the account:

```bash theme={null}
aws iam list-roles --query "Roles[?contains(RoleName, 'SageMaker')].Arn"
```

If you don't have one, create it, or ask your AWS administrator for its ARN:

```bash theme={null}
aws iam create-role \
  --role-name assemblyai-sagemaker-execution \
  --assume-role-policy-document '{"Version":"2012-10-17","Statement":[{"Effect":"Allow","Principal":{"Service":"sagemaker.amazonaws.com"},"Action":"sts:AssumeRole"}]}'
aws iam attach-role-policy \
  --role-name assemblyai-sagemaker-execution \
  --policy-arn arn:aws:iam::aws:policy/AmazonSageMakerFullAccess
```

**4. Create the model, endpoint configuration and endpoint**

```bash theme={null}
export AWS_REGION="us-east-1"
export NAME="assemblyai-streaming"
export MODEL_PACKAGE_ARN="<model-package-arn>"
export ROLE_ARN="<execution-role-arn>"

aws sagemaker create-model \
  --region "$AWS_REGION" \
  --model-name "$NAME" \
  --execution-role-arn "$ROLE_ARN" \
  --primary-container "ModelPackageName=$MODEL_PACKAGE_ARN" \
  --enable-network-isolation

aws sagemaker create-endpoint-config \
  --region "$AWS_REGION" \
  --endpoint-config-name "$NAME" \
  --production-variants '[{
    "VariantName": "primary",
    "ModelName": "'"$NAME"'",
    "InitialInstanceCount": 1,
    "InstancePools": [
      {"InstanceType": "ml.g7e.2xlarge", "Priority": 1},
      {"InstanceType": "ml.g7e.4xlarge", "Priority": 2},
      {"InstanceType": "ml.g6e.4xlarge", "Priority": 3}
    ],
    "InferenceAmiVersion": "al2023-ami-sagemaker-inference-gpu-4-1",
    "RoutingConfig": {"RoutingStrategy": "LEAST_OUTSTANDING_REQUESTS"},
    "ModelDataDownloadTimeoutInSeconds": 1800,
    "ContainerStartupHealthCheckTimeoutInSeconds": 3600
  }]'

aws sagemaker create-endpoint \
  --region "$AWS_REGION" \
  --endpoint-name "$NAME" \
  --endpoint-config-name "$NAME"
aws sagemaker wait endpoint-in-service --region "$AWS_REGION" --endpoint-name "$NAME"
```

The endpoint is `InService` once the model is loaded onto every GPU, which takes several minutes. AssemblyAI-STT-3.7-Realtime-Agent also compiles the model for the GPU at startup, except on `ml.g7`, which takes 15 to 30 minutes. The samples repository's [`deploy.py`](https://github.com/AssemblyAI-Solutions/assemblyai-sagemaker-samples/blob/main/stt-3-7-realtime-agent/examples/deploy.py) runs the same steps with boto3.

These endpoint configuration settings matter:

| Setting | Why |
| - | - |
| `InferenceAmiVersion` | **Required.** Boots a host image with NVIDIA driver 580 for the model's CUDA 13 runtime. Without it, some instance families, such as `ml.g5`, boot an older driver that can't run the model. The SageMaker console can't set it, so deploy with the AWS CLI, an SDK or infrastructure as code. |
| `InstancePools` | SageMaker tries each type in order until one has capacity. Keep every type at the **same number of GPUs**, because SageMaker balances streams by count, not by capacity. Every type needs quota. To use one type, replace it with `"InstanceType": "ml.g7e.2xlarge"`. |
| `RoutingConfig` | `LEAST_OUTSTANDING_REQUESTS` sends each new stream to the instance with the fewest open streams. With the default random routing, a stream can land on a full instance while another has room. |
| Startup timeouts | Time to copy the model weights, load them onto every GPU and, for AssemblyAI-STT-3.7-Realtime-Agent, compile the model. Use `3600` for the startup health check; `1800` is enough for Universal-3.6 Pro. |

To change a container setting, add an `Environment` map to the container in `create-model`. For Universal-3.6 Pro the main one is `MAX_OPEN_STREAMS`, the concurrent sessions per GPU (default `32`), which you need to change on some GPUs; see [Capacity and scaling](#capacity-and-scaling). For example, on `ml.g5`:

```bash theme={null}
aws sagemaker create-model \
  --region "$AWS_REGION" \
  --model-name "$NAME" \
  --execution-role-arn "$ROLE_ARN" \
  --primary-container '{"ModelPackageName":"'"$MODEL_PACKAGE_ARN"'","Environment":{"MAX_OPEN_STREAMS":"8"}}' \
  --enable-network-isolation
```

On a running endpoint, create a new model and endpoint configuration, then call `UpdateEndpoint`. SageMaker starts new instances before it removes the old ones.

When you're done, delete the endpoint to stop billing. Your AWS Marketplace subscription stays active for the next deployment:

```bash theme={null}
aws sagemaker delete-endpoint --region "$AWS_REGION" --endpoint-name "$NAME"
aws sagemaker delete-endpoint-config --region "$AWS_REGION" --endpoint-config-name "$NAME"
aws sagemaker delete-model --region "$AWS_REGION" --model-name "$NAME"
```

## Stream audio

A stream is one `InvokeEndpointWithBidirectionalStream` request. You send audio and control messages on the request side and receive the v3 protocol's messages on the response side. The session options that the hosted API takes as WebSocket query parameters go in the request's `ModelQueryString`.

**1. Install the packages**

Streaming uses AWS's `aws-sdk-sagemaker-runtime-http2` package, which needs Python 3.12 or later. AWS publishes it as experimental and its behavior has changed between releases, so install the tested versions:

```bash theme={null}
pip install "aws-sdk-sagemaker-runtime-http2==0.11.0" "smithy-http==0.5.0" "awscrt==0.32.2" "boto3>=1.40"
```

**2. Stream a file**

Save this as `stream.py`. It streams a 16-bit mono WAV file at real-time pace and prints each partial and final turn. Credentials and the Region come from your AWS configuration, such as `AWS_PROFILE` and `AWS_DEFAULT_REGION`.

```python theme={null}
import asyncio
import contextlib
import json
import sys
import time
import urllib.parse
import wave

import boto3
from aws_sdk_sagemaker_runtime_http2.client import AsyncSageMakerRuntimeHTTP2Client
from aws_sdk_sagemaker_runtime_http2.config import AsyncSageMakerRuntimeHTTP2Config
from aws_sdk_sagemaker_runtime_http2.models import (
    InvokeEndpointWithBidirectionalStreamInput,
    RequestPayloadPart,
    RequestStreamEventPayloadPart,
)
from smithy_http.aio.crt import AWSCRTHTTPClient

FRAME_MS = 50  # each audio message holds 20-1000 ms of audio


def payload(data, data_type):
    return RequestStreamEventPayloadPart(value=RequestPayloadPart(bytes_=data, data_type=data_type))


def quiet_sdk_close(loop, context):
    # After the server ends a stream, the SDK still tries to close the
    # request body in the background, which fails harmlessly.
    if "HTTP_STREAM_HAS_COMPLETED" not in str(context.get("exception", "")):
        loop.default_exception_handler(context)


async def main(endpoint, path):
    with wave.open(path) as w:
        assert w.getsampwidth() == 2 and w.getnchannels() == 1, "need 16-bit mono PCM"
        pcm, sample_rate = w.readframes(w.getnframes()), w.getframerate()

    session = boto3.Session()
    creds = session.get_credentials().get_frozen_credentials()
    region = session.region_name
    config = await AsyncSageMakerRuntimeHTTP2Config.resolve(
        region=region,
        # The bidirectional streaming runtime listens on port 8443.
        endpoint_uri=f"https://runtime.sagemaker.{region}.amazonaws.com:8443",
        transport=AWSCRTHTTPClient(),
        aws_access_key_id=creds.access_key,
        aws_secret_access_key=creds.secret_key,
        aws_session_token=creds.token,
    )
    query = urllib.parse.urlencode(
        {"sample_rate": sample_rate, "encoding": "pcm_s16le"},
        quote_via=urllib.parse.quote,  # SageMaker rejects "+" for a space
    )
    asyncio.get_running_loop().set_exception_handler(quiet_sdk_close)

    # One client (one HTTP/2 connection) per stream.
    async with AsyncSageMakerRuntimeHTTP2Client(config=config) as client:
        stream = await client.invoke_endpoint_with_bidirectional_stream(
            InvokeEndpointWithBidirectionalStreamInput(endpoint_name=endpoint, model_query_string=query)
        )

        async def send():
            frame = sample_rate * 2 * FRAME_MS // 1000
            start = time.monotonic()
            for i, offset in enumerate(range(0, len(pcm), frame)):
                await stream.input_stream.send(payload(pcm[offset:offset + frame], "BINARY"))
                await asyncio.sleep(max(0, start + (i + 1) * FRAME_MS / 1000 - time.monotonic()))
            await stream.input_stream.send(payload(json.dumps({"type": "Terminate"}).encode(), "UTF8"))

        sender = asyncio.create_task(send())
        _, output = await stream.await_output()
        try:
            while True:
                # Once all audio is sent, wait at most 10 s for Termination.
                timeout = 10 if sender.done() else None
                try:
                    event = await asyncio.wait_for(output.receive(), timeout)
                except Exception as e:
                    # SageMaker reports the stream closing as a ModelStreamError.
                    print(f"Stream closed: {type(e).__name__}")
                    break
                value = getattr(event, "value", None)
                if not hasattr(value, "bytes_"):
                    break
                message = json.loads(value.bytes_)
                if message["type"] == "Begin":
                    print(f"Session {message['id']}")
                elif message["type"] == "Turn":
                    label = "final  " if message["end_of_turn"] else "partial"
                    print(f"{label} {message['transcript']}")
                elif message["type"] == "Error":
                    print(f"Error {message['error_code']}: {message['error']}")
                elif message["type"] == "Termination":
                    print(f"Done: {message['audio_duration_seconds']} s of audio")
                    break
        finally:
            sender.cancel()
            await asyncio.gather(sender, return_exceptions=True)
            with contextlib.suppress(Exception):
                await asyncio.wait_for(stream.close(), 2)


asyncio.run(main(sys.argv[1], sys.argv[2]))
```

**3. Run it**

```bash theme={null}
AWS_DEFAULT_REGION=us-east-1 python stream.py assemblyai-streaming audio.wav
```

To convert a file to 16 kHz mono PCM, run `ffmpeg -i input.mp3 -ac 1 -ar 16000 -sample_fmt s16 audio.wav`.

Everything inside the stream is the same as on the hosted API: messages, their fields, and the [session options](https://assemblyai.com/docs/streaming/api-spec/streaming-websocket.md). What differs is the transport:

| | Hosted API | SageMaker |
| - | - | - |
| Connect to | `wss://streaming.assemblyai.com/v3/ws` | `https://runtime.sagemaker.<region>.amazonaws.com:8443`. Without `:8443`, the client hangs. |
| Authenticate with | API key or temporary token | AWS IAM credentials (SigV4) |
| Session options | WebSocket query parameters | `ModelQueryString`, URL-encoded with `%20` for spaces, at most 2,048 characters. Send a long `prompt` or `keyterms_prompt` in an `UpdateConfiguration` message before any audio. |
| Audio and control messages | Binary and text WebSocket frames | Payload parts with `DataType` `BINARY` and `UTF8`. Send PCM in 20 to 1,000 ms messages. |
| Session end | WebSocket close code | `ModelStreamError` from the SDK, also after a normal `Termination` |
| Maximum session length | 3 hours | 30 minutes |

Use one SDK client, and so one HTTP/2 connection, per concurrent stream; streams that share a client can stall. `language_codes` takes specific languages, such as `["en","es"]`; `multi` isn't supported on this endpoint. The samples repository has a fuller [file client](https://github.com/AssemblyAI-Solutions/assemblyai-sagemaker-samples/blob/main/stt-3-7-realtime-agent/examples/stream_file.py) and a [microphone client](https://github.com/AssemblyAI-Solutions/assemblyai-sagemaker-samples/blob/main/stt-3-7-realtime-agent/examples/stream_mic.py).

The model detects the end of each turn itself; `mode` (`balanced`, `min_latency` or `max_accuracy`) sets how it trades latency against accuracy. If your voice agent runs its own turn detection, such as a voice activity detector or push-to-talk, open the stream with `mode=manual` instead and send `{"type": "ForceEndpoint"}` when it decides the user has stopped talking. AssemblyAI-STT-3.7-Realtime-Agent then ends the turn there and returns its final transcript right away. The file client's `--force-endpoint` option shows this. See [Turn detection](https://assemblyai.com/docs/streaming/turn-detection.md).

## Transcribe a file

The same endpoint transcribes complete files with `InvokeEndpoint`:

```python theme={null}
import json

import boto3

smr = boto3.client("sagemaker-runtime", region_name="us-east-1")
response = smr.invoke_endpoint(
    EndpointName="assemblyai-streaming",
    ContentType="audio/wav",
    Body=open("audio.wav", "rb").read(),
    CustomAttributes=json.dumps({"keyterms_prompt": ["LibriVox"]}),
)
result = json.loads(response["Body"].read())
print(result["text"])
```

The body can be a WAV, FLAC, OGG or MP3 file, or raw PCM with `ContentType` `audio/l16`. The response holds `text` and each final turn with its words and timestamps. `InvokeEndpoint` allows 60 seconds per request, which suits files of about a minute. For longer recordings, or many files in Amazon S3, use a [batch transform job](https://github.com/AssemblyAI-Solutions/assemblyai-sagemaker-samples/tree/main/stt-3-7-realtime-agent#batch-transform), on `ml.g6e.xlarge` for AssemblyAI-STT-3.7-Realtime-Agent or `ml.g5.2xlarge` for Universal-3.6 Pro.

## Capacity and scaling

Unlike the hosted API, an endpoint has a fixed capacity, set per GPU; a whole-file request uses a session while it's transcribed, and an instance with N GPUs takes N times as many. Concurrent sessions per GPU for latency-sensitive voice agents:

| GPU | Instance types | AssemblyAI-STT-3.7-Realtime-Agent | Universal-3.6 Pro |
| - | - | - | - |
| RTX PRO 6000 | `ml.g7e.*` | 90 | 64 to 96; raise `MAX_OPEN_STREAMS` from its default of 32 |
| L40S | `ml.g6e.*` | 40 | 32 on `4xlarge` and larger, 24 on `2xlarge` and `12xlarge`, 16 on `xlarge` |
| RTX PRO 4500 | `ml.g7.*` | 25 | 16 to 24; lower `MAX_OPEN_STREAMS` to 24 |
| A10G | `ml.g5.*` | Not supported | 8; lower `MAX_OPEN_STREAMS` from its default of 32 |

AssemblyAI-STT-3.7-Realtime-Agent refuses new sessions only above a fixed limit per GPU: 350 on RTX PRO 6000, 175 on L40S and 32 on RTX PRO 4500. `MAX_OPEN_STREAMS` has no effect on it. Below the limit, an endpoint with too many sessions keeps accepting them and gets slower, so run enough instances for your peak at the figures above. Universal-3.6 Pro refuses sessions above `MAX_OPEN_STREAMS`. Measure with your own audio and traffic before you go to production.

A stream routed to a full instance receives `Begin`, then an `Error` with `error_code` `3005` a few seconds later. A whole-file request gets HTTP 400 with a `3005` message. Neither is billed; retry with a short backoff.

To scale out, add instances by hand with `UpdateEndpointWeightsAndCapacities`, or register the variant with [Application Auto Scaling](https://docs.aws.amazon.com/sagemaker/latest/dg/endpoint-auto-scaling.html) and track `SageMakerVariantConcurrentRequestsPerModelHighResolution`, which counts open streams per instance. Set the target below the figure for the instance, such as 70 on one RTX PRO 6000 with AssemblyAI-STT-3.7-Realtime-Agent, because a new instance takes several minutes to start. Real-time endpoints don't scale to zero.

Streams still open on an instance that SageMaker removes when it scales in can end early. Use a long `ScaleInCooldown`, such as 300 seconds, and have clients reopen a stream that ends without `Termination`.

## What's not available

The model package contains the speech model only. Options that need other AssemblyAI services are refused with an `Error` message rather than ignored: PII redaction (`redact_pii`), speaker diarization (`speaker_labels`), noise suppression (`noise_suppression_model`, `voice_focus`), LLM transcript enhancement (`custom_context`, `llm_gateway`), domain-specific correction (`domain`), webhooks, and any `speech_model` other than the model the package serves. Temporary tokens and AssemblyAI API keys don't apply.

## Limits and pricing

| Limit | Value |
| - | - |
| Stream duration | 30 minutes per stream, set by SageMaker. Open a new stream to continue. |
| `ModelQueryString` | 2,048 characters once URL-encoded, set by SageMaker |
| Audio per message | 20 to 1,000 ms for PCM encodings |
| Whole-file request | 60 seconds per `InvokeEndpoint` request, set by SageMaker |

You pay two charges, both on your AWS bill:

* **AssemblyAI software charge**, per hour of audio processed, at the price on the AWS Marketplace listing. Usage is billed in steps of 0.000001 hour (3.6 ms). Sessions refused at capacity or for invalid options aren't billed. Batch transform jobs are priced per instance-hour instead, as shown on the listing. Usage is also written to CloudWatch in your account, under the namespace `AssemblyAI/STT-3.7-Realtime-Agent` or `AssemblyAI/Universal-3.6-Pro-Realtime`.
* **AWS infrastructure charge** for the instances, at [SageMaker AI real-time inference prices](https://aws.amazon.com/sagemaker/ai/pricing/). The endpoint bills while it runs, even when idle.

For committed volume, ask your AssemblyAI representative about an AWS Marketplace private offer.

## Troubleshooting

Start with the container logs in the CloudWatch log group `/aws/sagemaker/Endpoints/<endpoint-name>`.

| Symptom | Fix |
| - | - |
| Endpoint `Failed` within minutes with `Request to service failed...` and no log group | A transient SageMaker error. Delete the endpoint and create it again from the same configuration. |
| `ResourceLimitExceeded` or `InsufficientInstanceCapacity` | Request quota for every instance type, or add types to the instance pool. |
| Container exits at startup with a CUDA or driver error | Set `InferenceAmiVersion` to `al2023-ami-sagemaker-inference-gpu-4-1`. AssemblyAI-STT-3.7-Realtime-Agent doesn't run on `ml.g5` or `ml.p5`. |
| Health check times out while the model starts | Set `ContainerStartupHealthCheckTimeoutInSeconds` to `3600` for AssemblyAI-STT-3.7-Realtime-Agent. |
| The streaming client hangs with no response | Add `:8443` to the endpoint URI. |
| An error opening the stream, before `Begin` | `ModelQueryString` is too long or uses `+` for spaces. |
| `ModelError` with status 424 when opening | Retry the stream. |
| `Error` `3006` | Fix the option named in the message. |
| `Error` `3007` | Send PCM in 20 to 1,000 ms messages, at real-time pace. |
| `Termination` never arrives, or audio stalls | Install the tested SDK versions, and use one client per stream. |

## Learn more

The [`assemblyai-sagemaker-samples`](https://github.com/AssemblyAI-Solutions/assemblyai-sagemaker-samples) repository has a folder for each model with runnable examples, a sample notebook that walks through deploying, streaming, transcribing a file, batch transform, usage metrics and clean up, and sample audio.

For questions about the model package, your subscription or a private offer, contact your AssemblyAI representative or [support@assemblyai.com](mailto:support@assemblyai.com).
