Public Member Functions | Public Attributes | Private Member Functions | Private Attributes | List of all members
dialogflow_ros.AudioServerStream.AudioServerStream Class Reference
Inheritance diagram for dialogflow_ros.AudioServerStream.AudioServerStream:
Inheritance graph
[legend]

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
 

Detailed Description

Opens a recording stream as a generator yielding the audio chunks.

Definition at line 12 of file AudioServerStream.py.

Constructor & Destructor Documentation

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.

Member Function Documentation

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.

def dialogflow_ros.AudioServerStream.AudioServerStream._connect (   self)
private
Creates a socket to listen for audio data from the server.

Definition at line 33 of file AudioServerStream.py.

def dialogflow_ros.AudioServerStream.AudioServerStream._get_server_data (   self)
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.

Member Data Documentation

dialogflow_ros.AudioServerStream.AudioServerStream._buff
private

Definition at line 30 of file AudioServerStream.py.

dialogflow_ros.AudioServerStream.AudioServerStream._chunk
private

Definition at line 17 of file AudioServerStream.py.

dialogflow_ros.AudioServerStream.AudioServerStream._connected
private

Definition at line 23 of file AudioServerStream.py.

dialogflow_ros.AudioServerStream.AudioServerStream._port
private

Definition at line 19 of file AudioServerStream.py.

dialogflow_ros.AudioServerStream.AudioServerStream._rate
private

Definition at line 16 of file AudioServerStream.py.

dialogflow_ros.AudioServerStream.AudioServerStream._server_name
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.


The documentation for this class was generated from the following file:


dialogflow_ros
Author(s): Anas Abou Allaban
autogenerated on Mon Jun 10 2019 13:02:59