INTEGRITY Dokumentace

Deepgram

Deepgram poskytuje Voice AI API pro převod řeči na text, převod textu na řeč a hlasové agenty.

Endpoint

https://gateway.ai.cloudflare.com/v1/{account_id}/{gateway_id}/deepgram

Struktura URL

Při zasílání požadavků na Deepgram nahraďte https://api.deepgram.com/ v URL adrese, kterou aktuálně používáte s https://gateway.ai.cloudflare.com/v1/{account_id}/{gateway_id}/deepgram/.

Předpoklady

Při zasílání požadavků na Deepgram se ujistěte, že máte následující:

Příklad

SDK

TS
import { createClient, LiveTranscriptionEvents } from "@deepgram/sdk";


const deepgram = createClient("{deepgram_api_key}", {
    global: {
      websocket: {
        options: {
          url: "wss://gateway.ai.cloudflare.com/v1/{account_id}/{gateway_id}/deepgram/",
          _nodeOnlyHeaders: {
            "cf-aig-authorization": "Bearer {CF_AIG_TOKEN}"
          }
        }
      }
    }
});


const connection = deepgram.listen.live({
    model: "nova-3",
    language: "en-US",
    smart_format: true,
});

connection.send(...);