michaeld555 / filament-audio-generator-field
A Filament field plugin that generates audio using AI
Requires
- php: ^8.1
- filament/filament: ^3.2
- filament/forms: ^3.0
- guzzlehttp/guzzle: ^7.8
- illuminate/contracts: ^10.0|^11.0
- league/commonmark: ^2.4
- spatie/laravel-package-tools: ^1.15.0
- symfony/http-client: ^6.4
Requires (Dev)
- larastan/larastan: ^2.0.1
- laravel/pint: ^1.0
- nunomaduro/collision: ^7.9
- orchestra/testbench: ^8.0
This package is auto-updated.
Last update: 2025-01-13 09:54:29 UTC
README
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.
Installation
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.
Install the package via composer
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"
Usage
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.
Credits
License
The MIT License (MIT). Please see License File for more information.