修改nls、微信授权地址,通过修改状态来控制测试和正式
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
package com.ruoyi.cms.handler;
|
||||
|
||||
import com.alibaba.nls.client.protocol.asr.SpeechRecognizer;
|
||||
import com.ruoyi.cms.util.AliyunNlsUtils;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import javax.websocket.*;
|
||||
@@ -20,7 +20,7 @@ public class SpeechRecognitionWebSocketHandler {
|
||||
String appKey = "4lFYn2yPsQymwGu8";
|
||||
String id = "LTAI5t9hhSqdDHqwH3RjgyYj";
|
||||
String secret = "ni5aW3vxrWouMwcGqJPfh9Uu56PBuv";
|
||||
String url = System.getenv().getOrDefault("NLS_GATEWAY_URL", "wss://nls-gateway-cn-shanghai.aliyuncs.com/ws/v1");
|
||||
String url = System.getenv().getOrDefault("NLS_GATEWAY_URL", AliyunNlsUtils.getNlsUrl()+"/ws/v1/");
|
||||
recognizerDemo = new SpeechRecognizerAI(appKey, id, secret, url);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user