FilePrompt 생성자

정의

FilePrompt 클래스의 새 인스턴스를 만듭니다.

오버로드

FilePrompt(String, SynthesisMediaType)

FilePrompt 클래스의 새 인스턴스를 만들고 파일 경로 및 해당 미디어 형식을 지정합니다.

FilePrompt(Uri, SynthesisMediaType)

FilePrompt 클래스의 새 인스턴스를 만들고 파일 위치 및 해당 미디어 형식을 지정합니다.

FilePrompt(String, SynthesisMediaType)

FilePrompt 클래스의 새 인스턴스를 만들고 파일 경로 및 해당 미디어 형식을 지정합니다.

public:
 FilePrompt(System::String ^ path, System::Speech::Synthesis::SynthesisMediaType media);
public FilePrompt (string path, System.Speech.Synthesis.SynthesisMediaType media);
new System.Speech.Synthesis.FilePrompt : string * System.Speech.Synthesis.SynthesisMediaType -> System.Speech.Synthesis.FilePrompt
Public Sub New (path As String, media As SynthesisMediaType)

매개 변수

path
String

프롬프트 콘텐츠를 포함하는 파일의 경로입니다.

media
SynthesisMediaType

파일의 미디어 형식입니다.

예제

다음 예제에서는 만듭니다는 FilePrompt SSML 프롬프트에 대 한 경로 지정 하는 개체입니다. 프롬프트의 콘텐츠를 사용 하려면 예에서는 다음을 제공 합니다 FilePrompt 개체에 대 한 인수로 Speak 메서드.

using System;  
using System.Speech.Synthesis;  

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

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

                // Configure the audio output.   
                synth.SetOutputToDefaultAudioDevice();  

                // Create a FilePrompt object that references an SSML prompt.  
                FilePrompt ssmlFile = new FilePrompt("c:\\test\\Weather.ssml", SynthesisMediaType.Ssml);  

                // Speak the contents of the SSML prompt.  
                synth.Speak(ssmlFile);  
            }  

            Console.WriteLine();  
            Console.WriteLine("Press any key to exit...");  
            Console.ReadKey();  
        }  
    }  
}  

다음은 앞의 예제를 참조 하는 SSML 파일입니다.

<?xml version="1.0" encoding="ISO-8859-1"?>  
<speak version="1.0"  
 xmlns="http://www.w3.org/2001/10/synthesis"  
 xml:lang="en-US">  

  <s> The weather forecast for today is partly cloudy with some sun breaks. </s>  

</speak>  

설명

이 클래스를 사용 하 여 개체를 만드는에서 기존 음성 합성 태그 언어 (SSML) 파일을 SpeechSynthesizer 음성을 생성 하기 위해 사용할 수 있습니다.

적용 대상

FilePrompt(Uri, SynthesisMediaType)

FilePrompt 클래스의 새 인스턴스를 만들고 파일 위치 및 해당 미디어 형식을 지정합니다.

public:
 FilePrompt(Uri ^ promptFile, System::Speech::Synthesis::SynthesisMediaType media);
public FilePrompt (Uri promptFile, System.Speech.Synthesis.SynthesisMediaType media);
new System.Speech.Synthesis.FilePrompt : Uri * System.Speech.Synthesis.SynthesisMediaType -> System.Speech.Synthesis.FilePrompt
Public Sub New (promptFile As Uri, media As SynthesisMediaType)

매개 변수

promptFile
Uri

프롬프트 콘텐츠를 포함하는 파일의 URI입니다.

media
SynthesisMediaType

파일의 미디어 형식입니다.

적용 대상