Skip to content

Deepgram

Nuget package dotnet License: MIT Discord

Features 🔥

  • Fully generated C# SDK based on official Deepgram OpenAPI specification using AutoSDK
  • Same day update to support new features
  • Updated and supported automatically if there are no breaking changes
  • All modern .NET features - nullability, trimming, NativeAOT, etc.
  • Support .Net Framework/.Net Standard 2.0

Usage

1
2
3
using Deepgram;

using var client = new DeepgramClient(apiKey);

Generate

Basic example showing how to create a client and make a request.

1
using var client = new DeepgramClient(apiKey);

Speech To Text Client Get Text Async

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
using var client = new DeepgramClient(apiKey);
ISpeechToTextClient speechClient = client;

// Transcribe audio using the MEAI ISpeechToTextClient interface.
// Deepgram requires an audio URL via RawRepresentationFactory.
using var dummyStream = new MemoryStream();
var response = await speechClient.GetTextAsync(dummyStream, new SpeechToTextOptions
{
    ModelId = "nova-3",
    RawRepresentationFactory = _ => new ListenV1RequestUrl
    {
        Url = "https://dpgr.am/spacewalk.wav",
    },
});

Console.WriteLine($"Text: {response.Text}");

Speech To Text Client Get Service Metadata

1
2
3
4
5
using var client = new DeepgramClient("test-api-key");
ISpeechToTextClient speechClient = client;

// Retrieve metadata about the speech-to-text provider.
var metadata = speechClient.GetService<SpeechToTextClientMetadata>();

Support

Priority place for bugs: https://github.com/tryAGI/Deepgram/issues
Priority place for ideas and general questions: https://github.com/tryAGI/Deepgram/discussions
Discord: https://discord.gg/Ca2xhfBf3v

Acknowledgments

JetBrains logo

This project is supported by JetBrains through the Open Source Support Program.