scripts
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
using System;
|
||||
|
||||
namespace UnityEngine.Windows.Speech
|
||||
{
|
||||
// Token: 0x020004FC RID: 1276
|
||||
public enum ConfidenceLevel
|
||||
{
|
||||
// Token: 0x0400126A RID: 4714
|
||||
High,
|
||||
// Token: 0x0400126B RID: 4715
|
||||
Medium,
|
||||
// Token: 0x0400126C RID: 4716
|
||||
Low,
|
||||
// Token: 0x0400126D RID: 4717
|
||||
Rejected
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
using System;
|
||||
|
||||
namespace UnityEngine.Windows.Speech
|
||||
{
|
||||
// Token: 0x02000500 RID: 1280
|
||||
public enum DictationCompletionCause
|
||||
{
|
||||
// Token: 0x04001282 RID: 4738
|
||||
Complete,
|
||||
// Token: 0x04001283 RID: 4739
|
||||
AudioQualityFailure,
|
||||
// Token: 0x04001284 RID: 4740
|
||||
Canceled,
|
||||
// Token: 0x04001285 RID: 4741
|
||||
TimeoutExceeded,
|
||||
// Token: 0x04001286 RID: 4742
|
||||
PauseLimitExceeded,
|
||||
// Token: 0x04001287 RID: 4743
|
||||
NetworkFailure,
|
||||
// Token: 0x04001288 RID: 4744
|
||||
MicrophoneUnavailable,
|
||||
// Token: 0x04001289 RID: 4745
|
||||
UnknownError
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,285 @@
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.Runtime.CompilerServices;
|
||||
using UnityEngine.Scripting;
|
||||
|
||||
namespace UnityEngine.Windows.Speech
|
||||
{
|
||||
// Token: 0x020000F5 RID: 245
|
||||
public sealed class DictationRecognizer : IDisposable
|
||||
{
|
||||
// Token: 0x060011C9 RID: 4553 RVA: 0x00017C38 File Offset: 0x00015E38
|
||||
public DictationRecognizer()
|
||||
: this(ConfidenceLevel.Medium, DictationTopicConstraint.Dictation)
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x060011CA RID: 4554 RVA: 0x00017C44 File Offset: 0x00015E44
|
||||
public DictationRecognizer(ConfidenceLevel confidenceLevel)
|
||||
: this(confidenceLevel, DictationTopicConstraint.Dictation)
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x060011CB RID: 4555 RVA: 0x00017C50 File Offset: 0x00015E50
|
||||
public DictationRecognizer(DictationTopicConstraint topic)
|
||||
: this(ConfidenceLevel.Medium, topic)
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x060011CC RID: 4556 RVA: 0x00017C5C File Offset: 0x00015E5C
|
||||
public DictationRecognizer(ConfidenceLevel minimumConfidence, DictationTopicConstraint topic)
|
||||
{
|
||||
this.m_Recognizer = this.Create(minimumConfidence, topic);
|
||||
}
|
||||
|
||||
// Token: 0x060011CD RID: 4557 RVA: 0x00017C74 File Offset: 0x00015E74
|
||||
private IntPtr Create(ConfidenceLevel minimumConfidence, DictationTopicConstraint topicConstraint)
|
||||
{
|
||||
IntPtr intPtr;
|
||||
DictationRecognizer.INTERNAL_CALL_Create(this, minimumConfidence, topicConstraint, out intPtr);
|
||||
return intPtr;
|
||||
}
|
||||
|
||||
// Token: 0x060011CE RID: 4558
|
||||
[GeneratedByOldBindingsGenerator]
|
||||
[MethodImpl(MethodImplOptions.InternalCall)]
|
||||
private static extern void INTERNAL_CALL_Create(DictationRecognizer self, ConfidenceLevel minimumConfidence, DictationTopicConstraint topicConstraint, out IntPtr value);
|
||||
|
||||
// Token: 0x060011CF RID: 4559
|
||||
[GeneratedByOldBindingsGenerator]
|
||||
[MethodImpl(MethodImplOptions.InternalCall)]
|
||||
private static extern void Start(IntPtr self);
|
||||
|
||||
// Token: 0x060011D0 RID: 4560
|
||||
[GeneratedByOldBindingsGenerator]
|
||||
[MethodImpl(MethodImplOptions.InternalCall)]
|
||||
private static extern void Stop(IntPtr self);
|
||||
|
||||
// Token: 0x060011D1 RID: 4561
|
||||
[GeneratedByOldBindingsGenerator]
|
||||
[MethodImpl(MethodImplOptions.InternalCall)]
|
||||
private static extern void Destroy(IntPtr self);
|
||||
|
||||
// Token: 0x060011D2 RID: 4562
|
||||
[ThreadAndSerializationSafe]
|
||||
[GeneratedByOldBindingsGenerator]
|
||||
[MethodImpl(MethodImplOptions.InternalCall)]
|
||||
private static extern void DestroyThreaded(IntPtr self);
|
||||
|
||||
// Token: 0x060011D3 RID: 4563
|
||||
[GeneratedByOldBindingsGenerator]
|
||||
[MethodImpl(MethodImplOptions.InternalCall)]
|
||||
private static extern SpeechSystemStatus GetStatus(IntPtr self);
|
||||
|
||||
// Token: 0x060011D4 RID: 4564
|
||||
[GeneratedByOldBindingsGenerator]
|
||||
[MethodImpl(MethodImplOptions.InternalCall)]
|
||||
private static extern float GetAutoSilenceTimeoutSeconds(IntPtr self);
|
||||
|
||||
// Token: 0x060011D5 RID: 4565
|
||||
[GeneratedByOldBindingsGenerator]
|
||||
[MethodImpl(MethodImplOptions.InternalCall)]
|
||||
private static extern void SetAutoSilenceTimeoutSeconds(IntPtr self, float value);
|
||||
|
||||
// Token: 0x060011D6 RID: 4566
|
||||
[GeneratedByOldBindingsGenerator]
|
||||
[MethodImpl(MethodImplOptions.InternalCall)]
|
||||
private static extern float GetInitialSilenceTimeoutSeconds(IntPtr self);
|
||||
|
||||
// Token: 0x060011D7 RID: 4567
|
||||
[GeneratedByOldBindingsGenerator]
|
||||
[MethodImpl(MethodImplOptions.InternalCall)]
|
||||
private static extern void SetInitialSilenceTimeoutSeconds(IntPtr self, float value);
|
||||
|
||||
// Token: 0x1400000C RID: 12
|
||||
// (add) Token: 0x060011D8 RID: 4568 RVA: 0x00017C94 File Offset: 0x00015E94
|
||||
// (remove) Token: 0x060011D9 RID: 4569 RVA: 0x00017CCC File Offset: 0x00015ECC
|
||||
[field: DebuggerBrowsable(DebuggerBrowsableState.Never)]
|
||||
public event DictationRecognizer.DictationHypothesisDelegate DictationHypothesis;
|
||||
|
||||
// Token: 0x1400000D RID: 13
|
||||
// (add) Token: 0x060011DA RID: 4570 RVA: 0x00017D04 File Offset: 0x00015F04
|
||||
// (remove) Token: 0x060011DB RID: 4571 RVA: 0x00017D3C File Offset: 0x00015F3C
|
||||
[field: DebuggerBrowsable(DebuggerBrowsableState.Never)]
|
||||
public event DictationRecognizer.DictationResultDelegate DictationResult;
|
||||
|
||||
// Token: 0x1400000E RID: 14
|
||||
// (add) Token: 0x060011DC RID: 4572 RVA: 0x00017D74 File Offset: 0x00015F74
|
||||
// (remove) Token: 0x060011DD RID: 4573 RVA: 0x00017DAC File Offset: 0x00015FAC
|
||||
[field: DebuggerBrowsable(DebuggerBrowsableState.Never)]
|
||||
public event DictationRecognizer.DictationCompletedDelegate DictationComplete;
|
||||
|
||||
// Token: 0x1400000F RID: 15
|
||||
// (add) Token: 0x060011DE RID: 4574 RVA: 0x00017DE4 File Offset: 0x00015FE4
|
||||
// (remove) Token: 0x060011DF RID: 4575 RVA: 0x00017E1C File Offset: 0x0001601C
|
||||
[field: DebuggerBrowsable(DebuggerBrowsableState.Never)]
|
||||
public event DictationRecognizer.DictationErrorHandler DictationError;
|
||||
|
||||
// Token: 0x17000384 RID: 900
|
||||
// (get) Token: 0x060011E0 RID: 4576 RVA: 0x00017E54 File Offset: 0x00016054
|
||||
public SpeechSystemStatus Status
|
||||
{
|
||||
get
|
||||
{
|
||||
return (!(this.m_Recognizer != IntPtr.Zero)) ? SpeechSystemStatus.Stopped : DictationRecognizer.GetStatus(this.m_Recognizer);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000385 RID: 901
|
||||
// (get) Token: 0x060011E1 RID: 4577 RVA: 0x00017E90 File Offset: 0x00016090
|
||||
// (set) Token: 0x060011E2 RID: 4578 RVA: 0x00017ED0 File Offset: 0x000160D0
|
||||
public float AutoSilenceTimeoutSeconds
|
||||
{
|
||||
get
|
||||
{
|
||||
float num;
|
||||
if (this.m_Recognizer == IntPtr.Zero)
|
||||
{
|
||||
num = 0f;
|
||||
}
|
||||
else
|
||||
{
|
||||
num = DictationRecognizer.GetAutoSilenceTimeoutSeconds(this.m_Recognizer);
|
||||
}
|
||||
return num;
|
||||
}
|
||||
set
|
||||
{
|
||||
if (!(this.m_Recognizer == IntPtr.Zero))
|
||||
{
|
||||
DictationRecognizer.SetAutoSilenceTimeoutSeconds(this.m_Recognizer, value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000386 RID: 902
|
||||
// (get) Token: 0x060011E3 RID: 4579 RVA: 0x00017EFC File Offset: 0x000160FC
|
||||
// (set) Token: 0x060011E4 RID: 4580 RVA: 0x00017F3C File Offset: 0x0001613C
|
||||
public float InitialSilenceTimeoutSeconds
|
||||
{
|
||||
get
|
||||
{
|
||||
float num;
|
||||
if (this.m_Recognizer == IntPtr.Zero)
|
||||
{
|
||||
num = 0f;
|
||||
}
|
||||
else
|
||||
{
|
||||
num = DictationRecognizer.GetInitialSilenceTimeoutSeconds(this.m_Recognizer);
|
||||
}
|
||||
return num;
|
||||
}
|
||||
set
|
||||
{
|
||||
if (!(this.m_Recognizer == IntPtr.Zero))
|
||||
{
|
||||
DictationRecognizer.SetInitialSilenceTimeoutSeconds(this.m_Recognizer, value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x060011E5 RID: 4581 RVA: 0x00017F68 File Offset: 0x00016168
|
||||
~DictationRecognizer()
|
||||
{
|
||||
if (this.m_Recognizer != IntPtr.Zero)
|
||||
{
|
||||
DictationRecognizer.DestroyThreaded(this.m_Recognizer);
|
||||
this.m_Recognizer = IntPtr.Zero;
|
||||
GC.SuppressFinalize(this);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x060011E6 RID: 4582 RVA: 0x00017FC8 File Offset: 0x000161C8
|
||||
public void Start()
|
||||
{
|
||||
if (!(this.m_Recognizer == IntPtr.Zero))
|
||||
{
|
||||
DictationRecognizer.Start(this.m_Recognizer);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x060011E7 RID: 4583 RVA: 0x00017FF0 File Offset: 0x000161F0
|
||||
public void Stop()
|
||||
{
|
||||
if (!(this.m_Recognizer == IntPtr.Zero))
|
||||
{
|
||||
DictationRecognizer.Stop(this.m_Recognizer);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x060011E8 RID: 4584 RVA: 0x00018018 File Offset: 0x00016218
|
||||
public void Dispose()
|
||||
{
|
||||
if (this.m_Recognizer != IntPtr.Zero)
|
||||
{
|
||||
DictationRecognizer.Destroy(this.m_Recognizer);
|
||||
this.m_Recognizer = IntPtr.Zero;
|
||||
}
|
||||
GC.SuppressFinalize(this);
|
||||
}
|
||||
|
||||
// Token: 0x060011E9 RID: 4585 RVA: 0x00018050 File Offset: 0x00016250
|
||||
[RequiredByNativeCode]
|
||||
private void DictationRecognizer_InvokeHypothesisGeneratedEvent(string keyword)
|
||||
{
|
||||
DictationRecognizer.DictationHypothesisDelegate dictationHypothesis = this.DictationHypothesis;
|
||||
if (dictationHypothesis != null)
|
||||
{
|
||||
dictationHypothesis(keyword);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x060011EA RID: 4586 RVA: 0x00018074 File Offset: 0x00016274
|
||||
[RequiredByNativeCode]
|
||||
private void DictationRecognizer_InvokeResultGeneratedEvent(string keyword, ConfidenceLevel minimumConfidence)
|
||||
{
|
||||
DictationRecognizer.DictationResultDelegate dictationResult = this.DictationResult;
|
||||
if (dictationResult != null)
|
||||
{
|
||||
dictationResult(keyword, minimumConfidence);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x060011EB RID: 4587 RVA: 0x00018098 File Offset: 0x00016298
|
||||
[RequiredByNativeCode]
|
||||
private void DictationRecognizer_InvokeCompletedEvent(DictationCompletionCause cause)
|
||||
{
|
||||
DictationRecognizer.DictationCompletedDelegate dictationComplete = this.DictationComplete;
|
||||
if (dictationComplete != null)
|
||||
{
|
||||
dictationComplete(cause);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x060011EC RID: 4588 RVA: 0x000180BC File Offset: 0x000162BC
|
||||
[RequiredByNativeCode]
|
||||
private void DictationRecognizer_InvokeErrorEvent(string error, int hresult)
|
||||
{
|
||||
DictationRecognizer.DictationErrorHandler dictationError = this.DictationError;
|
||||
if (dictationError != null)
|
||||
{
|
||||
dictationError(error, hresult);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0400023F RID: 575
|
||||
private IntPtr m_Recognizer;
|
||||
|
||||
// Token: 0x020000F6 RID: 246
|
||||
// (Invoke) Token: 0x060011EE RID: 4590
|
||||
public delegate void DictationHypothesisDelegate(string text);
|
||||
|
||||
// Token: 0x020000F7 RID: 247
|
||||
// (Invoke) Token: 0x060011F2 RID: 4594
|
||||
public delegate void DictationResultDelegate(string text, ConfidenceLevel confidence);
|
||||
|
||||
// Token: 0x020000F8 RID: 248
|
||||
// (Invoke) Token: 0x060011F6 RID: 4598
|
||||
public delegate void DictationCompletedDelegate(DictationCompletionCause cause);
|
||||
|
||||
// Token: 0x020000F9 RID: 249
|
||||
// (Invoke) Token: 0x060011FA RID: 4602
|
||||
public delegate void DictationErrorHandler(string error, int hresult);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
using System;
|
||||
|
||||
namespace UnityEngine.Windows.Speech
|
||||
{
|
||||
// Token: 0x020004FF RID: 1279
|
||||
public enum DictationTopicConstraint
|
||||
{
|
||||
// Token: 0x0400127E RID: 4734
|
||||
WebSearch,
|
||||
// Token: 0x0400127F RID: 4735
|
||||
Form,
|
||||
// Token: 0x04001280 RID: 4736
|
||||
Dictation
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
using System;
|
||||
|
||||
namespace UnityEngine.Windows.Speech
|
||||
{
|
||||
// Token: 0x02000504 RID: 1284
|
||||
public sealed class GrammarRecognizer : PhraseRecognizer
|
||||
{
|
||||
// Token: 0x06003C5A RID: 15450 RVA: 0x0006AAD4 File Offset: 0x00068CD4
|
||||
public GrammarRecognizer(string grammarFilePath)
|
||||
: this(grammarFilePath, ConfidenceLevel.Medium)
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x06003C5B RID: 15451 RVA: 0x0006AAE0 File Offset: 0x00068CE0
|
||||
public GrammarRecognizer(string grammarFilePath, ConfidenceLevel minimumConfidence)
|
||||
{
|
||||
if (grammarFilePath == null)
|
||||
{
|
||||
throw new ArgumentNullException("grammarFilePath");
|
||||
}
|
||||
if (grammarFilePath.Length == 0)
|
||||
{
|
||||
throw new ArgumentException("Grammar file path cannot be empty.");
|
||||
}
|
||||
this.GrammarFilePath = grammarFilePath;
|
||||
this.m_Recognizer = base.CreateFromGrammarFile(grammarFilePath, minimumConfidence);
|
||||
}
|
||||
|
||||
// Token: 0x17000D98 RID: 3480
|
||||
// (get) Token: 0x06003C5C RID: 15452 RVA: 0x0006AB30 File Offset: 0x00068D30
|
||||
// (set) Token: 0x06003C5D RID: 15453 RVA: 0x0006AB4C File Offset: 0x00068D4C
|
||||
public string GrammarFilePath { get; private set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
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; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,82 @@
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.Runtime.CompilerServices;
|
||||
using UnityEngine.Scripting;
|
||||
|
||||
namespace UnityEngine.Windows.Speech
|
||||
{
|
||||
// Token: 0x020000F0 RID: 240
|
||||
public static class PhraseRecognitionSystem
|
||||
{
|
||||
// Token: 0x17000381 RID: 897
|
||||
// (get) Token: 0x060011A0 RID: 4512
|
||||
[ThreadAndSerializationSafe]
|
||||
public static extern bool isSupported
|
||||
{
|
||||
[GeneratedByOldBindingsGenerator]
|
||||
[MethodImpl(MethodImplOptions.InternalCall)]
|
||||
get;
|
||||
}
|
||||
|
||||
// Token: 0x17000382 RID: 898
|
||||
// (get) Token: 0x060011A1 RID: 4513
|
||||
public static extern SpeechSystemStatus Status
|
||||
{
|
||||
[GeneratedByOldBindingsGenerator]
|
||||
[MethodImpl(MethodImplOptions.InternalCall)]
|
||||
get;
|
||||
}
|
||||
|
||||
// Token: 0x060011A2 RID: 4514
|
||||
[GeneratedByOldBindingsGenerator]
|
||||
[MethodImpl(MethodImplOptions.InternalCall)]
|
||||
public static extern void Restart();
|
||||
|
||||
// Token: 0x060011A3 RID: 4515
|
||||
[GeneratedByOldBindingsGenerator]
|
||||
[MethodImpl(MethodImplOptions.InternalCall)]
|
||||
public static extern void Shutdown();
|
||||
|
||||
// Token: 0x14000009 RID: 9
|
||||
// (add) Token: 0x060011A4 RID: 4516 RVA: 0x00017844 File Offset: 0x00015A44
|
||||
// (remove) Token: 0x060011A5 RID: 4517 RVA: 0x00017878 File Offset: 0x00015A78
|
||||
[field: DebuggerBrowsable(DebuggerBrowsableState.Never)]
|
||||
public static event PhraseRecognitionSystem.ErrorDelegate OnError;
|
||||
|
||||
// Token: 0x1400000A RID: 10
|
||||
// (add) Token: 0x060011A6 RID: 4518 RVA: 0x000178AC File Offset: 0x00015AAC
|
||||
// (remove) Token: 0x060011A7 RID: 4519 RVA: 0x000178E0 File Offset: 0x00015AE0
|
||||
[field: DebuggerBrowsable(DebuggerBrowsableState.Never)]
|
||||
public static event PhraseRecognitionSystem.StatusDelegate OnStatusChanged;
|
||||
|
||||
// Token: 0x060011A8 RID: 4520 RVA: 0x00017914 File Offset: 0x00015B14
|
||||
[RequiredByNativeCode]
|
||||
private static void PhraseRecognitionSystem_InvokeErrorEvent(SpeechError errorCode)
|
||||
{
|
||||
PhraseRecognitionSystem.ErrorDelegate onError = PhraseRecognitionSystem.OnError;
|
||||
if (onError != null)
|
||||
{
|
||||
onError(errorCode);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x060011A9 RID: 4521 RVA: 0x00017938 File Offset: 0x00015B38
|
||||
[RequiredByNativeCode]
|
||||
private static void PhraseRecognitionSystem_InvokeStatusChangedEvent(SpeechSystemStatus status)
|
||||
{
|
||||
PhraseRecognitionSystem.StatusDelegate onStatusChanged = PhraseRecognitionSystem.OnStatusChanged;
|
||||
if (onStatusChanged != null)
|
||||
{
|
||||
onStatusChanged(status);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x020000F1 RID: 241
|
||||
// (Invoke) Token: 0x060011AB RID: 4523
|
||||
public delegate void ErrorDelegate(SpeechError errorCode);
|
||||
|
||||
// Token: 0x020000F2 RID: 242
|
||||
// (Invoke) Token: 0x060011AF RID: 4527
|
||||
public delegate void StatusDelegate(SpeechSystemStatus status);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
using System;
|
||||
|
||||
namespace UnityEngine.Windows.Speech
|
||||
{
|
||||
// Token: 0x02000502 RID: 1282
|
||||
public struct PhraseRecognizedEventArgs
|
||||
{
|
||||
// Token: 0x06003C55 RID: 15445 RVA: 0x0006A9F0 File Offset: 0x00068BF0
|
||||
internal PhraseRecognizedEventArgs(string text, ConfidenceLevel confidence, SemanticMeaning[] semanticMeanings, DateTime phraseStartTime, TimeSpan phraseDuration)
|
||||
{
|
||||
this.text = text;
|
||||
this.confidence = confidence;
|
||||
this.semanticMeanings = semanticMeanings;
|
||||
this.phraseStartTime = phraseStartTime;
|
||||
this.phraseDuration = phraseDuration;
|
||||
}
|
||||
|
||||
// Token: 0x0400128C RID: 4748
|
||||
public readonly ConfidenceLevel confidence;
|
||||
|
||||
// Token: 0x0400128D RID: 4749
|
||||
public readonly SemanticMeaning[] semanticMeanings;
|
||||
|
||||
// Token: 0x0400128E RID: 4750
|
||||
public readonly string text;
|
||||
|
||||
// Token: 0x0400128F RID: 4751
|
||||
public readonly DateTime phraseStartTime;
|
||||
|
||||
// Token: 0x04001290 RID: 4752
|
||||
public readonly TimeSpan phraseDuration;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,168 @@
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.Runtime.CompilerServices;
|
||||
using UnityEngine.Scripting;
|
||||
|
||||
namespace UnityEngine.Windows.Speech
|
||||
{
|
||||
// Token: 0x020000F3 RID: 243
|
||||
public abstract class PhraseRecognizer : IDisposable
|
||||
{
|
||||
// Token: 0x060011B2 RID: 4530 RVA: 0x0001795C File Offset: 0x00015B5C
|
||||
internal PhraseRecognizer()
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x060011B3 RID: 4531 RVA: 0x00017968 File Offset: 0x00015B68
|
||||
protected IntPtr CreateFromKeywords(string[] keywords, ConfidenceLevel minimumConfidence)
|
||||
{
|
||||
IntPtr intPtr;
|
||||
PhraseRecognizer.INTERNAL_CALL_CreateFromKeywords(this, keywords, minimumConfidence, out intPtr);
|
||||
return intPtr;
|
||||
}
|
||||
|
||||
// Token: 0x060011B4 RID: 4532
|
||||
[GeneratedByOldBindingsGenerator]
|
||||
[MethodImpl(MethodImplOptions.InternalCall)]
|
||||
private static extern void INTERNAL_CALL_CreateFromKeywords(PhraseRecognizer self, string[] keywords, ConfidenceLevel minimumConfidence, out IntPtr value);
|
||||
|
||||
// Token: 0x060011B5 RID: 4533 RVA: 0x00017988 File Offset: 0x00015B88
|
||||
protected IntPtr CreateFromGrammarFile(string grammarFilePath, ConfidenceLevel minimumConfidence)
|
||||
{
|
||||
IntPtr intPtr;
|
||||
PhraseRecognizer.INTERNAL_CALL_CreateFromGrammarFile(this, grammarFilePath, minimumConfidence, out intPtr);
|
||||
return intPtr;
|
||||
}
|
||||
|
||||
// Token: 0x060011B6 RID: 4534
|
||||
[GeneratedByOldBindingsGenerator]
|
||||
[MethodImpl(MethodImplOptions.InternalCall)]
|
||||
private static extern void INTERNAL_CALL_CreateFromGrammarFile(PhraseRecognizer self, string grammarFilePath, ConfidenceLevel minimumConfidence, out IntPtr value);
|
||||
|
||||
// Token: 0x060011B7 RID: 4535
|
||||
[GeneratedByOldBindingsGenerator]
|
||||
[MethodImpl(MethodImplOptions.InternalCall)]
|
||||
private static extern void Start_Internal(IntPtr recognizer);
|
||||
|
||||
// Token: 0x060011B8 RID: 4536
|
||||
[GeneratedByOldBindingsGenerator]
|
||||
[MethodImpl(MethodImplOptions.InternalCall)]
|
||||
private static extern void Stop_Internal(IntPtr recognizer);
|
||||
|
||||
// Token: 0x060011B9 RID: 4537
|
||||
[GeneratedByOldBindingsGenerator]
|
||||
[MethodImpl(MethodImplOptions.InternalCall)]
|
||||
private static extern bool IsRunning_Internal(IntPtr recognizer);
|
||||
|
||||
// Token: 0x060011BA RID: 4538
|
||||
[GeneratedByOldBindingsGenerator]
|
||||
[MethodImpl(MethodImplOptions.InternalCall)]
|
||||
private static extern void Destroy(IntPtr recognizer);
|
||||
|
||||
// Token: 0x060011BB RID: 4539
|
||||
[ThreadAndSerializationSafe]
|
||||
[GeneratedByOldBindingsGenerator]
|
||||
[MethodImpl(MethodImplOptions.InternalCall)]
|
||||
private static extern void DestroyThreaded(IntPtr recognizer);
|
||||
|
||||
// Token: 0x1400000B RID: 11
|
||||
// (add) Token: 0x060011BC RID: 4540 RVA: 0x000179A8 File Offset: 0x00015BA8
|
||||
// (remove) Token: 0x060011BD RID: 4541 RVA: 0x000179E0 File Offset: 0x00015BE0
|
||||
[field: DebuggerBrowsable(DebuggerBrowsableState.Never)]
|
||||
public event PhraseRecognizer.PhraseRecognizedDelegate OnPhraseRecognized;
|
||||
|
||||
// Token: 0x060011BE RID: 4542 RVA: 0x00017A18 File Offset: 0x00015C18
|
||||
~PhraseRecognizer()
|
||||
{
|
||||
if (this.m_Recognizer != IntPtr.Zero)
|
||||
{
|
||||
PhraseRecognizer.DestroyThreaded(this.m_Recognizer);
|
||||
this.m_Recognizer = IntPtr.Zero;
|
||||
GC.SuppressFinalize(this);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x060011BF RID: 4543 RVA: 0x00017A78 File Offset: 0x00015C78
|
||||
public void Start()
|
||||
{
|
||||
if (!(this.m_Recognizer == IntPtr.Zero))
|
||||
{
|
||||
PhraseRecognizer.Start_Internal(this.m_Recognizer);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x060011C0 RID: 4544 RVA: 0x00017AA0 File Offset: 0x00015CA0
|
||||
public void Stop()
|
||||
{
|
||||
if (!(this.m_Recognizer == IntPtr.Zero))
|
||||
{
|
||||
PhraseRecognizer.Stop_Internal(this.m_Recognizer);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x060011C1 RID: 4545 RVA: 0x00017AC8 File Offset: 0x00015CC8
|
||||
public void Dispose()
|
||||
{
|
||||
if (this.m_Recognizer != IntPtr.Zero)
|
||||
{
|
||||
PhraseRecognizer.Destroy(this.m_Recognizer);
|
||||
this.m_Recognizer = IntPtr.Zero;
|
||||
}
|
||||
GC.SuppressFinalize(this);
|
||||
}
|
||||
|
||||
// Token: 0x17000383 RID: 899
|
||||
// (get) Token: 0x060011C2 RID: 4546 RVA: 0x00017B00 File Offset: 0x00015D00
|
||||
public bool IsRunning
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.m_Recognizer != IntPtr.Zero && PhraseRecognizer.IsRunning_Internal(this.m_Recognizer);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x060011C3 RID: 4547 RVA: 0x00017B38 File Offset: 0x00015D38
|
||||
[RequiredByNativeCode]
|
||||
private void InvokePhraseRecognizedEvent(string text, ConfidenceLevel confidence, SemanticMeaning[] semanticMeanings, long phraseStartFileTime, long phraseDurationTicks)
|
||||
{
|
||||
PhraseRecognizer.PhraseRecognizedDelegate onPhraseRecognized = this.OnPhraseRecognized;
|
||||
if (onPhraseRecognized != null)
|
||||
{
|
||||
onPhraseRecognized(new PhraseRecognizedEventArgs(text, confidence, semanticMeanings, DateTime.FromFileTime(phraseStartFileTime), TimeSpan.FromTicks(phraseDurationTicks)));
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x060011C4 RID: 4548 RVA: 0x00017B70 File Offset: 0x00015D70
|
||||
[RequiredByNativeCode]
|
||||
private unsafe static SemanticMeaning[] MarshalSemanticMeaning(IntPtr keys, IntPtr values, IntPtr valueSizes, int valueCount)
|
||||
{
|
||||
SemanticMeaning[] array = new SemanticMeaning[valueCount];
|
||||
int num = 0;
|
||||
for (int i = 0; i < valueCount; i++)
|
||||
{
|
||||
uint num2 = *(uint*)((byte*)(void*)valueSizes + (IntPtr)i * 4);
|
||||
SemanticMeaning semanticMeaning = new SemanticMeaning
|
||||
{
|
||||
key = new string(*(IntPtr*)((byte*)(void*)keys + (IntPtr)i * (IntPtr)sizeof(char*))),
|
||||
values = new string[num2]
|
||||
};
|
||||
int num3 = 0;
|
||||
while ((long)num3 < (long)((ulong)num2))
|
||||
{
|
||||
semanticMeaning.values[num3] = new string(*(IntPtr*)((byte*)(void*)values + (IntPtr)(num + num3) * (IntPtr)sizeof(char*)));
|
||||
num3++;
|
||||
}
|
||||
array[i] = semanticMeaning;
|
||||
num += (int)num2;
|
||||
}
|
||||
return array;
|
||||
}
|
||||
|
||||
// Token: 0x0400023D RID: 573
|
||||
protected IntPtr m_Recognizer;
|
||||
|
||||
// Token: 0x020000F4 RID: 244
|
||||
// (Invoke) Token: 0x060011C6 RID: 4550
|
||||
public delegate void PhraseRecognizedDelegate(PhraseRecognizedEventArgs args);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
using System;
|
||||
|
||||
namespace UnityEngine.Windows.Speech
|
||||
{
|
||||
// Token: 0x02000501 RID: 1281
|
||||
public struct SemanticMeaning
|
||||
{
|
||||
// Token: 0x0400128A RID: 4746
|
||||
public string key;
|
||||
|
||||
// Token: 0x0400128B RID: 4747
|
||||
public string[] values;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
using System;
|
||||
|
||||
namespace UnityEngine.Windows.Speech
|
||||
{
|
||||
// Token: 0x020004FE RID: 1278
|
||||
public enum SpeechError
|
||||
{
|
||||
// Token: 0x04001273 RID: 4723
|
||||
NoError,
|
||||
// Token: 0x04001274 RID: 4724
|
||||
TopicLanguageNotSupported,
|
||||
// Token: 0x04001275 RID: 4725
|
||||
GrammarLanguageMismatch,
|
||||
// Token: 0x04001276 RID: 4726
|
||||
GrammarCompilationFailure,
|
||||
// Token: 0x04001277 RID: 4727
|
||||
AudioQualityFailure,
|
||||
// Token: 0x04001278 RID: 4728
|
||||
PauseLimitExceeded,
|
||||
// Token: 0x04001279 RID: 4729
|
||||
TimeoutExceeded,
|
||||
// Token: 0x0400127A RID: 4730
|
||||
NetworkFailure,
|
||||
// Token: 0x0400127B RID: 4731
|
||||
MicrophoneUnavailable,
|
||||
// Token: 0x0400127C RID: 4732
|
||||
UnknownError
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
using System;
|
||||
|
||||
namespace UnityEngine.Windows.Speech
|
||||
{
|
||||
// Token: 0x020004FD RID: 1277
|
||||
public enum SpeechSystemStatus
|
||||
{
|
||||
// Token: 0x0400126F RID: 4719
|
||||
Stopped,
|
||||
// Token: 0x04001270 RID: 4720
|
||||
Running,
|
||||
// Token: 0x04001271 RID: 4721
|
||||
Failed
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user