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);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: b47a20305f9457d4a9178de9ed11508a
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
64
Assets/Plugins/Windows/Interop.SpeechLib/ISpeechDataKey.cs
Normal file
64
Assets/Plugins/Windows/Interop.SpeechLib/ISpeechDataKey.cs
Normal 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);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 67d9e05beeee4594688ea5fff1341d30
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
@@ -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);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 84b08e94b540c8a40afbd504abc37d04
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
@@ -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 = "");
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: a15899cbf650cfa42944fa16c069356b
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
@@ -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();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: c5ce0623475562e41ac3b4d14e26e163
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
183
Assets/Plugins/Windows/Interop.SpeechLib/ISpeechVoice.cs
Normal file
183
Assets/Plugins/Windows/Interop.SpeechLib/ISpeechVoice.cs
Normal 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);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 15960ad47dd69ef478bdfa217dc3838c
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
@@ -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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 11c572347fde7834d928165b3d458190
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
@@ -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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 16611605854765a4db58ea3fec7cb71e
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
@@ -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
|
||||||
|
}
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 1e0937e40dadba24a97b7342c4559580
|
||||||
|
AssemblyDefinitionImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
@@ -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
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 217ea5e808aeb3548bb7c5d3bed0e08d
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
21
Assets/Plugins/Windows/Interop.SpeechLib/SPEVENT.cs
Normal file
21
Assets/Plugins/Windows/Interop.SpeechLib/SPEVENT.cs
Normal 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;
|
||||||
|
}
|
||||||
|
}
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user