visualbuilder/filament-transcribe

Transcribe audio files with speaker labels

1.0.2 2025-07-20 01:46 UTC

README

Packagist Version run-tests GitHub Code Style Action Status Total Downloads

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.

Support us

Installation

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

Broadcasting

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:-

Setup a Pusher app for Broadcasts

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

Install Pusher and Echo

composer require pusher/pusher-php-server
npm install --save-dev laravel-echo pusher-js
npm run build

Setup Broadcast Auth and Route

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();
});

Setup Filament to use broadcasts in the panel provider

$panel->
...
 ->broadcasting()

Background Job Processing

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.

Usage

$filamentTranscribe = new Visualbuilder\FilamentTranscribe();
echo $filamentTranscribe->echoPhrase('Hello, Visualbuilder!');

Testing

composer test

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

License

The MIT License (MIT). Please see License File for more information.