Text to speech Male Female voice

We build text to speech converter and its work perfectly, but we want voice selection like male and female. by default it takes male voice but we want female voice also. we try this vb.net code but it gives error like “voice gender is not declare”
synth.SelectVoiceByHints(VoiceGender.Male)
synth.SelectVoiceByHints(VoiceGender.Female)

Hi @abhay
do check the sample below i have attached to test female Voice
Voice_test.xaml (6.2 KB)

For Each  Item1 As System.Speech.Synthesis.InstalledVoice  In reader.GetInstalledVoices
		System.Windows.MessageBox.Show(Item1.VoiceInfo.Name)
		Console.WriteLine(Item1.VoiceInfo.Name)
		Next

the above loop is to check how many voice does the System is Configured of in my case i have the following

  1. Microsoft David Desktop:-Male
  2. Microsoft Zira Desktop:-Female

:slight_smile:
Regards
Sanjay Shankhla

thanks @sanjay21051990
error

But when i open your file in UiPath its give me error

hi @Abhay,
which version are you using? the code runs on the ui path 2017.1.6522

@sanjay21051990 18.2.3.0

hi use the below code
Try
Dim reader As System.Speech.Synthesis.SpeechSynthesizer=Nothing
reader=New System.Speech.Synthesis.SpeechSynthesizer()
reader.Dispose()
reader=New System.Speech.Synthesis.SpeechSynthesizer()
reader.SelectVoice(“Microsoft Zira Desktop”)
reader.SetOutputToDefaultAudioDevice
reader.Speak(“HELLO”)
For Each Item1 As System.Speech.Synthesis.InstalledVoice In reader.GetInstalledVoices
System.Windows.MessageBox.Show(Item1.VoiceInfo.Name)
Console.WriteLine(Item1.VoiceInfo.Name)
Next

Catch es As System.Exception
System.Windows.MessageBox.Show(es.Message)
End Try

@sanjay21051990
Main.xaml (8.4 KB)

How can i implement your code in my project, please check if condition

hi @abhay Do you have any invoke Code Activity in you version…just paste the code and run…
that would be more efficient way

@sanjay21051990 in my project i am not using any invoke activity

hi @abhay, then may be you can go for it

thanks @sanjay21051990 i’ll try this

Main.xaml (8.4 KB)

Please check the above project.Its not working,we want robot to read selected file in female voice.

hi,
@abhay,
Is this wat you looking for
Main (3).xaml (12.7 KB)

Tested working :+1:

1 Like

@sanjay21051990 thank you sir its working properly as i want.

How can I change what the robot says by a text that I enter?

@Jorge_Luis_Sanchez Can you please refer the below xaml file

Hopeit helps!!!

Thankq
Aman SheikSpeech Synthesizer.zip (3.6 KB)

I could not prove it, I seem to have problems with the version of uipath I am using, which is Studio 2018.3.2 - 10/30/2018, since I already migrated all my projects, I do not want to go back to an earlier version. Will there be another way? @aman_sheik

Hello @aman_sheik,

This was helpful.
Have you tried converting Speech to text in uipath?
If so, kindly share the workflow.

Thank you!
Anusha

Hi @Anusha_Makam

Can you please refer this https://go.uipath.com/question/voice-enabled-rpa-ai-70532#

For this you need to create a service account in GCP i.e., Good Cloud Platform. Here iam mentioning the link

Hope this helps!!

Thankq
Aman Sheik

Hello @aman_sheik,

Thank you for the suggestion.
I have already tried that , but now i wanted to try other ways of doing the same. I have a python executable code and i dont understand how to send audio as an input to microphone. Is there any activity that integrates it to uipath to feed in voice input after my code is executed?

Thank you,
Anusha