This custom field allows you to generate audios with different languages and voices using free AI voice generator. It extends the FileUpload field and adds a button to open the audio generator modal where you can generate the audio file.
Before you begin, you must have the Laravel Filament package installed and configured. If you haven't done this yet, you can find the installation instructions here.
Run the following command in your terminal to install the package:
composer require michaeld555/filament-audio-generator-field
You can publish the config file with:
php artisan vendor:publish --tag="filament-audio-generator-field-config"
Optionally, you can publish the translations files:
php artisan vendor:publish --tag="filament-audio-generator-field-translations"
Just add new Field or replace your FileUpload field with AudioGenerator field in your form schema definition:
use \Michaeld555\AudioGeneratorField\Forms\Components\AudioGenerator;Â [...]public static function form(Form $form): Form{ return $form ->schema([ AudioGenerator::make('audio'), ]);}
You could use all the same options as FileUpload field, for example:
use \Michaeld555\AudioGeneratorField\Forms\Components\AudioGenerator;Â AudioGenerator::make('audio') ->disk('private') ->audioGenerator(false) // hide the 'Generate with AI' button,
After you add the field to your form, you should see a button next to the file input. When you click the button, the audio generator modal will open.
The MIT License (MIT). Please see License File for more information.