LoafOrc / VoiceRecognitionAPI

Loads Windows Speech recognition into Lethal Company and provides a dev-friendly way of using it.
GNU General Public License v3.0
6 stars 1 forks source link

Dependency and NullReferenceException problems #2

Closed NilaierMusic closed 10 months ago

NilaierMusic commented 10 months ago

Either ShipVoiceCommands 1.0.0 or VoiceRecognitionAPI 1.0.0 have a couple of problems that cause errors which doesn't allow any of them to load properly.

[Message:   BepInEx] BepInEx 5.4.22.0 - Lethal Company (12/24/2023 2:17:05 PM)
[Info   :   BepInEx] Running under Unity v2022.3.9.15351836
[Info   :   BepInEx] CLR runtime version: 4.0.30319.42000
[Info   :   BepInEx] Supports SRE: True
[Info   :   BepInEx] System platform: Bits64, Windows
[Message:   BepInEx] Preloader started
[Info   :   BepInEx] Loaded 1 patcher method from [BepInEx.Preloader 5.4.22.0]
[Info   :   BepInEx] 1 patcher plugin loaded
[Info   :   BepInEx] Patching [UnityEngine.CoreModule] with [BepInEx.Chainloader]
[Message:   BepInEx] Preloader finished
[Message:   BepInEx] Chainloader ready
[Message:   BepInEx] Chainloader started
[Info   :   BepInEx] 2 plugins to load
[Error  :   BepInEx] Could not load [ShipVoiceCommands 1.0.0] because it has missing dependencies: me.loaforc.voicewrapperapi
[Info   :   BepInEx] Loading [VoiceRecognitionAPI 1.0.0]
[Info   :me.loaforc.voicerecognitionapi] Patching game...
[Info   :me.loaforc.voicerecognitionapi] VoiceRecognitionAPI:1.0.0 has succesfully loaded!
[Message:   BepInEx] Chainloader startup complete
[Info   : Unity Log] Changing gamma
[Info   : Unity Log] override float value: 1
[Info   : Unity Log] Overriding float
[Info   : Unity Log] Gamma changed
[Info   : Unity Log] Set gamma to new value: 1; (0.00, 0.00, 0.00, 1.00) (True)
[Info   : Unity Log] Saving changed settings
[Info   : Unity Log] Changing gamma
[Info   : Unity Log] override float value: 1
[Info   : Unity Log] Overriding float
[Info   : Unity Log] Gamma changed
[Info   : Unity Log] Set gamma to new value: 1; (0.00, 0.00, 0.00, 1.00) (True)
[Info   : Unity Log] Changing gamma
[Info   : Unity Log] override float value: 1
[Info   : Unity Log] Overriding float
[Info   : Unity Log] Gamma changed
[Info   : Unity Log] Set gamma to new value: 1; (0.00, 0.00, 0.00, 1.00) (True)
[Info   : Unity Log] Facepunch transport is disabled.
[Info   :me.loaforc.voicerecognitionapi] Setting up the recognition engine.
[Info   :me.loaforc.voicerecognitionapi] Importing System.Speech
[Info   :me.loaforc.voicerecognitionapi] Located at: VoiceRecognitionAPI.System.Speech.dll
[Info   :me.loaforc.voicerecognitionapi] Found file! Length: 692224
[Info   :me.loaforc.voicerecognitionapi] Loaded System.Speech, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
[Info   :me.loaforc.voicerecognitionapi] Phrases used for voice recognition: System.Collections.Generic.List`1[System.String]
[Info   :me.loaforc.voicerecognitionapi] Importing System.Speech.resources
[Info   :me.loaforc.voicerecognitionapi] Located at: VoiceRecognitionAPI.System.Speech.resources.dll
[Info   :me.loaforc.voicerecognitionapi] Importing System.Speech.resources, Version=3.0.0.0, Culture=en-US, PublicKeyToken=31bf3856ad364e35
[Info   :me.loaforc.voicerecognitionapi] Located at: VoiceRecognitionAPI.System.Speech.resources.dll
[Error  : Unity Log] NullReferenceException: Object reference not set to an instance of an object
Stack trace:
VoiceRecognitionAPI.Plugin+<>c.<Awake>b__9_0 (System.Object sender, System.ResolveEventArgs args) (at <bcd0be32eefa46d0a762f2ceb15459f3>:0)
System.AppDomain.DoAssemblyResolve (System.String name, System.Reflection.Assembly requestingAssembly, System.Boolean refonly) (at <787acc3c9a4c471ba7d971300105af24>:0)
System.AppDomain.LoadSatellite (System.Reflection.AssemblyName assemblyRef, System.Boolean throwOnError, System.Threading.StackCrawlMark& stackMark) (at <787acc3c9a4c471ba7d971300105af24>:0)
(wrapper remoting-invoke-with-check) System.AppDomain.LoadSatellite(System.Reflection.AssemblyName,bool,System.Threading.StackCrawlMark&)
System.Reflection.Assembly.InternalGetSatelliteAssembly (System.String name, System.Globalization.CultureInfo culture, System.Version version, System.Boolean throwOnFileNotFound, System.Threading.StackCrawlMark& stackMark) (at <787acc3c9a4c471ba7d971300105af24>:0)
System.Resources.ManifestBasedResourceGroveler.GetSatelliteAssembly (System.Globalization.CultureInfo lookForCulture, System.Threading.StackCrawlMark& stackMark) (at <787acc3c9a4c471ba7d971300105af24>:0)
System.Resources.ManifestBasedResourceGroveler.GrovelForResourceSet (System.Globalization.CultureInfo culture, System.Collections.Generic.Dictionary`2[TKey,TValue] localResourceSets, System.Boolean tryParents, System.Boolean createIfNotExists, System.Threading.StackCrawlMark& stackMark) (at <787acc3c9a4c471ba7d971300105af24>:0)
System.Resources.ResourceManager.InternalGetResourceSet (System.Globalization.CultureInfo requestedCulture, System.Boolean createIfNotExists, System.Boolean tryParents, System.Threading.StackCrawlMark& stackMark) (at <787acc3c9a4c471ba7d971300105af24>:0)
System.Resources.ResourceManager.InternalGetResourceSet (System.Globalization.CultureInfo culture, System.Boolean createIfNotExists, System.Boolean tryParents) (at <787acc3c9a4c471ba7d971300105af24>:0)
System.Resources.ResourceManager.GetString (System.String name, System.Globalization.CultureInfo culture) (at <787acc3c9a4c471ba7d971300105af24>:0)
System.Resources.ResourceManager.GetString (System.String name) (at <787acc3c9a4c471ba7d971300105af24>:0)
System.Speech.SR.Get (System.Speech.SRID id, System.Object[] args) (at <eabef287471f4e019f1d853d46365e9c>:0)
System.Speech.Internal.SrgsParser.XmlParser.ThrowSrgsException (System.Speech.SRID id, System.Object[] args) (at <eabef287471f4e019f1d853d46365e9c>:0)
System.Speech.Internal.SrgsCompiler.OneOf.System.Speech.Internal.SrgsParser.IElement.PostParse (System.Speech.Internal.SrgsParser.IElement parentElement) (at <eabef287471f4e019f1d853d46365e9c>:0)
System.Speech.Recognition.GrammarBuilder+InternalGrammarBuilder.CreateElement (System.Speech.Internal.SrgsParser.IElementFactory elementFactory, System.Speech.Internal.SrgsParser.IElement parent, System.Speech.Internal.SrgsParser.IRule rule, System.Speech.Internal.GrammarBuilding.IdentifierCollection ruleIds) (at <eabef287471f4e019f1d853d46365e9c>:0)
System.Speech.Recognition.GrammarBuilder.CreateGrammar (System.Speech.Internal.SrgsParser.IElementFactory elementFactory) (at <eabef287471f4e019f1d853d46365e9c>:0)
System.Speech.Recognition.GrammarBuilder.Compile (System.IO.Stream stream) (at <eabef287471f4e019f1d853d46365e9c>:0)
System.Speech.Recognition.Grammar.LoadCfg (System.Boolean isImportedGrammar, System.Boolean stgInit) (at <eabef287471f4e019f1d853d46365e9c>:0)
System.Speech.Recognition.Grammar.LoadAndCompileCfgData (System.Boolean isImportedGrammar, System.Boolean stgInit) (at <eabef287471f4e019f1d853d46365e9c>:0)
System.Speech.Recognition.Grammar.InitialGrammarLoad (System.String ruleName, System.Object[] parameters, System.Boolean isImportedGrammar) (at <eabef287471f4e019f1d853d46365e9c>:0)
System.Speech.Recognition.Grammar..ctor (System.Speech.Recognition.GrammarBuilder builder) (at <eabef287471f4e019f1d853d46365e9c>:0)
VoiceRecognitionAPI.SpeechHandler..ctor () (at <bcd0be32eefa46d0a762f2ceb15459f3>:0)
VoiceRecognitionAPI.Plugin.SetupEngine () (at <bcd0be32eefa46d0a762f2ceb15459f3>:0)
VoiceRecognitionAPI.Patches.GameNetworkManagerPatch.setupRecognitionEngine () (at <bcd0be32eefa46d0a762f2ceb15459f3>:0)
(wrapper dynamic-method) GameNetworkManager.DMD<GameNetworkManager::Start>(GameNetworkManager)
LoafOrc commented 10 months ago

Hey! Are you using the latest version of each? What language to do you have your Windows Speech Recognition set to?

NilaierMusic commented 10 months ago

At the time of posting this issue, i've used 1.0.0 version of each (since it was only available ones). This seems to be fixed with latest 1.4.0 and 1.0.2 versions, so i'm closing this issue. ApplicationFrameHost_zRcbfNgRmo