示例#1
0
 def SessionStoppedEvent():
     evt = Event()
     evt.result = Result(speechsdk.ResultReason.Canceled, "")
     evt.cancellation_details = Result(
         speechsdk.CancellationReason.EndOfStream,
         "reached EOS and all is well")
     return evt
示例#2
0
 def SessionErrorEvent():
     evt = Event()
     evt.result = Result(speechsdk.ResultReason.Canceled, "")
     evt.cancellation_details = Result(
         speechsdk.CancellationReason.Error, "error details")
     return evt