PHP code example of chao / l5-alidayu-tts

1. Go to this page and download the library: Download chao/l5-alidayu-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/ */

    

chao / l5-alidayu-tts example snippets


Chao\Tts\AlidayuServiceProvider::class

        ...
        /*
         * Application Service Providers...
        */
        App\Providers\AppServiceProvider::class,
        App\Providers\AuthServiceProvider::class,
        App\Providers\EventServiceProvider::class,
        App\Providers\RouteServiceProvider::class,
        ...
        Chao\Tts\AlidayuServiceProvider::class,

ALIDAYU_TTS_KEY=YOUR_KEY
ALIDAYU_TTS_SECRETKEY=YOUR_SECRETKEY
ALIDAYU_TTS_FAKE=false

  use Chao\Tts\SingleCallPusher as SingleCall;


  public function postCall(SingleCall $singleCall)
  {
    $result = $singleCall->tts($calledNum, $calledShowNum, $ttsCode, $ttsParam);
  }
shell
php artisan vendor:publish