I’m just trying figure out with Text to Speech C++ in Visual Studio 2015 on Windows 10 using Speech Synthesizer object from this lesson https://youtu.be/YWRvd2j0HXY
It works as given application and I want use it for Windows GUI too, but in this case my question is how to use it in different code without interface textbox, but just read text from variable value etc., because I can’t understand how to use it this way from given code. Some working examples, links of advice on this direction would be very helpful
Also I'm interested, if it possible to change male voice on female
Hello, thank you for feedback, yes works this way, but two thing unclear, first how to read string from variable with changing value, for example if I have variable, which takes random words from text document? and how to call this tool in cpp document, because now it is in MyForm.h?
Let's say you have a file called words.txt
You can read it into an array with File::ReadAllLines() and then you pass a word from the array to the SpeechSynthesizer
Seems I'm doing something wrong, everything is undefined, usingnamespace System::Speech::Synthesis; shows: "name followed by '::' must be class of namespace name", SpeechSynthesizer^ synth = gcnew SpeechSynthesizer(); shows: "identifer "SpeechSynthesizer" is undefined" and "expected a 'a'", so what I have to do to fix this errors
Yes problem was with References / System.Speech now works but I'm still can't figure out how to get string from variable, here is new question http://www.cplusplus.com/forum/beginner/195555/