PHP code example of jormin / baidu-speech

1. Go to this page and download the library: Download jormin/baidu-speech library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

jormin / baidu-speech example snippets


       $baiduSpeech = new Jormin\BaiduSpeech\BaiduSpeech($appID, $apiKey, $secretKey);
       $baiduSpeech->recognize($filePath, $url, $callback, $userID, $format, $rate, $lan);
    

       $baiduSpeech = new Jormin\BaiduSpeech\BaiduSpeech($appID, $apiKey, $secretKey);
       $baiduSpeech->combine($storagePath, $text, $userID, $lan, $speed, $pitch, $volume, $person);