diff options
author | Philip Schell <github.com@blubbfish.net> | 2013-10-23 09:37:13 +0000 |
---|---|---|
committer | Philip Schell <github.com@blubbfish.net> | 2013-10-23 09:37:13 +0000 |
commit | a468f96858c1b42a53fec2d83f3dccff626aa5f8 (patch) | |
tree | defd4e5ccf0ea93bff3060819e1a60bf1c651db0 | |
parent | de4b08bdcecc2de27bc4d39f6c24189bca3009a3 (diff) |
Bugfix in WinterSpeak with SAPI4 Voice
git-svn-id: http://svn.miranda-ng.org/main/trunk@6598 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
-rw-r--r-- | plugins/WinterSpeak/WinterSpeak_11.vcxproj | 2 | ||||
-rw-r--r-- | plugins/WinterSpeak/src/SpeechApi40a.cpp | 13 | ||||
-rw-r--r-- | plugins/WinterSpeak/src/Version.h | 2 |
3 files changed, 8 insertions, 9 deletions
diff --git a/plugins/WinterSpeak/WinterSpeak_11.vcxproj b/plugins/WinterSpeak/WinterSpeak_11.vcxproj index b65b726e9c..8ca7977d7b 100644 --- a/plugins/WinterSpeak/WinterSpeak_11.vcxproj +++ b/plugins/WinterSpeak/WinterSpeak_11.vcxproj @@ -20,7 +20,7 @@ </ItemGroup>
<PropertyGroup Label="Globals">
<ProjectName>WinterSpeak</ProjectName>
- <ProjectGuid>{A44F96D0-A850-4A67-9570-0E9298A16E40}</ProjectGuid>
+ <ProjectGuid>{18195F68-A747-8643-050C-C5101DA658FD}</ProjectGuid>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
diff --git a/plugins/WinterSpeak/src/SpeechApi40a.cpp b/plugins/WinterSpeak/src/SpeechApi40a.cpp index ab15e3e6bc..5e6bbebe2c 100644 --- a/plugins/WinterSpeak/src/SpeechApi40a.cpp +++ b/plugins/WinterSpeak/src/SpeechApi40a.cpp @@ -57,7 +57,6 @@ bool SpeechApi40a::load() {
return true;
}
-
return loadWithVoice(std::wstring(m_voice));
}
@@ -77,7 +76,6 @@ bool SpeechApi40a::unload() }
m_state = TextToSpeech::State_Unloaded;
-
return true;
}
@@ -90,7 +88,8 @@ bool SpeechApi40a::isLoaded() const //------------------------------------------------------------------------------
bool SpeechApi40a::say(const std::wstring &sentence)
{
- std::string text = mir_t2a_cp(sentence.c_str(), CP_UTF8);
+ //std::string text = mir_t2a_cp(sentence.c_str(), CP_ACP);
+ //MessageBoxA(NULL, text.c_str(), "TTS4", MB_OK);
bool ret = true;
if (!isLoaded())
@@ -100,8 +99,8 @@ bool SpeechApi40a::say(const std::wstring &sentence) else
{
SDATA data;
- data.dwSize = (DWORD)text.size();
- data.pData = (char *)text.c_str();
+ data.dwSize = (DWORD)(sentence.size() * sizeof(WCHAR));
+ data.pData = (WCHAR *)sentence.c_str();
m_tts_central->TextData(CHARSET_TEXT, 0, data, NULL, IID_ITTSBufNotifySinkA);
}
@@ -175,7 +174,7 @@ bool SpeechApi40a::setVoice(const std::wstring &voice) std::vector<std::wstring> SpeechApi40a::getVoices() const
{
std::vector<std::wstring> ret;
-
+
PITTSENUM pITTSEnum = NULL;
TTSMODEINFO inf;
@@ -222,7 +221,7 @@ std::wstring SpeechApi40a::getDescription() bool SpeechApi40a::loadWithVoice(std::wstring &voice)
{
CoInitialize(NULL);
-
+
PITTSENUM pITTSEnum;
TTSMODEINFO inf;
LPUNKNOWN pAudioDest;
diff --git a/plugins/WinterSpeak/src/Version.h b/plugins/WinterSpeak/src/Version.h index 22152c74d0..413358c17d 100644 --- a/plugins/WinterSpeak/src/Version.h +++ b/plugins/WinterSpeak/src/Version.h @@ -1,7 +1,7 @@ #define __MAJOR_VERSION 0
#define __MINOR_VERSION 9
#define __RELEASE_NUM 8
-#define __BUILD_NUM 2
+#define __BUILD_NUM 3
#define __FILEVERSION_STRING __MAJOR_VERSION,__MINOR_VERSION,__RELEASE_NUM,__BUILD_NUM
|