私はKindle Fireで使用する拡張通信アプリケーションを開発しています。ファイアHD 6をテストデバイスとして使用しています。私はXamarin、C#で働いています。Kindle Fire HD 6の音声認識機能へのアクセス
キーボードにマイクアイコンが表示されるため、デバイスに音声認識機能があり、これを使用して検索ウィンドウを作成できます。しかし、私のandoid音声認識コードは機能しません。 「レコグナイザが存在しません」というエラーが表示されます。ここで私が働いているコードは次のとおりです。
public class VoiceRecognition : Activity
{
private static String TAG = "VoiceRecognition";
private const int VOICE_RECOGNITION_REQUEST_CODE = 1234;
private ListView mList;
public Handler mHandler;
private Spinner mSupportedLanguageView;
protected override void OnCreate(Bundle savedInstanceState)
{
base.OnCreate(savedInstanceState);
mHandler = new Handler();
SetContentView(Resource.Layout.Main);
Button speakButton = FindViewById<Button>(Resource.Id.btnRecord);
// Check to see if a recognition activity is present
PackageManager pm = PackageManager;
IList<ResolveInfo> activities = pm.QueryIntentActivities(new Intent(RecognizerIntent.ActionRecognizeSpeech), 0);
if (activities.Count != 0)
speakButton.Click += speakButton_Click;
else
{
speakButton.Enabled = false;
speakButton.Text = "Recognizer not present";
}
}
このコードは明らかに仕事に行くのではありませんが、私はどこここから行くするかわかりません。このデバイスの音声認識装置にはどのようにアクセスできますか?
ありがとうございます!