Value does not fall within the expected range

Voices aren't working properly?

Value does not fall within the expected range

Postby drc » Wed Nov 28, 2012 9:07 pm

I'm using Cepstral David in an ASP.NET application via SpeechLib. I'm getting an error that states, "Value does not fall within the expected range."

Code: Select all
                SpMemoryStream speechStream = new SpMemoryStreamClass();
                SpVoice voice = new SpVoice();

                ISpeechObjectTokens tokens = voice.GetVoices("Name=Cepstral David");
                if (tokens.Count != 1)
                {
                    throw new Exception("Failed to find Cepstral David voice");
                }
                voice.Voice = tokens.Item(0);

                // Tell the voice events will be handled by calling WaitForNotifyEvent
                ISpEventSource eventSource = (ISpEventSource)voice;
                eventSource.SetNotifyWin32Event();
                voice.EventInterests = SpeechVoiceEvents.SVEWordBoundary | SpeechVoiceEvents.SVEEndInputStream | SpeechVoiceEvents.SVEBookmark;

                // Set the stream on the SpVoice object
                voice.AudioOutputStream = (ISpeechBaseStream)speechStream;

                // Speak
                voice.Speak(ttsMapper.TtsString, SpeechVoiceSpeakFlags.SVSFlagsAsync | SpeechVoiceSpeakFlags.SVSFIsXML);


The exception is being thrown from the call to Speak. It consistently fails on Windows Server 2003 when running in an ASP.NET application. My same application is working on Windows 7 (in IIS 7), and the same code also works fine in a desktop application on both Windows 2003 and Windows 7. I've tried the default voice built into Windows and it works fine in every scenario.

Any ideas? I found a 4 year old thread with someone else complaining about the same problem, but there was no resolution.
drc
 
Posts: 1
Joined: Wed Nov 28, 2012 8:59 pm

Re: Value does not fall within the expected range

Postby AdamW » Thu Nov 29, 2012 4:55 pm

Yeah, this bug definitely seems to go back a ways. After an hour or so of hunting around through previous engineers emails, I am pretty confident that none of them ever took up the issue, much less provided a fix.

I will add it to the current bug list and welcome any feedback from the community if they have a work around.

AdamW
Cepstral Support
User avatar
AdamW
Administrator
 
Posts: 19
Joined: Tue Oct 11, 2011 10:16 am


Return to Troubleshooting

Who is online

Users browsing this forum: No registered users and 9 guests

cron