Add Field Widget Actions (FWA) support for speech generation using the file_default widget
>>> [!note] Migrated issue <!-- Drupal.org comment --> <!-- Migrated from issue #3566589. --> Reported by: [marcus_johansson](https://www.drupal.org/user/385947) Related to !1086 !1085 >>> <p>[Tracker]<br> <strong>Update Summary: </strong>[One-line status update for stakeholders]<br> <strong>Short Description: </strong>Add Field Widget Actions (FWA) support for speech generation using the file_default widget.<br> <strong>Check-in Date: </strong>MM/DD/YYYY<br> [/Tracker]</p> <h3 id="summary-problem-motivation">Problem/Motivation</h3> <p>Speech generation that produces audio files is a common AI use case and fits naturally with file-based fields. Currently, fields using the <code>file_default</code> widget do not provide an in-widget way to trigger AI Automators that generate speech and store the resulting file.<br> This issue proposes adding Field Widget Actions (FWA) support for speech generation on the <code>file_default</code> widget, using <code>modules/ai_automators/src/Plugin/FieldWidgetAction/Email.php</code> as reference implementation. This allows editors to generate an audio file from text input and store it directly in the file field via the widget UI.<br> A simple way to test this is to configure an AI Automator that converts text into speech, generates an audio file, and saves the file into the field using the FWA.</p> <h3 id="summary-proposed-resolution">Proposed resolution</h3> <ul> <li>Add a new FWA plugin for the <code>file_default</code> widget that triggers a speech generation automator, modeled after <code>modules/ai_automators/src/Plugin/FieldWidgetAction/Email.php</code>.</li> <li>Ensure the FWA correctly handles file creation, storage, and attachment to the field widget.</li> </ul> <p>- <strong>This issue was created with the help of AI</strong></p>
issue