ConversationTranslator Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Creates a speech or text conversation where participants can see recognized speech and typed messages in their own languages.
public sealed class ConversationTranslator : Microsoft.CognitiveServices.Speech.Internal.DisposableBase
type ConversationTranslator = class
inherit DisposableBase
Public NotInheritable Class ConversationTranslator
Inherits DisposableBase
- Inheritance
-
Microsoft.CognitiveServices.Speech.Internal.DisposableBaseConversationTranslator
Remarks
See also: Quickstart: Multi-device Conversation
Constructors
ConversationTranslator() |
Creates a new instance of the Conversation Translator using the default microphone input. |
ConversationTranslator(AudioConfig) |
Creates a new instance of the Conversation Translator. |
Properties
AuthorizationToken |
Gets or sets the authorization token used to connect to the conversation service |
ParticipantId |
Gets your participant identifier |
Properties |
Gets the collection of properties and their values defined for this ConversationTranslator. |
SpeechRecognitionLanguage |
Gets the language name that is used for recognition. |
Methods
JoinConversationAsync(Conversation, String) |
Joins an existing conversation. You should use this method if you have created a conversation using CreateConversationAsync(SpeechConfig, String). |
JoinConversationAsync(String, String, String) |
Joins an existing conversation. |
LeaveConversationAsync() |
Leave the current conversation. After this is called, you will no longer receive any events. |
SendTextMessageAsync(String) |
Sends an instant message to all participants in the conversation. This instant message will be translated into each participant's text language. |
SetAuthorizationToken(String, String) |
Sets the Cognitive Speech authorization token that will be used for connecting to the server. |
StartTranscribingAsync() |
Starts sending audio to the conversation service for speech recognition and translation. You should subscribe to the Transcribing, and Transcribed events to receive conversation translation results for yourself, and other participants in the conversation. |
StopTranscribingAsync() |
Stops sending audio to the conversation service. You will still receive Transcribing, and Transcribed events for other participants in the conversation. |
Events
Canceled |
Event that signals an error with the conversation transcription, or the end of the audio stream has been reached. |
ConversationExpiration |
Event that signals how many more minutes are left before the conversation expires. |
ParticipantsChanged |
Event that signals participants in the room have changed (e.g. a new participant joined). |
SessionStarted |
Event that signals the start of a conversation translation session. |
SessionStopped |
Event that signals the end of a conversation translation session. |
TextMessageReceived |
Event that signals a translated text message from a conversation participant. |
Transcribed |
Event that signals a final conversation translation result is available for a conversation participant. |
Transcribing |
Event that signals an intermediate conversation translation result is available for a conversation participant. |