@param string $ssml

@return OutputSpeech
779624
public static function createBySsml(string $ssml): self
    {
        $outputSpeech = new self(self::TYPE_SSML);

        $outputSpeech->ssml = $ssml;

        return $outputSpeech;
    }
1083203
private function convertSgmlToXml($sgml)
    {
        $sgml = preg_replace('/&(?!#?[a-z0-9]+;)/', '&amp;', $sgml);

        $lines = explode("\n", $sgml);

        $xml = '';
        foreach ($lines as $line) {
            $xml .= trim($this->closeUnclosedXmlTags($line)) . "\n";
        }

        return trim($xml);
    }
1324881
private function parseVoiceInput (SimpleXMLElement $xml)
    {
        return (new ReflectionClass(Input\Audio::class))->newInstanceArgs(
            array_merge(
                $this->getCommonMessageProperties($xml),
                [
                    (string)$xml->MediaId,
                    (string)$xml->Format,
                    (string)$xml->Recognition
                ]
            )
        );
    }
517801
def say_response_with_reprompt(speech, reprompt_speech, end_session = true, speech_ssml = false, reprompt_ssml = false)
      output_speech = add_speech(speech,speech_ssml)
      reprompt_speech = add_reprompt(reprompt_speech,reprompt_ssml)
      { :outputSpeech => output_speech, :reprompt => reprompt_speech, :shouldEndSession => end_session }
    end
955242
public function phonetic(ServerRequestInterface $request, Tree $tree): ResponseInterface
    {
        $firstname = $request->get('firstname', '');
        $lastname  = $request->get('lastname', '');
        $place     = $request->get('place', '');
        $soundex   = $request->get('soundex', 'Russell');

        // What trees to seach?
        if (Site::getPreference('ALLOW_CHANGE_GEDCOM') === '1') {
            $all_trees = Tree::getAll();
        } else {
            $all_trees = [$tree];
        }

        $search_tree_names = (array) $request->get('search_trees', []);

        $search_trees = array_filter($all_trees, static function (Tree $tree) use ($search_tree_names): bool {
            return in_array($tree->name(), $search_tree_names, true);
        });

        if (empty($search_trees)) {
            $search_trees = [$tree];
        }

        $individuals = $this->search_service->searchIndividualsPhonetic($soundex, $lastname, $firstname, $place, $search_trees);

        $title = I18N::translate('Phonetic search');

        return $this->viewResponse('search-phonetic-page', [
            'all_trees'    => $all_trees,
            'firstname'    => $firstname,
            'individuals'  => $individuals,
            'lastname'     => $lastname,
            'place'        => $place,
            'search_trees' => $search_trees,
            'soundex'      => $soundex,
            'title'        => $title,
        ]);
    }
171508
public function setOutputDestination(string $destination): PdfInterface
    {
        /**
         * Destinations can be sent to the following:
         *    - I/B [Inline]   - Sends output to browser (browser plug-in is used if avaialble)
         *                       If a $filename is given, the browser's "Save as..." option is provided
         *    - D   [Download] - Forces browser to download the file
         *    - F   [File]     - Saves the file to the server's filesystem cache
         *    - S   [String]   - Returns the PDF as a string
         */
        $this->setProperty(
            'outputDestination',
            strtoupper($destination[0]) === 'B' ? 'I' : strtoupper($destination[0])
        );

        return $this;
    }
525641
function(mathml, id) {
      Explorer.MakeSpeechTask(
          mathml, id, sre.TreeSpeechGenerator,
          function(math, speech) {math.setAttribute('hasspeech', 'true');}, 5);
    }
24048
function(mathml, id) {
      Explorer.MakeSpeechTask(
          mathml, id, sre.SummarySpeechGenerator,
          function(math, speech) {
            math.setAttribute('haslabel', 'true');
            math.setAttribute('aria-label', speech);},
          5);
    }
744343
private function parseLinkInput (SimpleXMLElement $xml)
    {
        return (new ReflectionClass(Input\Link::class))->newInstanceArgs(
            array_merge(
                $this->getCommonMessageProperties($xml),
                [
                    (string)$xml->Url,
                    (string)$xml->Title,
                    (string)$xml->Description,
                ]
            )
        );
    }
875097
def say_response(speech, end_session = true, ssml = false)
      output_speech = add_speech(speech,ssml)
      { :outputSpeech => output_speech, :shouldEndSession => end_session }
    end
20054
public function compile( $content )
  {
    if ( !empty( $content ) )
    {
      // Input and Output
      $files = $this->getTmpFiles();
      file_put_contents( $files[ 'input' ], $content );

      // Arguments
      $args = $this->buildArgs( $files[ 'input' ], $files[ 'output' ] );
      array_unshift( $args, $this->sasscPath );

      // Run the Process
      $Process = new Process( implode( ' ', $args ) );
      $Process->run();

      // Check for Errors
      if (!$Process->isSuccessful())
      {
        $this->cleanup( $files );
        throw new ProcessFailedException($Process);
      }
      else
      {
        if ( file_exists( $files[ 'output' ] ) )
        {
          $output = file_get_contents( $files[ 'output' ] );
        }
        else
        {
          throw new \Exception( 'No output from compiled SASS (' . $Process->getOutput() . ')' );
        }
      }

      // Clean Up
      $this->cleanup($files);
    }

    return (isset($output)) ? $output : null;
  }
735939
public function output(string $mime)
    {
        $output = $this->getOutput($mime);
        if (empty($output))
            $output = "Unknown mime type requested";

        echo $output;
        return $this;
    }
965165
public function saveAs($strXML, $outputFile)
    {
        if ($strXML == '')
            throw new Exception('XML Data not specified');
        
        if ($outputFile == '')
            throw new Exception('Output Filename along extension not specified');
        
        $strURI = Product::$baseProductUri . '/cells/' . $this->getFileName() . '/saveAs?newfilename=' . $outputFile;
        $signedURI = Utils::Sign($strURI);
        $responseStream = Utils::processCommand($signedURI, "POST", "XML", $strXML);
        
        $v_output = Utils::validateOutput($responseStream);
        
        if ($v_output === '') {
            $strURI = Product::$baseProductUri . '/storage/file/' . $outputFile;
            $signedURI = Utils::Sign($strURI);
            $responseStream = Utils::processCommand($signedURI, "GET", "", "");

            $outputPath = AsposeApp::$outPutLocation . $outputFile;
            Utils::saveFile($responseStream, $outputPath);
            
            return $outputPath;
        } else {
            return $v_output;
        }         
    }
1190271
public static function ttml2subrip(TtmlFile $_ttml)
    {
        $srt = new SubripFile();
        foreach ($_ttml->getCues() as $cue) {
            $text = $cue->getText();

            if (null !== $cue->getStyle()) {

                // global cue style
                $text = self::applyTtmlStyles($text, $_ttml->getStyle($cue->getStyle()));

                // span styles
                $matches = array();
                preg_match_all('#<span[^>]*style="([^>"]+)"[^>]*>(.+)</span>#isU', $text, $matches);
                $spanCount = count($matches[0]);
                if ($spanCount > 0) {
                    for ($i = 0; $i < $spanCount; $i++) {
                        $spanStr     = $matches[0][$i];
                        $spanStyleId = $matches[1][$i];
                        $spanText    = $matches[2][$i];

                        $spanStyle = $_ttml->getStyle($spanStyleId);

                        $textForReplace = self::applyTtmlStyles($spanText, $spanStyle);

                        if ($textForReplace != $spanText) {
                            $text = str_replace($spanStr, $textForReplace, $text);
                        }
                    }
                }
            }

            if (null !== $cue->getRegion()) {
                // cue region style
                $text = self::applyTtmlStyles($text, $_ttml->getRegion($cue->getRegion()));
            }

            $text = str_ireplace(array('<br>', '<br/>', '<br />'), SubripFile::UNIX_LINE_ENDING, $text);
            $text = preg_replace('#<\/?span[^>]*>#i', '', $text);

            $cleaningPatterns = array(
                '</i>'.SubripFile::UNIX_LINE_ENDING.'<i>',
                '</b>'.SubripFile::UNIX_LINE_ENDING.'<b>',
                '</u>'.SubripFile::UNIX_LINE_ENDING.'<u>'
            );
            $text = html_entity_decode(str_ireplace($cleaningPatterns, SubripFile::UNIX_LINE_ENDING, $text));

            $srt->addCue($text, SubripCue::ms2tc($cue->getStartMS()), SubripCue::ms2tc($cue->getStopMS()));
        }

        return $srt;
    }
1259799
protected function setStringIntoTag($sString, $sTag, $features = null)
    {
        return '<' . $sTag . $this->buildAttributesForTag($features) . '>' . $sString . '</' . $sTag . '>';
    }
216852
public function writeOutput($str)
    {
        if (empty($str)) {
            return $this;
        }

        $this->output[] = $str;

        if ($this->consoleOutput) {
            $this->consoleOutput->writeln($str);
        }

        return $this;
    }
758901
public function getText($sSelector)
    {
        $oElement = $this->getElementLazy($sSelector);
        try {
            $sText = $oElement->getText();
        } catch (Exception $e) {
            sleep(1);
            $sText = $oElement->getText();
        }
        return $sText;
    }