你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn。
ConversationTranslator class
加入、离开或连接到对话。
- Extends
-
ConversationCommon
构造函数
Conversation |
属性
canceled | |
conversation |
|
participants | |
participants |
|
properties | |
recognized | |
recognizing | |
session |
|
session |
|
speech |
|
text |
|
transcribed | |
transcribing |
方法
构造函数详细信息
ConversationTranslator(AudioConfig)
属性详细信息
canceled
canceled: (sender: ConversationHandler, event: ConversationTranslationCanceledEventArgs) => void
属性值
(sender: ConversationHandler, event: ConversationTranslationCanceledEventArgs) => void
conversationExpiration
conversationExpiration: (sender: IConversationTranslator, event: ConversationExpirationEventArgs) => void
属性值
(sender: IConversationTranslator, event: ConversationExpirationEventArgs) => void
participants
participantsChanged
participantsChanged: (sender: IConversationTranslator, event: ConversationParticipantsChangedEventArgs) => void
属性值
(sender: IConversationTranslator, event: ConversationParticipantsChangedEventArgs) => void
properties
recognized
recognized: (sender: IConversationTranslator, event: TranslationRecognitionEventArgs) => void
属性值
(sender: IConversationTranslator, event: TranslationRecognitionEventArgs) => void
recognizing
recognizing: (sender: IConversationTranslator, event: TranslationRecognitionEventArgs) => void
属性值
(sender: IConversationTranslator, event: TranslationRecognitionEventArgs) => void
sessionStarted
sessionStarted: (sender: ConversationHandler, event: SessionEventArgs) => void
属性值
(sender: ConversationHandler, event: SessionEventArgs) => void
sessionStopped
sessionStopped: (sender: ConversationHandler, event: SessionEventArgs) => void
属性值
(sender: ConversationHandler, event: SessionEventArgs) => void
speechRecognitionLanguage
string speechRecognitionLanguage
属性值
string
textMessageReceived
textMessageReceived: (sender: IConversationTranslator, event: ConversationTranslationEventArgs) => void
属性值
(sender: IConversationTranslator, event: ConversationTranslationEventArgs) => void
transcribed
transcribed: (sender: IConversationTranslator, event: ConversationTranslationEventArgs) => void
属性值
(sender: IConversationTranslator, event: ConversationTranslationEventArgs) => void
transcribing
transcribing: (sender: IConversationTranslator, event: ConversationTranslationEventArgs) => void
属性值
(sender: IConversationTranslator, event: ConversationTranslationEventArgs) => void
方法详细信息
dispose(string, () => void, (error: string) => void)
function dispose(reason?: string, success?: () => void, err?: (error: string) => void)
参数
- reason
-
string
- success
-
() => void
- err
-
(error: string) => void
isDisposed()
function isDisposed(): boolean
返回
boolean
joinConversationAsync(IConversation, string, Callback, Callback)
加入对话。 如果这是主机,则传入以前创建的 Conversation 对象。
function joinConversationAsync(conversation: IConversation, nickname: string, cb?: Callback, err?: Callback)
参数
- conversation
-
IConversation
- nickname
-
string
- cb
-
Callback
- err
-
Callback
joinConversationAsync(string, string, string, Callback, Callback)
function joinConversationAsync(conversationId: string, nickname: string, lang: string, cb?: Callback, err?: Callback)
参数
- conversationId
-
string
- nickname
-
string
- lang
-
string
- cb
-
Callback
- err
-
Callback
leaveConversationAsync(Callback, Callback)
离开对话
function leaveConversationAsync(cb?: Callback, err?: Callback)
参数
- cb
-
Callback
- err
-
Callback
onToken(IAuthentication)
function onToken(token: IAuthentication)
参数
- token
-
IAuthentication
sendTextMessageAsync(string, Callback, Callback)
发送文本消息
function sendTextMessageAsync(message: string, cb?: Callback, err?: Callback)
参数
- message
-
string
- cb
-
Callback
- err
-
Callback
setServiceProperty(string, string)
function setServiceProperty(name: string, value: string)
参数
- name
-
string
- value
-
string
startTranscribingAsync(Callback, Callback)
开始说话
function startTranscribingAsync(cb?: Callback, err?: Callback)
参数
- cb
-
Callback
- err
-
Callback
stopTranscribingAsync(Callback, Callback)
停止说话
function stopTranscribingAsync(cb?: Callback, err?: Callback)
参数
- cb
-
Callback
- err
-
Callback