Skip to content

lr.transcript.v1alpha1

TranscriptService

TranscriptService

Service for requesting, retrieving and updating transcriptions of audio (and video)

GetUsers

rpc GetUsers(GetUsersRequest) GetUsersResponse

REST mapping

Verb Path Body
GET /v1alpha1/users

UpdateUser

rpc UpdateUser(UpdateUserRequest) User

REST mapping

Verb Path Body
PATCH /v1alpha1/user/{user.user_id} user

SubmitTranscriptJob

rpc SubmitTranscriptJob(SubmitTranscriptJobRequest) TranscriptJob

Submit audio or video to be transcribed

REST mapping

Verb Path Body
POST /v1alpha1/transcriptjob:submit *

GetTranscriptJob

rpc GetTranscriptJob(GetTranscriptJobRequest) TranscriptJob

Get status of submitted transcript job

REST mapping

Verb Path Body
GET /v1alpha1/{name=transcriptjob/*}

WatchTranscriptJobs

rpc WatchTranscriptJobs(WatchTranscriptJobsRequest) WatchTranscriptJobsResponse

Start watching for changes in submitted transcription jobs.

The first successful response will contain all jobs that match WatchTranscriptJobsRequest.filter. Subsequent responses will have update=true and jobs will contain only updated jobs.

REST mapping

Verb Path Body

ListTranscriptJobs

rpc ListTranscriptJobs(ListTranscriptJobsRequest) ListTranscriptJobsResponse

REST mapping

Verb Path Body
GET /v1alpha1/transcriptjobs

AcknowledgeTranscriptJob

rpc AcknowledgeTranscriptJob(AcknowledgeTranscriptJobRequest) google.protobuf.Empty

REST mapping

Verb Path Body
POST /v1alpha1/{name=transcriptjob/*}:acknowledge

ReportTranscriptJobFileUploadStatus

rpc ReportTranscriptJobFileUploadStatus(ReportTranscriptJobFileUploadStatusRequest) ReportTranscriptJobFileUploadStatusResponse

Report on whether a client-side file upload was a success or a failure.

REST mapping

Verb Path Body
POST /v1alpha/reportupload

CreateTranscript

rpc CreateTranscript(CreateTranscriptRequest) CreateTranscriptResponse

Create a single transcript

This RPC can be used to add out-of-band transcripts to the system, e.g. to save a dictated report as a transcript.

REST mapping

Verb Path Body
POST /v1alpha1/transcripts transcript

GetTranscript

rpc GetTranscript(GetTranscriptRequest) Transcript

Request single transcript from the service.

REST mapping

Verb Path Body
GET /v1alpha1/{name=transcripts/*}

UpdateTranscript

rpc UpdateTranscript(UpdateTranscriptRequest) Transcript

Update any number of fields in an existing Transcript and return the updated transcript.

REST mapping

Verb Path Body
PATCH /v1alpha1/{transcript.name=transcripts/*} transcript

WatchTranscripts

rpc WatchTranscripts(WatchTranscriptsRequest) WatchTranscriptsResponse

Start watching for changes in transcripts.

REST mapping

Verb Path Body

ListTranscripts

rpc ListTranscripts(ListTranscriptsRequest) ListTranscriptsResponse

REST mapping

Verb Path Body
GET /v1alpha1/transcripts

ExportTranscript

rpc ExportTranscript(ExportTranscriptRequest) ExportTranscriptResponse

Export a transcript in a specific standard (or non-standard) format

REST mapping

Verb Path Body
GET /v1alpha1/{name=transcripts/*}/export/{format}

DeleteTranscript

rpc DeleteTranscript(DeleteTranscriptRequest) google.protobuf.Empty

Delete all versions of Transcript and recording if exists

REST mapping

Verb Path Body
DELETE /v1alpha1/{name=transcripts/*}

SubmitAlignmentJob

rpc SubmitAlignmentJob(SubmitAlignmentJobRequest) AlignmentJob

Submit transcript to be (re-)aligned

REST mapping

Verb Path Body
POST /v1alpha1/alignmentjobs:submit *

GetAlignmentJob

rpc GetAlignmentJob(GetAlignmentJobRequest) AlignmentJob

Get status of submitted alignment job

REST mapping

Verb Path Body
GET /v1alpha1/{name=alignmentjobs/*}

CancelAlignmentJob

rpc CancelAlignmentJob(CancelAlignmentJobRequest) AlignmentJob

Cancel a submitted alignment job

REST mapping

Verb Path Body
POST /v1alpha1/{name=alignmentjobs/*}:cancel *

WatchAlignmentJobs

rpc WatchAlignmentJobs(WatchAlignmentJobsRequest) WatchAlignmentJobsResponse

Start watching for changes in submitted alignment jobs.

The first successful response will contain all jobs that match WatchAlignmentJobsRequest.filter. Subsequent responses will have update=true and jobs will contain only updated jobs.

REST mapping

Verb Path Body

ListAlignmentJobs

rpc ListAlignmentJobs(ListAlignmentJobsRequest) ListAlignmentJobsResponse

REST mapping

Verb Path Body
GET /v1alpha1/alignmentjobs

Signup

rpc Signup(SignupRequest) google.protobuf.Empty

REST mapping

Verb Path Body
POST /v1alpha1/signup

ChangeTranscriptOwner

rpc ChangeTranscriptOwner(ChangeTranscriptOwnerRequest) ChangeTranscriptOwnerResponse

REST mapping

Verb Path Body
PATCH /v1alpha1/permissions:modify

InitUpload

rpc InitUpload(InitUploadRequest) InitUploadResponse

REST mapping

Verb Path Body
POST /v1alpha1/initupload *

Messages

AcknowledgeTranscriptJobRequest

Field Type Description
name string Set transcript_job_acknowledge to true

AlignmentJob

Field Type Description
name string none
state AlignmentJob.State State of the alignment job for transcript.
progress_percent int32 none
start_time google.protobuf.Timestamp none
last_updated_time google.protobuf.Timestamp none
transcript string Name of transcript being aligned.
transcript_version string none
error google.rpc.Status Error details set if state==ERROR

CancelAlignmentJobRequest

Field Type Description
name string The name of the alignment job to cancel.

For example: "alignmentjobs/42d1b568-fad4-4312-b134-05a8488724bf"

ChangeTranscriptOwnerRequest

Field Type Description
transcript_name string none
user_name string none
new_user_name string none

ChangeTranscriptOwnerResponse

Field Type Description
success bool none
message string none

CreateTranscriptRequest

Field Type Description
transcript Transcript Any non output-only field can be set

CreateTranscriptResponse

Field Type Description
name string Resouce identifier for the created transcript: transcripts/{some-unique-name}

DeleteTranscriptRequest

Field Type Description
name string Any non output-only field that is set will be deleted

ExportTranscriptRequest

Field Type Description
name string Resource name of transcript. For example: "transcripts/xyz".
version string Set to request a specific version of the transcript. Defaults to the most recent number.
format ExportFormat Which format to export

ExportTranscriptResponse

Field Type Description
exported_transcript google.api.HttpBody none

GetAlignmentJobRequest

Field Type Description
oneof resources.name string The name of the alignment job to get the status for.

For example: "alignmentjobs/42d1b568-fad4-4312-b134-05a8488724bf"
oneof resources.transcript string Get the latest alignment job by the name of the target transcript

For example: "transcripts/42d1b568-fad4-4312-b134-05a8488724bf" or to align a specific version (other than the most recent): "transcripts/42d1b568-fad4-4312-b134-05a8488724bf/version/fc694a69-84b6-4c14-9498-bfb93ab68d54"

GetTranscriptJobRequest

Field Type Description
name string TranscriptJob name. For example: "transcriptjob/42d1b568-fad4-4312-b134-05a8488724bf"

GetTranscriptRequest

Field Type Description
name string Resource name of transcript. For example: "transcripts/xyz"
version string Set to request a specific version of the transcript

GetUsersRequest

Field Type Description
page_token string none
page_size int32 none
filter string none
group_filter GetUsersRequest.GroupFilter[] none

GetUsersResponse

Field Type Description
users User[] none
next_page_token string none
total_size int32 none

InitUploadRequest

Field Type Description
resource_name string Resource can be either a transcript or a dictation.

InitUploadResponse

Field Type Description
gcs_signed_url string none

ListAlignmentJobsRequest

Field Type Description
filter string none
page_size int32 none
page_token string none

ListAlignmentJobsResponse

Field Type Description
jobs AlignmentJob[] none
next_page_token string none

ListTranscriptJobsRequest

Field Type Description
filter string none
page_size int32 none
page_token string none

ListTranscriptJobsResponse

Field Type Description
jobs TranscriptJob[] none
next_page_token string none

ListTranscriptsRequest

Field Type Description
filter string Lists of Transcripts can be filtered by the following fields of metadata: keywords and subject

To retrieve all transcripts which have either keyword1 or keyword1: metadata.keywords CONTAINS ["keyword1", "keyword2"]

To filter by subject: metadata.subject CONTAINS "this is a subject"
page_size int32 none
page_token string none
ordering TranscriptsOrdering none

ListTranscriptsResponse

Field Type Description
transcripts Transcript[] The returned transcripts will not have segments field set.
next_page_token string none

ReportTranscriptJobFileUploadStatusRequest

Field Type Description
upload_successful bool none
blob_name string none

ReportTranscriptJobFileUploadStatusResponse

Field Type Description
acknowledged bool none

SignupRequest

Field Type Description
feature string Indicates feature that is sending request

SpeakerInfo

Field Type Description
full_name string none
age_group SpeakerInfo.AgeGroup none
gender SpeakerInfo.Gender none

SubmitAlignmentJobRequest

Field Type Description
transcript string The name of the transcript to (re-)align.

For example: "transcripts/42d1b568-fad4-4312-b134-05a8488724bf"

SubmitTranscriptJobRequest

Field Type Description
metadata TranscriptMetadata At least the following fields of metadata are required to be set: metadata.file_type, metadata.language_code
use_uri bool Files can be submitted to be transcribed either by a URI accessible by the service or uploaded using the google.bytestream.ByteStream API using the resource name "blob/{transcript_name}", e.g. "blob/transcripts/42d1b568-fad4-4312-b134-05a8488724bf"
uri string Required to be set if use_uri==true. A URI, accessible by the service, which points to an audio or video file/stream to be transcribed.

Transcript

Field Type Description
name string The server-assigned name. Should have the format of transcripts/{some-unique-name}.
metadata TranscriptMetadata none
segments Transcript.TranscriptSegment[] A transcript consists of multiple audio aligned segments.
uri string The URI for locating the audio (or video) for the transcript. This may be an external URI if a URI was orignally submitted. If submission was done by a file upload this will be a server-generated uri.
version Transcript.Version output-only

Transcript.TranscriptSegment

Field Type Description
start_time google.protobuf.Duration none
end_time google.protobuf.Duration none
words Transcript.TranscriptSegment.WordInfo[] none
speaker_id string An ID that is unique for the speaker within the transcript.

Transcript.TranscriptSegment.WordInfo

Field Type Description
start_time google.protobuf.Duration none
end_time google.protobuf.Duration none
word string none

Transcript.Version

Field Type Description
name string Server-assigned name of version
parent string Version name of parent. Unset if there is no parent.
creation_time google.protobuf.Timestamp none

TranscriptJob

Field Type Description
name string none
state TranscriptJob.State State of the transcription job for transcript
progress_percent int32 none
start_time google.protobuf.Timestamp none
last_updated_time google.protobuf.Timestamp none
oneof result.transcript string Name of the transcript. Only set if state == State.SUCCESS.
oneof result.transcript_deleted bool none
oneof result.transcript_job_acknowledge bool none
oneof result.error google.rpc.Status none
transcript_metadata TranscriptMetadata none
gcs_signed_url string Used client-side to upload the file to GCS.

TranscriptMetadata

Field Type Description
file_type TranscriptMetadata.FileType Required The format of the original file, i.e. whether it's audio or video.
language_code string Required The language of the supplied audio as a BCP-47 language tag. Example: "en-US".
oneof original_source.original_filename string Output-only
oneof original_source.original_uri string Output-only This will not be set if original submission used file content instead of URI.
oneof original_source.dictation bool none
data_source TranscriptMetadata.DataSource Indicates whether the audio was uploaded as a file or downloaded via URI.
subject string The subject, or title, of the transcript.
description string A free-form description of the contents of the transcript.
keywords string[] A collection of server or user generated keywords for the transcript.

| recording_duration | google.protobuf.Duration | Output-only The total duration of the recording. | | original_char_length | int32 | Output-only The total number of characters produced during transcription. | | original_byte_length | int32 | Output-only The total number of bytes produced during transcription. | | waveform_uri | string | Output-only The URI of a file containing waveform data peaks compatible *with e.g. Wavesurfer.js |

TranscriptMetadata.AdditionalMetadataEntry

Field Type Description
key string none
value string none

TranscriptMetadata.SpeakersEntry

Field Type Description
key string none
value SpeakerInfo none

TranscriptsOrdering

Field Type Description
direction TranscriptsOrdering.Direction Requested order of returned results.

Default is DESCENDING
order_by string Order returned results by the specified field in Transcript

The only fields currently supported are subject, metadata.recording_duration, and version.creation_time.

If left unspecified results are ordered by version.creation_time

UpdateTranscriptRequest

Field Type Description
transcript Transcript Any non output-only field that is set will be updated
update_mask google.protobuf.FieldMask none

UpdateUserRequest

Field Type Description
user User none
update_mask google.protobuf.FieldMask none

User

Field Type Description
user_id string none
name string none
email string none
groups string[] none

WatchAlignmentJobsRequest

Field Type Description
filter string none
update_only bool Set to true to only watch for updates to jobs.

The server will send responses iff jobs receive updates and all responses will have update==true

WatchAlignmentJobsResponse

Field Type Description
update bool When update == true the jobs will only contain updates.
jobs AlignmentJob[] none

WatchTranscriptJobsRequest

Field Type Description
filter string Not implemented

WatchTranscriptJobsResponse

Field Type Description
update bool When update == true the jobs will only contain updates.
jobs TranscriptJob[] none

WatchTranscriptsRequest

Field Type Description
filter string See filter in ListTranscriptsRequest
page_size int32 none
page_token string none
ordering TranscriptsOrdering none

WatchTranscriptsResponse

Field Type Description
update bool When update == true the transcripts field will only contain updates.
transcripts Transcript[] The returned transcripts will not have segments field set.
next_page_token string none

Enums

true

AlignmentJob.State

Name Number Description
STATE_UNSPECIFIED 0 none
SUBMITTED 1 AlignmentJob has been submitted.
QUEUED 2 Job is waiting in the queue
TRANSCODING 3 Transcoding media for processing
ALIGNING 4 Media is being aligned
SUCCESS 5 Job finished successfully.

The Transcript has been updated with the new alignment.
ERROR 6 Job failed for some reason. See the error field for details.
CANCELLED 7 Job was cancelled by the user

ExportFormat

Name Number Description
EXPORT_FORMAT_UNSPECIFIED 0 none
VTT_PAINT_ON 2 Paint-on style VTT format.

Each frame adds a single word and rolls lines up once full. This format is a somewhat hacky way getting paint-on to work with players with VTT support.
VTT_POP_ON 3 Pop-on style VTT format.
SRT 4 SRT format

This is almost the as VTT_POP_ON
AUDACITY_LABELS 5 Audacity label file

This has the start and end time for each word (block) in the transcript. E.g.:

2.150000 2.150000 word1 3.400000 6.100000 word2
PLAIN_TEXT 6 Plain text format.

Contains no time stamps, only text.
SMART_SRT 7 A smart formatted SRT file. Using dependacy parsing, we can format the SRT file to be more readable. This is done by splitting lines at the right places.

Example: --Bad line splitting-- --Good line splitting. Sökum skammsýni höfum Sökum skammsýni höfum við við útrýmt mörgum útrýmt mörgum tegundum

tegundum og fjölmargar og fjölmargar aðrar eru aðrar eru í mikilli í mikilli útrýmingarhættu

útrýmingarhættu vegna vegna gegndarlausrar ofveiði. gegndarlausrar ofveiði.

GetUsersRequest.GroupFilter

Name Number Description
GROUP_UNSPECIFIED 0 none
ADMIN 1 none
RTC 2 none

SpeakerInfo.AgeGroup

Name Number Description
AGE_GROUP_UNSPECIFIED 0 none
CHILD 1 Ages [0;13[
TEENAGER 2 Ages [13-18[
ADULT 3 Ages [18;65[
PENSIONER 4 [65; inf[

SpeakerInfo.Gender

Name Number Description
GENDER_UNSPECIFIED 0 none
MALE 1 none
FEMALE 2 none
OTHER 3 none

TranscriptJob.State

Name Number Description
SUBMITTED 0 none
WAITING_FOR_CONTENT 1 Service is waiting for content to be uploaded using the google.bytestream.ByteStream API
PROCESSING 2 Audio or video is being processed/transcribed.
SUCCESS 3 Job finished successfully. Client can use the name transcript to call GetTranscript()
ERROR 4 Job failed for some reason.
CANCELLED 5 Job was cancelled by the user

TranscriptMetadata.DataSource

Name Number Description
DATA_SOURCE_UNSPECIFIED 0 Not used.
FILE_UPLOAD 1 none
URI 2 none
RTC 3 none

TranscriptMetadata.FileType

Name Number Description
TYPE_UNSPECIFIED 0 Not specified. Will return INVALID_ARGUMENT.
AUDIO 1 none
VIDEO 2 none

TranscriptsOrdering.Direction

Name Number Description
DIRECTION_UNSPECIFIED 0 none
DESCENDING 1 none
ASCENDING 2 none

Scalar Value Types

.proto Type Notes C++ Type Java Type Python Type

double
double double float

float
float float float

int32
Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint32 instead. int32 int int

int64
Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint64 instead. int64 long int/long

uint32
Uses variable-length encoding. uint32 int int/long

uint64
Uses variable-length encoding. uint64 long int/long

sint32
Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int32s. int32 int int

sint64
Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int64s. int64 long int/long

fixed32
Always four bytes. More efficient than uint32 if values are often greater than 2^28. uint32 int int

fixed64
Always eight bytes. More efficient than uint64 if values are often greater than 2^56. uint64 long int/long

sfixed32
Always four bytes. int32 int int

sfixed64
Always eight bytes. int64 long int/long

bool
bool boolean boolean

string
A string must always contain UTF-8 encoded or 7-bit ASCII text. string String str/unicode

bytes
May contain any arbitrary sequence of bytes. string ByteString str