rain
2024-07-16 94a6e4e4bc39153e64f8599e626475c4ce5bdb88
src/main/java/com/dji/sample/speak/controller/SpeakVoiceController.java
@@ -25,14 +25,15 @@
    private SpeakVoiceService voiceServicel;
    @Autowired
    private PatchesConfigPojo patchesConfigPojo;
    @PostMapping("/startVoice")
    public ResponseResult takeVoice(@RequestParam String sn,
                                    @RequestParam int psdk_index,
                                    @RequestParam String name,
                                    @RequestParam Integer volumn,
                                    @RequestParam MultipartFile file) throws UnsupportedAudioFileException, IOException {
        File file1=MultipartFileTOFileUtil.multipartFile2File(file,patchesConfigPojo.getUnzip());
        return ResponseResult.success(voiceServicel.takeVoice(sn, psdk_index,name,file1,volumn));
        File file1 = MultipartFileTOFileUtil.multipartFile2File(file, patchesConfigPojo.getUnzip());
        return ResponseResult.success(voiceServicel.takeVoice(sn, psdk_index, name, file1, volumn));
    }
    @PostMapping("/stopVoice")
@@ -51,16 +52,17 @@
    }
    @PostMapping("/restartVoice")
    public ResponseResult restartVoice(@RequestParam int psdkIndex, @RequestParam String sn) {
        return ResponseResult.success(voiceServicel.restartVoice(sn, psdkIndex));
    }
    @PostMapping("/putVoice")
    public ResponseResult putVoice (int id){
        return ResponseResult.success(voiceServicel.awayRiver(id));
    }
    @GetMapping("/selectVoice")
    public ResponseResult getVoices(@RequestParam Integer page,@RequestParam Integer page_size ){
    return ResponseResult.success(voiceServicel.getVoices(page,page_size));
    public ResponseResult restartVoice(@RequestParam int psdk_index, @RequestParam String sn) {
        return ResponseResult.success(voiceServicel.restartVoice(sn, psdk_index));
    }
    @PostMapping("/putVoice")
    public ResponseResult putVoice(int id) {
        return ResponseResult.success(voiceServicel.awayRiver(id));
    }
    @GetMapping("/selectVoice")
    public ResponseResult getVoices(@RequestParam Integer page, @RequestParam Integer page_size) {
        return ResponseResult.success(voiceServicel.getVoices(page, page_size));
    }
}