首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >如何在Twilio和Python中转录音频?

如何在Twilio和Python中转录音频?
EN

Stack Overflow用户
提问于 2016-12-05 04:09:06
回答 1查看 295关注 0票数 1

大家好,我正纠结于如何在Twilio中记录,转录和检索文本。我该怎么做呢?示例:

代码语言:javascript
运行
复制
# Download the Python helper library from twilio.com/docs/python/install
from twilio.rest import TwilioRestClient

# Your Account Sid and Auth Token from twilio.com/user/account
account_sid = "AC30bd8bdca7572344721eb96c15a5c0c7"
auth_token  = "your_auth_token"
client = TwilioRestClient(account_sid, auth_token)

transcription = client.transcriptions.get("TR8c61027b709ffb038236612dc5af8723")
print(transcription.transcription_text)

在client.transcriptions.get中,如何获取最新的转录?我需要Uri (我相信),但不知道如何访问它/变量名。

顺便说一句,Twilio转录有哪些替代方案,我如何访问我的脚本中的适当录音来转录?

EN

回答 1

Stack Overflow用户

发布于 2016-12-05 23:50:20

Twilio开发者的布道者在这里。

您可以通过按如下方式列出您的所有抄本:

代码语言:javascript
运行
复制
# Your Account Sid and Auth Token from twilio.com/user/account
account_sid = "AC30bd8bdca7572344721eb96c15a5c0c7"
auth_token  = "your_auth_token"
client = TwilioRestClient(account_sid, auth_token)

for transcription in client.transcriptions.list():
    print transcription.transcriptiontext

您还可以设置TranscriptionUrl属性,以便在转录完成时使用转录ID通知您。这样,您就可以使用上面发布的代码片段。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/40963080

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档