Reference documentation and code samples for the Cloud Text-to-Speech V1 Client class SynthesizeSpeechResponse.
The message returned to the client by the SynthesizeSpeech method.
Generated from protobuf message google.cloud.texttospeech.v1.SynthesizeSpeechResponse
Namespace
Google \ Cloud \ TextToSpeech \ V1
Methods
__construct
Constructor.
Parameters
Name
Description
data
array
Optional. Data for populating the Message object.
↳ audio_content
string
The audio data bytes encoded as specified in the request, including the header for encodings that are wrapped in containers (e.g. MP3, OGG_OPUS). For LINEAR16 audio, we include the WAV header. Note: as with all bytes fields, protobuffers use a pure binary representation, whereas JSON representations use base64.
getAudioContent
The audio data bytes encoded as specified in the request, including the
header for encodings that are wrapped in containers (e.g. MP3, OGG_OPUS).
For LINEAR16 audio, we include the WAV header. Note: as
with all bytes fields, protobuffers use a pure binary representation,
whereas JSON representations use base64.
Returns
Type
Description
string
setAudioContent
The audio data bytes encoded as specified in the request, including the
header for encodings that are wrapped in containers (e.g. MP3, OGG_OPUS).
For LINEAR16 audio, we include the WAV header. Note: as
with all bytes fields, protobuffers use a pure binary representation,
whereas JSON representations use base64.
[[["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 SynthesizeSpeechResponse (2.2.2)\n\nVersion latestkeyboard_arrow_down\n\n- [2.2.2 (latest)](/php/docs/reference/cloud-text-to-speech/latest/V1.SynthesizeSpeechResponse)\n- [2.2.1](/php/docs/reference/cloud-text-to-speech/2.2.1/V1.SynthesizeSpeechResponse)\n- [2.0.1](/php/docs/reference/cloud-text-to-speech/2.0.1/V1.SynthesizeSpeechResponse)\n- [1.12.2](/php/docs/reference/cloud-text-to-speech/1.12.2/V1.SynthesizeSpeechResponse)\n- [1.11.0](/php/docs/reference/cloud-text-to-speech/1.11.0/V1.SynthesizeSpeechResponse)\n- [1.10.0](/php/docs/reference/cloud-text-to-speech/1.10.0/V1.SynthesizeSpeechResponse)\n- [1.9.1](/php/docs/reference/cloud-text-to-speech/1.9.1/V1.SynthesizeSpeechResponse)\n- [1.8.5](/php/docs/reference/cloud-text-to-speech/1.8.5/V1.SynthesizeSpeechResponse)\n- [1.7.2](/php/docs/reference/cloud-text-to-speech/1.7.2/V1.SynthesizeSpeechResponse)\n- [1.6.1](/php/docs/reference/cloud-text-to-speech/1.6.1/V1.SynthesizeSpeechResponse)\n- [1.5.6](/php/docs/reference/cloud-text-to-speech/1.5.6/V1.SynthesizeSpeechResponse)\n- [1.4.5](/php/docs/reference/cloud-text-to-speech/1.4.5/V1.SynthesizeSpeechResponse) \nReference documentation and code samples for the Cloud Text-to-Speech V1 Client class SynthesizeSpeechResponse.\n\nThe message returned to the client by the `SynthesizeSpeech` method.\n\nGenerated from protobuf message `google.cloud.texttospeech.v1.SynthesizeSpeechResponse`\n\nNamespace\n---------\n\nGoogle \\\\ Cloud \\\\ TextToSpeech \\\\ V1\n\nMethods\n-------\n\n### __construct\n\nConstructor.\n\n### getAudioContent\n\nThe audio data bytes encoded as specified in the request, including the\nheader for encodings that are wrapped in containers (e.g. MP3, OGG_OPUS).\n\nFor LINEAR16 audio, we include the WAV header. Note: as\nwith all bytes fields, protobuffers use a pure binary representation,\nwhereas JSON representations use base64.\n\n### setAudioContent\n\nThe audio data bytes encoded as specified in the request, including the\nheader for encodings that are wrapped in containers (e.g. MP3, OGG_OPUS).\n\nFor LINEAR16 audio, we include the WAV header. Note: as\nwith all bytes fields, protobuffers use a pure binary representation,\nwhereas JSON representations use base64."]]