Public Member Functions | |
def | __enter__ (self) |
def | __exit__ (self, type, value, traceback) |
def | __init__ (self, rate=RATE, chunk=CHUNK, server_name='127.0.0.1', port=4444) |
def | generator (self) |
Public Attributes | |
closed | |
data_thread | |
s | |
Private Member Functions | |
def | _connect (self) |
def | _get_server_data (self) |
Private Attributes | |
_buff | |
_chunk | |
_connected | |
_port | |
_rate | |
_server_name | |
Opens a recording stream as a generator yielding the audio chunks.
Definition at line 12 of file AudioServerStream.py.
def dialogflow_ros.AudioServerStream.AudioServerStream.__init__ | ( | self, | |
rate = RATE , |
|||
chunk = CHUNK , |
|||
server_name = '127.0.0.1' , |
|||
port = 4444 |
|||
) |
Definition at line 15 of file AudioServerStream.py.
def dialogflow_ros.AudioServerStream.AudioServerStream.__enter__ | ( | self | ) |
Makes 3 attempts at connecting to the audio server defined in the parameters file.
Definition at line 52 of file AudioServerStream.py.
def dialogflow_ros.AudioServerStream.AudioServerStream.__exit__ | ( | self, | |
type, | |||
value, | |||
traceback | |||
) |
Definition at line 80 of file AudioServerStream.py.
|
private |
Creates a socket to listen for audio data from the server.
Definition at line 33 of file AudioServerStream.py.
|
private |
Daemon thread that receives data from the audio socket and puts in a buffer. Works just like _get_audio_data but data comes from server, not mic.
Definition at line 39 of file AudioServerStream.py.
def dialogflow_ros.AudioServerStream.AudioServerStream.generator | ( | self | ) |
Definition at line 89 of file AudioServerStream.py.
|
private |
Definition at line 30 of file AudioServerStream.py.
|
private |
Definition at line 17 of file AudioServerStream.py.
|
private |
Definition at line 23 of file AudioServerStream.py.
|
private |
Definition at line 19 of file AudioServerStream.py.
|
private |
Definition at line 16 of file AudioServerStream.py.
|
private |
Definition at line 18 of file AudioServerStream.py.
dialogflow_ros.AudioServerStream.AudioServerStream.closed |
Definition at line 31 of file AudioServerStream.py.
dialogflow_ros.AudioServerStream.AudioServerStream.data_thread |
Definition at line 26 of file AudioServerStream.py.
dialogflow_ros.AudioServerStream.AudioServerStream.s |
Definition at line 22 of file AudioServerStream.py.