watson_developer_cloud.websocket.speech_to_text_websocket_listener module¶
-
class
RecognizeListener
(audio, options, recognize_callback, url, headers)[source]¶ Bases:
object
-
class
WebSocketClient
(factory, audio, options, callback)[source]¶ Bases:
autobahn.twisted.websocket.WebSocketClientProtocol
-
onConnect
(response)[source]¶ Callback fired directly after WebSocket opening handshake when new WebSocket server connection was established.
Parameters: response (instance of autobahn.websocket.protocol.ConnectionResponse
) – WebSocket connection response information.
-
-
class
WebSocketClientFactory
(audio, options, callback, url=None, headers=None)[source]¶ Bases:
autobahn.twisted.websocket.WebSocketClientFactory
-
buildProtocol
(addr)[source]¶ Create an instance of a subclass of Protocol.
The returned instance will handle input on an incoming server connection, and an attribute “factory” pointing to the creating factory.
Alternatively, L{None} may be returned to immediately close the new connection.
Override this method to alter how Protocol instances get created.
@param addr: an object implementing L{twisted.internet.interfaces.IAddress}
-
-
class