|
@@ -25,7 +25,7 @@ public class TtsController {
|
|
@Autowired
|
|
@Autowired
|
|
MusicService musicService;
|
|
MusicService musicService;
|
|
|
|
|
|
- @Value("${play_path:/static/mp3/music.mp3}")
|
|
|
|
|
|
+ @Value("${play_path:/static/wav/music.mp3}")
|
|
String playPath;
|
|
String playPath;
|
|
|
|
|
|
// @GetMapping("/speak/{txt}")
|
|
// @GetMapping("/speak/{txt}")
|
|
@@ -81,7 +81,7 @@ public class TtsController {
|
|
|
|
|
|
@GetMapping("/speak/{file}")
|
|
@GetMapping("/speak/{file}")
|
|
public String speak(@PathVariable String file) throws IOException, InterruptedException {
|
|
public String speak(@PathVariable String file) throws IOException, InterruptedException {
|
|
- String path = "/static/mp3/"+file+".mp3";
|
|
|
|
|
|
+ String path = "/static/wav/" +file+".mp3";
|
|
Process exec = Runtime.getRuntime().exec("play " + path);
|
|
Process exec = Runtime.getRuntime().exec("play " + path);
|
|
exec.waitFor();
|
|
exec.waitFor();
|
|
return "ok";
|
|
return "ok";
|