Esempio n. 1
0
        public Task <Uri> PostTranscriptionAsync(string name, string description, string locale, Uri recordingsUrl)
        {
            var path = $"{SpeechToTextBasePath}Transcriptions/";
            var transcriptionDefinition = TranscriptionDefinition.Create(name, description, locale, recordingsUrl);

            return(PostAsJsonAsync(path, transcriptionDefinition));
        }
Esempio n. 2
0
        public Task <Uri> PostTranscriptionAsync(string name, string description, string locale, Uri recordingsUrl, IEnumerable <Guid> modelIds)
        {
            var modelIdsList = modelIds.ToList();

            if (!modelIdsList.Any())
            {
                return(PostTranscriptionAsync(name, description, locale, recordingsUrl));
            }

            var models = modelIdsList.Select(ModelIdentity.Create).ToList();
            var path   = $"{SpeechToTextBasePath}Transcriptions/";

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

            return(PostAsJsonAsync(path, transcriptionDefinition));
        }