ws config edited

main
jiyoungcheon 4 weeks ago
parent 5d78c215d2
commit bcd4046024

@ -17,10 +17,15 @@ type AppInfo struct {
type Urls struct {
FailedDataListUrl string `xml:"FailedDataListUrl"`
NockChiServerUrl string `xml:"NockChiServerUrl"`
NockChiServer NockChiServer `xml:"NockChiServer"`
TAUrl string `xml:"TAUrl"`
}
type NockChiServer struct {
BaseURL string `xml:"baseURL,attr"`
EndPoint string `xml:"endPoint,attr"`
}
type Speech struct {
Package string `xml:"Package"`
ProtoPackage string `xml:"ProtoPackage"`

@ -234,11 +234,13 @@ func PostReqForEachVoiceFile(reqDataForVoiceFile FailedDataListReqBody) (respons
func SendSTTResToNockChiServer(parsedRes FailedDataListReqBody, sttRes string, dir string) *icserror.IcsError {
url := conf.Urls.NockChiServerUrl
conn, _, err := websocket.DefaultDialer.Dial(url, nil)
fullURL := conf.Urls.NockChiServer.BaseURL + conf.Urls.NockChiServer.EndPoint
headers := http.Header{
"Origin": {conf.Urls.NockChiServer.BaseURL},
}
conn, _, err := websocket.DefaultDialer.Dial(fullURL, headers)
if err != nil {
l.Println("[ERR] client.go>SendSTTResToNockChiServer()> connecting websocket failed. err: %v", err)
l.Printf("[ERR] client.go>SendSTTResToNockChiServer()> connecting websocket failed. err: %v", err)
return icserror.ICSERRWEBSOCKETConnectFailError
}
defer conn.Close()

Loading…
Cancel
Save