Ejemplo n.º 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
Ejemplo n.º 2
0
 def SessionErrorEvent():
     evt = Event()
     evt.result = Result(speechsdk.ResultReason.Canceled, "")
     evt.cancellation_details = Result(
         speechsdk.CancellationReason.Error, "error details")
     return evt
Ejemplo n.º 3
0
 def RecognizedEvent():
     evt = Event()
     evt.result = Result(speechsdk.ResultReason.RecognizedSpeech,
                         sample_segment_json)
     return evt