1616class Record (AbstractBxmlVerb ):
1717
1818 def __init__ (self , tag = None , username = None , password = None , record_complete_url = None , record_complete_method = None ,
19- recording_available_url = None , recording_available_method = None , terminating_digits = None , max_duration = None , file_format = None ):
19+ recording_available_url = None , recording_available_method = None , terminating_digits = None , max_duration = None ,
20+ file_format = None , transcribe = None , transcription_available_url = None , transcription_available_method = None ):
2021 """
2122 Initializes the Record class with the following parameters
2223
@@ -30,6 +31,9 @@ def __init__(self, tag=None, username=None, password=None, record_complete_url=N
3031 :param str terminating_digits: Digits to terminate the recording
3132 :param int max_duration: Max duration to record in seconds
3233 :param str file_format: The file format to save the recording in
34+ :param bool transcribe: True to transcribe the recording on completion, False otherwise
35+ :param str transcription_available_url: URL to send the transcriptionAvailable event to.
36+ :param str transcription_available_method: The HTTP method to use for the request to transcriptionAvailableUrl. GET or POST
3337 """
3438 self .tag = tag
3539 self .username = username
@@ -41,6 +45,9 @@ def __init__(self, tag=None, username=None, password=None, record_complete_url=N
4145 self .terminating_digits = terminating_digits
4246 self .max_duration = max_duration
4347 self .file_format = file_format
48+ self .transcribe = transcribe
49+ self .transcription_available_url = transcription_available_url
50+ self .transcription_available_method = transcription_available_method
4451
4552 def to_bxml (self ):
4653 root = etree .Element (RECORD_TAG )
@@ -64,4 +71,12 @@ def to_bxml(self):
6471 root .set ("maxDuration" , str (self .max_duration ))
6572 if self .file_format is not None :
6673 root .set ("fileFormat" , self .file_format )
74+ if self .transcribe is not None :
75+ #Convert True to "true", or False to "false"
76+ strn = "true" if self .transcribe else "false"
77+ root .set ("transcribe" , strn )
78+ if self .transcription_available_url is not None :
79+ root .set ("transcriptionAvailableUrl" , self .transcription_available_url )
80+ if self .transcription_available_method is not None :
81+ root .set ("transcriptionAvailableMethod" , self .transcription_available_method )
6782 return etree .tostring (root ).decode ()
0 commit comments