jek 4 months ago
parent
commit
8aa6987fc6

+ 2 - 2
src/main/java/com/zhili/stationcontrol/tts/controller/TtsController.java

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