Public Member Functions | Public Attributes | Private Member Functions | Private Attributes | List of all members
google_client.GspeechClient Class Reference

Public Member Functions

def __del__ (self)
 
def __init__ (self)
 
def generator (self)
 
def get_data (self, in_data, frame_count, time_info, status)
 
def gspeech_client (self)
 
def start_client (self)
 

Public Attributes

 audio
 
 CHUNK
 
 closed
 
 context
 
 stream
 
 text_pub
 

Private Member Functions

def _listen_print_loop (self, responses)
 

Private Attributes

 _buff
 

Detailed Description

Definition at line 17 of file google_client.py.

Constructor & Destructor Documentation

def google_client.GspeechClient.__init__ (   self)

Definition at line 18 of file google_client.py.

def google_client.GspeechClient.__del__ (   self)
Shut down as cleanly as possible

Definition at line 161 of file google_client.py.

Member Function Documentation

def google_client.GspeechClient._listen_print_loop (   self,
  responses 
)
private
Iterates through server responses and prints them.
The responses passed is a generator that will block until a response
is provided by the server.
Each response may contain multiple results, and each result may contain
multiple alternatives; for details, see https://goo.gl/tjCPAU.  Here we
print only the transcription for the top alternative of the top result.

Definition at line 70 of file google_client.py.

def google_client.GspeechClient.generator (   self)
Generator function that continuously yields audio chunks from the buffer.
Used to stream data to the Google Speech API Asynchronously.

Definition at line 47 of file google_client.py.

def google_client.GspeechClient.get_data (   self,
  in_data,
  frame_count,
  time_info,
  status 
)
PyAudio callback to continuously get audio data from the server and put it in a buffer.

Definition at line 41 of file google_client.py.

def google_client.GspeechClient.gspeech_client (   self)
Creates the Google Speech API client, configures it, and sends/gets
audio/text data for parsing.

Definition at line 115 of file google_client.py.

def google_client.GspeechClient.start_client (   self)
Entry function to start the client

Definition at line 170 of file google_client.py.

Member Data Documentation

google_client.GspeechClient._buff
private

Definition at line 29 of file google_client.py.

google_client.GspeechClient.audio

Definition at line 24 of file google_client.py.

google_client.GspeechClient.CHUNK

Definition at line 23 of file google_client.py.

google_client.GspeechClient.closed

Definition at line 30 of file google_client.py.

google_client.GspeechClient.context

Definition at line 39 of file google_client.py.

google_client.GspeechClient.stream

Definition at line 25 of file google_client.py.

google_client.GspeechClient.text_pub

Definition at line 33 of file google_client.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