2016-12-04 4 views
1

こんにちは皆、Twilioの録音からテキストを録音し、転記して取得する方法として、絡み合っています。どうすればいいのですか?例:Twilioでオーディオを書き換え、Pythonを使用するには?

# 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では、最新の転写をどのように取得しますか?私はウリ(私は信じる)が必要だが、それにアクセスする方法は全く知らない/変数名。

さらに、Twilioの録音にはどのような選択肢がありますか、また、録音するスクリプトの適切な録音にアクセスするにはどうすればよいですか?

+0

https://www.twilio.com/docs/api/rest/transcription –

+0

私は転写用のsidが必要ですが、Pythonの変数名は分かりません。 –

+0

もう1つのオプションは、 ''動詞に 'RecordingUrl'および/または' TranscriptionUrl'パラメータを設定することです。これにより、Twilioは、録音や録音がいつチェックするのではなく完了したかを教えてくれます。 –

答えて

0

ここでは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 

転写が完了したときに、転写IDで通知を受けるように、あなたはまた、TranscriptionUrl属性を設定することができます。そのようにして、上に投稿したコードを使用することができます。

関連する問題