28/06
2015
Wallogit.com
2017 © Pedro Peláez
voicetext web api beta for php client
VoiceText Web API client for PHP, (*2)
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, (*3)
401 Error, (*4)
404 Error, (*5)
405 Error, (*6)
500 Error, (*7)
503 Error, (*8)