We've encountered an issue where a text was not being synthesized using the selected voice but the default one (Microsoft Anna on Windows 7). This happens with voices from a certain vendor (Acapela).
I think I found the problem in Synthesizer.cpp: The current code compares the name of the selected voice with the description of the engine obtained by calling SpGetDescription(). However, this does not match for Acapela voices, e.g.:
Voice name: Ryan22k_HQ
Engine description: Ryan, HQ 22k, USEnglish, SAPI 5, Acapela TTS 9.200 for Windows
I think it is more appropriate to compare the actual voice names, see patch below.
Do you think you can include this change in a future release?
Thanks,
Christoph
Index: Synthesizer.cpp===================================================================--- Synthesizer.cpp (revision 896)+++ Synthesizer.cpp (working copy)@@ -40,7 +40,13 @@
while (cpEnum->Next(1, &cpToken, NULL) == S_OK)
{
// Get a string which describes the token, in our case, the voice name
- hr = SpGetDescription( cpToken, &descriptionString);+ CComPtr<ISpDataKey> cpAttribKey;+ hr = cpToken->OpenKey(L"Attributes", &cpAttribKey);+ if (FAILED(hr))+ {+ continue;+ }+ hr = cpAttribKey->GetStringValue(L"Name", &descriptionString);
_ASSERTE( SUCCEEDED( hr ) );
if (wcscmp(descriptionString, engineName) == 0)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello JSAPI maintainers,
We've encountered an issue where a text was not being synthesized using the selected voice but the default one (Microsoft Anna on Windows 7). This happens with voices from a certain vendor (Acapela).
I think I found the problem in Synthesizer.cpp: The current code compares the name of the selected voice with the description of the engine obtained by calling SpGetDescription(). However, this does not match for Acapela voices, e.g.:
Voice name: Ryan22k_HQ
Engine description: Ryan, HQ 22k, USEnglish, SAPI 5, Acapela TTS 9.200 for Windows
I think it is more appropriate to compare the actual voice names, see patch below.
Do you think you can include this change in a future release?
Thanks,
Christoph