fix: Fix TTS COM exception in IL2CPP
This commit is contained in:
@@ -3,6 +3,7 @@
|
|||||||
"rootNamespace": "",
|
"rootNamespace": "",
|
||||||
"references": [
|
"references": [
|
||||||
"GUID:b92f9c7ac10b1c04e86fc48210f62ab1",
|
"GUID:b92f9c7ac10b1c04e86fc48210f62ab1",
|
||||||
|
"GUID:1e0937e40dadba24a97b7342c4559580",
|
||||||
"GUID:e5b7e7f40a80a814ba706299d68f9213",
|
"GUID:e5b7e7f40a80a814ba706299d68f9213",
|
||||||
"GUID:da293eebbcb9a4947a212534c52d1a32"
|
"GUID:da293eebbcb9a4947a212534c52d1a32"
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ using System.Threading.Tasks;
|
|||||||
|
|
||||||
namespace Cryville.EEW.Unity {
|
namespace Cryville.EEW.Unity {
|
||||||
class TTSWorker : Core.Audio.TTSWorker {
|
class TTSWorker : Core.Audio.TTSWorker {
|
||||||
readonly SpVoiceClass _voice;
|
readonly ISpVoice _voice;
|
||||||
|
|
||||||
public TTSWorker() : base(CreateSoundPlayer()) {
|
public TTSWorker() : base(CreateSoundPlayer()) {
|
||||||
try {
|
try {
|
||||||
@@ -34,14 +34,15 @@ namespace Cryville.EEW.Unity {
|
|||||||
if (_voice == null) return Task.CompletedTask;
|
if (_voice == null) return Task.CompletedTask;
|
||||||
_voice.Speak(
|
_voice.Speak(
|
||||||
string.Format(CultureInfo.InvariantCulture, "<LANG LANGID=\"{0:x}\">{1}</LANG>", culture.LCID, content),
|
string.Format(CultureInfo.InvariantCulture, "<LANG LANGID=\"{0:x}\">{1}</LANG>", culture.LCID, content),
|
||||||
SpeechVoiceSpeakFlags.SVSFlagsAsync | SpeechVoiceSpeakFlags.SVSFPurgeBeforeSpeak
|
(uint)(SpeechVoiceSpeakFlags.SVSFlagsAsync | SpeechVoiceSpeakFlags.SVSFPurgeBeforeSpeak),
|
||||||
|
out _
|
||||||
);
|
);
|
||||||
return Task.CompletedTask;
|
return Task.CompletedTask;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void StopCurrent() {
|
protected override void StopCurrent() {
|
||||||
if (_voice == null) return;
|
if (_voice == null) return;
|
||||||
_voice.Skip("SENTENCE", int.MaxValue);
|
_voice.Skip("SENTENCE", int.MaxValue, out _);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Binary file not shown.
@@ -1,76 +0,0 @@
|
|||||||
fileFormatVersion: 2
|
|
||||||
guid: 17df7db50754b8f459aa29934b507000
|
|
||||||
PluginImporter:
|
|
||||||
externalObjects: {}
|
|
||||||
serializedVersion: 2
|
|
||||||
iconMap: {}
|
|
||||||
executionOrder: {}
|
|
||||||
defineConstraints: []
|
|
||||||
isPreloaded: 0
|
|
||||||
isOverridable: 0
|
|
||||||
isExplicitlyReferenced: 0
|
|
||||||
validateReferences: 1
|
|
||||||
platformData:
|
|
||||||
- first:
|
|
||||||
: Any
|
|
||||||
second:
|
|
||||||
enabled: 0
|
|
||||||
settings:
|
|
||||||
Exclude Android: 1
|
|
||||||
Exclude Editor: 0
|
|
||||||
Exclude Linux64: 1
|
|
||||||
Exclude OSXUniversal: 1
|
|
||||||
Exclude Win: 0
|
|
||||||
Exclude Win64: 0
|
|
||||||
- first:
|
|
||||||
Android: Android
|
|
||||||
second:
|
|
||||||
enabled: 0
|
|
||||||
settings:
|
|
||||||
CPU: ARMv7
|
|
||||||
- first:
|
|
||||||
Any:
|
|
||||||
second:
|
|
||||||
enabled: 0
|
|
||||||
settings: {}
|
|
||||||
- first:
|
|
||||||
Editor: Editor
|
|
||||||
second:
|
|
||||||
enabled: 1
|
|
||||||
settings:
|
|
||||||
CPU: AnyCPU
|
|
||||||
DefaultValueInitialized: true
|
|
||||||
OS: AnyOS
|
|
||||||
- first:
|
|
||||||
Standalone: Linux64
|
|
||||||
second:
|
|
||||||
enabled: 0
|
|
||||||
settings:
|
|
||||||
CPU: None
|
|
||||||
- first:
|
|
||||||
Standalone: OSXUniversal
|
|
||||||
second:
|
|
||||||
enabled: 0
|
|
||||||
settings:
|
|
||||||
CPU: None
|
|
||||||
- first:
|
|
||||||
Standalone: Win
|
|
||||||
second:
|
|
||||||
enabled: 1
|
|
||||||
settings:
|
|
||||||
CPU: x86
|
|
||||||
- first:
|
|
||||||
Standalone: Win64
|
|
||||||
second:
|
|
||||||
enabled: 1
|
|
||||||
settings:
|
|
||||||
CPU: x86_64
|
|
||||||
- first:
|
|
||||||
Windows Store Apps: WindowsStoreApps
|
|
||||||
second:
|
|
||||||
enabled: 0
|
|
||||||
settings:
|
|
||||||
CPU: AnyCPU
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
||||||
8
Assets/Plugins/Windows/Interop.SpeechLib.meta
Normal file
8
Assets/Plugins/Windows/Interop.SpeechLib.meta
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 33ce0e71590119e4f803932e358b4593
|
||||||
|
folderAsset: yes
|
||||||
|
DefaultImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
@@ -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));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 57f24b2017eba4d4eb634cf86ae099af
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
@@ -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);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: b8d9b83debeb9c244a52757c270bd3ff
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
47
Assets/Plugins/Windows/Interop.SpeechLib/ISpDataKey.cs
Normal file
47
Assets/Plugins/Windows/Interop.SpeechLib/ISpDataKey.cs
Normal 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);
|
||||||
|
}
|
||||||
|
}
|
||||||
11
Assets/Plugins/Windows/Interop.SpeechLib/ISpDataKey.cs.meta
Normal file
11
Assets/Plugins/Windows/Interop.SpeechLib/ISpDataKey.cs.meta
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 53c599adb0888ca488c429446e094a6e
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
41
Assets/Plugins/Windows/Interop.SpeechLib/ISpEventSource.cs
Normal file
41
Assets/Plugins/Windows/Interop.SpeechLib/ISpEventSource.cs
Normal 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);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 956b9cc3f6ea4e848971f63146675fca
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
14
Assets/Plugins/Windows/Interop.SpeechLib/ISpNotifySink.cs
Normal file
14
Assets/Plugins/Windows/Interop.SpeechLib/ISpNotifySink.cs
Normal 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();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: a8f6204837b45824b8513ceb242f9ec1
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
32
Assets/Plugins/Windows/Interop.SpeechLib/ISpNotifySource.cs
Normal file
32
Assets/Plugins/Windows/Interop.SpeechLib/ISpNotifySource.cs
Normal 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();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: dc0e801e79d02c0419ef4ce756d894e8
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
77
Assets/Plugins/Windows/Interop.SpeechLib/ISpObjectToken.cs
Normal file
77
Assets/Plugins/Windows/Interop.SpeechLib/ISpObjectToken.cs
Normal 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);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 9dbe636fbecc6d246ac06f0111e1b644
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
@@ -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);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 15623e252a155a848a97cf37f60268e8
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
@@ -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);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: d029aee7bdb974547abcc71e4b1d5c0e
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
49
Assets/Plugins/Windows/Interop.SpeechLib/ISpStreamFormat.cs
Normal file
49
Assets/Plugins/Windows/Interop.SpeechLib/ISpStreamFormat.cs
Normal 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);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 3757bf8ef8a3f324896a9d3712a52c0d
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
117
Assets/Plugins/Windows/Interop.SpeechLib/ISpVoice.cs
Normal file
117
Assets/Plugins/Windows/Interop.SpeechLib/ISpVoice.cs
Normal 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);
|
||||||
|
}
|
||||||
|
}
|
||||||
11
Assets/Plugins/Windows/Interop.SpeechLib/ISpVoice.cs.meta
Normal file
11
Assets/Plugins/Windows/Interop.SpeechLib/ISpVoice.cs.meta
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 272a8c831aaf44a4d94da0a8f2f29199
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
@@ -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);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 0121f963d2ad3124f93d8b901dea2ef2
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
@@ -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);
|
||||||
|
}
|
||||||
|
}
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user