1. Go to this page and download the library: Download lifetimesms/gateway 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/ */
$params = ['title' => 'Sample File For Voice SMS', 'file_path' => 'sample.wav'];
// 'file_path' must be the complete path of the audio file
// Valid extensions are mp3 and wav only
$response = Lifetimesms::createVoiceFromFile($params);
$params = ['title' => 'Sample Text For Voice SMS', 'text' => 'Sample text of voice sms.'];
$response = Lifetimesms::createVoiceFromTextToSpeech($params);