|
|
|
@ -25,11 +25,11 @@ public class TtsUtil {
|
|
|
|
|
PaddleSpeechResDTO<TtsResultDTO> response = objectMapper.readValue(post, new TypeReference<PaddleSpeechResDTO<TtsResultDTO>>() {
|
|
|
|
|
});
|
|
|
|
|
if (!response.getSuccess() || ObjectUtil.isEmpty(response.getResult())) {
|
|
|
|
|
throw new BusinessException("文字转换语音失败");
|
|
|
|
|
throw new BusinessException("文字转换语音失败:【"+str+"】");
|
|
|
|
|
}
|
|
|
|
|
return response.getResult();
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
|
throw new BusinessException("语音转换文字失败", e);
|
|
|
|
|
throw new BusinessException("语音转换文字失败:【"+str+"】", e);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|