PHP code example of uzdevid / yii2-tts

1. Go to this page and download the library: Download uzdevid/yii2-tts library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

uzdevid / yii2-tts example snippets


'components' => [
    'tts' => [
        'class' => \uzdevid\TTS\TTS::class,
        'token'=> 'avtorizatsiya tokeni',
        'projectId' => 'loyihangiz-identifikatori',
        'voice' => \uzdevid\TTS\TTSOptions::VOICE_MALE,
        'enableCache' => true,
        'cacheDuration' => 3600 * 24 * 30,
    ],
],

    $text = 'Assalomu alaykum!, bu Yii2 TTS kengaytmani ishlatish uchun misol';
    $file = Yii::$app->tts->synthesize($text);

php composer.phar