1 #include "ActionSpeech.h"
3 CActionSpeech::CActionSpeech() {
7 // TODO: The next few methods are pretty much boiler plate - move into parent?
8 std::string
CActionSpeech::GetName() {
12 bool CActionSpeech::Activate() {
13 HRESULT hr
= CoCreateInstance(CLSID_SpVoice
, NULL
, CLSCTX_ALL
, IID_ISpVoice
, (void **)&pVoice
);
23 // TODO: Why is this needed?
24 pVoice
->Speak(L
"",SPF_ASYNC
,NULL
);
30 bool CActionSpeech::Deactivate() {
40 bool CActionSpeech::GetActive() {
44 bool CActionSpeech::Execute(const std::wstring
&strText
) {
51 pVoice
->Speak(strText
.c_str(), SPF_ASYNC
, NULL
);
56 void CActionSpeech::Preview(const std::wstring
&strText
) {