Text To Speech in Robot

studio
i_parked

#1

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
#2

Wow!. Nice one @vvaidya… Thanks


#3

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

System.DirectoryServices.AccountManagement.UserPrincipal.Current.DisplayName


#4

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


#5

Did you import the namespace from imports section?

image

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

Speed -10 to 10
Volume - 0-100

image


#6

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


#7

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

image


#8

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


#9

@vvaidya @Santosh_Chhotaray but in xaml exactly where??


#10

I have the same question. Where in the XAML?


#11

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


#12

Can you please elaborate how to add namespaces manually


#13

How to add manually?


#14

Yes please share


#15

Main (3).xaml (13.9 KB)

:slight_smile:


#16

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


#17

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.


#18

have you got the solution ?


#19

Yup. thanks buddy @abhay:smiley: