QTextToSpeechEngine Class
The QTextToSpeechEngine class is the base for text-to-speech engine integrations. More...
Header: | #include <QTextToSpeechEngine> |
qmake: | QT += texttospeech |
Inherits: | QObject |
Public Functions
QTextToSpeechEngine(QObject *parent = nullptr) | |
virtual | ~QTextToSpeechEngine() |
virtual QVector<QLocale> | availableLocales() const = 0 |
virtual QVector<QVoice> | availableVoices() const = 0 |
virtual QLocale | locale() const = 0 |
virtual void | pause() = 0 |
virtual double | pitch() const = 0 |
virtual double | rate() const = 0 |
virtual void | resume() = 0 |
virtual void | say(const QString &text) = 0 |
virtual bool | setLocale(const QLocale &locale) = 0 |
virtual bool | setPitch(double pitch) = 0 |
virtual bool | setRate(double rate) = 0 |
virtual bool | setVoice(const QVoice &voice) = 0 |
virtual bool | setVolume(double volume) = 0 |
virtual QTextToSpeech::State | state() const = 0 |
virtual void | stop() = 0 |
virtual QVoice | voice() const = 0 |
virtual double | volume() const = 0 |
- 31 public functions inherited from QObject
Signals
void | stateChanged(QTextToSpeech::State state) |
- 2 signals inherited from QObject
Static Public Members
const QMetaObject | staticMetaObject |
- 9 static public members inherited from QObject
Static Protected Members
QVoice | createVoice(const QString &name, QVoice::Gender gender, QVoice::Age age, const QVariant &data) |
QVariant | voiceData(const QVoice &voice) |
Additional Inherited Members
- 1 property inherited from QObject
- 1 public slot inherited from QObject
- 9 protected functions inherited from QObject
Detailed Description
The QTextToSpeechEngine class is the base for text-to-speech engine integrations.
An engine implementation must derive from QTextToSpeechEngine and implement all its pure virtual methods.
Member Function Documentation
QTextToSpeechEngine::QTextToSpeechEngine(QObject *parent = nullptr)
Constructs the text-to-speech engine base class with parent.
[virtual]
QTextToSpeechEngine::~QTextToSpeechEngine()
Destroys the instance of QTextToSpeechEngine. The destructor is virtual.
[pure virtual]
QVector<QLocale> QTextToSpeechEngine::availableLocales() const
Implementation of QTextToSpeech::availableLocales().
[pure virtual]
QVector<QVoice> QTextToSpeechEngine::availableVoices() const
Implementation of QTextToSpeech::availableVoices().
[static protected]
QVoice QTextToSpeechEngine::createVoice(const QString &name, QVoice::Gender gender, QVoice::Age age, const QVariant &data)
Creates a voice for a text-to-speech engine.
Parameters name, gender, age and data are directly stored in the QVoice instance.
[pure virtual]
QLocale QTextToSpeechEngine::locale() const
Implementation of QTextToSpeech::locale().
See also setLocale().
[pure virtual]
void QTextToSpeechEngine::pause()
Implementation of QTextToSpeech::pause().
[pure virtual]
double QTextToSpeechEngine::pitch() const
Implementation of QTextToSpeech::pitch().
See also setPitch().
[pure virtual]
double QTextToSpeechEngine::rate() const
Implementation of QTextToSpeech::rate().
See also setRate().
[pure virtual]
void QTextToSpeechEngine::resume()
Implementation of QTextToSpeech::resume().
[pure virtual]
void QTextToSpeechEngine::say(const QString &text)
Implementation of QTextToSpeech::say(text).
[pure virtual]
bool QTextToSpeechEngine::setLocale(const QLocale &locale)
Implementation QTextToSpeech::setLocale(locale).
Return true
if the operation was successful. In this case, the current voice (as returned by voice()) should also be updated to a new, valid value.
See also locale().
[pure virtual]
bool QTextToSpeechEngine::setPitch(double pitch)
Implementation of QTextToSpeech::setPitch(pitch).
Return true
if the operation was successful.
See also pitch().
[pure virtual]
bool QTextToSpeechEngine::setRate(double rate)
Implementation of QTextToSpeech::setRate(rate).
Return true
if the operation was successful.
See also rate().
[pure virtual]
bool QTextToSpeechEngine::setVoice(const QVoice &voice)
Implementation of QTextToSpeech::setVoice(voice).
Return true
if the operation was successful.
See also voice().
[pure virtual]
bool QTextToSpeechEngine::setVolume(double volume)
Implementation of QTextToSpeech::setVolume(volume).
Return true
if the operation was successful.
See also volume().
[pure virtual]
QTextToSpeech::State QTextToSpeechEngine::state() const
Implementation of QTextToSpeech::state().
[signal]
void QTextToSpeechEngine::stateChanged(QTextToSpeech::State state)
Emitted when the text-to-speech engine state has changed.
This signal is connected to QTextToSpeech::stateChanged() signal.
[pure virtual]
void QTextToSpeechEngine::stop()
Implementation of QTextToSpeech::stop().
[pure virtual]
QVoice QTextToSpeechEngine::voice() const
Implementation of QTextToSpeech::voice().
See also setVoice().
[static protected]
QVariant QTextToSpeechEngine::voiceData(const QVoice &voice)
Returns the engine-specific private data for the given voice.
[pure virtual]
double QTextToSpeechEngine::volume() const
Implementation of QTextToSpeech::volume().
See also setVolume().
© The Qt Company Ltd
Licensed under the GNU Free Documentation License, Version 1.3.
https://doc.qt.io/qt-5.12/qtexttospeechengine.html