A newer version of the Gradio SDK is available:
6.1.0
metadata
title: Hfstudio
emoji: π
colorFrom: green
colorTo: purple
sdk: gradio
sdk_version: 5.49.1
app_file: app.py
pinned: false
HFStudio ποΈ
A local and API-based Text-to-Speech studio for creating high-quality speech from text.
Features
- π― Multiple TTS Models: Support for various TTS engines
- π Voice Selection: Choose from different voice models
- β‘ Real-time Generation: Fast speech synthesis
- π§ Parameter Control: Fine-tune speed, stability, and similarity
- π΅ Audio Preview: Built-in audio player with controls
- π HuggingFace Integration: Automatic sign-in with your HF account (OAuth enabled)
Quick Start
This Space runs HFStudio automatically. Simply:
- Open the Space - The web interface will load automatically
- Sign In (automatic) - You'll be automatically signed in with your HuggingFace account
- Enter Text - Type or paste the text you want to convert to speech
- Choose Voice - Select from available voice models
- Adjust Settings - Tune speed, stability, and other parameters
- Generate - Click "Generate speech" to create audio
- Play & Download - Use the built-in player to preview your audio
Local Installation
Want to run HFStudio locally? Install via pip:
pip install hfstudio
hfstudio
Then visit http://localhost:7860 in your browser.
Development
This Space is automatically synced from the GitHub repository.
To contribute or run locally for development:
git clone https://github.com/yourusername/hfstudio
cd hfstudio
./run_dev.sh # Starts both frontend and backend
API Usage
HFStudio also provides a REST API for integration:
import requests
# Generate speech
response = requests.post('https://abidlabs-hfstudio.hf.space/api/tts/generate',
json={
"text": "Hello, world!",
"voice_id": "sarah",
"model_id": "coqui-tts"
}
)
audio_data = response.json()
print(f"Audio URL: {audio_data['audio_url']}")
License
MIT License - see LICENSE for details.