Unsolved Text To Speech Shows No Engines
-
I am attempting to implement the text to speech library in my plugin, however QTextToSpeech has 0 engines, 0 locales, and 0 voices. But, when I build and run the hello speak example, it has the Microsoft engines and voices.
Main::initalize() { QTextToSpeech *m_speech = new QTextToSpeech(); printf("Engines: " + std::to_string(m_speech->availableEngines().size())); printf("Locales: " + std::to_string(m_speech->availableLocales().size())); printf("Voices: " + std::to_string(m_speech->availableVoices().size())); }
Engines: 0 Locales: 0 Voices: 0
I've tried to create QTextToSpeech with the sapi engine (
QTextToSpeech *m_speech = new QTextToSpeech("sapi", this)
), and it also returns 0 voices. -
Hi and welcome to devnet,
What kind of plugin ?
In what type of application ? -
@SGaist It is a TeamSpeak3 plugin. I've ensured that the Qt5TextToSpeech DLL is in an accessible place.
-
I would guess that you did not deploy the module plugins.
-
@SGaist Oh I wasn't aware that I needed to do something extra in order to get it to work. So just providing the TTS dll doesn't allow my code to find/use the engines installed?
How would I go about deploying the module plugins? The other modules used are provided by TeamSpeak and didn't require deploying the module to use it.
-
What exactly did you deploy and how ?
-
@SGaist Typically I just run the standard build in Visual Studio. TTS is the only one giving me some real hassle, websockets were added relatively easily. I figured using the dll for TTS would be the same as what I had to do for websockets which was just make the dll accessible to my TeamSpeak plugin.
-
You should then start your application with the QT_DEBUG_PLUGINS environment variable to 1 to see what is happening with the plugins on the Qt side.
-
@SGaist Will I get information if my plugin is only loaded by TeamSpeak. I've tried QT_DEBUG_PLUGIN but it doesn't seem to work with the way TeamSpeak loads the plugin (unless I'm just missing some step to get the info).
-
It's QT_DEBUG_PLUGINS. Sorry I missed the S.
-
Yeah I've tried that as well after looking up the usage of it. Since I'm not invoking my plugin directly, and TeamSpeak is with it's own handler, I'm not sure if I'm suppose to see anything in my output.
I know the TTS dll is loaded, as previously without it I would get an error in the TeamSpeak console about it, I'm just unsure there are no speech engines when trying to use it.
-
Did you check the structure of the TeamSpeak installation ?
Check for a plugins folder.
If there's one, try copying there the tts plugins folder. -
Ah okay, I see now. I copied the
qtexttospeech_sapi
andqtexttospeech_sapid
DLLs, which I had previously not had, to the same location I have the Qt5TextToSpeech DLL, however it still showing no engines or voices available. -
The plugins shall stay in the same folder structure. It's where Qt will search for then.
-
I've tried it both ways, with them just in the root folder where all my other libs are, and making a plugins folder inside my directory which would match what I think you are asking. I also even tried to put them in the TeamSpeak plugins folder but that didn't work as well.
-
Can you show the folder trees you tried ?
-
First Attempt
Second Attempt
Third attempt
-
The plugin folder name should match the one from your Qt installation. If memory serves well, it should be "tts".
-
Okay I've tried both
tts
in the root folder and inside a plugins folder and it still didn't recognize any engines or voices. -
Then I would go with strace to see what is going on with file access.
Since you are on Windows, maybe DrMemory'sdstrace may help.