aws cli命令行创建语音转文本transcribe任务

到了新的一个月,又有60分钟免费的使用额度了。今天打开aws的transcribe页面老是打开不完全,所以想用cli命令行的方式来操作。

一、IAM授权

二、aws configure 设置区域

aws configure

Default region name [None]: us-east-2

三、aws cli命令

把音频文件传到s3上

aws s3api put-object --bucket 你的s3存储桶--key 放在s3上的文件名 --body VPS上的文件名

创建transcribe任务

aws transcribe start-transcription-job --media MediaFileUri=s3://Dirtbag.The.Legend.of.Fred.Beckey/output00.mp3 --media-format mp3 --language-code en-US --transcription-job-name Dirtbag_en00 --output-bucket-name Dirtbag.The.Legend.of.Fred.Beckey --output-key Dirtbag_en00.json

检查任务
aws transcribe get-transcription-job --transcription-job-name "Dirtbag_en00"
当任务完成的时候 "TranscriptionJobStatus": "COMPLETED",
就可以把json文件取下来了
aws s3api get-object --bucket 你的S3存储桶名称 -key S3上文件的KEY 你准备保存到VPS的文件名


评论

The Hot3 in Last 30 Days

无服务器 自建短链服务 Url-Shorten-Worker 完整的部署教程

ClouDNS .asia免费域名 托管到CloudFlare开CDN白嫖Websocket WS通道翻墙 / desec.io