diff --git a/cloudfunctions/tts/index.js b/cloudfunctions/tts/index.js index c89c25b..5e4b7c4 100644 --- a/cloudfunctions/tts/index.js +++ b/cloudfunctions/tts/index.js @@ -20,6 +20,7 @@ cloud.init() // Polished, fixed prompts. const PROMPTS = { + start: '训练已开始', halfway: '已完成一半啦,坚持就是胜利!', last30: '最后30秒,保持呼吸,稳住姿势!', last10: '最后10秒,再加把劲!', diff --git a/pages/timer/timer.js b/pages/timer/timer.js index b685a1c..bbf91fc 100644 --- a/pages/timer/timer.js +++ b/pages/timer/timer.js @@ -165,6 +165,8 @@ Page({ if (this.data.isRunning) return this._timer.start(this.data.duration) this.setData({ isRunning: true, status: 'running' }) + const s = storage.getSettings() + if (s.voiceGuide !== false) voice.play('start') }, onPause() { diff --git a/utils/voice.js b/utils/voice.js index 97350b2..74fc3d9 100644 --- a/utils/voice.js +++ b/utils/voice.js @@ -18,6 +18,7 @@ */ const PROMPTS = { + start: '训练已开始', halfway: '已完成一半啦,坚持就是胜利!', last30: '最后30秒,保持呼吸,稳住姿势!', last10: '最后10秒,再加把劲!',