|
@@ -9,6 +9,7 @@ import android.util.Log;
|
|
|
import com.wdkl.ncs.android.component.nursehome.settingconfig.SettingConfig;
|
|
|
import com.wdkl.ncs.android.lib.base.BaseApplication;
|
|
|
import com.wdkl.ncs.android.middleware.common.Constants;
|
|
|
+import com.wdkl.ncs.android.middleware.utils.StringUtil;
|
|
|
|
|
|
|
|
|
import java.util.ArrayList;
|
|
@@ -128,6 +129,9 @@ public class SpeechUtil {
|
|
|
|
|
|
public synchronized void speak(final String text) {
|
|
|
Log.d(TAG, "tts speak: " + text);
|
|
|
+ if (!StringUtil.notEmpty(text)) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
|
|
|
isStop = false;
|
|
|
textToSpeech.speak(text, TextToSpeech.QUEUE_FLUSH, null, "uniqueId");
|
|
@@ -239,7 +243,7 @@ public class SpeechUtil {
|
|
|
}
|
|
|
|
|
|
try {
|
|
|
- Thread.sleep(500);
|
|
|
+ Thread.sleep(1500);
|
|
|
} catch (Exception e) {
|
|
|
e.printStackTrace();
|
|
|
}
|