Click here to Skip to main content
15,884,472 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I am trying to create a simple text-to-speech application using C# and `System.Speech.Synthesis`. The issue is that I want this application to work with the Greek language. So what I attempted to do is this:

C#
SpeechSynthesizer synthesizer = new SpeechSynthesizer
    {
    Volume = 100,
    Rate = -2
    };
    
    synthesizer.SpeakAsync("Γειά σου κόσμε!");


Of course this does not work, since the result of this code is that the voice pronounces every letter individually.

What I have tried:

After a lot of googling, I tried to install and use espeak and the Greek voice that comes with it like this:

C#
synthesizer.SelectVoice("eSpeak-el-gr");


The result was exactly the same - the voice said every letter individually, and not the whole word. Is there a way to fix this issue, so that `SpeechSynthesizer` will say all the Greek words and not just the letters of them ?
Posted
Updated 2-Jan-23 20:54pm
Comments
Richard MacCutchan 15-Mar-19 8:02am    
Afzaal Ahmad Zeeshan 15-Mar-19 9:16am    
Also, apart from what Richard said, also check what locale you are configuring for speech synthesizer. It might be a problem with the locale.

1 solution

I had the a similar issue where a string was read perfectly but an concatenated string read from a file was spelled out.
The issue here was Character Encoding.
Forcing the file to be read as Unicode in stead of UTF8 fixed the issue for me.
So make sure or check the encoding used to send text to SpeechSynthesizer.

I hope this helps any Googler out there.
 
Share this answer
 
Comments
Graeme_Grant 3-Jan-23 3:05am    
You know that this is a 3+-year-old question, right?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900