PHP code example of acentrix / transcriptions

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

    

acentrix / transcriptions example snippets


use Acentrix\Transcriptions\Transcription;

$vtt_file = 'path/to/your/vtt/file.vtt'

$lines = Transcription::load($vtt_file)->lines();

foreach ($lines as $line) {
    var_dump("{$line->beginningTimestamp()} - {$line->body}");
}