Skip to content

fagai/php-voicetext

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PHP-VoiceText

Latest Stable Version Latest Unstable Version License

VoiceText Web API client for PHP

使う方法

composer require fagai/voicetext
<?php

use \Fagai\VoiceText\VoiceText;

$voice = new VoiceText('<your api key>');
$voice->speaker('hikari')
      ->emotion('happiness')
      ->emotion_level(2)
      ->pitch(150)
      ->speed(120)
      ->volume(150)
      ->text('今日も一日がんばるぞい!');

// get wav binary data
$binaryData = $voice->get();

Other Examples

$voice = new VoiceText('<your api key>');
$voice->setParams([
	'speaker' => 'hikari',
	'emotion' => 'happiness',
	'emotion_level' => 2,
	'pitch' => 150,
	'speed' => 120,
	'volume' => 150,
	'text' => '今日も一日がんばるぞい!']);

$binaryData = $voice->get();

Exceptions

RequestErrorException

400 Error

NotAuthorizedException

401 Error

HttpNotFoundException

404 Error

HttpMethodErrorException

405 Error

ServerErrorException

500 Error

ServiceErrorException

503 Error

About

voicetext web api for php client

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages