Преглед на файлове

有背景音乐有redis密码版本

jek преди 1 година
родител
ревизия
532aff777c
променени са 2 файла, в които са добавени 6 реда и са изтрити 7 реда
  1. 5 6
      src/main/java/com/zhili/stationcontrol/tts/controller/TtsController.java
  2. 1 1
      src/main/resources/application-prod.yml

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

@@ -69,12 +69,11 @@ public class TtsController {
 
     @GetMapping("/startMusic/{vol}")
     public String startMusic(@PathVariable Integer vol) {
-//        vol = vol > 1000 ? 1000 : vol;
-//        vol = vol < 0 ? 0 : vol;
-//        log.info("start music with vol:{}", vol);
-//        Integer start = musicService.start(playPath, vol);
-//        return start.equals(0) ? "ok" : "error"; todo 注释掉音乐
-        return "ok";
+        vol = vol > 1000 ? 1000 : vol;
+        vol = vol < 0 ? 0 : vol;
+        log.info("start music with vol:{}", vol);
+        Integer start = musicService.start(playPath, vol);
+        return start.equals(0) ? "ok" : "error";
     }
 
     @GetMapping("/stopMusic")

+ 1 - 1
src/main/resources/application-prod.yml

@@ -5,7 +5,7 @@ spring:
   redis:
     host: redis
     port: 6379
-    #password: 123456
+    password: 123456
 
 xunfei_tts:
   login_params: "appid = 11a57f90, work_dir = ."