VoiceText Web API client for PHP
composer require fagai/voicetext
<?php
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();
$voice = new VoiceText('<your api key>');
$voice->setParams([
'speaker' => 'hikari',
'emotion' => 'happiness',
'emotion_level' => 2,
'pitch' => 150,
'speed' => 120,
'volume' => 150,
'text' => '今日も一日がんばるぞい!']);
$binaryData = $voice->get();
400 Error
401 Error
404 Error
405 Error
500 Error
503 Error