共用方式為


RecognitionService.OnTriggerModelDownload 方法

定義

多載

OnTriggerModelDownload(Intent)

要求下載的辨識器支援 recognizerIntent

OnTriggerModelDownload(Intent, AttributionSource)

要求下載的辨識器支援 recognizerIntent

OnTriggerModelDownload(Intent, AttributionSource, IModelDownloadListener)

要求下載的辨識器支援 recognizerIntent

OnTriggerModelDownload(Intent)

要求下載的辨識器支援 recognizerIntent

[Android.Runtime.Register("onTriggerModelDownload", "(Landroid/content/Intent;)V", "GetOnTriggerModelDownload_Landroid_content_Intent_Handler", ApiSince=33)]
public virtual void OnTriggerModelDownload (Android.Content.Intent recognizerIntent);
[<Android.Runtime.Register("onTriggerModelDownload", "(Landroid/content/Intent;)V", "GetOnTriggerModelDownload_Landroid_content_Intent_Handler", ApiSince=33)>]
abstract member OnTriggerModelDownload : Android.Content.Intent -> unit
override this.OnTriggerModelDownload : Android.Content.Intent -> unit

參數

recognizerIntent
Intent
屬性

備註

要求下載的辨識器支援 recognizerIntent

android.speech.RecognitionService.onTriggerModelDownload(android.content.Intent)Java 檔。

此頁面的部分是根據 Android 開放原始碼專案所建立和共用的工作進行修改,並根據 Creative Commons 2.5 屬性授權中所述的詞彙使用。

適用於

OnTriggerModelDownload(Intent, AttributionSource)

要求下載的辨識器支援 recognizerIntent

[Android.Runtime.Register("onTriggerModelDownload", "(Landroid/content/Intent;Landroid/content/AttributionSource;)V", "GetOnTriggerModelDownload_Landroid_content_Intent_Landroid_content_AttributionSource_Handler", ApiSince=34)]
public virtual void OnTriggerModelDownload (Android.Content.Intent recognizerIntent, Android.Content.AttributionSource attributionSource);
[<Android.Runtime.Register("onTriggerModelDownload", "(Landroid/content/Intent;Landroid/content/AttributionSource;)V", "GetOnTriggerModelDownload_Landroid_content_Intent_Landroid_content_AttributionSource_Handler", ApiSince=34)>]
abstract member OnTriggerModelDownload : Android.Content.Intent * Android.Content.AttributionSource -> unit
override this.OnTriggerModelDownload : Android.Content.Intent * Android.Content.AttributionSource -> unit

參數

recognizerIntent
Intent
attributionSource
AttributionSource
屬性

備註

要求下載的辨識器支援 recognizerIntent

提供服務實作的呼叫歸因來源,以便正確歸咎於許可權和頻寬。

android.speech.RecognitionService.onTriggerModelDownload(android.content.Intent, android.content.AttributionSource)Java 檔。

此頁面的部分是根據 Android 開放原始碼專案所建立和共用的工作進行修改,並根據 Creative Commons 2.5 屬性授權中所述的詞彙使用。

適用於

OnTriggerModelDownload(Intent, AttributionSource, IModelDownloadListener)

要求下載的辨識器支援 recognizerIntent

[Android.Runtime.Register("onTriggerModelDownload", "(Landroid/content/Intent;Landroid/content/AttributionSource;Landroid/speech/ModelDownloadListener;)V", "GetOnTriggerModelDownload_Landroid_content_Intent_Landroid_content_AttributionSource_Landroid_speech_ModelDownloadListener_Handler", ApiSince=34)]
public virtual void OnTriggerModelDownload (Android.Content.Intent recognizerIntent, Android.Content.AttributionSource attributionSource, Android.Speech.IModelDownloadListener listener);
[<Android.Runtime.Register("onTriggerModelDownload", "(Landroid/content/Intent;Landroid/content/AttributionSource;Landroid/speech/ModelDownloadListener;)V", "GetOnTriggerModelDownload_Landroid_content_Intent_Landroid_content_AttributionSource_Landroid_speech_ModelDownloadListener_Handler", ApiSince=34)>]
abstract member OnTriggerModelDownload : Android.Content.Intent * Android.Content.AttributionSource * Android.Speech.IModelDownloadListener -> unit
override this.OnTriggerModelDownload : Android.Content.Intent * Android.Content.AttributionSource * Android.Speech.IModelDownloadListener -> unit

參數

recognizerIntent
Intent

包含要執行辨識的參數。 意圖也可能包含選擇性的額外專案,請參閱 RecognizerIntent

attributionSource
AttributionSource

呼叫端的屬性來源。

listener
IModelDownloadListener

要接收有關模型下載要求的更新。

屬性

備註

要求下載的辨識器支援 recognizerIntent

提供對服務實作的呼叫 AttributionSource ,以便正確指責許可權和頻寬。

用戶端會透過指定的 ModelDownloadListener接收進度更新:

<li> 如果模型已經可用, ModelDownloadListener#onSuccess() 將直接呼叫。 之後可以安全地使用模型。

<li> 如果 RecognitionService 已啟動下載, ModelDownloadListener#onProgress(int) 則會在下載完成之前呼叫未指定的 (零或更多) 次數。 下載完成時, ModelDownloadListener#onSuccess() 將會呼叫 。 之後可以安全地使用模型。

<li> 如果 RecognitionService 只排程下載,但不會立即滿足, ModelDownloadListener#onScheduled() 則會呼叫 。 此接聽程式不會有進一步的更新。

<li> 如果要求因為網路或排程錯誤而隨時失敗, ModelDownloadListener#onError(int) 則會呼叫 。

android.speech.RecognitionService.onTriggerModelDownload(android.content.Intent, android.content.AttributionSource, android.speech.ModelDownloadListener)Java 檔。

此頁面的部分是根據 Android 開放原始碼專案所建立和共用的工作進行修改,並根據 Creative Commons 2.5 屬性授權中所述的詞彙使用。

適用於