Text To Speech in Robot



Just a sample,may be helpful for attended robots.Make sure you have System.Speech.dll in below folder(Writeline).

Write Line - System.Runtime.InteropServices.RuntimeEnvironment.GetRuntimeDirectory()

VoiceRobot.xaml (5.6 KB)

Example :

status.xlsx (9.5 KB)
RealTimeSample.xaml (21.5 KB)

Speech Recognition Robot
Voice to text
Beep sound Example

Wow!. Nice one @vvaidya… Thanks


If you want the speaker to spell out the User Name using the Robot, you can use below.



Hi @vvaidya,
I have downloaded System.Speech dll and kept inside this “C:\Windows\Microsoft.NET\Framework\v4.0.30319” path, but when i am trying to browse for the System.Speech.Synthesis.SpeechSynthesizer i am not able to get that type. Could you please let me know how to get variable type of SpeechSynthesizer


Did you import the namespace from imports section?


This is a rudimentary custom activity if you want to use.

Speed -10 to 10
Volume - 0-100



@vvaidya I didn’t imported but when i tried to import its not displaying anything . Please let me know how to import.


Please add this manually to your xaml (open in note pad) and try again.



@vvaidya Thanks after adding manually its working fine. Thanks a lot :slight_smile: .


@vvaidya @Santosh_Chhotaray but in xaml exactly where??


I have the same question. Where in the XAML?


@Rajiv_Mulchandani hello i build program that can read all your txt file also you can set the voice.if u need then i can share.


Can you please elaborate how to add namespaces manually


How to add manually?


Yes please share


Main (3).xaml (13.9 KB)



Thanks Abhay, but still for assigning variable synth=New System.Speech.Synthesis.SpeechSynthesizer(). we require speechsynthesizer as data type which i’m not getting.PNG


Ok got it, as mentioned by @vvaidya open your main xaml file (with notepad++) which contains speechsythesizer variable. Add line shown in imageCapture
inside <sco:Collection x:TypeArguments=“AssemblyReference”>. Then you will get variable type as speechsynthesizer.


have you got the solution ?


Yup. thanks buddy @abhay:smiley: