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 |
SpeechRecognitionClient_Google class
Definition at line 28 of file sr/client_google.py.
initialize function
Definition at line 38 of file sr/client_google.py.
def rospeex_core.sr.client_google.SpeechRecognitionClient_Google._check_api_key | ( | self | ) | [private] |
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.
def rospeex_core.sr.client_google.SpeechRecognitionClient_Google._extract_alternative_final_key_data | ( | cls, | |
input_data | |||
) | [private] |
extract alternative key data @param input_data: @type input_data: dict()
Definition at line 192 of file sr/client_google.py.
def rospeex_core.sr.client_google.SpeechRecognitionClient_Google._extract_final_data | ( | cls, | |
intput_data | |||
) | [private] |
extract final data from server response @param input_data: @type input_data: dict()
Definition at line 205 of file sr/client_google.py.
def rospeex_core.sr.client_google.SpeechRecognitionClient_Google._extract_result_key_data | ( | cls, | |
input_data | |||
) | [private] |
extract result data from server response @param input_data: @type input_data: dict()
Definition at line 173 of file sr/client_google.py.
def rospeex_core.sr.client_google.SpeechRecognitionClient_Google._extract_transcript_data | ( | cls, | |
input_data | |||
) | [private] |
extract transcript data from server response @param input_data: @type input_data: dict()
Definition at line 218 of file sr/client_google.py.
def rospeex_core.sr.client_google.SpeechRecognitionClient_Google._load_parameter | ( | self | ) | [private] |
load parameter from rospy
Definition at line 77 of file sr/client_google.py.
def rospeex_core.sr.client_google.SpeechRecognitionClient_Google._process_data | ( | self, | |
input_str | |||
) | [private] |
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.
Definition at line 38 of file sr/client_google.py.
int rospeex_core::sr::client_google.SpeechRecognitionClient_Google::AUDIO_LENGTH = 16000 [static] |
Definition at line 30 of file sr/client_google.py.
Definition at line 32 of file sr/client_google.py.
int rospeex_core::sr::client_google.SpeechRecognitionClient_Google::FRAMERATE = 16000 [static] |
Definition at line 31 of file sr/client_google.py.
list rospeex_core::sr::client_google.SpeechRecognitionClient_Google::LANGUAGES = ['ja', 'en'] [static] |
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.