クラス音声合成器

class SpeechSynthesizer
  : public std::enable_shared_from_this< SpeechSynthesizer >

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

メンバー

プロパティ

構文: public PropertyCollection & Properties;

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

SynthesisStarted

構文: public EventSignal< const SpeechSynthesisEventArgs & > SynthesisStarted;

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

合成

構文: public EventSignal< const SpeechSynthesisEventArgs & > Synthesizing;

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

SynthesisCompleted

構文: public EventSignal< const SpeechSynthesisEventArgs & > SynthesisCompleted;

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

SynthesisCanceled

構文: public EventSignal< const SpeechSynthesisEventArgs & > SynthesisCanceled;

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

WordBoundary

構文: public EventSignal< const SpeechSynthesisWordBoundaryEventArgs & > WordBoundary;

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

VisemeReceived

構文: public EventSignal< const SpeechSynthesisVisemeEventArgs & > VisemeReceived;

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

BookmarkReached

構文: public EventSignal< const SpeechSynthesisBookmarkEventArgs & > 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 します。

返品ポリシー

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

話す

構文: public inline std::shared_ptr< SpeechSynthesisResult > Speak ( const std::shared_ptr< SpeechSynthesisRequest > & request );

要求に応じて音声合成を同期的に実行します。 この API を使用すると、入力テキスト ストリームから音声を合成し、テキスト生成シナリオの待機時間を短縮できます。 注: この機能はプレビュー段階であり、変更される可能性があります。 バージョン 1.37.0 で追加されました。

パラメーター

  • request 合成要求。

返品ポリシー

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

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 値が返されます。

SpeakAsync

構文: public inline std::future< std::shared_ptr< SpeechSynthesisResult > > SpeakAsync ( const std::shared_ptr< SpeechSynthesisRequest > & request );

要求に応じて同期的に音声合成を実行します。 この API を使用すると、入力テキスト ストリームから音声を合成し、テキスト生成シナリオの待機時間を短縮できます。 注: この機能はプレビュー段階であり、変更される可能性があります。 バージョン 1.37.0 で追加されました。

パラメーター

  • request 合成要求。

返品ポリシー

合成を表す非同期操作。 結果として 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 します。

返品ポリシー

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

StartSpeaking

構文: public inline std::shared_ptr< SpeechSynthesisResult > StartSpeaking ( const std::shared_ptr< SpeechSynthesisRequest > & request );

要求に応じて同期的に音声合成を開始します。 この API を使用すると、入力テキスト ストリームから音声を合成し、テキスト生成シナリオの待機時間を短縮できます。 注: この機能はプレビュー段階であり、変更される可能性があります。 バージョン 1.37.0 で追加されました。

パラメーター

  • request 合成要求。

返品ポリシー

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

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 します。

返品ポリシー

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