Skip to main content
DeploymentsKubernetes

Realtime

Learn about the Kubernetes deployment options for Realtime

Quickstart​

Install​

Once the prerequisites are in place, create a values.yaml file with your configuration. It must at least set the hostname that clients connect to:

proxy:
ingress:
hostname: speechmatics.example.com

This example uses the default Ingress. If you use Gateway API, use the HTTPRoute values from Gateway API instead. For more options, see Configuration.

Then install the chart:

# Install the sm-realtime chart
helm upgrade --install speechmatics-realtime \
oci://speechmaticspublic.azurecr.io/sm-charts/sm-realtime \
--version 1.5.0 \
-f values.yaml

proxy.ingress.url Helm value is deprecated in favour of proxy.ingress.hostname for configuring the Ingress hostname. Existing deployments remain compatible: if proxy.ingress.hostname is not set, the chart continues to honour proxy.ingress.url as a fallback.

Validate​

Capacity check​

With the default values, the chart deploys an English transcriber and an enhanced inference server. You can confirm whether they are available using:

kubectl get sessiongroups

When the transcribers and inference servers have started and registered, CAPACITY shows a non-zero value. Inference servers can take several minutes to load their models.

NAME                                REPLICAS   CAPACITY   USAGE   VERSION   SPEC HASH
inference-server-enhanced-recipe1 1 480 0 1 b5784af49332f9948481195451eab6ca
rt-transcriber-en 1 2 0 1 83929f2b9b2448cdc818d0e46e37600b

Run a session​

Install the Speechmatics CLI with pip install speechmatics-python. Make sure the hostname you configured resolves to your ingress or gateway, then run a session:

speechmatics rt transcribe \
--url wss://speechmatics.example.com/v2 \
--lang en \
--operating-point enhanced \
--ssl-mode insecure \
<audio-file>

--ssl-mode insecure skips certificate validation, for example with a self-signed certificate. Remove it once a trusted certificate is in place. --operating-point is the CLI option for selecting the model.

To build applications against your deployment, use one of the Speechmatics SDKs and set its url to your deployment's address, for example wss://speechmatics.example.com/v2.

Hardware recommendations​

Below are the recommended Azure node sizes for running Realtime on Kubernetes:

ServiceNode Size
Inference ServerStandard_NC4as_T4_v3
TranscriberStandard_E16s_v5
All Other ServicesStandard_D*s_v5

Configuration​

For all configuration options, refer to the Helm chart README. To view it, run:

helm show readme oci://speechmaticspublic.azurecr.io/sm-charts/sm-realtime --version 1.5.0

See the examples below on how to configure the Helm chart for different deployment scenarios. To pull images from your own registry, see Private registry.

Serves every language for both the standard and enhanced models from a single inference server. This requires a GPU with a large amount of memory, such as an L40S or H100.

values.yaml
global:
transcriber:
languages: ["ar", "ba", "be", "bg", "bn", "ca", "cmn", "cmn_en", "cmn_en_ms_ta", "cs", "cy", "da", "de", "el", "en", "en_ms", "en_ta", "eo", "es", "es-bilingual-en", "et", "eu", "fa", "fi", "fr", "ga", "gl", "he", "hi", "hr", "hu", "ia", "id", "it", "ja", "ko", "lt", "lv", "mn", "mr", "ms", "mt", "nl", "no", "pl", "pt", "ro", "ru", "sk", "sl", "sv", "sw", "ta", "th", "tl", "tr", "ug", "uk", "ur", "vi", "yue"]

# Disable the default enhanced inference server recipe
inferenceServerEnhancedRecipe1:
enabled: false

# Enable the all-language inference server
inferenceServerAll:
enabled: true

tritonServer:
# Raise the GPU memory pool to fit all-language models.
# Tune to the GPU you are targeting
memoryPool:
cudaByteSize: "8000000000"

Models​

Models (previously called operating points) are configured with model keys in the Helm chart values, for example registerFeatures.model on an inference server. model replaces the older operatingPoint keys. operatingPoint is deprecated but still works as a fallback and accepts the same standard and enhanced values. It will be removed in the next major version of the chart (2.0.0), so use model going forward.

If both are set, model takes precedence, but only when it is not empty. Setting model: "" does not clear an inherited operatingPoint.

Version selection​

When transcribers and inference servers of different versions run side by side, for example during an upgrade, the resource manager only pairs a transcriber with a compatible inference server. Configure the preferred versions with resourceManager.config.rtWorkersVersionConfig:

resourceManager:
config:
rtWorkersVersionConfig:
legacy:
"1": { v: "17.0.0", compatibility: major }
"2": { v: "16.0.0", compatibility: major }
"3": { v: "15.0.0", compatibility: major }
  • Entries are tried in order
  • compatibility is exact, major (same major version) or any
  • legacy covers the standard and enhanced models

The default shown above routes any 17.x, 16.x or 15.x version, preferring 17.x. If you run a version outside this range, add it to rtWorkersVersionConfig.

Upgrade​

Helm does not upgrade CustomResourceDefinitions (CRDs). Before you upgrade the chart, update the sessiongroups CRD:

helm show crds oci://speechmaticspublic.azurecr.io/sm-charts/sm-realtime \
--version 1.5.0 | kubectl apply --server-side -f -

Server-side apply avoids the metadata.annotations: Too long error that client-side apply returns for this CRD.

Then upgrade the chart with the same helm upgrade --install command and values you used to install it, with the new --version.

To roll back to the previous chart version, run helm rollback speechmatics-realtime. This does not roll back the sessiongroups CRD.

Upgrading to 1.5.0​

  • The default Ingress no longer adds a Request-Id response header, so ingress-nginx no longer needs snippet annotations enabled. To keep the header, see Request ID
  • operatingPoint values keep working until chart 2.0.0. See Models to move to model

Uninstall​

Run the following command to uninstall Realtime from the cluster:

helm uninstall speechmatics-realtime

Depending on the configuration setup, you may also need to remove PVCs created from the redis deployment:

# Delete any left-over PVCs with `kubectl delete pvc`
kubectl get pvc | grep redis-data