diff --git a/LCU.Webapps.Marketing.SPIT/LCU.Webapps.Marketing.SPIT/LCU.Webapps.Marketing.SPIT/Model/SpitConfiguration.cs b/LCU.Webapps.Marketing.SPIT/LCU.Webapps.Marketing.SPIT/LCU.Webapps.Marketing.SPIT/Model/SpitConfiguration.cs index 2630952..a810b11 100644 --- a/LCU.Webapps.Marketing.SPIT/LCU.Webapps.Marketing.SPIT/LCU.Webapps.Marketing.SPIT/Model/SpitConfiguration.cs +++ b/LCU.Webapps.Marketing.SPIT/LCU.Webapps.Marketing.SPIT/LCU.Webapps.Marketing.SPIT/Model/SpitConfiguration.cs @@ -44,11 +44,14 @@ namespace LCU.Webapps.Marketing.SPIT.Model return null; } - return new UriBuilder(endpoint) + var websocketPath = string.IsNullOrWhiteSpace(WebsocketUrl) + ? "/tts/cognitiveservices/websocket/v1" + : WebsocketUrl.Trim(); + + return new UriBuilder(new Uri(endpoint, websocketPath)) { Scheme = "wss", Port = -1, - Path = string.Empty, Query = string.Empty }.Uri; }