### Installing Pre-commit Hooks for Development Source: https://github.com/humeai/expressive-tts-arena/blob/main/README.md Command for setting up pre-commit hooks to automatically perform linting, formatting, and type-checking on code before commits, which is recommended for contributors to the project. ```bash uv run pre-commit install ``` -------------------------------- ### Running the Application with Python and UV Package Manager Source: https://github.com/humeai/expressive-tts-arena/blob/main/README.md Commands for running the Expressive TTS Arena application using the UV package manager, including a standard launch option and an alternative with hot-reloading for development. ```bash uv run python -m src.main ``` ```bash uv run watchfiles "python -m src.main" src ``` -------------------------------- ### Configuring Environment Variables for API Keys Source: https://github.com/humeai/expressive-tts-arena/blob/main/README.md Sample configuration for the .env file showing required API keys for the various text-to-speech providers used in the application. This must be set up before running the application. ```txt HUME_API_KEY=YOUR_HUME_API_KEY ANTHROPIC_API_KEY=YOUR_ANTHROPIC_API_KEY ELEVENLABS_API_KEY=YOUR_ELEVENLABS_API_KEY OPENAI_API_KEY=YOUR_OPENAI_API_KEY ``` -------------------------------- ### Displaying Project Structure with Directory Tree Source: https://github.com/humeai/expressive-tts-arena/blob/main/README.md A directory tree representation showing the organization of the Expressive TTS Arena project, highlighting key folders and files with their purposes as comments. ```bash Expressive TTS Arena/ ├── public/ ├── src/ │ ├── common/ │ │ ├── __init__.py │ │ ├── common_types.py # Application-wide custom type aliases and definitions. │ │ ├── config.py # Manages application config (Singleton) loaded from env vars. │ │ ├── constants.py # Application-wide constant values. │ │ ├── utils.py # General-purpose utility functions used across modules. │ ├── core/ │ │ ├── __init__.py │ │ ├── tts_service.py # Service handling Text-to-Speech provider selection and API calls. │ │ ├── voting_service.py # Service managing database operations for votes and leaderboards. │ ├── database/ # Database access layer using SQLAlchemy. │ │ ├── __init__.py │ │ ├── crud.py # Data Access Objects (DAO) / CRUD operations for database models. │ │ ├── database.py # Database connection setup (engine, session management). │ │ └── models.py # SQLAlchemy ORM models defining database tables. │ ├── frontend/ │ │ ├── components/ │ │ │ │ ├── __init__.py │ │ │ │ ├── arena.py # UI definition and logic for the 'Arena' tab. │ │ │ │ ├── leaderboard.py # UI definition and logic for the 'Leaderboard' tab. │ │ ├── __init__.py │ │ ├── frontend.py # Main Gradio application class; orchestrates UI components and layout. │ ├── integrations/ # Modules for interacting with external third-party APIs. │ │ ├── __init__.py │ │ ├── anthropic_api.py # Integration logic for the Anthropic API. │ │ ├── elevenlabs_api.py # Integration logic for the ElevenLabs API. │ │ └── hume_api.py # Integration logic for the Hume API. │ ├── middleware/ │ │ ├── __init__.py │ │ ├── meta_tag_injection.py # Middleware for injecting custom HTML meta tags into the Gradio page. │ ├── scripts/ │ │ ├── __init__.py │ │ ├── init_db.py # Script to create database tables based on models. │ │ ├── test_db.py # Script for testing the database connection configuration. │ ├── __init__.py │ ├── main.py # Main script to configure and run the Gradio application. │── static/ │ ├── audio/ # Temporary storage for generated audio files served to the UI. │ ├── css/ │ │ ├── styles.css # Custom CSS overrides and styling for the Gradio UI. ├── .dockerignore ├── .env.example ├── .gitignore ├── .pre-commit-config.yaml ├── Dockerfile ├── LICENSE.txt ├── pyproject.toml ├── README.md ├── uv.lock ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.