SpeechRecognitionGrammarFileConstraint 클래스

정의

SpeechRecognizer 개체에서 인식할 수 있는 단어 또는 구 목록(SRGS(Speech Recognition Grammar Specification) 파일에 정의됨)을 기반으로 하는 사용자 지정 문법 제약 조건입니다.

참고

사용자 지정 제약 조건을 사용하는 음성 인식은 디바이스에서 수행됩니다.

public ref class SpeechRecognitionGrammarFileConstraint sealed
/// [Windows.Foundation.Metadata.Activatable(Windows.Media.SpeechRecognition.ISpeechRecognitionGrammarFileConstraintFactory, 65536, Windows.Foundation.UniversalApiContract)]
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
class SpeechRecognitionGrammarFileConstraint final
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Activatable(Windows.Media.SpeechRecognition.ISpeechRecognitionGrammarFileConstraintFactory, 65536, "Windows.Foundation.UniversalApiContract")]
class SpeechRecognitionGrammarFileConstraint final
[Windows.Foundation.Metadata.Activatable(typeof(Windows.Media.SpeechRecognition.ISpeechRecognitionGrammarFileConstraintFactory), 65536, typeof(Windows.Foundation.UniversalApiContract))]
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
public sealed class SpeechRecognitionGrammarFileConstraint
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Activatable(typeof(Windows.Media.SpeechRecognition.ISpeechRecognitionGrammarFileConstraintFactory), 65536, "Windows.Foundation.UniversalApiContract")]
public sealed class SpeechRecognitionGrammarFileConstraint
function SpeechRecognitionGrammarFileConstraint(file, tag)
Public NotInheritable Class SpeechRecognitionGrammarFileConstraint
상속
Object Platform::Object IInspectable SpeechRecognitionGrammarFileConstraint
특성
구현

Windows 요구 사항

디바이스 패밀리
Windows 10 (10.0.10240.0에서 도입되었습니다.)
API contract
Windows.Foundation.UniversalApiContract (v1.0에서 도입되었습니다.)

설명

제약 조건 또는 문법은 음성 인식기에서 일치시킬 수 있는 음성 단어 및 구를 정의합니다. 미리 정의된 웹 서비스 문법(SpeechRecognitionTopicConstraint) 중 하나를 지정하거나 앱과 함께 설치된 사용자 지정 문법을 만들 수 있습니다(사용자 지정 제약 조건을 사용하는 음성 인식은 디바이스에서 수행됨).

  • 프로그래밍 방식 목록 제약 조건(SpeechRecognitionListConstraint)은 단어 또는 구 목록을 사용하여 간단한 문법을 만드는 간단한 방법을 제공합니다. 짧고 고유한 구를 인식하는 데는 목록 제약 조건이 유용합니다. 음성 인식 엔진이 일치를 확인하기 위해서만 음성을 처리해야 하므로 문법의 모든 단어를 명시적으로 지정하면 인식 정확도도 향상됩니다. 또한 목록은 프로그래밍 방식으로도 업데이트할 수 있습니다.
  • SRGS(Speech Recognition Grammar Specification) 문법(SpeechRecognitionGrammarFileConstraint)은 프로그래밍 방식 목록 제약 조건과 달리 버전 1.0에서 정의된 XML 형식을 사용하는 정적 문서입니다. SRGS(음성 인식 문법 사양) 문법은 단일 인식에서 여러 의미 체계 의미를 캡처할 수 있도록 하여 음성 인식 환경을 가장 많이 제어합니다.

Constraints 속성에 제약 조건이 지정되지 않은 경우에도 CompileConstraintsAsyncRecognizeAsync 또는 RecognizeWithUIAsync 전에 항상 호출되어야 합니다.

생성자

SpeechRecognitionGrammarFileConstraint(StorageFile)

파일 개체에서 SpeechRecognitionGrammarFileConstraint 클래스의 instance 만듭니다.

SpeechRecognitionGrammarFileConstraint(StorageFile, String)

파일 개체 및 태그에서 SpeechRecognitionGrammarFileConstraint 클래스의 instance 만듭니다.

속성

GrammarFile

SRGS(Speech Recognition Grammar Specification) 문법 파일을 나타내는 StorageFile 개체를 가져옵니다.

IsEnabled

음성 인식기에서 제약 조건을 사용하여 인식을 수행할 수 있는지 여부를 가져오거나 설정합니다.

Probability

제약 조건의 가중치 값을 가져오거나 설정합니다.

Tag

제약 조건을 식별하는 데 유용할 수 있는 태그를 가져오거나 설정합니다.

Type

제약 조건의 형식을 가져옵니다.

적용 대상

추가 정보