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)); } }