PHP code example of aisdk / gladia

1. Go to this page and download the library: Download aisdk/gladia 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/ */

    

aisdk / gladia example snippets


use AiSdk\Content;
use AiSdk\Generate;
use AiSdk\Gladia;

Gladia::create(['apiKey' => $_ENV['GLADIA_API_KEY']]);

$result = Generate::transcription()
    ->model(Gladia::model('solaria-3'))
    ->audio(Content::audio('https://example.com/audio.mp3'))
    ->run();