# Cloud Text-to-Speech V1beta1 API - Class Google::Cloud::TextToSpeech::V1beta1::Voice (v0.31.0)

0.31.0 (latest) 0.30.0 0.29.0 0.28.0 0.27.1 0.26.0 0.25.0 0.24.0 0.23.0 0.22.0 0.21.0 0.20.1 0.19.0 0.18.0 0.17.0 0.16.0 0.15.2 0.14.0 0.13.2 0.12.1 0.11.1 0.10.1 0.9.1 0.8.0 0.7.1 Reference documentation and code samples for the Cloud Text-to-Speech V1beta1 API class Google::Cloud::TextToSpeech::V1beta1::Voice.

Description of a voice supported by the TTS service.

## Inherits

- Object

## Extended By

- Google::Protobuf::MessageExts::ClassMethods

## Includes

- Google::Protobuf::MessageExts

## Methods

### #language_codes

    def language_codes() -> ::Array<::String>

**Returns**

- (::Array\<::String\>) --- 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").

### #language_codes=

    def language_codes=(value) -> ::Array<::String>

**Parameter**

- **value** (::Array\<::String\>) --- 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").
**Returns**

- (::Array\<::String\>) --- 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").

### #name

    def name() -> ::String

**Returns**

- (::String) --- The name of this voice. Each distinct voice has a unique name.

### #name=

    def name=(value) -> ::String

**Parameter**

- **value** (::String) --- The name of this voice. Each distinct voice has a unique name.
**Returns**

- (::String) --- The name of this voice. Each distinct voice has a unique name.

### #natural_sample_rate_hertz

    def natural_sample_rate_hertz() -> ::Integer

**Returns**

- (::Integer) --- The natural sample rate (in hertz) for this voice.

### #natural_sample_rate_hertz=

    def natural_sample_rate_hertz=(value) -> ::Integer

**Parameter**

- **value** (::Integer) --- The natural sample rate (in hertz) for this voice.
**Returns**

- (::Integer) --- The natural sample rate (in hertz) for this voice.

### #ssml_gender

    def ssml_gender() -> ::Google::Cloud::TextToSpeech::V1beta1::SsmlVoiceGender

**Returns**

- ([::Google::Cloud::TextToSpeech::V1beta1::SsmlVoiceGender](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-text_to_speech-v1beta1/latest/Google-Cloud-TextToSpeech-V1beta1-SsmlVoiceGender)) --- The gender of this voice.

### #ssml_gender=

    def ssml_gender=(value) -> ::Google::Cloud::TextToSpeech::V1beta1::SsmlVoiceGender

**Parameter**

- **value** ([::Google::Cloud::TextToSpeech::V1beta1::SsmlVoiceGender](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-text_to_speech-v1beta1/latest/Google-Cloud-TextToSpeech-V1beta1-SsmlVoiceGender)) --- The gender of this voice.
**Returns**

- ([::Google::Cloud::TextToSpeech::V1beta1::SsmlVoiceGender](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-text_to_speech-v1beta1/latest/Google-Cloud-TextToSpeech-V1beta1-SsmlVoiceGender)) --- The gender of this voice.