Skip to content

SWI-7559 Fix stabilized Property in StartTranscription Verb #79

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 8, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions src/Voice/Bxml/StartTranscription.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,10 @@ class StartTranscription extends Verb {
* @var bool
*/
private $stability;
/**
* @var bool
*/
private $stabilized;

/**
* Sets the destination attribute for StartTranscription
Expand Down Expand Up @@ -131,6 +135,17 @@ public function stability( bool $stability): StartTranscription {
return $this;
}

/**
* Sets the stabilized attribute for StartTranscription
*
* @param bool Whether to send transcription update events to the specified destination only after they have become stable. Requires destination. Defaults to true.
*
*/
public function stabilized( bool $stabilized): StartTranscription {
$this->stabilized = $stabilized;
return $this;
}

/**
* 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.
*
Expand Down Expand Up @@ -176,6 +191,10 @@ public function toBxml(DOMDocument $doc): DOMElement {
$element->setattribute("stablilty", $this->stability);
}

if(isset($this->stabilized)) {
$element->setattribute("stabilized", $this->stabilized);
}

if(isset($this->customParams)) {
foreach ($this->customParams as $customParam) {
$element->appendChild($customParam->toBxml($doc));
Expand Down