#how to use deepgram websocket , do i have to upgrade plan to access

1 messages · Page 1 of 1 (latest)

marsh birch
#

how to use deepgram websocket , do i have to upgrade plan to access

loud rainBOT
#

Hey there! This channel allows you to ask Kapa.ai for assistance. But it looks like you haven't connected your Discord profile to your Deepgram account yet. You can do so at https://community.deepgram.com - by doing so, you'll be able to ask questions in #1115960287183511643 if you need human assistance!

odd shuttleBOT
#

Hi @marsh birch. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:

#

You do not need to upgrade your plan to access Deepgram’s WebSocket APIs for speech-to-text (STT) or text-to-speech (TTS). Deepgram offers free credits when you sign up, which allow you to use all features, including real-time streaming via WebSocket, without requiring an immediate upgrade. You only need to upgrade if you require higher usage limits, enterprise features, or self-hosted deployments.

How to use Deepgram WebSocket:

  1. Get an API Key:
    Sign up at Deepgram and create an API key from the console. This key is required for authentication.

  2. Connect via WebSocket:
    For STT, connect to wss://api.deepgram.com/v1/listen with your API key for authentication. For TTS, use the appropriate endpoint (e.g., /speak for TTS). You can authenticate using the Authorization header or, in browser environments, the Sec-WebSocket-Protocol header.

    Example (Node.js, STT):

    const WebSocket = require("ws");
    const apiKey = "YOUR_DEEPGRAM_API_KEY";
    const ws = new WebSocket("wss://api.deepgram.com/v1/listen", {
      headers: { Authorization: `Token ${apiKey}` }
    });
    
    ws.on("open", () => {
      // Send audio data here
    });
    
    ws.on("message", (data) => {
      // Handle transcription results
    });
    

    See full example

    Example (Browser, using Sec-WebSocket-Protocol):
    Set the Sec-WebSocket-Protocol header to token, YOUR_DEEPGRAM_API_KEY when creating the WebSocket connection.
    See protocol details

  3. Send Audio/Text Data:
    For STT, stream audio data to the WebSocket. For TTS, send text data.

#
  1. Receive Results:
    Listen for messages on the WebSocket to receive transcriptions (STT) or audio data (TTS).

Plan Requirements:

  • You can use the WebSocket APIs with the free credits provided at signup.
  • Upgrade is only necessary for higher usage, enterprise features, or self-hosted deployments.
    See pricing and plan details

Summary:
You can start using Deepgram’s WebSocket APIs immediately after signing up and obtaining an API key—no plan upgrade is required for basic access and development.

Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: