A newer version of the Gradio SDK is available:
6.1.0
Local Testing Guide
Quick Test (Recommended)
Test just the audio generation:
# Activate virtual environment
source .venv/bin/activate
# Run quick test
python quick_test.py
This will generate a short audio sample to verify Kokoro-82M TTS works.
Full Gradio App
To run the complete app locally:
# Activate virtual environment
source .venv/bin/activate
# Set environment variables (or create .env file)
export HUGGINGFACE_TOKEN=your_token_here
export ANTHROPIC_API_KEY=your_anthropic_key_here
export SEMANTIC_SCHOLAR_API=your_scholar_key_here # Optional
# Run the app
python app.py
Then open your browser to http://localhost:7860
What to Test
- Audio Generation - Run
quick_test.pyto verify Kokoro-82M works - Paper Search - Enter a topic like "AlphaFold" or "CRISPR"
- Full Workflow - Generate a complete podcast from a research paper
- UI/UX - Check that all tabs display correctly
- Error Handling - Try invalid inputs to see error messages
Expected Output
- Audio files saved to
assets/audio/ - WAV format (Kokoro-82M native format)
- File sizes ~900KB-1MB per minute of audio
- Quality Much better than gTTS, similar to commercial TTS
Troubleshooting
"No module named 'huggingface_hub'"
pip install huggingface-hub
"HUGGINGFACE_TOKEN not set"
Make sure you've exported the environment variable or created a .env file.
"Port 7860 already in use"
GRADIO_SERVER_PORT=7861 python app.py
Requirements
- Python 3.10+
- Internet connection (for API calls)
- Hugging Face token (free at https://huggingface.co/settings/tokens)
- Anthropic API key (for Claude AI)