Definition at line 31 of file dialogflow_client.py.
def dialogflow_ros.dialogflow_client.DialogflowClient.__init__ |
( |
|
self, |
|
|
|
language_code = 'en-US' , |
|
|
|
last_contexts = None |
|
) |
| |
def dialogflow_ros.dialogflow_client.DialogflowClient._create_audio_output |
( |
|
self | ) |
|
|
private |
def dialogflow_ros.dialogflow_client.DialogflowClient._event_request_cb |
( |
|
self, |
|
|
|
msg |
|
) |
| |
|
private |
:param msg: DialogflowEvent Message
:type msg: DialogflowEvent
Definition at line 128 of file dialogflow_client.py.
def dialogflow_ros.dialogflow_client.DialogflowClient._generator |
( |
|
self | ) |
|
|
private |
Generator function that continuously yields audio chunks from the
buffer. Used to stream data to the Google Speech API Asynchronously.
:return A streaming request with the audio data.
First request carries config data per Dialogflow docs.
:rtype: Iterator[:class:`StreamingDetectIntentRequest`]
Definition at line 183 of file dialogflow_client.py.
def dialogflow_ros.dialogflow_client.DialogflowClient._msg_request_cb |
( |
|
self, |
|
|
|
msg |
|
) |
| |
|
private |
ROS Callback that sends text received from a topic to Dialogflow,
:param msg: A DialogflowRequest message.
:type msg: DialogflowRequest
Definition at line 120 of file dialogflow_client.py.
def dialogflow_ros.dialogflow_client.DialogflowClient._play_stream |
( |
|
self, |
|
|
|
data |
|
) |
| |
|
private |
Simple function to play a the output Dialogflow response.
:param data: Audio in bytes.
Definition at line 170 of file dialogflow_client.py.
def dialogflow_ros.dialogflow_client.DialogflowClient._signal_handler |
( |
|
self, |
|
|
|
signal, |
|
|
|
frame |
|
) |
| |
|
private |
def dialogflow_ros.dialogflow_client.DialogflowClient._text_event_cb |
( |
|
self, |
|
|
|
msg |
|
) |
| |
|
private |
def dialogflow_ros.dialogflow_client.DialogflowClient._text_request_cb |
( |
|
self, |
|
|
|
msg |
|
) |
| |
|
private |
ROS Callback that sends text received from a topic to Dialogflow,
:param msg: A String message.
:type msg: String
Definition at line 111 of file dialogflow_client.py.
def dialogflow_ros.dialogflow_client.DialogflowClient.detect_intent_stream |
( |
|
self, |
|
|
|
return_result = False |
|
) |
| |
Gets data from an audio generator (mic) and streams it to Dialogflow.
We use a stream for VAD and single utterance detection.
Definition at line 257 of file dialogflow_client.py.
def dialogflow_ros.dialogflow_client.DialogflowClient.detect_intent_text |
( |
|
self, |
|
|
|
msg |
|
) |
| |
Use the Dialogflow API to detect a user's intent. Goto the Dialogflow
console to define intents and params.
:param msg: DialogflowRequest msg
:return query_result: Dialogflow's query_result with action parameters
:rtype: DialogflowResult
Definition at line 218 of file dialogflow_client.py.
def dialogflow_ros.dialogflow_client.DialogflowClient.event_intent |
( |
|
self, |
|
|
|
event |
|
) |
| |
Send an event message to Dialogflow
:param event: The ROS event message
:type event: DialogflowEvent
:return: The result from dialogflow as a ROS msg
:rtype: DialogflowResult
Definition at line 302 of file dialogflow_client.py.
def dialogflow_ros.dialogflow_client.DialogflowClient.exit |
( |
|
self | ) |
|
def dialogflow_ros.dialogflow_client.DialogflowClient.get_language_code |
( |
|
self | ) |
|
def dialogflow_ros.dialogflow_client.DialogflowClient.set_language_code |
( |
|
self, |
|
|
|
language_code |
|
) |
| |
def dialogflow_ros.dialogflow_client.DialogflowClient.start |
( |
|
self | ) |
|
dialogflow_ros.dialogflow_client.DialogflowClient._audio_config |
|
private |
dialogflow_ros.dialogflow_client.DialogflowClient._language_code |
|
private |
dialogflow_ros.dialogflow_client.DialogflowClient._output_audio_config |
|
private |
dialogflow_ros.dialogflow_client.DialogflowClient._port |
|
private |
dialogflow_ros.dialogflow_client.DialogflowClient._results_pub |
|
private |
dialogflow_ros.dialogflow_client.DialogflowClient._server_name |
|
private |
dialogflow_ros.dialogflow_client.DialogflowClient._session |
|
private |
dialogflow_ros.dialogflow_client.DialogflowClient._session_cli |
|
private |
dialogflow_ros.dialogflow_client.DialogflowClient.audio |
dialogflow_ros.dialogflow_client.DialogflowClient.CHANNELS |
dialogflow_ros.dialogflow_client.DialogflowClient.CHUNK |
dialogflow_ros.dialogflow_client.DialogflowClient.DEBUG |
dialogflow_ros.dialogflow_client.DialogflowClient.FORMAT |
dialogflow_ros.dialogflow_client.DialogflowClient.last_contexts |
dialogflow_ros.dialogflow_client.DialogflowClient.phrase_hints |
dialogflow_ros.dialogflow_client.DialogflowClient.PLAY_AUDIO |
dialogflow_ros.dialogflow_client.DialogflowClient.RATE |
dialogflow_ros.dialogflow_client.DialogflowClient.stream_out |
dialogflow_ros.dialogflow_client.DialogflowClient.USE_AUDIO_SERVER |
The documentation for this class was generated from the following file: