cisst-saw
Loading...
Searching...
No Matches
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
12This software is provided "as is" under an open source license, with
13no warranty. The complete license can be found in license.txt and
14http://www.cisst.org/cisst/license.txt.
15
16--- end cisst license ---
17*/
18
19#ifndef _mtsTextToSpeech_h
20#define _mtsTextToSpeech_h
21
26
27// Always include last
29
30// forward declaration for class containing members specific to each
31// OS/TTS package used
32class mtsTextToSpeechInternal;
33
52{
53 // declare services, requires dynamic creation
55 public:
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;
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 void Beep(const vct3 & durationFrequencyAmplitude);
91 void BeepInternal(const vct3 & durationFrequencyAmplitude);
93 std::string LastString;
95};
96
98
99#endif // _mtsTextToSpeech_h
mtsTaskFromSignal(const std::string &name, unsigned int sizeStateTable=256)
Definition mtsTextToSpeech.h:52
void AddInterfaceRequiredForEventCharacter(const std::string &interfaceName, const std::string &eventName)
mtsTextToSpeechInternal * Internals
Definition mtsTextToSpeech.h:84
void Startup(void)
void Beep(const vct3 &durationFrequencyAmplitude)
void CharacterToSpeech(const char &character)
bool Preemptive
Definition mtsTextToSpeech.h:92
void Configure(const std::string &CMN_UNUSED(filename)="")
Definition mtsTextToSpeech.h:58
void BeepInternal(const vct3 &durationFrequencyAmplitude)
void StringToSpeech(const std::string &text)
~mtsTextToSpeech(void)
std::string LastString
Definition mtsTextToSpeech.h:93
void AddInterfaceRequiredForEventButton(const std::string &interfaceName)
void Run(void)
void ButtonToSpeech(const prmEventButton &button)
std::string StringToSpeechCommand
Definition mtsTextToSpeech.h:85
void AddInterfaceRequiredForEventString(const std::string &interfaceName, const std::string &eventName)
vct3 LastBeep
Definition mtsTextToSpeech.h:94
void Cleanup(void)
void SetPreemptive(const bool &preemptive)
void StringToSpeechInternal(const std::string &text)
Definition prmEventButton.h:36
#define CMN_DECLARE_SERVICES_INSTANTIATION(className)
Definition cmnClassRegisterMacros.h:199
const int CMN_NO_DYNAMIC_CREATION
Definition cmnClassRegisterMacros.h:325
#define CISST_EXPORT
Definition cmnExportMacros.h:50
#define CMN_LOG_ALLOW_DEFAULT
Definition cmnLogLoD.h:76
#define CMN_UNUSED(argument)
Definition cmnPortability.h:497
Forward declarations and #define for cisstMultiTask.
Defines a task with a Run method trigger by signals (any queued command or event).
Button Event payload.
vctFixedSizeVector< double, 3 > vct3
Definition vctFixedSizeVectorTypes.h:46