2017 © Pedro Peláez
 

library voicetext-api

for VoiceText Web API

image

sursolar/voicetext-api

for VoiceText Web API

  • Thursday, September 28, 2017
  • by sursolar
  • Repository
  • 1 Watchers
  • 0 Stars
  • 15 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

VoiceTextAPI

Build Status Latest Stable Version Total Downloads Latest Unstable Version License, (*1)

The unofficial PHP client for the VoiceText Web API., (*2)

Demonstration

Installation

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

Usage

At first, set up client., (*6)

$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., (*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)

LICENSE

This software is released under the MIT License, see LICENSE., (*11)

SEE ALSO

The Versions

28/09 2017

dev-master

9999999-dev https://github.com/tetsuwo/php-voicetext-api

for VoiceText Web API

  Sources   Download

MIT

The Requires

  • php >=5.3.3
  • ext-curl *

 

by Tetsuwo OISHI

api text voice speech tts voicetext