44 lines
1.3 KiB
C#
44 lines
1.3 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
|
|
namespace UnityEngine.Windows.Speech
|
|
{
|
|
// Token: 0x02000503 RID: 1283
|
|
public sealed class KeywordRecognizer : PhraseRecognizer
|
|
{
|
|
// Token: 0x06003C56 RID: 15446 RVA: 0x0006AA18 File Offset: 0x00068C18
|
|
public KeywordRecognizer(string[] keywords)
|
|
: this(keywords, ConfidenceLevel.Medium)
|
|
{
|
|
}
|
|
|
|
// Token: 0x06003C57 RID: 15447 RVA: 0x0006AA24 File Offset: 0x00068C24
|
|
public KeywordRecognizer(string[] keywords, ConfidenceLevel minimumConfidence)
|
|
{
|
|
if (keywords == null)
|
|
{
|
|
throw new ArgumentNullException("keywords");
|
|
}
|
|
if (keywords.Length == 0)
|
|
{
|
|
throw new ArgumentException("At least one keyword must be specified.", "keywords");
|
|
}
|
|
int num = keywords.Length;
|
|
for (int i = 0; i < num; i++)
|
|
{
|
|
if (keywords[i] == null)
|
|
{
|
|
throw new ArgumentNullException(string.Format("Keyword at index {0} is null.", i));
|
|
}
|
|
}
|
|
this.Keywords = keywords;
|
|
this.m_Recognizer = base.CreateFromKeywords(keywords, minimumConfidence);
|
|
}
|
|
|
|
// Token: 0x17000D97 RID: 3479
|
|
// (get) Token: 0x06003C58 RID: 15448 RVA: 0x0006AAAC File Offset: 0x00068CAC
|
|
// (set) Token: 0x06003C59 RID: 15449 RVA: 0x0006AAC8 File Offset: 0x00068CC8
|
|
public IEnumerable<string> Keywords { get; private set; }
|
|
}
|
|
}
|