Cloud Text-to-Speech API . voices

Instance Methods

list(languageCode=None, x__xgafv=None)

Returns a list of Voice supported for synthesis.

Method Details

list(languageCode=None, x__xgafv=None)
Returns a list of Voice supported for synthesis.

Args:
  languageCode: string, Optional (but recommended)
[BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag. If
specified, the ListVoices call will only return voices that can be used to
synthesize this language_code. E.g. when specifying "en-NZ", you will get
supported "en-*" voices; when specifying "no", you will get supported
"no-*" (Norwegian) and "nb-*" (Norwegian Bokmal) voices; specifying "zh"
will also get supported "cmn-*" voices; specifying "zh-hk" will also get
supported "yue-*" voices.
  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # The message returned to the client by the `ListVoices` method.
    "voices": [ # The list of voices.
      { # Description of a voice supported by the TTS service.
        "ssmlGender": "A String", # The gender of this voice.
        "languageCodes": [ # The languages that this voice supports, expressed as
            # [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tags (e.g.
            # "en-US", "es-419", "cmn-tw").
          "A String",
        ],
        "naturalSampleRateHertz": 42, # The natural sample rate (in hertz) for this voice.
        "name": "A String", # The name of this voice.  Each distinct voice has a unique name.
      },
    ],
  }