Public Member Functions | Static Public Attributes | Private Member Functions | Private Attributes
rospeex_core.sr.client_google.SpeechRecognitionClient_Google Class Reference
Inheritance diagram for rospeex_core.sr.client_google.SpeechRecognitionClient_Google:
Inheritance graph
[legend]

List of all members.

Public Member Functions

def __init__
def request

Static Public Attributes

int AUDIO_LENGTH = 16000
int CHANNELS = 1
int FRAMERATE = 16000
list LANGUAGES = ['ja', 'en']
int SAMPWIDTH = 2
string URL = 'https://www.google.com/speech-api/v2/recognize?'

Private Member Functions

def _check_api_key
def _create_request
def _extract_alternative_final_key_data
def _extract_final_data
def _extract_result_key_data
def _extract_transcript_data
def _load_parameter
def _process_data
def _request_google_server

Private Attributes

 _key

Detailed Description

SpeechRecognitionClient_Google class 

Definition at line 28 of file sr/client_google.py.


Constructor & Destructor Documentation

initialize function 

Definition at line 38 of file sr/client_google.py.


Member Function Documentation

check api key 

Definition at line 85 of file sr/client_google.py.

def rospeex_core.sr.client_google.SpeechRecognitionClient_Google._create_request (   self,
  access_key,
  language,
  data 
) [private]
create http request data for google speech api v2
@param access_key: google speech api key
@type  access_key: str
@param language: speech data language
@type  language: str
@param data: speech binary data
@type  data: str

Definition at line 130 of file sr/client_google.py.

extract alternative key data
@param input_data:
@type  input_data: dict()

Definition at line 192 of file sr/client_google.py.

extract final data from server response
@param input_data:
@type  input_data: dict()

Definition at line 205 of file sr/client_google.py.

extract result data from server response
@param input_data:
@type  input_data: dict()

Definition at line 173 of file sr/client_google.py.

extract transcript data from server response
@param input_data:
@type  input_data: dict()

Definition at line 218 of file sr/client_google.py.

load parameter from rospy 

Definition at line 77 of file sr/client_google.py.

Definition at line 151 of file sr/client_google.py.

def rospeex_core.sr.client_google.SpeechRecognitionClient_Google._request_google_server (   self,
  access_key,
  language,
  data,
  timeout 
) [private]
speech recognition request to google server (use speech api v2)
@param access_key: google speech api key
@type  access_key: str
@param language: speech data language
@type  language: str
@param data: speech binary data
@type  data: str
@param timeout: timeout time [s]
@type  timeout: int
@raise SpeechRecognitionException:

Definition at line 93 of file sr/client_google.py.

def rospeex_core.sr.client_google.SpeechRecognitionClient_Google.request (   self,
  data,
  language = 'ja',
  timeout = socket._GLOBAL_DEFAULT_TIMEOUT 
)
send speech recognition request to server
@param data: speech binary data
@type  data: str
@param language: speech data language
@type  language: str
@param timeout: time out time[ms]
@type  timeout: int

Reimplemented from rospeex_core.sr.client_base.SpeechRecognitionClient.

Definition at line 45 of file sr/client_google.py.


Member Data Documentation

Definition at line 38 of file sr/client_google.py.

Definition at line 30 of file sr/client_google.py.

Definition at line 32 of file sr/client_google.py.

Definition at line 31 of file sr/client_google.py.

Definition at line 34 of file sr/client_google.py.

Definition at line 33 of file sr/client_google.py.

string rospeex_core::sr::client_google.SpeechRecognitionClient_Google::URL = 'https://www.google.com/speech-api/v2/recognize?' [static]

Definition at line 35 of file sr/client_google.py.


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


rospeex_core
Author(s): Komei Sugiura
autogenerated on Wed Aug 26 2015 16:10:30