我将 .flac 文件上传到 Amazon S3 存储桶,但是当我尝试使用 Amazon Transcribe Golang SDK 转录音频时,我收到以下错误。我尝试将 S3 存储桶中的 .flac 文件公开,但仍然出现相同的错误,所以我认为这不是权限问题。是否有任何东西阻止 Transcribe 服务访问我丢失的 S3 存储桶中的文件?上传和转录的 api 用户对 S3 和转录服务具有完全访问权限。
示例 Go 代码:
jobInput := transcribe.StartTranscriptionJobInput{
JobExecutionSettings: &transcribe.JobExecutionSettings{
AllowDeferredExecution: aws.Bool(true),
DataAccessRoleArn: aws.String("my-arn"),
},
LanguageCode: aws.String("en-US"),
Media: &transcribe.Media{
MediaFileUri: aws.String("https://s3.us-east-1.amazonaws.com/{MyBucket}/{MyObjectKey}"),
},
Settings: &transcribe.Settings{
MaxAlternatives: aws.Int64(2),
MaxSpeakerLabels: aws.Int64(2),
ShowAlternatives: aws.Bool(true),
ShowSpeakerLabels: aws.Bool(true),
},
TranscriptionJobName: aws.String("jobName"),
}
亚马逊转录响应:
BadRequestException: The S3 URI that you provided can't be accessed. Make sure that you have read permission and try your request again.