SpeechRecognizer.TriggerModelDownload Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
TriggerModelDownload(Intent) |
Attempts to download the support for the given |
TriggerModelDownload(Intent, IExecutor, IModelDownloadListener) |
Attempts to download the support for the given |
TriggerModelDownload(Intent)
Attempts to download the support for the given recognizerIntent
.
[Android.Runtime.Register("triggerModelDownload", "(Landroid/content/Intent;)V", "GetTriggerModelDownload_Landroid_content_Intent_Handler", ApiSince=33)]
public virtual void TriggerModelDownload (Android.Content.Intent recognizerIntent);
[<Android.Runtime.Register("triggerModelDownload", "(Landroid/content/Intent;)V", "GetTriggerModelDownload_Landroid_content_Intent_Handler", ApiSince=33)>]
abstract member TriggerModelDownload : Android.Content.Intent -> unit
override this.TriggerModelDownload : Android.Content.Intent -> unit
Parameters
- recognizerIntent
- Intent
contains parameters for the recognition to be performed. The intent
may also contain optional extras, see RecognizerIntent
.
- Attributes
Remarks
Attempts to download the support for the given recognizerIntent
. This might trigger user interaction to approve the download. Callers can verify the status of the request via #checkRecognitionSupport(Intent, Executor, RecognitionSupportCallback)
.
Java documentation for android.speech.SpeechRecognizer.triggerModelDownload(android.content.Intent)
.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
Applies to
TriggerModelDownload(Intent, IExecutor, IModelDownloadListener)
Attempts to download the support for the given recognizerIntent
.
[Android.Runtime.Register("triggerModelDownload", "(Landroid/content/Intent;Ljava/util/concurrent/Executor;Landroid/speech/ModelDownloadListener;)V", "GetTriggerModelDownload_Landroid_content_Intent_Ljava_util_concurrent_Executor_Landroid_speech_ModelDownloadListener_Handler", ApiSince=34)]
public virtual void TriggerModelDownload (Android.Content.Intent recognizerIntent, Java.Util.Concurrent.IExecutor executor, Android.Speech.IModelDownloadListener listener);
[<Android.Runtime.Register("triggerModelDownload", "(Landroid/content/Intent;Ljava/util/concurrent/Executor;Landroid/speech/ModelDownloadListener;)V", "GetTriggerModelDownload_Landroid_content_Intent_Ljava_util_concurrent_Executor_Landroid_speech_ModelDownloadListener_Handler", ApiSince=34)>]
abstract member TriggerModelDownload : Android.Content.Intent * Java.Util.Concurrent.IExecutor * Android.Speech.IModelDownloadListener -> unit
override this.TriggerModelDownload : Android.Content.Intent * Java.Util.Concurrent.IExecutor * Android.Speech.IModelDownloadListener -> unit
Parameters
- recognizerIntent
- Intent
contains parameters for the recognition to be performed. The intent
may also contain optional extras, see RecognizerIntent
.
- executor
- IExecutor
for dispatching listener callbacks
- listener
- IModelDownloadListener
on which to receive updates about the model download request.
- Attributes
Remarks
Attempts to download the support for the given recognizerIntent
. This might trigger user interaction to approve the download. Callers can verify the status of the request via #checkRecognitionSupport(Intent, Executor, RecognitionSupportCallback)
.
The updates about the model download request are received via the given ModelDownloadListener
:
<li> If the model is already available, ModelDownloadListener#onSuccess()
will be called directly. The model can be safely used afterwards.
<li> If the RecognitionService
has started the download, ModelDownloadListener#onProgress(int)
will be called an unspecified (zero or more) number of times until the download is complete. When the download finishes, ModelDownloadListener#onSuccess()
will be called. The model can be safely used afterwards.
<li> If the RecognitionService
has only scheduled the download, but won't satisfy it immediately, ModelDownloadListener#onScheduled()
will be called. There will be no further updates on this listener.
<li> If the request fails at any time due to a network or scheduling error, ModelDownloadListener#onError(int)
will be called.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.