Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/uzulla/voicetext-webapi-php

VoiceText web api access wrapper.
https://github.com/uzulla/voicetext-webapi-php

Last synced: about 1 month ago
JSON representation

VoiceText web api access wrapper.

Awesome Lists containing this project

README

        

VoiceText Web API library for PHP
=================================

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

This library for VoiceText Web API.

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

VoiceText is Text-To-Speech software, that API generate wave audio file.

> VoiceText Web API は HOYAサービス株式会社様が提供するWEB APIです。詳細はこちら [VoiceText Web API](https://cloud.voicetext.jp/webapi)

> VoiceText Web API provided by HOYA Service Corporation. Detail here. [VoiceText Web API](https://cloud.voicetext.jp/webapi)

### REQUIRE

- PHP>=5.4
- Composer

### SETUP

composerでuzulla/voicetext-apiをrequireしてください。

### SYNOPSIS(利用例)

```php
text = 'hello';

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

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

```

also ...

```php
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`

### LICENSE

MIT

### SEE ALSO

- VoiceText Web API [https://cloud.voicetext.jp/webapi](https://cloud.voicetext.jp/webapi)
- Official API Document [https://cloud.voicetext.jp/webapi/docs/api](https://cloud.voicetext.jp/webapi/docs/api)