machero / speech

此包最新版本(v1.0)没有提供许可证信息。

v1.0 2018-03-12 10:28 UTC

This package is not auto-updated.

Last update: 2024-09-18 10:42:52 UTC


README

本项目是基于百度智能语音的SDK扩展封装为php的composer包

安装

composer require machero/speech

使用

    $speech = new AipSpeech(
        config('baidu-speech.app_id'),
        config('baidu-speech.app_key'),
        config('baidu-speech.app_secret')
    );
    $this->speech = $speech;
    /**
     * @apiparams $text 要合成的文本
     * @apiparams $spd  语音的速度
     *
     */
    $mp3 = $this->speech->synthesis($text, $lang='zh', $ctp=1, $options=array('spd'=>3));
    //具体请参考百度智能语音开发文档