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
jobIDmust be non-emptyfilesmust be non-empty
Validation
| Input | Result |
|---|---|
valid jobID + non-empty files | Valid |
empty jobID | Validation error |
empty files | Validation error |
Response highlights
| Field | Type | Notes |
|---|---|---|
JobId | string | Job identifier. |
JobState | speech.JobState | Current job state. |
UploadUrls | map[string]DownloadUrl | Map from file ID to presigned output URL payload. |
StorageContainerType | speech.ContainerType | Backing storage type. |
Recommended sequence
- call
GetStatusand ensure job is complete - collect file IDs from status response
- 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)
}