A plugin for text-to-speech(TTS) generation using the FAL.ai API within the ElizaOS ecosystem.
The text-to-speech(TTS) plugin enables AI-powered creation of speech through FAL.ai's services. It provides functionality to generate audio from text descriptions, automatically detects language, and selects appropriate voice models.
pnpm install @elizaos/plugin-tts
The plugin requires the following environment variable or runtime setting to be set:
FAL_API_KEY=<Your FAL.ai API key>
import { TTSGenerationPlugin } from "@elizaos/plugin-tts";
// The plugin responds to natural language commands like:
"Generate TTS of Hello World";
"Create a TTS for Welcome to ElizaOS";
"Make a TTS saying [your text]";
Generates speech audio based on text input.
Aliases:
- TTS_GENERATION
- CREATE_TTS
- TEXT2SPEECH
- T2S
- TEXT_TO_SPEECH
- AUDIO_CREATE
Features:
- Automatic language detection
- Voice selection based on detected language
- Local file caching
- Progress tracking
- Error handling
-
Generation Failures
- Verify FAL API key is correctly set
- Ensure text input is at least 3 characters long
- Check network connectivity to FAL.ai services
-
Storage Issues
- Verify write permissions to content_cache directory
- Ensure sufficient disk space
- Check if content_cache directory exists
- API Key Management
- Store FAL API key securely using runtime settings or environment variables
- Never commit API keys to version control
- Monitor API usage
- Clone the repository
- Install dependencies:
pnpm install
- Build the plugin:
pnpm run build
- Run the plugin:
pnpm run dev
-
Advanced Voice Features
- Custom voice model support
- Voice style transfer
- Emotion control
- Speech rate adjustment
- Pitch modification
- Multiple speaker support
-
Audio Processing
- Background noise reduction
- Audio quality enhancement
- Format conversion options
- Volume normalization
- Audio effects processing
- Batch processing support
-
Language Support
- Expanded language detection
- Regional accent support
- Dialect customization
- Pronunciation improvements
- Multi-language mixing
- Custom pronunciation rules
-
Integration Features
- Streaming audio support
- Real-time generation
- Caching optimization
- Batch generation
- Queue management
- Progress monitoring
-
Developer Tools
- Extended API options
- Testing framework
- Performance profiling
- Debug logging
- Integration examples
- Documentation generator
We welcome community feedback and contributions to help prioritize these enhancements.
Contributions are welcome! Please see the CONTRIBUTING.md file for more information.
This plugin integrates with and builds upon several key technologies:
- FAL.ai: AI model deployment platform
- langdetect: Language detection library
- ElizaOS: Core framework
Special thanks to:
- The FAL.ai team for AI infrastructure
- The langdetect development community
- The Eliza community for their contributions and feedback
For more information about TTS capabilities:
This plugin is part of the Eliza project. See the main project repository for license information.