Bladeren bron

获取阿里云的在线解析语音接口同时也更新转换后的结果到数据库

王苗苗 1 week geleden
bovenliggende
commit
ab8395e48a

+ 6 - 1
slibra-system/src/main/java/com/slibra/business/service/impl/TCallRecordServiceImpl.java

@@ -243,7 +243,12 @@ public class TCallRecordServiceImpl implements ITCallRecordService
         SpeechTranscriberDemo demo = new SpeechTranscriberDemo(appKey, accessKeyId, accessKeySecret, wsUrl);
         demo.process(url.replace(domain, urlDiskPrefix));//假设是带http的,替换URL  示例:将https://pbx.fuxicarbon.com/voice/005cad2d-3626-477c-8b95-07b68f339630.wav 变化成 /root/aibot/dm/voice/005cad2d-3626-477c-8b95-07b68f339630.wav
         demo.shutdown();
-        return JSON.toJSONString(SpeechTranscriberDemo.result);
+        //同时更新到数据库中去
+        tCallRecord.setHasParsed(LONG_1);
+        String result = JSON.toJSONString(SpeechTranscriberDemo.result);
+        tCallRecord.setParsedVoiceContent(result);
+        this.tCallRecordMapper.updateTCallRecord(tCallRecord);
+        return result;
     }
 
 

+ 2 - 0
slibra-system/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst

@@ -1,4 +1,5 @@
 com/slibra/business/domain/TUserFeeInfo$TUserFeeInfoBuilder.class
+com/slibra/business/service/impl/SpeechTranscriberDemo$1.class
 com/slibra/business/req/CutOffExtraReq$CutOffExtraReqBuilder.class
 com/slibra/business/req/CutOffExtraReq.class
 com/slibra/business/res/Ele.class
@@ -85,6 +86,7 @@ com/slibra/system/domain/SysNotice.class
 com/slibra/business/res/NeighbourhoodAndNumber.class
 com/slibra/system/service/ISysPostService.class
 com/slibra/business/domain/TCutOffWater.class
+com/slibra/business/service/impl/SpeechTranscriberDemo.class
 com/slibra/system/service/ISysOperLogService.class
 com/slibra/business/mapper/TCutOffWaterExtraMapper.class
 com/slibra/business/req/ChatRequest.class

+ 1 - 0
slibra-system/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst

@@ -107,6 +107,7 @@
 /Users/wangmiaomiao/IdeaProjects/intelligent-voice-customer-service-java/slibra-system/src/main/java/com/slibra/business/domain/TNeighborhood.java
 /Users/wangmiaomiao/IdeaProjects/intelligent-voice-customer-service-java/slibra-system/src/main/java/com/slibra/business/domain/TCutOffWater.java
 /Users/wangmiaomiao/IdeaProjects/intelligent-voice-customer-service-java/slibra-system/src/main/java/com/slibra/business/mapper/TPumpingStationNeighbourhoodNumberMapper.java
+/Users/wangmiaomiao/IdeaProjects/intelligent-voice-customer-service-java/slibra-system/src/main/java/com/slibra/business/service/impl/SpeechTranscriberDemo.java
 /Users/wangmiaomiao/IdeaProjects/intelligent-voice-customer-service-java/slibra-system/src/main/java/com/slibra/system/service/impl/SysRoleServiceImpl.java
 /Users/wangmiaomiao/IdeaProjects/intelligent-voice-customer-service-java/slibra-system/src/main/java/com/slibra/system/domain/SysNotice.java
 /Users/wangmiaomiao/IdeaProjects/intelligent-voice-customer-service-java/slibra-system/src/main/java/com/slibra/system/mapper/SysDictTypeMapper.java