Speech recognition plugin Runtime Error: Unhandled Exception. What could possibly cause it?
- by manuel
I'm writing a plugin (dll file) for speech recognition, and I'm creating a WinForm as its interface/dialog.
When I run the plugin and click a button to start the initialization, I get an unhandled exception.
Below is the complete details of it.
See the end of this message for details on invoking just-in-time
(JIT) debugging instead of this dialog
box.
***** Exception Text ******* System.ArgumentException: Value does
not fall within the expected range.
at
System.Speech.Internal.SapiInterop.SapiProxy.MTAThread.Invoke2(VoidDelegate
pfn) at
System.Speech.Internal.SapiInterop.SapiRecognizer.SetInput(Object
input, Boolean allowFormatChanges)
at
System.Speech.Recognition.RecognizerBase.SetInputToDefaultAudioDevice()
at
System.Speech.Recognition.SpeechRecognitionEngine.SetInputToDefaultAudioDevice()
at gen_myplugin.Dialog.init() at
gen_myplugin.Dialog.btnSpeak_Click(Object sender, EventArgs e) at
System.Windows.Forms.Control.OnClick(EventArgs
e) at
System.Windows.Forms.Button.OnClick(EventArgs
e) at
System.Windows.Forms.Button.OnMouseUp(MouseEventArgs
mevent) at
System.Windows.Forms.Control.WmMouseUp(Message&
m, MouseButtons button, Int32 clicks)
at
System.Windows.Forms.Control.WndProc(Message&
m) at
System.Windows.Forms.ButtonBase.WndProc(Message&
m) at
System.Windows.Forms.Button.WndProc(Message&
m) at
System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message&
m) at
System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message&
m) at
System.Windows.Forms.NativeWindow.Callback(IntPtr
hWnd, Int32 msg, IntPtr wparam, IntPtr
lparam)
***** Loaded Assemblies ******* mscorlib
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.3603 (GDR.050727-3600)
CodeBase: file:///c:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
---------------------------------------- gen_speechquery
Assembly Version: 1.0.3755.878
Win32 Version:
CodeBase: file:///C:/Program%20Files/Winamp/Plugins/gen_speechquery.dll
---------------------------------------- msvcm90
Assembly Version: 9.0.30729.1
Win32 Version: 9.00.30729.1
CodeBase: file:///C:/WINDOWS/WinSxS/x86_Microsoft.VC90.CRT_1fc8b3b9a1e18e3b_9.0.30729.1_x-ww_6f74963e/msvcm90.dll
---------------------------------------- System.Windows.Forms
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
---------------------------------------- System
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
---------------------------------------- System.Drawing
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
---------------------------------------- System.Speech
Assembly Version: 3.0.0.0
Win32 Version: 3.0.6920.1109 (lh_tools_devdiv_wpf.071009-1109)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Speech/3.0.0.0__31bf3856ad364e35/System.Speech.dll
***** JIT Debugging ******* To enable just-in-time (JIT) debugging, the .config file for
this application or computer
(machine.config) must have the
jitDebugging value set in the
system.windows.forms section. The
application must also be compiled with
debugging enabled.
For example:
When JIT debugging is enabled, any
unhandled exception will be sent to
the JIT debugger registered on the
computer rather than be handled by
this dialog box.