Reply
Thread Tools
shep's Avatar
Posts: 85 | Thanked: 65 times | Joined on Jan 2010 @ Ireland
#1
Hi All y'all,

I'd like to use espeak to announce things in my app, but I dunno how to go about calling it from QT?

I have looked through the QT APIs and I cannot see something that allows interaction with the command line, but I imagine I'm way wrong !

Any ideas?

Shep
__________________
- Hey! I also do other stuff Touchscreen apps for Windows and Android
- Currently developing a Diet Assistant/Weight Tracker for the N900
 
Posts: 432 | Thanked: 645 times | Joined on Mar 2009
#2
Hi,

haven't used it by myself, but I think QProcess is what you are looking for.

Daniel
 

The Following User Says Thank You to danielwilms For This Useful Post:
shep's Avatar
Posts: 85 | Thanked: 65 times | Joined on Jan 2010 @ Ireland
#3
Originally Posted by danielwilms View Post
Hi,

haven't used it by myself, but I think QProcess is what you are looking for.

Daniel
Thanks Daniel,

I meant to update this thread today.

I tried system("espeak 'Hello shep'") and that seemed to work. I don't know how though!

Shep
__________________
- Hey! I also do other stuff Touchscreen apps for Windows and Android
- Currently developing a Diet Assistant/Weight Tracker for the N900
 
krk969's Avatar
Posts: 754 | Thanked: 630 times | Joined on Sep 2009 @ London
#4
Originally Posted by shep View Post
Thanks Daniel,

I meant to update this thread today.

I tried system("espeak 'Hello shep'") and that seemed to work. I don't know how though!

Shep
QProcess is far more advanced than the system() call.
You could make use of the various signals that QProcess generate and also fork a process etc.
If all you want to do is execute a script and wait till it finished you can use the C++ system() function and you should be fine.
__________________
Developer of :
Buddy - budget/expense manager ( website )
Showtime - a telly channel listing viewer/reminder ( website )
Travelapp - london underground status/planner ( website )
Batlevel - desktop widget for battery level ( website )

“I hear and I forget. I see and I remember. I do and I understand.”
 

The Following 2 Users Say Thank You to krk969 For This Useful Post:
shep's Avatar
Posts: 85 | Thanked: 65 times | Joined on Jan 2010 @ Ireland
#5
Originally Posted by krk969 View Post
QProcess is far more advanced than the system() call.
You could make use of the various signals that QProcess generate and also fork a process etc.
If all you want to do is execute a script and wait till it finished you can use the C++ system() function and you should be fine.
Actually - system suits my purpose in this case then

I'd love to see an example of how to call QProcess and activate ESpeak via the command line. I did try last night, but couldn't follow the docs....and when system() worked so easily I have to admit I didn't pursue it any further.

Shep
__________________
- Hey! I also do other stuff Touchscreen apps for Windows and Android
- Currently developing a Diet Assistant/Weight Tracker for the N900
 
bingomion's Avatar
Posts: 528 | Thanked: 345 times | Joined on Aug 2010 @ MLB.AU
#6
is there a build of xsel.. i want to pipe selected text to espeak
 
Reply


 
Forum Jump


All times are GMT. The time now is 14:38.