classe SpeechSynthesizer

class SpeechSynthesizer
  : public std::enable_shared_from_this< SpeechSynthesizer >

Classe pour le synthétiseur vocal. Mise à jour dans la version 1.14.0.

Membres

Propriétés

Syntaxe : public PropertyCollection & Properties;

Collection de propriétés et leurs valeurs définies pour ce SpeechSynthesizer.

SynthesisStarted

Syntaxe : public EventSignal< constSpeechSynthesisEventArgs & > SynthesisStarted;

L’événement indique qu’un résultat de synthèse vocale est reçu lorsque la synthèse vient de commencer.

Synthèse

Syntaxe : public EventSignal< constSpeechSynthesisEventArgs & > Synthesizing;

L’événement signale qu’un résultat de synthèse vocale est reçu pendant la synthèse.

SynthesisCompleted

Syntaxe : public EventSignal< constSpeechSynthesisEventArgs & > SynthesisCompleted;

L’événement indique qu’un résultat de synthèse vocale est reçu lorsque la synthèse est terminée.

SynthesisCanceled

Syntaxe : public EventSignal< constSpeechSynthesisEventArgs & > SynthesisCanceled;

L’événement signale qu’un résultat de synthèse vocale est reçu lorsque la synthèse est annulée.

Limite de mot

Syntaxe : public EventSignal< constSpeechSynthesisWordBoundaryEventArgs & > WordBoundary;

L’événement signale qu’une limite de mot de synthèse vocale est reçue pendant la synthèse. Ajouté dans la version 1.7.0.

VisemeReceived

Syntaxe : public EventSignal< constSpeechSynthesisVisemeEventArgs & > VisemeReceived;

L’événement indique qu’un événement de visème de synthèse vocale est reçu pendant la synthèse vocale. Ajouté dans la version 1.16.0.

BookmarkReached

Syntaxe : public EventSignal< constSpeechSynthesisBookmarkEventArgs & > BookmarkReached;

L’événement indique qu’un signet de synthèse vocale est atteint pendant la synthèse. Ajouté dans la version 1.16.0.

SpeakText

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

Exécutez la synthèse vocale sur du texte brut, de façon synchrone.

Paramètres

  • text Texte brut pour la synthèse.

Retours

Pointeur intelligent qui encapsule un résultat de synthèse vocale.

SpeakText

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

Exécutez la synthèse vocale sur du texte brut, de façon synchrone. Ajouté dans la version 1.9.0.

Paramètres

  • text Texte brut pour la synthèse.

Retours

Pointeur intelligent qui encapsule un résultat de synthèse vocale.

SpeakSsml

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

Exécutez la synthèse vocale sur SSML de manière synchrone.

Paramètres

  • ssml SSML pour la synthèse.

Retours

Pointeur intelligent qui encapsule un résultat de synthèse vocale.

SpeakSsml

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

Exécutez la synthèse vocale sur SSML de manière synchrone. Ajouté dans la version 1.9.0.

Paramètres

  • ssml SSML pour la synthèse.

Retours

Pointeur intelligent qui encapsule un résultat de synthèse vocale.

SpeakTextAsync

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

Exécutez la synthèse vocale sur du texte brut de manière asynchrone.

Paramètres

  • text Texte brut pour la synthèse.

Retours

Opération asynchrone représentant la synthèse. Il retourne une valeur de SpeechSynthesisResult comme résultat.

SpeakTextAsync

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

Exécutez la synthèse vocale sur du texte brut de manière asynchrone. Ajouté dans la version 1.9.0.

Paramètres

  • text Texte brut pour la synthèse.

Retours

Opération asynchrone représentant la synthèse. Il retourne une valeur de SpeechSynthesisResult comme résultat.

SpeakSsmlAsync

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

Exécutez la synthèse vocale sur SSML de manière asynchrone.

Paramètres

  • ssml SSML pour la synthèse.

Retours

Opération asynchrone représentant la synthèse. Il retourne une valeur de SpeechSynthesisResult comme résultat.

SpeakSsmlAsync

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

Exécutez la synthèse vocale sur SSML de manière asynchrone. Ajouté dans la version 1.9.0.

Paramètres

  • ssml SSML pour la synthèse.

Retours

Opération asynchrone représentant la synthèse. Il retourne une valeur de SpeechSynthesisResult comme résultat.

StartSpeakingText

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

Démarrez la synthèse vocale en texte brut, de façon synchrone.

Paramètres

  • text Texte brut pour la synthèse.

Retours

Pointeur intelligent qui encapsule un résultat de synthèse vocale.

StartSpeakingText

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

Démarrez la synthèse vocale en texte brut, de façon synchrone. Ajouté dans la version 1.9.0.

Paramètres

  • text Texte brut pour la synthèse.

Retours

Pointeur intelligent qui encapsule un résultat de synthèse vocale.

StartSpeakingSsml

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

Démarrez la synthèse vocale sur SSML, de façon synchrone.

Paramètres

  • ssml SSML pour la synthèse.

Retours

Pointeur intelligent qui encapsule un résultat de synthèse vocale.

StartSpeakingSsml

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

Démarrez la synthèse vocale sur SSML, de façon synchrone. Ajouté dans la version 1.9.0.

Paramètres

  • ssml SSML pour la synthèse.

Retours

Pointeur intelligent qui encapsule un résultat de synthèse vocale.

StartSpeakingTextAsync

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

Démarrez la synthèse vocale sur du texte brut, de façon asynchrone.

Paramètres

  • text Texte brut pour la synthèse.

Retours

Opération asynchrone représentant la synthèse. Il retourne une valeur de SpeechSynthesisResult comme résultat.

StartSpeakingTextAsync

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

Démarrez la synthèse vocale sur du texte brut, de façon asynchrone. Ajouté dans la version 1.9.0.

Paramètres

  • text Texte brut pour la synthèse.

Retours

Opération asynchrone représentant la synthèse. Il retourne une valeur de SpeechSynthesisResult comme résultat.

StartSpeakingSsmlAsync

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

Démarrez la synthèse vocale sur SSML de façon asynchrone.

Paramètres

  • ssml SSML pour la synthèse.

Retours

Opération asynchrone représentant la synthèse. Il retourne une valeur de SpeechSynthesisResult comme résultat.

StartSpeakingSsmlAsync

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

Démarrez la synthèse vocale sur SSML de façon asynchrone. Ajouté dans la version 1.9.0.

Paramètres

  • ssml SSML pour la synthèse.

Retours

Opération asynchrone représentant la synthèse. Il retourne une valeur de SpeechSynthesisResult comme résultat.

StopSpeakingAsync

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

Arrêtez la synthèse vocale de façon asynchrone. Ajouté dans la version 1.14.0.

Retours

Un avenir vide.

GetVoicesAsync

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

Obtenez les voix disponibles de manière asynchrone. Ajouté dans la version 1.16.0.

Paramètres

  • locale Spécifiez les paramètres régionaux des voix, au format BCP-47 ; ou laissez-le vide pour obtenir toutes les voix disponibles.

Retours

Opération asynchrone représentant la liste des voix. Il retourne une valeur de SynthesisVoicesResult comme résultat.

SetAuthorizationToken

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

Définit le jeton d’autorisation qui sera utilisé pour la connexion au service. Remarque : l’appelant doit s’assurer que le jeton d’autorisation est valide. Avant que le jeton d’autorisation expire, l’appelant doit l’actualiser en appelant cet méthode setter avec un nouveau jeton valide. Sinon, le synthétiseur rencontrera des erreurs lors de la synthèse vocale. Ajouté dans la version 1.7.0.

Paramètres

  • token Jeton d’autorisation.

GetAuthorizationToken

Syntaxe : public inline std::string GetAuthorizationToken ( ) const;

Obtient le jeton d’autorisation. Ajouté dans la version 1.7.0.

Retours

Jeton d’autorisation

~SpeechSynthesizer

Syntaxe : public inline ~SpeechSynthesizer ( );

Destructeur.

FromConfig

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

Créez un synthétiseur vocal à partir d’une configuration vocale.

Paramètres

  • speechconfig Configuration vocale.

Retours

Pointeur intelligent encapsulé du synthétiseur vocal.

FromConfig

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

Créez un synthétiseur vocal à partir d’une configuration vocale incorporée. Ajout dans la version 1.19.0.

Paramètres

  • speechconfig Configuration vocale incorporée.

Retours

Pointeur intelligent encapsulé du synthétiseur vocal.

FromConfig

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

Créez un synthétiseur vocal à partir d’une configuration vocale hybride.

Paramètres

  • speechconfig Configuration vocale hybride.

Retours

Pointeur intelligent encapsulé du synthétiseur vocal.

FromConfig

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

Créez un synthétiseur vocal à partir d’une configuration vocale et d’une configuration audio.

Paramètres

  • speechconfig Configuration vocale.

  • audioconfig Configuration audio.

Retours

Pointeur intelligent encapsulé du synthétiseur vocal.

FromConfig

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

Créez un synthétiseur vocal à partir d’une configuration vocale incorporée et d’une configuration audio. Ajout dans la version 1.19.0.

Paramètres

  • speechconfig Configuration vocale incorporée.

  • audioconfig Configuration audio.

Retours

Pointeur intelligent encapsulé du synthétiseur vocal.

FromConfig

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

Créez un synthétiseur vocal à partir d’une configuration vocale hybride et d’une configuration audio.

Paramètres

  • speechconfig Configuration vocale hybride.

  • audioconfig Configuration audio.

Retours

Pointeur intelligent encapsulé du synthétiseur vocal.

FromConfig

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

Créez un synthétiseur vocal à partir d’une configuration vocale, d’une configuration de langue source de détection automatique et d’une configuration audio Ajoutée dans la version 1.13.0.

Paramètres

  • speechconfig Configuration vocale.

  • autoDetectSourceLangConfig Configuration de la langue source de détection automatique.

  • audioconfig Configuration audio.

Retours

Pointeur intelligent encapsulé du synthétiseur vocal.