|
|
@@ -1,11 +1,13 @@
|
|
|
package org.thyy.thirdpartapi.tts;
|
|
|
|
|
|
-import jakarta.servlet.http.HttpServletResponse;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
+import org.springframework.beans.factory.ObjectProvider;
|
|
|
import org.springframework.web.bind.annotation.PostMapping;
|
|
|
import org.springframework.web.bind.annotation.RequestBody;
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
+import org.thyy.utils.exception.ExceptionEnum;
|
|
|
+import org.thyy.utils.result.R;
|
|
|
import org.thyy.utils.result.ResultVo;
|
|
|
|
|
|
|
|
|
@@ -15,15 +17,22 @@ import org.thyy.utils.result.ResultVo;
|
|
|
public class TtsController {
|
|
|
|
|
|
private final Tts ttsService;
|
|
|
+ private DefaultTgetObject defaultTgetObject;
|
|
|
|
|
|
public TtsController(Tts ttsService) {
|
|
|
this.ttsService = ttsService;
|
|
|
}
|
|
|
|
|
|
+ static class DefaultTgetObject implements Tts {
|
|
|
+ @Override
|
|
|
+ public ResultVo<String> textToSpeech(TtsRequest request) {
|
|
|
+ return R.fail(ExceptionEnum.NOT_SERVICE);
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
@PostMapping("/textToSpeech")
|
|
|
- public ResultVo<String> textToSpeech(@RequestBody TtsRequest request, HttpServletResponse response) {
|
|
|
- return ttsService.textToSpeech(request, response);
|
|
|
+ public ResultVo<String> textToSpeech(@RequestBody TtsRequest request) {
|
|
|
+ return ttsService.textToSpeech(request);
|
|
|
}
|
|
|
|
|
|
}
|