Filament Transcribe integrates Amazon Transcribe with the Filament admin panel. Upload or record audio files and automatically convert them into text complete with speaker labels and optional PII redaction. Transcriptions run in queued jobs and progress can be broadcast to users in real time.
You can install the package via composer:
composer require visualbuilder/filament-transcribe
You can publish config, views and migrations with:
php artisan filament-transcribe:install
Transcripts will typically take 15-30 seconds per minute of audio. To allow our transcript page to receive updates, use of websockets broadcasting messages is recommended. Details for setting up broadcasts can be found in the Laravel docs. Quick setup steps for pusher:-
Note you can use any other broadcast services, we just happen to use Pusher. The TranscriptUpdated Event will send to which ever service is configured. https://dashboard.pusher.com/apps
Create an app and paste the connection details into your .env file, be sure to check the cluster name is set to your region.
PUSHER_APP_ID="your-pusher-app-id"
PUSHER_APP_KEY="your-pusher-key"
PUSHER_APP_SECRET="your-pusher-secret"
PUSHER_HOST=
PUSHER_PORT=443
PUSHER_SCHEME="https"
PUSHER_APP_CLUSTER="mt1"
BROADCAST_DRIVER=pusher
BROADCAST_CONNECTION=pusher
composer require pusher/pusher-php-server
npm install --save-dev laravel-echo pusher-js
npm run build
In the Broadcast provider add your auth provider (we have admin guard you may not)
public function boot(): void
{
Broadcast::routes([ 'middleware' => ['web', 'auth:admin']]);
In routes/channels.php create the channel
Broadcast::channel('transcript.{transcriptId}', function ($user, $transcriptId) {
return true;
// Optionally check if the user has permission to see this transcript
//return Transcript::where('id', $transcriptId)->where('owner_id', $user->id)->exists();
});
$panel->
...
->broadcasting()
Due to the long time required to complete the transcript, synchronous jobs will time out if not completed within a minute.
(Note: annoyingly AWS does not provide a % complete indicator on these jobs so we can't give the user any meaningful progress bar)
We've therefore included a separate job to check the transcript progress. This job is called and scheduled by the process job and is best handled as a background task, so good to use a queue like
database or redis instead of the default sync queue.
QUEUE_CONNECTION=database
When recording audio through the provided recorder, the browser will also save a recording-<timestamp>.webm
file locally before uploading. This ensures you retain a copy if the upload fails.
$filamentTranscribe = new Visualbuilder\FilamentTranscribe();
echo $filamentTranscribe->echoPhrase('Hello, Visualbuilder!');
composer test
Please see CHANGELOG for more information on what has changed recently.
Please see CONTRIBUTING for details.
Please review our security policy on how to report security vulnerabilities.
The MIT License (MIT). Please see License File for more information.