PhonemeReachedEventArgs PhonemeReachedEventArgs PhonemeReachedEventArgs PhonemeReachedEventArgs Class

定義

PhonemeReached イベントからのデータを返します。Returns data from the PhonemeReached event.

public ref class PhonemeReachedEventArgs : System::Speech::Synthesis::PromptEventArgs
public class PhonemeReachedEventArgs : System.Speech.Synthesis.PromptEventArgs
type PhonemeReachedEventArgs = class
    inherit PromptEventArgs
Public Class PhonemeReachedEventArgs
Inherits PromptEventArgs
継承

次の例は、 PhonemeReachedイベントによって返された情報をテキストボックスに書き込む Windows フォームアプリケーションの一部です。The following example is part of a Windows Forms application that writes the information returned by the PhonemeReached event to a text box. 音素は、国際音声記号 (IPA)の文字です。The phonemes are characters from the International Phonetic Alphabet (IPA).

注意

によってPhonemeReachedEventArgs返される最初と最後の文字は、単語または語句を構成する音素を表しているのではなく、開始文字と終了文字です。The first and last characters returned by PhonemeReachedEventArgs are opening and closing characters that enclose but do not represent phonemes that constitute a word or phrase. この例では5文字が返されますが、"theme" という単語を表す音素は、"theme" という単語を表します。1つは "th" サウンド、もう1つは "e" サウンド、もう1つは "m" サウンド用です。This example returns five characters, but only the middle three characters are phonemes that represent the word "theme": one for the "th" sound, one for the "e" sound, and one for the "m" sound .

using System;  
using System.Collections.Generic;  
using System.ComponentModel;  
using System.Data;  
using System.Drawing;  
using System.Linq;  
using System.Text;  
using System.Windows.Forms;  
using System.Speech.Synthesis;  
  
namespace PhonemeReached  
{  
  public partial class Form1 : Form  
  {  
  
    public Form1()  
    {  
      InitializeComponent();  
      textBox1.Text = "";  
    }  
  
    public void button1_Click(object sender, EventArgs e)  
    {  
      // Initialize a new instance of the SpeechSynthesizer.  
      SpeechSynthesizer synth = new SpeechSynthesizer();  
  
      // Configure the audio output.   
      synth.SetOutputToDefaultAudioDevice();  
  
      // Register for the PhonemeReached event.  
      synth.PhonemeReached += new EventHandler<PhonemeReachedEventArgs>(synth_PhonemeReached);  
  
      // Speak the contents of a string.  
      synth.Speak("Theme");  
    }  
  
    // Write information about each phoneme as it is reached.  
    private void synth_PhonemeReached(object sender, PhonemeReachedEventArgs e)  
    {textBox1.AppendText(string.Format(  
  
        "  Phoneme reached summary:" + Environment.NewLine +  
        "    Phoneme:                 {0}" + Environment.NewLine +    
        "    Audio Position:         {1} mSec" + Environment.NewLine +  
        "    Duration:                  {2} mSec" + Environment.NewLine +  
        "    Emphasis:                {3}" + Environment.NewLine +  
        "    Next Phoneme:         {4}" + Environment.NewLine + Environment.NewLine,   
        e.Phoneme,  
        e.AudioPosition,  
        e.Duration,  
        e.Emphasis,  
        e.NextPhoneme));  
    }  
  }  
}  

注釈

音素は、記述言語の基本コンポーネントです。A phoneme is a basic component of written language. 音素の詳細についてはPhonemeReached、「」を参照してください。For more information about phonemes, see PhonemeReached.

プロパティ

AudioPosition AudioPosition AudioPosition AudioPosition

音素のオーディオの位置を取得します。Gets the audio position of the phoneme.

Cancelled Cancelled Cancelled Cancelled

非同期操作がキャンセルされたかどうかを示す値を取得します。Gets a value indicating whether an asynchronous operation has been canceled.

(Inherited from AsyncCompletedEventArgs)
Duration Duration Duration Duration

音素の継続時間を取得します。Gets the duration of the phoneme.

Emphasis Emphasis Emphasis Emphasis

音素の強勢を取得します。Gets the emphasis of the phoneme.

Error Error Error Error

非同期操作中に発生したエラーを示す値を取得します。Gets a value indicating which error occurred during an asynchronous operation.

(Inherited from AsyncCompletedEventArgs)
NextPhoneme NextPhoneme NextPhoneme NextPhoneme

PhonemeReached イベントに関連付けられた音素の次の音素を取得します。Gets the phoneme following the phoneme associated with the PhonemeReached event.

Phoneme Phoneme Phoneme Phoneme

PhonemeReached イベントに関連付けられている音素。The phoneme associated with the PhonemeReached event.

Prompt Prompt Prompt Prompt

イベントに関連付けられているプロンプトを取得します。Gets the prompt associated with the event.

(Inherited from PromptEventArgs)
UserState UserState UserState UserState

非同期タスクの一意の識別子を取得します。Gets the unique identifier for the asynchronous task.

(Inherited from AsyncCompletedEventArgs)

メソッド

Equals(Object) Equals(Object) Equals(Object) Equals(Object)

指定したオブジェクトが、現在のオブジェクトと等しいかどうかを判断します。Determines whether the specified object is equal to the current object.

(Inherited from Object)
GetHashCode() GetHashCode() GetHashCode() GetHashCode()

既定のハッシュ関数として機能します。Serves as the default hash function.

(Inherited from Object)
GetType() GetType() GetType() GetType()

現在のインスタンスの Type を取得します。Gets the Type of the current instance.

(Inherited from Object)
MemberwiseClone() MemberwiseClone() MemberwiseClone() MemberwiseClone()

現在の Object の簡易コピーを作成します。Creates a shallow copy of the current Object.

(Inherited from Object)
RaiseExceptionIfNecessary() RaiseExceptionIfNecessary() RaiseExceptionIfNecessary() RaiseExceptionIfNecessary()

非同期操作が失敗した場合は、ユーザー指定の例外を発生させます。Raises a user-supplied exception if an asynchronous operation failed.

(Inherited from AsyncCompletedEventArgs)
ToString() ToString() ToString() ToString()

現在のオブジェクトを表す文字列を返します。Returns a string that represents the current object.

(Inherited from Object)

適用対象