@param string $text
@param string $languageFrom
@param string $audioFormat
@param array  $additionalData

@return TtsResponse
514587
public function speak(
        string $text,
        string $languageFrom,
        string $audioFormat = TtsAudioFormat::AUDIO_MP3,
        array $additionalData = []
    ): TtsResponse {
        $languageFrom = new Language($languageFrom);

        return $this
            ->getTtsApi($additionalData)
            ->textToSpeech($text, new Language($languageFrom), new TtsAudioFormat($audioFormat), $additionalData);
    }
283160
public function translate(string $text, string $languageTo, string $languageFrom = ''): TranslateResponse
    {
        return $this->getTranslateApi()->translate($text, new Language($languageTo), new Language($languageFrom));
    }
463087
public void setAdditionalText(String text) {

        if (CmsStringUtil.isEmpty(text)) {
            m_additionalText.setVisible(false);
        } else {
            m_additionalText.setValue(text);
            m_additionalText.setVisible(true);
        }
    }
161236
protected function reply(string $text = null): PendingReply
    {
        return (new PendingReply(
            context()->getChannel(),
            context()->getChat(),
            context()->getUser()
        ))->text($text);
    }
1293973
public function spellCheck(string $text, string $languageFrom = ''): SpellCheckResponse
    {
        return $this->getSpellCheckApi()->checkTexts([$text], new Language($languageFrom));
    }
619249
public static function preSaveText($text, $controller, $transTable = [])
    {
        $module = Module::getModuleByClassname(Module::className());
        $editorContentHelper = $module->contentHelper;

        $text = trim($text);
        if (empty($text)) return '';
        
        $text = $editorContentHelper::afterSelectBody($text); // convert @uploads/.../ID to realpath

        $text = strtr($text, $transTable);

        $html = $text;
        $viewFile = dirname(__DIR__) . '/views/news-archieve-text.php';
        if (is_file($viewFile)) {
            $text = static::START_TEXT_TAG . $text . static::END_TEXT_TAG;
            $html = Yii::$app->view->renderFile($viewFile, ['text' => $text], $controller);
        }
        return $html;
    }
910515
public static function Telegram($text, $attachment = '', $inline_keyboard = '')
    {
        if (Config::get('larasap.telegram.channel_signature')) {
            $type = isset($attachment['type']) ? 'caption' : 'text';
            $text = self::assignSignature($text, $type);
        }

        if ($attachment) {
            switch ($attachment['type']) {
                case 'photo':
                    $result = TelegramApi::sendPhoto(null, $attachment['file'], $text, $inline_keyboard);
                    break;
                case 'audio':
                    $duration = isset($attachment['duration']) ? $attachment['duration'] : '';
                    $performer = isset($attachment['performer']) ? $attachment['performer'] : '';
                    $title = isset($attachment['title']) ? $attachment['title'] : '';
                    $result = TelegramApi::sendAudio(null, $attachment['file'], $text, $duration, $performer, $title, $inline_keyboard);
                    break;
                case 'document':
                    $result = TelegramApi::sendDocument(null, $attachment['file'], $text, $inline_keyboard);
                    break;
                case 'video':
                    $duration = isset($attachment['duration']) ? $attachment['duration'] : '';
                    $width = isset($attachment['width']) ? $attachment['width'] : '';
                    $height = isset($attachment['height']) ? $attachment['height'] : '';
                    $result = TelegramApi::sendVideo(null, $attachment['file'], $duration, $width, $height, $text, $inline_keyboard);
                    break;
                case 'voice':
                    $duration = isset($attachment['duration']) ? $attachment['duration'] : '';
                    $result = TelegramApi::sendVoice(null, $attachment['file'], $text, $duration, $inline_keyboard);
                    break;
                case 'media_group':
                    $result = TelegramApi::sendMediaGroup(null, json_encode($attachment['files']));
                    break;
                case 'location':
                    $live_period = isset($attachment['live_period']) ? $attachment['live_period'] : '';
                    $result = TelegramApi::sendLocation(null, $attachment['latitude'], $attachment['longitude'], $live_period, $inline_keyboard);
                    break;
                case 'venue':
                    $foursquare_id = isset($attachment['foursquare_id']) ? $attachment['foursquare_id'] : '';
                    $result = TelegramApi::sendVenue(null, $attachment['latitude'], $attachment['longitude'], $attachment['title'], $attachment['address'], $foursquare_id, $inline_keyboard);
                    break;
                case 'contact':
                    $last_name = isset($attachment['last_name']) ? $attachment['last_name'] : '';
                    $result = TelegramApi::sendContact(null, $attachment['phone_number'], $attachment['first_name'], $last_name, $inline_keyboard);
                    break;
            }
        } else {
            $result = TelegramApi::sendMessage(null, $text, $inline_keyboard);
        }

        return $result;
    }
214138
private function extractCodec(array $additionalData)
    {
        $codec = $this->extractOptionalParameter('codec', $additionalData);

        if ($codec && !$this->codecIsValid($codec)) {
            throw new InvalidAudioFormatParameterException(
                sprintf("Specified codec \"%s\" is invalid", $codec)
            );
        }

        return "codecs=$codec";
    }
866405
static function strtolower( $text )
    {
        //We need to detect our internal charset
        if ( self::$charset === null )
        {
            self::$charset = eZTextCodec::internalCharset();
        }

        //First try to use mbstring
        if ( extension_loaded( 'mbstring' ) )
        {
            return mb_strtolower( $text, self::$charset );
        }
        else
        {
            // Fall back if mbstring is not available
            $char = eZCharTransform::instance();
            return $char->transformByGroup( $text, 'lowercase' );
        }
    }
91023
public function setCustomText($t) {
        if (is_string($t)){
            $this->options['ShipmentRequestDetails.LabelCustomization.CustomTextForLabel'] = $t;
        } else {
            $this->log("Tried to set CustomTextForLabel to invalid value",'Warning');
            return false;
        }
    }
1120528
function addDocSpecification( $text )
    {
        $docSpec = array_pop( $this->PreStack );
        $this->DocSpecification[] = array ( 'docSpec' => $docSpec,
                                            'text' => $text );
        $this->PreStack[] = $docSpec;
    }
803487
public function translateBulk(array $text, Language $languageTo, Language $languageFrom): TranslateResponse
    {
        /** @var TranslateResponse $response */
        $response = $this->callApi(__FUNCTION__, func_get_args());

        return $response;
    }
16306
public function addPreserveText($text, $styleFont = null, $styleParagraph = null) {
		if($this->_insideOf == 'footer' || $this->_insideOf == 'header') {
			$ptext = new PHPWord_Section_Footer_PreserveText($text, $styleFont, $styleParagraph);
			$this->_elementCollection[] = $ptext;
			return $ptext;
		} else {
			trigger_error('addPreserveText only supported in footer/header.');
		}
	}
1091421
public function MultiTexto($txt, $x=null, $y=null, $align='', $w=0, $border=0, $fill=false)
    {
        if ($x==null) $x = $this->GetX();
        if ($y==null) $y = $this->GetY();
        $textrendermode = $this->textrendermode;
        $textstrokewidth = $this->textstrokewidth;
        $this->setTextRenderingMode(0, true, false);
        $this->SetXY($x, $y);
        $this->MultiCell($w, 0, $txt, $border, $align, $fill);
        // restore previous rendering mode
        $this->textrendermode = $textrendermode;
        $this->textstrokewidth = $textstrokewidth;
    }
309303
public function translate(string $text, Language $languageTo, Language $languageFrom): TranslateResponse
    {
        /** @var TranslateResponse $response */
        $response = $this->callApi(__FUNCTION__, func_get_args());

        return $response;
    }
815824
public function setText($text)
    {
        $this->text = $text;
        $this->encodeManager->setData($text);

        return $this;
    }
362786
public function textToSpeech(string $text): string
    {
        if (strlen($text) > 300) {
            throw new InvalidArgumentException("Only messages under 300 characters are supported");
        }

        return $this->sendRequest("http://vaas.acapela-group.com/Services/FileMaker.mp3", [
            "prot_vers" =>  "2",
            "cl_login"  =>  $this->login,
            "cl_app"    =>  $this->application,
            "cl_pwd"    =>  $this->password,
            "req_voice" =>  "{$this->voice}22k",
            "req_spd"   =>  (string) $this->speed,
            "req_text"  =>  $text,
        ]);
    }