PHP code example of charis / tts

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

    

charis / tts example snippets

$xslt
//new class
$TTS = new \Src\TTS('Tencent',$app_id,$app_key,$text);
//format mp3 as base64
$TTS->getVoice()->format();
//save mp3
$TTS->getVoice()->save('./','bug');