Class: IBMWatson::RecognizeCallback

Inherits:
Object
  • Object
show all
Defined in:
lib/ibm_watson/websocket/recognize_callback.rb

Overview

Abstract class for Recognize Callbacks

Instance Method Summary collapse

Constructor Details

#initializeRecognizeCallback

Returns a new instance of RecognizeCallback.



6
# File 'lib/ibm_watson/websocket/recognize_callback.rb', line 6

def initialize(*); end

Instance Method Details

#on_connectedObject

Called when a WebSocket connection is made



12
# File 'lib/ibm_watson/websocket/recognize_callback.rb', line 12

def on_connected; end

#on_data(data:) ⇒ Object

Called when the service returns results. The data is returned unparsed



30
# File 'lib/ibm_watson/websocket/recognize_callback.rb', line 30

def on_data(data:); end

#on_error(error:) ⇒ Object

Called when there is an error in the WebSocket connection



15
# File 'lib/ibm_watson/websocket/recognize_callback.rb', line 15

def on_error(error:); end

#on_hypothesis(hypothesis:) ⇒ Object

Called when the service returns the final hypothesis



27
# File 'lib/ibm_watson/websocket/recognize_callback.rb', line 27

def on_hypothesis(hypothesis:); end

#on_inactivity_timeout(error:) ⇒ Object

Called when there is an inactivity timeout



18
# File 'lib/ibm_watson/websocket/recognize_callback.rb', line 18

def on_inactivity_timeout(error:); end

#on_listeningObject

Called when the service is listening for audio



21
# File 'lib/ibm_watson/websocket/recognize_callback.rb', line 21

def on_listening; end

#on_transcription(transcript:) ⇒ Object

Called when an interim result is received



9
# File 'lib/ibm_watson/websocket/recognize_callback.rb', line 9

def on_transcription(transcript:); end

#on_transcription_completeObject

Called after the service returns the final result for the transcription



24
# File 'lib/ibm_watson/websocket/recognize_callback.rb', line 24

def on_transcription_complete; end