lr.transcript.v1alpha1
TranscriptService
Service for requesting, retrieving and updating transcriptions of audio (and video)
rpc GetUsers(GetUsersRequest)
GetUsersResponse
REST mapping
Verb |
Path |
Body |
GET |
/v1alpha1/users |
|
rpc UpdateUser(UpdateUserRequest)
User
REST mapping
Verb |
Path |
Body |
PATCH |
/v1alpha1/user/{user.user_id} |
user |
rpc SubmitTranscriptJob(SubmitTranscriptJobRequest)
TranscriptJob
Submit audio or video to be transcribed
REST mapping
Verb |
Path |
Body |
POST |
/v1alpha1/transcriptjob:submit |
* |
rpc GetTranscriptJob(GetTranscriptJobRequest)
TranscriptJob
Get status of submitted transcript job
REST mapping
Verb |
Path |
Body |
GET |
/v1alpha1/{name=transcriptjob/*} |
|
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
rpc ListTranscriptJobs(ListTranscriptJobsRequest)
ListTranscriptJobsResponse
REST mapping
Verb |
Path |
Body |
GET |
/v1alpha1/transcriptjobs |
|
rpc AcknowledgeTranscriptJob(AcknowledgeTranscriptJobRequest)
google.protobuf.Empty
REST mapping
Verb |
Path |
Body |
POST |
/v1alpha1/{name=transcriptjob/*}:acknowledge |
|
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 |
|
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 |
rpc GetTranscript(GetTranscriptRequest)
Transcript
Request single transcript from the service.
REST mapping
Verb |
Path |
Body |
GET |
/v1alpha1/{name=transcripts/*} |
|
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 |
rpc WatchTranscripts(WatchTranscriptsRequest)
WatchTranscriptsResponse
Start watching for changes in transcripts.
REST mapping
rpc ListTranscripts(ListTranscriptsRequest)
ListTranscriptsResponse
REST mapping
Verb |
Path |
Body |
GET |
/v1alpha1/transcripts |
|
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} |
|
rpc DeleteTranscript(DeleteTranscriptRequest)
google.protobuf.Empty
Delete all versions of Transcript and recording if exists
REST mapping
Verb |
Path |
Body |
DELETE |
/v1alpha1/{name=transcripts/*} |
|
rpc SubmitAlignmentJob(SubmitAlignmentJobRequest)
AlignmentJob
Submit transcript to be (re-)aligned
REST mapping
Verb |
Path |
Body |
POST |
/v1alpha1/alignmentjobs:submit |
* |
rpc GetAlignmentJob(GetAlignmentJobRequest)
AlignmentJob
Get status of submitted alignment job
REST mapping
Verb |
Path |
Body |
GET |
/v1alpha1/{name=alignmentjobs/*} |
|
rpc CancelAlignmentJob(CancelAlignmentJobRequest)
AlignmentJob
Cancel a submitted alignment job
REST mapping
Verb |
Path |
Body |
POST |
/v1alpha1/{name=alignmentjobs/*}:cancel |
* |
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
rpc ListAlignmentJobs(ListAlignmentJobsRequest)
ListAlignmentJobsResponse
REST mapping
Verb |
Path |
Body |
GET |
/v1alpha1/alignmentjobs |
|
rpc Signup(SignupRequest)
google.protobuf.Empty
REST mapping
Verb |
Path |
Body |
POST |
/v1alpha1/signup |
|
rpc ChangeTranscriptOwner(ChangeTranscriptOwnerRequest)
ChangeTranscriptOwnerResponse
REST mapping
Verb |
Path |
Body |
PATCH |
/v1alpha1/permissions:modify |
|
rpc InitUpload(InitUploadRequest)
InitUploadResponse
REST mapping
Verb |
Path |
Body |
POST |
/v1alpha1/initupload |
* |
Messages
Field |
Type |
Description |
name |
string |
Set transcript_job_acknowledge to true |
Field |
Type |
Description |
name |
string |
The name of the alignment job to cancel.
For example: "alignmentjobs/42d1b568-fad4-4312-b134-05a8488724bf" |
Field |
Type |
Description |
transcript_name |
string |
none |
user_name |
string |
none |
new_user_name |
string |
none |
Field |
Type |
Description |
success |
bool |
none |
message |
string |
none |
Field |
Type |
Description |
transcript |
Transcript |
Any non output-only field can be set |
Field |
Type |
Description |
name |
string |
Resouce identifier for the created transcript: transcripts/{some-unique-name} |
Field |
Type |
Description |
name |
string |
Any non output-only field that is set will be deleted |
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 |
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" |
Field |
Type |
Description |
name |
string |
TranscriptJob name. For example: "transcriptjob/42d1b568-fad4-4312-b134-05a8488724bf" |
Field |
Type |
Description |
name |
string |
Resource name of transcript. For example: "transcripts/xyz" |
version |
string |
Set to request a specific version of the transcript |
Field |
Type |
Description |
users |
User[] |
none |
next_page_token |
string |
none |
total_size |
int32 |
none |
Field |
Type |
Description |
resource_name |
string |
Resource can be either a transcript or a dictation. |
Field |
Type |
Description |
gcs_signed_url |
string |
none |
Field |
Type |
Description |
filter |
string |
none |
page_size |
int32 |
none |
page_token |
string |
none |
Field |
Type |
Description |
filter |
string |
none |
page_size |
int32 |
none |
page_token |
string |
none |
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 |
Field |
Type |
Description |
transcripts |
Transcript[] |
The returned transcripts will not have segments field set. |
next_page_token |
string |
none |
Field |
Type |
Description |
upload_successful |
bool |
none |
blob_name |
string |
none |
Field |
Type |
Description |
acknowledged |
bool |
none |
Field |
Type |
Description |
feature |
string |
Indicates feature that is sending request |
Field |
Type |
Description |
transcript |
string |
The name of the transcript to (re-)align.
For example: "transcripts/42d1b568-fad4-4312-b134-05a8488724bf" |
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. |
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 |
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 |
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 |
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 |
Field |
Type |
Description |
update |
bool |
When update == true the jobs will only contain updates. |
jobs |
AlignmentJob[] |
none |
Field |
Type |
Description |
filter |
string |
Not implemented |
Field |
Type |
Description |
update |
bool |
When update == true the jobs will only contain updates. |
jobs |
TranscriptJob[] |
none |
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
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 |
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. |
Name |
Number |
Description |
GROUP_UNSPECIFIED |
0 |
none |
ADMIN |
1 |
none |
RTC |
2 |
none |
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[ |
Name |
Number |
Description |
GENDER_UNSPECIFIED |
0 |
none |
MALE |
1 |
none |
FEMALE |
2 |
none |
OTHER |
3 |
none |
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 |
Name |
Number |
Description |
DATA_SOURCE_UNSPECIFIED |
0 |
Not used. |
FILE_UPLOAD |
1 |
none |
URI |
2 |
none |
RTC |
3 |
none |
Name |
Number |
Description |
TYPE_UNSPECIFIED |
0 |
Not specified. Will return INVALID_ARGUMENT. |
AUDIO |
1 |
none |
VIDEO |
2 |
none |
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 |