VoiceInfo 클래스

정의

설치된 스피치 합성 엔진을 표현한다

public ref class VoiceInfo
[System.Serializable]
public class VoiceInfo
[<System.Serializable>]
type VoiceInfo = class
Public Class VoiceInfo
상속
VoiceInfo
특성

예제

다음 예제는 초기화 하는 콘솔 애플리케이션의 일부를 SpeechSynthesizer 개체 설치 된 음성 (음성 합성 엔진)의 목록을 콘솔에 출력 하 고 각 음성에 사용할 수 있는 정보를 보여 줍니다.

using System;  
using System.Speech.Synthesis;  
using System.Speech.AudioFormat;  

namespace SampleSynthesis  
{  
  class Program  
  {  
    static void Main(string[] args)  
    {  

      // Initialize a new instance of the SpeechSynthesizer.  
      using (SpeechSynthesizer synth = new SpeechSynthesizer())  
      {  

        // Output information about all of the installed voices.   
        Console.WriteLine("Installed voices -");  
        foreach (InstalledVoice voice in synth.GetInstalledVoices())  
        {  
          VoiceInfo info = voice.VoiceInfo;  
          string AudioFormats = "";  
          foreach (SpeechAudioFormatInfo fmt in info.SupportedAudioFormats)  
          {  
            AudioFormats += String.Format("{0}\n",  
            fmt.EncodingFormat.ToString());  
          }  

          Console.WriteLine(" Name:          " + info.Name);  
          Console.WriteLine(" Culture:       " + info.Culture);  
          Console.WriteLine(" Age:           " + info.Age);  
          Console.WriteLine(" Gender:        " + info.Gender);  
          Console.WriteLine(" Description:   " + info.Description);  
          Console.WriteLine(" ID:            " + info.Id);  
          Console.WriteLine(" Enabled:       " + voice.Enabled);  
          if (info.SupportedAudioFormats.Count != 0)  
          {  
            Console.WriteLine( " Audio formats: " + AudioFormats);  
          }  
          else  
          {  
            Console.WriteLine(" No supported audio formats found");  
          }  

          string AdditionalInfo = "";  
          foreach (string key in info.AdditionalInfo.Keys)  
          {  
            AdditionalInfo += String.Format("  {0}: {1}\n", key, info.AdditionalInfo[key]);  
          }  

          Console.WriteLine(" Additional Info - " + AdditionalInfo);  
          Console.WriteLine();  
        }  
      }  
      Console.WriteLine("Press any key to exit...");  
      Console.ReadKey();  
    }  
  }  
}  

설명

음성은 텍스트 음성 변환 엔진 또는 TTS 엔진으로도 참조 되는 설치 된 음성 합성 엔진을 경우 SpeechSynthesizer 개체가 텍스트에서 음성을 생성 하는 음성을 사용 합니다. 속성을 VoiceInfo 개체는 음성을 식별 하 고 해당 특성을 설명 합니다. 음성의 가장 대표적인 특징은 해당 Culture를 음성으로 말할 수 있는 단일 언어를 정의 하는 합니다.

Voice 속성에서 반환을 VoiceInfo 사용 하 여 현재 음성에 대 한 정보가 포함 된 개체는 SpeechSynthesizer합니다. 사용할 수도 있습니다는 VoiceInfo 반환한 시스템에 설치 된 음성에 대 한 정보를 가져올 개체는 GetInstalledVoices() 메서드. 자세한 내용은 InstalledVoice를 참조하세요.

속성

AdditionalInfo

음성에 대한 추가 정보를 가져옵니다.

Age

목소리 연령을 가져옵니다.

Culture

음성의 문화권을 가져옵니다.

Description

음성에 대한 설명을 가져옵니다.

Gender

음성의 성별을 가져옵니다.

Id

음성의 ID를 가져옵니다.

Name

음성의 이름을 가져옵니다.

SupportedAudioFormats

음성을 지원하는 오디오 형식 컬렉션을 가져옵니다.

메서드

Equals(Object)

음성 필드와 지정된 VoiceInfo 개체를 비교하여 같은 값이 있는지 여부를 확인합니다.

GetHashCode()

VoiceInfo 개체에 대한 해시 코드를 제공합니다.

GetType()

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

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

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

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

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

(다음에서 상속됨 Object)

적용 대상

추가 정보