GithubHelp home page GithubHelp logo

rongqiangqin_baiduspeech's Introduction

rongqiangqin_baiduspeech

百度语音合成sdk(php)-基于官方sdk

#使用方法

  use rongqiangqin\baiduspeech\AipSpeech;
  
  $APP_ID = 'your-id';
  $API_KEY = 'your-key';
  $SECRET_KEY = 'your-key';

  $client = new AipSpeech($APP_ID, $API_KEY, $SECRET_KEY);

  $text="你好,百度";

  $result = $client->synthesis($text, 'zh', 1, array(
      'vol' => 5,//音量,取值0-15,默认为5中音量
      'per' => 1,//发音人选择, 0为普通女声,1为普通男生,3为情感合成-度逍遥,4为情感合成-度丫丫,默认为普通女声
      'spd' => 7,//语速,取值0-15,默认为5中语速
  ));

  // 识别正确返回语音二进制 错误则返回json 参照下面错误码
  if(!is_array($result)){
      file_put_contents('audio.mp3', $result);
  }

rongqiangqin_baiduspeech's People

Contributors

xiaopenggithub avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.