discontinuedtv / botbrown

Twitch Bot, named after Doc Brown from Back to the Future, that reacts to emotes and plays sound files
MIT License
4 stars 0 forks source link

InvalidCastException during TTS Speak #2

Closed discontinuedtv closed 4 years ago

discontinuedtv commented 4 years ago

System.InvalidCastException HResult=0x80004002 Nachricht = Das COM-Objekt des Typs "System.__ComObject" kann nicht in den Schnittstellentyp "NAudio.CoreAudioApi.Interfaces.IMMDevice" umgewandelt werden. Dieser Vorgang konnte nicht durchgeführt werden, da der QueryInterface-Aufruf an die COM-Komponente für die Schnittstelle mit der IID "{D666063F-1587-4E43-81F1-B948E807363F}" aufgrund des folgenden Fehlers nicht durchgeführt werden konnte: Schnittstelle nicht unterstützt (Ausnahme von HRESULT: 0x80004002 (E_NOINTERFACE)). Quelle = mscorlib Stapelüberwachung: bei System.StubHelpers.StubHelpers.GetCOMIPFromRCW(Object objSrc, IntPtr pCPCMD, IntPtr& ppTarget, Boolean& pfNeedsRelease) bei NAudio.CoreAudioApi.Interfaces.IMMDevice.Activate(Guid& id, ClsCtx clsCtx, IntPtr activationParams, Object& interfacePointer) bei NAudio.CoreAudioApi.MMDevice.GetAudioClient() bei NAudio.Wave.WasapiOut..ctor(MMDevice device, AudioClientShareMode shareMode, Boolean useEventSync, Int32 latency) bei BotBrown.Workers.TextToSpeech.TextToSpeechProcessor.Speak(String message) in E:\DiscontinuedCoding\botbrown\BotBrownCore\Workers\TextToSpeech\TextToSpeechProcessor.cs: Zeile83

The selected audio device is VB-Audio VoiceMeeter VAIO.

discontinuedtv commented 4 years ago

Fixed with e2856c36ed22621a7f5ba47ace527bb08c8499d1