|
@@ -8,6 +8,7 @@ import android.text.TextUtils;
|
|
|
import android.util.Log;
|
|
|
|
|
|
import com.wdkl.ncs.android.middleware.common.Constants;
|
|
|
+import com.wdkl.ncs.android.middleware.utils.StringUtil;
|
|
|
|
|
|
|
|
|
import java.util.ArrayList;
|
|
@@ -162,6 +163,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");
|
|
@@ -258,7 +262,7 @@ public class SpeechUtil {
|
|
|
}
|
|
|
|
|
|
try {
|
|
|
- Thread.sleep(50);
|
|
|
+ Thread.sleep(1500);
|
|
|
} catch (Exception e) {
|
|
|
e.printStackTrace();
|
|
|
}
|