jek преди 4 месеца
родител
ревизия
3bf54c9a94
променени са 1 файла, в които са добавени 2 реда и са изтрити 1 реда
  1. 2 1
      src/main/java/com/zhili/stationcontrol/tts/controller/TtsController.java

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

@@ -90,7 +90,7 @@ public class TtsController {
     }
 
     @GetMapping("/music")
-    public void music() throws UnsupportedAudioFileException, IOException, LineUnavailableException, InterruptedException {
+    public String music() throws UnsupportedAudioFileException, IOException, LineUnavailableException, InterruptedException {
         File file = new File("/static/wav/hdzqdd.wav");
         // 创建一个AudioInputStream
         AudioInputStream audioInputStream = AudioSystem.getAudioInputStream(file);
@@ -105,5 +105,6 @@ public class TtsController {
         clip.drain();
         // 关闭声卡
         clip.close();
+        return "ok";
     }
 }