From 4220a2881dba1f89785ccb6cbddb05cc0e73a4c6 Mon Sep 17 00:00:00 2001 From: DU Date: Tue, 13 Apr 2021 16:59:46 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E6=B5=8B=E8=AF=95=E8=AF=AD=E9=9F=B3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Dockerfile-test | 2 +- sql/20210413-dukang.sql | 11 +++++++++++ .../voice/huawei/HuaweiVoiceServiceImpl.java | 13 +++++++------ 3 files changed, 19 insertions(+), 7 deletions(-) create mode 100644 sql/20210413-dukang.sql diff --git a/Dockerfile-test b/Dockerfile-test index 46ac1b8b5..58813577a 100644 --- a/Dockerfile-test +++ b/Dockerfile-test @@ -13,4 +13,4 @@ EXPOSE 9000 19000/tcp ENV TZ=Asia/Shanghai RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone -CMD java -jar -Dfile.encoding=UTF-8 -Dspring.profiles.active=test /app.jar +CMD java -jar -Dfile.encoding=UTF-8 -Dspring.profiles.active=test -Dhttps.protocols=TLSv1.2 /app.jar diff --git a/sql/20210413-dukang.sql b/sql/20210413-dukang.sql new file mode 100644 index 000000000..cbfc8a387 --- /dev/null +++ b/sql/20210413-dukang.sql @@ -0,0 +1,11 @@ +CREATE TABLE `map_group` ( + `id` BIGINT(20) NOT NULL AUTO_INCREMENT, + `group_name` VARCHAR(64) NOT NULL, + `group_type` VARCHAR(32) NOT NULL, + `map_ids` VARCHAR(6400) NOT NULL DEFAULT '[]', + PRIMARY KEY (`id`) +) +COMMENT='地图分组' +ENGINE=InnoDB +AUTO_INCREMENT=3 +; diff --git a/src/main/java/club/joylink/rtss/services/voice/huawei/HuaweiVoiceServiceImpl.java b/src/main/java/club/joylink/rtss/services/voice/huawei/HuaweiVoiceServiceImpl.java index 377bb1283..bc0b8a3e0 100644 --- a/src/main/java/club/joylink/rtss/services/voice/huawei/HuaweiVoiceServiceImpl.java +++ b/src/main/java/club/joylink/rtss/services/voice/huawei/HuaweiVoiceServiceImpl.java @@ -20,6 +20,12 @@ import java.util.Base64; @Service("HuaWeiVoiceService") public class HuaweiVoiceServiceImpl implements IVoiceService { + + @Override + public String synthesis(String message, String per) { + throw BusinessExceptionAssertEnum.THIRD_SERVICE_CALL_EXCEPTION.exception("功能暂未实现"); + } + /** * 华为语音识别配置 */ @@ -28,12 +34,6 @@ public class HuaweiVoiceServiceImpl implements IVoiceService { private final String region = "cn-north-4"; private final String projectId = "0aada8176180f28c2f34c0196f5394e8"; - - @Override - public String synthesis(String message, String per) { - throw BusinessExceptionAssertEnum.THIRD_SERVICE_CALL_EXCEPTION.exception("功能暂未实现"); - } - @Override public VoiceRecognitionResult voiceRecognition(MultipartFile file, String lang) { String filePath; @@ -42,6 +42,7 @@ public class HuaweiVoiceServiceImpl implements IVoiceService { } catch (IOException e) { throw BusinessExceptionAssertEnum.SYSTEM_EXCEPTION.exception("语音文件上传失败", e); } + System.setProperty("https.protocols", "TLSv1.2,TLSv1.1,SSLv3"); AuthInfo authInfo = new AuthInfo(ak, sk, region, projectId); SisConfig sisConfig = new SisConfig(); AsrCustomizationClient client = new AsrCustomizationClient(authInfo, sisConfig); From c540da932a6c9e76af7cdde654096b23347d1c1c Mon Sep 17 00:00:00 2001 From: DU Date: Tue, 13 Apr 2021 17:06:06 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E5=88=A0=E9=99=A4=E6=B5=8B=E8=AF=95?= =?UTF-8?q?=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../rtss/services/voice/huawei/HuaweiVoiceServiceImpl.java | 1 - 1 file changed, 1 deletion(-) diff --git a/src/main/java/club/joylink/rtss/services/voice/huawei/HuaweiVoiceServiceImpl.java b/src/main/java/club/joylink/rtss/services/voice/huawei/HuaweiVoiceServiceImpl.java index bc0b8a3e0..492d9c404 100644 --- a/src/main/java/club/joylink/rtss/services/voice/huawei/HuaweiVoiceServiceImpl.java +++ b/src/main/java/club/joylink/rtss/services/voice/huawei/HuaweiVoiceServiceImpl.java @@ -42,7 +42,6 @@ public class HuaweiVoiceServiceImpl implements IVoiceService { } catch (IOException e) { throw BusinessExceptionAssertEnum.SYSTEM_EXCEPTION.exception("语音文件上传失败", e); } - System.setProperty("https.protocols", "TLSv1.2,TLSv1.1,SSLv3"); AuthInfo authInfo = new AuthInfo(ak, sk, region, projectId); SisConfig sisConfig = new SisConfig(); AsrCustomizationClient client = new AsrCustomizationClient(authInfo, sisConfig);