Skip to content
master
Switch branches/tags
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 

README.md

VoiceTextAPI

Build Status Latest Stable Version Total Downloads Latest Unstable Version License

The unofficial PHP client for the VoiceText Web API.

Demonstration

Installation

Install Composer.

Add below in require property on composer.json.

{
    "require": {
        "tetsuwo/voicetext-api": "dev-master"
    }
}

Execute below command.

$ php composer.phar install

Usage

At first, set up client.

$client = new Tetsuwo\VoiceText\API\Client('{API_KEY}', '{API_PASSWORD}');

Method of Speech synthesis (Text-to-speech)

Execute PHP code below to get the Speech synthesis data of specified text.
And there are binary data of WAV format in $response.

$response = $client->getTts(array(
    'text'    => 'こんばんは、モヤモヤさ◯ぁ~ずです。',
    'speaker' => show'
));

Returns the data string for WAV format.

echo 'data:audio/wav;base64,', base64_encode($response);

Execute the JavaScript code below to play.

var audio = new Audio('data:audio/wav;base64,~~~~~~~~~~~');
audio.play();

See official website more details.

LICENSE

This software is released under the MIT License, see LICENSE.

SEE ALSO

About

The unofficial PHP client for the VoiceText Web API

Resources

License

Releases

No releases published

Packages

No packages published

Languages