Definition at line 12 of file mic_client.py.
def mic_client.GspeechClient.__init__ |
( |
|
self | ) |
|
def mic_client.GspeechClient._generator |
( |
|
self | ) |
|
|
private |
Generator function that continuously yields audio chunks from the buffer.
Used to stream data to the Google Speech API Asynchronously.
Definition at line 39 of file mic_client.py.
def mic_client.GspeechClient._get_data |
( |
|
self, |
|
|
|
in_data, |
|
|
|
frame_count, |
|
|
|
time_info, |
|
|
|
status |
|
) |
| |
|
private |
Daemon thread to continuously get audio data from the server and put
it in a buffer.
Definition at line 31 of file mic_client.py.
def mic_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 62 of file mic_client.py.
def mic_client.GspeechClient.gspeech_client |
( |
|
self | ) |
|
Creates the Google Speech API client, configures it, and sends/gets
audio/text data for parsing.
Definition at line 99 of file mic_client.py.
def mic_client.GspeechClient.shutdown |
( |
|
self | ) |
|
def mic_client.GspeechClient.start_client |
( |
|
self | ) |
|
Entry function to start the client
Definition at line 126 of file mic_client.py.
mic_client.GspeechClient._buff |
|
private |
mic_client.GspeechClient.audio |
mic_client.GspeechClient.CHUNK |
mic_client.GspeechClient.closed |
mic_client.GspeechClient.stream |
mic_client.GspeechClient.text_pub |
The documentation for this class was generated from the following file: