Skip to content

Commit 1717666

Browse files
authored
Merge pull request #79 from Bandwidth/SWI-7559
SWI-7559 Fix `stabilized` Property in `StartTranscription` Verb
2 parents cc5800b + 2c3e750 commit 1717666

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

src/Voice/Bxml/StartTranscription.php

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,10 @@ class StartTranscription extends Verb {
4848
* @var bool
4949
*/
5050
private $stability;
51+
/**
52+
* @var bool
53+
*/
54+
private $stabilized;
5155

5256
/**
5357
* Sets the destination attribute for StartTranscription
@@ -131,6 +135,17 @@ public function stability( bool $stability): StartTranscription {
131135
return $this;
132136
}
133137

138+
/**
139+
* Sets the stabilized attribute for StartTranscription
140+
*
141+
* @param bool Whether to send transcription update events to the specified destination only after they have become stable. Requires destination. Defaults to true.
142+
*
143+
*/
144+
public function stabilized( bool $stabilized): StartTranscription {
145+
$this->stabilized = $stabilized;
146+
return $this;
147+
}
148+
134149
/**
135150
* Sets the <CustomParam/> tag. You may specify up to 12 <CustomParam/> elements nested within a <StartTranscription> tag. These elements define optional user specified parameters that will be sent to the destination URL when the real-time transcription is first started.
136151
*
@@ -176,6 +191,10 @@ public function toBxml(DOMDocument $doc): DOMElement {
176191
$element->setattribute("stablilty", $this->stability);
177192
}
178193

194+
if(isset($this->stabilized)) {
195+
$element->setattribute("stabilized", $this->stabilized);
196+
}
197+
179198
if(isset($this->customParams)) {
180199
foreach ($this->customParams as $customParam) {
181200
$element->appendChild($customParam->toBxml($doc));

0 commit comments

Comments
 (0)