ai_audio_generator
No security coverage
Leverages either Google TTS or AI Text to Speech (e.g. Gemini, ElevenLabs, OpenAI, etc) to generate long audio files using a curated view mode controlled version of your content item using natural voice.
Features
- Provides a 'Save and generate audio' button next to save to allow content editors to trigger generation on demand when they have made a notable change.
- Runs via batch with chunking breaking at natural pauses (between paragraphs where possible, otherwise sentences) to ensure smooth audio when combining the per chunk audio clips.
- Handles any length of content.
- Provides voice control (dictated by e.g. OpenAI, Gemini, or other AI Provider options) or via Google TTS options, including language selection like en-GB instead of en-US.
- Allows SSML pronunciation control dictionary management (basic) when using Google TTS.
- Text being read has fine-grained controlled via View Mode and template
- Security coverage opt-in once stable release made
Post-Installation
See the README.md file (to be transferred here eventually).
Optional libraries
Optionally composer require google/cloud-text-to-speech if you prefer to use Google TTS; it is cheaper for volume but sounds less natural.
Similar projects
- https://www.drupal.org/project/tts - Does not handle batch, generates on demand rather than editor in control. Offers more out of the box rendering whereas this module simply produces the audio media file. Does not give the view mode and template control needed to curate the text.
- https://www.drupal.org/project/ai -> AI Automators - The automators module can generate simple audio files but does not handle joining large chunks together. The UI is quite different focused on simple on demand changes rather than giving the site editor control (which is important to manage costs on large reports) and does not give the view mode and template control needed to curate the text.
- https://www.drupal.org/project/elevenlabs - Uses AI Automators under the hood. It however also provides an AI provider, so ElevenLabs can be set as the provider.
- https://git.drupalcode.org/project/ai_audio_field - Relies on ffmpeg being installed to handle large file merging (which is not available on many hosts) and ultimately uses the AI Automator UI