Last active
April 9, 2024 18:55
-
-
Save dvonthenen/7632e33e954c73d5def15bf59cadf728 to your computer and use it in GitHub Desktop.
[.NET v4] Code tutorial: Transcribe pre-recorded audio
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Step 1: Is the same | |
Step 2: Is the same | |
Step 3: Same | |
Step 4: Same | |
Step 5: Please see program.cs below | |
Step 6: Same | |
Step 7: Same |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Text.Json; | |
using Deepgram.Models.PreRecorded.v1; | |
namespace MyProgram | |
{ | |
class Program | |
{ | |
static async Task Main(string[] args) | |
{ | |
// Initialize Library with default logging | |
// Normal logging is "Info" level | |
Library.Initialize(); | |
// Set your Deepgram API KEY below | |
var deepgramClient = new PreRecordedClient("Set DEEPGRAM_API_KEY here"); | |
var response = await deepgramClient.TranscribeUrl( | |
new UrlSource("https://static.deepgram.com/examples/Bueller-Life-moves-pretty-fast.wav"), | |
new PrerecordedSchema() | |
{ | |
Model = "nova-2", | |
}); | |
Console.WriteLine(JsonSerializer.Serialize(response)); | |
// Teardown Library | |
Library.Terminate(); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment