2017 © Pedro Peláez
 

library voicetext-api

VoiceText Web API(https://cloud.voicetext.jp/webapi) wrapper library.

image

uzulla/voicetext-api

VoiceText Web API(https://cloud.voicetext.jp/webapi) wrapper library.

  • Thursday, September 4, 2014
  • by uzulla
  • Repository
  • 1 Watchers
  • 6 Stars
  • 153 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 1 Open issues
  • 5 Versions
  • 1 % Grown

The README.md

VoiceText Web API library for PHP

VoiceText Web APIをPHPから利用するためのライブラリです。, (*1)

This library for VoiceText Web API., (*2)

VoiceText Web APIは、入力したテキストを音声ファイル(Wav形式)でダウンロードできるものです。, (*3)

VoiceText is Text-To-Speech software, that API generate wave audio file., (*4)

VoiceText Web API は HOYAサービス株式会社様が提供するWEB APIです。詳細はこちら VoiceText Web API, (*5)

VoiceText Web API provided by HOYA Service Corporation. Detail here. VoiceText Web API, (*6)

REQUIRE

  • PHP>=5.4
  • Composer

SETUP

composerでuzulla/voicetext-apiをrequireしてください。, (*7)

SYNOPSIS(利用例)

<?php
require_once('vendor/autoload.php');

use \Uzulla\WebApi\VoiceText\Request as VTR;
use \Uzulla\WebApi\VoiceText\Query as VTQ;

// setup
\Uzulla\WebApi\VoiceText\Query::$defaultApiKey = 'YOUR API KEY';

// build query
$query = new VTQ;
$query->text = 'hello';

// request
$res = VTR::getResponse($query);

if($res->isSuccess()){
  $downloaded_wav_file_name = $res->tempFileName;
}else{
  echo "request fail.";
  var_dump($res);
}

also ..., (*8)

<?php
// ...

// param details, see official api doc https://cloud.voicetext.jp/webapi/docs/api
$query = new VTQ;
$query->text = 'こんにちは';
$query->speaker = 'haruka';
$query->emotion = 'happiness';
$query->emotion_level = 2;
$query->pitch = 100;
$query->speed = 100;
$query->volume = 100;

$error_list = $query->validate();

if(!empty($error_list)){
  // query is invalid (local validation). use correct data.
  var_dump($error_list); // array(1) { 'emotion' => string(35) "specify speaker not support emotion" }

}else{
  // request
  $res = VTR::getResponse($query);

  if($res->isSuccess()){
    $downloaded_wav_file_name = $res->tempFileName;
  }else{
    echo "request fail.";
    var_dump($res);
  }
}

SAMPLE

see sample/README.md, (*9)

LICENSE

MIT, (*10)

SEE ALSO

The Versions

04/09 2014

dev-master

9999999-dev http://github.com/uzulla/

VoiceText Web API(https://cloud.voicetext.jp/webapi) wrapper library.

  Sources   Download

MIT

The Requires

 

The Development Requires

lib tts

04/09 2014

v0.2.2

0.2.2.0 http://github.com/uzulla/

VoiceText Web API(https://cloud.voicetext.jp/webapi) wrapper library.

  Sources   Download

MIT

The Requires

 

The Development Requires

lib tts

14/07 2014

v0.2.1

0.2.1.0 http://github.com/uzulla/

VoiceText Web API(https://cloud.voicetext.jp/webapi) wrapper library.

  Sources   Download

MIT

The Requires

 

The Development Requires

lib tts

14/07 2014

v0.1.0

0.1.0.0 http://github.com/uzulla/

VoiceText Web API(https://cloud.voicetext.jp/webapi) wrapper library.

  Sources   Download

MIT

The Requires

 

The Development Requires

lib tts

14/07 2014

v0.0.1

0.0.1.0 http://github.com/uzulla/

VoiceText Web API(https://cloud.voicetext.jp/webapi) wrapper library.

  Sources   Download

MIT

The Requires

 

The Development Requires

lib tts