一、说明
QTextToSpeech class provides a convenient access to text-to-speech engines.Use say() to start synthesizing text. It is possible to specify the language with setLocale(). To select between the available voices use setVoice(). The languages and voices depend on the available synthesizers on each platform. On Linux, speech-dispatcher is used by default.
二、代码
#include "texttospeech.h"
#include <QTextToSpeech>
#include <QLocale>
#include <QDebug