PhonemeReachedEventArgs 클래스

정의

PhonemeReached 이벤트에서 데이터를 반환합니다.

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
상속

예제

다음 예제에서는 반환 하는 정보를 기록 하는 Windows Forms 애플리케이션의 일부인는 PhonemeReached 텍스트 상자에는 이벤트입니다. 음소는 문자를 International Phonetic Alphabet (IPA)합니다.

참고

반환 된 첫 문자와 마지막 문자 PhonemeReachedEventArgs 열고 닫는 묶습니다 있는 단어나 구를 구성 하는 음소를 나타내지 않으면 문자입니다. 이 예에서는 다섯 개의 문자를 반환 되지만 중간 세 문자만 음소 "테마" 라는 단어를 나타내는: "th" 소리, "e" 소리 및 "m" 소리의 하나입니다.

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));  
    }  
  }  
}  

설명

음소는 작성 된 언어의 기본적인 구성 요소입니다. 음소에 대 한 자세한 내용은 참조 하세요. PhonemeReached합니다.

속성

AudioPosition

음소의 오디오 위치를 가져옵니다.

Cancelled

비동기 작업이 취소되었는지 여부를 나타내는 값을 가져옵니다.

(다음에서 상속됨 AsyncCompletedEventArgs)
Duration

음소의 지속 시간을 가져옵니다.

Emphasis

음소의 강조를 가져옵니다.

Error

비동기 작업 중 발생한 오류를 나타내는 값을 가져옵니다.

(다음에서 상속됨 AsyncCompletedEventArgs)
NextPhoneme

PhonemeReached 이벤트와 연결된 음소 뒤에 오는 음소를 가져옵니다.

Phoneme

PhonemeReached 이벤트와 연결된 음소입니다.

Prompt

이벤트와 관련된 프롬프트를 가져옵니다.

(다음에서 상속됨 PromptEventArgs)
UserState

비동기 작업의 고유 식별자를 가져옵니다.

(다음에서 상속됨 AsyncCompletedEventArgs)

메서드

Equals(Object)

지정된 개체가 현재 개체와 같은지 확인합니다.

(다음에서 상속됨 Object)
GetHashCode()

기본 해시 함수로 작동합니다.

(다음에서 상속됨 Object)
GetType()

현재 인스턴스의 Type을 가져옵니다.

(다음에서 상속됨 Object)
MemberwiseClone()

현재 Object의 단순 복사본을 만듭니다.

(다음에서 상속됨 Object)
RaiseExceptionIfNecessary()

비동기 작업에 실패한 경우 사용자가 제공한 예외를 발생시킵니다.

(다음에서 상속됨 AsyncCompletedEventArgs)
ToString()

현재 개체를 나타내는 문자열을 반환합니다.

(다음에서 상속됨 Object)

적용 대상