Analyze Sentiment

Arguments

  • text_file: str
  • file_type: str = text
  • json_file: str = None
  • lang=None

Analyze sentiment in a text file

param text_file:
 source text file
param json_file:
 json target to save result, defaults to None
param lang:language code of the source, defaults to None
return:analysis response

Annotate Image

Arguments

  • image_uri: str
  • json_file: str = None

Annotate image

param image_file:
 source image file
param json_file:
 json target to save result, defaults to None
return:detection response

Annotate Video

Arguments

  • video_uri: str = None
  • video_file: str = None
  • json_file: str = None
  • features: list = None

Annotate video

Possible values for features: - FEATURE_UNSPECIFIED, Unspecified. - LABEL_DETECTION, Label detection. Detect objects, such as dog or flower. - SHOT_CHANGE_DETECTION, Shot change detection. - EXPLICIT_CONTENT_DETECTION, Explicit content detection. - SPEECH_TRANSCRIPTION, Speech transcription. - TEXT_DETECTION, OCR text detection and tracking. - OBJECT_TRACKING, Object detection and tracking. - LOGO_RECOGNITION, Logo detection, tracking, and recognition.

If video_uri is given then that is used even if video_file is None.

param video_uri:
 Google Cloud Storage URI
param video_file:
 filepath to video
param json_file:
 json target to save result, defaults to None
param features:list of annotation features to detect, defaults to ["LABEL_DETECTION", "SHOT_CHANGE_DETECTION"]
return:annotate result

Classify Text

Arguments

  • text_file
  • json_file
  • lang=None

Classify text

param text_file:
 source text file
param json_file:
 json target to save result, defaults to None
param lang:language code of the source, defaults to None
return:classify response

Create Bucket

Arguments

  • bucket_name: str

Create Google Cloud Storage bucket

param bucket_name:
 name as string
return:bucket

Delete Bucket

Arguments

  • bucket_name: str

Delete Google Cloud Storage bucket

Bucket needs to be empty before it can be deleted.

param bucket_name:
 name as string

Delete Files

Arguments

  • bucket_name: str
  • files: typing.Any

Delete files in the bucket

Files need to be object name in the bucket.

param bucket_name:
 name as string
param files:single file, list of files or comma separated list of files
return:list of files which could not be deleted, or True if all were deleted

Detect Document

Arguments

  • image_file: str
  • json_file: str = None

Detect document

param image_file:
 source image file
param json_file:
 json target to save result, defaults to None
return:detection response

Detect Labels

Arguments

  • image_file: str
  • json_file: str = None

Detect labels in the image

param image_file:
 source image file
param json_file:
 json target to save result, defaults to None
return:detection response

Detect Text

Arguments

  • image_file: str
  • json_file: str = None

Detect text in the image

param image_file:
 source image file
param json_file:
 json target to save result, defaults to None
return:detection response

Download Files

Arguments

  • bucket_name: str
  • files: typing.Any

Download files from a bucket

Example files: files = {"mytestimg": "image1.png", "mydoc": "google.pdf

param bucket_name:
 name as string
param files:list of object names or dictionary of object names and target files
return:list of files which could not be downloaded, or True if all were downloaded

Face Detection

Arguments

  • image_uri: str
  • json_file: str = None

Detect faces

param image_uri:
 Google Cloud Storage URI
param json_file:
 json target to save result, defaults to None
return:detection response

Get Bucket

Arguments

  • bucket_name: str

Get Google Cloud Storage bucket

param bucket_name:
 name as string
return:bucket

Init Natural Language Client

Arguments

  • service_credentials_file: str = None
  • use_robocloud_vault: bool = False

Initialize Google Cloud Natural Language client

param service_credentials_file:
 filepath to credentials JSON
param use_robocloud_vault:
 use json stored into Robocloud Vault

Init Speech To Text Client

Arguments

  • service_credentials_file: str = None
  • use_robocloud_vault: bool = False

Initialize Google Cloud Speech to Text client

param service_credentials_file:
 filepath to credentials JSON
param use_robocloud_vault:
 use json stored into Robocloud Vault

Init Storage Client

Arguments

  • service_credentials_file: str = None
  • use_robocloud_vault: bool = False

Initialize Google Cloud Storage client

param service_credentials_file:
 filepath to credentials JSON
param use_robocloud_vault:
 use json stored into Robocloud Vault

Init Text To Speech Client

Arguments

  • service_credentials_file: str = None
  • use_robocloud_vault: bool = False

Initialize Google Cloud Text to Speech client

param service_credentials_file:
 filepath to credentials JSON
param use_robocloud_vault:
 use json stored into Robocloud Vault

Init Translation Client

Arguments

  • service_credentials_file: str = None
  • project_identifier: str = None
  • use_robocloud_vault: bool = False

Initialize Google Cloud Translation client

param service_credentials_file:
 filepath to credentials JSON
param project_identifier:
 identifier for Translation project
param use_robocloud_vault:
 use json stored into Robocloud Vault

Init Video Intelligence Client

Arguments

  • service_credentials_file: str = None
  • use_robocloud_vault: bool = False

Initialize Google Cloud Video Intelligence client

param service_credentials_file:
 filepath to credentials JSON
param use_robocloud_vault:
 use json stored into Robocloud Vault

Init Vision Client

Arguments

  • service_credentials_file: str = None
  • use_robocloud_vault: bool = False

Initialize Google Cloud Vision client

param service_credentials_file:
 filepath to credentials JSON
param use_robocloud_vault:
 use json stored into Robocloud Vault

List Buckets

Arguments

List Google Cloud Storage buckets

return:list of buckets

List Files

Arguments

  • bucket_name: str

List files in the bucket

param bucket_name:
 name as string
return:list of object names in the bucket

List Supported Voices

Arguments

  • language_code: str = None

List supported voices for the speech

param language_code:
 voice languages to list, defaults to None (all)
return:list of supported voices

Recognize

Arguments

  • audio_file_uri
  • encoding: str = FLAC
  • language_code: str = en_US
  • audio_channel_count=2

Recognize text in the audio file

param audio_file_uri:
 Google Cloud Storage URI
return:recognized texts

Set Robocloud Vault

Arguments

  • vault_name
  • vault_secret_key

Set Robocloud Vault name and secret key name

param vault_name:
 Robocloud Vault name
param vault_secret_key:
 Rococloud Vault secret key name

Synthesize Speech

Arguments

  • text
  • language=en-US
  • name=en-US-Standard-B
  • gender=MALE
  • encoding=MP3
  • target_file=synthesized.mp3

Synthesize speech synchronously

param text:input text to synthesize
param language:voice language, defaults to "en-US"
param name:voice name, defaults to "en-US-Standard-B"
param gender:voice gender, defaults to "MALE"
param encoding:result encoding type, defaults to "MP3"
param target_file:
 save synthesized output to file, defaults to "synthesized.mp3"
return:synthesized output in bytes

Translate

Arguments

  • text: typing.Any
  • source_language: str = None
  • target_language: str = None

Translate text

param text:text to translate
param source_language:
 language code, defaults to None
param target_language:
 language code, defaults to None
return:translated text

Upload File

Arguments

  • bucket_name: str
  • filename: str
  • target_name: str

Upload a file into a bucket

param bucket_name:
 name as string
param filename:filepath to upload file
param target_name:
 target object name

Upload Files

Arguments

  • bucket_name: str
  • files: dict

Upload files into a bucket

Example files: files = {"mytestimg": "image1.png", "mydoc": "google.pdf"}

param bucket_name:
 name as string
param files:dictionary of object names and filepaths