4 Commits

Author SHA1 Message Date
1af4afc7c6 build: Update project version 2025-05-07 22:56:45 +08:00
a3efe939e8 fix: Fix TTS COM exception in IL2CPP 2025-05-07 22:56:32 +08:00
5daee1a01a feat: Add TTS related settings 2025-05-06 20:35:52 +08:00
2d5d305528 feat: Implement TTS 2025-05-06 20:35:08 +08:00
110 changed files with 3932 additions and 10 deletions

View File

@@ -1,3 +1,3 @@
using System.Reflection; using System.Reflection;
[assembly: AssemblyVersion("0.0.5")] [assembly: AssemblyVersion("0.0.6")]

View File

@@ -1,5 +1,9 @@
using Cryville.EEW.Core;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Diagnostics;
using System.Globalization;
using System.Text.Json;
using System.Text.Json.Serialization; using System.Text.Json.Serialization;
namespace Cryville.EEW.Unity { namespace Cryville.EEW.Unity {
@@ -8,12 +12,17 @@ namespace Cryville.EEW.Unity {
float SeverityColorMappingLuminanceMultiplier, float SeverityColorMappingLuminanceMultiplier,
bool UseContinuousColor, bool UseContinuousColor,
string ColorScheme, string ColorScheme,
string LocationNamer,
string OverrideTimeZone, string OverrideTimeZone,
bool DoDisplayTimeZone, bool DoDisplayTimeZone,
bool DoSwitchBackToHistory, bool DoSwitchBackToHistory,
string NowcastWarningDelayTolerance,
string OverrideDisplayCulture, string OverrideDisplayCulture,
IReadOnlyCollection<TTSCultureConfig> TTSCultures,
bool DoIgnoreLanguageVariant,
IReadOnlyCollection<EventSourceConfig> EventSources IReadOnlyCollection<EventSourceConfig> EventSources
) { ) {
@@ -22,12 +31,17 @@ namespace Cryville.EEW.Unity {
1f, 1f,
false, false,
"Default", "Default",
"FERegionLong",
null, null,
true, true,
true, true,
"1:00:00",
"", "",
new List<TTSCultureConfig> { new(SharedCultures.CurrentUICulture) },
true,
new List<EventSourceConfig> { new List<EventSourceConfig> {
new JMAAtomEventSourceConfig(Array.Empty<string>()), new JMAAtomEventSourceConfig(Array.Empty<string>()),
@@ -61,6 +75,20 @@ namespace Cryville.EEW.Unity {
record WolfxEventSourceConfig(IReadOnlyCollection<string> Filter = null, bool IsFilterWhitelist = false, bool UseRawCENCLocationName = false) : EventSourceConfig; record WolfxEventSourceConfig(IReadOnlyCollection<string> Filter = null, bool IsFilterWhitelist = false, bool UseRawCENCLocationName = false) : EventSourceConfig;
[JsonSerializable(typeof(Config))] [JsonSerializable(typeof(Config))]
[JsonSourceGenerationOptions(WriteIndented = true)] [JsonSourceGenerationOptions(Converters = new Type[] { typeof(CultureInfoConverter) }, WriteIndented = true)]
sealed partial class ConfigSerializationContext : JsonSerializerContext { } sealed partial class ConfigSerializationContext : JsonSerializerContext { }
sealed class CultureInfoConverter : JsonConverter<CultureInfo> {
public override CultureInfo Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) {
Debug.Assert(typeToConvert == typeof(CultureInfo));
var value = reader.GetString();
if (value == null) return CultureInfo.InvariantCulture;
if (value == "") return SharedCultures.CurrentUICulture;
return SharedCultures.Get(value);
}
public override void Write(Utf8JsonWriter writer, CultureInfo value, JsonSerializerOptions options) {
writer.WriteStringValue(value.Name);
}
}
} }

View File

@@ -3,6 +3,7 @@
"rootNamespace": "", "rootNamespace": "",
"references": [ "references": [
"GUID:b92f9c7ac10b1c04e86fc48210f62ab1", "GUID:b92f9c7ac10b1c04e86fc48210f62ab1",
"GUID:1e0937e40dadba24a97b7342c4559580",
"GUID:e5b7e7f40a80a814ba706299d68f9213", "GUID:e5b7e7f40a80a814ba706299d68f9213",
"GUID:da293eebbcb9a4947a212534c52d1a32" "GUID:da293eebbcb9a4947a212534c52d1a32"
], ],

View File

@@ -26,12 +26,12 @@ namespace Cryville.EEW.Unity {
public IColorScheme ColorScheme { get; private set; } = new SeverityBasedColorScheme(DefaultSeverityScheme.Instance, DefaultSeverityColorMapping.Instance); public IColorScheme ColorScheme { get; private set; } = new SeverityBasedColorScheme(DefaultSeverityScheme.Instance, DefaultSeverityColorMapping.Instance);
public ISubColorScheme BorderColorScheme { get; private set; } = new WrappedColorScheme(new SeverityBasedColorScheme(DefaultSeverityScheme.Instance, DefaultSeverityColorMapping.SecondaryInstance)); public ISubColorScheme BorderColorScheme { get; private set; } = new WrappedColorScheme(new SeverityBasedColorScheme(DefaultSeverityScheme.Instance, DefaultSeverityColorMapping.SecondaryInstance));
public ISubColorScheme TextColorScheme { get; private set; } = new DefaultTextColorScheme(Color.White, Color.Black); public ISubColorScheme TextColorScheme { get; private set; } = new DefaultTextColorScheme(Color.White, Color.Black);
public TimeSpan NowcastWarningDelayTolerance => TimeSpan.FromMinutes(60); // TODO TTS public TimeSpan NowcastWarningDelayTolerance { get; private set; } = TimeSpan.FromMinutes(60);
public CultureInfo RVMCulture { get; private set; } = SharedCultures.CurrentUICulture; public CultureInfo RVMCulture { get; private set; } = SharedCultures.CurrentUICulture;
readonly int _infoLocationSpecificity = 3; readonly int _infoLocationSpecificity = 3;
readonly int _ttsLocationSpecificity = 3; readonly int _ttsLocationSpecificity = 3;
readonly LocationNamer _locationNamer = new() { Namer = new FERegionLongNamer() }; // TODO TTS readonly LocationNamer _locationNamer = new() { Namer = new FERegionLongNamer() };
public bool NameLocation(double lat, double lon, CultureInfo localCulture, ref CultureInfo targetCulture, out string name, out int specificity) { public bool NameLocation(double lat, double lon, CultureInfo localCulture, ref CultureInfo targetCulture, out string name, out int specificity) {
specificity = _ttsLocationSpecificity; specificity = _ttsLocationSpecificity;
return _locationNamer.Name(lat, lon, localCulture, ref targetCulture, out name, ref specificity); return _locationNamer.Name(lat, lon, localCulture, ref targetCulture, out name, ref specificity);
@@ -41,6 +41,9 @@ namespace Cryville.EEW.Unity {
return _locationNamer.Name(lat, lon, localCulture, ref targetCulture, out name, ref specificity); return _locationNamer.Name(lat, lon, localCulture, ref targetCulture, out name, ref specificity);
} }
public IReadOnlyCollection<TTSCultureConfig> TTSCultures { get; private set; }
public bool DoIgnoreLanguageVariant { get; private set; }
public TimeZoneInfo OverrideTimeZone { get; private set; } public TimeZoneInfo OverrideTimeZone { get; private set; }
public bool DoDisplayTimeZone { get; private set; } = true; public bool DoDisplayTimeZone { get; private set; } = true;
public bool DoSwitchBackToHistory { get; private set; } = true; public bool DoSwitchBackToHistory { get; private set; } = true;
@@ -114,12 +117,20 @@ namespace Cryville.EEW.Unity {
"SREV" => new DefaultTextColorScheme(Color.White, Color.FromArgb(28, 28, 28), 0.555f), "SREV" => new DefaultTextColorScheme(Color.White, Color.FromArgb(28, 28, 28), 0.555f),
_ => new DefaultTextColorScheme(Color.White, Color.Black), _ => new DefaultTextColorScheme(Color.White, Color.Black),
}; };
_locationNamer.Namer = config.LocationNamer switch {
"FERegionShort" => new FERegionShortNamer(),
_ => new FERegionLongNamer(),
};
if (config.NowcastWarningDelayTolerance is string nowcastWarningDelayTolerance)
NowcastWarningDelayTolerance = TimeSpan.Parse(nowcastWarningDelayTolerance, CultureInfo.InvariantCulture);
OverrideTimeZone = ParseTimeZone(config.OverrideTimeZone); OverrideTimeZone = ParseTimeZone(config.OverrideTimeZone);
DoDisplayTimeZone = config.DoDisplayTimeZone; DoDisplayTimeZone = config.DoDisplayTimeZone;
DoSwitchBackToHistory = config.DoSwitchBackToHistory; DoSwitchBackToHistory = config.DoSwitchBackToHistory;
RVMCulture = config.OverrideDisplayCulture is string rvmCulture RVMCulture = config.OverrideDisplayCulture is string rvmCulture
? (string.IsNullOrEmpty(rvmCulture) ? SharedCultures.CurrentUICulture : SharedCultures.Get(rvmCulture)) ? (string.IsNullOrEmpty(rvmCulture) ? SharedCultures.CurrentUICulture : SharedCultures.Get(rvmCulture))
: CultureInfo.InvariantCulture; : CultureInfo.InvariantCulture;
TTSCultures = config.TTSCultures ?? new List<TTSCultureConfig> { new(CultureInfo.InvariantCulture) };
DoIgnoreLanguageVariant = config.DoIgnoreLanguageVariant;
EventSources = config.EventSources; EventSources = config.EventSources;
} }

View File

@@ -1,3 +1,4 @@
using SpeechLib;
using System; using System;
using System.Globalization; using System.Globalization;
using System.Threading; using System.Threading;
@@ -5,7 +6,14 @@ using System.Threading.Tasks;
namespace Cryville.EEW.Unity { namespace Cryville.EEW.Unity {
class TTSWorker : Core.Audio.TTSWorker { class TTSWorker : Core.Audio.TTSWorker {
public TTSWorker() : base(CreateSoundPlayer()) { } readonly ISpVoice _voice;
public TTSWorker() : base(CreateSoundPlayer()) {
try {
_voice = new SpVoiceClass();
}
catch { }
}
static SoundPlayer CreateSoundPlayer() { static SoundPlayer CreateSoundPlayer() {
try { try {
@@ -16,10 +24,25 @@ namespace Cryville.EEW.Unity {
} }
} }
protected override bool IsSpeaking() => false; protected override bool IsSpeaking() {
if (_voice == null) return false;
_voice.GetStatus(out var status, out _);
return (status.dwRunningState & (uint)SpeechRunState.SRSEIsSpeaking) != 0;
}
protected override Task Speak(CultureInfo culture, string content, CancellationToken cancellationToken) => Task.CompletedTask; protected override Task Speak(CultureInfo culture, string content, CancellationToken cancellationToken) {
if (_voice == null) return Task.CompletedTask;
_voice.Speak(
string.Format(CultureInfo.InvariantCulture, "<LANG LANGID=\"{0:x}\">{1}</LANG>", culture.LCID, content),
(uint)(SpeechVoiceSpeakFlags.SVSFlagsAsync | SpeechVoiceSpeakFlags.SVSFPurgeBeforeSpeak),
out _
);
return Task.CompletedTask;
}
protected override void StopCurrent() { } protected override void StopCurrent() {
if (_voice == null) return;
_voice.Skip("SENTENCE", int.MaxValue, out _);
}
} }
} }

View File

@@ -65,6 +65,8 @@ namespace Cryville.EEW.Unity {
_worker.RVMGeneratorContext = SharedSettings.Instance; _worker.RVMGeneratorContext = SharedSettings.Instance;
_worker.TTSMessageGeneratorContext = SharedSettings.Instance; _worker.TTSMessageGeneratorContext = SharedSettings.Instance;
_worker.RVMCulture = SharedSettings.Instance.RVMCulture; _worker.RVMCulture = SharedSettings.Instance.RVMCulture;
_worker.SetTTSCultures(SharedSettings.Instance.TTSCultures ?? new TTSCultureConfig[0]);
_worker.IgnoreLanguageVariant = SharedSettings.Instance.DoIgnoreLanguageVariant;
_ongoingReportManager.Changed += OnOngoingReported; _ongoingReportManager.Changed += OnOngoingReported;
_worker.Reported += OnReported; _worker.Reported += OnReported;
_grouper.GroupUpdated += OnGroupUpdated; _grouper.GroupUpdated += OnGroupUpdated;

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 33ce0e71590119e4f803932e358b4593
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,102 @@
using System;
using System.Collections;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
namespace SpeechLib {
/// <summary>Marshals the COM <see langword="IEnumVARIANT" /> interface to the .NET Framework <see cref="T:System.Collections.IEnumerator" /> interface, and vice versa.</summary>
public class EnumeratorToEnumVariantMarshaler : ICustomMarshaler {
[ComImport]
[Guid("00020404-0000-0000-C000-000000000046")]
[InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
private interface IEnumVARIANT {
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
void Next(int celt, [MarshalAs(UnmanagedType.Struct)] out object rgvar, out uint pceltFetched);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
void Skip(uint celt);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
void Reset();
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[return: MarshalAs(UnmanagedType.Interface)]
IEnumVARIANT Clone();
}
private class VARIANTEnumerator : IEnumerator {
private IEnumVARIANT com_enum;
private object current;
public object Current => current;
public VARIANTEnumerator(IEnumVARIANT com_enum) {
this.com_enum = com_enum;
}
public bool MoveNext() {
uint pceltFetched = 0u;
com_enum.Next(1, out var rgvar, out pceltFetched);
if (pceltFetched == 0) {
return false;
}
current = rgvar;
return true;
}
public void Reset() {
com_enum.Reset();
}
}
private static EnumeratorToEnumVariantMarshaler instance;
/// <summary>Performs necessary cleanup of the managed data when it is no longer needed.</summary>
/// <param name="pManagedObj">The managed object to be destroyed.</param>
public void CleanUpManagedData(object pManagedObj) {
throw new NotImplementedException();
}
/// <summary>Performs necessary cleanup of the unmanaged data when it is no longer needed.</summary>
/// <param name="pNativeData">A pointer to the unmanaged data to be destroyed.</param>
public void CleanUpNativeData(IntPtr pNativeData) {
Marshal.Release(pNativeData);
}
/// <summary>Returns an instance of the custom marshaler.</summary>
/// <param name="pstrCookie">String "cookie" parameter that can be used by the custom marshaler.</param>
/// <returns>An instance of the custom marshaler.</returns>
public static ICustomMarshaler GetInstance(string pstrCookie) {
if (instance == null) {
instance = new EnumeratorToEnumVariantMarshaler();
}
return instance;
}
/// <summary>Returns the size in bytes of the unmanaged data to be marshaled.</summary>
/// <returns>-1 to indicate the type this marshaler handles is not a value type.</returns>
public int GetNativeDataSize() {
throw new NotImplementedException();
}
/// <summary>Marshals an object from managed code to unmanaged code.</summary>
/// <param name="pManagedObj">The managed object to be converted.</param>
/// <returns>A pointer to the unmanaged object.</returns>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="pManagedObj" /> is <see langword="null" />.</exception>
public IntPtr MarshalManagedToNative(object pManagedObj) {
throw new NotImplementedException();
}
/// <summary>Marshals an object from unmanaged code to managed code.</summary>
/// <param name="pNativeData">A pointer to the unmanaged object to be converted.</param>
/// <returns>A managed object.</returns>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="pNativeData" /> is <see langword="null" />.</exception>
/// <exception cref="T:System.InvalidCastException">The unmanaged object that <paramref name="pNativeData" /> points to could not be converted.</exception>
public object MarshalNativeToManaged(IntPtr pNativeData) {
return new VARIANTEnumerator((IEnumVARIANT)Marshal.GetObjectForIUnknown(pNativeData));
}
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 57f24b2017eba4d4eb634cf86ae099af
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,29 @@
using System;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
namespace SpeechLib {
[ComImport]
[InterfaceType(1)]
[Guid("06B64F9E-7FDA-11D2-B4F2-00C04F797396")]
[TypeLibType(512)]
public interface IEnumSpObjectTokens {
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
void Next([In] uint celt, [MarshalAs(UnmanagedType.Interface)] out ISpObjectToken pelt, out uint pceltFetched);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
void Skip([In] uint celt);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
void Reset();
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
void Clone([MarshalAs(UnmanagedType.Interface)] out SpMMAudioEnum ppEnum);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
void Item([In] uint Index, [MarshalAs(UnmanagedType.Interface)] out ISpObjectToken ppToken);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
void GetCount(out uint pCount);
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: b8d9b83debeb9c244a52757c270bd3ff
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,47 @@
using System;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
namespace SpeechLib {
[ComImport]
[TypeLibType(512)]
[Guid("14056581-E16C-11D2-BB90-00C04F8EE6C0")]
[InterfaceType(1)]
public interface ISpDataKey {
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
void SetData([In][MarshalAs(UnmanagedType.LPWStr)] string pszValueName, [In] uint cbData, [In] ref byte pData);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
void GetData([In][MarshalAs(UnmanagedType.LPWStr)] string pszValueName, [In] ref uint pcbData, out byte pData);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
void SetStringValue([In][MarshalAs(UnmanagedType.LPWStr)] string pszValueName, [In][MarshalAs(UnmanagedType.LPWStr)] string pszValue);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
void GetStringValue([In][MarshalAs(UnmanagedType.LPWStr)] string pszValueName, [MarshalAs(UnmanagedType.LPWStr)] out string ppszValue);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
void SetDWORD([In][MarshalAs(UnmanagedType.LPWStr)] string pszValueName, [In] uint dwValue);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
void GetDWORD([In][MarshalAs(UnmanagedType.LPWStr)] string pszValueName, out uint pdwValue);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
void OpenKey([In][MarshalAs(UnmanagedType.LPWStr)] string pszSubKeyName, [MarshalAs(UnmanagedType.Interface)] out ISpDataKey ppSubKey);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
void CreateKey([In][MarshalAs(UnmanagedType.LPWStr)] string pszSubKey, [MarshalAs(UnmanagedType.Interface)] out ISpDataKey ppSubKey);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
void DeleteKey([In][MarshalAs(UnmanagedType.LPWStr)] string pszSubKey);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
void DeleteValue([In][MarshalAs(UnmanagedType.LPWStr)] string pszValueName);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
void EnumKeys([In] uint Index, [MarshalAs(UnmanagedType.LPWStr)] out string ppszSubKeyName);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
void EnumValues([In] uint Index, [MarshalAs(UnmanagedType.LPWStr)] out string ppszValueName);
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 53c599adb0888ca488c429446e094a6e
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,41 @@
using System;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
namespace SpeechLib {
[ComImport]
[InterfaceType(1)]
[Guid("BE7A9CCE-5F9E-11D2-960F-00C04F8EE628")]
[TypeLibType(512)]
public interface ISpEventSource : ISpNotifySource {
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
new void SetNotifySink([In][MarshalAs(UnmanagedType.Interface)] ISpNotifySink pNotifySink);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
new void SetNotifyWindowMessage([In][ComAliasName("SpeechLib.wireHWND")] ref _RemotableHandle hWnd, [In] uint Msg, [In][ComAliasName("SpeechLib.UINT_PTR")] ulong wParam, [In][ComAliasName("SpeechLib.LONG_PTR")] long lParam);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
new void SetNotifyCallbackFunction([In] ref IntPtr pfnCallback, [In][ComAliasName("SpeechLib.UINT_PTR")] ulong wParam, [In][ComAliasName("SpeechLib.LONG_PTR")] long lParam);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
new void SetNotifyCallbackInterface([In] ref IntPtr pSpCallback, [In][ComAliasName("SpeechLib.UINT_PTR")] ulong wParam, [In][ComAliasName("SpeechLib.LONG_PTR")] long lParam);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
new void SetNotifyWin32Event();
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
new void WaitForNotifyEvent([In] uint dwMilliseconds);
[MethodImpl(MethodImplOptions.PreserveSig | MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
new IntPtr GetNotifyEventHandle();
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
void SetInterest([In] ulong ullEventInterest, [In] ulong ullQueuedInterest);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
void GetEvents([In] uint ulCount, out SPEVENT pEventArray, out uint pulFetched);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
void GetInfo(out SPEVENTSOURCEINFO pInfo);
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 956b9cc3f6ea4e848971f63146675fca
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,14 @@
using System;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
namespace SpeechLib {
[ComImport]
[TypeLibType(512)]
[Guid("259684DC-37C3-11D2-9603-00C04F8EE628")]
[InterfaceType(1)]
public interface ISpNotifySink {
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
void Notify();
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: a8f6204837b45824b8513ceb242f9ec1
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,32 @@
using System;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
namespace SpeechLib {
[ComImport]
[TypeLibType(512)]
[InterfaceType(1)]
[Guid("5EFF4AEF-8487-11D2-961C-00C04F8EE628")]
public interface ISpNotifySource {
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
void SetNotifySink([In][MarshalAs(UnmanagedType.Interface)] ISpNotifySink pNotifySink);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
void SetNotifyWindowMessage([In][ComAliasName("SpeechLib.wireHWND")] ref _RemotableHandle hWnd, [In] uint Msg, [In][ComAliasName("SpeechLib.UINT_PTR")] ulong wParam, [In][ComAliasName("SpeechLib.LONG_PTR")] long lParam);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
void SetNotifyCallbackFunction([In] ref IntPtr pfnCallback, [In][ComAliasName("SpeechLib.UINT_PTR")] ulong wParam, [In][ComAliasName("SpeechLib.LONG_PTR")] long lParam);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
void SetNotifyCallbackInterface([In] ref IntPtr pSpCallback, [In][ComAliasName("SpeechLib.UINT_PTR")] ulong wParam, [In][ComAliasName("SpeechLib.LONG_PTR")] long lParam);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
void SetNotifyWin32Event();
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
void WaitForNotifyEvent([In] uint dwMilliseconds);
[MethodImpl(MethodImplOptions.PreserveSig | MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
IntPtr GetNotifyEventHandle();
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: dc0e801e79d02c0419ef4ce756d894e8
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,77 @@
using System;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
namespace SpeechLib {
[ComImport]
[Guid("14056589-E16C-11D2-BB90-00C04F8EE6C0")]
[TypeLibType(512)]
[InterfaceType(1)]
public interface ISpObjectToken : ISpDataKey {
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
new void SetData([In][MarshalAs(UnmanagedType.LPWStr)] string pszValueName, [In] uint cbData, [In] ref byte pData);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
new void GetData([In][MarshalAs(UnmanagedType.LPWStr)] string pszValueName, [In] ref uint pcbData, out byte pData);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
new void SetStringValue([In][MarshalAs(UnmanagedType.LPWStr)] string pszValueName, [In][MarshalAs(UnmanagedType.LPWStr)] string pszValue);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
new void GetStringValue([In][MarshalAs(UnmanagedType.LPWStr)] string pszValueName, [MarshalAs(UnmanagedType.LPWStr)] out string ppszValue);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
new void SetDWORD([In][MarshalAs(UnmanagedType.LPWStr)] string pszValueName, [In] uint dwValue);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
new void GetDWORD([In][MarshalAs(UnmanagedType.LPWStr)] string pszValueName, out uint pdwValue);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
new void OpenKey([In][MarshalAs(UnmanagedType.LPWStr)] string pszSubKeyName, [MarshalAs(UnmanagedType.Interface)] out ISpDataKey ppSubKey);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
new void CreateKey([In][MarshalAs(UnmanagedType.LPWStr)] string pszSubKey, [MarshalAs(UnmanagedType.Interface)] out ISpDataKey ppSubKey);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
new void DeleteKey([In][MarshalAs(UnmanagedType.LPWStr)] string pszSubKey);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
new void DeleteValue([In][MarshalAs(UnmanagedType.LPWStr)] string pszValueName);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
new void EnumKeys([In] uint Index, [MarshalAs(UnmanagedType.LPWStr)] out string ppszSubKeyName);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
new void EnumValues([In] uint Index, [MarshalAs(UnmanagedType.LPWStr)] out string ppszValueName);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
void SetId([MarshalAs(UnmanagedType.LPWStr)] string pszCategoryId, [In][MarshalAs(UnmanagedType.LPWStr)] string pszTokenId, [In] int fCreateIfNotExist);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
void GetId([MarshalAs(UnmanagedType.LPWStr)] out string ppszCoMemTokenId);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
void GetCategory([MarshalAs(UnmanagedType.Interface)] out ISpObjectTokenCategory ppTokenCategory);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
void CreateInstance([In][MarshalAs(UnmanagedType.IUnknown)] object pUnkOuter, [In] uint dwClsContext, [In] ref Guid riid, out IntPtr ppvObject);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
void GetStorageFileName([In] ref Guid clsidCaller, [In][MarshalAs(UnmanagedType.LPWStr)] string pszValueName, [In][MarshalAs(UnmanagedType.LPWStr)] string pszFileNameSpecifier, [In] uint nFolder, [MarshalAs(UnmanagedType.LPWStr)] out string ppszFilePath);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
void RemoveStorageFileName([In] ref Guid clsidCaller, [In][MarshalAs(UnmanagedType.LPWStr)] string pszKeyName, [In] int fDeleteFile);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
void Remove(ref Guid pclsidCaller);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
void IsUISupported([In][MarshalAs(UnmanagedType.LPWStr)] string pszTypeOfUI, [In] IntPtr pvExtraData, [In] uint cbExtraData, [In][MarshalAs(UnmanagedType.IUnknown)] object punkObject, out int pfSupported);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
void DisplayUI([In][ComAliasName("SpeechLib.wireHWND")] ref _RemotableHandle hWndParent, [In][MarshalAs(UnmanagedType.LPWStr)] string pszTitle, [In][MarshalAs(UnmanagedType.LPWStr)] string pszTypeOfUI, [In] IntPtr pvExtraData, [In] uint cbExtraData, [In][MarshalAs(UnmanagedType.IUnknown)] object punkObject);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
void MatchesAttributes([In][MarshalAs(UnmanagedType.LPWStr)] string pszAttributes, out int pfMatches);
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 9dbe636fbecc6d246ac06f0111e1b644
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,65 @@
using System;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
namespace SpeechLib {
[ComImport]
[Guid("2D3D3845-39AF-4850-BBF9-40B49780011D")]
[TypeLibType(512)]
[InterfaceType(1)]
public interface ISpObjectTokenCategory : ISpDataKey {
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
new void SetData([In][MarshalAs(UnmanagedType.LPWStr)] string pszValueName, [In] uint cbData, [In] ref byte pData);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
new void GetData([In][MarshalAs(UnmanagedType.LPWStr)] string pszValueName, [In] ref uint pcbData, out byte pData);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
new void SetStringValue([In][MarshalAs(UnmanagedType.LPWStr)] string pszValueName, [In][MarshalAs(UnmanagedType.LPWStr)] string pszValue);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
new void GetStringValue([In][MarshalAs(UnmanagedType.LPWStr)] string pszValueName, [MarshalAs(UnmanagedType.LPWStr)] out string ppszValue);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
new void SetDWORD([In][MarshalAs(UnmanagedType.LPWStr)] string pszValueName, [In] uint dwValue);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
new void GetDWORD([In][MarshalAs(UnmanagedType.LPWStr)] string pszValueName, out uint pdwValue);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
new void OpenKey([In][MarshalAs(UnmanagedType.LPWStr)] string pszSubKeyName, [MarshalAs(UnmanagedType.Interface)] out ISpDataKey ppSubKey);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
new void CreateKey([In][MarshalAs(UnmanagedType.LPWStr)] string pszSubKey, [MarshalAs(UnmanagedType.Interface)] out ISpDataKey ppSubKey);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
new void DeleteKey([In][MarshalAs(UnmanagedType.LPWStr)] string pszSubKey);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
new void DeleteValue([In][MarshalAs(UnmanagedType.LPWStr)] string pszValueName);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
new void EnumKeys([In] uint Index, [MarshalAs(UnmanagedType.LPWStr)] out string ppszSubKeyName);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
new void EnumValues([In] uint Index, [MarshalAs(UnmanagedType.LPWStr)] out string ppszValueName);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
void SetId([In][MarshalAs(UnmanagedType.LPWStr)] string pszCategoryId, [In] int fCreateIfNotExist);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
void GetId([MarshalAs(UnmanagedType.LPWStr)] out string ppszCoMemCategoryId);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
void GetDataKey([In] SPDATAKEYLOCATION spdkl, [MarshalAs(UnmanagedType.Interface)] out ISpDataKey ppDataKey);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
void EnumTokens([In][MarshalAs(UnmanagedType.LPWStr)] string pzsReqAttribs, [In][MarshalAs(UnmanagedType.LPWStr)] string pszOptAttribs, [MarshalAs(UnmanagedType.Interface)] out SpMMAudioEnum ppEnum);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
void SetDefaultTokenId([In][MarshalAs(UnmanagedType.LPWStr)] string pszTokenId);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
void GetDefaultTokenId([MarshalAs(UnmanagedType.LPWStr)] out string ppszCoMemTokenId);
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 15623e252a155a848a97cf37f60268e8
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,17 @@
using System;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
namespace SpeechLib {
[ComImport]
[TypeLibType(512)]
[InterfaceType(1)]
[Guid("B2745EFD-42CE-48CA-81F1-A96E02538A90")]
public interface ISpPhoneticAlphabetSelection {
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
void IsAlphabetUPS(out int pfIsUPS);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
void SetAlphabetToUPS([In] int fForceUPS);
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: d029aee7bdb974547abcc71e4b1d5c0e
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,49 @@
using System;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.InteropServices.ComTypes;
namespace SpeechLib {
[ComImport]
[ComConversionLoss]
[InterfaceType(1)]
[Guid("BED530BE-2606-4F4D-A1C0-54C5CDA5566F")]
[TypeLibType(512)]
public interface ISpStreamFormat : IStream {
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
void RemoteRead(out byte pv, [In] uint cb, out uint pcbRead);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
void RemoteWrite([In] ref byte pv, [In] uint cb, out uint pcbWritten);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
void RemoteSeek([In] _LARGE_INTEGER dlibMove, [In] uint dwOrigin, out _ULARGE_INTEGER plibNewPosition);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
void SetSize([In] _ULARGE_INTEGER libNewSize);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
void RemoteCopyTo([In][MarshalAs(UnmanagedType.Interface)] IStream pstm, [In] _ULARGE_INTEGER cb, out _ULARGE_INTEGER pcbRead, out _ULARGE_INTEGER pcbWritten);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
void Commit([In] uint grfCommitFlags);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
new void Revert();
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
void LockRegion([In] _ULARGE_INTEGER libOffset, [In] _ULARGE_INTEGER cb, [In] uint dwLockType);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
void UnlockRegion([In] _ULARGE_INTEGER libOffset, [In] _ULARGE_INTEGER cb, [In] uint dwLockType);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
void Stat(out tagSTATSTG pstatstg, [In] uint grfStatFlag);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
new void Clone([MarshalAs(UnmanagedType.Interface)] out IStream ppstm);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
void GetFormat([In] ref Guid pguidFormatId, [Out] IntPtr ppCoMemWaveFormatEx);
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 3757bf8ef8a3f324896a9d3712a52c0d
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,117 @@
using System;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.InteropServices.ComTypes;
namespace SpeechLib {
[ComImport]
[InterfaceType(1)]
[Guid("6C44DF74-72B9-4992-A1EC-EF996E0422D4")]
[TypeLibType(512)]
public interface ISpVoice : ISpEventSource {
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
new void SetNotifySink([In][MarshalAs(UnmanagedType.Interface)] ISpNotifySink pNotifySink);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
new void SetNotifyWindowMessage([In][ComAliasName("SpeechLib.wireHWND")] ref _RemotableHandle hWnd, [In] uint Msg, [In][ComAliasName("SpeechLib.UINT_PTR")] ulong wParam, [In][ComAliasName("SpeechLib.LONG_PTR")] long lParam);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
new void SetNotifyCallbackFunction([In] ref IntPtr pfnCallback, [In][ComAliasName("SpeechLib.UINT_PTR")] ulong wParam, [In][ComAliasName("SpeechLib.LONG_PTR")] long lParam);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
new void SetNotifyCallbackInterface([In] ref IntPtr pSpCallback, [In][ComAliasName("SpeechLib.UINT_PTR")] ulong wParam, [In][ComAliasName("SpeechLib.LONG_PTR")] long lParam);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
new void SetNotifyWin32Event();
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
new void WaitForNotifyEvent([In] uint dwMilliseconds);
[MethodImpl(MethodImplOptions.PreserveSig | MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
new IntPtr GetNotifyEventHandle();
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
new void SetInterest([In] ulong ullEventInterest, [In] ulong ullQueuedInterest);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
new void GetEvents([In] uint ulCount, out SPEVENT pEventArray, out uint pulFetched);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
new void GetInfo(out SPEVENTSOURCEINFO pInfo);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
void SetOutput([In][MarshalAs(UnmanagedType.IUnknown)] object pUnkOutput, [In] int fAllowFormatChanges);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
void GetOutputObjectToken([MarshalAs(UnmanagedType.Interface)] out ISpObjectToken ppObjectToken);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
void GetOutputStream([MarshalAs(UnmanagedType.Interface)] out ISpStreamFormat ppStream);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
void Pause();
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
void Resume();
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
void SetVoice([In][MarshalAs(UnmanagedType.Interface)] ISpObjectToken pToken);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
void GetVoice([MarshalAs(UnmanagedType.Interface)] out ISpObjectToken ppToken);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
void Speak([In][MarshalAs(UnmanagedType.LPWStr)] string pwcs, [In] uint dwFlags, out uint pulStreamNumber);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
void SpeakStream([In][MarshalAs(UnmanagedType.Interface)] IStream pStream, [In] uint dwFlags, out uint pulStreamNumber);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
void GetStatus(out SPVOICESTATUS pStatus, [MarshalAs(UnmanagedType.LPWStr)] out string ppszLastBookmark);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
void Skip([In][MarshalAs(UnmanagedType.LPWStr)] string pItemType, [In] int lNumItems, out uint pulNumSkipped);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
void SetPriority([In] SPVPRIORITY ePriority);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
void GetPriority(out SPVPRIORITY pePriority);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
void SetAlertBoundary([In] SPEVENTENUM eBoundary);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
void GetAlertBoundary(out SPEVENTENUM peBoundary);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
void SetRate([In] int RateAdjust);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
void GetRate(out int pRateAdjust);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
void SetVolume([In] ushort usVolume);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
void GetVolume(out ushort pusVolume);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
void WaitUntilDone([In] uint msTimeout);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
void SetSyncSpeakTimeout([In] uint msTimeout);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
void GetSyncSpeakTimeout(out uint pmsTimeout);
[MethodImpl(MethodImplOptions.PreserveSig | MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
IntPtr SpeakCompleteEvent();
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
void IsUISupported([In][MarshalAs(UnmanagedType.LPWStr)] string pszTypeOfUI, [In] IntPtr pvExtraData, [In] uint cbExtraData, out int pfSupported);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
void DisplayUI([In][ComAliasName("SpeechLib.wireHWND")] ref _RemotableHandle hWndParent, [In][MarshalAs(UnmanagedType.LPWStr)] string pszTitle, [In][MarshalAs(UnmanagedType.LPWStr)] string pszTypeOfUI, [In] IntPtr pvExtraData, [In] uint cbExtraData);
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 272a8c831aaf44a4d94da0a8f2f29199
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,47 @@
using System;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
namespace SpeechLib {
[ComImport]
[TypeLibType(4160)]
[Guid("E6E9C590-3E18-40E3-8299-061F98BDE7C7")]
public interface ISpeechAudioFormat {
[DispId(1)]
SpeechAudioFormatType Type {
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(1)]
get;
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(1)]
[param: In]
set;
}
[DispId(2)]
string Guid {
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(2)]
[TypeLibFunc(64)]
[return: MarshalAs(UnmanagedType.BStr)]
get;
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(2)]
[TypeLibFunc(64)]
[param: In]
[param: MarshalAs(UnmanagedType.BStr)]
set;
}
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(3)]
[TypeLibFunc(64)]
[return: MarshalAs(UnmanagedType.Interface)]
SpWaveFormatEx GetWaveFormatEx();
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(4)]
[TypeLibFunc(64)]
void SetWaveFormatEx([In][MarshalAs(UnmanagedType.Interface)] SpWaveFormatEx SpeechWaveFormatEx);
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 0121f963d2ad3124f93d8b901dea2ef2
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,36 @@
using System;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
namespace SpeechLib {
[ComImport]
[TypeLibType(4160)]
[Guid("6450336F-7D49-4CED-8097-49D6DEE37294")]
public interface ISpeechBaseStream {
[DispId(1)]
SpAudioFormat Format {
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(1)]
[return: MarshalAs(UnmanagedType.Interface)]
get;
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(1)]
[param: In]
[param: MarshalAs(UnmanagedType.Interface)]
set;
}
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(2)]
int Read([MarshalAs(UnmanagedType.Struct)] out object Buffer, [In] int NumberOfBytes);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(3)]
int Write([In][MarshalAs(UnmanagedType.Struct)] object Buffer);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(4)]
[return: MarshalAs(UnmanagedType.Struct)]
object Seek([In][MarshalAs(UnmanagedType.Struct)] object Position, [In] SpeechStreamSeekPositionType Origin = SpeechStreamSeekPositionType.SSSPTRelativeToStart);
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: b47a20305f9457d4a9178de9ed11508a
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,64 @@
using System;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
namespace SpeechLib {
[ComImport]
[TypeLibType(4160)]
[Guid("CE17C09B-4EFA-44D5-A4C9-59D9585AB0CD")]
public interface ISpeechDataKey {
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(1)]
void SetBinaryValue([In][MarshalAs(UnmanagedType.BStr)] string ValueName, [In][MarshalAs(UnmanagedType.Struct)] object Value);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(2)]
[return: MarshalAs(UnmanagedType.Struct)]
object GetBinaryValue([In][MarshalAs(UnmanagedType.BStr)] string ValueName);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(3)]
void SetStringValue([In][MarshalAs(UnmanagedType.BStr)] string ValueName, [In][MarshalAs(UnmanagedType.BStr)] string Value);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(4)]
[return: MarshalAs(UnmanagedType.BStr)]
string GetStringValue([In][MarshalAs(UnmanagedType.BStr)] string ValueName);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(5)]
void SetLongValue([In][MarshalAs(UnmanagedType.BStr)] string ValueName, [In] int Value);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(6)]
int GetLongValue([In][MarshalAs(UnmanagedType.BStr)] string ValueName);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(7)]
[return: MarshalAs(UnmanagedType.Interface)]
ISpeechDataKey OpenKey([In][MarshalAs(UnmanagedType.BStr)] string SubKeyName);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(8)]
[return: MarshalAs(UnmanagedType.Interface)]
ISpeechDataKey CreateKey([In][MarshalAs(UnmanagedType.BStr)] string SubKeyName);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(9)]
void DeleteKey([In][MarshalAs(UnmanagedType.BStr)] string SubKeyName);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(10)]
void DeleteValue([In][MarshalAs(UnmanagedType.BStr)] string ValueName);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(11)]
[return: MarshalAs(UnmanagedType.BStr)]
string EnumKeys([In] int Index);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(12)]
[return: MarshalAs(UnmanagedType.BStr)]
string EnumValues([In] int Index);
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 67d9e05beeee4594688ea5fff1341d30
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,85 @@
using System;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
namespace SpeechLib {
[ComImport]
[TypeLibType(4160)]
[Guid("C74A3ADC-B727-4500-A84A-B526721C8B8C")]
public interface ISpeechObjectToken {
[DispId(1)]
string Id {
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(1)]
[return: MarshalAs(UnmanagedType.BStr)]
get;
}
[DispId(2)]
ISpeechDataKey DataKey {
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[TypeLibFunc(64)]
[DispId(2)]
[return: MarshalAs(UnmanagedType.Interface)]
get;
}
[DispId(3)]
SpObjectTokenCategory Category {
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(3)]
[return: MarshalAs(UnmanagedType.Interface)]
get;
}
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(4)]
[return: MarshalAs(UnmanagedType.BStr)]
string GetDescription([In] int Locale = 0);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(5)]
[TypeLibFunc(64)]
void SetId([In][MarshalAs(UnmanagedType.BStr)] string Id, [In][MarshalAs(UnmanagedType.BStr)] string CategoryID = "", [In] bool CreateIfNotExist = false);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(6)]
[return: MarshalAs(UnmanagedType.BStr)]
string GetAttribute([In][MarshalAs(UnmanagedType.BStr)] string AttributeName);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(7)]
[return: MarshalAs(UnmanagedType.IUnknown)]
object CreateInstance([Optional][In][IUnknownConstant][MarshalAs(UnmanagedType.IUnknown)] object pUnkOuter, [In] SpeechTokenContext ClsContext = SpeechTokenContext.STCAll);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[TypeLibFunc(64)]
[DispId(8)]
void Remove([In][MarshalAs(UnmanagedType.BStr)] string ObjectStorageCLSID);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[TypeLibFunc(64)]
[DispId(9)]
[return: MarshalAs(UnmanagedType.BStr)]
string GetStorageFileName([In][MarshalAs(UnmanagedType.BStr)] string ObjectStorageCLSID, [In][MarshalAs(UnmanagedType.BStr)] string KeyName, [In][MarshalAs(UnmanagedType.BStr)] string FileName, [In] SpeechTokenShellFolder Folder);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(10)]
[TypeLibFunc(64)]
void RemoveStorageFileName([In][MarshalAs(UnmanagedType.BStr)] string ObjectStorageCLSID, [In][MarshalAs(UnmanagedType.BStr)] string KeyName, [In] bool DeleteFile);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(11)]
[TypeLibFunc(64)]
bool IsUISupported([In][MarshalAs(UnmanagedType.BStr)] string TypeOfUI, [Optional][In][MarshalAs(UnmanagedType.Struct)] ref object ExtraData, [Optional][In][IUnknownConstant][MarshalAs(UnmanagedType.IUnknown)] object Object);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(12)]
[TypeLibFunc(64)]
void DisplayUI([In] int hWnd, [In][MarshalAs(UnmanagedType.BStr)] string Title, [In][MarshalAs(UnmanagedType.BStr)] string TypeOfUI, [Optional][In][MarshalAs(UnmanagedType.Struct)] ref object ExtraData, [Optional][In][IUnknownConstant][MarshalAs(UnmanagedType.IUnknown)] object Object);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(13)]
bool MatchesAttributes([In][MarshalAs(UnmanagedType.BStr)] string Attributes);
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 84b08e94b540c8a40afbd504abc37d04
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,46 @@
using System;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
namespace SpeechLib {
[ComImport]
[Guid("CA7EAC50-2D01-4145-86D4-5AE7D70F4469")]
[TypeLibType(4160)]
public interface ISpeechObjectTokenCategory {
[DispId(1)]
string Id {
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(1)]
[return: MarshalAs(UnmanagedType.BStr)]
get;
}
[DispId(2)]
string Default {
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(2)]
[return: MarshalAs(UnmanagedType.BStr)]
get;
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(2)]
[param: In]
[param: MarshalAs(UnmanagedType.BStr)]
set;
}
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(3)]
void SetId([In][MarshalAs(UnmanagedType.BStr)] string Id, [In] bool CreateIfNotExist = false);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(4)]
[TypeLibFunc(64)]
[return: MarshalAs(UnmanagedType.Interface)]
ISpeechDataKey GetDataKey([In] SpeechDataKeyLocation Location = SpeechDataKeyLocation.SDKLDefaultLocation);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(5)]
[return: MarshalAs(UnmanagedType.Interface)]
ISpeechObjectTokens EnumerateTokens([In][MarshalAs(UnmanagedType.BStr)] string RequiredAttributes = "", [In][MarshalAs(UnmanagedType.BStr)] string OptionalAttributes = "");
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: a15899cbf650cfa42944fa16c069356b
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,31 @@
using System;
using System.Collections;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
namespace SpeechLib {
[ComImport]
[DefaultMember("Item")]
[TypeLibType(4160)]
[Guid("9285B776-2E7B-4BC0-B53E-580EB6FA967F")]
public interface ISpeechObjectTokens : IEnumerable {
[DispId(1)]
int Count {
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(1)]
get;
}
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(0)]
[return: MarshalAs(UnmanagedType.Interface)]
SpObjectToken Item([In] int Index);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[TypeLibFunc(1)]
[DispId(-4)]
[return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(EnumeratorToEnumVariantMarshaler))]
new IEnumerator GetEnumerator();
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: c5ce0623475562e41ac3b4d14e26e163
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,183 @@
using System;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
namespace SpeechLib {
[ComImport]
[Guid("269316D8-57BD-11D2-9EEE-00C04F797396")]
[TypeLibType(4160)]
public interface ISpeechVoice {
[DispId(1)]
ISpeechVoiceStatus Status {
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(1)]
[return: MarshalAs(UnmanagedType.Interface)]
get;
}
[DispId(2)]
SpObjectToken Voice {
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(2)]
[return: MarshalAs(UnmanagedType.Interface)]
get;
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(2)]
[param: In]
[param: MarshalAs(UnmanagedType.Interface)]
set;
}
[DispId(3)]
SpObjectToken AudioOutput {
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(3)]
[return: MarshalAs(UnmanagedType.Interface)]
get;
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(3)]
[param: In]
[param: MarshalAs(UnmanagedType.Interface)]
set;
}
[DispId(4)]
ISpeechBaseStream AudioOutputStream {
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(4)]
[return: MarshalAs(UnmanagedType.Interface)]
get;
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(4)]
[param: In]
[param: MarshalAs(UnmanagedType.Interface)]
set;
}
[DispId(5)]
int Rate {
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(5)]
get;
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(5)]
[param: In]
set;
}
[DispId(6)]
int Volume {
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(6)]
get;
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(6)]
[param: In]
set;
}
[DispId(7)]
bool AllowAudioOutputFormatChangesOnNextSet {
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[TypeLibFunc(64)]
[DispId(7)]
get;
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[TypeLibFunc(64)]
[DispId(7)]
[param: In]
set;
}
[DispId(8)]
SpeechVoiceEvents EventInterests {
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(8)]
get;
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(8)]
[param: In]
set;
}
[DispId(9)]
SpeechVoicePriority Priority {
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(9)]
get;
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(9)]
[param: In]
set;
}
[DispId(10)]
SpeechVoiceEvents AlertBoundary {
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(10)]
get;
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(10)]
[param: In]
set;
}
[DispId(11)]
int SynchronousSpeakTimeout {
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(11)]
get;
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(11)]
[param: In]
set;
}
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(12)]
int Speak([In][MarshalAs(UnmanagedType.BStr)] string Text, [In] SpeechVoiceSpeakFlags Flags = SpeechVoiceSpeakFlags.SVSFDefault);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(13)]
int SpeakStream([In][MarshalAs(UnmanagedType.Interface)] ISpeechBaseStream Stream, [In] SpeechVoiceSpeakFlags Flags = SpeechVoiceSpeakFlags.SVSFDefault);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(14)]
void Pause();
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(15)]
void Resume();
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(16)]
int Skip([In][MarshalAs(UnmanagedType.BStr)] string Type, [In] int NumItems);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(17)]
[return: MarshalAs(UnmanagedType.Interface)]
ISpeechObjectTokens GetVoices([In][MarshalAs(UnmanagedType.BStr)] string RequiredAttributes = "", [In][MarshalAs(UnmanagedType.BStr)] string OptionalAttributes = "");
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(18)]
[return: MarshalAs(UnmanagedType.Interface)]
ISpeechObjectTokens GetAudioOutputs([In][MarshalAs(UnmanagedType.BStr)] string RequiredAttributes = "", [In][MarshalAs(UnmanagedType.BStr)] string OptionalAttributes = "");
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(19)]
bool WaitUntilDone([In] int msTimeout);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[TypeLibFunc(64)]
[DispId(20)]
nint SpeakCompleteEvent();
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(21)]
bool IsUISupported([In][MarshalAs(UnmanagedType.BStr)] string TypeOfUI, [Optional][In][MarshalAs(UnmanagedType.Struct)] ref object ExtraData);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(22)]
void DisplayUI([In] int hWndParent, [In][MarshalAs(UnmanagedType.BStr)] string Title, [In][MarshalAs(UnmanagedType.BStr)] string TypeOfUI, [Optional][In][MarshalAs(UnmanagedType.Struct)] ref object ExtraData);
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 15960ad47dd69ef478bdfa217dc3838c
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,96 @@
using System;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
namespace SpeechLib {
[ComImport]
[Guid("8BE47B07-57F6-11D2-9EEE-00C04F797396")]
[TypeLibType(4160)]
public interface ISpeechVoiceStatus {
[DispId(1)]
int CurrentStreamNumber {
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(1)]
get;
}
[DispId(2)]
int LastStreamNumberQueued {
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(2)]
get;
}
[DispId(3)]
int LastHResult {
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(3)]
get;
}
[DispId(4)]
SpeechRunState RunningState {
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(4)]
get;
}
[DispId(5)]
int InputWordPosition {
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(5)]
get;
}
[DispId(6)]
int InputWordLength {
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(6)]
get;
}
[DispId(7)]
int InputSentencePosition {
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(7)]
get;
}
[DispId(8)]
int InputSentenceLength {
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(8)]
get;
}
[DispId(9)]
string LastBookmark {
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(9)]
[return: MarshalAs(UnmanagedType.BStr)]
get;
}
[DispId(10)]
int LastBookmarkId {
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[TypeLibFunc(64)]
[DispId(10)]
get;
}
[DispId(11)]
short PhonemeId {
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(11)]
get;
}
[DispId(12)]
short VisemeId {
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(12)]
get;
}
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 11c572347fde7834d928165b3d458190
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,89 @@
using System;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
namespace SpeechLib {
[ComImport]
[Guid("7A1EF0D5-1581-4741-88E4-209A49F11A10")]
[TypeLibType(4160)]
public interface ISpeechWaveFormatEx {
[DispId(1)]
short FormatTag {
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(1)]
get;
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(1)]
[param: In]
set;
}
[DispId(2)]
short Channels {
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(2)]
get;
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(2)]
[param: In]
set;
}
[DispId(3)]
int SamplesPerSec {
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(3)]
get;
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(3)]
[param: In]
set;
}
[DispId(4)]
int AvgBytesPerSec {
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(4)]
get;
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(4)]
[param: In]
set;
}
[DispId(5)]
short BlockAlign {
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(5)]
get;
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(5)]
[param: In]
set;
}
[DispId(6)]
short BitsPerSample {
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(6)]
get;
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(6)]
[param: In]
set;
}
[DispId(7)]
object ExtraData {
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(7)]
[return: MarshalAs(UnmanagedType.Struct)]
get;
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(7)]
[param: In]
[param: MarshalAs(UnmanagedType.Struct)]
set;
}
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 16611605854765a4db58ea3fec7cb71e
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,18 @@
{
"name": "Interop.SpeechLib",
"rootNamespace": "",
"references": [],
"includePlatforms": [
"Editor",
"WindowsStandalone32",
"WindowsStandalone64"
],
"excludePlatforms": [],
"allowUnsafeCode": false,
"overrideReferences": false,
"precompiledReferences": [],
"autoReferenced": true,
"defineConstraints": [],
"versionDefines": [],
"noEngineReferences": true
}

View File

@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 1e0937e40dadba24a97b7342c4559580
AssemblyDefinitionImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,11 @@
using System.Runtime.InteropServices;
namespace SpeechLib {
[TypeLibType(16)]
public enum SPDATAKEYLOCATION {
SPDKL_DefaultLocation = 0,
SPDKL_CurrentUser = 1,
SPDKL_LocalMachine = 2,
SPDKL_CurrentConfig = 5
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 217ea5e808aeb3548bb7c5d3bed0e08d
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,21 @@
using System.Runtime.InteropServices;
namespace SpeechLib {
[StructLayout(LayoutKind.Sequential, Pack = 8)]
[TypeLibType(528)]
public struct SPEVENT {
public ushort eEventId;
public ushort elParamType;
public uint ulStreamNum;
public ulong ullAudioStreamOffset;
[ComAliasName("SpeechLib.UINT_PTR")]
public ulong wParam;
[ComAliasName("SpeechLib.LONG_PTR")]
public long lParam;
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 0f4f5ccf56f5f3043b0647e5f20d458d
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,47 @@
using System.Runtime.InteropServices;
namespace SpeechLib {
[TypeLibType(16)]
public enum SPEVENTENUM {
SPEI_UNDEFINED = 0,
SPEI_START_INPUT_STREAM = 1,
SPEI_END_INPUT_STREAM = 2,
SPEI_VOICE_CHANGE = 3,
SPEI_TTS_BOOKMARK = 4,
SPEI_WORD_BOUNDARY = 5,
SPEI_PHONEME = 6,
SPEI_SENTENCE_BOUNDARY = 7,
SPEI_VISEME = 8,
SPEI_TTS_AUDIO_LEVEL = 9,
SPEI_TTS_PRIVATE = 15,
SPEI_MIN_TTS = 1,
SPEI_MAX_TTS = 15,
SPEI_END_SR_STREAM = 34,
SPEI_SOUND_START = 35,
SPEI_SOUND_END = 36,
SPEI_PHRASE_START = 37,
SPEI_RECOGNITION = 38,
SPEI_HYPOTHESIS = 39,
SPEI_SR_BOOKMARK = 40,
SPEI_PROPERTY_NUM_CHANGE = 41,
SPEI_PROPERTY_STRING_CHANGE = 42,
SPEI_FALSE_RECOGNITION = 43,
SPEI_INTERFERENCE = 44,
SPEI_REQUEST_UI = 45,
SPEI_RECO_STATE_CHANGE = 46,
SPEI_ADAPTATION = 47,
SPEI_START_SR_STREAM = 48,
SPEI_RECO_OTHER_CONTEXT = 49,
SPEI_SR_AUDIO_LEVEL = 50,
SPEI_SR_RETAINEDAUDIO = 51,
SPEI_SR_PRIVATE = 52,
SPEI_ACTIVE_CATEGORY_CHANGED = 53,
SPEI_RESERVED5 = 54,
SPEI_RESERVED6 = 55,
SPEI_MIN_SR = 34,
SPEI_MAX_SR = 55,
SPEI_RESERVED1 = 30,
SPEI_RESERVED2 = 33,
SPEI_RESERVED3 = 63
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 77fb11847c4af3e4dbe279deb892d6cc
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,13 @@
using System.Runtime.InteropServices;
namespace SpeechLib {
[StructLayout(LayoutKind.Sequential, Pack = 8)]
[TypeLibType(528)]
public struct SPEVENTSOURCEINFO {
public ulong ullEventInterest;
public ulong ullQueuedInterest;
public uint ulCount;
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: d926041e2036d6f46958a0f68b89f3c5
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,29 @@
using System.Runtime.InteropServices;
namespace SpeechLib {
[TypeLibType(16)]
public enum SPVISEMES {
SP_VISEME_0,
SP_VISEME_1,
SP_VISEME_2,
SP_VISEME_3,
SP_VISEME_4,
SP_VISEME_5,
SP_VISEME_6,
SP_VISEME_7,
SP_VISEME_8,
SP_VISEME_9,
SP_VISEME_10,
SP_VISEME_11,
SP_VISEME_12,
SP_VISEME_13,
SP_VISEME_14,
SP_VISEME_15,
SP_VISEME_16,
SP_VISEME_17,
SP_VISEME_18,
SP_VISEME_19,
SP_VISEME_20,
SP_VISEME_21
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 4a65c28791d51e94b8987ffee064a2f7
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,35 @@
using System.Runtime.InteropServices;
namespace SpeechLib {
[StructLayout(LayoutKind.Sequential, Pack = 4)]
[TypeLibType(528)]
public struct SPVOICESTATUS {
public uint ulCurrentStream;
public uint ulLastStreamQueued;
[MarshalAs(UnmanagedType.Error)]
public int hrLastResult;
public uint dwRunningState;
public uint ulInputWordPos;
public uint ulInputWordLen;
public uint ulInputSentPos;
public uint ulInputSentLen;
public int lBookmarkId;
public ushort PhonemeId;
public SPVISEMES VisemeId;
public uint dwReserved1;
public uint dwReserved2;
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 7744246d43381b74c9ddbec63dd9966d
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,10 @@
using System.Runtime.InteropServices;
namespace SpeechLib {
[TypeLibType(16)]
public enum SPVPRIORITY {
SPVPRI_NORMAL,
SPVPRI_ALERT,
SPVPRI_OVER
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 14660a10d59475c47a6cb945b87cfd12
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,53 @@
using System;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
namespace SpeechLib {
[ComImport]
[CoClass(typeof(SpAudioFormatClass))]
[Guid("E6E9C590-3E18-40E3-8299-061F98BDE7C7")]
public interface SpAudioFormat : ISpeechAudioFormat { }
[ComImport]
[Guid("9EF96870-E160-4792-820D-48CF0649E4EC")]
[ClassInterface((ClassInterfaceType)0)]
[TypeLibType(2)]
public class SpAudioFormatClass : ISpeechAudioFormat, SpAudioFormat {
[DispId(1)]
public virtual extern SpeechAudioFormatType Type {
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(1)]
get;
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(1)]
[param: In]
set;
}
[DispId(2)]
public virtual extern string Guid {
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(2)]
[TypeLibFunc(64)]
[return: MarshalAs(UnmanagedType.BStr)]
get;
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[TypeLibFunc(64)]
[DispId(2)]
[param: In]
[param: MarshalAs(UnmanagedType.BStr)]
set;
}
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(3)]
[TypeLibFunc(64)]
[return: MarshalAs(UnmanagedType.Interface)]
public virtual extern SpWaveFormatEx GetWaveFormatEx();
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(4)]
[TypeLibFunc(64)]
public virtual extern void SetWaveFormatEx([In][MarshalAs(UnmanagedType.Interface)] SpWaveFormatEx SpeechWaveFormatEx);
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 86d5321cd6800ea43be2a2e5892ad839
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,34 @@
using System;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
namespace SpeechLib {
[ComImport]
[CoClass(typeof(SpMMAudioEnumClass))]
[Guid("06B64F9E-7FDA-11D2-B4F2-00C04F797396")]
public interface SpMMAudioEnum : IEnumSpObjectTokens { }
[ComImport]
[ClassInterface((ClassInterfaceType)0)]
[Guid("AB1890A0-E91F-11D2-BB91-00C04F8EE6C0")]
[TypeLibType(530)]
public class SpMMAudioEnumClass : IEnumSpObjectTokens, SpMMAudioEnum {
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
public virtual extern void Next([In] uint celt, [MarshalAs(UnmanagedType.Interface)] out ISpObjectToken pelt, out uint pceltFetched);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
public virtual extern void Skip([In] uint celt);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
public virtual extern void Reset();
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
public virtual extern void Clone([MarshalAs(UnmanagedType.Interface)] out SpMMAudioEnum ppEnum);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
public virtual extern void Item([In] uint Index, [MarshalAs(UnmanagedType.Interface)] out ISpObjectToken ppToken);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
public virtual extern void GetCount(out uint pCount);
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 609bdee720cf41b4486287608f28c3d9
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,157 @@
using System;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
namespace SpeechLib {
[ComImport]
[CoClass(typeof(SpObjectTokenClass))]
[Guid("C74A3ADC-B727-4500-A84A-B526721C8B8C")]
public interface SpObjectToken : ISpeechObjectToken { }
[ComImport]
[Guid("EF411752-3736-4CB4-9C8C-8EF4CCB58EFE")]
[TypeLibType(2)]
[ClassInterface((ClassInterfaceType)0)]
public class SpObjectTokenClass : ISpeechObjectToken, SpObjectToken, ISpObjectToken {
[DispId(1)]
public virtual extern string Id {
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(1)]
[return: MarshalAs(UnmanagedType.BStr)]
get;
}
[DispId(2)]
public virtual extern ISpeechDataKey DataKey {
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[TypeLibFunc(64)]
[DispId(2)]
[return: MarshalAs(UnmanagedType.Interface)]
get;
}
[DispId(3)]
public virtual extern SpObjectTokenCategory Category {
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(3)]
[return: MarshalAs(UnmanagedType.Interface)]
get;
}
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(4)]
[return: MarshalAs(UnmanagedType.BStr)]
public virtual extern string GetDescription([In] int Locale = 0);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(5)]
[TypeLibFunc(64)]
public virtual extern void SetId([In][MarshalAs(UnmanagedType.BStr)] string Id, [In][MarshalAs(UnmanagedType.BStr)] string CategoryID = "", [In] bool CreateIfNotExist = false);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(6)]
[return: MarshalAs(UnmanagedType.BStr)]
public virtual extern string GetAttribute([In][MarshalAs(UnmanagedType.BStr)] string AttributeName);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(7)]
[return: MarshalAs(UnmanagedType.IUnknown)]
public virtual extern object CreateInstance([Optional][In][IUnknownConstant][MarshalAs(UnmanagedType.IUnknown)] object pUnkOuter, [In] SpeechTokenContext ClsContext = SpeechTokenContext.STCAll);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(8)]
[TypeLibFunc(64)]
public virtual extern void Remove([In][MarshalAs(UnmanagedType.BStr)] string ObjectStorageCLSID);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(9)]
[TypeLibFunc(64)]
[return: MarshalAs(UnmanagedType.BStr)]
public virtual extern string GetStorageFileName([In][MarshalAs(UnmanagedType.BStr)] string ObjectStorageCLSID, [In][MarshalAs(UnmanagedType.BStr)] string KeyName, [In][MarshalAs(UnmanagedType.BStr)] string FileName, [In] SpeechTokenShellFolder Folder);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[TypeLibFunc(64)]
[DispId(10)]
public virtual extern void RemoveStorageFileName([In][MarshalAs(UnmanagedType.BStr)] string ObjectStorageCLSID, [In][MarshalAs(UnmanagedType.BStr)] string KeyName, [In] bool DeleteFile);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(11)]
[TypeLibFunc(64)]
public virtual extern bool IsUISupported([In][MarshalAs(UnmanagedType.BStr)] string TypeOfUI, [Optional][In][MarshalAs(UnmanagedType.Struct)] ref object ExtraData, [Optional][In][IUnknownConstant][MarshalAs(UnmanagedType.IUnknown)] object Object);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[TypeLibFunc(64)]
[DispId(12)]
public virtual extern void DisplayUI([In] int hWnd, [In][MarshalAs(UnmanagedType.BStr)] string Title, [In][MarshalAs(UnmanagedType.BStr)] string TypeOfUI, [Optional][In][MarshalAs(UnmanagedType.Struct)] ref object ExtraData, [Optional][In][IUnknownConstant][MarshalAs(UnmanagedType.IUnknown)] object Object);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(13)]
public virtual extern bool MatchesAttributes([In][MarshalAs(UnmanagedType.BStr)] string Attributes);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
public virtual extern void SetData([In][MarshalAs(UnmanagedType.LPWStr)] string pszValueName, [In] uint cbData, [In] ref byte pData);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
public virtual extern void GetData([In][MarshalAs(UnmanagedType.LPWStr)] string pszValueName, [In] ref uint pcbData, out byte pData);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
public virtual extern void SetStringValue([In][MarshalAs(UnmanagedType.LPWStr)] string pszValueName, [In][MarshalAs(UnmanagedType.LPWStr)] string pszValue);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
public virtual extern void GetStringValue([In][MarshalAs(UnmanagedType.LPWStr)] string pszValueName, [MarshalAs(UnmanagedType.LPWStr)] out string ppszValue);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
public virtual extern void SetDWORD([In][MarshalAs(UnmanagedType.LPWStr)] string pszValueName, [In] uint dwValue);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
public virtual extern void GetDWORD([In][MarshalAs(UnmanagedType.LPWStr)] string pszValueName, out uint pdwValue);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
public virtual extern void OpenKey([In][MarshalAs(UnmanagedType.LPWStr)] string pszSubKeyName, [MarshalAs(UnmanagedType.Interface)] out ISpDataKey ppSubKey);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
public virtual extern void CreateKey([In][MarshalAs(UnmanagedType.LPWStr)] string pszSubKey, [MarshalAs(UnmanagedType.Interface)] out ISpDataKey ppSubKey);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
public virtual extern void DeleteKey([In][MarshalAs(UnmanagedType.LPWStr)] string pszSubKey);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
public virtual extern void DeleteValue([In][MarshalAs(UnmanagedType.LPWStr)] string pszValueName);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
public virtual extern void EnumKeys([In] uint Index, [MarshalAs(UnmanagedType.LPWStr)] out string ppszSubKeyName);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
public virtual extern void EnumValues([In] uint Index, [MarshalAs(UnmanagedType.LPWStr)] out string ppszValueName);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
public virtual extern void SetId([MarshalAs(UnmanagedType.LPWStr)] string pszCategoryId, [In][MarshalAs(UnmanagedType.LPWStr)] string pszTokenId, [In] int fCreateIfNotExist);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
public virtual extern void GetId([MarshalAs(UnmanagedType.LPWStr)] out string ppszCoMemTokenId);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
public virtual extern void GetCategory([MarshalAs(UnmanagedType.Interface)] out ISpObjectTokenCategory ppTokenCategory);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
public virtual extern void CreateInstance([In][MarshalAs(UnmanagedType.IUnknown)] object pUnkOuter, [In] uint dwClsContext, [In] ref Guid riid, out IntPtr ppvObject);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
public virtual extern void GetStorageFileName([In] ref Guid clsidCaller, [In][MarshalAs(UnmanagedType.LPWStr)] string pszValueName, [In][MarshalAs(UnmanagedType.LPWStr)] string pszFileNameSpecifier, [In] uint nFolder, [MarshalAs(UnmanagedType.LPWStr)] out string ppszFilePath);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
public virtual extern void RemoveStorageFileName([In] ref Guid clsidCaller, [In][MarshalAs(UnmanagedType.LPWStr)] string pszKeyName, [In] int fDeleteFile);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
public virtual extern void Remove(ref Guid pclsidCaller);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
public virtual extern void IsUISupported([In][MarshalAs(UnmanagedType.LPWStr)] string pszTypeOfUI, [In] IntPtr pvExtraData, [In] uint cbExtraData, [In][MarshalAs(UnmanagedType.IUnknown)] object punkObject, out int pfSupported);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
public virtual extern void DisplayUI([In][ComAliasName("SpeechLib.wireHWND")] ref _RemotableHandle hWndParent, [In][MarshalAs(UnmanagedType.LPWStr)] string pszTitle, [In][MarshalAs(UnmanagedType.LPWStr)] string pszTypeOfUI, [In] IntPtr pvExtraData, [In] uint cbExtraData, [In][MarshalAs(UnmanagedType.IUnknown)] object punkObject);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
public virtual extern void MatchesAttributes([In][MarshalAs(UnmanagedType.LPWStr)] string pszAttributes, out int pfMatches);
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 7514e237bf33f1a4e859d3b5f798b2b1
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,106 @@
using System;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
namespace SpeechLib {
[ComImport]
[Guid("CA7EAC50-2D01-4145-86D4-5AE7D70F4469")]
[CoClass(typeof(SpObjectTokenCategoryClass))]
public interface SpObjectTokenCategory : ISpeechObjectTokenCategory { }
[ComImport]
[ClassInterface((ClassInterfaceType)0)]
[Guid("A910187F-0C7A-45AC-92CC-59EDAFB77B53")]
[TypeLibType(2)]
public class SpObjectTokenCategoryClass : ISpeechObjectTokenCategory, SpObjectTokenCategory, ISpObjectTokenCategory {
[DispId(1)]
public virtual extern string Id {
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(1)]
[return: MarshalAs(UnmanagedType.BStr)]
get;
}
[DispId(2)]
public virtual extern string Default {
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(2)]
[return: MarshalAs(UnmanagedType.BStr)]
get;
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(2)]
[param: In]
[param: MarshalAs(UnmanagedType.BStr)]
set;
}
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(3)]
public virtual extern void SetId([In][MarshalAs(UnmanagedType.BStr)] string Id, [In] bool CreateIfNotExist = false);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(4)]
[TypeLibFunc(64)]
[return: MarshalAs(UnmanagedType.Interface)]
public virtual extern ISpeechDataKey GetDataKey([In] SpeechDataKeyLocation Location = SpeechDataKeyLocation.SDKLDefaultLocation);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(5)]
[return: MarshalAs(UnmanagedType.Interface)]
public virtual extern ISpeechObjectTokens EnumerateTokens([In][MarshalAs(UnmanagedType.BStr)] string RequiredAttributes = "", [In][MarshalAs(UnmanagedType.BStr)] string OptionalAttributes = "");
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
public virtual extern void SetData([In][MarshalAs(UnmanagedType.LPWStr)] string pszValueName, [In] uint cbData, [In] ref byte pData);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
public virtual extern void GetData([In][MarshalAs(UnmanagedType.LPWStr)] string pszValueName, [In] ref uint pcbData, out byte pData);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
public virtual extern void SetStringValue([In][MarshalAs(UnmanagedType.LPWStr)] string pszValueName, [In][MarshalAs(UnmanagedType.LPWStr)] string pszValue);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
public virtual extern void GetStringValue([In][MarshalAs(UnmanagedType.LPWStr)] string pszValueName, [MarshalAs(UnmanagedType.LPWStr)] out string ppszValue);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
public virtual extern void SetDWORD([In][MarshalAs(UnmanagedType.LPWStr)] string pszValueName, [In] uint dwValue);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
public virtual extern void GetDWORD([In][MarshalAs(UnmanagedType.LPWStr)] string pszValueName, out uint pdwValue);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
public virtual extern void OpenKey([In][MarshalAs(UnmanagedType.LPWStr)] string pszSubKeyName, [MarshalAs(UnmanagedType.Interface)] out ISpDataKey ppSubKey);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
public virtual extern void CreateKey([In][MarshalAs(UnmanagedType.LPWStr)] string pszSubKey, [MarshalAs(UnmanagedType.Interface)] out ISpDataKey ppSubKey);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
public virtual extern void DeleteKey([In][MarshalAs(UnmanagedType.LPWStr)] string pszSubKey);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
public virtual extern void DeleteValue([In][MarshalAs(UnmanagedType.LPWStr)] string pszValueName);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
public virtual extern void EnumKeys([In] uint Index, [MarshalAs(UnmanagedType.LPWStr)] out string ppszSubKeyName);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
public virtual extern void EnumValues([In] uint Index, [MarshalAs(UnmanagedType.LPWStr)] out string ppszValueName);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
public virtual extern void SetId([In][MarshalAs(UnmanagedType.LPWStr)] string pszCategoryId, [In] int fCreateIfNotExist);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
public virtual extern void GetId([MarshalAs(UnmanagedType.LPWStr)] out string ppszCoMemCategoryId);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
public virtual extern void GetDataKey([In] SPDATAKEYLOCATION spdkl, [MarshalAs(UnmanagedType.Interface)] out ISpDataKey ppDataKey);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
public virtual extern void EnumTokens([In][MarshalAs(UnmanagedType.LPWStr)] string pzsReqAttribs, [In][MarshalAs(UnmanagedType.LPWStr)] string pszOptAttribs, [MarshalAs(UnmanagedType.Interface)] out SpMMAudioEnum ppEnum);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
public virtual extern void SetDefaultTokenId([In][MarshalAs(UnmanagedType.LPWStr)] string pszTokenId);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
public virtual extern void GetDefaultTokenId([MarshalAs(UnmanagedType.LPWStr)] out string ppszCoMemTokenId);
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: d64596966548b0f4a8252cd13daeecaf
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,322 @@
using System;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.InteropServices.ComTypes;
namespace SpeechLib {
[ComImport]
[CoClass(typeof(SpVoiceClass))]
[Guid("269316D8-57BD-11D2-9EEE-00C04F797396")]
public interface SpVoice : ISpeechVoice, _ISpeechVoiceEvents_Event { }
[ComImport]
[ComSourceInterfaces("SpeechLib._ISpeechVoiceEvents\0\0")]
[TypeLibType(2)]
[ClassInterface((ClassInterfaceType)0)]
[Guid("96749377-3391-11D2-9EE3-00C04F797396")]
public class SpVoiceClass : ISpeechVoice, SpVoice, _ISpeechVoiceEvents_Event, ISpVoice, ISpPhoneticAlphabetSelection {
[DispId(1)]
public virtual extern ISpeechVoiceStatus Status {
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(1)]
[return: MarshalAs(UnmanagedType.Interface)]
get;
}
[DispId(2)]
public virtual extern SpObjectToken Voice {
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(2)]
[return: MarshalAs(UnmanagedType.Interface)]
get;
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(2)]
[param: In]
[param: MarshalAs(UnmanagedType.Interface)]
set;
}
[DispId(3)]
public virtual extern SpObjectToken AudioOutput {
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(3)]
[return: MarshalAs(UnmanagedType.Interface)]
get;
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(3)]
[param: In]
[param: MarshalAs(UnmanagedType.Interface)]
set;
}
[DispId(4)]
public virtual extern ISpeechBaseStream AudioOutputStream {
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(4)]
[return: MarshalAs(UnmanagedType.Interface)]
get;
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(4)]
[param: In]
[param: MarshalAs(UnmanagedType.Interface)]
set;
}
[DispId(5)]
public virtual extern int Rate {
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(5)]
get;
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(5)]
[param: In]
set;
}
[DispId(6)]
public virtual extern int Volume {
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(6)]
get;
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(6)]
[param: In]
set;
}
[DispId(7)]
public virtual extern bool AllowAudioOutputFormatChangesOnNextSet {
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(7)]
[TypeLibFunc(64)]
get;
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(7)]
[TypeLibFunc(64)]
[param: In]
set;
}
[DispId(8)]
public virtual extern SpeechVoiceEvents EventInterests {
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(8)]
get;
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(8)]
[param: In]
set;
}
[DispId(9)]
public virtual extern SpeechVoicePriority Priority {
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(9)]
get;
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(9)]
[param: In]
set;
}
[DispId(10)]
public virtual extern SpeechVoiceEvents AlertBoundary {
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(10)]
get;
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(10)]
[param: In]
set;
}
[DispId(11)]
public virtual extern int SynchronousSpeakTimeout {
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(11)]
get;
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(11)]
[param: In]
set;
}
public virtual extern event _ISpeechVoiceEvents_StartStreamEventHandler StartStream;
public virtual extern event _ISpeechVoiceEvents_EndStreamEventHandler EndStream;
public virtual extern event _ISpeechVoiceEvents_VoiceChangeEventHandler VoiceChange;
public virtual extern event _ISpeechVoiceEvents_BookmarkEventHandler Bookmark;
public virtual extern event _ISpeechVoiceEvents_WordEventHandler Word;
public virtual extern event _ISpeechVoiceEvents_SentenceEventHandler Sentence;
public virtual extern event _ISpeechVoiceEvents_PhonemeEventHandler Phoneme;
public virtual extern event _ISpeechVoiceEvents_VisemeEventHandler Viseme;
public virtual extern event _ISpeechVoiceEvents_AudioLevelEventHandler AudioLevel;
public virtual extern event _ISpeechVoiceEvents_EnginePrivateEventHandler EnginePrivate;
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(12)]
public virtual extern int Speak([In][MarshalAs(UnmanagedType.BStr)] string Text, [In] SpeechVoiceSpeakFlags Flags = SpeechVoiceSpeakFlags.SVSFDefault);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(13)]
public virtual extern int SpeakStream([In][MarshalAs(UnmanagedType.Interface)] ISpeechBaseStream Stream, [In] SpeechVoiceSpeakFlags Flags = SpeechVoiceSpeakFlags.SVSFDefault);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(14)]
public virtual extern void Pause();
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(15)]
public virtual extern void Resume();
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(16)]
public virtual extern int Skip([In][MarshalAs(UnmanagedType.BStr)] string Type, [In] int NumItems);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(17)]
[return: MarshalAs(UnmanagedType.Interface)]
public virtual extern ISpeechObjectTokens GetVoices([In][MarshalAs(UnmanagedType.BStr)] string RequiredAttributes = "", [In][MarshalAs(UnmanagedType.BStr)] string OptionalAttributes = "");
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(18)]
[return: MarshalAs(UnmanagedType.Interface)]
public virtual extern ISpeechObjectTokens GetAudioOutputs([In][MarshalAs(UnmanagedType.BStr)] string RequiredAttributes = "", [In][MarshalAs(UnmanagedType.BStr)] string OptionalAttributes = "");
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(19)]
public virtual extern bool WaitUntilDone([In] int msTimeout);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(20)]
[TypeLibFunc(64)]
public virtual extern nint SpeakCompleteEvent();
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(21)]
public virtual extern bool IsUISupported([In][MarshalAs(UnmanagedType.BStr)] string TypeOfUI, [Optional][In][MarshalAs(UnmanagedType.Struct)] ref object ExtraData);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(22)]
public virtual extern void DisplayUI([In] int hWndParent, [In][MarshalAs(UnmanagedType.BStr)] string Title, [In][MarshalAs(UnmanagedType.BStr)] string TypeOfUI, [Optional][In][MarshalAs(UnmanagedType.Struct)] ref object ExtraData);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
public virtual extern void SetNotifySink([In][MarshalAs(UnmanagedType.Interface)] ISpNotifySink pNotifySink);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
public virtual extern void SetNotifyWindowMessage([In][ComAliasName("SpeechLib.wireHWND")] ref _RemotableHandle hWnd, [In] uint Msg, [In][ComAliasName("SpeechLib.UINT_PTR")] ulong wParam, [In][ComAliasName("SpeechLib.LONG_PTR")] long lParam);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
public virtual extern void SetNotifyCallbackFunction([In] ref IntPtr pfnCallback, [In][ComAliasName("SpeechLib.UINT_PTR")] ulong wParam, [In][ComAliasName("SpeechLib.LONG_PTR")] long lParam);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
public virtual extern void SetNotifyCallbackInterface([In] ref IntPtr pSpCallback, [In][ComAliasName("SpeechLib.UINT_PTR")] ulong wParam, [In][ComAliasName("SpeechLib.LONG_PTR")] long lParam);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
public virtual extern void SetNotifyWin32Event();
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
public virtual extern void WaitForNotifyEvent([In] uint dwMilliseconds);
[MethodImpl(MethodImplOptions.PreserveSig | MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
public virtual extern IntPtr GetNotifyEventHandle();
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
public virtual extern void SetInterest([In] ulong ullEventInterest, [In] ulong ullQueuedInterest);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
public virtual extern void GetEvents([In] uint ulCount, out SPEVENT pEventArray, out uint pulFetched);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
public virtual extern void GetInfo(out SPEVENTSOURCEINFO pInfo);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
public virtual extern void SetOutput([In][MarshalAs(UnmanagedType.IUnknown)] object pUnkOutput, [In] int fAllowFormatChanges);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
public virtual extern void GetOutputObjectToken([MarshalAs(UnmanagedType.Interface)] out ISpObjectToken ppObjectToken);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
public virtual extern void GetOutputStream([MarshalAs(UnmanagedType.Interface)] out ISpStreamFormat ppStream);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
public virtual extern void ISpVoice_Pause();
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
public virtual extern void ISpVoice_Resume();
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
public virtual extern void SetVoice([In][MarshalAs(UnmanagedType.Interface)] ISpObjectToken pToken);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
public virtual extern void GetVoice([MarshalAs(UnmanagedType.Interface)] out ISpObjectToken ppToken);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
public virtual extern void Speak([In][MarshalAs(UnmanagedType.LPWStr)] string pwcs, [In] uint dwFlags, out uint pulStreamNumber);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
public virtual extern void SpeakStream([In][MarshalAs(UnmanagedType.Interface)] IStream pStream, [In] uint dwFlags, out uint pulStreamNumber);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
public virtual extern void GetStatus(out SPVOICESTATUS pStatus, [MarshalAs(UnmanagedType.LPWStr)] out string ppszLastBookmark);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
public virtual extern void Skip([In][MarshalAs(UnmanagedType.LPWStr)] string pItemType, [In] int lNumItems, out uint pulNumSkipped);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
public virtual extern void SetPriority([In] SPVPRIORITY ePriority);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
public virtual extern void GetPriority(out SPVPRIORITY pePriority);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
public virtual extern void SetAlertBoundary([In] SPEVENTENUM eBoundary);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
public virtual extern void GetAlertBoundary(out SPEVENTENUM peBoundary);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
public virtual extern void SetRate([In] int RateAdjust);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
public virtual extern void GetRate(out int pRateAdjust);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
public virtual extern void SetVolume([In] ushort usVolume);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
public virtual extern void GetVolume(out ushort pusVolume);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
public virtual extern void WaitUntilDone([In] uint msTimeout);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
public virtual extern void SetSyncSpeakTimeout([In] uint msTimeout);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
public virtual extern void GetSyncSpeakTimeout(out uint pmsTimeout);
[MethodImpl(MethodImplOptions.PreserveSig | MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
public virtual extern IntPtr ISpVoice_SpeakCompleteEvent();
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
public virtual extern void IsUISupported([In][MarshalAs(UnmanagedType.LPWStr)] string pszTypeOfUI, [In] IntPtr pvExtraData, [In] uint cbExtraData, out int pfSupported);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
public virtual extern void DisplayUI([In][ComAliasName("SpeechLib.wireHWND")] ref _RemotableHandle hWndParent, [In][MarshalAs(UnmanagedType.LPWStr)] string pszTitle, [In][MarshalAs(UnmanagedType.LPWStr)] string pszTypeOfUI, [In] IntPtr pvExtraData, [In] uint cbExtraData);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
public virtual extern void IsAlphabetUPS(out int pfIsUPS);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
public virtual extern void SetAlphabetToUPS([In] int fForceUPS);
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 0cd9856eb9478c5419fe19b0c5fe4869
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,95 @@
using System;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
namespace SpeechLib {
[ComImport]
[CoClass(typeof(SpWaveFormatExClass))]
[Guid("7A1EF0D5-1581-4741-88E4-209A49F11A10")]
public interface SpWaveFormatEx : ISpeechWaveFormatEx { }
[ComImport]
[TypeLibType(2)]
[ClassInterface((ClassInterfaceType)0)]
[Guid("C79A574C-63BE-44B9-801F-283F87F898BE")]
public class SpWaveFormatExClass : ISpeechWaveFormatEx, SpWaveFormatEx {
[DispId(1)]
public virtual extern short FormatTag {
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(1)]
get;
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(1)]
[param: In]
set;
}
[DispId(2)]
public virtual extern short Channels {
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(2)]
get;
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(2)]
[param: In]
set;
}
[DispId(3)]
public virtual extern int SamplesPerSec {
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(3)]
get;
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(3)]
[param: In]
set;
}
[DispId(4)]
public virtual extern int AvgBytesPerSec {
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(4)]
get;
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(4)]
[param: In]
set;
}
[DispId(5)]
public virtual extern short BlockAlign {
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(5)]
get;
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(5)]
[param: In]
set;
}
[DispId(6)]
public virtual extern short BitsPerSample {
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(6)]
get;
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(6)]
[param: In]
set;
}
[DispId(7)]
public virtual extern object ExtraData {
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(7)]
[return: MarshalAs(UnmanagedType.Struct)]
get;
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(7)]
[param: In]
[param: MarshalAs(UnmanagedType.Struct)]
set;
}
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: f4ed37498f153644db78885d96fca065
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,81 @@
using System.Runtime.InteropServices;
namespace SpeechLib {
public enum SpeechAudioFormatType {
[TypeLibVar(64)]
SAFTDefault = -1,
[TypeLibVar(64)]
SAFTNoAssignedFormat,
[TypeLibVar(64)]
SAFTText,
[TypeLibVar(64)]
SAFTNonStandardFormat,
[TypeLibVar(64)]
SAFTExtendedAudioFormat,
SAFT8kHz8BitMono,
SAFT8kHz8BitStereo,
SAFT8kHz16BitMono,
SAFT8kHz16BitStereo,
SAFT11kHz8BitMono,
SAFT11kHz8BitStereo,
SAFT11kHz16BitMono,
SAFT11kHz16BitStereo,
SAFT12kHz8BitMono,
SAFT12kHz8BitStereo,
SAFT12kHz16BitMono,
SAFT12kHz16BitStereo,
SAFT16kHz8BitMono,
SAFT16kHz8BitStereo,
SAFT16kHz16BitMono,
SAFT16kHz16BitStereo,
SAFT22kHz8BitMono,
SAFT22kHz8BitStereo,
SAFT22kHz16BitMono,
SAFT22kHz16BitStereo,
SAFT24kHz8BitMono,
SAFT24kHz8BitStereo,
SAFT24kHz16BitMono,
SAFT24kHz16BitStereo,
SAFT32kHz8BitMono,
SAFT32kHz8BitStereo,
SAFT32kHz16BitMono,
SAFT32kHz16BitStereo,
SAFT44kHz8BitMono,
SAFT44kHz8BitStereo,
SAFT44kHz16BitMono,
SAFT44kHz16BitStereo,
SAFT48kHz8BitMono,
SAFT48kHz8BitStereo,
SAFT48kHz16BitMono,
SAFT48kHz16BitStereo,
SAFTTrueSpeech_8kHz1BitMono,
SAFTCCITT_ALaw_8kHzMono,
SAFTCCITT_ALaw_8kHzStereo,
SAFTCCITT_ALaw_11kHzMono,
SAFTCCITT_ALaw_11kHzStereo,
SAFTCCITT_ALaw_22kHzMono,
SAFTCCITT_ALaw_22kHzStereo,
SAFTCCITT_ALaw_44kHzMono,
SAFTCCITT_ALaw_44kHzStereo,
SAFTCCITT_uLaw_8kHzMono,
SAFTCCITT_uLaw_8kHzStereo,
SAFTCCITT_uLaw_11kHzMono,
SAFTCCITT_uLaw_11kHzStereo,
SAFTCCITT_uLaw_22kHzMono,
SAFTCCITT_uLaw_22kHzStereo,
SAFTCCITT_uLaw_44kHzMono,
SAFTCCITT_uLaw_44kHzStereo,
SAFTADPCM_8kHzMono,
SAFTADPCM_8kHzStereo,
SAFTADPCM_11kHzMono,
SAFTADPCM_11kHzStereo,
SAFTADPCM_22kHzMono,
SAFTADPCM_22kHzStereo,
SAFTADPCM_44kHzMono,
SAFTADPCM_44kHzStereo,
SAFTGSM610_8kHzMono,
SAFTGSM610_11kHzMono,
SAFTGSM610_22kHzMono,
SAFTGSM610_44kHzMono
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: e1a21b43b28527448902110444d6afc0
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,8 @@
namespace SpeechLib {
public enum SpeechDataKeyLocation {
SDKLDefaultLocation = 0,
SDKLCurrentUser = 1,
SDKLLocalMachine = 2,
SDKLCurrentConfig = 5
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: f69aeacc2c130d4418b452d983eca3fb
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,6 @@
namespace SpeechLib {
public enum SpeechRunState {
SRSEDone = 1,
SRSEIsSpeaking
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 58e9378a6ea5ef54ca111f0ad71daaa5
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,7 @@
namespace SpeechLib {
public enum SpeechStreamSeekPositionType {
SSSPTRelativeToStart,
SSSPTRelativeToCurrentPosition,
SSSPTRelativeToEnd
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 73521c15f74d9814195facc101171321
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,9 @@
namespace SpeechLib {
public enum SpeechTokenContext {
STCInprocServer = 1,
STCInprocHandler = 2,
STCLocalServer = 4,
STCRemoteServer = 16,
STCAll = 23
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: b219d571b1122c14a9f6b1fc1bb533dc
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,8 @@
namespace SpeechLib {
public enum SpeechTokenShellFolder {
STSF_AppData = 26,
STSF_LocalAppData = 28,
STSF_CommonAppData = 35,
STSF_FlagCreate = 32768
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: a7053e5bb777ac74c93de2329487d2f4
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,7 @@
namespace SpeechLib {
public enum SpeechVisemeFeature {
SVF_None,
SVF_Stressed,
SVF_Emphasis
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: c4348b51540a69d4ca1ce2f402101ec4
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,26 @@
namespace SpeechLib {
public enum SpeechVisemeType {
SVP_0,
SVP_1,
SVP_2,
SVP_3,
SVP_4,
SVP_5,
SVP_6,
SVP_7,
SVP_8,
SVP_9,
SVP_10,
SVP_11,
SVP_12,
SVP_13,
SVP_14,
SVP_15,
SVP_16,
SVP_17,
SVP_18,
SVP_19,
SVP_20,
SVP_21
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: e18a18641e2f468408eee5f6fce27591
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,15 @@
namespace SpeechLib {
public enum SpeechVoiceEvents {
SVEStartInputStream = 2,
SVEEndInputStream = 4,
SVEVoiceChange = 8,
SVEBookmark = 16,
SVEWordBoundary = 32,
SVEPhoneme = 64,
SVESentenceBoundary = 128,
SVEViseme = 256,
SVEAudioLevel = 512,
SVEPrivate = 32768,
SVEAllEvents = 33790
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: c19aff03b3b80ad4f9f1f3c7fd0cbd8e
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,7 @@
namespace SpeechLib {
public enum SpeechVoicePriority {
SVPNormal,
SVPAlert,
SVPOver
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 4755f32e8e4892f40abe8166e6ad372c
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,19 @@
namespace SpeechLib {
public enum SpeechVoiceSpeakFlags {
SVSFDefault = 0,
SVSFlagsAsync = 1,
SVSFPurgeBeforeSpeak = 2,
SVSFIsFilename = 4,
SVSFIsXML = 8,
SVSFIsNotXML = 16,
SVSFPersistXML = 32,
SVSFNLPSpeakPunc = 64,
SVSFParseSapi = 128,
SVSFParseSsml = 256,
SVSFParseAutodetect = 0,
SVSFNLPMask = 64,
SVSFParseMask = 384,
SVSFVoiceMask = 511,
SVSFUnusedFlags = -512
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 033baa98d3577584e95a52615e026a3f
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,10 @@
using System.Runtime.InteropServices;
namespace SpeechLib {
[StructLayout(LayoutKind.Sequential, Pack = 4)]
public struct _FILETIME {
public uint dwLowDateTime;
public uint dwHighDateTime;
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 75d9604bceee7f94cb9465693c3bdff7
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,805 @@
using System;
using System.Collections;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.InteropServices.ComTypes;
using System.Threading;
namespace SpeechLib {
[ComVisible(false)]
public delegate void _ISpeechVoiceEvents_StartStreamEventHandler([In] int StreamNumber, [In][MarshalAs(UnmanagedType.Struct)] object StreamPosition);
[ComVisible(false)]
public delegate void _ISpeechVoiceEvents_EndStreamEventHandler([In] int StreamNumber, [In][MarshalAs(UnmanagedType.Struct)] object StreamPosition);
[ComVisible(false)]
public delegate void _ISpeechVoiceEvents_VoiceChangeEventHandler([In] int StreamNumber, [In][MarshalAs(UnmanagedType.Struct)] object StreamPosition, [In][MarshalAs(UnmanagedType.Interface)] SpObjectToken VoiceObjectToken);
[ComVisible(false)]
public delegate void _ISpeechVoiceEvents_BookmarkEventHandler([In] int StreamNumber, [In][MarshalAs(UnmanagedType.Struct)] object StreamPosition, [In][MarshalAs(UnmanagedType.BStr)] string Bookmark, [In] int BookmarkId);
[ComVisible(false)]
public delegate void _ISpeechVoiceEvents_WordEventHandler([In] int StreamNumber, [In][MarshalAs(UnmanagedType.Struct)] object StreamPosition, [In] int CharacterPosition, [In] int Length);
[ComVisible(false)]
public delegate void _ISpeechVoiceEvents_SentenceEventHandler([In] int StreamNumber, [In][MarshalAs(UnmanagedType.Struct)] object StreamPosition, [In] int CharacterPosition, [In] int Length);
[ComVisible(false)]
public delegate void _ISpeechVoiceEvents_PhonemeEventHandler([In] int StreamNumber, [In][MarshalAs(UnmanagedType.Struct)] object StreamPosition, [In] int Duration, [In] short NextPhoneId, [In] SpeechVisemeFeature Feature, [In] short CurrentPhoneId);
[ComVisible(false)]
public delegate void _ISpeechVoiceEvents_VisemeEventHandler([In] int StreamNumber, [In][MarshalAs(UnmanagedType.Struct)] object StreamPosition, [In] int Duration, [In] SpeechVisemeType NextVisemeId, [In] SpeechVisemeFeature Feature, [In] SpeechVisemeType CurrentVisemeId);
[ComVisible(false)]
public delegate void _ISpeechVoiceEvents_AudioLevelEventHandler([In] int StreamNumber, [In][MarshalAs(UnmanagedType.Struct)] object StreamPosition, [In] int AudioLevel);
[ComVisible(false)]
public delegate void _ISpeechVoiceEvents_EnginePrivateEventHandler([In] int StreamNumber, [In] int StreamPosition, [In][MarshalAs(UnmanagedType.Struct)] object EngineData);
[ComImport]
[InterfaceType(2)]
[Guid("A372ACD1-3BEF-4BBD-8FFB-CB3E2B416AF8")]
[TypeLibType(4096)]
public interface _ISpeechVoiceEvents {
[MethodImpl(MethodImplOptions.PreserveSig | MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(1)]
void StartStream([In] int StreamNumber, [In][MarshalAs(UnmanagedType.Struct)] object StreamPosition);
[MethodImpl(MethodImplOptions.PreserveSig | MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(2)]
void EndStream([In] int StreamNumber, [In][MarshalAs(UnmanagedType.Struct)] object StreamPosition);
[MethodImpl(MethodImplOptions.PreserveSig | MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(3)]
void VoiceChange([In] int StreamNumber, [In][MarshalAs(UnmanagedType.Struct)] object StreamPosition, [In][MarshalAs(UnmanagedType.Interface)] SpObjectToken VoiceObjectToken);
[MethodImpl(MethodImplOptions.PreserveSig | MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(4)]
void Bookmark([In] int StreamNumber, [In][MarshalAs(UnmanagedType.Struct)] object StreamPosition, [In][MarshalAs(UnmanagedType.BStr)] string Bookmark, [In] int BookmarkId);
[MethodImpl(MethodImplOptions.PreserveSig | MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(5)]
void Word([In] int StreamNumber, [In][MarshalAs(UnmanagedType.Struct)] object StreamPosition, [In] int CharacterPosition, [In] int Length);
[MethodImpl(MethodImplOptions.PreserveSig | MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(7)]
void Sentence([In] int StreamNumber, [In][MarshalAs(UnmanagedType.Struct)] object StreamPosition, [In] int CharacterPosition, [In] int Length);
[MethodImpl(MethodImplOptions.PreserveSig | MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(6)]
void Phoneme([In] int StreamNumber, [In][MarshalAs(UnmanagedType.Struct)] object StreamPosition, [In] int Duration, [In] short NextPhoneId, [In] SpeechVisemeFeature Feature, [In] short CurrentPhoneId);
[MethodImpl(MethodImplOptions.PreserveSig | MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(8)]
void Viseme([In] int StreamNumber, [In][MarshalAs(UnmanagedType.Struct)] object StreamPosition, [In] int Duration, [In] SpeechVisemeType NextVisemeId, [In] SpeechVisemeFeature Feature, [In] SpeechVisemeType CurrentVisemeId);
[MethodImpl(MethodImplOptions.PreserveSig | MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(9)]
void AudioLevel([In] int StreamNumber, [In][MarshalAs(UnmanagedType.Struct)] object StreamPosition, [In] int AudioLevel);
[MethodImpl(MethodImplOptions.PreserveSig | MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(10)]
void EnginePrivate([In] int StreamNumber, [In] int StreamPosition, [In][MarshalAs(UnmanagedType.Struct)] object EngineData);
}
[ComEventInterface(typeof(_ISpeechVoiceEvents), typeof(_ISpeechVoiceEvents_EventProvider))]
[TypeLibType(16)]
[ComVisible(false)]
public interface _ISpeechVoiceEvents_Event {
event _ISpeechVoiceEvents_StartStreamEventHandler StartStream;
event _ISpeechVoiceEvents_EndStreamEventHandler EndStream;
event _ISpeechVoiceEvents_VoiceChangeEventHandler VoiceChange;
event _ISpeechVoiceEvents_BookmarkEventHandler Bookmark;
event _ISpeechVoiceEvents_WordEventHandler Word;
event _ISpeechVoiceEvents_SentenceEventHandler Sentence;
event _ISpeechVoiceEvents_PhonemeEventHandler Phoneme;
event _ISpeechVoiceEvents_VisemeEventHandler Viseme;
event _ISpeechVoiceEvents_AudioLevelEventHandler AudioLevel;
event _ISpeechVoiceEvents_EnginePrivateEventHandler EnginePrivate;
}
internal sealed class _ISpeechVoiceEvents_EventProvider : _ISpeechVoiceEvents_Event, IDisposable {
private readonly IConnectionPointContainer m_ConnectionPointContainer;
private ArrayList m_aEventSinkHelpers;
private IConnectionPoint m_ConnectionPoint;
private void Init() {
Guid riid = new(new byte[16]
{
209, 172, 114, 163, 239, 59, 189, 75, 143, 251,
203, 62, 43, 65, 106, 248
});
m_ConnectionPointContainer.FindConnectionPoint(ref riid, out IConnectionPoint ppCP);
m_ConnectionPoint = ppCP;
m_aEventSinkHelpers = new ArrayList();
}
public event _ISpeechVoiceEvents_StartStreamEventHandler StartStream {
add {
bool lockTaken = default;
try {
Monitor.Enter(this, ref lockTaken);
if (m_ConnectionPoint == null) {
Init();
}
_ISpeechVoiceEvents_SinkHelper iSpeechVoiceEvents_SinkHelper = new();
m_ConnectionPoint.Advise(iSpeechVoiceEvents_SinkHelper, out int pdwCookie);
iSpeechVoiceEvents_SinkHelper.m_dwCookie = pdwCookie;
iSpeechVoiceEvents_SinkHelper.m_StartStreamDelegate = value;
m_aEventSinkHelpers.Add(iSpeechVoiceEvents_SinkHelper);
}
finally {
if (lockTaken) {
Monitor.Exit(this);
}
}
}
remove {
bool lockTaken = default;
try {
Monitor.Enter(this, ref lockTaken);
if (m_aEventSinkHelpers == null) {
return;
}
int count = m_aEventSinkHelpers.Count;
int num = 0;
if (0 >= count) {
return;
}
do {
_ISpeechVoiceEvents_SinkHelper iSpeechVoiceEvents_SinkHelper = (_ISpeechVoiceEvents_SinkHelper)m_aEventSinkHelpers[num];
if (iSpeechVoiceEvents_SinkHelper.m_StartStreamDelegate != null && ((iSpeechVoiceEvents_SinkHelper.m_StartStreamDelegate.Equals(value) ? 1u : 0u) & 0xFFu) != 0) {
m_aEventSinkHelpers.RemoveAt(num);
m_ConnectionPoint.Unadvise(iSpeechVoiceEvents_SinkHelper.m_dwCookie);
if (count <= 1) {
Marshal.ReleaseComObject(m_ConnectionPoint);
m_ConnectionPoint = null;
m_aEventSinkHelpers = null;
}
break;
}
num++;
}
while (num < count);
}
finally {
if (lockTaken) {
Monitor.Exit(this);
}
}
}
}
public event _ISpeechVoiceEvents_EndStreamEventHandler EndStream {
add {
bool lockTaken = default;
try {
Monitor.Enter(this, ref lockTaken);
if (m_ConnectionPoint == null) {
Init();
}
_ISpeechVoiceEvents_SinkHelper iSpeechVoiceEvents_SinkHelper = new();
m_ConnectionPoint.Advise(iSpeechVoiceEvents_SinkHelper, out int pdwCookie);
iSpeechVoiceEvents_SinkHelper.m_dwCookie = pdwCookie;
iSpeechVoiceEvents_SinkHelper.m_EndStreamDelegate = value;
m_aEventSinkHelpers.Add(iSpeechVoiceEvents_SinkHelper);
}
finally {
if (lockTaken) {
Monitor.Exit(this);
}
}
}
remove {
bool lockTaken = default;
try {
Monitor.Enter(this, ref lockTaken);
if (m_aEventSinkHelpers == null) {
return;
}
int count = m_aEventSinkHelpers.Count;
int num = 0;
if (0 >= count) {
return;
}
do {
_ISpeechVoiceEvents_SinkHelper iSpeechVoiceEvents_SinkHelper = (_ISpeechVoiceEvents_SinkHelper)m_aEventSinkHelpers[num];
if (iSpeechVoiceEvents_SinkHelper.m_EndStreamDelegate != null && ((iSpeechVoiceEvents_SinkHelper.m_EndStreamDelegate.Equals(value) ? 1u : 0u) & 0xFFu) != 0) {
m_aEventSinkHelpers.RemoveAt(num);
m_ConnectionPoint.Unadvise(iSpeechVoiceEvents_SinkHelper.m_dwCookie);
if (count <= 1) {
Marshal.ReleaseComObject(m_ConnectionPoint);
m_ConnectionPoint = null;
m_aEventSinkHelpers = null;
}
break;
}
num++;
}
while (num < count);
}
finally {
if (lockTaken) {
Monitor.Exit(this);
}
}
}
}
public event _ISpeechVoiceEvents_VoiceChangeEventHandler VoiceChange {
add {
bool lockTaken = default;
try {
Monitor.Enter(this, ref lockTaken);
if (m_ConnectionPoint == null) {
Init();
}
_ISpeechVoiceEvents_SinkHelper iSpeechVoiceEvents_SinkHelper = new();
m_ConnectionPoint.Advise(iSpeechVoiceEvents_SinkHelper, out int pdwCookie);
iSpeechVoiceEvents_SinkHelper.m_dwCookie = pdwCookie;
iSpeechVoiceEvents_SinkHelper.m_VoiceChangeDelegate = value;
m_aEventSinkHelpers.Add(iSpeechVoiceEvents_SinkHelper);
}
finally {
if (lockTaken) {
Monitor.Exit(this);
}
}
}
remove {
bool lockTaken = default;
try {
Monitor.Enter(this, ref lockTaken);
if (m_aEventSinkHelpers == null) {
return;
}
int count = m_aEventSinkHelpers.Count;
int num = 0;
if (0 >= count) {
return;
}
do {
_ISpeechVoiceEvents_SinkHelper iSpeechVoiceEvents_SinkHelper = (_ISpeechVoiceEvents_SinkHelper)m_aEventSinkHelpers[num];
if (iSpeechVoiceEvents_SinkHelper.m_VoiceChangeDelegate != null && ((iSpeechVoiceEvents_SinkHelper.m_VoiceChangeDelegate.Equals(value) ? 1u : 0u) & 0xFFu) != 0) {
m_aEventSinkHelpers.RemoveAt(num);
m_ConnectionPoint.Unadvise(iSpeechVoiceEvents_SinkHelper.m_dwCookie);
if (count <= 1) {
Marshal.ReleaseComObject(m_ConnectionPoint);
m_ConnectionPoint = null;
m_aEventSinkHelpers = null;
}
break;
}
num++;
}
while (num < count);
}
finally {
if (lockTaken) {
Monitor.Exit(this);
}
}
}
}
public event _ISpeechVoiceEvents_BookmarkEventHandler Bookmark {
add {
bool lockTaken = default;
try {
Monitor.Enter(this, ref lockTaken);
if (m_ConnectionPoint == null) {
Init();
}
_ISpeechVoiceEvents_SinkHelper iSpeechVoiceEvents_SinkHelper = new();
m_ConnectionPoint.Advise(iSpeechVoiceEvents_SinkHelper, out int pdwCookie);
iSpeechVoiceEvents_SinkHelper.m_dwCookie = pdwCookie;
iSpeechVoiceEvents_SinkHelper.m_BookmarkDelegate = value;
m_aEventSinkHelpers.Add(iSpeechVoiceEvents_SinkHelper);
}
finally {
if (lockTaken) {
Monitor.Exit(this);
}
}
}
remove {
bool lockTaken = default;
try {
Monitor.Enter(this, ref lockTaken);
if (m_aEventSinkHelpers == null) {
return;
}
int count = m_aEventSinkHelpers.Count;
int num = 0;
if (0 >= count) {
return;
}
do {
_ISpeechVoiceEvents_SinkHelper iSpeechVoiceEvents_SinkHelper = (_ISpeechVoiceEvents_SinkHelper)m_aEventSinkHelpers[num];
if (iSpeechVoiceEvents_SinkHelper.m_BookmarkDelegate != null && ((iSpeechVoiceEvents_SinkHelper.m_BookmarkDelegate.Equals(value) ? 1u : 0u) & 0xFFu) != 0) {
m_aEventSinkHelpers.RemoveAt(num);
m_ConnectionPoint.Unadvise(iSpeechVoiceEvents_SinkHelper.m_dwCookie);
if (count <= 1) {
Marshal.ReleaseComObject(m_ConnectionPoint);
m_ConnectionPoint = null;
m_aEventSinkHelpers = null;
}
break;
}
num++;
}
while (num < count);
}
finally {
if (lockTaken) {
Monitor.Exit(this);
}
}
}
}
public event _ISpeechVoiceEvents_WordEventHandler Word {
add {
bool lockTaken = default;
try {
Monitor.Enter(this, ref lockTaken);
if (m_ConnectionPoint == null) {
Init();
}
_ISpeechVoiceEvents_SinkHelper iSpeechVoiceEvents_SinkHelper = new();
m_ConnectionPoint.Advise(iSpeechVoiceEvents_SinkHelper, out int pdwCookie);
iSpeechVoiceEvents_SinkHelper.m_dwCookie = pdwCookie;
iSpeechVoiceEvents_SinkHelper.m_WordDelegate = value;
m_aEventSinkHelpers.Add(iSpeechVoiceEvents_SinkHelper);
}
finally {
if (lockTaken) {
Monitor.Exit(this);
}
}
}
remove {
bool lockTaken = default;
try {
Monitor.Enter(this, ref lockTaken);
if (m_aEventSinkHelpers == null) {
return;
}
int count = m_aEventSinkHelpers.Count;
int num = 0;
if (0 >= count) {
return;
}
do {
_ISpeechVoiceEvents_SinkHelper iSpeechVoiceEvents_SinkHelper = (_ISpeechVoiceEvents_SinkHelper)m_aEventSinkHelpers[num];
if (iSpeechVoiceEvents_SinkHelper.m_WordDelegate != null && ((iSpeechVoiceEvents_SinkHelper.m_WordDelegate.Equals(value) ? 1u : 0u) & 0xFFu) != 0) {
m_aEventSinkHelpers.RemoveAt(num);
m_ConnectionPoint.Unadvise(iSpeechVoiceEvents_SinkHelper.m_dwCookie);
if (count <= 1) {
Marshal.ReleaseComObject(m_ConnectionPoint);
m_ConnectionPoint = null;
m_aEventSinkHelpers = null;
}
break;
}
num++;
}
while (num < count);
}
finally {
if (lockTaken) {
Monitor.Exit(this);
}
}
}
}
public event _ISpeechVoiceEvents_SentenceEventHandler Sentence {
add {
bool lockTaken = default;
try {
Monitor.Enter(this, ref lockTaken);
if (m_ConnectionPoint == null) {
Init();
}
_ISpeechVoiceEvents_SinkHelper iSpeechVoiceEvents_SinkHelper = new();
m_ConnectionPoint.Advise(iSpeechVoiceEvents_SinkHelper, out int pdwCookie);
iSpeechVoiceEvents_SinkHelper.m_dwCookie = pdwCookie;
iSpeechVoiceEvents_SinkHelper.m_SentenceDelegate = value;
m_aEventSinkHelpers.Add(iSpeechVoiceEvents_SinkHelper);
}
finally {
if (lockTaken) {
Monitor.Exit(this);
}
}
}
remove {
bool lockTaken = default;
try {
Monitor.Enter(this, ref lockTaken);
if (m_aEventSinkHelpers == null) {
return;
}
int count = m_aEventSinkHelpers.Count;
int num = 0;
if (0 >= count) {
return;
}
do {
_ISpeechVoiceEvents_SinkHelper iSpeechVoiceEvents_SinkHelper = (_ISpeechVoiceEvents_SinkHelper)m_aEventSinkHelpers[num];
if (iSpeechVoiceEvents_SinkHelper.m_SentenceDelegate != null && ((iSpeechVoiceEvents_SinkHelper.m_SentenceDelegate.Equals(value) ? 1u : 0u) & 0xFFu) != 0) {
m_aEventSinkHelpers.RemoveAt(num);
m_ConnectionPoint.Unadvise(iSpeechVoiceEvents_SinkHelper.m_dwCookie);
if (count <= 1) {
Marshal.ReleaseComObject(m_ConnectionPoint);
m_ConnectionPoint = null;
m_aEventSinkHelpers = null;
}
break;
}
num++;
}
while (num < count);
}
finally {
if (lockTaken) {
Monitor.Exit(this);
}
}
}
}
public event _ISpeechVoiceEvents_PhonemeEventHandler Phoneme {
add {
bool lockTaken = default;
try {
Monitor.Enter(this, ref lockTaken);
if (m_ConnectionPoint == null) {
Init();
}
_ISpeechVoiceEvents_SinkHelper iSpeechVoiceEvents_SinkHelper = new();
m_ConnectionPoint.Advise(iSpeechVoiceEvents_SinkHelper, out int pdwCookie);
iSpeechVoiceEvents_SinkHelper.m_dwCookie = pdwCookie;
iSpeechVoiceEvents_SinkHelper.m_PhonemeDelegate = value;
m_aEventSinkHelpers.Add(iSpeechVoiceEvents_SinkHelper);
}
finally {
if (lockTaken) {
Monitor.Exit(this);
}
}
}
remove {
bool lockTaken = default;
try {
Monitor.Enter(this, ref lockTaken);
if (m_aEventSinkHelpers == null) {
return;
}
int count = m_aEventSinkHelpers.Count;
int num = 0;
if (0 >= count) {
return;
}
do {
_ISpeechVoiceEvents_SinkHelper iSpeechVoiceEvents_SinkHelper = (_ISpeechVoiceEvents_SinkHelper)m_aEventSinkHelpers[num];
if (iSpeechVoiceEvents_SinkHelper.m_PhonemeDelegate != null && ((iSpeechVoiceEvents_SinkHelper.m_PhonemeDelegate.Equals(value) ? 1u : 0u) & 0xFFu) != 0) {
m_aEventSinkHelpers.RemoveAt(num);
m_ConnectionPoint.Unadvise(iSpeechVoiceEvents_SinkHelper.m_dwCookie);
if (count <= 1) {
Marshal.ReleaseComObject(m_ConnectionPoint);
m_ConnectionPoint = null;
m_aEventSinkHelpers = null;
}
break;
}
num++;
}
while (num < count);
}
finally {
if (lockTaken) {
Monitor.Exit(this);
}
}
}
}
public event _ISpeechVoiceEvents_VisemeEventHandler Viseme {
add {
bool lockTaken = default;
try {
Monitor.Enter(this, ref lockTaken);
if (m_ConnectionPoint == null) {
Init();
}
_ISpeechVoiceEvents_SinkHelper iSpeechVoiceEvents_SinkHelper = new();
m_ConnectionPoint.Advise(iSpeechVoiceEvents_SinkHelper, out int pdwCookie);
iSpeechVoiceEvents_SinkHelper.m_dwCookie = pdwCookie;
iSpeechVoiceEvents_SinkHelper.m_VisemeDelegate = value;
m_aEventSinkHelpers.Add(iSpeechVoiceEvents_SinkHelper);
}
finally {
if (lockTaken) {
Monitor.Exit(this);
}
}
}
remove {
bool lockTaken = default;
try {
Monitor.Enter(this, ref lockTaken);
if (m_aEventSinkHelpers == null) {
return;
}
int count = m_aEventSinkHelpers.Count;
int num = 0;
if (0 >= count) {
return;
}
do {
_ISpeechVoiceEvents_SinkHelper iSpeechVoiceEvents_SinkHelper = (_ISpeechVoiceEvents_SinkHelper)m_aEventSinkHelpers[num];
if (iSpeechVoiceEvents_SinkHelper.m_VisemeDelegate != null && ((iSpeechVoiceEvents_SinkHelper.m_VisemeDelegate.Equals(value) ? 1u : 0u) & 0xFFu) != 0) {
m_aEventSinkHelpers.RemoveAt(num);
m_ConnectionPoint.Unadvise(iSpeechVoiceEvents_SinkHelper.m_dwCookie);
if (count <= 1) {
Marshal.ReleaseComObject(m_ConnectionPoint);
m_ConnectionPoint = null;
m_aEventSinkHelpers = null;
}
break;
}
num++;
}
while (num < count);
}
finally {
if (lockTaken) {
Monitor.Exit(this);
}
}
}
}
public event _ISpeechVoiceEvents_AudioLevelEventHandler AudioLevel {
add {
bool lockTaken = default;
try {
Monitor.Enter(this, ref lockTaken);
if (m_ConnectionPoint == null) {
Init();
}
_ISpeechVoiceEvents_SinkHelper iSpeechVoiceEvents_SinkHelper = new();
m_ConnectionPoint.Advise(iSpeechVoiceEvents_SinkHelper, out int pdwCookie);
iSpeechVoiceEvents_SinkHelper.m_dwCookie = pdwCookie;
iSpeechVoiceEvents_SinkHelper.m_AudioLevelDelegate = value;
m_aEventSinkHelpers.Add(iSpeechVoiceEvents_SinkHelper);
}
finally {
if (lockTaken) {
Monitor.Exit(this);
}
}
}
remove {
bool lockTaken = default;
try {
Monitor.Enter(this, ref lockTaken);
if (m_aEventSinkHelpers == null) {
return;
}
int count = m_aEventSinkHelpers.Count;
int num = 0;
if (0 >= count) {
return;
}
do {
_ISpeechVoiceEvents_SinkHelper iSpeechVoiceEvents_SinkHelper = (_ISpeechVoiceEvents_SinkHelper)m_aEventSinkHelpers[num];
if (iSpeechVoiceEvents_SinkHelper.m_AudioLevelDelegate != null && ((iSpeechVoiceEvents_SinkHelper.m_AudioLevelDelegate.Equals(value) ? 1u : 0u) & 0xFFu) != 0) {
m_aEventSinkHelpers.RemoveAt(num);
m_ConnectionPoint.Unadvise(iSpeechVoiceEvents_SinkHelper.m_dwCookie);
if (count <= 1) {
Marshal.ReleaseComObject(m_ConnectionPoint);
m_ConnectionPoint = null;
m_aEventSinkHelpers = null;
}
break;
}
num++;
}
while (num < count);
}
finally {
if (lockTaken) {
Monitor.Exit(this);
}
}
}
}
public event _ISpeechVoiceEvents_EnginePrivateEventHandler EnginePrivate {
add {
bool lockTaken = default;
try {
Monitor.Enter(this, ref lockTaken);
if (m_ConnectionPoint == null) {
Init();
}
_ISpeechVoiceEvents_SinkHelper iSpeechVoiceEvents_SinkHelper = new();
m_ConnectionPoint.Advise(iSpeechVoiceEvents_SinkHelper, out int pdwCookie);
iSpeechVoiceEvents_SinkHelper.m_dwCookie = pdwCookie;
iSpeechVoiceEvents_SinkHelper.m_EnginePrivateDelegate = value;
m_aEventSinkHelpers.Add(iSpeechVoiceEvents_SinkHelper);
}
finally {
if (lockTaken) {
Monitor.Exit(this);
}
}
}
remove {
bool lockTaken = default;
try {
Monitor.Enter(this, ref lockTaken);
if (m_aEventSinkHelpers == null) {
return;
}
int count = m_aEventSinkHelpers.Count;
int num = 0;
if (0 >= count) {
return;
}
do {
_ISpeechVoiceEvents_SinkHelper iSpeechVoiceEvents_SinkHelper = (_ISpeechVoiceEvents_SinkHelper)m_aEventSinkHelpers[num];
if (iSpeechVoiceEvents_SinkHelper.m_EnginePrivateDelegate != null && ((iSpeechVoiceEvents_SinkHelper.m_EnginePrivateDelegate.Equals(value) ? 1u : 0u) & 0xFFu) != 0) {
m_aEventSinkHelpers.RemoveAt(num);
m_ConnectionPoint.Unadvise(iSpeechVoiceEvents_SinkHelper.m_dwCookie);
if (count <= 1) {
Marshal.ReleaseComObject(m_ConnectionPoint);
m_ConnectionPoint = null;
m_aEventSinkHelpers = null;
}
break;
}
num++;
}
while (num < count);
}
finally {
if (lockTaken) {
Monitor.Exit(this);
}
}
}
}
public _ISpeechVoiceEvents_EventProvider(object P_0) {
m_ConnectionPointContainer = (IConnectionPointContainer)P_0;
}
public void Finalize() {
bool lockTaken = default;
try {
Monitor.Enter(this, ref lockTaken);
if (m_ConnectionPoint == null) {
return;
}
int count = m_aEventSinkHelpers.Count;
int num = 0;
if (0 < count) {
do {
_ISpeechVoiceEvents_SinkHelper iSpeechVoiceEvents_SinkHelper = (_ISpeechVoiceEvents_SinkHelper)m_aEventSinkHelpers[num];
m_ConnectionPoint.Unadvise(iSpeechVoiceEvents_SinkHelper.m_dwCookie);
num++;
}
while (num < count);
}
Marshal.ReleaseComObject(m_ConnectionPoint);
}
catch (Exception) {
}
finally {
if (lockTaken) {
Monitor.Exit(this);
}
}
}
public void Dispose() {
Finalize();
GC.SuppressFinalize(this);
}
}
[TypeLibType(TypeLibTypeFlags.FHidden)]
[ClassInterface(ClassInterfaceType.None)]
public sealed class _ISpeechVoiceEvents_SinkHelper : _ISpeechVoiceEvents {
public _ISpeechVoiceEvents_StartStreamEventHandler m_StartStreamDelegate;
public _ISpeechVoiceEvents_EndStreamEventHandler m_EndStreamDelegate;
public _ISpeechVoiceEvents_VoiceChangeEventHandler m_VoiceChangeDelegate;
public _ISpeechVoiceEvents_BookmarkEventHandler m_BookmarkDelegate;
public _ISpeechVoiceEvents_WordEventHandler m_WordDelegate;
public _ISpeechVoiceEvents_SentenceEventHandler m_SentenceDelegate;
public _ISpeechVoiceEvents_PhonemeEventHandler m_PhonemeDelegate;
public _ISpeechVoiceEvents_VisemeEventHandler m_VisemeDelegate;
public _ISpeechVoiceEvents_AudioLevelEventHandler m_AudioLevelDelegate;
public _ISpeechVoiceEvents_EnginePrivateEventHandler m_EnginePrivateDelegate;
public int m_dwCookie;
public void StartStream(int P_0, object P_1) {
m_StartStreamDelegate?.Invoke(P_0, P_1);
}
public void EndStream(int P_0, object P_1) {
m_EndStreamDelegate?.Invoke(P_0, P_1);
}
public void VoiceChange(int P_0, object P_1, SpObjectToken P_2) {
m_VoiceChangeDelegate?.Invoke(P_0, P_1, P_2);
}
public void Bookmark(int P_0, object P_1, string P_2, int P_3) {
m_BookmarkDelegate?.Invoke(P_0, P_1, P_2, P_3);
}
public void Word(int P_0, object P_1, int P_2, int P_3) {
m_WordDelegate?.Invoke(P_0, P_1, P_2, P_3);
}
public void Sentence(int P_0, object P_1, int P_2, int P_3) {
m_SentenceDelegate?.Invoke(P_0, P_1, P_2, P_3);
}
public void Phoneme(int P_0, object P_1, int P_2, short P_3, SpeechVisemeFeature P_4, short P_5) {
m_PhonemeDelegate?.Invoke(P_0, P_1, P_2, P_3, P_4, P_5);
}
public void Viseme(int P_0, object P_1, int P_2, SpeechVisemeType P_3, SpeechVisemeFeature P_4, SpeechVisemeType P_5) {
m_VisemeDelegate?.Invoke(P_0, P_1, P_2, P_3, P_4, P_5);
}
public void AudioLevel(int P_0, object P_1, int P_2) {
m_AudioLevelDelegate?.Invoke(P_0, P_1, P_2);
}
public void EnginePrivate(int P_0, int P_1, object P_2) {
m_EnginePrivateDelegate?.Invoke(P_0, P_1, P_2);
}
internal _ISpeechVoiceEvents_SinkHelper() {
m_dwCookie = 0;
m_StartStreamDelegate = null;
m_EndStreamDelegate = null;
m_VoiceChangeDelegate = null;
m_BookmarkDelegate = null;
m_WordDelegate = null;
m_SentenceDelegate = null;
m_PhonemeDelegate = null;
m_VisemeDelegate = null;
m_AudioLevelDelegate = null;
m_EnginePrivateDelegate = null;
}
}
}

Some files were not shown because too many files have changed in this diff Show More