@Override public void onCompleted(SpeechError error) { if (error == null) { new Thread() { public void run() { try { sleep(1000); } catch (InterruptedException e) { // TODO Auto-generated catch block e.printStackTrace(); } animListen.stop(); handler.sendEmptyMessage(1); }; }.start(); } else if (error != null) { Toast.makeText( RecodeActivity.this, error.getPlainDescription(true) + "--", Toast.LENGTH_SHORT) .show(); } }
/** 识别回调错误 */ public void onError(SpeechError error) { showTip(error.getPlainDescription(true)); }
// 会话发生错误回调接口 public void onError(SpeechError error) { error.getPlainDescription(true); // 获取错误码描述 if (mListener != null) { mListener.onError(); } }