예제 #1
0
        public async Task <IHttpActionResult> ToSpeech(string text)
        {
            if (text == null)
            {
                return(BadRequest("Null query"));
            }
            try
            {
                var result = await TextToSpeechManager.GenerateSpeechWithDefaultSettings(text);

                return(Ok(result));
            }
            catch (Exception ex)
            {
                return(BadRequest(ex.Message));
            }
        }