add:语音控制功能-创建前端组件
This commit is contained in:
@@ -0,0 +1,52 @@
|
||||
package org.nl.wms.system_manage.controller.speech;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
/**
|
||||
* @author Zhao Ya Fei
|
||||
* @date 2026-04-14
|
||||
* 根据语音输入执行任务
|
||||
*/
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("/speech")
|
||||
public class SysSpeechController {
|
||||
|
||||
/**
|
||||
* 健康检查
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/health")
|
||||
public ResponseEntity<Object> health(){
|
||||
|
||||
return ResponseEntity.noContent().build();
|
||||
}
|
||||
|
||||
/**
|
||||
* 语音转文字
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/asr")
|
||||
public ResponseEntity<Object> asr(){
|
||||
return ResponseEntity.noContent().build();
|
||||
}
|
||||
|
||||
/**
|
||||
* 文字转语音
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/tts")
|
||||
public ResponseEntity<Object> tts(){
|
||||
return ResponseEntity.noContent().build();
|
||||
}
|
||||
|
||||
@PostMapping("/confirm")
|
||||
public ResponseEntity<Object> confirm(){
|
||||
return ResponseEntity.noContent().build();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
package org.nl.wms.system_manage.service.speech;
|
||||
|
||||
public interface SysSpeechService {
|
||||
|
||||
/**
|
||||
* 语音识别服务健康检查
|
||||
*
|
||||
* @return Boolean
|
||||
*/
|
||||
Boolean health();
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
package org.nl.wms.system_manage.service.speech.enums;
|
||||
|
||||
/**
|
||||
* @author Zhao Ya Fei
|
||||
* @date 2026-04-14
|
||||
* @desc 语音识别URL
|
||||
*/
|
||||
public class SpeechUrlConstant {
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
package org.nl.wms.system_manage.service.speech.impl;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.nl.wms.system_manage.service.speech.SysSpeechService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* @author Zhao Ya Fei
|
||||
* @date 2026-04-14
|
||||
* 语音识别服务实现类
|
||||
*/
|
||||
@Slf4j
|
||||
@Service
|
||||
public class SysSpeechServiceImpl implements SysSpeechService {
|
||||
|
||||
@Override
|
||||
public Boolean health() {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user