airflow.contrib.hooks.gcp_speech_to_text_hook

Module Contents

class airflow.contrib.hooks.gcp_speech_to_text_hook.GCPSpeechToTextHook(gcp_conn_id='google_cloud_default', delegate_to=None)[source]

Bases: airflow.contrib.hooks.gcp_api_base_hook.GoogleCloudBaseHook

Hook for Google Cloud Speech API.

Parameters
  • gcp_conn_id (str) – The connection ID to use when fetching connection info.

  • delegate_to (str) – The account to impersonate, if any. For this to work, the service account making the request must have domain-wide delegation enabled.

_client[source]
get_conn(self)[source]

Retrieves connection to Cloud Speech.

Returns

Google Cloud Speech client object.

Return type

google.cloud.speech_v1.SpeechClient

recognize_speech(self, config, audio, retry=None, timeout=None)[source]

Recognizes audio input

Parameters