Fawkes API
Fawkes Development Version
synth_thread.h
1
2
/***************************************************************************
3
* synth_thread.h - Festival synthesis thread
4
*
5
* Created: Tue Oct 28 14:31:58 2008
6
* Copyright 2006-2008 Tim Niemueller [www.niemueller.de]
7
*
8
****************************************************************************/
9
10
/* This program is free software; you can redistribute it and/or modify
11
* it under the terms of the GNU General Public License as published by
12
* the Free Software Foundation; either version 2 of the License, or
13
* (at your option) any later version.
14
*
15
* This program is distributed in the hope that it will be useful,
16
* but WITHOUT ANY WARRANTY; without even the implied warranty of
17
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18
* GNU Library General Public License for more details.
19
*
20
* Read the full text in the LICENSE.GPL file in the doc directory.
21
*/
22
23
#ifndef _PLUGINS_FESTIVAL_SYNTH_THREAD_H_
24
#define _PLUGINS_FESTIVAL_SYNTH_THREAD_H_
25
26
#include <aspect/blackboard.h>
27
#include <aspect/blocked_timing.h>
28
#include <aspect/clock.h>
29
#include <aspect/configurable.h>
30
#include <aspect/logging.h>
31
#include <blackboard/interface_listener.h>
32
#include <core/threading/thread.h>
33
34
#include <string>
35
36
namespace
fawkes
{
37
class
SpeechSynthInterface;
38
}
39
40
class
FestivalSynthThread
:
public
fawkes::Thread
,
41
public
fawkes::LoggingAspect
,
42
public
fawkes::ConfigurableAspect
,
43
public
fawkes::ClockAspect
,
44
public
fawkes::BlackBoardAspect
,
45
public
fawkes::BlackBoardInterfaceListener
46
{
47
public
:
48
FestivalSynthThread
();
49
50
virtual
void
init
();
51
virtual
void
finalize
();
52
virtual
void
once
();
53
virtual
void
loop
();
54
55
void
say
(
const
char
*text);
56
virtual
bool
bb_interface_message_received
(
fawkes::Interface
*interface,
57
fawkes::Message
* message)
throw
();
58
59
/** Stub to see name in backtrace for easier debugging. @see Thread::run() */
60
protected
:
61
virtual
void
62
run
()
63
{
64
Thread::run();
65
}
66
67
private
:
68
fawkes::SpeechSynthInterface
*speechsynth_if_;
69
70
std::string cfg_voice_;
71
std::string cfg_extra_code_;
72
};
73
74
#endif
fawkes::Message
Definition:
message.h:40
FestivalSynthThread::loop
virtual void loop()
Code to execute in the thread.
Definition:
synth_thread.cpp:93
fawkes::BlackBoardInterfaceListener
Definition:
interface_listener.h:45
FestivalSynthThread::FestivalSynthThread
FestivalSynthThread()
Constructor.
Definition:
synth_thread.cpp:37
FestivalSynthThread::finalize
virtual void finalize()
Finalize the thread.
Definition:
synth_thread.cpp:85
FestivalSynthThread
Definition:
synth_thread.h:39
FestivalSynthThread::run
virtual void run()
Stub to see name in backtrace for easier debugging.
Definition:
synth_thread.h:61
fawkes::BlackBoardAspect
Definition:
blackboard.h:36
fawkes
fawkes::LoggingAspect
Definition:
logging.h:36
FestivalSynthThread::init
virtual void init()
Initialize the thread.
Definition:
synth_thread.cpp:44
fawkes::SpeechSynthInterface
Definition:
SpeechSynthInterface.h:37
fawkes::Interface
Definition:
interface.h:77
FestivalSynthThread::bb_interface_message_received
virtual bool bb_interface_message_received(fawkes::Interface *interface, fawkes::Message *message)
BlackBoard message received notification.
Definition:
synth_thread.cpp:114
FestivalSynthThread::say
void say(const char *text)
Say something.
Definition:
synth_thread.cpp:124
FestivalSynthThread::once
virtual void once()
Execute an action exactly once.
Definition:
synth_thread.cpp:64
fawkes::Thread
Definition:
thread.h:44
fawkes::ConfigurableAspect
Definition:
configurable.h:36
fawkes::ClockAspect
Definition:
clock.h:38
src
plugins
festival
synth_thread.h
Generated by
1.8.16