1. Go to this page and download the library: Download gridwb/laravel-elevenlabs 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/ */
use Gridwb\LaravelElevenLabs\Facades\ElevenLabs;
$conversationId = '<string>';
ElevenLabs::conversations()->delete($conversationId);
use Gridwb\LaravelElevenLabs\Facades\ElevenLabs;
$agentId = '<string>';
$response = ElevenLabs::conversations()->getSignedUrl($agentId);
echo $response->signedUrl;
use Gridwb\LaravelElevenLabs\Facades\ElevenLabs;
$agentId = '<string>';
$response = ElevenLabs::conversations()->getToken($agentId);
echo $response->token;
use Gridwb\LaravelElevenLabs\Facades\ElevenLabs;
$tokenType = 'realtime_scribe';
$response = ElevenLabs::tokens()->createSingleUseToken($tokenType);
echo $response->token;
use Gridwb\LaravelElevenLabs\Events\SubscriptionStarted;
use Illuminate\Support\Facades\Event;
Event::listen(PostCallTranscription::class, function (PostCallTranscription $event) {
$payload = $event->payload;
// Access data from ElevenLabs payload
});