cisst-saw
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
mtsTextToSpeech.h
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /* ex: set filetype=cpp softtabstop=4 shiftwidth=4 tabstop=4 cindent expandtab: */
3 
4 /*
5  Author(s): Anton Deguet
6  Created on: 2013-05-15
7 
8  (C) Copyright 2013-2014 Johns Hopkins University (JHU), All Rights Reserved.
9 
10 --- begin cisst license - do not edit ---
11 
12 This software is provided "as is" under an open source license, with
13 no warranty. The complete license can be found in license.txt and
14 http://www.cisst.org/cisst/license.txt.
15 
16 --- end cisst license ---
17 */
18 
19 #ifndef _mtsTextToSpeech_h
20 #define _mtsTextToSpeech_h
21 
25 #include <sawTextToSpeech/sawTextToSpeechRevision.h>
26 
27 // Always include last
29 
30 // forward declaration for class containing members specific to each
31 // OS/TTS package used
32 class mtsTextToSpeechInternal;
33 
52 {
53  // declare services, requires dynamic creation
55  public:
56  mtsTextToSpeech(void);
57  ~mtsTextToSpeech(void);
58  inline void Configure(const std::string & CMN_UNUSED(filename) = "") {};
59  void Startup(void);
60  void Run(void);
61  void Cleanup(void);
62 
66  void AddInterfaceRequiredForEventString(const std::string & interfaceName, const std::string & eventName);
67 
71  void AddInterfaceRequiredForEventCharacter(const std::string & interfaceName, const std::string & eventName);
72 
76  void AddInterfaceRequiredForEventButton(const std::string & interfaceName);
77 
81  void SetPreemptive(const bool & preemptive);
82 
83  protected:
84  mtsTextToSpeechInternal * Internals;
85  std::string StringToSpeechCommand;
86  void StringToSpeech(const std::string & text);
87  void StringToSpeechInternal(const std::string & text);
88  void CharacterToSpeech(const char & character);
89  void ButtonToSpeech(const prmEventButton & button);
90  bool Preemptive;
91  std::string LastString;
92 };
93 
95 
96 #endif // _mtsTextToSpeech_h
bool Preemptive
Definition: mtsTextToSpeech.h:90
Definition: mtsTextToSpeech.h:51
#define CISST_EXPORT
Definition: cmnExportMacros.h:50
std::string LastString
Definition: mtsTextToSpeech.h:91
#define CMN_UNUSED(argument)
Definition: cmnPortability.h:479
Defines a task with a Run method trigger by signals (any queued command or event).
void Configure(const std::string &CMN_UNUSED(filename)="")
Definition: mtsTextToSpeech.h:58
virtual void Startup(void)
Definition: mtsComponent.h:262
Definition: prmEventButton.h:37
Definition: mtsTaskFromSignal.h:40
Forward declarations and #define for cisstMultiTask.
#define CMN_DECLARE_SERVICES(hasDynamicCreation, lod)
Definition: cmnClassRegisterMacros.h:116
std::string StringToSpeechCommand
Definition: mtsTextToSpeech.h:85
virtual void Run(void)=0
Button Event payload.
mtsTextToSpeechInternal * Internals
Definition: mtsTextToSpeech.h:84
CMN_DECLARE_SERVICES_INSTANTIATION(mtsTextToSpeech)
const int CMN_NO_DYNAMIC_CREATION
Definition: cmnClassRegisterMacros.h:328
virtual void Cleanup(void)
Definition: mtsComponent.h:267
#define CMN_LOG_ALLOW_DEFAULT
Definition: cmnLogLoD.h:76