本文整理汇总了Python中tropo.Tropo.stopRecording方法的典型用法代码示例。如果您正苦于以下问题:Python Tropo.stopRecording方法的具体用法?Python Tropo.stopRecording怎么用?Python Tropo.stopRecording使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类tropo.Tropo
的用法示例。
在下文中一共展示了Tropo.stopRecording方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: index
# 需要导入模块: from tropo import Tropo [as 别名]
# 或者: from tropo.Tropo import stopRecording [as 别名]
def index(request):
t = Tropo()
t.call("+8613466549249")
#t.startRecording('http://12b12d1b.ngrok.io/FileUpload/uploadFile', formamt = 'audio/wav', transcriptionID = "20170601startRecording", transcriptionEmailFormat = "plain", transcriptionOutURI = "http://12b12d1b.ngrok.io/FileUpload/receiveJson")
t.startRecording('http://12b12d1b.ngrok.io/FileUpload/uploadFile', formamt = 'audio/wav', transcriptionID = "20170601startRecording", transcriptionEmailFormat = "plain", transcriptionLanguage = "en-usa", transcriptionOutURI = "http://12b12d1b.ngrok.io/FileUpload/receiveJson")
t.say("a b c d e f g h i j k l m n o p q r s t u v w x y z @ # $ % & ")
t.say(" I love my daughter")
t.say("1 2 3 4 5 6 7 8 9 0 A B C D E F G")
t.say("today is Thursday 2017-06-01")
t.stopRecording()
return t.RenderJson()
示例2: test_stopRecording
# 需要导入模块: from tropo import Tropo [as 别名]
# 或者: from tropo.Tropo import stopRecording [as 别名]
def test_stopRecording(self):
"""
Test the "stopRecording" Tropo class method.
"""
tropo = Tropo()
tropo.stopRecording()
rendered = tropo.RenderJson()
pretty_rendered = tropo.RenderJson(pretty=True)
print "===============test_stopRecording================="
print "render json: %s" % pretty_rendered
# print "test_stopRecording: %s" % tropo.RenderJson()
rendered_obj = jsonlib.loads(rendered)
wanted_json = ' {"tropo": [{"stopRecording": {}}]}'
wanted_obj = jsonlib.loads(wanted_json)
self.assertEqual(rendered_obj, wanted_obj)
示例3: index
# 需要导入模块: from tropo import Tropo [as 别名]
# 或者: from tropo.Tropo import stopRecording [as 别名]
def index(request):
t = Tropo()
t.say("A B C song")
recordURLobj1 = RecordUrlTuple(url = "http://192.168.26.88:8080/FileUpload/uploadFile1", username = "fakename1", password="fakepassword", method="POST").json
recordURLobj2 = RecordUrlTuple(url = "http://192.168.26.88:8080/FileUpload/uploadFile", username = "fakename2", password="fakepassword", method="POST").json
recordURLobj3 = RecordUrlTuple(url = "http://192.168.26.88:8080/FileUpload/uploadFile3", username = "fakename3", password="fakepassword", method="POST").json
recordURLobj4 = RecordUrlTuple(url = "http://192.168.26.88:8080/FileUpload/uploadFile4", username = "fakename4", password="fakepassword", method="POST").json
t.startRecording([recordURLobj1, recordURLobj2, recordURLobj3, recordURLobj4], formamt = 'audio/wav', transcriptionID = "20170601startRecording", transcriptionEmailFormat = "plain", transcriptionLanguage = "en-usa", transcriptionOutURI = "http://12b12d1b.ngrok.io/FileUpload/receiveJson")
t.say("a b c d e f g h i j k l m n o p q r s t u v w x y z now you know your a b c start sing with me ")
t.say("Merry Christmas and happy new year")
t.say("1 2 3 4 5 6 7 8 9 0 A B C D E F G")
t.say("today is Thursday 2017-12-25")
t.stopRecording()
t.hangup()
return t.RenderJson()
示例4: Say
# 需要导入模块: from tropo import Tropo [as 别名]
# 或者: from tropo.Tropo import stopRecording [as 别名]
tropo.ask("[5 digits]",
say = Say("Please enter a 5 digit zip code").json)
tropo.call (TO)
tropo.conference(ID)
tropo.hangup()
tropo.message ("Hello, World", TO)
tropo.on(event="continue",
next="http://example.com/weather.py",
say="Please hold.")
tropo.record(say="Please say something for posterity",
url=URL,
choices = Choices("", terminator="#").json)
tropo.redirect(ID)
tropo.reject(ID)
tropo.startRecording(URL)
tropo.stopRecording()
tropo.transfer(TO)
tropo.message("Hello, World",
TO,
channel='TEXT',
network='SMS')
else:
unittest.main()