Win32 API 日本語リファレンス
ホームMedia.Speech › ISpeechPhraseElement

ISpeechPhraseElement

COMIDispatch (デュアル)
IDispatch を実装(デュアルインターフェース)。HSP では comobj 経由でメソッド名による遅延バインド呼び出しができます(vtableインデックス不要)。
IIDe6176f96-e373-4801-b223-3b62c068c0b4継承元IDispatch呼び出し名前(IDispatch) または vtbl自前メソッド開始 vtbl7

メソッド 13

vtbl = vtable インデックス(0始まり)。IDispatch 実装のため HSP ではメソッド名でも呼べます(上記)。低レベルの index 呼び出し用に vtbl も掲載。0〜2 は IUnknown。

vtbl 7 HRESULT get_AudioTimeOffset(INT* AudioTimeOffset)
AudioTimeOffsetINT*outフレーズ先頭からこの要素までの時間オフセット(100ナノ秒単位)を受け取るポインタ。
vtbl 8 HRESULT get_AudioSizeTime(INT* AudioSizeTime)
AudioSizeTimeINT*outこの要素の音声長(100ナノ秒単位)を受け取るポインタ。
vtbl 9 HRESULT get_AudioStreamOffset(INT* AudioStreamOffset)
AudioStreamOffsetINT*out入力ストリーム上のこの要素の音声開始オフセット(バイト)を受け取るポインタ。
vtbl 10 HRESULT get_AudioSizeBytes(INT* AudioSizeBytes)
AudioSizeBytesINT*outこの要素の音声のバイトサイズを受け取るポインタ。
vtbl 11 HRESULT get_RetainedStreamOffset(INT* RetainedStreamOffset)
RetainedStreamOffsetINT*out保持音声ストリーム上のこの要素のオフセット(バイト)を受け取るポインタ。
vtbl 12 HRESULT get_RetainedSizeBytes(INT* RetainedSizeBytes)
RetainedSizeBytesINT*out保持音声内のこの要素のバイトサイズを受け取るポインタ。
vtbl 13 HRESULT get_DisplayText(LPWSTR* DisplayText)
DisplayTextLPWSTR*outこの要素の表示用テキストを受け取るポインタ。
vtbl 14 HRESULT get_LexicalForm(LPWSTR* LexicalForm)
LexicalFormLPWSTR*outこの要素の字句形(正規化前の語形)を受け取るポインタ。
vtbl 15 HRESULT get_Pronunciation(VARIANT* Pronunciation)
PronunciationVARIANT*outこの要素の発音(音素列)を受け取るVARIANTポインタ。
vtbl 16 HRESULT get_DisplayAttributes(SpeechDisplayAttributes* DisplayAttributes)
DisplayAttributesSpeechDisplayAttributes*out前後の空白付与等の表示属性(SpeechDisplayAttributes)を受け取るポインタ。
vtbl 17 HRESULT get_RequiredConfidence(SpeechEngineConfidence* RequiredConfidence)
RequiredConfidenceSpeechEngineConfidence*out文法が要求した最低信頼度(SpeechEngineConfidence)を受け取るポインタ。
vtbl 18 HRESULT get_ActualConfidence(SpeechEngineConfidence* ActualConfidence)
ActualConfidenceSpeechEngineConfidence*out実際の信頼度レベル(SpeechEngineConfidence: 低/中/高)を受け取るポインタ。
vtbl 19 HRESULT get_EngineConfidence(FLOAT* EngineConfidence)
EngineConfidenceFLOAT*outエンジンが算出した生の信頼度スコア(FLOAT)を受け取るポインタ。

HSP用 COM定義

#usecom / #comfunc によるHSPのCOM呼び出し定義。数字は vtbl インデックス(0始まり)。クラスIDが無い場合 #usecom の末尾は "{}"、ある場合は "{CLSID}"

出力引数:
#define global IID_ISpeechPhraseElement "{E6176F96-E373-4801-B223-3B62C068C0B4}"
#usecom global ISpeechPhraseElement IID_ISpeechPhraseElement "{}"
#comfunc global ISpeechPhraseElement_get_AudioTimeOffset       7 var
#comfunc global ISpeechPhraseElement_get_AudioSizeTime         8 var
#comfunc global ISpeechPhraseElement_get_AudioStreamOffset     9 var
#comfunc global ISpeechPhraseElement_get_AudioSizeBytes        10 var
#comfunc global ISpeechPhraseElement_get_RetainedStreamOffset  11 var
#comfunc global ISpeechPhraseElement_get_RetainedSizeBytes     12 var
#comfunc global ISpeechPhraseElement_get_DisplayText           13 var
#comfunc global ISpeechPhraseElement_get_LexicalForm           14 var
#comfunc global ISpeechPhraseElement_get_Pronunciation         15 var
#comfunc global ISpeechPhraseElement_get_DisplayAttributes     16 var
#comfunc global ISpeechPhraseElement_get_RequiredConfidence    17 var
#comfunc global ISpeechPhraseElement_get_ActualConfidence      18 var
#comfunc global ISpeechPhraseElement_get_EngineConfidence      19 var
; ※数字は vtbl インデックス(0始まり)。0/1/2 は IUnknown(QueryInterface/AddRef/Release)。
; ※このインターフェースは直接 CoCreateInstance するクラスIDが無いため "{}"(他メソッド/アクティベーションで取得)。
; ※出力/バッファ引数は var(変数直渡し)。varptr 方式にも切替可。
; ※IDispatch 実装。HSP では comobj 経由でメソッド名による呼び出しも可能(vtbl 不要)。