大家好,我正纠结于如何在Twilio中记录,转录和检索文本。我该怎么做呢?示例:
# 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转录有哪些替代方案,我如何访问我的脚本中的适当录音来转录?
发布于 2016-12-05 23:50:20
Twilio开发者的布道者在这里。
您可以通过按如下方式列出您的所有抄本:
# 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通知您。这样,您就可以使用上面发布的代码片段。
https://stackoverflow.com/questions/40963080
复制相似问题