public void CreateVoiceSynthesis(string name, string description, string locale, string inputTextPath, Guid modelId) { Console.WriteLine("Creating batch synthesiss."); var properties = new Dictionary <string, string> { { "ConcatenateResult", "true" } }; var model = ModelIdentity.Create(modelId); var voiceSynthesisDefinition = VoiceSynthesisDefinition.Create(name, description, locale, model, properties); var submitResponse = VoiceAPIHelper.SubmitVoiceSynthesis(voiceSynthesisDefinition, inputTextPath, VoiceSynthesisUrl, this.subscriptionKey); }
public async Task<Uri> CreateVoiceSynthesis(string name, string description, string locale, string outputFormat, string inputTextPath, IEnumerable<Guid> modelIds, bool concatenateResult) { Console.WriteLine("Creating batch synthesiss."); var properties = new Dictionary<string, string>(); if (concatenateResult) { properties.Add("ConcatenateResult", "true"); } var voiceSynthesisDefinition = VoiceSynthesisDefinition.Create(name, description, locale, outputFormat, modelIds, properties); using (var submitResponse = VoiceAPIHelper.SubmitVoiceSynthesis(voiceSynthesisDefinition, inputTextPath, VoiceSynthesisUrl, this.subscriptionKey)) { return await GetLocationFromPostResponseAsync(submitResponse).ConfigureAwait(false); } }