-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* updates to readme * adds summarize v2 * adds NullValueHandling to ignore response null values * example program.cs updated for remote and local file * add Newtonsoft.json * adds warning object * adds warning * formatting * feat: filler_words for SDK v2 * fix: remove user agent from live client for SDK v2 --------- Co-authored-by: Brian Barrow <[email protected]> Co-authored-by: John Vajda <[email protected]> Co-authored-by: Sandra Rodgers <[email protected]> Co-authored-by: Sandra Rodgers <[email protected]>
- Loading branch information
1 parent
d6b3f57
commit 01ed28f
Showing
12 changed files
with
112 additions
and
24 deletions.
There are no files selected for viewing
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
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
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
using System; | ||
using Newtonsoft.Json; | ||
using Newtonsoft.Json.Converters; | ||
|
||
namespace Deepgram.Transcription | ||
{ | ||
public class Warning | ||
{ | ||
/// <summary> | ||
/// Parameter sent in the request that resulted in the warning | ||
/// </summary> | ||
[JsonProperty("parameter")] | ||
public string Parameter { get; set; } | ||
|
||
/// <summary> | ||
/// The type of warning | ||
/// </summary> | ||
[JsonProperty("type")] | ||
[JsonConverter(typeof(StringEnumConverter))] | ||
public WarningType Type { get; set; } | ||
|
||
/// <summary> | ||
/// The warning message | ||
/// </summary> | ||
[JsonProperty("message")] | ||
public string Message { get; set; } | ||
|
||
} | ||
} | ||
|
||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
using System; | ||
using System.Runtime.Serialization; | ||
|
||
namespace Deepgram.Transcription | ||
{ | ||
public enum WarningType | ||
|
||
{ | ||
[EnumMember(Value = "unsupported_language")] | ||
UnsupportedLanguage, | ||
|
||
[EnumMember(Value = "unsupported_model")] | ||
UnsupportedModel, | ||
|
||
[EnumMember(Value = "unsupported_encoding")] | ||
UnsupportedEncoding, | ||
|
||
[EnumMember(Value = "deprecated")] | ||
Deprecated | ||
} | ||
} | ||
|
||
|
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,24 @@ | ||
using Deepgram.Transcription; | ||
using Newtonsoft.Json; | ||
|
||
namespace SampleApp | ||
{ | ||
class Program | ||
{ | ||
const string API_KEY = "DEEPGRAM_API_KEY"; | ||
const string API_KEY = ""; | ||
|
||
static async Task Main(string[] args) | ||
{ | ||
DeepgramClient deepgram = new DeepgramClient(new Credentials(API_KEY)); | ||
var response = await deepgram.Transcription.Prerecorded.GetTranscriptionAsync( | ||
new UrlSource("https://static.deepgram.com/examples/Bueller-Life-moves-pretty-fast.wav"), | ||
new UrlSource("https://www.happyhourspanish.com/wp-content/uploads/podcasts/HHS_Podcast_Soccer_Eurocup.mp3"), | ||
new PrerecordedTranscriptionOptions() | ||
{ | ||
Punctuate = true, | ||
Utterances = true, | ||
Redaction = new [] { "pci", "ssn" } | ||
Summarize = "v2", | ||
DetectLanguage = true | ||
}); | ||
|
||
Console.Write(response.ToWebVTT()); | ||
Console.WriteLine(JsonConvert.SerializeObject(response)); | ||
} | ||
} | ||
} |
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
Binary file not shown.