Last post May 03, 2013 04:22 PM by thirumaran007
May 03, 2013 03:24 PM|johnrichardosborne|LINK
I added the system.speech assembly to my web.comfig and now I get this error.
CS0246: The type or namespace name 'SpeechSynthesizer' could not be found (are you missing a using directive or an assembly reference?)
Line 2: string TestString1="Our move-in date 053198";
Line 4: SpeechSynthesizer synth = new SpeechSynthesizer();
May 03, 2013 03:31 PM|JasonAlm|LINK
You need to add a reference to it in your project so the assembly (dll) will be included in the project.
May 03, 2013 03:34 PM|thirumaran007|LINK
I think you are not properly included system.speech assembly in your solution , please have a look in to this below urls to getting started with system.speech
1. latest version of microsoft speech platform http://www.microsoft.com/en-us/download/details.aspx?id=14373
2. sample code http://msdn.microsoft.com/en-us/magazine/cc163663.aspx
May 03, 2013 03:42 PM|johnrichardosborne|LINK
I'm using Webmatrix so I added system.speech.dll to the folder bin. I get the same error so i guess I still do not know how to add a reference.
May 03, 2013 03:45 PM|johnrichardosborne|LINK
Thank you for the prompt response and links. I had previously read them and am using the code that I found there for this test. I am using Webmatrix. I added the system.speech assembly in web.config and I added system.speech.dll to the bin folder. I am
obviously missing something but need help finding it.
May 03, 2013 03:47 PM|thirumaran007|LINK
Right click your applicaiton and try add reference, browse the dll and click on add and try now.
May 03, 2013 03:49 PM|johnrichardosborne|LINK
"Add reference" is not an option in Webmatrix on right-click. I did use "Add Existing File" to add the dll.
May 03, 2013 04:07 PM|thirumaran007|LINK
Once you copy the file into bin folder did you write this code in CSHTML
May 03, 2013 04:17 PM|johnrichardosborne|LINK
Thank you. I added the using statement, verified that the dll is in the bin folder, and got a stranger error.
Compiler Error Message: CS0246: The type or namespace name 'system' could not be found (are you missing a using directive or an assembly reference?)
Line 1: @using system.speech
May 03, 2013 04:20 PM|johnrichardosborne|LINK
I needed capital S, i.e., using System.Speech;
May 03, 2013 04:22 PM|thirumaran007|LINK
S should be in capital letter