Method: projects.locations.apps.evaluations.uploadEvaluationAudio

Uploads audio for use in Golden Evaluations. Stores the audio in the Cloud Storage bucket defined in 'App.logging_settings.evaluation_audio_recording_config.gcs_bucket' and returns a transcript.

HTTP request

POST https://ces.googleapis.com/v1beta/{name=projects/*/locations/*/apps/*/evaluations/*}:uploadEvaluationAudio

The URL uses gRPC Transcoding syntax.

Path parameters

Parameters
name

string

Required. The resource name of the Evaluation for which to upload the evaluation audio. Format: projects/{project}/locations/{location}/apps/{app}/evaluations/{evaluation}

Request body

The request body contains data with the following structure:

JSON representation
{
  "audioContent": string,
  "previousAudioGcsUri": string
}
Fields
audioContent

string (bytes format)

Required. The raw audio bytes. The format of the audio must be single-channel LINEAR16 with a sample rate of 16kHz (default InputAudioConfig).

A base64-encoded string.

previousAudioGcsUri

string

Optional. The Google Cloud Storage URI of the previously uploaded audio file to be deleted. Format: gs://<bucket-name>/<object-name>

Response body

Response message for EvaluationService.UploadEvaluationAudio.

If successful, the response body contains data with the following structure:

JSON representation
{
  "audioGcsUri": string,
  "transcript": string,
  "duration": string
}
Fields
audioGcsUri

string

The Google Cloud Storage URI where the uploaded audio file is stored. Format: gs://<bucket-name>/<object-name>

transcript

string

The transcript of the audio, generated by Cloud Speech-to-Text.

duration

string (Duration format)

The duration of the audio.

A duration in seconds with up to nine fractional digits, ending with 's'. Example: "3.5s".

Authorization scopes

Requires one of the following OAuth scopes:

  • https://www.googleapis.com/auth/cloud-platform
  • https://www.googleapis.com/auth/ces

For more information, see the Authentication Overview.

IAM Permissions

Requires the following IAM permission on the name resource:

  • ces.evaluations.update

For more information, see the IAM documentation.