cisst-saw
Toggle main menu visibility
Loading...
Searching...
No Matches
tmp
cisst-saw
sawTextToSpeech
components
include
sawTextToSpeech
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
22
#include <
cisstMultiTask/mtsForwardDeclarations.h
>
23
#include <
cisstMultiTask/mtsTaskFromSignal.h
>
24
#include <
cisstParameterTypes/prmEventButton.h
>
25
#include <
sawTextToSpeech/sawTextToSpeechRevision.h
>
26
27
// Always include last
28
#include <
sawTextToSpeech/sawTextToSpeechExport.h
>
29
30
// forward declaration for class containing members specific to each
31
// OS/TTS package used
32
class
mtsTextToSpeechInternal;
33
51
class
CISST_EXPORT
mtsTextToSpeech
:
public
mtsTaskFromSignal
52
{
53
// declare services, requires dynamic creation
54
CMN_DECLARE_SERVICES(
CMN_NO_DYNAMIC_CREATION
,
CMN_LOG_ALLOW_DEFAULT
);
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
void
Beep
(
const
vct3
& durationFrequencyAmplitude);
91
void
BeepInternal
(
const
vct3
& durationFrequencyAmplitude);
92
bool
Preemptive
;
93
std::string
LastString
;
94
vct3
LastBeep
;
95
};
96
97
CMN_DECLARE_SERVICES_INSTANTIATION
(
mtsTextToSpeech
);
98
99
#endif
// _mtsTextToSpeech_h
mtsTaskFromSignal::mtsTaskFromSignal
mtsTaskFromSignal(const std::string &name, unsigned int sizeStateTable=256)
mtsTextToSpeech
Definition
mtsTextToSpeech.h:52
mtsTextToSpeech::AddInterfaceRequiredForEventCharacter
void AddInterfaceRequiredForEventCharacter(const std::string &interfaceName, const std::string &eventName)
mtsTextToSpeech::Internals
mtsTextToSpeechInternal * Internals
Definition
mtsTextToSpeech.h:84
mtsTextToSpeech::Startup
void Startup(void)
mtsTextToSpeech::Beep
void Beep(const vct3 &durationFrequencyAmplitude)
mtsTextToSpeech::CharacterToSpeech
void CharacterToSpeech(const char &character)
mtsTextToSpeech::Preemptive
bool Preemptive
Definition
mtsTextToSpeech.h:92
mtsTextToSpeech::Configure
void Configure(const std::string &CMN_UNUSED(filename)="")
Definition
mtsTextToSpeech.h:58
mtsTextToSpeech::BeepInternal
void BeepInternal(const vct3 &durationFrequencyAmplitude)
mtsTextToSpeech::StringToSpeech
void StringToSpeech(const std::string &text)
mtsTextToSpeech::~mtsTextToSpeech
~mtsTextToSpeech(void)
mtsTextToSpeech::LastString
std::string LastString
Definition
mtsTextToSpeech.h:93
mtsTextToSpeech::AddInterfaceRequiredForEventButton
void AddInterfaceRequiredForEventButton(const std::string &interfaceName)
mtsTextToSpeech::mtsTextToSpeech
mtsTextToSpeech(void)
mtsTextToSpeech::Run
void Run(void)
mtsTextToSpeech::ButtonToSpeech
void ButtonToSpeech(const prmEventButton &button)
mtsTextToSpeech::StringToSpeechCommand
std::string StringToSpeechCommand
Definition
mtsTextToSpeech.h:85
mtsTextToSpeech::AddInterfaceRequiredForEventString
void AddInterfaceRequiredForEventString(const std::string &interfaceName, const std::string &eventName)
mtsTextToSpeech::LastBeep
vct3 LastBeep
Definition
mtsTextToSpeech.h:94
mtsTextToSpeech::Cleanup
void Cleanup(void)
mtsTextToSpeech::SetPreemptive
void SetPreemptive(const bool &preemptive)
mtsTextToSpeech::StringToSpeechInternal
void StringToSpeechInternal(const std::string &text)
prmEventButton
Definition
prmEventButton.h:36
CMN_DECLARE_SERVICES_INSTANTIATION
#define CMN_DECLARE_SERVICES_INSTANTIATION(className)
Definition
cmnClassRegisterMacros.h:199
CMN_NO_DYNAMIC_CREATION
const int CMN_NO_DYNAMIC_CREATION
Definition
cmnClassRegisterMacros.h:325
CISST_EXPORT
#define CISST_EXPORT
Definition
cmnExportMacros.h:50
CMN_LOG_ALLOW_DEFAULT
#define CMN_LOG_ALLOW_DEFAULT
Definition
cmnLogLoD.h:76
CMN_UNUSED
#define CMN_UNUSED(argument)
Definition
cmnPortability.h:497
mtsForwardDeclarations.h
Forward declarations and #define for cisstMultiTask.
mtsTaskFromSignal.h
Defines a task with a Run method trigger by signals (any queued command or event).
prmEventButton.h
Button Event payload.
sawTextToSpeechExport.h
sawTextToSpeechRevision.h
vct3
vctFixedSizeVector< double, 3 > vct3
Definition
vctFixedSizeVectorTypes.h:46
Generated by
1.18.0