Reference documentation and code samples for the Cloud Text-to-Speech V1 Client class ListVoicesRequest.
The top-level message sent by the client for theListVoicesmethod.
Generated from protobuf messagegoogle.cloud.texttospeech.v1.ListVoicesRequest
Namespace
Google \ Cloud \ TextToSpeech \ V1
Methods
__construct
Constructor.
Parameters
Name
Description
data
array
Optional. Data for populating the Message object.
↳ language_code
string
Optional. Recommended.BCP-47language tag. If not specified, the API will return all supported voices. If specified, the ListVoices call will only return voices that can be used to synthesize this language_code. For example, if you specify"en-NZ", all"en-NZ"voices will be returned. If you specify"no", both"no-\*"(Norwegian) and"nb-\*"(Norwegian Bokmal) voices will be returned.
getLanguageCode
Optional. Recommended.
BCP-47language tag.
If not specified, the API will return all supported voices.
If specified, the ListVoices call will only return voices that can be used
to synthesize this language_code. For example, if you specify"en-NZ",
all"en-NZ"voices will be returned. If you specify"no", both"no-\*"(Norwegian) and"nb-\*"(Norwegian Bokmal) voices will be
returned.
Returns
Type
Description
string
setLanguageCode
Optional. Recommended.
BCP-47language tag.
If not specified, the API will return all supported voices.
If specified, the ListVoices call will only return voices that can be used
to synthesize this language_code. For example, if you specify"en-NZ",
all"en-NZ"voices will be returned. If you specify"no", both"no-\*"(Norwegian) and"nb-\*"(Norwegian Bokmal) voices will be
returned.
Parameter
Name
Description
var
string
Returns
Type
Description
$this
static::build
Parameter
Name
Description
languageCode
string
Optional. Recommended.BCP-47language tag.
If not specified, the API will return all supported voices.
If specified, the ListVoices call will only return voices that can be used
to synthesize this language_code. For example, if you specify"en-NZ",
all"en-NZ"voices will be returned. If you specify"no", both"no-\*"(Norwegian) and"nb-\*"(Norwegian Bokmal) voices will be
returned.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-09 UTC."],[],[],null,["# Cloud Text-to-Speech V1 Client - Class ListVoicesRequest (2.2.2)\n\nVersion latestkeyboard_arrow_down\n\n- [2.2.2 (latest)](/php/docs/reference/cloud-text-to-speech/latest/V1.ListVoicesRequest)\n- [2.2.1](/php/docs/reference/cloud-text-to-speech/2.2.1/V1.ListVoicesRequest)\n- [2.0.1](/php/docs/reference/cloud-text-to-speech/2.0.1/V1.ListVoicesRequest)\n- [1.12.2](/php/docs/reference/cloud-text-to-speech/1.12.2/V1.ListVoicesRequest)\n- [1.11.0](/php/docs/reference/cloud-text-to-speech/1.11.0/V1.ListVoicesRequest)\n- [1.10.0](/php/docs/reference/cloud-text-to-speech/1.10.0/V1.ListVoicesRequest)\n- [1.9.1](/php/docs/reference/cloud-text-to-speech/1.9.1/V1.ListVoicesRequest)\n- [1.8.5](/php/docs/reference/cloud-text-to-speech/1.8.5/V1.ListVoicesRequest)\n- [1.7.2](/php/docs/reference/cloud-text-to-speech/1.7.2/V1.ListVoicesRequest)\n- [1.6.1](/php/docs/reference/cloud-text-to-speech/1.6.1/V1.ListVoicesRequest)\n- [1.5.6](/php/docs/reference/cloud-text-to-speech/1.5.6/V1.ListVoicesRequest)\n- [1.4.5](/php/docs/reference/cloud-text-to-speech/1.4.5/V1.ListVoicesRequest) \nReference documentation and code samples for the Cloud Text-to-Speech V1 Client class ListVoicesRequest.\n\nThe top-level message sent by the client for the `ListVoices` method.\n\nGenerated from protobuf message `google.cloud.texttospeech.v1.ListVoicesRequest`\n\nNamespace\n---------\n\nGoogle \\\\ Cloud \\\\ TextToSpeech \\\\ V1\n\nMethods\n-------\n\n### __construct\n\nConstructor.\n\n### getLanguageCode\n\nOptional. Recommended.\n\n[BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag.\nIf not specified, the API will return all supported voices.\nIf specified, the ListVoices call will only return voices that can be used\nto synthesize this language_code. For example, if you specify `\"en-NZ\"`,\nall `\"en-NZ\"` voices will be returned. If you specify `\"no\"`, both\n`\"no-\\*\"` (Norwegian) and `\"nb-\\*\"` (Norwegian Bokmal) voices will be\nreturned.\n\n### setLanguageCode\n\nOptional. Recommended.\n\n[BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag.\nIf not specified, the API will return all supported voices.\nIf specified, the ListVoices call will only return voices that can be used\nto synthesize this language_code. For example, if you specify `\"en-NZ\"`,\nall `\"en-NZ\"` voices will be returned. If you specify `\"no\"`, both\n`\"no-\\*\"` (Norwegian) and `\"nb-\\*\"` (Norwegian Bokmal) voices will be\nreturned.\n\n### static::build"]]