SpeechMode 列舉

定義

指定語音輸入的解譯模式。Specifies the mode of interpretation for speech input.

public enum class SpeechMode
public enum SpeechMode
type SpeechMode = 
Public Enum SpeechMode
繼承
SpeechMode

欄位

Command 1

會將語音輸入解譯為命令。Speech input is interpreted as commands.

Dictation 0

會將語音輸入解譯為聽寫。Speech input is interpreted as dictation.

Indeterminate 2

語音輸入模式為不定。Speech input mode is indeterminate.

範例

下列範例顯示如何使用SpeechMode列舉來指定語音模式。The following example shows how to specify the speech mode using the SpeechMode enumeration.

InputMethod.SetPreferredImeState(myTextBox, InputMethodState.On);
InputMethod.Current.ImeSentenceMode = ImeSentenceModeValues.Automatic;
InputMethod.Current.HandwritingState = InputMethodState.On;
InputMethod.Current.SpeechMode = SpeechMode.Dictation;
InputScope myInputScope = new InputScope();
myInputScope.RegularExpression = "W|P|F";
InputMethod.SetInputScope(myTextBox, myInputScope);
tb6.Text = "Configuration UI Available?: " + InputMethod.Current.CanShowConfigurationUI.ToString();
InputMethod.SetPreferredImeState(myTextBox, InputMethodState.On)
InputMethod.Current.ImeSentenceMode = ImeSentenceModeValues.Automatic
InputMethod.Current.HandwritingState = InputMethodState.On
InputMethod.Current.SpeechMode = SpeechMode.Dictation
Dim myInputScope As New InputScope()
myInputScope.RegularExpression = "W|P|F"
InputMethod.SetInputScope(myTextBox, myInputScope)
tb6.Text = "Configuration UI Available?: " & InputMethod.Current.CanShowConfigurationUI.ToString()

適用於

另請參閱