From c3f8e9079893b3a4437c64b732f33904dd631233 Mon Sep 17 00:00:00 2001 From: dvonthenen Date: Tue, 23 Jan 2024 18:17:23 -0800 Subject: [PATCH] Implement Metadata for Live, Missing Fields in Metadata for Prerecorded --- Deepgram/Models/LiveTranscriptionMetaData.cs | 26 ++++++++++++ Deepgram/Models/ModelInfo.cs | 26 ++++++++++++ .../PrerecordedTranscriptionMetaData.cs | 40 ++++++++++++++++++- 3 files changed, 91 insertions(+), 1 deletion(-) create mode 100644 Deepgram/Models/LiveTranscriptionMetaData.cs create mode 100644 Deepgram/Models/ModelInfo.cs diff --git a/Deepgram/Models/LiveTranscriptionMetaData.cs b/Deepgram/Models/LiveTranscriptionMetaData.cs new file mode 100644 index 00000000..17d425cb --- /dev/null +++ b/Deepgram/Models/LiveTranscriptionMetaData.cs @@ -0,0 +1,26 @@ +using Newtonsoft.Json; +using System; + +namespace Deepgram.Models +{ + public class LiveTranscriptionMetaData + { + /// + /// Unique identifier for the submitted audio and derived data returned. + /// + [JsonProperty("request_id")] + public string Id { get; set; } + + /// + /// Unique identifier for the submitted audio and derived data returned. + /// + [JsonProperty("model_uuid")] + public string ModelUuid { get; set; } + + /// + /// Info about the Model + /// + [JsonProperty("model_info")] + public ModelInfo ModelInfo { get; set; } + } +} diff --git a/Deepgram/Models/ModelInfo.cs b/Deepgram/Models/ModelInfo.cs new file mode 100644 index 00000000..8fdf70ca --- /dev/null +++ b/Deepgram/Models/ModelInfo.cs @@ -0,0 +1,26 @@ +using System; +using Newtonsoft.Json; + +namespace Deepgram.Models +{ + public class ModelInfo + { + /// + /// Name of the Model + /// + [JsonProperty("name")] + public string Name { get; set; } + + /// + /// Version of the Model + /// + [JsonProperty("version")] + public string Version { get; set; } + + /// + /// Architecture of the Model + /// + [JsonProperty("arch")] + public string Arch { get; set; } + } +} diff --git a/Deepgram/Models/PrerecordedTranscriptionMetaData.cs b/Deepgram/Models/PrerecordedTranscriptionMetaData.cs index a79fead0..812da9ac 100644 --- a/Deepgram/Models/PrerecordedTranscriptionMetaData.cs +++ b/Deepgram/Models/PrerecordedTranscriptionMetaData.cs @@ -45,7 +45,45 @@ public class PrerecordedTranscriptionMetaData /// Warnings to provide feedback about unsupported and deprecated queries. /// [JsonProperty("warnings")] - public Warning[] Warnings { get; set; } + public Warning[] Warnings { get; set; } + + /// + /// Models used in this API Request + /// + [JsonProperty("models")] + public Guid[] Models { get; set; } + + /// + /// Info about the Model + /// + [JsonProperty("model_info")] + public ModelInfo ModelInfo { get; set; } + + /* + /// + /// Intent tokens used in API Request + /// + [JsonProperty("intents_info")] + public IntentsInfo IntentsInfo { get; set; } = null; + + /// + /// Summary tokens used in API Request + /// + [JsonProperty("summary_info")] + public SummaryInfo SummaryInfo { get; set; } = null; + + /// + /// Sentiment tokens used in API Request + /// + [JsonProperty("sentiment_info")] + public SentimentInfo SentimentInfo { get; set; } = null; + + /// + /// Topic tokens used in API Request + /// + [JsonProperty("topics_info")] + public TopicsInfo TopicsInfo { get; set; } = null; + */ /// /// Allows labeling your requests for the purpose of identification during usage reporting.