PHP code example of aisdk / deepgram

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


use AiSdk\Content;
use AiSdk\Deepgram;
use AiSdk\Generate;

Deepgram::create(['apiKey' => $_ENV['DEEPGRAM_API_KEY']]);

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