离线语音识别失败
Offline voice recognition failure
在飞行模式下,按下按键,输入界面出现语音,输入语音出现 请重新输入 上个礼拜可以正常使用,google找不到解决办法了好久了,希望能帮到你
离线google语音已设置
public void onclick1(视图 v)
{
Intent intent=new Intent(RecognizerIntent.ACTION_RECOGNIZE_SPEECH);
intent.putExtra(RecognizerIntent.EXTRA_MAX_RESULTS, 1);
intent.putExtra(RecognizerIntent.EXTRA_LANGUAGE_MODEL,RecognizerIntent.LANGUAGE_MODEL_FREE_FORM);
intent.putExtra(RecognizerIntent.EXTRA_PROMPT,"請說");
startActivityForResult(intent,160);
}
protected void onActivityResult(int requestCode,int resultCode,Intent 数据)
{
if(resultCode==RESULT_OK && requestCode==160){
super.onActivityResult(requestCode, resultCode, data);
ArrayList<String> text=data.getStringArrayListExtra(RecognizerIntent.EXTRA_RESULTS);
EditText tv=(EditText)findViewById(R.id.editText1);
tv.setText(text.toString());
}
}
在飞行模式下,按下按键,输入界面出现语音,输入语音出现 请重新输入 上个礼拜可以正常使用,google找不到解决办法了好久了,希望能帮到你 离线google语音已设置
public void onclick1(视图 v)
{
Intent intent=new Intent(RecognizerIntent.ACTION_RECOGNIZE_SPEECH);
intent.putExtra(RecognizerIntent.EXTRA_MAX_RESULTS, 1);
intent.putExtra(RecognizerIntent.EXTRA_LANGUAGE_MODEL,RecognizerIntent.LANGUAGE_MODEL_FREE_FORM);
intent.putExtra(RecognizerIntent.EXTRA_PROMPT,"請說");
startActivityForResult(intent,160);
}
protected void onActivityResult(int requestCode,int resultCode,Intent 数据) {
if(resultCode==RESULT_OK && requestCode==160){
super.onActivityResult(requestCode, resultCode, data);
ArrayList<String> text=data.getStringArrayListExtra(RecognizerIntent.EXTRA_RESULTS);
EditText tv=(EditText)findViewById(R.id.editText1);
tv.setText(text.toString());
}
}