QVoice Class
QVoiceクラスは特定の音声を表します。さらに...
ヘッダー | #include <QVoice> |
CMake: | find_package(Qt6 REQUIRED COMPONENTS TextToSpeech) target_link_libraries(mytarget PRIVATE Qt6::TextToSpeech) |
qmake: | QT += texttospeech |
パブリックタイプ
プロパティ
パブリック関数
QVoice() | |
QVoice(const QVoice &other) | |
QVoice(QVoice &&other) | |
~QVoice() | |
QVoice::Age | age() const |
QVoice::Gender | gender() const |
QLocale::Language | language() const |
QLocale | locale() const |
QString | name() const |
(since 6.4) void | swap(QVoice &other) |
QVoice & | operator=(QVoice &&other) |
QVoice & | operator=(const QVoice &other) |
静的パブリックメンバー
QString | ageName(QVoice::Age age) |
QString | genderName(QVoice::Gender gender) |
関連する非メンバー
bool | operator!=(const QVoice &lhs, const QVoice &rhs) |
(since 6.4) QDataStream & | operator<<(QDataStream &stream, const QVoice &voice) |
(since 6.4) QDebug | operator<<(QDebug debug, const QVoice &voice) |
bool | operator==(const QVoice &lhs, const QVoice &rhs) |
(since 6.4) QDataStream & | operator>>(QDataStream &stream, QVoice &voice) |
詳細説明
現在の音声合成エンジンでサポートされている音声を取得するには、QTextToSpeech::availableVoices() またはQTextToSpeech::findVoices() を使用します。
メンバ型ドキュメント
enum QVoice::Age
声の時代。
定数 | 値 | 説明 |
---|---|---|
QVoice::Child | 0 | 子供の声 |
QVoice::Teenager | 1 | 10代の声 |
QVoice::Adult | 2 | 大人の声 |
QVoice::Senior | 3 | シニアの声 |
QVoice::Other | 4 | 年齢不明の声 |
enum QVoice::Gender
声の性別。
一定 | 値 | 説明 |
---|---|---|
QVoice::Male | 0 | 男性の声 |
QVoice::Female | 1 | 女性の声 |
QVoice::Unknown | 2 | 性別不明の声 |
プロパティ
[read-only]
age : const Age
このプロパティは声の年齢を保持する
アクセス関数です:
QVoice::Age | age() const |
[read-only]
gender : const Gender
このプロパティは、声の性別を保持します。
アクセス関数です:
QVoice::Gender | gender() const |
[read-only, since 6.6]
language : const QLocale::Language
このプロパティは、音声の言語を保持します。
このプロパティはQt 6.6で導入されました。
アクセス関数です:
QLocale::Language | language() const |
[read-only, since 6.4]
locale : const QLocale
このプロパティは、音声のロケールを保持する。
ロケールには、音声の言語と地域(アクセントや方言)が含まれます。
このプロパティは Qt 6.4 で導入されました。
アクセス関数です:
QLocale | locale() const |
[read-only]
name : const QString
このプロパティは、音声の名前を保持します。
アクセス関数です:
QString | name() const |
メンバー関数ドキュメント
QVoice::QVoice()
空の QVoice を構築します。
アプリケーション・コードで任意の音声インスタンスを構築することはできません。サポートされている音声を選択するには、代わりにQTextToSpeech::availableVoices() またはQTextToSpeech::findVoices() を使用してください。
[noexcept]
QVoice::QVoice(const QVoice &other)
other からQVoiceをコピー構築する。
[noexcept]
QVoice::QVoice(QVoice &&other)
other から移動して QVoice オブジェクトを構築します。
[noexcept]
QVoice::~QVoice()
QVoice インスタンスを破棄します。
[static]
QString QVoice::ageName(QVoice::Age age)
音声のage クラスを表す文字列を返します。
[static]
QString QVoice::genderName(QVoice::Gender gender)
̈́ 音声のgender 名を返す。
[noexcept, since 6.4]
void QVoice::swap(QVoice &other)
other をこの声と入れ替える。この操作は非常に高速で、失敗することはありません。
この関数は Qt 6.4 で導入されました。
[noexcept]
QVoice &QVoice::operator=(QVoice &&other)
other をこのQVoice オブジェクトに移動する。
[noexcept]
QVoice &QVoice::operator=(const QVoice &other)
このQVoice オブジェクトにother を割り当てる。
関連する非会員
[noexcept]
bool operator!=(const QVoice &lhs, const QVoice &rhs)
lhs の音声とrhs の音声が異なるかどうかを返す。
[since 6.4]
QDataStream &operator<<(QDataStream &stream, const QVoice &voice)
voice をデータストリームstream にシリアライズします。
この関数は Qt 6.4 で導入されました。
Qt データ型のシリアライズも参照してください 。
[since 6.4]
QDebug operator<<(QDebug debug, const QVoice &voice)
voice に関する情報をdebug ストリームに書き込みます。
この関数は Qt 6.4 で導入されました。
QDebugも参照してください 。
[noexcept]
bool operator==(const QVoice &lhs, const QVoice &rhs)
lhs の音声とrhs の音声が同一であるかどうかを返す。
name 、locale 、gender 、age が同一で、同じ音声合成エンジンに属していれば、2つの音声は同一である。
[since 6.4]
QDataStream &operator>>(QDataStream &stream, QVoice &voice)
データストリームstream からvoice をデシリアライズします。
この関数は Qt 6.4 で導入されました。
Qt データ型のシリアライズも参照してください 。
© 2025 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.