测试语音
This commit is contained in:
parent
ea0bde8feb
commit
4220a2881d
@ -13,4 +13,4 @@ EXPOSE 9000 19000/tcp
|
|||||||
ENV TZ=Asia/Shanghai
|
ENV TZ=Asia/Shanghai
|
||||||
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
|
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
|
||||||
|
11
sql/20210413-dukang.sql
Normal file
11
sql/20210413-dukang.sql
Normal file
@ -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
|
||||||
|
;
|
@ -20,6 +20,12 @@ import java.util.Base64;
|
|||||||
@Service("HuaWeiVoiceService")
|
@Service("HuaWeiVoiceService")
|
||||||
public class HuaweiVoiceServiceImpl implements IVoiceService {
|
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 region = "cn-north-4";
|
||||||
private final String projectId = "0aada8176180f28c2f34c0196f5394e8";
|
private final String projectId = "0aada8176180f28c2f34c0196f5394e8";
|
||||||
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String synthesis(String message, String per) {
|
|
||||||
throw BusinessExceptionAssertEnum.THIRD_SERVICE_CALL_EXCEPTION.exception("功能暂未实现");
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public VoiceRecognitionResult voiceRecognition(MultipartFile file, String lang) {
|
public VoiceRecognitionResult voiceRecognition(MultipartFile file, String lang) {
|
||||||
String filePath;
|
String filePath;
|
||||||
@ -42,6 +42,7 @@ public class HuaweiVoiceServiceImpl implements IVoiceService {
|
|||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
throw BusinessExceptionAssertEnum.SYSTEM_EXCEPTION.exception("语音文件上传失败", e);
|
throw BusinessExceptionAssertEnum.SYSTEM_EXCEPTION.exception("语音文件上传失败", e);
|
||||||
}
|
}
|
||||||
|
System.setProperty("https.protocols", "TLSv1.2,TLSv1.1,SSLv3");
|
||||||
AuthInfo authInfo = new AuthInfo(ak, sk, region, projectId);
|
AuthInfo authInfo = new AuthInfo(ak, sk, region, projectId);
|
||||||
SisConfig sisConfig = new SisConfig();
|
SisConfig sisConfig = new SisConfig();
|
||||||
AsrCustomizationClient client = new AsrCustomizationClient(authInfo, sisConfig);
|
AsrCustomizationClient client = new AsrCustomizationClient(authInfo, sisConfig);
|
||||||
|
Loading…
Reference in New Issue
Block a user