tts-webui-extension-generator
v2.2.1
Published
Extension generator for TTS Generation WebUI - creates boilerplate extensions with proper structure
Downloads
27
Maintainers
Readme
TTS WebUI Extension Generator
A command-line tool to generate boilerplate extensions for TTS Generation WebUI.
Installation & Usage
Using npx (Recommended)
npx tts-webui-extension-generator my_awesome_extensionGlobal Installation
npm install -g tts-webui-extension-generator
tts-webui-generate-extension my_awesome_extensionWhat it creates
The generator creates a complete extension structure:
extension_my_awesome_extension/
├── extension_my_awesome_extension/
│ ├── __init__.py
│ └── main.py
├── setup.py
├── README.md
└── LICENSEGenerated Files
main.py: Contains the main extension logic with:- UI function using Gradio components
extension__tts_generation_webui()function with metadata- Standalone demo for testing
setup.py: Python package configuration__init__.py: Package initializationREADME.md: Documentation templateLICENSE: MIT license template
Extension Structure
The generated extension follows the TTS WebUI extension pattern:
def extension__tts_generation_webui():
return {
"package_name": "extension_my_awesome_extension",
"name": "My Awesome Extension",
"requirements": "git+https://github.com/yourusername/extension_my_awesome_extension@main",
"description": "A template extension for TTS Generation WebUI",
"extension_type": "interface",
"extension_class": "tools",
# ... more metadata
}Development Workflow
Generate extension:
npx tts-webui-extension-generator my_extension cd extension_my_extensionTest standalone:
python extension_my_extension/main.pyCustomize:
- Edit
main.pyto implement your functionality - Update metadata (author, description, repository URLs)
- Add dependencies to
setup.py
- Edit
Publish:
- Create GitHub repository
- Push your code
- Update the
requirementsURL inmain.py
Extension Types
The generator creates interface type extensions by default. You can modify the extension_type and extension_class in the generated code:
- Extension Types:
interface,decorator - Extension Classes:
tools,audio-conversion,text-to-speech,outputs, etc.
Requirements
- Node.js 14+
- Git (for repository initialization)
Contributing
Issues and pull requests welcome at GitHub.
License
MIT License
