|
@@ -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";
|
|
|
}
|
|
|
}
|