SpeechSynthesizer クラス

class SpeechSynthesizer
  : public std::enable_shared_from_this< SpeechSynthesizer >

音声シンセサイザーのクラス。 バージョン 1.14.0 で更新されました。

メンバー

プロパティ

構文: public PropertyCollection & Properties;

この SpeechSynthesizer に対して定義されているプロパティとその値のコレクション。

SynthesisStarted

構文: public EventSignal< constSpeechSynthesisEventArgs & > SynthesisStarted;

このイベントは、合成の開始時に音声合成結果が受信されることを通知します。

合成

構文: public EventSignal< constSpeechSynthesisEventArgs & > Synthesizing;

このイベントは、合成中に音声合成結果が受信されたことを通知します。

SynthesisCompleted

構文: public EventSignal< constSpeechSynthesisEventArgs & > SynthesisCompleted;

このイベントは、合成の完了時に音声合成結果が受信されることを通知します。

SynthesisCanceled

構文: public EventSignal< constSpeechSynthesisEventArgs & > SynthesisCanceled;

このイベントは、合成が取り消されたときに音声合成結果が受信されることを通知します。

WordBoundary

構文: public EventSignal< constSpeechSynthesisWordBoundaryEventArgs & > WordBoundary;

このイベントは、合成中に音声合成ワード境界が受信されたことを通知します。 バージョン 1.7.0 で追加されました。

VisemeReceived

構文: public EventSignal< constSpeechSynthesisVisemeEventArgs & > VisemeReceived;

このイベントは、合成の実行中に音声合成口形素イベントが受信されたことを通知します。 バージョン 1.16.0 で追加されました。

BookmarkReached

構文: public EventSignal< constSpeechSynthesisBookmarkEventArgs & > BookmarkReached;

このイベントは、合成の実行中に音声合成ブックマークに到達したことを通知します。 バージョン 1.16.0 で追加されました。

SpeakText

構文: public inline std::shared_ptr< SpeechSynthesisResult > SpeakText ( const std::string & text );

プレーン テキストで音声合成を同期的に実行します。

パラメーター

  • text 合成用のプレーン テキスト。

戻り値

音声合成結果をラップするスマート ポインター。

SpeakText

構文: public inline std::shared_ptr< SpeechSynthesisResult > SpeakText ( const std::wstring & text );

プレーン テキストで音声合成を同期的に実行します。 1.9.0 に追加されました。

パラメーター

  • text 合成用のプレーン テキスト。

戻り値

音声合成結果をラップするスマート ポインター。

SpeakSsml

構文: public inline std::shared_ptr< SpeechSynthesisResult > SpeakSsml ( const std::string & ssml );

SSML で音声合成を同期的に実行します。

パラメーター

  • ssml 合成用の SSML。

戻り値

音声合成結果をラップするスマート ポインター。

SpeakSsml

構文: public inline std::shared_ptr< SpeechSynthesisResult > SpeakSsml ( const std::wstring & ssml );

SSML で音声合成を同期的に実行します。 バージョン 1.9.0 で追加されました。

パラメーター

  • ssml 合成用の SSML。

戻り値

音声合成結果をラップするスマート ポインター。

SpeakTextAsync

構文: public inline std::future< std::shared_ptr< SpeechSynthesisResult > > SpeakTextAsync ( const std::string & text );

プレーン テキストで音声合成を非同期的に実行します。

パラメーター

  • text 合成用のプレーン テキスト。

戻り値

合成を表す非同期操作。 結果として SpeechSynthesisResult の値が返されます。

SpeakTextAsync

構文: public inline std::future< std::shared_ptr< SpeechSynthesisResult > > SpeakTextAsync ( const std::wstring & text );

プレーン テキストで音声合成を非同期的に実行します。 バージョン 1.9.0 で追加されました。

パラメーター

  • text 合成用のプレーン テキスト。

戻り値

合成を表す非同期操作。 結果として SpeechSynthesisResult の値が返されます。

SpeakSsmlAsync

構文: public inline std::future< std::shared_ptr< SpeechSynthesisResult > > SpeakSsmlAsync ( const std::string & ssml );

SSML で音声合成を非同期的に実行します。

パラメーター

  • ssml 合成用の SSML。

戻り値

合成を表す非同期操作。 結果として SpeechSynthesisResult の値が返されます。

SpeakSsmlAsync

構文: public inline std::future< std::shared_ptr< SpeechSynthesisResult > > SpeakSsmlAsync ( const std::wstring & ssml );

SSML で音声合成を非同期的に実行します。 バージョン 1.9.0 で追加されました。

パラメーター

  • ssml 合成用の SSML。

戻り値

合成を表す非同期操作。 結果として SpeechSynthesisResult の値が返されます。

StartSpeakingText

構文: public inline std::shared_ptr< SpeechSynthesisResult > StartSpeakingText ( const std::string & text );

プレーン テキストで音声合成を同期的に開始します。

パラメーター

  • text 合成用のプレーン テキスト。

戻り値

音声合成結果をラップするスマート ポインター。

StartSpeakingText

構文: public inline std::shared_ptr< SpeechSynthesisResult > StartSpeakingText ( const std::wstring & text );

プレーン テキストで音声合成を同期的に開始します。 バージョン 1.9.0 で追加されました。

パラメーター

  • text 合成用のプレーン テキスト。

戻り値

音声合成結果をラップするスマート ポインター。

StartSpeakingSsml

構文: public inline std::shared_ptr< SpeechSynthesisResult > StartSpeakingSsml ( const std::string & ssml );

SSML で音声合成を同期的に開始します。

パラメーター

  • ssml 合成用の SSML。

戻り値

音声合成結果をラップするスマート ポインター。

StartSpeakingSsml

構文: public inline std::shared_ptr< SpeechSynthesisResult > StartSpeakingSsml ( const std::wstring & ssml );

SSML で音声合成を同期的に開始します。 バージョン 1.9.0 で追加されました。

パラメーター

  • ssml 合成用の SSML。

戻り値

音声合成結果をラップするスマート ポインター。

StartSpeakingTextAsync

構文: public inline std::future< std::shared_ptr< SpeechSynthesisResult > > StartSpeakingTextAsync ( const std::string & text );

プレーン テキストで音声合成を非同期的に開始します。

パラメーター

  • text 合成用のプレーン テキスト。

戻り値

合成を表す非同期操作。 その結果、 SpeechSynthesisResult の値が返されます。

StartSpeakingTextAsync

構文: public inline std::future< std::shared_ptr< SpeechSynthesisResult > > StartSpeakingTextAsync ( const std::wstring & text );

プレーン テキストで音声合成を非同期的に開始します。 バージョン 1.9.0 で追加されました。

パラメーター

  • text 合成用のプレーン テキスト。

戻り値

合成を表す非同期操作。 その結果、 SpeechSynthesisResult の値が返されます。

StartSpeakingSsmlAsync

構文: public inline std::future< std::shared_ptr< SpeechSynthesisResult > > StartSpeakingSsmlAsync ( const std::string & ssml );

SSML で音声合成を非同期的に開始します。

パラメーター

  • ssml 合成用の SSML。

戻り値

合成を表す非同期操作。 その結果、 SpeechSynthesisResult の値が返されます。

StartSpeakingSsmlAsync

構文: public inline std::future< std::shared_ptr< SpeechSynthesisResult > > StartSpeakingSsmlAsync ( const std::wstring & ssml );

SSML で音声合成を非同期的に開始します。 バージョン 1.9.0 で追加されました。

パラメーター

  • ssml 合成用の SSML。

戻り値

合成を表す非同期操作。 その結果、 SpeechSynthesisResult の値が返されます。

StopSpeakingAsync

構文: public inline std::future< void > StopSpeakingAsync ( );

音声合成を非同期的に停止します。 バージョン 1.14.0 で追加されました。

戻り値

空の未来。

GetVoicesAsync

構文: public inline std::future< std::shared_ptr< SynthesisVoicesResult > > GetVoicesAsync ( const std::string & locale );

使用可能な音声を非同期的に取得します。 バージョン 1.16.0 で追加されました。

パラメーター

  • locale 音声のロケールを BCP-47 形式で指定します。または空のままにして、使用可能なすべての音声を取得します。

戻り値

音声リストを表す非同期操作。 その結果、 SynthesisVoicesResult の値が返されます。

SetAuthorizationToken

構文: public inline void SetAuthorizationToken ( const std::string & token );

サービスへの接続に使用する承認トークンを設定します。 注: 呼び出し元は、承認トークンが有効であることを確認する必要があります。 認証トークンの有効期限が切れる前に、呼び出し元は、新しい有効なトークンを使用してこのセッターを呼び出すことによって、認証トークンを更新する必要があります。 そうしないと、シンセサイザーで音声合成中にエラーが発生します。 バージョン 1.7.0 で追加されました。

パラメーター

  • token 承認トークン。

GetAuthorizationToken

構文: public inline std::string GetAuthorizationToken ( ) const;

承認トークンを取得します。 バージョン 1.7.0 で追加されました。

戻り値

承認トークン

~SpeechSynthesizer

構文: public inline ~SpeechSynthesizer ( );

デストラクターです。

FromConfig

構文: public inline static std::shared_ptr< SpeechSynthesizer > FromConfig ( std::shared_ptr< SpeechConfig > speechconfig , std::nullptr_t );

音声構成から音声シンセサイザーを作成します。

パラメーター

  • speechconfig 音声の構成。

戻り値

スマート ポインターでラップされた音声シンセサイザー ポインター。

FromConfig

構文: public inline static std::shared_ptr< SpeechSynthesizer > FromConfig ( std::shared_ptr< EmbeddedSpeechConfig > speechconfig , std::nullptr_t );

埋め込まれた音声構成から音声シンセサイザーを作成します。バージョン 1.19.0 で追加されました。

パラメーター

  • speechconfig 埋め込み音声の構成。

戻り値

スマート ポインターでラップされた音声シンセサイザー ポインター。

FromConfig

構文: public inline static std::shared_ptr< SpeechSynthesizer > FromConfig ( std::shared_ptr< HybridSpeechConfig > speechconfig , std::nullptr_t );

ハイブリッド音声構成から音声シンセサイザーを作成します。

パラメーター

  • speechconfig ハイブリッド音声の構成。

戻り値

スマート ポインターでラップされた音声シンセサイザー ポインター。

FromConfig

構文: public inline static std::shared_ptr< SpeechSynthesizer > FromConfig ( std::shared_ptr< SpeechConfig > speechconfig , std::shared_ptr< Audio::AudioConfig > audioconfig );

音声構成とオーディオ構成から音声シンセサイザーを作成します。

パラメーター

  • speechconfig 音声の構成。

  • audioconfig オーディオ構成。

戻り値

スマート ポインターでラップされた音声シンセサイザー ポインター。

FromConfig

構文: public inline static std::shared_ptr< SpeechSynthesizer > FromConfig ( std::shared_ptr< EmbeddedSpeechConfig > speechconfig , std::shared_ptr< Audio::AudioConfig > audioconfig );

埋め込まれた音声構成とオーディオ構成から音声シンセサイザーを作成します。バージョン 1.19.0 で追加されました。

パラメーター

  • speechconfig 埋め込み音声の構成。

  • audioconfig オーディオ構成。

戻り値

スマート ポインターでラップされた音声シンセサイザー ポインター。

FromConfig

構文: public inline static std::shared_ptr< SpeechSynthesizer > FromConfig ( std::shared_ptr< HybridSpeechConfig > speechconfig , std::shared_ptr< Audio::AudioConfig > audioconfig );

ハイブリッド音声構成とオーディオ構成から音声シンセサイザーを作成します。

パラメーター

  • speechconfig ハイブリッド音声の構成。

  • audioconfig オーディオ構成。

戻り値

スマート ポインターでラップされた音声シンセサイザー ポインター。

FromConfig

構文: public inline static std::shared_ptr< SpeechSynthesizer > FromConfig ( std::shared_ptr< SpeechConfig > speechconfig , std::shared_ptr< AutoDetectSourceLanguageConfig > autoDetectSourceLangConfig , std::shared_ptr< Audio::AudioConfig > audioconfig );

音声構成、自動検出ソース言語構成、オーディオ構成から音声シンセサイザーを作成します。1.13.0 に追加されました。

パラメーター

  • speechconfig 音声の構成。

  • autoDetectSourceLangConfig 自動検出ソース言語の構成。

  • audioconfig オーディオ構成。

戻り値

スマート ポインターでラップされた音声シンセサイザー ポインター。