類別轉譯::ConversationTranslator

class Transcription::ConversationTranslator
  : public std::enable_shared_from_this< ConversationTranslator >

交談翻譯工具,可讓參與者使用自己的裝置,以自己的語言查看其他人的辨識和IM的聯機體驗。 參與者也可以說話,並將IM傳送給其他人。 已在1.9.0中新增。

成員

SessionStarted

語法: public EventSignal< constSessionEventArgs & > SessionStarted;

指出轉譯會話開始 (作業) 的事件訊號。

SessionStopped

語法: public EventSignal< constSessionEventArgs & > SessionStopped;

指出轉譯會話結束 (作業) 的事件訊號。

已取消

語法: public EventSignal< constConversationTranslationCanceledEventArgs & > Canceled;

包含已取消辨識結果的事件訊號 (指出因結果或直接取消要求而取消的辨識嘗試,或者傳輸或通訊協定失敗) 。

ParticipantsChanged

語法: public EventSignal< constConversationParticipantsChangedEventArgs & > ParticipantsChanged;

指出交談參與者已變更之事件的訊號。

ConversationExpiration

語法: public EventSignal< constConversationExpirationEventArgs & > ConversationExpiration;

事件訊號,指出交談到期前的分鐘數。

轉錄

語法: public EventSignal< constConversationTranslationEventArgs & > Transcribing;

包含中繼翻譯交談轉譯結果的事件訊號。

轉錄

語法: public EventSignal< constConversationTranslationEventArgs & > Transcribed;

包含最終翻譯交談轉譯結果的事件訊號。 (指出成功辨識嘗試) 。

TextMessageReceived

語法: public EventSignal< constConversationTranslationEventArgs & > TextMessageReceived;

從交談收到文字訊息時引發。

屬性

語法: public PropertyCollection & Properties;

針對這個 ConversationTranslator 定義的屬性及其值集合。

~ConversationTranslator

語法: public inline virtual ~ConversationTranslator ( );

解構函式。

JoinConversationAsync

語法: public inline std::future< void > JoinConversationAsync ( std::shared_ptr< Conversation > conversation , const std::string & nickname );

加入交談。 呼叫此項目之後,您就會開始接收事件。

參數

  • conversation 要使用的交談實例。 主機可以使用這個實例來管理交談。

  • nickname 要用於交談中目前參與者的顯示名稱。

傳回

異步操作。

JoinConversationAsync

語法: public inline std::future< void > JoinConversationAsync ( const std::string & conversationId , const std::string & nickname , const std::string & language );

加入交談。 呼叫此項目之後,您就會開始接收事件。

參數

  • conversationId 您想要加入之交談的識別碼。

  • nickname 交談中目前參與者的顯示名稱。

  • language 參與者所使用的語言。

傳回

異步操作。

StartTranscribingAsync

語法: public inline std::future< void > StartTranscribingAsync ( );

開始將音訊傳送至交談服務以進行語音識別。

傳回

異步操作。

StopTranscribingAsync

語法: public inline std::future< void > StopTranscribingAsync ( );

停止將音訊傳送至交談服務。

傳回

異步操作。

SendTextMessageAsync

語法: public inline std::future< void > SendTextMessageAsync ( const std::string & message );

將立即訊息傳送給交談中的所有參與者。 此立即訊息會轉譯成每個參與者的文字語言。

參數

  • message 要傳送的訊息。

傳回

異步操作。

LeaveConversationAsync

語法: public inline std::future< void > LeaveConversationAsync ( );

離開目前的交談。 呼叫此項目之後,您就不會再收到任何事件。

傳回

異步操作。

SetAuthorizationToken

語法: public inline void SetAuthorizationToken ( const std::string & authToken , const std::string & region );

設定將用於連線到伺服器的認知語音授權令牌。

參數

  • authToken 授權令牌。

  • region 此令牌的 Azure 區域。

GetAuthorizationToken

語法: public inline std::string GetAuthorizationToken ( );

取得授權令牌。

傳回

授權權杖

GetParticipantId

語法: public inline std::string GetParticipantId ( );

取得您的參與者標識碼。

傳回

參與者標識碼

FromConfig

語法: public inline static std::shared_ptr< ConversationTranslator > FromConfig ( std::shared_ptr< Audio::AudioConfig > audioConfig );

從音訊設定建立交談翻譯工具。

參數

  • audioConfig 音訊組態。

傳回

交談翻譯工具實例的智慧型指標。

ConversationTranslator

語法: protected inline explicit ConversationTranslator ( SPXCONVERSATIONTRANSLATORHANDLE handle );

OnSessionEventChanged

語法: protected inline void OnSessionEventChanged ( constEventSignal< constSessionEventArgs & > & evt );

OnCanceledEventChanged

語法: protected inline void OnCanceledEventChanged ( constEventSignal< constConversationTranslationCanceledEventArgs & > & );

OnParticipantsEventChanged

語法: protected inline void OnParticipantsEventChanged ( constEventSignal< constConversationParticipantsChangedEventArgs & > & );

OnExpirationEventChanged

語法: protected inline void OnExpirationEventChanged ( constEventSignal< constConversationExpirationEventArgs & > & );

OnTranscriptionEventChanged

語法: protected inline void OnTranscriptionEventChanged ( constEventSignal< constConversationTranslationEventArgs & > & evt );

OnTextMessageEventChanged

語法: protected inline void OnTextMessageEventChanged ( constEventSignal< constConversationTranslationEventArgs & > & );