Class TtsRestController

java.lang.Object
com.bytedesk.ai.voice.TtsRestController

@RestController @RequestMapping("/api/v1/tts") public class TtsRestController extends Object
  • Field Details

    • outputDir

      @Value("${bytedesk.ai.tts.outputDir:/usr/local/freeswitch/recordings}") private String outputDir
  • Constructor Details

    • TtsRestController

      public TtsRestController()
  • Method Details

    • synthesize

      @PostMapping(value="/synthesize", produces="text/plain") public org.springframework.http.ResponseEntity<String> synthesize(@RequestParam("text") String text, @RequestParam(value="uuid",required=false) String uuid, @RequestParam(value="turn",required=false,defaultValue="1") int turn, @RequestParam(value="format",required=false,defaultValue="wav") String format) throws Exception
      非实时 TTS:输入文本,返回可 playback 的本地文件路径(当前为 mock:只生成空 wav 占位)
      Throws:
      Exception