sarvamai-go SDK Documentation
Speech-to-Text

Job GetDownloadLinks

`SpeechToTextJob.GetDownloadLinks` returns presigned output URLs.

Package

import "github.com/Shreehari-Acharya/sarvamai-go/sttjob"

Signature

func (c *SttJobClient) GetDownloadLinks(ctx context.Context, jobID string, files []string) (*GetDownloadLinksResponse, error)

Required fields

  • jobID must be non-empty
  • files must be non-empty

Validation

InputResult
valid jobID + non-empty filesValid
empty jobIDValidation error
empty filesValidation error

Response highlights

FieldTypeNotes
JobIdstringJob identifier.
JobStatespeech.JobStateCurrent job state.
UploadUrlsmap[string]DownloadUrlMap from file ID to presigned output URL payload.
StorageContainerTypespeech.ContainerTypeBacking storage type.
  1. call GetStatus and ensure job is complete
  2. collect file IDs from status response
  3. request download links for those file IDs

Example

resp, err := client.SpeechToTextJob.GetDownloadLinks(ctx, jobID, fileIDs)
if err != nil {
    panic(err)
}

for fileID, link := range resp.UploadUrls {
    fmt.Println(fileID, link.FileUrl)
}

On this page