|
|
--- |
|
|
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: |
|
|
|
|
|
1. **Open the Space** - The web interface will load automatically |
|
|
2. **Sign In** (automatic) - You'll be automatically signed in with your HuggingFace account |
|
|
3. **Enter Text** - Type or paste the text you want to convert to speech |
|
|
4. **Choose Voice** - Select from available voice models |
|
|
5. **Adjust Settings** - Tune speed, stability, and other parameters |
|
|
6. **Generate** - Click "Generate speech" to create audio |
|
|
7. **Play & Download** - Use the built-in player to preview your audio |
|
|
|
|
|
## Local Installation |
|
|
|
|
|
Want to run HFStudio locally? Install via pip: |
|
|
|
|
|
```bash |
|
|
pip install hfstudio |
|
|
hfstudio |
|
|
``` |
|
|
|
|
|
Then visit `http://localhost:7860` in your browser. |
|
|
|
|
|
## Development |
|
|
|
|
|
This Space is automatically synced from the [GitHub repository](https://github.com/yourusername/hfstudio). |
|
|
|
|
|
To contribute or run locally for development: |
|
|
|
|
|
```bash |
|
|
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: |
|
|
|
|
|
```python |
|
|
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](LICENSE) for details. |
|
|
|
|
|
--- |
|
|
|
|
|
Built with β€οΈ using [SvelteKit](https://kit.svelte.dev/) and [FastAPI](https://fastapi.tiangolo.com/) |