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)

9 Likes

Wow!. Nice one @vvaidya… Thanks

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

System.DirectoryServices.AccountManagement.UserPrincipal.Current.DisplayName

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?

image

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

https://www.myget.org/feed/uipath-community/package/nuget/TextToSpeechActivities

Speed -10 to 10
Volume - 0-100

image

@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.

image

1 Like

@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)

:slight_smile:

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:

1 Like

@abhay

am getting below error

Invoke method: Cannot set voice. No matching voice is installed or the voice was disabled.

what to do?