Skip to content

Commit ee67bbe

Browse files
committed
Deploy
1 parent ae52c35 commit ee67bbe

19 files changed

+1470
-229
lines changed

src/Voice/Bxml/Record.php

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,33 @@ public function fileFormat($fileFormat) {
105105
$this->fileFormat = $fileFormat;
106106
}
107107

108+
/**
109+
* Sets the transcribe attribute for Record
110+
*
111+
* @param boolean $transcribe True to submit the recording for transcription, false otherwise
112+
*/
113+
public function transcribe($transcribe) {
114+
$this->transcribe = $transcribe;
115+
}
116+
117+
/**
118+
* Sets the transcriptionAvailableUrl for Record
119+
*
120+
* @param string $transcriptionAvailableUrl URL to send transcription available events to
121+
*/
122+
public function transcriptionAvailableUrl($transcriptionAvailableUrl) {
123+
$this->transcriptionAvailableUrl = $transcriptionAvailableUrl;
124+
}
125+
126+
/**
127+
* Sets the transcriptionAvailableMethod for Record
128+
*
129+
* @param string $transcriptionAvailableMethod HTTP method (GET or POST) to send the transcription available event as
130+
*/
131+
public function transcriptionAvailableMethod($transcriptionAvailableMethod) {
132+
$this->transcriptionAvailableMethod = $transcriptionAvailableMethod;
133+
}
134+
108135
public function toBxml($doc) {
109136
$element = $doc->createElement("Record");
110137

@@ -148,6 +175,22 @@ public function toBxml($doc) {
148175
$element->setattribute("fileFormat", $this->fileFormat);
149176
}
150177

178+
if(isset($this->transcribe)) {
179+
if ($this->transcribe) {
180+
$element->setattribute("transcribe", "true");
181+
} else {
182+
$element->setattribute("transcribe", "false");
183+
}
184+
}
185+
186+
if(isset($this->transcriptionAvailableUrl)) {
187+
$element->setattribute("transcriptionAvailableUrl", $this->transcriptionAvailableUrl);
188+
}
189+
190+
if(isset($this->transcriptionAvailableMethod)) {
191+
$element->setattribute("transcriptionAvailableMethod", $this->transcriptionAvailableMethod);
192+
}
193+
151194
return $element;
152195
}
153196
}

src/Voice/Bxml/StartRecording.php

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,33 @@ public function multiChannel($multiChannel) {
7777
$this->multiChannel = $multiChannel;
7878
}
7979

80+
/**
81+
* Sets the transcribe attribute for StartRecording
82+
*
83+
* @param boolean $transcribe True to submit the recording for transcription, false otherwise
84+
*/
85+
public function transcribe($transcribe) {
86+
$this->transcribe = $transcribe;
87+
}
88+
89+
/**
90+
* Sets the transcriptionAvailableUrl for StartRecording
91+
*
92+
* @param string $transcriptionAvailableUrl URL to send transcription available events to
93+
*/
94+
public function transcriptionAvailableUrl($transcriptionAvailableUrl) {
95+
$this->transcriptionAvailableUrl = $transcriptionAvailableUrl;
96+
}
97+
98+
/**
99+
* Sets the transcriptionAvailableMethod for StartRecording
100+
*
101+
* @param string $transcriptionAvailableMethod HTTP method (GET or POST) to send the transcription available event as
102+
*/
103+
public function transcriptionAvailableMethod($transcriptionAvailableMethod) {
104+
$this->transcriptionAvailableMethod = $transcriptionAvailableMethod;
105+
}
106+
80107
public function toBxml($doc) {
81108
$element = $doc->createElement("StartRecording");
82109

@@ -112,6 +139,22 @@ public function toBxml($doc) {
112139
}
113140
}
114141

142+
if(isset($this->transcribe)) {
143+
if ($this->transcribe) {
144+
$element->setattribute("transcribe", "true");
145+
} else {
146+
$element->setattribute("transcribe", "false");
147+
}
148+
}
149+
150+
if(isset($this->transcriptionAvailableUrl)) {
151+
$element->setattribute("transcriptionAvailableUrl", $this->transcriptionAvailableUrl);
152+
}
153+
154+
if(isset($this->transcriptionAvailableMethod)) {
155+
$element->setattribute("transcriptionAvailableMethod", $this->transcriptionAvailableMethod);
156+
}
157+
115158
return $element;
116159
}
117160
}

0 commit comments

Comments
 (0)