PHPackages                             speech-synthesis/speech-synthesis - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. speech-synthesis/speech-synthesis

ActiveLibrary

speech-synthesis/speech-synthesis
=================================

The composer plugin for speech-synthesis

1.0.2(5y ago)61491MITPHPPHP &gt;=7.0.0

Since Jun 29Pushed 5y ago1 watchersCompare

[ Source](https://github.com/asdfghjk16945/speech-synthesis)[ Packagist](https://packagist.org/packages/speech-synthesis/speech-synthesis)[ RSS](/packages/speech-synthesis-speech-synthesis/feed)WikiDiscussions master Synced yesterday

READMEChangelog (3)Dependencies (1)Versions (6)Used By (0)

speech-synthesis
================

[](#speech-synthesis)

支持阿里、百度、腾讯、科大讯飞语音合成接口

composer下载

```
composer require speech-synthesis/speech-synthesis

```

科大讯飞的使用示例：

```
$config = [
    'Iflytek'=>[
        'fileRoot'=>'/uploads',// 文件保存的路径
        'app_id' => '****',
        'api_secret'=>'****',
        'api_key'=>'****',
    ]
];
$syn = new SynthesisFactory('Iflytek','此处是文件名',$config);
$msg = $syn->getErrorMsg();
if($msg){
    echo $msg;// 错误信息
    return false;
}
    $speechFile = $syn->getSpeechFile();

```

阿里云使用示例：

1、获取access\_token

```
composer require alibabacloud/sdk

```

阿里官方demo

```
