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 | 십대의 목소리 |
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
이 속성은 음성의 언어를 보유합니다.
이것은 보이스 locale 의 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)
debug 스트림에 voice 에 대한 정보를 씁니다.
이 함수는 Qt 6.4에 도입되었습니다.
QDebug 를참조하십시오 .
[noexcept]
bool operator==(const QVoice &lhs, const QVoice &rhs)
lhs 음성과 rhs 음성이 동일한지 여부를 반환합니다.
name, locale, gender, age 이 동일하고 동일한 텍스트 음성 변환 엔진에 속하는 경우 두 음성이 동일합니다.
[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.