QTextToSpeech problem with macOS engine
Solved
General and Desktop
-
Hi all,
I get difference of signal raised when using same Qt 6.6.1 code on macOS 14.2.1 and win10 22H2.
TEMPLATE = app QT = core texttospeech CONFIG += c++17 cmdline # You can make your code fail to compile if it uses deprecated APIs. # In order to do so, uncomment the following line. #DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 SOURCES += \ main.cpp # Default rules for deployment. qnx: target.path = /tmp/$${TARGET}/bin else: unix:!android: target.path = /opt/$${TARGET}/bin !isEmpty(target.path): INSTALLS += target
source is
#include <QCoreApplication> #include <QtTextToSpeech/QTextToSpeech> int main(int argc, char *argv[]) { QCoreApplication a(argc, argv); #if defined (Q_OS_MAC) QTextToSpeech speech("macos"); //QTextToSpeech speech("darwin"); #else QTextToSpeech speech("sapi"); //QTextToSpeech speech("winrt"); #endif QObject::connect(&speech, &QTextToSpeech::stateChanged, [&](QTextToSpeech::State state){ qDebug() << state; }); speech.say("try to speech"); return a.exec(); }
win10 for engine "sapi" or "winrt" console display :
QTextToSpeech::Speaking
QTextToSpeech::ReadymacOS for engine "macos" console display :
QTextToSpeech::Speakingfor engine "darwin" console display nothing !!
Do you already experienced same issue ? any fix ?
-
Hi,
Did you test the C++ example of the module ?
-