Categories:
Speak Processor middleware
Description of speak-processor-middleware, in charge of setting and supporting the speak property to the activity in case the channel requires it
Description
The speak-processor-middleware extends BotFramework class OutgoingMessageMiddleware, meaning that certain code is executed on message outgoing.
The source code of this middleware is included in Aura Bot Platform middlewares - Github repository.
Depending on the configuration of the channel and the value of modality and fullAura.voice in the request channelData, it assures that a speakable sentence is provided in the activity.speak field.
-
If
channel.alwaysSpeakistrueoractivity.channelData.modalityisvoiceoractivity.channelData auraMode.fullAura.voiceistrue, then:-
If the activity does not have the
speakfield, thenactivity.textis processed applying the rules configured inAURA_MIDDLEWARE_SPEAK_PROCESSORto clean up the text of unwanted characters and make it speakable. -
If the activity already counts on a
speakfield, nothing is done. -
If no rules are configured, nothing is done.
-
-
Otherwise,
speakfield is removed from the activity, because the channel will not wait for it.