PDA

View Full Version : Add text to voice to my applications ... qtspeech



Dodeca
24th December 2014, 16:34
Hello ALL ...

I am still wanting to get qtspeech working on my desktop.

If anyone reading has got "that" working ... and willing to share / help ...

would be nice :)

Please note ... I am tired of people on this fourm sprouting anything but help ... like ... "JUST READ THE DIRECTION ... IT'S SO SIMPLE"

If I could understand it ... I would not be here... right?

d_stranz
24th December 2014, 19:37
You should also please note, people on this forum almost always say "Go read the manual" in response to an open-ended question that doesn't indicate you've actually tried anything. We are all as busy as you are, writing our own code, and don't have the time to write your code in addition.

If you have tried and failed, then rephrasing your question as, "I've tried the following, but I can't seem to get it to work. It doesn't do X as I expected, it does Y (or nothing) instead. Can anyone point out where the error in this code might be?".

Dodeca
25th December 2014, 14:38
I have been trying and failing for over a year. I am looking for someone who GOT IT WORKING. And willing to share that path.

ars
25th December 2014, 19:16
So here's a quick tour on the way I got the QtSpeech example working on OpenSuse 13.2 virtual machine.

1. Read the QtSpeech installation guide
For Linux it states using "Festival" for the speech processing. The installation guide also suggests to execute a script get-festival.sh, that downloads festival and tries to compile it. This step didn't work in my environment (compile errors in festival compilation), so I decided to skip that step and instead installed Festival from the software repository. Note that you have to install both Festival (the binaries) and the developers package (includes and libraries).
2. I tried running Festival from the command line.
This gave me error messages of the form "cannot access /dev/dsp". Searching the Festival documentation I found a hint to create a .festivalrc file in my home folder (Seehttp://https://wiki.archlinux.org/index.php/Festival#Usage_with_a_Sound_Server) Now festival worked.
3. Build static library for QtSpeech
Run qmake QtSpeech-static and then make. It compiles with some warnings, but it succeeds.
4. For testing go to the test folder
Run qmake in this folder. This gives you a makefile. I edited this file a little bit removing all library paths pointing to the private festival builds (note that I did not follow that recommendation). Instead, I took the libraries from the default /usr/lib64 folder. In addition to the libraries already mentioned I had to add -ltermcap to the linked libraries (I had to install this before from the OpenSuse software repositories).
5. After successful linking I could run the application and it gave some output (a little bit hard to understand. That may be different for Windows or Mac.)

Maybe that gives you some hints for solving your problems.

d_stranz
25th December 2014, 19:46
I am looking for someone who GOT IT WORKING.

OK, because today is Christmas and I have nothing better to do, I got QtSpeech working on my Windows box, using Visual Studio 2008.


And willing to share that path.

- Downloaded and "installed" QtSpeech from the link to GIT here (http://lynxline.com/projects/qtspeech/).
- Downloaded and installed Microsoft Speech Platform SDK Runtime 11 from here (http://www.microsoft.com/en-us/download/details.aspx?id=27226). (For linux, it looks like you need festival, which you can get here (http://www.festvox.org/festival/))
- Edited the win32 section of QtSpeech.pri to add the paths to the MS Speech SDK include and lib files (on my PC, these are not the same as the paths in the .pri file)
- Also added "DEFINES += QT_DLL" to the win32 section of QtSpeech.pri
- Moved test.pro and test.cpp from the test subdirectory up into the main QtSpeech directory (because of errors caused by the .pri file included by test.pro)
- Edited the test.pro copy to correct the path to QtSpeech.pri
- Ran Visual Studio and opened QtSpeech-dll.pro using the Qt Add-in
- Built it.
- Opened the test.pro copy using the Qt Add-in
- Built it.
- Ran it. Listened to Microsoft Anna say "Hello World" twice.

Tried to do this using Qt Creator, but since I never use it I could not figure out how to get around some of the linker errors (inconsistent DLL linkage). Probably I misconfigured something when I loaded the project for the first time and it stuck.


I have been trying and failing for over a year.

Total elapsed time, including the unsuccessful struggle with Qt Creator, maybe 1 hour.

Dodeca
30th December 2014, 05:37
Thanks for the advice ... you all!

It seems it can be done ... that is hopeful.

I will continue to check back and muster enough courage to "try it again" ... on my LINUX machine ( mint 13 64 )

again ... thanks