-
Notifications
You must be signed in to change notification settings - Fork 32
/
Copy pathProgram.cs
36 lines (30 loc) · 1.08 KB
/
Program.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
// Copyright 2024 Deepgram .NET SDK contributors. All Rights Reserved.
// Use of this source code is governed by a MIT license that can be found in the LICENSE file.
// SPDX-License-Identifier: MIT
using Deepgram.Models.Speak.v1.REST;
namespace SampleApp
{
class Program
{
static async Task Main(string[] args)
{
// Initialize Library with default logging
// Normal logging is "Info" level
Library.Initialize();
// use the client factory with a API Key set with the "DEEPGRAM_API_KEY" environment variable
var deepgramClient = ClientFactory.CreateSpeakRESTClient();
var response = await deepgramClient.ToFile(
new TextSource("Hello World!"),
"test.mp3",
new SpeakSchema()
{
Model = "aura-asteria-en",
});
//Console.WriteLine(response);
Console.WriteLine(response);
Console.ReadKey();
// Teardown Library
Library.Terminate();
}
}
}