Skip to main content
Cerebrium’s partnership with Deepgram enables simple deployment of speech-to-text (STT) services with simplified configuration and independent scaling.
Using Deepgram services requires an Enterprise Deepgram account and API key for self-hosted models. Contact Deepgram support to access this feature.Obtain links to the Deepgram model files referenced below (file extension .dg) from the Deepgram Account Representative.Consult the Deepgram representative on how to achieve parity with the Deepgram API.
Deepgram Partner Service is available from CLI version 1.39.0 and greater
The Deepgram Partner Service is in beta. It’s available to all users and ready for production workloads, but expect occasional rough edges while the integration matures. Reach out to support if you hit any issues.

Setup

  1. Create a Cerebrium app with the CLI:
  1. Create a self-hosted API key from the Deepgram dashboard. Navigate to the Secrets tab in the Cerebrium dashboard and add the API key with the name DEEPGRAM_API_KEY. This secret automatically becomes available as an environment variable in the deployment.
  2. Download model files from Deepgram’s self-hosted section in the Deepgram dashboard using the guide available, here. Select the ‘license proxy’ deployment type. Upload downloaded model files using the links provided by your Account Representative (with .dg extension) to persistent-storage in the /deepgram-models folder. This folder automatically attaches to the engine container. Use this command to upload the files:
The deepgram-models directory remains at the root level of persistent storage and is shared across all Deepgram apps in the project. Configuration files (api.toml and engine.toml), however, must be placed under the app name directory (see steps 4 and 5 below).
  1. Create a file named engine.toml with the following content and upload to your persistent storage under the app name directory (e.g., {appName}/engine.toml). These are the default settings. Adjust as needed. For example, if your app is named deepgram:
  1. Create a file named api.toml with the following content and upload to your persistent storage under the app name directory (e.g., {appName}/api.toml). These are the default settings. Adjust as needed. For example, if your app is named deepgram:
  1. Update cerebrium.toml with the following configuration for hardware, scaling, region, and other settings:
  1. Run cerebrium deploy. After deployment, an endpoint for the Deepgram services appears in the terminal output. The URL is also available on the app’s overview page in the dashboard.
  2. Download an example audio file for use with the deepgram service:
  1. Call the Deepgram endpoint with appropriate parameters:
Parameters accepted by the Deepgram service can be found in the speech-to-text API reference.
If ‘disable_auth’ in cerebrium.toml is set to false, include the inference token in the Authorization header to authenticate with the Cerebrium service. The Deepgram API key is pulled automatically from secrets.

API Key Configuration

To use Deepgram services:
  1. Sign up at deepgram.com
  2. Create an API key in the Deepgram dashboard
  3. Add the API key to Cerebrium:
  • Navigate to Secrets tab in the Cerebrium dashboard
  • Add the Deepgram API key as an app-specific or project-wide secret named DEEPGRAM_API_KEY
  • This secret automatically becomes available as an environment variable in the deployment

Scaling and Concurrency

Deepgram services support independent scaling configurations:
  • min_replicas: Minimum number of instances to maintain (0 for scale-to-zero)
  • max_replicas: Maximum number of instances that can be created during high load
  • replica_concurrency: Number of concurrent requests each instance can handle
  • cooldown: Time window (in seconds) that must pass at reduced concurrency before scaling down
Adjust these parameters based on traffic patterns and latency requirements.

Usage Examples

Cerebrium runs both Deepgram STT models and applications on the same network alongside LiveKit workers, reducing latency by approximately 400ms—a significant advantage for voice agent applications. For a complete implementation reference, see the LiveKit Outbound Agent example.