ilbronza/notifications is a Laravel package for :laravel notifications extended.
It currently has 0 GitHub stars and 233 downloads on Packagist (latest version v2.5.1).
Install it with composer require ilbronza/notifications.
Discover more Laravel packages by ilbronza
or browse all Laravel packages to compare alternatives.
Last updated
Il package include una funzionalità per inviare messaggi vocali come notifiche:
/notifications-manager/voice-messages - lista di tutti gli utentiPubblica la config e personalizza in config/notifications.php:
'voiceMessages' => [
'user_model' => \App\Models\User::class, // Modello User dell'app
'storage_disk' => 'notifications_audio', // Disk dedicato, personalizzabile per progetto
'storage_path' => '', // Sottocartella nel disk (vuoto = root del disk)
'disk_config' => [ // Config del disk se non definito in config/filesystems.php
'driver' => 'local',
'root' => storage_path('app/public/notifications_audio'),
'url' => env('APP_URL') . '/storage/notifications_audio',
'visibility' => 'public',
],
],
'layout' => 'layouts.app', // Layout per la pagina messaggi vocali
Per usare S3 o un altro driver, definisci il disk notifications_audio in config/filesystems.php:
'notifications_audio' => [
'driver' => 's3',
'key' => env('AWS_ACCESS_KEY_ID'),
'secret' => env('AWS_SECRET_ACCESS_KEY'),
'region' => env('AWS_DEFAULT_REGION'),
'bucket' => env('AWS_BUCKET'),
'url' => env('AWS_URL'),
],
Helper esterno per trascrivere le note vocali. Chiamabile quando serve:
use IlBronza\Notifications\Helpers\SpeechToTextHelper;
// Da path assoluto
$testo = SpeechToTextHelper::transcribe('/path/to/audio.webm');
// Da path relativo allo storage
$testo = SpeechToTextHelper::transcribe('file.webm', 'notifications_audio');
// Da URL
$testo = SpeechToTextHelper::transcribe('https://example.com/audio.webm');
// Con lingua specifica (es. italiano)
$testo = SpeechToTextHelper::transcribe('file.webm', 'notifications_audio', 'it');
Configura in .env:
OPENAI_API_KEY=sk-...
NOTIFICATIONS_SPEECH_TO_TEXT_DRIVER=openai_whisper
php artisan storage:link per rendere accessibili i file audio (con disk locale)ExtendedNotifiable per ricevere le notificheremember to create the artisan command
migrate add use ExtendedNotifiable; to AccountManager User and Role