PHP code example of fagai / voicetext
1. Go to this page and download the library: Download fagai/voicetext 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/ */
fagai / voicetext example snippets
use \Fagai\VoiceText\VoiceText;
$voice = new VoiceText('<your api key>');
$voice->speaker('hikari')
->emotion('happiness')
->emotion_level(2)
->pitch(150)
->speed(120)
->volume(150)
->text('今日も一日がんばるぞい!');
// get wav binary data
$binaryData = $voice->get();