SpeechRecognitionListConstraint 클래스

정의

SpeechRecognizer 개체에서 인식할 수 있는 단어 또는 구 목록을 기반으로 하는 사용자 지정 문법 제약 조건입니다. 초기화되면 이 개체가 Constraints 컬렉션에 추가됩니다.

참고

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

public ref class SpeechRecognitionListConstraint sealed
/// [Windows.Foundation.Metadata.Activatable(Windows.Media.SpeechRecognition.ISpeechRecognitionListConstraintFactory, 65536, Windows.Foundation.UniversalApiContract)]
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
class SpeechRecognitionListConstraint 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.ISpeechRecognitionListConstraintFactory, 65536, "Windows.Foundation.UniversalApiContract")]
class SpeechRecognitionListConstraint final
[Windows.Foundation.Metadata.Activatable(typeof(Windows.Media.SpeechRecognition.ISpeechRecognitionListConstraintFactory), 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 SpeechRecognitionListConstraint
[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.ISpeechRecognitionListConstraintFactory), 65536, "Windows.Foundation.UniversalApiContract")]
public sealed class SpeechRecognitionListConstraint
function SpeechRecognitionListConstraint(commands, tag)
Public NotInheritable Class SpeechRecognitionListConstraint
상속
Object Platform::Object IInspectable SpeechRecognitionListConstraint
특성
구현

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 전에 항상 호출되어야 합니다.

참고

SpeechRecognitionListConstraint를 웹 서비스 SpeechRecognitionTopicConstraint 와 함께 사용하여 받아쓰기 세션 중에 사용할 가능성이 있다고 생각되는 도메인별 키워드 집합을 제공하여 정확도를 높일 수 있습니다.

생성자

SpeechRecognitionListConstraint(IIterable<String>)

단어 또는 구 배열에서 SpeechRecognitionListConstraint 클래스의 instance 만듭니다.

SpeechRecognitionListConstraint(IIterable<String>, String)

단어 또는 구 및 태그 배열에서 SpeechRecognitionListConstraint 클래스의 instance 만듭니다.

속성

Commands

제약 조건을 구성하는 단어 또는 구의 배열을 가져옵니다.

IsEnabled

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

Probability

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

Tag

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

Type

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

적용 대상

추가 정보