luudoanh/text-to-speech
最新稳定版本:1
Composer 安装命令:
composer require luudoanh/text-to-speech
包简介
A class converts text files into audio files
README 文档
README
- This is a basic class that allows you to convert text content into audio (mp3) files, via a google translate. (EN).
- Đây là một lớp đơn giản giúp bạn có thể chuyển đổi nội dung của file văn bản (text) thành file âm thanh (mp3), thông qua goiogle translate (VI).
Installation
With Composer
$ composer require luudoanh/text-to-speech
<?php require_once __DIR__.'/vendor/autoload.php'; use \App\TextToSpeechBasic; $tts = new TextToSpeechBasic(); $config = array( 'tl' => 'en', // Example: en => English, vi => Vietnamese 'ie' => 'UTF-8', // The language character set you want to convert. 'client' => 'tw-ob' // Constant ); // Config settings $tts->_setting($config); // $file_path path to text file. // $folder_save folder save audio file echo $tts->TTS($file_path, $folder_save); // return Successful! is completed
Without Composer
If you don't use composer. Download the Text To Speech latest release and put the contents of the ZIP archive into a directory in your project.
<?php require_once __DIR__.'/src/TextToSpeechBasic.php'; use \App\TextToSpeechBasic; $tts = new TextToSpeechBasic(); $config = array( 'tl' => 'en', // Example: en => English, vi => Vietnamese 'ie' => 'UTF-8', // The language character set you want to convert. 'client' => 'tw-ob' // Constant ); // Config settings $tts->_setting($config); // $file_path path to text file. // $folder_save folder save audio file echo $tts->TTS($file_path, $folder_save); // return Successful! is completed
Support Language
I'm not sure, but it works well with English and Vietnamese
统计信息
- 总下载量: 96
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: Unknown
- 更新时间: 2019-06-30