Need help incorporating tts into a c++ program

https://www.codeproject.com/Articles/17897/audio-ostream-A-Text-to-Speech-ostream

I'm following the above given tutorial to incorporate tts into a c++ program.
I don't know how to link the header files which are downloadable from the link and I have absolutely no idea what to do with the boost and sdk....please help. Using Windows and codeblocks.
Installing Boost on Windows is a pain. I’m writing this off the top of my head, so you will probably have to poke around a bit to get it right.

Boost

(1) Download and unzip the boost libraries somewhere useful. I personally consider this to be temporary, but there is a lot of work to cleaning things up properly, so for your purposes you might as well consider this a permanent location for it. Choose wisely.

(2) Google and download the bjam executable. Stick it somewhere in your PATH or in the proper place in the boost directory tree you just unzipped.

(3) Run configuration. Avoid anything weird: let boost choose target directories and options and the like.

(4) Compile. Go to the store and get yourself a donut and a coffee or something.

(5) You can delete all the temporary stuff (object files and the like) in boost/build.

(6) Go to your C::B compiler settings and add the directory with all the boost .dll and .lib/.a files to it to your compiler’s library path. (I’m pretty sure its ~boost/bin, but not positive.)

(7) Same kind of thing for the include path. Update your compiler’s include directory search to include ~boost/include.

So, you should be ready to use boost.

When you compile, you must add the correct .dll/.lib library name to your project link options. For example, if you use the filesystem, make sure to link with the libboost_filesystem and libboost_system libraries.

I personally am not interested in debug versions of the boost libraries (I don’t need to spend time debugging boost stuff), so I typically cull all those variations out of the .dll/.lib/.a files. There is a README in with the boost directory explaining all the various letters and stuff added to library names to indicate what variation they represent. You will have to be explicit when referencing them.

(Also personally, I tend to split them into type and rename them to the simple name so that I can compile by, say, static linkage instead of dynamic linkage, just by changing the library path.)


I know nothing about the TTS you are using (and I don’t care to ATM, sorry), but you will have a similar thing to do to install it.

(1) Download and unzip somewhere nice.
(2) Configure and compile. Depending on the library, you may need MSYS2 to help with the Unix-y stuff.
(3) Add the directory with all the .dll/.lib/.a files to your library path in the C::B project options. Add the directory for headers to your project options. Add the necessary .dll/.lib file name to your project link options.
(4) Compile your program.


There is, unfortunately, a fairly unfriendly learning curve to all this. The best way is to jump in and do your best, and make sure to have something else to keep you happy until it works. Tutorials on Google abound, specifically if you google something like "Code Blocks add a library".

Hope this helps.
Topic archived. No new replies allowed.