File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -1074,6 +1074,8 @@ private void initialize(Properties props) {
10741074 String noSsl = props .getProperty ("nossl" , "false" );
10751075 watsonSsl = noSsl .equalsIgnoreCase ("false" );
10761076 tenantID = props .getProperty ("tenantID" );
1077+ if (tenantID == null )
1078+ tenantID ="" ;
10771079 userID = props .getProperty ("userID" );
10781080 watsonVoice = props .getProperty ("voice" );
10791081 commandSocketPort = Integer .parseInt (props .getProperty ("cmdSocketPort" , "10010" ));
@@ -1230,9 +1232,12 @@ private synchronized void connect() throws InterruptedException {
12301232
12311233 try {
12321234 // Build request
1233- String webSocketUrl = (watsonSsl ? "wss" : "ws" ) + "://" + watsonHost + (watsonPort == null ? "" : ":" + watsonPort ) + "?skillset=" + skillset + "&tenantID=" + tenantID + "& userID=" + userID
1235+ String webSocketUrl = (watsonSsl ? "wss" : "ws" ) + "://" + watsonHost + (watsonPort == null ? "" : ":" + watsonPort ) + "?skillset=" + skillset + "&userID=" + userID
12341236 + "&language=" + language + "&engine=" + engine ;
1235- Request request = new Request .Builder ().url (webSocketUrl ).addHeader ("Authorization" , "Bearer " + iamAccessToken ).build ();
1237+ Request request = new Request .Builder ().url (webSocketUrl )
1238+ .addHeader ("Authorization" , "Bearer " + iamAccessToken )
1239+ .addHeader ("tenantid" , tenantID )
1240+ .build ();
12361241
12371242 // initialize the watch dog
12381243 Runnable cleanup = new CleanUp (this .audioInput , this .audioOutput , this .indicator );
You can’t perform that action at this time.
0 commit comments