Deepgram 1.0.0-beta2

This is a prerelease version of Deepgram.
There is a newer version of this package available.
See the version list below for details.
dotnet add package Deepgram --version 1.0.0-beta2
                    
NuGet\Install-Package Deepgram -Version 1.0.0-beta2
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Deepgram" Version="1.0.0-beta2" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Deepgram" Version="1.0.0-beta2" />
                    
Directory.Packages.props
<PackageReference Include="Deepgram" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Deepgram --version 1.0.0-beta2
                    
#r "nuget: Deepgram, 1.0.0-beta2"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#addin nuget:?package=Deepgram&version=1.0.0-beta2&prerelease
                    
Install Deepgram as a Cake Addin
#tool nuget:?package=Deepgram&version=1.0.0-beta2&prerelease
                    
Install Deepgram as a Cake Tool

Deepgram .NET SDK

Nuget Build Status Contributor Covenant

Installation

To install the C# client library using NuGet:

Run the following command from your terminal in your projects directory:

dotnet add package Deepgram

Targeted Frameworks

  • 6.0.0
  • 5.0.0
  • .NET Core 3.1

Configuration

To setup the configuration of the Deepgram Client you can do one of the following:

  • Create a Deepgram Client instance and pass in credentials in the constructor.
var credentials = new Credentials(YOUR_DEEPGRAM_API_KEY);
var deepgramClient = new DeepgramClient(credentials);

Or

  • Provide the Deepgram API key and optional API Url in appsettings.json:
{
  "appSettings": {
    "Deepgram.Api.Key": "YOUR_DEEPGRAM_API_KEY",
    "Deepgram.Api.Uri": "https://api.deepgram.com"
  }
}

Note: In the event multiple configuration files are found, the order of precedence is as follows:

* ```appsettings.json``` which overrides
* ```settings.json```

Or

  • Access the Configuration instance and set the appropriate key in your code for example:
Configuration.Instance.Settings["appSettings:Deepgram.Api.Key"] = "YOUR_DEEPGRAM_API_KEY";
Configuration.Instance.Settings["appSettings:Deepgram.Api.Uri"] = "https://api.deepgram.com";

Logging

The Library uses Microsoft.Extensions.Logging to preform all of it's logging tasks. To configure logging for you app simply create a new ILoggerFactory and call the LogProvider.SetLogFactory() method to tell the Deepgram library how to log. For example, to log to the console with serilog you can do the following:

using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Configuration;
using Deepgram.Logger;
using Serilog;

var log = new LoggerConfiguration()
    .MinimumLevel.Debug()
    .WriteTo.Console(outputTemplate: "{Timestamp:HH:mm} [{Level}]: {Message}\n")
    .CreateLogger();
var factory = new LoggerFactory();
factory.AddSerilog(log);
LogProvider.SetLogFactory(factory);

Examples

Sending a Remote File for Transcription

var credentials = new Credentials(DEEPGRAM_API_KEY);

var deepgramClient = new DeepgramClient(credentials);

var response = await deepgramClient.Transcription.GetPrerecordedTranscriptionAsync(
    new Deepgram.Transcription.UrlSource("https://static.deepgram.com/examples/Bueller-Life-moves-pretty-fast.wav"),
    new Deepgram.Transcription.PrerecordedTranscriptionOptions()
    {
        Punctuate = true
    });

Sending a Local File for Transcription

var credentials = new Credentials(DEEPGRAM_API_KEY);

var deepgramClient = new DeepgramClient(credentials);

using (FileStream fs = File.OpenRead("path\\to\\file"))
{
    var response = await deepgramClient.Transcription.GetPrerecordedTranscriptionAsync(
        new Deepgram.Transcription.StreamSource(
            fs,
            "audio/wav"),
        new Deepgram.Transcription.PrerecordedTranscriptionOptions()
        {
            Punctuate = true
        });
}

Development and Contributing

Interested in contributing? We ❤️ pull requests!

To make sure our community is safe for all, be sure to review and agree to our Code of Conduct. Then see the Contribution guidelines for more information.

Getting Help

We love to hear from you so if you have questions, comments or find a bug in the project, let us know! You can either:

Further Reading

Check out the Developer Documentation at https://developers.deepgram.com/

Product Compatible and additional computed target framework versions.
.NET net5.0 is compatible.  net5.0-windows was computed.  net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed. 
.NET Core netcoreapp3.1 is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (2)

Showing the top 2 NuGet packages that depend on Deepgram:

Package Downloads
Fsel.Core

Fsel Core Package

fAI

Fred's experimentation with AI

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
5.2.0 681 4/14/2025
5.1.2 9,953 3/3/2025
5.1.1 1,613 2/13/2025
5.1.0 579 2/11/2025
5.0.0 3,066 2/3/2025
4.4.1 5,585 12/20/2024
4.4.0 19,068 11/4/2024
4.3.6 15,011 10/2/2024
4.3.5 306 9/27/2024
4.3.4 447 9/26/2024
4.3.3 188 9/24/2024
4.3.2 26,072 9/18/2024
4.2.0 5,420 8/14/2024
4.1.0 15,004 7/15/2024
4.0.3 4,843 7/9/2024
4.0.2 7,241 6/11/2024
4.0.1 10,544 4/24/2024
4.0.0 192 4/22/2024
3.4.2 24,557 3/29/2024
3.4.1 8,079 2/13/2024
3.4.0 42,723 9/26/2023
3.3.0 1,353 9/14/2023
3.2.0 2,266 8/28/2023
3.1.0 2,214 8/14/2023
2.2.0 19,032 7/20/2023
2.1.0 4,091 6/30/2023
2.0.0 8,759 4/12/2023
1.13.0 1,511 1/17/2023
1.12.0 834 12/13/2022
1.11.1 624 11/30/2022
1.10.0 2,306 11/15/2022
1.9.0 918 10/30/2022
1.8.0 807 10/6/2022
1.7.1 739 10/1/2022
1.7.0 716 9/27/2022
1.6.0 755 9/20/2022
1.5.1 755 9/2/2022
1.4.1 792 8/17/2022
1.4.0 797 7/14/2022
1.3.1 764 7/1/2022
1.2.0 869 4/20/2022
1.1.0 1,088 2/4/2022
1.0.0 674 12/20/2021
1.0.0-beta2 632 11/22/2021
1.0.0-beta1 709 11/21/2021