Exemple #1
0
        public Task <Uri> PostTranscriptionAsync(string name, string description, string locale, Uri recordingsUrl, bool AddDiarization)
        {
            var path = $"{this.speechToTextBasePath}transcriptions/";
            var transcriptionDefinition = TranscriptionDefinition.Create(name, description, locale, recordingsUrl, AddDiarization);

            return(this.PostAsJsonAsync <TranscriptionDefinition>(path, transcriptionDefinition));
        }
Exemple #2
0
 public static TranscriptionDefinition Create(
     string name,
     string description,
     string locale,
     Uri recordingsUrl,
     bool AddDiarization)
 {
     return(TranscriptionDefinition.Create(name, description, locale, recordingsUrl, null, AddDiarization));
 }
Exemple #3
0
        public Task <Uri> PostTranscriptionAsync(string name, string description, string locale, Uri recordingsUrl, IEnumerable <Guid> modelIds, bool AddDiarization)
        {
            if (!modelIds.Any())
            {
                return(this.PostTranscriptionAsync(name, description, locale, recordingsUrl, AddDiarization));
            }

            var models = modelIds.Select(m => ModelIdentity.Create(m)).ToList();
            var path   = $"{this.speechToTextBasePath}transcriptions/";

            var transcriptionDefinition = TranscriptionDefinition.Create(name, description, locale, recordingsUrl, models, AddDiarization);

            return(this.PostAsJsonAsync <TranscriptionDefinition>(path, transcriptionDefinition));
        }