2013-04-24 14:52:04 +00:00
|
|
|
#ifndef __SPEECHCLIENT_HH_INCLUDED__
|
|
|
|
#define __SPEECHCLIENT_HH_INCLUDED__
|
|
|
|
|
|
|
|
#include <QObject>
|
|
|
|
|
|
|
|
class SpeechClient: public QObject
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
|
|
|
struct Engine
|
|
|
|
{
|
|
|
|
QString id;
|
|
|
|
QString name;
|
|
|
|
};
|
|
|
|
|
|
|
|
typedef QList<Engine> Engines;
|
|
|
|
|
|
|
|
SpeechClient( QString const & engineId, QObject * parent = 0L );
|
|
|
|
virtual ~SpeechClient();
|
|
|
|
|
|
|
|
static Engines availableEngines();
|
|
|
|
|
|
|
|
const Engine & engine() const;
|
2013-04-24 16:01:44 +00:00
|
|
|
bool tell( QString const & text );
|
|
|
|
bool say( QString const & text );
|
2013-04-24 14:52:04 +00:00
|
|
|
|
|
|
|
signals:
|
2013-04-24 16:01:44 +00:00
|
|
|
void started( bool ok );
|
2013-04-24 14:52:04 +00:00
|
|
|
void finished();
|
|
|
|
|
|
|
|
protected:
|
|
|
|
virtual void timerEvent( QTimerEvent * evt );
|
|
|
|
|
|
|
|
private:
|
|
|
|
struct InternalData;
|
|
|
|
InternalData * internalData;
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif // __SPEECHCLIENT_HH_INCLUDED__
|