btnexus-node-python.btStreamingNode module¶
A Node which accepts audio streams and forwards them to the speech to text service of your choice and publishes the transcript on the transcript topic
-
class
btStreamingNode.
StreamingNode
(language=None, personalityId=None, sessionId=None, **kwargs)[source]¶ Bases:
btNode.Node
Constructor sets up the NexusConnector.
- Parameters
token (String) – AccessToken for the btNexus
axonURL (String) – URL for the Axon(InstanceURL)
debug (bool) – switch for debug messages
logger (Logger) – a logger object to log to
personalityId (String) – Id of your Personality
integrationId (String) – Id of the integration this Node belongs to
-
connect
(**kwargs)[source]¶ connect the Axon and start the reactor for twisted. This will always block because of the reactor pattern
-
disconnectService
()[source]¶ This disconnects the service - to reconnect the service call reconnectService(). This will trigger onStreamReady again.
-
onStreamReady
()[source]¶ Start your stream with self.stream(stream) - this will stream data from the given stream to the SpeechService.