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
- Create a Cerebrium app with the CLI:
-
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. -
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
.dgextension) to persistent-storage in the/deepgram-modelsfolder. 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).-
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 nameddeepgram:
-
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 nameddeepgram:
- Update
cerebrium.tomlwith the following configuration for hardware, scaling, region, and other settings:
-
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. - Download an example audio file for use with the deepgram service:
- Call the Deepgram endpoint with appropriate parameters:
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:- Sign up at deepgram.com
- Create an API key in the Deepgram dashboard
- 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