dev-master
9999999-dev https://github.com/tetsuwo/php-voicetext-apifor VoiceText Web API
MIT
The Requires
- php >=5.3.3
- ext-curl *
by Tetsuwo OISHI
api text voice speech tts voicetext
Wallogit.com
2017 © Pedro Peláez
for VoiceText Web API
The unofficial PHP client for the VoiceText Web API., (*2)
Install Composer., (*3)
Add below in require property on composer.json., (*4)
{
"require": {
"sursolar/voicetext-api": "dev-master"
}
}
Execute below command., (*5)
$ php composer.phar install
At first, set up client., (*6)
$client = new Tetsuwo\VoiceText\API\Client('{API_KEY}', '{API_PASSWORD}');
Execute PHP code below to get the Speech synthesis data of specified text.
And there are binary data of WAV format in $response., (*7)
$response = $client->getTts(array(
'text' => 'こんばんは、モヤモヤさ◯ぁ~ずです。',
'speaker' => show'
));
Returns the data string for WAV format., (*8)
echo 'data:audio/wav;base64,', base64_encode($response);
Execute the JavaScript code below to play., (*9)
var audio = new Audio('data:audio/wav;base64,~~~~~~~~~~~');
audio.play();
See official website more details., (*10)
This software is released under the MIT License, see LICENSE., (*11)
for VoiceText Web API
MIT
api text voice speech tts voicetext