|
This project works, provided you pay attention to the namespace, and you install System.Speech through Nuget.
Then you just have cosmetics to look at.
It is then remarkably simple, and probably few people would have discovered Speech without this article.
A further progress could be to be able to pronounce the question mark, at least in French.
|
|
|
|
|
Hello,
You are right. But we have to import the Microsoft Cognitive Services Speech SDK via NuGet. And then we need a key from Azure otherwise we can't use this services.It's no open source anymore and that's regretable.
The speech facilities from System.Speech Synthesis namespace are not available in the newer versions of .Net Core en .Net 5/6/7.
The solutions that are recommended from different sources is to use the Microsoft Cognitive services from Azure(because we need a key in c# code).If we want to use c#-code from c# 8.0 we can't use System.Speech Synthesis.And for using for example the new switch expressions in c#-code we have the use c# 8.0.
Are there other possibilities to use speech facilities(open source libraries), having the possibility of using different languages??(other than Azure...)
Johan Blanckaert
|
|
|
|
|
Can we program other languages in the application (ex; Dutch,...)
Can you give some advice for the code to implement other languages.
Thanks
Johan Blanckaert
|
|
|
|
|
Hello,
It speaks French, I did nothing special for it (note that the Windows narrator is installed, and speaks French).
Just one point, it does not notice a question mark.
modified 15hrs ago.
|
|
|
|
|
I'm not sure how I ended up here...probably because the article was marked as having been updated yesterday.
In any case, the speech engine this relies on is now very, very old. The text-to-speech engine built into Edge (the Read Aloud function) is leaps and bounds better than that, and I've been reliably informed it's a completely different library that has nothing to do with this one.
It's not clear to me however whether this newer engine has a public API. It would be interesting to know if it does, and how to use it. I get the impression MS has really only developed it to work with their browser, but surely there's gotta be some reusable interface hiding somewhere in there.
If that sort of thing still interests you, it might be worth trying to dig this up and putting together an article that demonstrates its use.
|
|
|
|
|
|
Don't let em get you down.
This was a great tip for beginners, it was short, sweet and to the point, and we appreciate it.
Just a note to the complainers: Thoughtless negativity can discourage people from ever writing articles. I was helped by this one, and I'm sure I'm not the only one. If the info is wrong, that's one thing, but if you don't like an article, or think it's too basic, then write a better one and add to the knowledge base. No need to harp on a guy for writing a simple little quickie. We could all use a simple little quickie now and then!
|
|
|
|
|
|
Thanks for this Statement
Bruno
modified 19-Jan-21 21:04pm.
|
|
|
|
|
Besides, the SpeechSynthesizer class implements the IDisposable interface, so this works a treat:
private void btnSpeak_Click(object sender, EventArgs e)
{
using (SpeechSynthesizer synthesizer = new SpeechSynthesizer())
{
synthesizer.Speak(this.txtWords.Text);
}
}
|
|
|
|
|
Agreed. Thanks for the feedback.
For this tip, your use of the using statement is preferred and will dispose of it after speaking. The sample in the tip was cut out from a small program switching between SpeechSynthesizer and SpeechRecognition so that you could speak to your computer and have it speak a response.
|
|
|
|
|
regarding many similar topics in CP about SpeechSynthesizer
this tip add nothing
|
|
|
|
|
Given I hadn't seen this used before, it taught me a lot in very few words.
Thanks
|
|
|
|
|
|
I received a mail from CodeProject with this project in headline article.
There are very few chances I should have had a look to speech synthesis otherwise, or I should have waited to be in the middle of a big project where time misses.
|
|
|
|
|
|
http://msdn.microsoft.com/en-us/library/ms586901(v=vs.110).aspx
Copying a sample from MSDN is not giving a tip.
|
|
|
|
|
Nice
|
|
|
|
|
Just a tip, just Basic, just short enough to give it a Trial
modified 19-Jan-21 21:04pm.
|
|
|
|
|
Thanks!
|
|
|
|
|
I think this was solid introduction to System.Speech which I didn't even know existed.
You appropriately marked the article as a tip and I appreciate that. Also 1 for providing the using statements. Very important since I didn't know this was in the .NET library.
|
|
|
|
|
Thanks!
We can write a "hello, world" that actually says "hello".
|
|
|
|
|
.. but I guess the Title should be, "Talking Com".
I like this concept of teaching the Speech API of Microsoft.
The sh*t I complain about
It's like there ain't a cloud in the sky and it's raining out - Eminem
~! Firewall !~
|
|
|
|
|
|
- Properties beginning with underscore are typically private
- Typical indentation is four characters
- Hungarian notation makes my skin crawl
|
|
|
|